diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml new file mode 100644 index 0000000..660edaf --- /dev/null +++ b/.github/workflows/build-and-deploy.yml @@ -0,0 +1,34 @@ +name: Build and Deploy +on: + push: + tags: + - v* +permissions: + contents: write +jobs: + build-and-deploy: + runs-on: ubuntu-latest + environment: deploy + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v3 + + - name: Use Node.js 😂 + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Install and Build 🔧 + run: | + npm ci + npm run build-ci + + - name: Deploy 🚀 + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: . + + - name: Publish to NPM 📖 + uses: JS-DevTools/npm-publish@v2 + with: + token: ${{ secrets.NPM_TOKEN }} diff --git a/.gitignore b/.gitignore index e9d30d7..07905bd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,26 @@ + +# -- clip-for-deploy-start -- + +/docs +/dist +index.html + +# -- clip-for-deploy-end -- + + +/.pnp +.pnp.js + *.pyc .DS_Store node_modules +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* + + diff --git a/build/templates/index.template b/build/templates/index.template new file mode 100644 index 0000000..4dbb864 --- /dev/null +++ b/build/templates/index.template @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + +%(title)s + + + + + +
+ +
+ %(content)s +
+
+ +
Fork me on GitHub
+ + + + + + diff --git a/build/append-banner.js b/build/tools/append-banner.js similarity index 100% rename from build/append-banner.js rename to build/tools/append-banner.js diff --git a/build/tools/makeindex.js b/build/tools/makeindex.js new file mode 100644 index 0000000..ddd0d4b --- /dev/null +++ b/build/tools/makeindex.js @@ -0,0 +1,93 @@ +import fs from 'fs'; +import path from 'path'; +import showdown from 'showdown'; +import * as url from 'url'; +const dirname = url.fileURLToPath(new URL('.', import.meta.url)); + +const converter = new showdown.Converter({ + openLinksInNewWindow: true, + ghCodeBlocks: true, + simplifiedAutoLink: true, +}); + +const pkg = JSON.parse(fs.readFileSync(path.join(dirname, '..', '..', 'package.json'), {encoding: 'utf8'})); + +function getLicense(pkg) { + return `@license wgpu-matrix ${pkg.version} Copyright (c) 2023, Gregg Tavares All Rights Reserved. +Available via the MIT license. +see: http://github.com/greggman/wgpu-matrix for details`; +} + +/** + * Replace %(id)s in strings with values in objects(s) + * + * Given a string like `"Hello %(name)s from %(user.country)s"` + * and an object like `{name:"Joe",user:{country:"USA"}}` would + * return `"Hello Joe from USA"`. + * + * @param {string} str string to do replacements in + * @param {Object|Object[]} params one or more objects. + * @returns {string} string with replaced parts + */ +const replaceParams = (function () { + const replaceParamsRE = /%\(([^)]+)\)s/g; + + return function (str, params) { + if (!params.length) { + params = [params]; + } + + return str.replace(replaceParamsRE, function (match, key) { + const colonNdx = key.indexOf(':'); + if (colonNdx >= 0) { + /* + try { + const args = hanson.parse("{" + key + "}"); + const handlerName = Object.keys(args)[0]; + const handler = replaceHandlers[handlerName]; + if (handler) { + return handler(args[handlerName]); + } + console.error("unknown substitution handler: " + handlerName); + } catch (e) { + console.error(e); + console.error("bad substitution: %(" + key + ")s"); + } + */ + throw new Error('unsupported'); + } else { + // handle normal substitutions. + const keys = key.split('.'); + for (let ii = 0; ii < params.length; ++ii) { + let obj = params[ii]; + for (let jj = 0; jj < keys.length; ++jj) { + const key = keys[jj]; + obj = obj[key]; + if (obj === undefined) { + break; + } + } + if (obj !== undefined) { + return obj; + } + } + } + console.error('unknown key: ' + key); + return '%(' + key + ')s'; + }); + }; +}()); + +const html = converter.makeHtml(fs.readFileSync('README.md', {encoding: 'utf8'})); +const template = fs.readFileSync('build/templates/index.template', {encoding: 'utf8'}); +let content = replaceParams(template, { + content: html, + license: getLicense(pkg), + srcFileName: 'README.md', + title: 'wgpu-matrix, a fast WebGPU math library', + version: pkg.version, +}); +content = content.replace(/href="https:\/\/greggman\.github\.io\/wgpu-matrix\//g, 'href="./'); +fs.writeFileSync('index.html', content); + + diff --git a/build/tools/prep-for-deploy.js b/build/tools/prep-for-deploy.js new file mode 100644 index 0000000..8bc69c9 --- /dev/null +++ b/build/tools/prep-for-deploy.js @@ -0,0 +1,9 @@ +import fs from 'fs'; +import path from 'path'; +import * as url from 'url'; +const dirname = url.fileURLToPath(new URL('.', import.meta.url)); + +const ignoreFilename = path.join(dirname, '..', '..', '.gitignore'); +const ignore = fs.readFileSync(ignoreFilename, {encoding: 'utf8'}); +const newIgnore = ignore.replace(/# -- clip-for-deploy-start --[\s\S]*?# -- clip-for-deploy-end --/, ''); +fs.writeFileSync(ignoreFilename, newIgnore); diff --git a/dist/2.x/array-like.d.ts b/dist/2.x/array-like.d.ts deleted file mode 100644 index 2a3cc96..0000000 --- a/dist/2.x/array-like.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Array types for vectors and matrices - */ -export type ArrayLike = number[] | Float32Array | Float64Array; -/** - * Constructor function for array types for vectors and matrices - */ -export type ArrayLikeCtor = new (n: number) => ArrayLike; diff --git a/dist/2.x/mat3-impl.d.ts b/dist/2.x/mat3-impl.d.ts deleted file mode 100644 index e36cf05..0000000 --- a/dist/2.x/mat3-impl.d.ts +++ /dev/null @@ -1,271 +0,0 @@ -import { Quat } from './quat'; -import { Mat3 } from './mat3'; -import { Mat4 } from './mat4'; -import Vec2 from './vec2-impl'; -export default Mat3; -export declare type Mat3LikeCtor = new (n: number) => Mat3; -/** - * Sets the type this library creates for a Mat3 - * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array` - * @returns previous constructor for Mat3 - */ -export declare function setDefaultType(ctor: new (n: number) => Mat3): Mat3LikeCtor; -/** - * Create a Mat3 from values - * - * Note: Since passing in a raw JavaScript array - * is valid in all circumstances, if you want to - * force a JavaScript array into a Mat3's specified type - * it would be faster to use - * - * ``` - * const m = mat3.clone(someJSArray); - * ``` - * - * Note: a consequence of the implementation is if your Mat3Type = `Array` - * instead of `Float32Array` or `Float64Array` then any values you - * don't pass in will be undefined. Usually this is not an issue since - * (a) using `Array` is rare and (b) using `mat3.create` is usually used - * to create a Mat3 to be filled out as in - * - * ``` - * const m = mat3.create(); - * mat3.perspective(fov, aspect, near, far, m); - * ``` - * - * @param v0 - value for element 0 - * @param v1 - value for element 1 - * @param v2 - value for element 2 - * @param v3 - value for element 3 - * @param v4 - value for element 4 - * @param v5 - value for element 5 - * @param v6 - value for element 6 - * @param v7 - value for element 7 - * @param v8 - value for element 8 - * @returns matrix created from values. - */ -export declare function create(v0?: number, v1?: number, v2?: number, v3?: number, v4?: number, v5?: number, v6?: number, v7?: number, v8?: number): Mat3; -/** - * Sets the values of a Mat3 - * Also see {@link mat3.create} and {@link mat3.copy} - * - * @param v0 - value for element 0 - * @param v1 - value for element 1 - * @param v2 - value for element 2 - * @param v3 - value for element 3 - * @param v4 - value for element 4 - * @param v5 - value for element 5 - * @param v6 - value for element 6 - * @param v7 - value for element 7 - * @param v8 - value for element 8 - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns Mat3 set from values. - */ -export declare function set(v0: number, v1: number, v2: number, v3: number, v4: number, v5: number, v6: number, v7: number, v8: number, dst?: Mat3): Mat3; -/** - * Creates a Mat3 from the upper left 3x3 part of a Mat4 - * @param m4 - source matrix - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns Mat3 made from m4 - */ -export declare function fromMat4(m4: Mat4, dst?: Mat3): Mat3; -/** - * Creates a Mat3 rotation matrix from a quaternion - * @param q - quaternion to create matrix from - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns Mat3 made from q - */ -export declare function fromQuat(q: Quat, dst?: Mat3): Mat3; -/** - * Negates a matrix. - * @param m - The matrix. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns -m. - */ -export declare function negate(m: Mat3, dst?: Mat3): Mat3; -/** - * Copies a matrix. (same as {@link mat3.clone}) - * Also see {@link mat3.create} and {@link mat3.set} - * @param m - The matrix. - * @param dst - The matrix. If not passed a new one is created. - * @returns A copy of m. - */ -export declare function copy(m: Mat3, dst?: Mat3): Mat3; -/** - * Copies a matrix (same as {@link mat3.copy}) - * Also see {@link mat3.create} and {@link mat3.set} - * @param m - The matrix. - * @param dst - The matrix. If not passed a new one is created. - * @returns A copy of m. - */ -export declare const clone: typeof copy; -/** - * Check if 2 matrices are approximately equal - * @param a Operand matrix. - * @param b Operand matrix. - * @returns true if matrices are approximately equal - */ -export declare function equalsApproximately(a: Mat3, b: Mat3): boolean; -/** - * Check if 2 matrices are exactly equal - * @param a Operand matrix. - * @param b Operand matrix. - * @returns true if matrices are exactly equal - */ -export declare function equals(a: Mat3, b: Mat3): boolean; -/** - * Creates a 3-by-3 identity matrix. - * - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns A 3-by-3 identity matrix. - */ -export declare function identity(dst?: Mat3): Mat3; -/** - * Takes the transpose of a matrix. - * @param m - The matrix. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The transpose of m. - */ -export declare function transpose(m: Mat3, dst?: Mat3): Mat3; -/** - * Computes the inverse of a 3-by-3 matrix. - * @param m - The matrix. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The inverse of m. - */ -export declare function inverse(m: Mat3, dst?: Mat3): Mat3; -/** - * Compute the determinant of a matrix - * @param m - the matrix - * @returns the determinant - */ -export declare function determinant(m: Mat3): number; -/** - * Computes the inverse of a 3-by-3 matrix. (same as inverse) - * @param m - The matrix. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The inverse of m. - */ -export declare const invert: typeof inverse; -/** - * Multiplies two 3-by-3 matrices with a on the left and b on the right - * @param a - The matrix on the left. - * @param b - The matrix on the right. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The matrix product of a and b. - */ -export declare function multiply(a: Mat3, b: Mat3, dst?: Mat3): Mat3; -/** - * Multiplies two 3-by-3 matrices with a on the left and b on the right (same as multiply) - * @param a - The matrix on the left. - * @param b - The matrix on the right. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The matrix product of a and b. - */ -export declare const mul: typeof multiply; -/** - * Sets the translation component of a 3-by-3 matrix to the given - * vector. - * @param a - The matrix. - * @param v - The vector. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The matrix with translation set. - */ -export declare function setTranslation(a: Mat3, v: Vec2, dst?: Mat3): Mat3; -/** - * Returns the translation component of a 3-by-3 matrix as a vector with 3 - * entries. - * @param m - The matrix. - * @param dst - vector to hold result. If not passed a new one is created. - * @returns The translation component of m. - */ -export declare function getTranslation(m: Mat3, dst?: Vec2): Vec2; -/** - * Returns an axis of a 3x3 matrix as a vector with 2 entries - * @param m - The matrix. - * @param axis - The axis 0 = x, 1 = y, - * @returns The axis component of m. - */ -export declare function getAxis(m: Mat3, axis: number, dst?: Vec2): Vec2; -/** - * Sets an axis of a 3x3 matrix as a vector with 2 entries - * @param m - The matrix. - * @param v - the axis vector - * @param axis - The axis 0 = x, 1 = y; - * @param dst - The matrix to set. If not passed a new one is created. - * @returns The matrix with axis set. - */ -export declare function setAxis(m: Mat3, v: Vec2, axis: number, dst?: Mat3): Mat3; -/** - * Returns the scaling component of the matrix - * @param m - The Matrix - * @param dst - The vector to set. If not passed a new one is created. - */ -export declare function getScaling(m: Mat3, dst?: Vec2): Vec2; -/** - * Creates a 3-by-3 matrix which translates by the given vector v. - * @param v - The vector by which to translate. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The translation matrix. - */ -export declare function translation(v: Vec2, dst?: Mat3): Mat3; -/** - * Translates the given 3-by-3 matrix by the given vector v. - * @param m - The matrix. - * @param v - The vector by which to translate. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The translated matrix. - */ -export declare function translate(m: Mat3, v: Vec2, dst?: Mat3): Mat3; -/** - * Creates a 3-by-3 matrix which rotates by the given angle. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotation matrix. - */ -export declare function rotation(angleInRadians: number, dst?: Mat3): Mat3; -/** - * Rotates the given 3-by-3 matrix by the given angle. - * @param m - The matrix. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotated matrix. - */ -export declare function rotate(m: Mat3, angleInRadians: number, dst?: Mat3): Mat3; -/** - * Creates a 3-by-3 matrix which scales in each dimension by an amount given by - * the corresponding entry in the given vector; assumes the vector has three - * entries. - * @param v - A vector of - * 2 entries specifying the factor by which to scale in each dimension. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The scaling matrix. - */ -export declare function scaling(v: Vec2, dst?: Mat3): Mat3; -/** - * Scales the given 3-by-3 matrix in each dimension by an amount - * given by the corresponding entry in the given vector; assumes the vector has - * three entries. - * @param m - The matrix to be modified. - * @param v - A vector of 2 entries specifying the - * factor by which to scale in each dimension. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The scaled matrix. - */ -export declare function scale(m: Mat3, v: Vec2, dst?: Mat3): Mat3; -/** - * Creates a 3-by-3 matrix which scales uniformly in each dimension - * @param s - Amount to scale - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The scaling matrix. - */ -export declare function uniformScaling(s: number, dst?: Mat3): Mat3; -/** - * Scales the given 3-by-3 matrix in each dimension by an amount - * given. - * @param m - The matrix to be modified. - * @param s - Amount to scale. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The scaled matrix. - */ -export declare function uniformScale(m: Mat3, s: number, dst?: Mat3): Mat3; diff --git a/dist/2.x/mat3.d.ts b/dist/2.x/mat3.d.ts deleted file mode 100644 index d916eb9..0000000 --- a/dist/2.x/mat3.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * A JavaScript array with 12 values, a Float32Array with 12 values, or a Float64Array with 12 values. - * When created by the library will create the default type which is `Float32Array` - * but can be set by calling {@link mat3.setDefaultType}. - */ -export declare type Mat3 = number[] | Float32Array | Float64Array; diff --git a/dist/2.x/mat4-impl.d.ts b/dist/2.x/mat4-impl.d.ts deleted file mode 100644 index b0263f4..0000000 --- a/dist/2.x/mat4-impl.d.ts +++ /dev/null @@ -1,467 +0,0 @@ -import { Mat3 } from './mat3'; -import { Mat4 } from './mat4'; -import { Quat } from './quat'; -import Vec3 from './vec3-impl'; -export default Mat4; -export declare type Mat4LikeCtor = new (n: number) => Mat4; -/** - * Sets the type this library creates for a Mat4 - * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array` - * @returns previous constructor for Mat4 - */ -export declare function setDefaultType(ctor: new (n: number) => Mat4): Mat4LikeCtor; -/** - * Create a Mat4 from values - * - * Note: Since passing in a raw JavaScript array - * is valid in all circumstances, if you want to - * force a JavaScript array into a Mat4's specified type - * it would be faster to use - * - * ``` - * const m = mat4.clone(someJSArray); - * ``` - * - * Note: a consequence of the implementation is if your Mat4Type = `Array` - * instead of `Float32Array` or `Float64Array` then any values you - * don't pass in will be undefined. Usually this is not an issue since - * (a) using `Array` is rare and (b) using `mat4.create` is usually used - * to create a Mat4 to be filled out as in - * - * ``` - * const m = mat4.create(); - * mat4.perspective(fov, aspect, near, far, m); - * ``` - * - * @param v0 - value for element 0 - * @param v1 - value for element 1 - * @param v2 - value for element 2 - * @param v3 - value for element 3 - * @param v4 - value for element 4 - * @param v5 - value for element 5 - * @param v6 - value for element 6 - * @param v7 - value for element 7 - * @param v8 - value for element 8 - * @param v9 - value for element 9 - * @param v10 - value for element 10 - * @param v11 - value for element 11 - * @param v12 - value for element 12 - * @param v13 - value for element 13 - * @param v14 - value for element 14 - * @param v15 - value for element 15 - * @returns created from values. - */ -export declare function create(v0?: number, v1?: number, v2?: number, v3?: number, v4?: number, v5?: number, v6?: number, v7?: number, v8?: number, v9?: number, v10?: number, v11?: number, v12?: number, v13?: number, v14?: number, v15?: number): Mat4; -/** - * Sets the values of a Mat4 - * Also see {@link mat4.create} and {@link mat4.copy} - * - * @param v0 - value for element 0 - * @param v1 - value for element 1 - * @param v2 - value for element 2 - * @param v3 - value for element 3 - * @param v4 - value for element 4 - * @param v5 - value for element 5 - * @param v6 - value for element 6 - * @param v7 - value for element 7 - * @param v8 - value for element 8 - * @param v9 - value for element 9 - * @param v10 - value for element 10 - * @param v11 - value for element 11 - * @param v12 - value for element 12 - * @param v13 - value for element 13 - * @param v14 - value for element 14 - * @param v15 - value for element 15 - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns Mat4 created from values. - */ -export declare function set(v0: number, v1: number, v2: number, v3: number, v4: number, v5: number, v6: number, v7: number, v8: number, v9: number, v10: number, v11: number, v12: number, v13: number, v14: number, v15: number, dst?: Mat4): Mat4; -/** - * Creates a Mat4 from a Mat3 - * @param m3 - source matrix - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns Mat4 made from m3 - */ -export declare function fromMat3(m3: Mat3, dst?: Mat4): Mat4; -/** - * Creates a Mat4 rotation matrix from a quaternion - * @param q - quaternion to create matrix from - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns Mat4 made from q - */ -export declare function fromQuat(q: Quat, dst?: Mat4): Mat4; -/** - * Negates a matrix. - * @param m - The matrix. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns -m. - */ -export declare function negate(m: Mat4, dst?: Mat4): Mat4; -/** - * Copies a matrix. (same as {@link mat4.clone}) - * Also see {@link mat4.create} and {@link mat4.set} - * @param m - The matrix. - * @param dst - The matrix. If not passed a new one is created. - * @returns A copy of m. - */ -export declare function copy(m: Mat4, dst?: Mat4): Mat4; -/** - * Copies a matrix (same as {@link mat4.copy}) - * Also see {@link mat4.create} and {@link mat4.set} - * @param m - The matrix. - * @param dst - The matrix. If not passed a new one is created. - * @returns A copy of m. - */ -export declare const clone: typeof copy; -/** - * Check if 2 matrices are approximately equal - * @param a - Operand matrix. - * @param b - Operand matrix. - * @returns true if matrices are approximately equal - */ -export declare function equalsApproximately(a: Mat4, b: Mat4): boolean; -/** - * Check if 2 matrices are exactly equal - * @param a - Operand matrix. - * @param b - Operand matrix. - * @returns true if matrices are exactly equal - */ -export declare function equals(a: Mat4, b: Mat4): boolean; -/** - * Creates a 4-by-4 identity matrix. - * - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns A 4-by-4 identity matrix. - */ -export declare function identity(dst?: Mat4): Mat4; -/** - * Takes the transpose of a matrix. - * @param m - The matrix. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The transpose of m. - */ -export declare function transpose(m: Mat4, dst?: Mat4): Mat4; -/** - * Computes the inverse of a 4-by-4 matrix. - * @param m - The matrix. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The inverse of m. - */ -export declare function inverse(m: Mat4, dst?: Mat4): Mat4; -/** - * Compute the determinant of a matrix - * @param m - the matrix - * @returns the determinant - */ -export declare function determinant(m: Mat4): number; -/** - * Computes the inverse of a 4-by-4 matrix. (same as inverse) - * @param m - The matrix. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The inverse of m. - */ -export declare const invert: typeof inverse; -/** - * Multiplies two 4-by-4 matrices with a on the left and b on the right - * @param a - The matrix on the left. - * @param b - The matrix on the right. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The matrix product of a and b. - */ -export declare function multiply(a: Mat4, b: Mat4, dst?: Mat4): Mat4; -/** - * Multiplies two 4-by-4 matrices with a on the left and b on the right (same as multiply) - * @param a - The matrix on the left. - * @param b - The matrix on the right. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The matrix product of a and b. - */ -export declare const mul: typeof multiply; -/** - * Sets the translation component of a 4-by-4 matrix to the given - * vector. - * @param a - The matrix. - * @param v - The vector. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The matrix with translation set. - */ -export declare function setTranslation(a: Mat4, v: Vec3, dst?: Mat4): Mat4; -/** - * Returns the translation component of a 4-by-4 matrix as a vector with 3 - * entries. - * @param m - The matrix. - * @param dst - vector to hold result. If not passed a new one is created. - * @returns The translation component of m. - */ -export declare function getTranslation(m: Mat4, dst?: Vec3): Vec3; -/** - * Returns an axis of a 4x4 matrix as a vector with 3 entries - * @param m - The matrix. - * @param axis - The axis 0 = x, 1 = y, 2 = z; - * @returns The axis component of m. - */ -export declare function getAxis(m: Mat4, axis: number, dst?: Vec3): Vec3; -/** - * Sets an axis of a 4x4 matrix as a vector with 3 entries - * @param m - The matrix. - * @param v - the axis vector - * @param axis - The axis 0 = x, 1 = y, 2 = z; - * @param dst - The matrix to set. If not passed a new one is created. - * @returns The matrix with axis set. - */ -export declare function setAxis(a: Mat4, v: Vec3, axis: number, dst: Mat4): Mat4; -/** - * Returns the scaling component of the matrix - * @param m - The Matrix - * @param dst - The vector to set. If not passed a new one is created. - */ -export declare function getScaling(m: Mat4, dst?: Vec3): Vec3; -/** - * Computes a 4-by-4 perspective transformation matrix given the angular height - * of the frustum, the aspect ratio, and the near and far clipping planes. The - * arguments define a frustum extending in the negative z direction. The given - * angle is the vertical angle of the frustum, and the horizontal angle is - * determined to produce the given aspect ratio. The arguments near and far are - * the distances to the near and far clipping planes. Note that near and far - * are not z coordinates, but rather they are distances along the negative - * z-axis. The matrix generated sends the viewing frustum to the unit box. - * We assume a unit box extending from -1 to 1 in the x and y dimensions and - * from 0 to 1 in the z dimension. - * - * Note: If you pass `Infinity` for zFar then it will produce a projection matrix - * returns -Infinity for Z when transforming coordinates with Z <= 0 and +Infinity for Z - * otherwise. - * - * @param fieldOfViewYInRadians - The camera angle from top to bottom (in radians). - * @param aspect - The aspect ratio width / height. - * @param zNear - The depth (negative z coordinate) - * of the near clipping plane. - * @param zFar - The depth (negative z coordinate) - * of the far clipping plane. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The perspective matrix. - */ -export declare function perspective(fieldOfViewYInRadians: number, aspect: number, zNear: number, zFar: number, dst?: Mat4): Mat4; -/** - * Computes a 4-by-4 orthogonal transformation matrix that transforms from - * the given the left, right, bottom, and top dimensions to -1 +1 in x, and y - * and 0 to +1 in z. - * @param left - Left side of the near clipping plane viewport. - * @param right - Right side of the near clipping plane viewport. - * @param bottom - Bottom of the near clipping plane viewport. - * @param top - Top of the near clipping plane viewport. - * @param near - The depth (negative z coordinate) - * of the near clipping plane. - * @param far - The depth (negative z coordinate) - * of the far clipping plane. - * @param dst - Output matrix. If not passed a new one is created. - * @returns The orthographic projection matrix. - */ -export declare function ortho(left: number, right: number, bottom: number, top: number, near: number, far: number, dst?: Mat4): Mat4; -/** - * Computes a 4-by-4 perspective transformation matrix given the left, right, - * top, bottom, near and far clipping planes. The arguments define a frustum - * extending in the negative z direction. The arguments near and far are the - * distances to the near and far clipping planes. Note that near and far are not - * z coordinates, but rather they are distances along the negative z-axis. The - * matrix generated sends the viewing frustum to the unit box. We assume a unit - * box extending from -1 to 1 in the x and y dimensions and from 0 to 1 in the z - * dimension. - * @param left - The x coordinate of the left plane of the box. - * @param right - The x coordinate of the right plane of the box. - * @param bottom - The y coordinate of the bottom plane of the box. - * @param top - The y coordinate of the right plane of the box. - * @param near - The negative z coordinate of the near plane of the box. - * @param far - The negative z coordinate of the far plane of the box. - * @param dst - Output matrix. If not passed a new one is created. - * @returns The perspective projection matrix. - */ -export declare function frustum(left: number, right: number, bottom: number, top: number, near: number, far: number, dst?: Mat4): Mat4; -/** - * Computes a 4-by-4 aim transformation. - * - * This is a matrix which positions an object aiming down positive Z. - * toward the target. - * - * Note: this is **NOT** the inverse of lookAt as lookAt looks at negative Z. - * - * @param position - The position of the object. - * @param target - The position meant to be aimed at. - * @param up - A vector pointing up. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The aim matrix. - */ -export declare function aim(position: Vec3, target: Vec3, up: Vec3, dst?: Mat4): Mat4; -/** - * Computes a 4-by-4 camera aim transformation. - * - * This is a matrix which positions an object aiming down negative Z. - * toward the target. - * - * Note: this is the inverse of `lookAt` - * - * @param eye - The position of the object. - * @param target - The position meant to be aimed at. - * @param up - A vector pointing up. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The aim matrix. - */ -export declare function cameraAim(eye: Vec3, target: Vec3, up: Vec3, dst?: Mat4): Mat4; -/** - * Computes a 4-by-4 view transformation. - * - * This is a view matrix which transforms all other objects - * to be in the space of the view defined by the parameters. - * - * @param eye - The position of the object. - * @param target - The position meant to be aimed at. - * @param up - A vector pointing up. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The look-at matrix. - */ -export declare function lookAt(eye: Vec3, target: Vec3, up: Vec3, dst?: Mat4): Mat4; -/** - * Creates a 4-by-4 matrix which translates by the given vector v. - * @param v - The vector by - * which to translate. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The translation matrix. - */ -export declare function translation(v: Vec3, dst?: Mat4): Mat4; -/** - * Translates the given 4-by-4 matrix by the given vector v. - * @param m - The matrix. - * @param v - The vector by - * which to translate. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The translated matrix. - */ -export declare function translate(m: Mat4, v: Vec3, dst?: Mat4): Mat4; -/** - * Creates a 4-by-4 matrix which rotates around the x-axis by the given angle. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotation matrix. - */ -export declare function rotationX(angleInRadians: number, dst?: Mat4): Mat4; -/** - * Rotates the given 4-by-4 matrix around the x-axis by the given - * angle. - * @param m - The matrix. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotated matrix. - */ -export declare function rotateX(m: Mat4, angleInRadians: number, dst?: Mat4): Mat4; -/** - * Creates a 4-by-4 matrix which rotates around the y-axis by the given angle. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotation matrix. - */ -export declare function rotationY(angleInRadians: number, dst?: Mat4): Mat4; -/** - * Rotates the given 4-by-4 matrix around the y-axis by the given - * angle. - * @param m - The matrix. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotated matrix. - */ -export declare function rotateY(m: Mat4, angleInRadians: number, dst?: Mat4): Mat4; -/** - * Creates a 4-by-4 matrix which rotates around the z-axis by the given angle. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotation matrix. - */ -export declare function rotationZ(angleInRadians: number, dst?: Mat4): Mat4; -/** - * Rotates the given 4-by-4 matrix around the z-axis by the given - * angle. - * @param m - The matrix. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotated matrix. - */ -export declare function rotateZ(m: Mat4, angleInRadians: number, dst?: Mat4): Mat4; -/** - * Creates a 4-by-4 matrix which rotates around the given axis by the given - * angle. - * @param axis - The axis - * about which to rotate. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns A matrix which rotates angle radians - * around the axis. - */ -export declare function axisRotation(axis: Vec3, angleInRadians: number, dst?: Mat4): Mat4; -/** - * Creates a 4-by-4 matrix which rotates around the given axis by the given - * angle. (same as axisRotation) - * @param axis - The axis - * about which to rotate. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns A matrix which rotates angle radians - * around the axis. - */ -export declare const rotation: typeof axisRotation; -/** - * Rotates the given 4-by-4 matrix around the given axis by the - * given angle. - * @param m - The matrix. - * @param axis - The axis - * about which to rotate. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotated matrix. - */ -export declare function axisRotate(m: Mat4, axis: Vec3, angleInRadians: number, dst?: Mat4): Mat4; -/** - * Rotates the given 4-by-4 matrix around the given axis by the - * given angle. (same as rotate) - * @param m - The matrix. - * @param axis - The axis - * about which to rotate. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotated matrix. - */ -export declare const rotate: typeof axisRotate; -/** - * Creates a 4-by-4 matrix which scales in each dimension by an amount given by - * the corresponding entry in the given vector; assumes the vector has three - * entries. - * @param v - A vector of - * three entries specifying the factor by which to scale in each dimension. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The scaling matrix. - */ -export declare function scaling(v: Vec3, dst?: Mat4): Mat4; -/** - * Scales the given 4-by-4 matrix in each dimension by an amount - * given by the corresponding entry in the given vector; assumes the vector has - * three entries. - * @param m - The matrix to be modified. - * @param v - A vector of three entries specifying the - * factor by which to scale in each dimension. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The scaled matrix. - */ -export declare function scale(m: Mat4, v: Vec3, dst?: Mat4): Mat4; -/** - * Creates a 4-by-4 matrix which scales a uniform amount in each dimension. - * @param s - the amount to scale - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The scaling matrix. - */ -export declare function uniformScaling(s: number, dst?: Mat4): Mat4; -/** - * Scales the given 4-by-4 matrix in each dimension by a uniform scale. - * @param m - The matrix to be modified. - * @param s - The amount to scale. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The scaled matrix. - */ -export declare function uniformScale(m: Mat4, s: number, dst?: Mat4): Mat4; diff --git a/dist/2.x/mat4.d.ts b/dist/2.x/mat4.d.ts deleted file mode 100644 index 0fc8d12..0000000 --- a/dist/2.x/mat4.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * A JavaScript array with 16 values, a Float32Array with 16 values, or a Float64Array with 16 values. - * When created by the library will create the default type which is `Float32Array` - * but can be set by calling {@link mat4.setDefaultType}. - */ -export declare type Mat4 = number[] | Float32Array | Float64Array; diff --git a/dist/2.x/quat-impl.d.ts b/dist/2.x/quat-impl.d.ts deleted file mode 100644 index ad93ebd..0000000 --- a/dist/2.x/quat-impl.d.ts +++ /dev/null @@ -1,298 +0,0 @@ -import { Quat, create, setDefaultType } from './quat'; -import { Mat3 } from './mat3.js'; -import { Mat4 } from './mat4.js'; -import { Vec3 } from './vec3.js'; -export declare type RotationOrder = 'xyz' | 'xzy' | 'yxz' | 'yzx' | 'zxy' | 'zyx'; -export default Quat; -export { create, setDefaultType }; -/** - * Creates a Quat; may be called with x, y, z to set initial values. (same as create) - * @param x - Initial x value. - * @param y - Initial y value. - * @param z - Initial z value. - * @param z - Initial w value. - * @returns the created vector - */ -export declare const fromValues: typeof create; -/** - * Sets the values of a Quat - * Also see {@link quat.create} and {@link quat.copy} - * - * @param x first value - * @param y second value - * @param z third value - * @param w fourth value - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector with its elements set. - */ -export declare function set(x: number, y: number, z: number, w: number, dst?: Quat): Quat; -/** - * Sets a quaternion from the given angle and axis, - * then returns it. - * - * @param axis - the axis to rotate around - * @param angleInRadians - the angle - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns The quaternion that represents the given axis and angle - **/ -export declare function fromAxisAngle(axis: Vec3, angleInRadians: number, dst?: Quat): Quat; -/** - * Gets the rotation axis and angle - * @param q - quaternion to compute from - * @param dst - Vec3 to hold result. If not passed in a new one is created. - * @return angle and axis - */ -export declare function toAxisAngle(q: Quat, dst?: Vec3): { - angle: number; - axis: Vec3; -}; -/** - * Returns the angle in degrees between two rotations a and b. - * @param a - quaternion a - * @param b - quaternion b - * @return angle in radians between the two quaternions - */ -export declare function angle(a: Quat, b: Quat): number; -/** - * Multiplies two quaternions - * - * @param a - the first quaternion - * @param b - the second quaternion - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the result of a * b - */ -export declare function multiply(a: Quat, b: Quat, dst?: Quat): Quat; -/** - * Multiplies two quaternions - * - * @param a - the first quaternion - * @param b - the second quaternion - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the result of a * b - */ -export declare const mul: typeof multiply; -/** - * Rotates the given quaternion around the X axis by the given angle. - * @param q - quaternion to rotate - * @param angleInRadians - The angle by which to rotate - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the result of a * b - */ -export declare function rotateX(q: Quat, angleInRadians: number, dst?: Quat): Quat; -/** - * Rotates the given quaternion around the Y axis by the given angle. - * @param q - quaternion to rotate - * @param angleInRadians - The angle by which to rotate - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the result of a * b - */ -export declare function rotateY(q: Quat, angleInRadians: number, dst?: Quat): Quat; -/** - * Rotates the given quaternion around the Z axis by the given angle. - * @param q - quaternion to rotate - * @param angleInRadians - The angle by which to rotate - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the result of a * b - */ -export declare function rotateZ(q: Quat, angleInRadians: number, dst?: Quat): Quat; -/** - * Spherically linear interpolate between two quaternions - * - * @param a - starting value - * @param b - ending value - * @param t - value where 0 = a and 1 = b - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the result of a * b - */ -export declare function slerp(a: Quat, b: Quat, t: number, dst?: Quat): Quat; -/** - * Compute the inverse of a quaternion - * - * @param q - quaternion to compute the inverse of - * @returns A quaternion that is the result of a * b - */ -export declare function inverse(q: Quat, dst?: Quat): Quat; -/** - * Compute the conjugate of a quaternion - * For quaternions with a magnitude of 1 (a unit quaternion) - * this returns the same as the inverse but is faster to calculate. - * - * @param q - quaternion to compute the conjugate of. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns The conjugate of q - */ -export declare function conjugate(q: Quat, dst?: Quat): Quat; -/** - * Creates a quaternion from the given rotation matrix. - * - * The created quaternion is not normalized. - * - * @param m - rotation matrix - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns the result - */ -export declare function fromMat(m: Mat3 | Mat4, dst?: Quat): Quat; -/** - * Creates a quaternion from the given euler angle x, y, z using the provided intrinsic order for the conversion. - * - * @param xAngleInRadians - angle to rotate around X axis in radians. - * @param yAngleInRadians - angle to rotate around Y axis in radians. - * @param zAngleInRadians - angle to rotate around Z axis in radians. - * @param order - order to apply euler angles - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion representing the same rotation as the euler angles applied in the given order - */ -export declare function fromEuler(xAngleInRadians: number, yAngleInRadians: number, zAngleInRadians: number, order: RotationOrder, dst?: Quat): Quat; -/** - * Copies a quaternion. (same as {@link quat.clone}) - * Also see {@link quat.create} and {@link quat.set} - * @param q - The quaternion. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is a copy of q - */ -export declare function copy(q: Quat, dst?: Quat): Quat; -/** - * Clones a quaternion. (same as {@link quat.copy}) - * Also see {@link quat.create} and {@link quat.set} - * @param q - The quaternion. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A copy of q. - */ -export declare const clone: typeof copy; -/** - * Adds two quaternions; assumes a and b have the same dimension. - * @param a - Operand quaternion. - * @param b - Operand quaternion. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the sum of a and b. - */ -export declare function add(a: Quat, b: Quat, dst?: Quat): Quat; -/** - * Subtracts two quaternions. - * @param a - Operand quaternion. - * @param b - Operand quaternion. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the difference of a and b. - */ -export declare function subtract(a: Quat, b: Quat, dst?: Quat): Quat; -/** - * Subtracts two quaternions. - * @param a - Operand quaternion. - * @param b - Operand quaternion. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the difference of a and b. - */ -export declare const sub: typeof subtract; -/** - * Multiplies a quaternion by a scalar. - * @param v - The quaternion. - * @param k - The scalar. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns The scaled quaternion. - */ -export declare function mulScalar(v: Quat, k: number, dst?: Quat): Quat; -/** - * Multiplies a quaternion by a scalar. (same as mulScalar) - * @param v - The quaternion. - * @param k - The scalar. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns The scaled quaternion. - */ -export declare const scale: typeof mulScalar; -/** - * Divides a vector by a scalar. - * @param v - The vector. - * @param k - The scalar. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns The scaled quaternion. - */ -export declare function divScalar(v: Quat, k: number, dst?: Quat): Quat; -/** - * Computes the dot product of two quaternions - * @param a - Operand quaternion. - * @param b - Operand quaternion. - * @returns dot product - */ -export declare function dot(a: Quat, b: Quat): number; -/** - * Performs linear interpolation on two quaternions. - * Given quaternions a and b and interpolation coefficient t, returns - * a + t * (b - a). - * @param a - Operand quaternion. - * @param b - Operand quaternion. - * @param t - Interpolation coefficient. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns The linear interpolated result. - */ -export declare function lerp(a: Quat, b: Quat, t: number, dst?: Quat): Quat; -/** - * Computes the length of quaternion - * @param v - quaternion. - * @returns length of quaternion. - */ -export declare function length(v: Quat): number; -/** - * Computes the length of quaternion (same as length) - * @param v - quaternion. - * @returns length of quaternion. - */ -export declare const len: typeof length; -/** - * Computes the square of the length of quaternion - * @param v - quaternion. - * @returns square of the length of quaternion. - */ -export declare function lengthSq(v: Quat): number; -/** - * Computes the square of the length of quaternion (same as lengthSq) - * @param v - quaternion. - * @returns square of the length of quaternion. - */ -export declare const lenSq: typeof lengthSq; -/** - * Divides a quaternion by its Euclidean length and returns the quotient. - * @param v - The quaternion. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns The normalized quaternion. - */ -export declare function normalize(v: Quat, dst?: Quat): Quat; -/** - * Check if 2 quaternions are approximately equal - * @param a - Operand quaternion. - * @param b - Operand quaternion. - * @returns true if quaternions are approximately equal - */ -export declare function equalsApproximately(a: Quat, b: Quat): boolean; -/** - * Check if 2 quaternions are exactly equal - * @param a - Operand quaternion. - * @param b - Operand quaternion. - * @returns true if quaternions are exactly equal - */ -export declare function equals(a: Quat, b: Quat): boolean; -/** - * Creates an identity quaternion - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns an identity quaternion - */ -export declare function identity(dst?: Quat): Quat; -/** - * Computes a quaternion to represent the shortest rotation from one vector to another. - * - * @param aUnit - the start vector - * @param bUnit - the end vector - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns the result - */ -export declare function rotationTo(aUnit: Vec3, bUnit: Vec3, dst?: Quat): Quat; -/** - * Performs a spherical linear interpolation with two control points - * - * @param a - the first quaternion - * @param b - the second quaternion - * @param c - the third quaternion - * @param d - the fourth quaternion - * @param t - Interpolation coefficient 0 to 1 - * @returns result - */ -export declare function sqlerp(a: Quat, b: Quat, c: Quat, d: Quat, t: number, dst?: Quat): Quat; diff --git a/dist/2.x/quat.d.ts b/dist/2.x/quat.d.ts deleted file mode 100644 index 3aea92e..0000000 --- a/dist/2.x/quat.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * A JavaScript array with 4 values, Float32Array with 4 values, or a Float64Array with 4 values. - * When created by the library will create the default type which is `Float32Array` - * but can be set by calling {@link quat.setDefaultType}. - */ -export declare type Quat = number[] | Float32Array | Float64Array; -/** - * - * Quat4 math functions. - * - * Almost all functions take an optional `dst` argument. If it is not passed in the - * functions will create a new `Quat4`. In other words you can do this - * - * const v = quat4.cross(v1, v2); // Creates a new Quat4 with the cross product of v1 x v2. - * - * or - * - * const v = quat4.create(); - * quat4.cross(v1, v2, v); // Puts the cross product of v1 x v2 in v - * - * The first style is often easier but depending on where it's used it generates garbage where - * as there is almost never allocation with the second style. - * - * It is always safe to pass any vector as the destination. So for example - * - * quat4.cross(v1, v2, v1); // Puts the cross product of v1 x v2 in v1 - * - */ -export declare let QuatType: new (n: number) => Quat; -/** - * Sets the type this library creates for a Quat4 - * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array` - * @returns previous constructor for Quat4 - */ -export declare function setDefaultType(ctor: new (n: number) => Quat): new (n: number) => Quat; -/** - * Creates a quat4; may be called with x, y, z to set initial values. - * @param x - Initial x value. - * @param y - Initial y value. - * @param z - Initial z value. - * @param w - Initial w value. - * @returns the created vector - */ -export declare function create(x?: number, y?: number, z?: number, w?: number): Quat; diff --git a/dist/2.x/quat4-impl.d.ts b/dist/2.x/quat4-impl.d.ts deleted file mode 100644 index 09dfa00..0000000 --- a/dist/2.x/quat4-impl.d.ts +++ /dev/null @@ -1,278 +0,0 @@ -import { Quat4, create, setDefaultType } from './quat4'; -import { Mat3 } from './mat3'; -import { Mat4 } from './mat4'; -import { Vec3 } from './vec3'; -export declare type RotationOrder = 'xyz' | 'xzy' | 'yxz' | 'yzx' | 'zxy' | 'zyx'; -export default Quat4; -export { create, setDefaultType }; -/** - * Creates a Quat4; may be called with x, y, z to set initial values. (same as create) - * @param x - Initial x value. - * @param y - Initial y value. - * @param z - Initial z value. - * @param z - Initial w value. - * @returns the created vector - */ -export declare const fromValues: typeof create; -/** - * Sets a quat from the given angle and axis, - * then returns it. - * - * @param axis - the axis to rotate around - * @param angleInRadians - the angle - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns The quaternion that represents the given axis and angle - **/ -export declare function fromAxisAngle(axis: Vec3, angleInRadians: number, dst?: Quat4): Quat4; -/** - * Gets the rotation axis and angle - * @param q - quaternion to compute from - * @param dst - Vec3 to hold result. If not passed in a new one is created. - * @return angle and axis - */ -export declare function toAxisAngle(q: Quat4, dst?: Vec3): { - angle: number; - axis: Vec3; -}; -/** - * Returns the angle in degrees between two rotations a and b. - * @param a quaternion - * @param b quaternion - * @return angle in radians between the two quaternions - */ -export declare function angle(a: Quat4, b: Quat4): number; -/** - * Multiplies two quaternions - * - * @param a - the first quaternion - * @param b - the second quaternion - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the result of a * b - */ -export declare function multiply(a: Quat4, b: Quat4, dst?: Quat4): Quat4; -/** - * Multiplies two quaternions - * - * @param a - the first quaternion - * @param b - the second quaternion - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the result of a * b - */ -export declare const mul: typeof multiply; -/** - * Rotates the given quaternion around the X axis by the given angle. - * @param q - quaternion to rotate - * @param angleInRadians - The angle by which to rotate - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the result of a * b - */ -export declare function rotateX(q: Quat4, angleInRadians: number, dst?: Quat4): Quat4; -/** - * Rotates the given quaternion around the Y axis by the given angle. - * @param q - quaternion to rotate - * @param angleInRadians - The angle by which to rotate - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the result of a * b - */ -export declare function rotateY(q: Quat4, angleInRadians: number, dst?: Quat4): Quat4; -/** - * Rotates the given quaternion around the Z axis by the given angle. - * @param q - quaternion to rotate - * @param angleInRadians - The angle by which to rotate - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the result of a * b - */ -export declare function rotateZ(q: Quat4, angleInRadians: number, dst?: Quat4): Quat4; -/** - * Spherically linear interpolate between two quaternions - * - * @param a - starting value - * @param b - ending value - * @param t - value where 0 = a and 1 = b - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the result of a * b - */ -export declare function slerp(a: Quat4, b: Quat4, t: number, dst?: Quat4): Quat4; -/** - * Compute the inverse of a quaternion - * - * @param q - quaternion to compute the inverse of - * @returns A quaternion that is the result of a * b - */ -export declare function inverse(q: Quat4, dst?: Quat4): Quat4; -/** - * Compute the conjugate of a quaternion - * For quaternions with a magnitude of 1 (a unit quaternion) - * this returns the same as the inverse but is faster to calculate. - * - * @param q - quaternion to compute the conjugate of. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns The conjugate of q - */ -export declare function conjugate(q: Quat4, dst?: Quat4): Quat4; -/** - * Creates a quaternion from the given rotation matrix. - * - * The created quaternion is not normalized. - * - * @param m - rotation matrix - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns the result - */ -export declare function fromMat(m: Mat3 | Mat4, dst?: Quat4): Quat4; -/** - * Creates a quaternion from the given euler angle x, y, z using the provided intrinsic order for the conversion. - * - * @param xAngleInRadians - angle to rotate around X axis in radians. - * @param yAngleInRadians - angle to rotate around Y axis in radians. - * @param zAngleInRadians - angle to rotate around Z axis in radians. - * @param order - order to apply euler angles - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion representing the same rotation as the euler angles applied in the given order - */ -export declare function fromEuler(xAngleInRadians: number, yAngleInRadians: number, zAngleInRadians: number, order: RotationOrder, dst?: Quat4): import("./array-like.js").ArrayLike; -/** - * Copies a quaternion. (same as clone) - * @param q - The quaternion. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is a copy of q - */ -export declare function copy(q: Quat4, dst?: Quat4): Quat4; -/** - * Clones a quaternion. (same as copy) - * @param q - The quaternion. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A copy of q. - */ -export declare const clone: typeof copy; -/** - * Adds two quaternions; assumes a and b have the same dimension. - * @param a - Operand quaternion. - * @param b - Operand quaternion. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the sum of a and b. - */ -export declare function add(a: Quat4, b: Quat4, dst?: Quat4): Quat4; -/** - * Subtracts two quaternions. - * @param a - Operand quaternion. - * @param b - Operand quaternion. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the difference of a and b. - */ -export declare function subtract(a: Quat4, b: Quat4, dst?: Quat4): Quat4; -/** - * Subtracts two quaternions. - * @param a - Operand quaternion. - * @param b - Operand quaternion. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the difference of a and b. - */ -export declare const sub: typeof subtract; -/** - * Multiplies a quaternion by a scalar. - * @param v - The quaternion. - * @param k - The scalar. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns The scaled quaternion. - */ -export declare function mulScalar(v: Quat4, k: number, dst?: Quat4): Quat4; -/** - * Multiplies a quaternion by a scalar. (same as mulScalar) - * @param v - The quaternion. - * @param k - The scalar. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns The scaled quaternion. - */ -export declare const scale: typeof mulScalar; -/** - * Divides a vector by a scalar. - * @param v - The vector. - * @param k - The scalar. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns The scaled quaternion. - */ -export declare function divScalar(v: Quat4, k: number, dst?: Quat4): Quat4; -/** - * Computes the dot product of two quaternions - * @param a - Operand quaternion. - * @param b - Operand quaternion. - * @returns dot product - */ -export declare function dot(a: Quat4, b: Quat4): number; -/** - * Performs linear interpolation on two quaternions. - * Given quaternions a and b and interpolation coefficient t, returns - * a + t * (b - a). - * @param a - Operand quaternion. - * @param b - Operand quaternion. - * @param t - Interpolation coefficient. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns The linear interpolated result. - */ -export declare function lerp(a: Quat4, b: Quat4, t: number, dst?: Quat4): Quat4; -/** - * Computes the length of quaternion - * @param v - quaternion. - * @returns length of quaternion. - */ -export declare function length(v: Quat4): number; -/** - * Computes the length of quaternion (same as length) - * @param v - quaternion. - * @returns length of quaternion. - */ -export declare const len: typeof length; -/** - * Computes the square of the length of quaternion - * @param v - quaternion. - * @returns square of the length of quaternion. - */ -export declare function lengthSq(v: Quat4): number; -/** - * Computes the square of the length of quaternion (same as lengthSq) - * @param v - quaternion. - * @returns square of the length of quaternion. - */ -export declare const lenSq: typeof lengthSq; -/** - * Divides a quaternion by its Euclidean length and returns the quotient. - * @param v - The quaternion. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns The normalized quaternion. - */ -export declare function normalize(v: Quat4, dst?: Quat4): Quat4; -/** - * Check if 2 quaternions are approximately equal - * @param a - Operand quaternion. - * @param b - Operand quaternion. - * @returns true if quaternions are approximately equal - */ -export declare function equalsApproximately(a: Quat4, b: Quat4): boolean; -/** - * Check if 2 quaternions are exactly equal - * @param a - Operand quaternion. - * @param b - Operand quaternion. - * @returns true if quaternions are exactly equal - */ -export declare function equals(a: Quat4, b: Quat4): boolean; -/** - * Computes a quaternion to represent the shortest rotation from one vector to another. - * - * @param aUnit - the start vector - * @param bUnit - the end vector - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns the result - */ -export declare function rotationTo(aUnit: Vec3, bUnit: Vec3, dst?: Quat4): Quat4; -/** - * Performs a spherical linear interpolation with two control points - * - * @param a - the first quaternion - * @param b - the second quaternion - * @param c - the third quaternion - * @param d - the fourth quaternion - * @param t - Interpolation coefficient 0 to 1 - * @returns result - */ -export declare function sqlerp(a: Quat4, b: Quat4, c: Quat4, d: Quat4, t: number, dst?: Quat4): Quat4; diff --git a/dist/2.x/quat4.d.ts b/dist/2.x/quat4.d.ts deleted file mode 100644 index edcf70d..0000000 --- a/dist/2.x/quat4.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { ArrayLike, ArrayLikeCtor } from './array-like'; -/** - * A JavaScript array with 4 values, Float32Array with 4 values, or a Float64Array with 4 values. - * When created by the library will create the default type which is `Float32Array` - * but can be set by calling {@link quat4.setDefaultType}. - */ -export declare type Quat4 = ArrayLike; -/** - * - * Quat4 math functions. - * - * Almost all functions take an optional `dst` argument. If it is not passed in the - * functions will create a new `Quat4`. In other words you can do this - * - * const v = quat4.cross(v1, v2); // Creates a new Quat4 with the cross product of v1 x v2. - * - * or - * - * const v = quat4.create(); - * quat4.cross(v1, v2, v); // Puts the cross product of v1 x v2 in v - * - * The first style is often easier but depending on where it's used it generates garbage where - * as there is almost never allocation with the second style. - * - * It is always safe to pass any vector as the destination. So for example - * - * quat4.cross(v1, v2, v1); // Puts the cross product of v1 x v2 in v1 - * - */ -export declare let QuatType: ArrayLikeCtor; -/** - * Sets the type this library creates for a Quat4 - * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array` - * @returns previous constructor for Quat4 - */ -export declare function setDefaultType(ctor: new (n: number) => Quat4): ArrayLikeCtor; -/** - * Creates a quat4; may be called with x, y, z to set initial values. - * @param x - Initial x value. - * @param y - Initial y value. - * @param z - Initial z value. - * @param w - Initial w value. - * @returns the created vector - */ -export declare function create(x?: number, y?: number, z?: number, w?: number): Quat4; diff --git a/dist/2.x/utils.d.ts b/dist/2.x/utils.d.ts deleted file mode 100644 index d231f94..0000000 --- a/dist/2.x/utils.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -export declare let EPSILON: number; -/** - * Set the value for EPSILON for various checks - * @param v - Value to use for EPSILON. - * @returns previous value of EPSILON; - */ -export declare function setEpsilon(v: number): number; -/** - * Convert degrees to radians - * @param degrees - Angle in degrees - * @returns angle converted to radians - */ -export declare function degToRad(degrees: number): number; -/** - * Convert radians to degrees - * @param radians - Angle in radians - * @returns angle converted to degrees - */ -export declare function radToDeg(radians: number): number; -/** - * Lerps between a and b via t - * @param a - starting value - * @param b - ending value - * @param t - value where 0 = a and 1 = b - * @returns a + (b - a) * t - */ -export declare function lerp(a: number, b: number, t: number): number; -/** - * Compute the opposite of lerp. Given a and b and a value between - * a and b returns a value between 0 and 1. 0 if a, 1 if b. - * Note: no clamping is done. - * @param a - start value - * @param b - end value - * @param v - value between a and b - * @returns (v - a) / (b - a) - */ -export declare function inverseLerp(a: number, b: number, v: number): number; -/** - * Compute the euclidean modulo - * - * ``` - * // table for n / 3 - * -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5 <- n - * ------------------------------------ - * -2 -1 -0 -2 -1 0, 1, 2, 0, 1, 2 <- n % 3 - * 1 2 0 1 2 0, 1, 2, 0, 1, 2 <- euclideanModule(n, 3) - * ``` - * - * @param n - dividend - * @param m - divisor - * @returns the euclidean modulo of n / m - */ -export declare function euclideanModulo(n: number, m: number): number; diff --git a/dist/2.x/vec2-impl.d.ts b/dist/2.x/vec2-impl.d.ts deleted file mode 100644 index a102ade..0000000 --- a/dist/2.x/vec2-impl.d.ts +++ /dev/null @@ -1,352 +0,0 @@ -import { Mat3 } from './mat3'; -import { Mat4 } from './mat4'; -import { Vec2, create, setDefaultType } from './vec2'; -import { Vec3 } from './vec3'; -export default Vec2; -export { create, setDefaultType }; -/** - * Creates a Vec2; may be called with x, y, z to set initial values. (same as create) - * @param x - Initial x value. - * @param y - Initial y value. - * @returns the created vector - */ -export declare const fromValues: typeof create; -/** - * Sets the values of a Vec2 - * Also see {@link vec2.create} and {@link vec2.copy} - * - * @param x first value - * @param y second value - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector with its elements set. - */ -export declare function set(x: number, y: number, dst?: Vec2): Vec2; -/** - * Applies Math.ceil to each element of vector - * @param v - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the ceil of each element of v. - */ -export declare function ceil(v: Vec2, dst?: Vec2): Vec2; -/** - * Applies Math.floor to each element of vector - * @param v - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the floor of each element of v. - */ -export declare function floor(v: Vec2, dst?: Vec2): Vec2; -/** - * Applies Math.round to each element of vector - * @param v - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the round of each element of v. - */ -export declare function round(v: Vec2, dst?: Vec2): Vec2; -/** - * Clamp each element of vector between min and max - * @param v - Operand vector. - * @param max - Min value, default 0 - * @param min - Max value, default 1 - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that the clamped value of each element of v. - */ -export declare function clamp(v: Vec2, min?: number, max?: number, dst?: Vec2): Vec2; -/** - * Adds two vectors; assumes a and b have the same dimension. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the sum of a and b. - */ -export declare function add(a: Vec2, b: Vec2, dst?: Vec2): Vec2; -/** - * Adds two vectors, scaling the 2nd; assumes a and b have the same dimension. - * @param a - Operand vector. - * @param b - Operand vector. - * @param scale - Amount to scale b - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the sum of a + b * scale. - */ -export declare function addScaled(a: Vec2, b: Vec2, scale: number, dst?: Vec2): Vec2; -/** - * Returns the angle in radians between two vectors. - * @param a - Operand vector. - * @param b - Operand vector. - * @returns The angle in radians between the 2 vectors. - */ -export declare function angle(a: Vec2, b: Vec2): number; -/** - * Subtracts two vectors. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the difference of a and b. - */ -export declare function subtract(a: Vec2, b: Vec2, dst?: Vec2): Vec2; -/** - * Subtracts two vectors. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the difference of a and b. - */ -export declare const sub: typeof subtract; -/** - * Check if 2 vectors are approximately equal - * @param a - Operand vector. - * @param b - Operand vector. - * @returns true if vectors are approximately equal - */ -export declare function equalsApproximately(a: Vec2, b: Vec2): boolean; -/** - * Check if 2 vectors are exactly equal - * @param a - Operand vector. - * @param b - Operand vector. - * @returns true if vectors are exactly equal - */ -export declare function equals(a: Vec2, b: Vec2): boolean; -/** - * Performs linear interpolation on two vectors. - * Given vectors a and b and interpolation coefficient t, returns - * a + t * (b - a). - * @param a - Operand vector. - * @param b - Operand vector. - * @param t - Interpolation coefficient. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The linear interpolated result. - */ -export declare function lerp(a: Vec2, b: Vec2, t: number, dst?: Vec2): Vec2; -/** - * Performs linear interpolation on two vectors. - * Given vectors a and b and interpolation coefficient vector t, returns - * a + t * (b - a). - * @param a - Operand vector. - * @param b - Operand vector. - * @param t - Interpolation coefficients vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns the linear interpolated result. - */ -export declare function lerpV(a: Vec2, b: Vec2, t: Vec2, dst?: Vec2): Vec2; -/** - * Return max values of two vectors. - * Given vectors a and b returns - * [max(a[0], b[0]), max(a[1], b[1]), max(a[2], b[2])]. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The max components vector. - */ -export declare function max(a: Vec2, b: Vec2, dst?: Vec2): Vec2; -/** - * Return min values of two vectors. - * Given vectors a and b returns - * [min(a[0], b[0]), min(a[1], b[1]), min(a[2], b[2])]. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The min components vector. - */ -export declare function min(a: Vec2, b: Vec2, dst?: Vec2): Vec2; -/** - * Multiplies a vector by a scalar. - * @param v - The vector. - * @param k - The scalar. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The scaled vector. - */ -export declare function mulScalar(v: Vec2, k: number, dst?: Vec2): Vec2; -/** - * Multiplies a vector by a scalar. (same as mulScalar) - * @param v - The vector. - * @param k - The scalar. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The scaled vector. - */ -export declare const scale: typeof mulScalar; -/** - * Divides a vector by a scalar. - * @param v - The vector. - * @param k - The scalar. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The scaled vector. - */ -export declare function divScalar(v: Vec2, k: number, dst?: Vec2): Vec2; -/** - * Inverse a vector. - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The inverted vector. - */ -export declare function inverse(v: Vec2, dst?: Vec2): Vec2; -/** - * Invert a vector. (same as inverse) - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The inverted vector. - */ -export declare const invert: typeof inverse; -/** - * Computes the cross product of two vectors; assumes both vectors have - * three entries. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of a cross b. - */ -export declare function cross(a: Vec2, b: Vec2, dst?: Vec3): Vec3; -/** - * Computes the dot product of two vectors; assumes both vectors have - * three entries. - * @param a - Operand vector. - * @param b - Operand vector. - * @returns dot product - */ -export declare function dot(a: Vec2, b: Vec2): number; -/** - * Computes the length of vector - * @param v - vector. - * @returns length of vector. - */ -export declare function length(v: Vec2): number; -/** - * Computes the length of vector (same as length) - * @param v - vector. - * @returns length of vector. - */ -export declare const len: typeof length; -/** - * Computes the square of the length of vector - * @param v - vector. - * @returns square of the length of vector. - */ -export declare function lengthSq(v: Vec2): number; -/** - * Computes the square of the length of vector (same as lengthSq) - * @param v - vector. - * @returns square of the length of vector. - */ -export declare const lenSq: typeof lengthSq; -/** - * Computes the distance between 2 points - * @param a - vector. - * @param b - vector. - * @returns distance between a and b - */ -export declare function distance(a: Vec2, b: Vec2): number; -/** - * Computes the distance between 2 points (same as distance) - * @param a - vector. - * @param b - vector. - * @returns distance between a and b - */ -export declare const dist: typeof distance; -/** - * Computes the square of the distance between 2 points - * @param a - vector. - * @param b - vector. - * @returns square of the distance between a and b - */ -export declare function distanceSq(a: Vec2, b: Vec2): number; -/** - * Computes the square of the distance between 2 points (same as distanceSq) - * @param a - vector. - * @param b - vector. - * @returns square of the distance between a and b - */ -export declare const distSq: typeof distanceSq; -/** - * Divides a vector by its Euclidean length and returns the quotient. - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The normalized vector. - */ -export declare function normalize(v: Vec2, dst?: Vec2): Vec2; -/** - * Negates a vector. - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns -v. - */ -export declare function negate(v: Vec2, dst?: Vec2): Vec2; -/** - * Copies a vector. (same as {@link vec2.clone}) - * Also see {@link vec2.create} and {@link vec2.set} - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A copy of v. - */ -export declare function copy(v: Vec2, dst?: Vec2): Vec2; -/** - * Clones a vector. (same as {@link vec2.copy}) - * Also see {@link vec2.create} and {@link vec2.set} - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A copy of v. - */ -export declare const clone: typeof copy; -/** - * Multiplies a vector by another vector (component-wise); assumes a and - * b have the same length. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of products of entries of a and b. - */ -export declare function multiply(a: Vec2, b: Vec2, dst?: Vec2): Vec2; -/** - * Multiplies a vector by another vector (component-wise); assumes a and - * b have the same length. (same as mul) - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of products of entries of a and b. - */ -export declare const mul: typeof multiply; -/** - * Divides a vector by another vector (component-wise); assumes a and - * b have the same length. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of quotients of entries of a and b. - */ -export declare function divide(a: Vec2, b: Vec2, dst?: Vec2): Vec2; -/** - * Divides a vector by another vector (component-wise); assumes a and - * b have the same length. (same as divide) - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of quotients of entries of a and b. - */ -export declare const div: typeof divide; -/** - * Creates a random unit vector * scale - * @param scale - Default 1 - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The random vector. - */ -export declare function random(scale?: number, dst?: Vec2): Vec2; -/** - * Zero's a vector - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The zeroed vector. - */ -export declare function zero(dst?: Vec2): Vec2; -/** - * transform Vec2 by 4x4 matrix - * @param v - the vector - * @param m - The matrix. - * @param dst - optional Vec2 to store result. If not passed a new one is created. - * @returns the transformed vector - */ -export declare function transformMat4(v: Vec2, m: Mat4, dst?: Vec2): Vec2; -/** - * Transforms vec4 by 3x3 matrix - * - * @param v - the vector - * @param m - The matrix. - * @param dst - optional Vec2 to store result. If not passed a new one is created. - * @returns the transformed vector - */ -export declare function transformMat3(v: Vec2, m: Mat3, dst?: Vec2): Vec2; diff --git a/dist/2.x/vec2.d.ts b/dist/2.x/vec2.d.ts deleted file mode 100644 index 6965cc8..0000000 --- a/dist/2.x/vec2.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -/** - * A JavaScript array with 2 values, Float32Array with 2 values, or a Float64Array with 2 values. - * When created by the library will create the default type which is `Float32Array` - * but can be set by calling {@link vec2.setDefaultType}. - */ -export declare type Vec2 = number[] | Float32Array | Float64Array; -/** - * - * Vec2 math functions. - * - * Almost all functions take an optional `dst` argument. If it is not passed in the - * functions will create a new Vec2. In other words you can do this - * - * const v = vec2.cross(v1, v2); // Creates a new Vec2 with the cross product of v1 x v2. - * - * or - * - * const v = vec2.create(); - * vec2.cross(v1, v2, v); // Puts the cross product of v1 x v2 in v - * - * The first style is often easier but depending on where it's used it generates garbage where - * as there is almost never allocation with the second style. - * - * It is always safe to pass any vector as the destination. So for example - * - * vec2.cross(v1, v2, v1); // Puts the cross product of v1 x v2 in v1 - * - */ -export declare let VecType: new (n: number) => Vec2; -/** - * Sets the type this library creates for a Vec2 - * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array` - * @returns previous constructor for Vec2 - */ -export declare function setDefaultType(ctor: new (n: number) => Vec2): new (n: number) => Vec2; -/** - * Creates a Vec2; may be called with x, y, z to set initial values. - * - * Note: Since passing in a raw JavaScript array - * is valid in all circumstances, if you want to - * force a JavaScript array into a Vec2's specified type - * it would be faster to use - * - * ``` - * const v = vec2.clone(someJSArray); - * ``` - * - * Note: a consequence of the implementation is if your Vec2Type = `Array` - * instead of `Float32Array` or `Float64Array` then any values you - * don't pass in will be undefined. Usually this is not an issue since - * (a) using `Array` is rare and (b) using `vec2.create` is usually used - * to create a Vec2 to be filled out as in - * - * ``` - * const sum = vec2.create(); - * vec2.add(v1, v2, sum); - * ``` - * - * @param x - Initial x value. - * @param y - Initial y value. - * @returns the created vector - */ -export declare function create(x?: number, y?: number): Vec2; diff --git a/dist/2.x/vec3-impl.d.ts b/dist/2.x/vec3-impl.d.ts deleted file mode 100644 index cf222ec..0000000 --- a/dist/2.x/vec3-impl.d.ts +++ /dev/null @@ -1,391 +0,0 @@ -import { Vec3, create, setDefaultType } from './vec3'; -import { Mat3 } from './mat3'; -import { Mat4 } from './mat4'; -import { Quat } from './quat'; -export default Vec3; -export { create, setDefaultType }; -/** - * Creates a vec3; may be called with x, y, z to set initial values. (same as create) - * @param x - Initial x value. - * @param y - Initial y value. - * @param z - Initial z value. - * @returns the created vector - */ -export declare const fromValues: typeof create; -/** - * Sets the values of a Vec3 - * Also see {@link vec3.create} and {@link vec3.copy} - * - * @param x first value - * @param y second value - * @param z third value - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector with its elements set. - */ -export declare function set(x: number, y: number, z: number, dst?: Vec3): Vec3; -/** - * Applies Math.ceil to each element of vector - * @param v - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the ceil of each element of v. - */ -export declare function ceil(v: Vec3, dst?: Vec3): Vec3; -/** - * Applies Math.floor to each element of vector - * @param v - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the floor of each element of v. - */ -export declare function floor(v: Vec3, dst?: Vec3): Vec3; -/** - * Applies Math.round to each element of vector - * @param v - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the round of each element of v. - */ -export declare function round(v: Vec3, dst?: Vec3): Vec3; -/** - * Clamp each element of vector between min and max - * @param v - Operand vector. - * @param max - Min value, default 0 - * @param min - Max value, default 1 - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that the clamped value of each element of v. - */ -export declare function clamp(v: Vec3, min?: number, max?: number, dst?: Vec3): Vec3; -/** - * Adds two vectors; assumes a and b have the same dimension. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the sum of a and b. - */ -export declare function add(a: Vec3, b: Vec3, dst?: Vec3): Vec3; -/** - * Adds two vectors, scaling the 2nd; assumes a and b have the same dimension. - * @param a - Operand vector. - * @param b - Operand vector. - * @param scale - Amount to scale b - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the sum of a + b * scale. - */ -export declare function addScaled(a: Vec3, b: Vec3, scale: number, dst?: Vec3): Vec3; -/** - * Returns the angle in radians between two vectors. - * @param a - Operand vector. - * @param b - Operand vector. - * @returns The angle in radians between the 2 vectors. - */ -export declare function angle(a: Vec3, b: Vec3): number; -/** - * Subtracts two vectors. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the difference of a and b. - */ -export declare function subtract(a: Vec3, b: Vec3, dst?: Vec3): Vec3; -/** - * Subtracts two vectors. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the difference of a and b. - */ -export declare const sub: typeof subtract; -/** - * Check if 2 vectors are approximately equal - * @param a - Operand vector. - * @param b - Operand vector. - * @returns true if vectors are approximately equal - */ -export declare function equalsApproximately(a: Vec3, b: Vec3): boolean; -/** - * Check if 2 vectors are exactly equal - * @param a - Operand vector. - * @param b - Operand vector. - * @returns true if vectors are exactly equal - */ -export declare function equals(a: Vec3, b: Vec3): boolean; -/** - * Performs linear interpolation on two vectors. - * Given vectors a and b and interpolation coefficient t, returns - * a + t * (b - a). - * @param a - Operand vector. - * @param b - Operand vector. - * @param t - Interpolation coefficient. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The linear interpolated result. - */ -export declare function lerp(a: Vec3, b: Vec3, t: number, dst?: Vec3): Vec3; -/** - * Performs linear interpolation on two vectors. - * Given vectors a and b and interpolation coefficient vector t, returns - * a + t * (b - a). - * @param a - Operand vector. - * @param b - Operand vector. - * @param t - Interpolation coefficients vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns the linear interpolated result. - */ -export declare function lerpV(a: Vec3, b: Vec3, t: Vec3, dst?: Vec3): Vec3; -/** - * Return max values of two vectors. - * Given vectors a and b returns - * [max(a[0], b[0]), max(a[1], b[1]), max(a[2], b[2])]. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The max components vector. - */ -export declare function max(a: Vec3, b: Vec3, dst?: Vec3): Vec3; -/** - * Return min values of two vectors. - * Given vectors a and b returns - * [min(a[0], b[0]), min(a[1], b[1]), min(a[2], b[2])]. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The min components vector. - */ -export declare function min(a: Vec3, b: Vec3, dst?: Vec3): Vec3; -/** - * Multiplies a vector by a scalar. - * @param v - The vector. - * @param k - The scalar. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The scaled vector. - */ -export declare function mulScalar(v: Vec3, k: number, dst?: Vec3): Vec3; -/** - * Multiplies a vector by a scalar. (same as mulScalar) - * @param v - The vector. - * @param k - The scalar. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The scaled vector. - */ -export declare const scale: typeof mulScalar; -/** - * Divides a vector by a scalar. - * @param v - The vector. - * @param k - The scalar. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The scaled vector. - */ -export declare function divScalar(v: Vec3, k: number, dst?: Vec3): Vec3; -/** - * Inverse a vector. - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The inverted vector. - */ -export declare function inverse(v: Vec3, dst?: Vec3): Vec3; -/** - * Invert a vector. (same as inverse) - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The inverted vector. - */ -export declare const invert: typeof inverse; -/** - * Computes the cross product of two vectors; assumes both vectors have - * three entries. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of a cross b. - */ -export declare function cross(a: Vec3, b: Vec3, dst?: Vec3): Vec3; -/** - * Computes the dot product of two vectors; assumes both vectors have - * three entries. - * @param a - Operand vector. - * @param b - Operand vector. - * @returns dot product - */ -export declare function dot(a: Vec3, b: Vec3): number; -/** - * Computes the length of vector - * @param v - vector. - * @returns length of vector. - */ -export declare function length(v: Vec3): number; -/** - * Computes the length of vector (same as length) - * @param v - vector. - * @returns length of vector. - */ -export declare const len: typeof length; -/** - * Computes the square of the length of vector - * @param v - vector. - * @returns square of the length of vector. - */ -export declare function lengthSq(v: Vec3): number; -/** - * Computes the square of the length of vector (same as lengthSq) - * @param v - vector. - * @returns square of the length of vector. - */ -export declare const lenSq: typeof lengthSq; -/** - * Computes the distance between 2 points - * @param a - vector. - * @param b - vector. - * @returns distance between a and b - */ -export declare function distance(a: Vec3, b: Vec3): number; -/** - * Computes the distance between 2 points (same as distance) - * @param a - vector. - * @param b - vector. - * @returns distance between a and b - */ -export declare const dist: typeof distance; -/** - * Computes the square of the distance between 2 points - * @param a - vector. - * @param b - vector. - * @returns square of the distance between a and b - */ -export declare function distanceSq(a: Vec3, b: Vec3): number; -/** - * Computes the square of the distance between 2 points (same as distanceSq) - * @param a - vector. - * @param b - vector. - * @returns square of the distance between a and b - */ -export declare const distSq: typeof distanceSq; -/** - * Divides a vector by its Euclidean length and returns the quotient. - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The normalized vector. - */ -export declare function normalize(v: Vec3, dst?: Vec3): Vec3; -/** - * Negates a vector. - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns -v. - */ -export declare function negate(v: Vec3, dst?: Vec3): Vec3; -/** - * Copies a vector. (same as {@link vec3.clone}) - * Also see {@link vec3.create} and {@link vec3.set} - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A copy of v. - */ -export declare function copy(v: Vec3, dst?: Vec3): Vec3; -/** - * Clones a vector. (same as {@link vec3.copy}) - * Also see {@link vec3.create} and {@link vec3.set} - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A copy of v. - */ -export declare const clone: typeof copy; -/** - * Multiplies a vector by another vector (component-wise); assumes a and - * b have the same length. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of products of entries of a and b. - */ -export declare function multiply(a: Vec3, b: Vec3, dst?: Vec3): Vec3; -/** - * Multiplies a vector by another vector (component-wise); assumes a and - * b have the same length. (same as mul) - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of products of entries of a and b. - */ -export declare const mul: typeof multiply; -/** - * Divides a vector by another vector (component-wise); assumes a and - * b have the same length. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of quotients of entries of a and b. - */ -export declare function divide(a: Vec3, b: Vec3, dst?: Vec3): Vec3; -/** - * Divides a vector by another vector (component-wise); assumes a and - * b have the same length. (same as divide) - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of quotients of entries of a and b. - */ -export declare const div: typeof divide; -/** - * Creates a random vector - * @param scale - Default 1 - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The random vector. - */ -export declare function random(scale?: number, dst?: Vec3): Vec3; -/** - * Zero's a vector - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The zeroed vector. - */ -export declare function zero(dst?: Vec3): Vec3; -/** - * transform vec3 by 4x4 matrix - * @param v - the vector - * @param m - The matrix. - * @param dst - optional vec3 to store result. If not passed a new one is created. - * @returns the transformed vector - */ -export declare function transformMat4(v: Vec3, m: Mat4, dst?: Vec3): Vec3; -/** - * Transform vec4 by upper 3x3 matrix inside 4x4 matrix. - * @param v - The direction. - * @param m - The matrix. - * @param dst - optional Vec3 to store result. If not passed a new one is created. - * @returns The transformed vector. - */ -export declare function transformMat4Upper3x3(v: Vec3, m: Mat4, dst?: Vec3): Vec3; -/** - * Transforms vec3 by 3x3 matrix - * - * @param v - the vector - * @param m - The matrix. - * @param dst - optional vec3 to store result. If not passed a new one is created. - * @returns the transformed vector - */ -export declare function transformMat3(v: Vec3, m: Mat3, dst?: Vec3): Vec3; -/** - * Transforms vec3 by Quaternion - * @param v - the vector to transform - * @param q - the quaternion to transform by - * @param dst - optional vec3 to store result. If not passed a new one is created. - * @returns the transformed - */ -export declare function transformQuat(v: Vec3, q: Quat, dst?: Vec3): Vec3; -/** - * Returns the translation component of a 4-by-4 matrix as a vector with 3 - * entries. - * @param m - The matrix. - * @param dst - vector to hold result. If not passed a new one is created. - * @returns The translation component of m. - */ -export declare function getTranslation(m: Mat3, dst?: Vec3): Vec3; -/** - * Returns an axis of a 4x4 matrix as a vector with 3 entries - * @param m - The matrix. - * @param axis - The axis 0 = x, 1 = y, 2 = z; - * @returns The axis component of m. - */ -export declare function getAxis(m: Mat4, axis: number, dst?: Vec3): Vec3; -/** - * Returns the scaling component of the matrix - * @param m - The Matrix - * @param dst - The vector to set. If not passed a new one is created. - */ -export declare function getScaling(m: Mat4, dst: Vec3): Vec3; diff --git a/dist/2.x/vec3.d.ts b/dist/2.x/vec3.d.ts deleted file mode 100644 index dc13eef..0000000 --- a/dist/2.x/vec3.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * A JavaScript array with 3 values, Float32Array with 3 values, or a Float64Array with 3 values. - * When created by the library will create the default type which is `Float32Array` - * but can be set by calling {@link vec3.setDefaultType}. - */ -export declare type Vec3 = number[] | Float32Array | Float64Array; -/** - * - * Vec3 math functions. - * - * Almost all functions take an optional `dst` argument. If it is not passed in the - * functions will create a new `Vec3`. In other words you can do this - * - * const v = vec3.cross(v1, v2); // Creates a new Vec3 with the cross product of v1 x v2. - * - * or - * - * const v = vec3.create(); - * vec3.cross(v1, v2, v); // Puts the cross product of v1 x v2 in v - * - * The first style is often easier but depending on where it's used it generates garbage where - * as there is almost never allocation with the second style. - * - * It is always safe to pass any vector as the destination. So for example - * - * vec3.cross(v1, v2, v1); // Puts the cross product of v1 x v2 in v1 - * - */ -export declare let VecType: new (n: number) => Vec3; -/** - * Sets the type this library creates for a Vec3 - * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array` - * @returns previous constructor for Vec3 - */ -export declare function setDefaultType(ctor: new (n: number) => Vec3): new (n: number) => Vec3; -/** - * Creates a vec3; may be called with x, y, z to set initial values. - * @param x - Initial x value. - * @param y - Initial y value. - * @param z - Initial z value. - * @returns the created vector - */ -export declare function create(x?: number, y?: number, z?: number): Vec3; diff --git a/dist/2.x/vec4-impl.d.ts b/dist/2.x/vec4-impl.d.ts deleted file mode 100644 index 5b0a987..0000000 --- a/dist/2.x/vec4-impl.d.ts +++ /dev/null @@ -1,321 +0,0 @@ -import { Vec4, create, setDefaultType } from './vec4'; -import { Mat4 } from './mat4'; -export default Vec4; -export { create, setDefaultType }; -/** - * Creates a vec4; may be called with x, y, z to set initial values. (same as create) - * @param x - Initial x value. - * @param y - Initial y value. - * @param z - Initial z value. - * @param z - Initial w value. - * @returns the created vector - */ -export declare const fromValues: typeof create; -/** - * Sets the values of a Vec4 - * Also see {@link vec4.create} and {@link vec4.copy} - * - * @param x first value - * @param y second value - * @param z third value - * @param w fourth value - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector with its elements set. - */ -export declare function set(x: number, y: number, z: number, w: number, dst?: Vec4): Vec4; -/** - * Applies Math.ceil to each element of vector - * @param v - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the ceil of each element of v. - */ -export declare function ceil(v: Vec4, dst?: Vec4): Vec4; -/** - * Applies Math.floor to each element of vector - * @param v - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the floor of each element of v. - */ -export declare function floor(v: Vec4, dst?: Vec4): Vec4; -/** - * Applies Math.round to each element of vector - * @param v - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the round of each element of v. - */ -export declare function round(v: Vec4, dst?: Vec4): Vec4; -/** - * Clamp each element of vector between min and max - * @param v - Operand vector. - * @param max - Min value, default 0 - * @param min - Max value, default 1 - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that the clamped value of each element of v. - */ -export declare function clamp(v: Vec4, min?: number, max?: number, dst?: Vec4): Vec4; -/** - * Adds two vectors; assumes a and b have the same dimension. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the sum of a and b. - */ -export declare function add(a: Vec4, b: Vec4, dst?: Vec4): Vec4; -/** - * Adds two vectors, scaling the 2nd; assumes a and b have the same dimension. - * @param a - Operand vector. - * @param b - Operand vector. - * @param scale - Amount to scale b - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the sum of a + b * scale. - */ -export declare function addScaled(a: Vec4, b: Vec4, scale: number, dst?: Vec4): Vec4; -/** - * Subtracts two vectors. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the difference of a and b. - */ -export declare function subtract(a: Vec4, b: Vec4, dst?: Vec4): Vec4; -/** - * Subtracts two vectors. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the difference of a and b. - */ -export declare const sub: typeof subtract; -/** - * Check if 2 vectors are approximately equal - * @param a - Operand vector. - * @param b - Operand vector. - * @returns true if vectors are approximately equal - */ -export declare function equalsApproximately(a: Vec4, b: Vec4): boolean; -/** - * Check if 2 vectors are exactly equal - * @param a - Operand vector. - * @param b - Operand vector. - * @returns true if vectors are exactly equal - */ -export declare function equals(a: Vec4, b: Vec4): boolean; -/** - * Performs linear interpolation on two vectors. - * Given vectors a and b and interpolation coefficient t, returns - * a + t * (b - a). - * @param a - Operand vector. - * @param b - Operand vector. - * @param t - Interpolation coefficient. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The linear interpolated result. - */ -export declare function lerp(a: Vec4, b: Vec4, t: number, dst?: Vec4): Vec4; -/** - * Performs linear interpolation on two vectors. - * Given vectors a and b and interpolation coefficient vector t, returns - * a + t * (b - a). - * @param a - Operand vector. - * @param b - Operand vector. - * @param t - Interpolation coefficients vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns the linear interpolated result. - */ -export declare function lerpV(a: Vec4, b: Vec4, t: Vec4, dst?: Vec4): Vec4; -/** - * Return max values of two vectors. - * Given vectors a and b returns - * [max(a[0], b[0]), max(a[1], b[1]), max(a[2], b[2])]. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The max components vector. - */ -export declare function max(a: Vec4, b: Vec4, dst?: Vec4): Vec4; -/** - * Return min values of two vectors. - * Given vectors a and b returns - * [min(a[0], b[0]), min(a[1], b[1]), min(a[2], b[2])]. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The min components vector. - */ -export declare function min(a: Vec4, b: Vec4, dst?: Vec4): Vec4; -/** - * Multiplies a vector by a scalar. - * @param v - The vector. - * @param k - The scalar. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The scaled vector. - */ -export declare function mulScalar(v: Vec4, k: number, dst?: Vec4): Vec4; -/** - * Multiplies a vector by a scalar. (same as mulScalar) - * @param v - The vector. - * @param k - The scalar. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The scaled vector. - */ -export declare const scale: typeof mulScalar; -/** - * Divides a vector by a scalar. - * @param v - The vector. - * @param k - The scalar. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The scaled vector. - */ -export declare function divScalar(v: Vec4, k: number, dst?: Vec4): Vec4; -/** - * Inverse a vector. - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The inverted vector. - */ -export declare function inverse(v: Vec4, dst?: Vec4): Vec4; -/** - * Invert a vector. (same as inverse) - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The inverted vector. - */ -export declare const invert: typeof inverse; -/** - * Computes the dot product of two vectors - * @param a - Operand vector. - * @param b - Operand vector. - * @returns dot product - */ -export declare function dot(a: Vec4, b: Vec4): number; -/** - * Computes the length of vector - * @param v - vector. - * @returns length of vector. - */ -export declare function length(v: Vec4): number; -/** - * Computes the length of vector (same as length) - * @param v - vector. - * @returns length of vector. - */ -export declare const len: typeof length; -/** - * Computes the square of the length of vector - * @param v - vector. - * @returns square of the length of vector. - */ -export declare function lengthSq(v: Vec4): number; -/** - * Computes the square of the length of vector (same as lengthSq) - * @param v - vector. - * @returns square of the length of vector. - */ -export declare const lenSq: typeof lengthSq; -/** - * Computes the distance between 2 points - * @param a - vector. - * @param b - vector. - * @returns distance between a and b - */ -export declare function distance(a: Vec4, b: Vec4): number; -/** - * Computes the distance between 2 points (same as distance) - * @param a - vector. - * @param b - vector. - * @returns distance between a and b - */ -export declare const dist: typeof distance; -/** - * Computes the square of the distance between 2 points - * @param a - vector. - * @param b - vector. - * @returns square of the distance between a and b - */ -export declare function distanceSq(a: Vec4, b: Vec4): number; -/** - * Computes the square of the distance between 2 points (same as distanceSq) - * @param a - vector. - * @param b - vector. - * @returns square of the distance between a and b - */ -export declare const distSq: typeof distanceSq; -/** - * Divides a vector by its Euclidean length and returns the quotient. - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The normalized vector. - */ -export declare function normalize(v: Vec4, dst?: Vec4): Vec4; -/** - * Negates a vector. - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns -v. - */ -export declare function negate(v: Vec4, dst?: Vec4): Vec4; -/** - * Copies a vector. (same as {@link vec4.clone}) - * Also see {@link vec4.create} and {@link vec4.set} - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A copy of v. - */ -export declare function copy(v: Vec4, dst?: Vec4): Vec4; -/** - * Clones a vector. (same as {@link vec4.copy}) - * Also see {@link vec4.create} and {@link vec4.set} - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A copy of v. - */ -export declare const clone: typeof copy; -/** - * Multiplies a vector by another vector (component-wise); assumes a and - * b have the same length. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of products of entries of a and b. - */ -export declare function multiply(a: Vec4, b: Vec4, dst?: Vec4): Vec4; -/** - * Multiplies a vector by another vector (component-wise); assumes a and - * b have the same length. (same as mul) - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of products of entries of a and b. - */ -export declare const mul: typeof multiply; -/** - * Divides a vector by another vector (component-wise); assumes a and - * b have the same length. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of quotients of entries of a and b. - */ -export declare function divide(a: Vec4, b: Vec4, dst?: Vec4): Vec4; -/** - * Divides a vector by another vector (component-wise); assumes a and - * b have the same length. (same as divide) - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of quotients of entries of a and b. - */ -export declare const div: typeof divide; -/** - * Zero's a vector - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The zeroed vector. - */ -export declare function zero(dst?: Vec4): Vec4; -/** - * transform vec4 by 4x4 matrix - * @param v - the vector - * @param m - The matrix. - * @param dst - optional vec4 to store result. If not passed a new one is created. - * @returns the transformed vector - */ -export declare function transformMat4(v: Vec4, m: Mat4, dst?: Vec4): Vec4; diff --git a/dist/2.x/vec4.d.ts b/dist/2.x/vec4.d.ts deleted file mode 100644 index 3f6426a..0000000 --- a/dist/2.x/vec4.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * A JavaScript array with 4 values, Float32Array with 4 values, or a Float64Array with 4 values. - * When created by the library will create the default type which is `Float32Array` - * but can be set by calling {@link vec4.setDefaultType}. - */ -export declare type Vec4 = number[] | Float32Array | Float64Array; -/** - * - * Vec4 math functions. - * - * Almost all functions take an optional `dst` argument. If it is not passed in the - * functions will create a new `Vec4`. In other words you can do this - * - * const v = vec4.cross(v1, v2); // Creates a new Vec4 with the cross product of v1 x v2. - * - * or - * - * const v = vec4.create(); - * vec4.cross(v1, v2, v); // Puts the cross product of v1 x v2 in v - * - * The first style is often easier but depending on where it's used it generates garbage where - * as there is almost never allocation with the second style. - * - * It is always safe to pass any vector as the destination. So for example - * - * vec4.cross(v1, v2, v1); // Puts the cross product of v1 x v2 in v1 - * - */ -export declare let VecType: new (n: number) => Vec4; -/** - * Sets the type this library creates for a Vec4 - * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array` - * @returns previous constructor for Vec4 - */ -export declare function setDefaultType(ctor: new (n: number) => Vec4): new (n: number) => Vec4; -/** - * Creates a vec4; may be called with x, y, z to set initial values. - * @param x - Initial x value. - * @param y - Initial y value. - * @param z - Initial z value. - * @param w - Initial w value. - * @returns the created vector - */ -export declare function create(x?: number, y?: number, z?: number, w?: number): Vec4; diff --git a/dist/2.x/wgpu-matrix.d.ts b/dist/2.x/wgpu-matrix.d.ts deleted file mode 100644 index 1eea4c0..0000000 --- a/dist/2.x/wgpu-matrix.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import Mat3, * as mat3 from './mat3-impl'; -import Mat4, * as mat4 from './mat4-impl'; -import Quat, * as quat from './quat-impl'; -import Vec2, * as vec2 from './vec2-impl'; -import Vec3, * as vec3 from './vec3-impl'; -import Vec4, * as vec4 from './vec4-impl'; -import * as utils from './utils'; -/** - * Sets the type this library creates for all types - * - * example: - * - * ``` - * setDefaultType(Float64Array); - * ``` - * - * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array` - */ -export declare function setDefaultType(ctor: new (n: number) => Float32Array | Float64Array | number[]): void; -export { Mat3, mat3, Mat4, mat4, Quat, quat, utils, Vec2, vec2, Vec3, vec3, Vec4, vec4, }; diff --git a/dist/2.x/wgpu-matrix.js b/dist/2.x/wgpu-matrix.js deleted file mode 100644 index 997286a..0000000 --- a/dist/2.x/wgpu-matrix.js +++ /dev/null @@ -1,5451 +0,0 @@ -/* wgpu-matrix@2.5.1, license MIT */ -(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.wgpuMatrix = {})); -})(this, (function (exports) { 'use strict'; - - /* - * Copyright 2022 Gregg Tavares - * - * 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. - */ - let EPSILON = 0.000001; - /** - * Set the value for EPSILON for various checks - * @param v - Value to use for EPSILON. - * @returns previous value of EPSILON; - */ - function setEpsilon(v) { - const old = EPSILON; - EPSILON = v; - return old; - } - /** - * Convert degrees to radians - * @param degrees - Angle in degrees - * @returns angle converted to radians - */ - function degToRad(degrees) { - return degrees * Math.PI / 180; - } - /** - * Convert radians to degrees - * @param radians - Angle in radians - * @returns angle converted to degrees - */ - function radToDeg(radians) { - return radians * 180 / Math.PI; - } - /** - * Lerps between a and b via t - * @param a - starting value - * @param b - ending value - * @param t - value where 0 = a and 1 = b - * @returns a + (b - a) * t - */ - function lerp$4(a, b, t) { - return a + (b - a) * t; - } - /** - * Compute the opposite of lerp. Given a and b and a value between - * a and b returns a value between 0 and 1. 0 if a, 1 if b. - * Note: no clamping is done. - * @param a - start value - * @param b - end value - * @param v - value between a and b - * @returns (v - a) / (b - a) - */ - function inverseLerp(a, b, v) { - const d = b - a; - return (Math.abs(b - a) < EPSILON) - ? a - : (v - a) / d; - } - /** - * Compute the euclidean modulo - * - * ``` - * // table for n / 3 - * -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5 <- n - * ------------------------------------ - * -2 -1 -0 -2 -1 0, 1, 2, 0, 1, 2 <- n % 3 - * 1 2 0 1 2 0, 1, 2, 0, 1, 2 <- euclideanModule(n, 3) - * ``` - * - * @param n - dividend - * @param m - divisor - * @returns the euclidean modulo of n / m - */ - function euclideanModulo(n, m) { - return ((n % m) + m) % m; - } - - var utils = /*#__PURE__*/Object.freeze({ - __proto__: null, - get EPSILON () { return EPSILON; }, - setEpsilon: setEpsilon, - degToRad: degToRad, - radToDeg: radToDeg, - lerp: lerp$4, - inverseLerp: inverseLerp, - euclideanModulo: euclideanModulo - }); - - /* - * Copyright 2022 Gregg Tavares - * - * 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. - */ - /** - * - * Vec2 math functions. - * - * Almost all functions take an optional `dst` argument. If it is not passed in the - * functions will create a new Vec2. In other words you can do this - * - * const v = vec2.cross(v1, v2); // Creates a new Vec2 with the cross product of v1 x v2. - * - * or - * - * const v = vec2.create(); - * vec2.cross(v1, v2, v); // Puts the cross product of v1 x v2 in v - * - * The first style is often easier but depending on where it's used it generates garbage where - * as there is almost never allocation with the second style. - * - * It is always safe to pass any vector as the destination. So for example - * - * vec2.cross(v1, v2, v1); // Puts the cross product of v1 x v2 in v1 - * - */ - let VecType$2 = Float32Array; - /** - * Sets the type this library creates for a Vec2 - * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array` - * @returns previous constructor for Vec2 - */ - function setDefaultType$6(ctor) { - const oldType = VecType$2; - VecType$2 = ctor; - return oldType; - } - /** - * Creates a Vec2; may be called with x, y, z to set initial values. - * - * Note: Since passing in a raw JavaScript array - * is valid in all circumstances, if you want to - * force a JavaScript array into a Vec2's specified type - * it would be faster to use - * - * ``` - * const v = vec2.clone(someJSArray); - * ``` - * - * Note: a consequence of the implementation is if your Vec2Type = `Array` - * instead of `Float32Array` or `Float64Array` then any values you - * don't pass in will be undefined. Usually this is not an issue since - * (a) using `Array` is rare and (b) using `vec2.create` is usually used - * to create a Vec2 to be filled out as in - * - * ``` - * const sum = vec2.create(); - * vec2.add(v1, v2, sum); - * ``` - * - * @param x - Initial x value. - * @param y - Initial y value. - * @returns the created vector - */ - function create$5(x = 0, y = 0) { - const dst = new VecType$2(2); - if (x !== undefined) { - dst[0] = x; - if (y !== undefined) { - dst[1] = y; - } - } - return dst; - } - - /* - * Copyright 2022 Gregg Tavares - * - * 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. - */ - /** - * - * Vec3 math functions. - * - * Almost all functions take an optional `dst` argument. If it is not passed in the - * functions will create a new `Vec3`. In other words you can do this - * - * const v = vec3.cross(v1, v2); // Creates a new Vec3 with the cross product of v1 x v2. - * - * or - * - * const v = vec3.create(); - * vec3.cross(v1, v2, v); // Puts the cross product of v1 x v2 in v - * - * The first style is often easier but depending on where it's used it generates garbage where - * as there is almost never allocation with the second style. - * - * It is always safe to pass any vector as the destination. So for example - * - * vec3.cross(v1, v2, v1); // Puts the cross product of v1 x v2 in v1 - * - */ - let VecType$1 = Float32Array; - /** - * Sets the type this library creates for a Vec3 - * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array` - * @returns previous constructor for Vec3 - */ - function setDefaultType$5(ctor) { - const oldType = VecType$1; - VecType$1 = ctor; - return oldType; - } - /** - * Creates a vec3; may be called with x, y, z to set initial values. - * @param x - Initial x value. - * @param y - Initial y value. - * @param z - Initial z value. - * @returns the created vector - */ - function create$4(x, y, z) { - const dst = new VecType$1(3); - if (x !== undefined) { - dst[0] = x; - if (y !== undefined) { - dst[1] = y; - if (z !== undefined) { - dst[2] = z; - } - } - } - return dst; - } - - /* - * Copyright 2022 Gregg Tavares - * - * 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. - */ - /** - * Creates a Vec2; may be called with x, y, z to set initial values. (same as create) - * @param x - Initial x value. - * @param y - Initial y value. - * @returns the created vector - */ - const fromValues$3 = create$5; - /** - * Sets the values of a Vec2 - * Also see {@link vec2.create} and {@link vec2.copy} - * - * @param x first value - * @param y second value - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector with its elements set. - */ - function set$5(x, y, dst) { - dst = dst || new VecType$2(2); - dst[0] = x; - dst[1] = y; - return dst; - } - /** - * Applies Math.ceil to each element of vector - * @param v - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the ceil of each element of v. - */ - function ceil$2(v, dst) { - dst = dst || new VecType$2(2); - dst[0] = Math.ceil(v[0]); - dst[1] = Math.ceil(v[1]); - return dst; - } - /** - * Applies Math.floor to each element of vector - * @param v - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the floor of each element of v. - */ - function floor$2(v, dst) { - dst = dst || new VecType$2(2); - dst[0] = Math.floor(v[0]); - dst[1] = Math.floor(v[1]); - return dst; - } - /** - * Applies Math.round to each element of vector - * @param v - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the round of each element of v. - */ - function round$2(v, dst) { - dst = dst || new VecType$2(2); - dst[0] = Math.round(v[0]); - dst[1] = Math.round(v[1]); - return dst; - } - /** - * Clamp each element of vector between min and max - * @param v - Operand vector. - * @param max - Min value, default 0 - * @param min - Max value, default 1 - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that the clamped value of each element of v. - */ - function clamp$2(v, min = 0, max = 1, dst) { - dst = dst || new VecType$2(2); - dst[0] = Math.min(max, Math.max(min, v[0])); - dst[1] = Math.min(max, Math.max(min, v[1])); - return dst; - } - /** - * Adds two vectors; assumes a and b have the same dimension. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the sum of a and b. - */ - function add$3(a, b, dst) { - dst = dst || new VecType$2(2); - dst[0] = a[0] + b[0]; - dst[1] = a[1] + b[1]; - return dst; - } - /** - * Adds two vectors, scaling the 2nd; assumes a and b have the same dimension. - * @param a - Operand vector. - * @param b - Operand vector. - * @param scale - Amount to scale b - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the sum of a + b * scale. - */ - function addScaled$2(a, b, scale, dst) { - dst = dst || new VecType$2(2); - dst[0] = a[0] + b[0] * scale; - dst[1] = a[1] + b[1] * scale; - return dst; - } - /** - * Returns the angle in radians between two vectors. - * @param a - Operand vector. - * @param b - Operand vector. - * @returns The angle in radians between the 2 vectors. - */ - function angle$2(a, b) { - const ax = a[0]; - const ay = a[1]; - const bx = a[0]; - const by = a[1]; - const mag1 = Math.sqrt(ax * ax + ay * ay); - const mag2 = Math.sqrt(bx * bx + by * by); - const mag = mag1 * mag2; - const cosine = mag && dot$3(a, b) / mag; - return Math.acos(cosine); - } - /** - * Subtracts two vectors. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the difference of a and b. - */ - function subtract$3(a, b, dst) { - dst = dst || new VecType$2(2); - dst[0] = a[0] - b[0]; - dst[1] = a[1] - b[1]; - return dst; - } - /** - * Subtracts two vectors. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the difference of a and b. - */ - const sub$3 = subtract$3; - /** - * Check if 2 vectors are approximately equal - * @param a - Operand vector. - * @param b - Operand vector. - * @returns true if vectors are approximately equal - */ - function equalsApproximately$5(a, b) { - return Math.abs(a[0] - b[0]) < EPSILON && - Math.abs(a[1] - b[1]) < EPSILON; - } - /** - * Check if 2 vectors are exactly equal - * @param a - Operand vector. - * @param b - Operand vector. - * @returns true if vectors are exactly equal - */ - function equals$5(a, b) { - return a[0] === b[0] && a[1] === b[1]; - } - /** - * Performs linear interpolation on two vectors. - * Given vectors a and b and interpolation coefficient t, returns - * a + t * (b - a). - * @param a - Operand vector. - * @param b - Operand vector. - * @param t - Interpolation coefficient. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The linear interpolated result. - */ - function lerp$3(a, b, t, dst) { - dst = dst || new VecType$2(2); - dst[0] = a[0] + t * (b[0] - a[0]); - dst[1] = a[1] + t * (b[1] - a[1]); - return dst; - } - /** - * Performs linear interpolation on two vectors. - * Given vectors a and b and interpolation coefficient vector t, returns - * a + t * (b - a). - * @param a - Operand vector. - * @param b - Operand vector. - * @param t - Interpolation coefficients vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns the linear interpolated result. - */ - function lerpV$2(a, b, t, dst) { - dst = dst || new VecType$2(2); - dst[0] = a[0] + t[0] * (b[0] - a[0]); - dst[1] = a[1] + t[1] * (b[1] - a[1]); - return dst; - } - /** - * Return max values of two vectors. - * Given vectors a and b returns - * [max(a[0], b[0]), max(a[1], b[1]), max(a[2], b[2])]. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The max components vector. - */ - function max$2(a, b, dst) { - dst = dst || new VecType$2(2); - dst[0] = Math.max(a[0], b[0]); - dst[1] = Math.max(a[1], b[1]); - return dst; - } - /** - * Return min values of two vectors. - * Given vectors a and b returns - * [min(a[0], b[0]), min(a[1], b[1]), min(a[2], b[2])]. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The min components vector. - */ - function min$2(a, b, dst) { - dst = dst || new VecType$2(2); - dst[0] = Math.min(a[0], b[0]); - dst[1] = Math.min(a[1], b[1]); - return dst; - } - /** - * Multiplies a vector by a scalar. - * @param v - The vector. - * @param k - The scalar. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The scaled vector. - */ - function mulScalar$3(v, k, dst) { - dst = dst || new VecType$2(2); - dst[0] = v[0] * k; - dst[1] = v[1] * k; - return dst; - } - /** - * Multiplies a vector by a scalar. (same as mulScalar) - * @param v - The vector. - * @param k - The scalar. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The scaled vector. - */ - const scale$5 = mulScalar$3; - /** - * Divides a vector by a scalar. - * @param v - The vector. - * @param k - The scalar. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The scaled vector. - */ - function divScalar$3(v, k, dst) { - dst = dst || new VecType$2(2); - dst[0] = v[0] / k; - dst[1] = v[1] / k; - return dst; - } - /** - * Inverse a vector. - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The inverted vector. - */ - function inverse$5(v, dst) { - dst = dst || new VecType$2(2); - dst[0] = 1 / v[0]; - dst[1] = 1 / v[1]; - return dst; - } - /** - * Invert a vector. (same as inverse) - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The inverted vector. - */ - const invert$4 = inverse$5; - /** - * Computes the cross product of two vectors; assumes both vectors have - * three entries. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of a cross b. - */ - function cross$1(a, b, dst) { - dst = dst || new VecType$1(3); - const z = a[0] * b[1] - a[1] * b[0]; - dst[0] = 0; - dst[1] = 0; - dst[2] = z; - return dst; - } - /** - * Computes the dot product of two vectors; assumes both vectors have - * three entries. - * @param a - Operand vector. - * @param b - Operand vector. - * @returns dot product - */ - function dot$3(a, b) { - return a[0] * b[0] + a[1] * b[1]; - } - /** - * Computes the length of vector - * @param v - vector. - * @returns length of vector. - */ - function length$3(v) { - const v0 = v[0]; - const v1 = v[1]; - return Math.sqrt(v0 * v0 + v1 * v1); - } - /** - * Computes the length of vector (same as length) - * @param v - vector. - * @returns length of vector. - */ - const len$3 = length$3; - /** - * Computes the square of the length of vector - * @param v - vector. - * @returns square of the length of vector. - */ - function lengthSq$3(v) { - const v0 = v[0]; - const v1 = v[1]; - return v0 * v0 + v1 * v1; - } - /** - * Computes the square of the length of vector (same as lengthSq) - * @param v - vector. - * @returns square of the length of vector. - */ - const lenSq$3 = lengthSq$3; - /** - * Computes the distance between 2 points - * @param a - vector. - * @param b - vector. - * @returns distance between a and b - */ - function distance$2(a, b) { - const dx = a[0] - b[0]; - const dy = a[1] - b[1]; - return Math.sqrt(dx * dx + dy * dy); - } - /** - * Computes the distance between 2 points (same as distance) - * @param a - vector. - * @param b - vector. - * @returns distance between a and b - */ - const dist$2 = distance$2; - /** - * Computes the square of the distance between 2 points - * @param a - vector. - * @param b - vector. - * @returns square of the distance between a and b - */ - function distanceSq$2(a, b) { - const dx = a[0] - b[0]; - const dy = a[1] - b[1]; - return dx * dx + dy * dy; - } - /** - * Computes the square of the distance between 2 points (same as distanceSq) - * @param a - vector. - * @param b - vector. - * @returns square of the distance between a and b - */ - const distSq$2 = distanceSq$2; - /** - * Divides a vector by its Euclidean length and returns the quotient. - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The normalized vector. - */ - function normalize$3(v, dst) { - dst = dst || new VecType$2(2); - const v0 = v[0]; - const v1 = v[1]; - const len = Math.sqrt(v0 * v0 + v1 * v1); - if (len > 0.00001) { - dst[0] = v0 / len; - dst[1] = v1 / len; - } - else { - dst[0] = 0; - dst[1] = 0; - } - return dst; - } - /** - * Negates a vector. - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns -v. - */ - function negate$4(v, dst) { - dst = dst || new VecType$2(2); - dst[0] = -v[0]; - dst[1] = -v[1]; - return dst; - } - /** - * Copies a vector. (same as {@link vec2.clone}) - * Also see {@link vec2.create} and {@link vec2.set} - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A copy of v. - */ - function copy$5(v, dst) { - dst = dst || new VecType$2(2); - dst[0] = v[0]; - dst[1] = v[1]; - return dst; - } - /** - * Clones a vector. (same as {@link vec2.copy}) - * Also see {@link vec2.create} and {@link vec2.set} - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A copy of v. - */ - const clone$5 = copy$5; - /** - * Multiplies a vector by another vector (component-wise); assumes a and - * b have the same length. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of products of entries of a and b. - */ - function multiply$5(a, b, dst) { - dst = dst || new VecType$2(2); - dst[0] = a[0] * b[0]; - dst[1] = a[1] * b[1]; - return dst; - } - /** - * Multiplies a vector by another vector (component-wise); assumes a and - * b have the same length. (same as mul) - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of products of entries of a and b. - */ - const mul$5 = multiply$5; - /** - * Divides a vector by another vector (component-wise); assumes a and - * b have the same length. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of quotients of entries of a and b. - */ - function divide$2(a, b, dst) { - dst = dst || new VecType$2(2); - dst[0] = a[0] / b[0]; - dst[1] = a[1] / b[1]; - return dst; - } - /** - * Divides a vector by another vector (component-wise); assumes a and - * b have the same length. (same as divide) - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of quotients of entries of a and b. - */ - const div$2 = divide$2; - /** - * Creates a random unit vector * scale - * @param scale - Default 1 - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The random vector. - */ - function random$1(scale = 1, dst) { - dst = dst || new VecType$2(2); - const angle = Math.random() * 2 * Math.PI; - dst[0] = Math.cos(angle) * scale; - dst[1] = Math.sin(angle) * scale; - return dst; - } - /** - * Zero's a vector - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The zeroed vector. - */ - function zero$2(dst) { - dst = dst || new VecType$2(2); - dst[0] = 0; - dst[1] = 0; - return dst; - } - /** - * transform Vec2 by 4x4 matrix - * @param v - the vector - * @param m - The matrix. - * @param dst - optional Vec2 to store result. If not passed a new one is created. - * @returns the transformed vector - */ - function transformMat4$2(v, m, dst) { - dst = dst || new VecType$2(2); - const x = v[0]; - const y = v[1]; - dst[0] = x * m[0] + y * m[4] + m[12]; - dst[1] = x * m[1] + y * m[5] + m[13]; - return dst; - } - /** - * Transforms vec4 by 3x3 matrix - * - * @param v - the vector - * @param m - The matrix. - * @param dst - optional Vec2 to store result. If not passed a new one is created. - * @returns the transformed vector - */ - function transformMat3$1(v, m, dst) { - dst = dst || new VecType$2(2); - const x = v[0]; - const y = v[1]; - dst[0] = m[0] * x + m[4] * y + m[8]; - dst[1] = m[1] * x + m[5] * y + m[9]; - return dst; - } - - var vec2Impl = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create$5, - setDefaultType: setDefaultType$6, - fromValues: fromValues$3, - set: set$5, - ceil: ceil$2, - floor: floor$2, - round: round$2, - clamp: clamp$2, - add: add$3, - addScaled: addScaled$2, - angle: angle$2, - subtract: subtract$3, - sub: sub$3, - equalsApproximately: equalsApproximately$5, - equals: equals$5, - lerp: lerp$3, - lerpV: lerpV$2, - max: max$2, - min: min$2, - mulScalar: mulScalar$3, - scale: scale$5, - divScalar: divScalar$3, - inverse: inverse$5, - invert: invert$4, - cross: cross$1, - dot: dot$3, - length: length$3, - len: len$3, - lengthSq: lengthSq$3, - lenSq: lenSq$3, - distance: distance$2, - dist: dist$2, - distanceSq: distanceSq$2, - distSq: distSq$2, - normalize: normalize$3, - negate: negate$4, - copy: copy$5, - clone: clone$5, - multiply: multiply$5, - mul: mul$5, - divide: divide$2, - div: div$2, - random: random$1, - zero: zero$2, - transformMat4: transformMat4$2, - transformMat3: transformMat3$1 - }); - - /* - * Copyright 2022 Gregg Tavares - * - * 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. - */ - /** - * 3x3 Matrix math math functions. - * - * Almost all functions take an optional `dst` argument. If it is not passed in the - * functions will create a new matrix. In other words you can do this - * - * const mat = mat3.translation([1, 2, 3]); // Creates a new translation matrix - * - * or - * - * const mat = mat3.create(); - * mat3.translation([1, 2, 3], mat); // Puts translation matrix in mat. - * - * The first style is often easier but depending on where it's used it generates garbage where - * as there is almost never allocation with the second style. - * - * It is always save to pass any matrix as the destination. So for example - * - * const mat = mat3.identity(); - * const trans = mat3.translation([1, 2, 3]); - * mat3.multiply(mat, trans, mat); // Multiplies mat * trans and puts result in mat. - * - */ - let MatType$1 = Float32Array; - // This mess is because with Mat3 we have 3 unused elements. - // For Float32Array and Float64Array that's not an issue - // but for Array it's troublesome - const ctorMap = new Map([ - [Float32Array, () => new Float32Array(12)], - [Float64Array, () => new Float64Array(12)], - [Array, () => new Array(12).fill(0)], - ]); - let newMat3 = ctorMap.get(Float32Array); - /** - * Sets the type this library creates for a Mat3 - * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array` - * @returns previous constructor for Mat3 - */ - function setDefaultType$4(ctor) { - const oldType = MatType$1; - MatType$1 = ctor; - newMat3 = ctorMap.get(ctor); - return oldType; - } - /** - * Create a Mat3 from values - * - * Note: Since passing in a raw JavaScript array - * is valid in all circumstances, if you want to - * force a JavaScript array into a Mat3's specified type - * it would be faster to use - * - * ``` - * const m = mat3.clone(someJSArray); - * ``` - * - * Note: a consequence of the implementation is if your Mat3Type = `Array` - * instead of `Float32Array` or `Float64Array` then any values you - * don't pass in will be undefined. Usually this is not an issue since - * (a) using `Array` is rare and (b) using `mat3.create` is usually used - * to create a Mat3 to be filled out as in - * - * ``` - * const m = mat3.create(); - * mat3.perspective(fov, aspect, near, far, m); - * ``` - * - * @param v0 - value for element 0 - * @param v1 - value for element 1 - * @param v2 - value for element 2 - * @param v3 - value for element 3 - * @param v4 - value for element 4 - * @param v5 - value for element 5 - * @param v6 - value for element 6 - * @param v7 - value for element 7 - * @param v8 - value for element 8 - * @returns matrix created from values. - */ - function create$3(v0, v1, v2, v3, v4, v5, v6, v7, v8) { - const dst = newMat3(); - // to make the array homogenous - dst[3] = 0; - dst[7] = 0; - dst[11] = 0; - if (v0 !== undefined) { - dst[0] = v0; - if (v1 !== undefined) { - dst[1] = v1; - if (v2 !== undefined) { - dst[2] = v2; - if (v3 !== undefined) { - dst[4] = v3; - if (v4 !== undefined) { - dst[5] = v4; - if (v5 !== undefined) { - dst[6] = v5; - if (v6 !== undefined) { - dst[8] = v6; - if (v7 !== undefined) { - dst[9] = v7; - if (v8 !== undefined) { - dst[10] = v8; - } - } - } - } - } - } - } - } - } - return dst; - } - /** - * Sets the values of a Mat3 - * Also see {@link mat3.create} and {@link mat3.copy} - * - * @param v0 - value for element 0 - * @param v1 - value for element 1 - * @param v2 - value for element 2 - * @param v3 - value for element 3 - * @param v4 - value for element 4 - * @param v5 - value for element 5 - * @param v6 - value for element 6 - * @param v7 - value for element 7 - * @param v8 - value for element 8 - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns Mat3 set from values. - */ - function set$4(v0, v1, v2, v3, v4, v5, v6, v7, v8, dst) { - dst = dst || newMat3(); - dst[0] = v0; - dst[1] = v1; - dst[2] = v2; - dst[3] = 0; - dst[4] = v3; - dst[5] = v4; - dst[6] = v5; - dst[7] = 0; - dst[8] = v6; - dst[9] = v7; - dst[10] = v8; - dst[11] = 0; - return dst; - } - /** - * Creates a Mat3 from the upper left 3x3 part of a Mat4 - * @param m4 - source matrix - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns Mat3 made from m4 - */ - function fromMat4(m4, dst) { - dst = dst || newMat3(); - dst[0] = m4[0]; - dst[1] = m4[1]; - dst[2] = m4[2]; - dst[3] = 0; - dst[4] = m4[4]; - dst[5] = m4[5]; - dst[6] = m4[6]; - dst[7] = 0; - dst[8] = m4[8]; - dst[9] = m4[9]; - dst[10] = m4[10]; - dst[11] = 0; - return dst; - } - /** - * Creates a Mat3 rotation matrix from a quaternion - * @param q - quaternion to create matrix from - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns Mat3 made from q - */ - function fromQuat$1(q, dst) { - dst = dst || newMat3(); - const x = q[0]; - const y = q[1]; - const z = q[2]; - const w = q[3]; - const x2 = x + x; - const y2 = y + y; - const z2 = z + z; - const xx = x * x2; - const yx = y * x2; - const yy = y * y2; - const zx = z * x2; - const zy = z * y2; - const zz = z * z2; - const wx = w * x2; - const wy = w * y2; - const wz = w * z2; - dst[0] = 1 - yy - zz; - dst[1] = yx + wz; - dst[2] = zx - wy; - dst[3] = 0; - dst[4] = yx - wz; - dst[5] = 1 - xx - zz; - dst[6] = zy + wx; - dst[7] = 0; - dst[8] = zx + wy; - dst[9] = zy - wx; - dst[10] = 1 - xx - yy; - dst[11] = 0; - return dst; - } - /** - * Negates a matrix. - * @param m - The matrix. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns -m. - */ - function negate$3(m, dst) { - dst = dst || newMat3(); - dst[0] = -m[0]; - dst[1] = -m[1]; - dst[2] = -m[2]; - dst[4] = -m[4]; - dst[5] = -m[5]; - dst[6] = -m[6]; - dst[8] = -m[8]; - dst[9] = -m[9]; - dst[10] = -m[10]; - return dst; - } - /** - * Copies a matrix. (same as {@link mat3.clone}) - * Also see {@link mat3.create} and {@link mat3.set} - * @param m - The matrix. - * @param dst - The matrix. If not passed a new one is created. - * @returns A copy of m. - */ - function copy$4(m, dst) { - dst = dst || newMat3(); - dst[0] = m[0]; - dst[1] = m[1]; - dst[2] = m[2]; - dst[4] = m[4]; - dst[5] = m[5]; - dst[6] = m[6]; - dst[8] = m[8]; - dst[9] = m[9]; - dst[10] = m[10]; - return dst; - } - /** - * Copies a matrix (same as {@link mat3.copy}) - * Also see {@link mat3.create} and {@link mat3.set} - * @param m - The matrix. - * @param dst - The matrix. If not passed a new one is created. - * @returns A copy of m. - */ - const clone$4 = copy$4; - /** - * Check if 2 matrices are approximately equal - * @param a Operand matrix. - * @param b Operand matrix. - * @returns true if matrices are approximately equal - */ - function equalsApproximately$4(a, b) { - return Math.abs(a[0] - b[0]) < EPSILON && - Math.abs(a[1] - b[1]) < EPSILON && - Math.abs(a[2] - b[2]) < EPSILON && - Math.abs(a[4] - b[4]) < EPSILON && - Math.abs(a[5] - b[5]) < EPSILON && - Math.abs(a[6] - b[6]) < EPSILON && - Math.abs(a[8] - b[8]) < EPSILON && - Math.abs(a[9] - b[9]) < EPSILON && - Math.abs(a[10] - b[10]) < EPSILON; - } - /** - * Check if 2 matrices are exactly equal - * @param a Operand matrix. - * @param b Operand matrix. - * @returns true if matrices are exactly equal - */ - function equals$4(a, b) { - return a[0] === b[0] && - a[1] === b[1] && - a[2] === b[2] && - a[4] === b[4] && - a[5] === b[5] && - a[6] === b[6] && - a[8] === b[8] && - a[9] === b[9] && - a[10] === b[10]; - } - /** - * Creates a 3-by-3 identity matrix. - * - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns A 3-by-3 identity matrix. - */ - function identity$2(dst) { - dst = dst || newMat3(); - dst[0] = 1; - dst[1] = 0; - dst[2] = 0; - dst[4] = 0; - dst[5] = 1; - dst[6] = 0; - dst[8] = 0; - dst[9] = 0; - dst[10] = 1; - return dst; - } - /** - * Takes the transpose of a matrix. - * @param m - The matrix. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The transpose of m. - */ - function transpose$1(m, dst) { - dst = dst || newMat3(); - if (dst === m) { - let t; - // 0 1 2 - // 4 5 6 - // 8 9 10 - t = m[1]; - m[1] = m[4]; - m[4] = t; - t = m[2]; - m[2] = m[8]; - m[8] = t; - t = m[6]; - m[6] = m[9]; - m[9] = t; - return dst; - } - const m00 = m[0 * 4 + 0]; - const m01 = m[0 * 4 + 1]; - const m02 = m[0 * 4 + 2]; - const m10 = m[1 * 4 + 0]; - const m11 = m[1 * 4 + 1]; - const m12 = m[1 * 4 + 2]; - const m20 = m[2 * 4 + 0]; - const m21 = m[2 * 4 + 1]; - const m22 = m[2 * 4 + 2]; - dst[0] = m00; - dst[1] = m10; - dst[2] = m20; - dst[4] = m01; - dst[5] = m11; - dst[6] = m21; - dst[8] = m02; - dst[9] = m12; - dst[10] = m22; - return dst; - } - /** - * Computes the inverse of a 3-by-3 matrix. - * @param m - The matrix. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The inverse of m. - */ - function inverse$4(m, dst) { - dst = dst || newMat3(); - const m00 = m[0 * 4 + 0]; - const m01 = m[0 * 4 + 1]; - const m02 = m[0 * 4 + 2]; - const m10 = m[1 * 4 + 0]; - const m11 = m[1 * 4 + 1]; - const m12 = m[1 * 4 + 2]; - const m20 = m[2 * 4 + 0]; - const m21 = m[2 * 4 + 1]; - const m22 = m[2 * 4 + 2]; - const b01 = m22 * m11 - m12 * m21; - const b11 = -m22 * m10 + m12 * m20; - const b21 = m21 * m10 - m11 * m20; - const invDet = 1 / (m00 * b01 + m01 * b11 + m02 * b21); - dst[0] = b01 * invDet; - dst[1] = (-m22 * m01 + m02 * m21) * invDet; - dst[2] = (m12 * m01 - m02 * m11) * invDet; - dst[4] = b11 * invDet; - dst[5] = (m22 * m00 - m02 * m20) * invDet; - dst[6] = (-m12 * m00 + m02 * m10) * invDet; - dst[8] = b21 * invDet; - dst[9] = (-m21 * m00 + m01 * m20) * invDet; - dst[10] = (m11 * m00 - m01 * m10) * invDet; - return dst; - } - /** - * Compute the determinant of a matrix - * @param m - the matrix - * @returns the determinant - */ - function determinant$1(m) { - const m00 = m[0 * 4 + 0]; - const m01 = m[0 * 4 + 1]; - const m02 = m[0 * 4 + 2]; - const m10 = m[1 * 4 + 0]; - const m11 = m[1 * 4 + 1]; - const m12 = m[1 * 4 + 2]; - const m20 = m[2 * 4 + 0]; - const m21 = m[2 * 4 + 1]; - const m22 = m[2 * 4 + 2]; - return m00 * (m11 * m22 - m21 * m12) - - m10 * (m01 * m22 - m21 * m02) + - m20 * (m01 * m12 - m11 * m02); - } - /** - * Computes the inverse of a 3-by-3 matrix. (same as inverse) - * @param m - The matrix. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The inverse of m. - */ - const invert$3 = inverse$4; - /** - * Multiplies two 3-by-3 matrices with a on the left and b on the right - * @param a - The matrix on the left. - * @param b - The matrix on the right. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The matrix product of a and b. - */ - function multiply$4(a, b, dst) { - dst = dst || newMat3(); - const a00 = a[0]; - const a01 = a[1]; - const a02 = a[2]; - const a10 = a[4 + 0]; - const a11 = a[4 + 1]; - const a12 = a[4 + 2]; - const a20 = a[8 + 0]; - const a21 = a[8 + 1]; - const a22 = a[8 + 2]; - const b00 = b[0]; - const b01 = b[1]; - const b02 = b[2]; - const b10 = b[4 + 0]; - const b11 = b[4 + 1]; - const b12 = b[4 + 2]; - const b20 = b[8 + 0]; - const b21 = b[8 + 1]; - const b22 = b[8 + 2]; - dst[0] = a00 * b00 + a10 * b01 + a20 * b02; - dst[1] = a01 * b00 + a11 * b01 + a21 * b02; - dst[2] = a02 * b00 + a12 * b01 + a22 * b02; - dst[4] = a00 * b10 + a10 * b11 + a20 * b12; - dst[5] = a01 * b10 + a11 * b11 + a21 * b12; - dst[6] = a02 * b10 + a12 * b11 + a22 * b12; - dst[8] = a00 * b20 + a10 * b21 + a20 * b22; - dst[9] = a01 * b20 + a11 * b21 + a21 * b22; - dst[10] = a02 * b20 + a12 * b21 + a22 * b22; - return dst; - } - /** - * Multiplies two 3-by-3 matrices with a on the left and b on the right (same as multiply) - * @param a - The matrix on the left. - * @param b - The matrix on the right. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The matrix product of a and b. - */ - const mul$4 = multiply$4; - /** - * Sets the translation component of a 3-by-3 matrix to the given - * vector. - * @param a - The matrix. - * @param v - The vector. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The matrix with translation set. - */ - function setTranslation$1(a, v, dst) { - dst = dst || identity$2(); - if (a !== dst) { - dst[0] = a[0]; - dst[1] = a[1]; - dst[2] = a[2]; - dst[4] = a[4]; - dst[5] = a[5]; - dst[6] = a[6]; - } - dst[8] = v[0]; - dst[9] = v[1]; - dst[10] = 1; - return dst; - } - /** - * Returns the translation component of a 3-by-3 matrix as a vector with 3 - * entries. - * @param m - The matrix. - * @param dst - vector to hold result. If not passed a new one is created. - * @returns The translation component of m. - */ - function getTranslation$2(m, dst) { - dst = dst || create$5(); - dst[0] = m[8]; - dst[1] = m[9]; - return dst; - } - /** - * Returns an axis of a 3x3 matrix as a vector with 2 entries - * @param m - The matrix. - * @param axis - The axis 0 = x, 1 = y, - * @returns The axis component of m. - */ - function getAxis$2(m, axis, dst) { - dst = dst || create$5(); - const off = axis * 4; - dst[0] = m[off + 0]; - dst[1] = m[off + 1]; - return dst; - } - /** - * Sets an axis of a 3x3 matrix as a vector with 2 entries - * @param m - The matrix. - * @param v - the axis vector - * @param axis - The axis 0 = x, 1 = y; - * @param dst - The matrix to set. If not passed a new one is created. - * @returns The matrix with axis set. - */ - function setAxis$1(m, v, axis, dst) { - if (dst !== m) { - dst = copy$4(m, dst); - } - const off = axis * 4; - dst[off + 0] = v[0]; - dst[off + 1] = v[1]; - return dst; - } - /** - * Returns the scaling component of the matrix - * @param m - The Matrix - * @param dst - The vector to set. If not passed a new one is created. - */ - function getScaling$2(m, dst) { - dst = dst || create$5(); - const xx = m[0]; - const xy = m[1]; - const yx = m[4]; - const yy = m[5]; - dst[0] = Math.sqrt(xx * xx + xy * xy); - dst[1] = Math.sqrt(yx * yx + yy * yy); - return dst; - } - /** - * Creates a 3-by-3 matrix which translates by the given vector v. - * @param v - The vector by which to translate. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The translation matrix. - */ - function translation$1(v, dst) { - dst = dst || newMat3(); - dst[0] = 1; - dst[1] = 0; - dst[2] = 0; - dst[4] = 0; - dst[5] = 1; - dst[6] = 0; - dst[8] = v[0]; - dst[9] = v[1]; - dst[10] = 1; - return dst; - } - /** - * Translates the given 3-by-3 matrix by the given vector v. - * @param m - The matrix. - * @param v - The vector by which to translate. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The translated matrix. - */ - function translate$1(m, v, dst) { - dst = dst || newMat3(); - const v0 = v[0]; - const v1 = v[1]; - const m00 = m[0]; - const m01 = m[1]; - const m02 = m[2]; - const m10 = m[1 * 4 + 0]; - const m11 = m[1 * 4 + 1]; - const m12 = m[1 * 4 + 2]; - const m20 = m[2 * 4 + 0]; - const m21 = m[2 * 4 + 1]; - const m22 = m[2 * 4 + 2]; - if (m !== dst) { - dst[0] = m00; - dst[1] = m01; - dst[2] = m02; - dst[4] = m10; - dst[5] = m11; - dst[6] = m12; - } - dst[8] = m00 * v0 + m10 * v1 + m20; - dst[9] = m01 * v0 + m11 * v1 + m21; - dst[10] = m02 * v0 + m12 * v1 + m22; - return dst; - } - /** - * Creates a 3-by-3 matrix which rotates by the given angle. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotation matrix. - */ - function rotation$1(angleInRadians, dst) { - dst = dst || newMat3(); - const c = Math.cos(angleInRadians); - const s = Math.sin(angleInRadians); - dst[0] = c; - dst[1] = s; - dst[2] = 0; - dst[4] = -s; - dst[5] = c; - dst[6] = 0; - dst[8] = 0; - dst[9] = 0; - dst[10] = 1; - return dst; - } - /** - * Rotates the given 3-by-3 matrix by the given angle. - * @param m - The matrix. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotated matrix. - */ - function rotate$1(m, angleInRadians, dst) { - dst = dst || newMat3(); - const m00 = m[0 * 4 + 0]; - const m01 = m[0 * 4 + 1]; - const m02 = m[0 * 4 + 2]; - const m10 = m[1 * 4 + 0]; - const m11 = m[1 * 4 + 1]; - const m12 = m[1 * 4 + 2]; - const c = Math.cos(angleInRadians); - const s = Math.sin(angleInRadians); - dst[0] = c * m00 + s * m10; - dst[1] = c * m01 + s * m11; - dst[2] = c * m02 + s * m12; - dst[4] = c * m10 - s * m00; - dst[5] = c * m11 - s * m01; - dst[6] = c * m12 - s * m02; - if (m !== dst) { - dst[8] = m[8]; - dst[9] = m[9]; - dst[10] = m[10]; - } - return dst; - } - /** - * Creates a 3-by-3 matrix which scales in each dimension by an amount given by - * the corresponding entry in the given vector; assumes the vector has three - * entries. - * @param v - A vector of - * 2 entries specifying the factor by which to scale in each dimension. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The scaling matrix. - */ - function scaling$1(v, dst) { - dst = dst || newMat3(); - dst[0] = v[0]; - dst[1] = 0; - dst[2] = 0; - dst[4] = 0; - dst[5] = v[1]; - dst[6] = 0; - dst[8] = 0; - dst[9] = 0; - dst[10] = 1; - return dst; - } - /** - * Scales the given 3-by-3 matrix in each dimension by an amount - * given by the corresponding entry in the given vector; assumes the vector has - * three entries. - * @param m - The matrix to be modified. - * @param v - A vector of 2 entries specifying the - * factor by which to scale in each dimension. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The scaled matrix. - */ - function scale$4(m, v, dst) { - dst = dst || newMat3(); - const v0 = v[0]; - const v1 = v[1]; - dst[0] = v0 * m[0 * 4 + 0]; - dst[1] = v0 * m[0 * 4 + 1]; - dst[2] = v0 * m[0 * 4 + 2]; - dst[4] = v1 * m[1 * 4 + 0]; - dst[5] = v1 * m[1 * 4 + 1]; - dst[6] = v1 * m[1 * 4 + 2]; - if (m !== dst) { - dst[8] = m[8]; - dst[9] = m[9]; - dst[10] = m[10]; - } - return dst; - } - /** - * Creates a 3-by-3 matrix which scales uniformly in each dimension - * @param s - Amount to scale - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The scaling matrix. - */ - function uniformScaling$1(s, dst) { - dst = dst || newMat3(); - dst[0] = s; - dst[1] = 0; - dst[2] = 0; - dst[4] = 0; - dst[5] = s; - dst[6] = 0; - dst[8] = 0; - dst[9] = 0; - dst[10] = 1; - return dst; - } - /** - * Scales the given 3-by-3 matrix in each dimension by an amount - * given. - * @param m - The matrix to be modified. - * @param s - Amount to scale. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The scaled matrix. - */ - function uniformScale$1(m, s, dst) { - dst = dst || newMat3(); - dst[0] = s * m[0 * 4 + 0]; - dst[1] = s * m[0 * 4 + 1]; - dst[2] = s * m[0 * 4 + 2]; - dst[4] = s * m[1 * 4 + 0]; - dst[5] = s * m[1 * 4 + 1]; - dst[6] = s * m[1 * 4 + 2]; - if (m !== dst) { - dst[8] = m[8]; - dst[9] = m[9]; - dst[10] = m[10]; - } - return dst; - } - - var mat3Impl = /*#__PURE__*/Object.freeze({ - __proto__: null, - setDefaultType: setDefaultType$4, - create: create$3, - set: set$4, - fromMat4: fromMat4, - fromQuat: fromQuat$1, - negate: negate$3, - copy: copy$4, - clone: clone$4, - equalsApproximately: equalsApproximately$4, - equals: equals$4, - identity: identity$2, - transpose: transpose$1, - inverse: inverse$4, - determinant: determinant$1, - invert: invert$3, - multiply: multiply$4, - mul: mul$4, - setTranslation: setTranslation$1, - getTranslation: getTranslation$2, - getAxis: getAxis$2, - setAxis: setAxis$1, - getScaling: getScaling$2, - translation: translation$1, - translate: translate$1, - rotation: rotation$1, - rotate: rotate$1, - scaling: scaling$1, - scale: scale$4, - uniformScaling: uniformScaling$1, - uniformScale: uniformScale$1 - }); - - /* - * Copyright 2022 Gregg Tavares - * - * 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. - */ - /** - * Creates a vec3; may be called with x, y, z to set initial values. (same as create) - * @param x - Initial x value. - * @param y - Initial y value. - * @param z - Initial z value. - * @returns the created vector - */ - const fromValues$2 = create$4; - /** - * Sets the values of a Vec3 - * Also see {@link vec3.create} and {@link vec3.copy} - * - * @param x first value - * @param y second value - * @param z third value - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector with its elements set. - */ - function set$3(x, y, z, dst) { - dst = dst || new VecType$1(3); - dst[0] = x; - dst[1] = y; - dst[2] = z; - return dst; - } - /** - * Applies Math.ceil to each element of vector - * @param v - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the ceil of each element of v. - */ - function ceil$1(v, dst) { - dst = dst || new VecType$1(3); - dst[0] = Math.ceil(v[0]); - dst[1] = Math.ceil(v[1]); - dst[2] = Math.ceil(v[2]); - return dst; - } - /** - * Applies Math.floor to each element of vector - * @param v - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the floor of each element of v. - */ - function floor$1(v, dst) { - dst = dst || new VecType$1(3); - dst[0] = Math.floor(v[0]); - dst[1] = Math.floor(v[1]); - dst[2] = Math.floor(v[2]); - return dst; - } - /** - * Applies Math.round to each element of vector - * @param v - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the round of each element of v. - */ - function round$1(v, dst) { - dst = dst || new VecType$1(3); - dst[0] = Math.round(v[0]); - dst[1] = Math.round(v[1]); - dst[2] = Math.round(v[2]); - return dst; - } - /** - * Clamp each element of vector between min and max - * @param v - Operand vector. - * @param max - Min value, default 0 - * @param min - Max value, default 1 - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that the clamped value of each element of v. - */ - function clamp$1(v, min = 0, max = 1, dst) { - dst = dst || new VecType$1(3); - dst[0] = Math.min(max, Math.max(min, v[0])); - dst[1] = Math.min(max, Math.max(min, v[1])); - dst[2] = Math.min(max, Math.max(min, v[2])); - return dst; - } - /** - * Adds two vectors; assumes a and b have the same dimension. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the sum of a and b. - */ - function add$2(a, b, dst) { - dst = dst || new VecType$1(3); - dst[0] = a[0] + b[0]; - dst[1] = a[1] + b[1]; - dst[2] = a[2] + b[2]; - return dst; - } - /** - * Adds two vectors, scaling the 2nd; assumes a and b have the same dimension. - * @param a - Operand vector. - * @param b - Operand vector. - * @param scale - Amount to scale b - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the sum of a + b * scale. - */ - function addScaled$1(a, b, scale, dst) { - dst = dst || new VecType$1(3); - dst[0] = a[0] + b[0] * scale; - dst[1] = a[1] + b[1] * scale; - dst[2] = a[2] + b[2] * scale; - return dst; - } - /** - * Returns the angle in radians between two vectors. - * @param a - Operand vector. - * @param b - Operand vector. - * @returns The angle in radians between the 2 vectors. - */ - function angle$1(a, b) { - const ax = a[0]; - const ay = a[1]; - const az = a[2]; - const bx = a[0]; - const by = a[1]; - const bz = a[2]; - const mag1 = Math.sqrt(ax * ax + ay * ay + az * az); - const mag2 = Math.sqrt(bx * bx + by * by + bz * bz); - const mag = mag1 * mag2; - const cosine = mag && dot$2(a, b) / mag; - return Math.acos(cosine); - } - /** - * Subtracts two vectors. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the difference of a and b. - */ - function subtract$2(a, b, dst) { - dst = dst || new VecType$1(3); - dst[0] = a[0] - b[0]; - dst[1] = a[1] - b[1]; - dst[2] = a[2] - b[2]; - return dst; - } - /** - * Subtracts two vectors. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the difference of a and b. - */ - const sub$2 = subtract$2; - /** - * Check if 2 vectors are approximately equal - * @param a - Operand vector. - * @param b - Operand vector. - * @returns true if vectors are approximately equal - */ - function equalsApproximately$3(a, b) { - return Math.abs(a[0] - b[0]) < EPSILON && - Math.abs(a[1] - b[1]) < EPSILON && - Math.abs(a[2] - b[2]) < EPSILON; - } - /** - * Check if 2 vectors are exactly equal - * @param a - Operand vector. - * @param b - Operand vector. - * @returns true if vectors are exactly equal - */ - function equals$3(a, b) { - return a[0] === b[0] && a[1] === b[1] && a[2] === b[2]; - } - /** - * Performs linear interpolation on two vectors. - * Given vectors a and b and interpolation coefficient t, returns - * a + t * (b - a). - * @param a - Operand vector. - * @param b - Operand vector. - * @param t - Interpolation coefficient. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The linear interpolated result. - */ - function lerp$2(a, b, t, dst) { - dst = dst || new VecType$1(3); - dst[0] = a[0] + t * (b[0] - a[0]); - dst[1] = a[1] + t * (b[1] - a[1]); - dst[2] = a[2] + t * (b[2] - a[2]); - return dst; - } - /** - * Performs linear interpolation on two vectors. - * Given vectors a and b and interpolation coefficient vector t, returns - * a + t * (b - a). - * @param a - Operand vector. - * @param b - Operand vector. - * @param t - Interpolation coefficients vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns the linear interpolated result. - */ - function lerpV$1(a, b, t, dst) { - dst = dst || new VecType$1(3); - dst[0] = a[0] + t[0] * (b[0] - a[0]); - dst[1] = a[1] + t[1] * (b[1] - a[1]); - dst[2] = a[2] + t[2] * (b[2] - a[2]); - return dst; - } - /** - * Return max values of two vectors. - * Given vectors a and b returns - * [max(a[0], b[0]), max(a[1], b[1]), max(a[2], b[2])]. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The max components vector. - */ - function max$1(a, b, dst) { - dst = dst || new VecType$1(3); - dst[0] = Math.max(a[0], b[0]); - dst[1] = Math.max(a[1], b[1]); - dst[2] = Math.max(a[2], b[2]); - return dst; - } - /** - * Return min values of two vectors. - * Given vectors a and b returns - * [min(a[0], b[0]), min(a[1], b[1]), min(a[2], b[2])]. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The min components vector. - */ - function min$1(a, b, dst) { - dst = dst || new VecType$1(3); - dst[0] = Math.min(a[0], b[0]); - dst[1] = Math.min(a[1], b[1]); - dst[2] = Math.min(a[2], b[2]); - return dst; - } - /** - * Multiplies a vector by a scalar. - * @param v - The vector. - * @param k - The scalar. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The scaled vector. - */ - function mulScalar$2(v, k, dst) { - dst = dst || new VecType$1(3); - dst[0] = v[0] * k; - dst[1] = v[1] * k; - dst[2] = v[2] * k; - return dst; - } - /** - * Multiplies a vector by a scalar. (same as mulScalar) - * @param v - The vector. - * @param k - The scalar. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The scaled vector. - */ - const scale$3 = mulScalar$2; - /** - * Divides a vector by a scalar. - * @param v - The vector. - * @param k - The scalar. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The scaled vector. - */ - function divScalar$2(v, k, dst) { - dst = dst || new VecType$1(3); - dst[0] = v[0] / k; - dst[1] = v[1] / k; - dst[2] = v[2] / k; - return dst; - } - /** - * Inverse a vector. - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The inverted vector. - */ - function inverse$3(v, dst) { - dst = dst || new VecType$1(3); - dst[0] = 1 / v[0]; - dst[1] = 1 / v[1]; - dst[2] = 1 / v[2]; - return dst; - } - /** - * Invert a vector. (same as inverse) - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The inverted vector. - */ - const invert$2 = inverse$3; - /** - * Computes the cross product of two vectors; assumes both vectors have - * three entries. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of a cross b. - */ - function cross(a, b, dst) { - dst = dst || new VecType$1(3); - const t1 = a[2] * b[0] - a[0] * b[2]; - const t2 = a[0] * b[1] - a[1] * b[0]; - dst[0] = a[1] * b[2] - a[2] * b[1]; - dst[1] = t1; - dst[2] = t2; - return dst; - } - /** - * Computes the dot product of two vectors; assumes both vectors have - * three entries. - * @param a - Operand vector. - * @param b - Operand vector. - * @returns dot product - */ - function dot$2(a, b) { - return (a[0] * b[0]) + (a[1] * b[1]) + (a[2] * b[2]); - } - /** - * Computes the length of vector - * @param v - vector. - * @returns length of vector. - */ - function length$2(v) { - const v0 = v[0]; - const v1 = v[1]; - const v2 = v[2]; - return Math.sqrt(v0 * v0 + v1 * v1 + v2 * v2); - } - /** - * Computes the length of vector (same as length) - * @param v - vector. - * @returns length of vector. - */ - const len$2 = length$2; - /** - * Computes the square of the length of vector - * @param v - vector. - * @returns square of the length of vector. - */ - function lengthSq$2(v) { - const v0 = v[0]; - const v1 = v[1]; - const v2 = v[2]; - return v0 * v0 + v1 * v1 + v2 * v2; - } - /** - * Computes the square of the length of vector (same as lengthSq) - * @param v - vector. - * @returns square of the length of vector. - */ - const lenSq$2 = lengthSq$2; - /** - * Computes the distance between 2 points - * @param a - vector. - * @param b - vector. - * @returns distance between a and b - */ - function distance$1(a, b) { - const dx = a[0] - b[0]; - const dy = a[1] - b[1]; - const dz = a[2] - b[2]; - return Math.sqrt(dx * dx + dy * dy + dz * dz); - } - /** - * Computes the distance between 2 points (same as distance) - * @param a - vector. - * @param b - vector. - * @returns distance between a and b - */ - const dist$1 = distance$1; - /** - * Computes the square of the distance between 2 points - * @param a - vector. - * @param b - vector. - * @returns square of the distance between a and b - */ - function distanceSq$1(a, b) { - const dx = a[0] - b[0]; - const dy = a[1] - b[1]; - const dz = a[2] - b[2]; - return dx * dx + dy * dy + dz * dz; - } - /** - * Computes the square of the distance between 2 points (same as distanceSq) - * @param a - vector. - * @param b - vector. - * @returns square of the distance between a and b - */ - const distSq$1 = distanceSq$1; - /** - * Divides a vector by its Euclidean length and returns the quotient. - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The normalized vector. - */ - function normalize$2(v, dst) { - dst = dst || new VecType$1(3); - const v0 = v[0]; - const v1 = v[1]; - const v2 = v[2]; - const len = Math.sqrt(v0 * v0 + v1 * v1 + v2 * v2); - if (len > 0.00001) { - dst[0] = v0 / len; - dst[1] = v1 / len; - dst[2] = v2 / len; - } - else { - dst[0] = 0; - dst[1] = 0; - dst[2] = 0; - } - return dst; - } - /** - * Negates a vector. - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns -v. - */ - function negate$2(v, dst) { - dst = dst || new VecType$1(3); - dst[0] = -v[0]; - dst[1] = -v[1]; - dst[2] = -v[2]; - return dst; - } - /** - * Copies a vector. (same as {@link vec3.clone}) - * Also see {@link vec3.create} and {@link vec3.set} - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A copy of v. - */ - function copy$3(v, dst) { - dst = dst || new VecType$1(3); - dst[0] = v[0]; - dst[1] = v[1]; - dst[2] = v[2]; - return dst; - } - /** - * Clones a vector. (same as {@link vec3.copy}) - * Also see {@link vec3.create} and {@link vec3.set} - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A copy of v. - */ - const clone$3 = copy$3; - /** - * Multiplies a vector by another vector (component-wise); assumes a and - * b have the same length. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of products of entries of a and b. - */ - function multiply$3(a, b, dst) { - dst = dst || new VecType$1(3); - dst[0] = a[0] * b[0]; - dst[1] = a[1] * b[1]; - dst[2] = a[2] * b[2]; - return dst; - } - /** - * Multiplies a vector by another vector (component-wise); assumes a and - * b have the same length. (same as mul) - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of products of entries of a and b. - */ - const mul$3 = multiply$3; - /** - * Divides a vector by another vector (component-wise); assumes a and - * b have the same length. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of quotients of entries of a and b. - */ - function divide$1(a, b, dst) { - dst = dst || new VecType$1(3); - dst[0] = a[0] / b[0]; - dst[1] = a[1] / b[1]; - dst[2] = a[2] / b[2]; - return dst; - } - /** - * Divides a vector by another vector (component-wise); assumes a and - * b have the same length. (same as divide) - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of quotients of entries of a and b. - */ - const div$1 = divide$1; - /** - * Creates a random vector - * @param scale - Default 1 - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The random vector. - */ - function random(scale = 1, dst) { - dst = dst || new VecType$1(3); - const angle = Math.random() * 2 * Math.PI; - const z = Math.random() * 2 - 1; - const zScale = Math.sqrt(1 - z * z) * scale; - dst[0] = Math.cos(angle) * zScale; - dst[1] = Math.sin(angle) * zScale; - dst[2] = z * scale; - return dst; - } - /** - * Zero's a vector - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The zeroed vector. - */ - function zero$1(dst) { - dst = dst || new VecType$1(3); - dst[0] = 0; - dst[1] = 0; - dst[2] = 0; - return dst; - } - /** - * transform vec3 by 4x4 matrix - * @param v - the vector - * @param m - The matrix. - * @param dst - optional vec3 to store result. If not passed a new one is created. - * @returns the transformed vector - */ - function transformMat4$1(v, m, dst) { - dst = dst || new VecType$1(3); - const x = v[0]; - const y = v[1]; - const z = v[2]; - const w = (m[3] * x + m[7] * y + m[11] * z + m[15]) || 1; - dst[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w; - dst[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w; - dst[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w; - return dst; - } - /** - * Transform vec4 by upper 3x3 matrix inside 4x4 matrix. - * @param v - The direction. - * @param m - The matrix. - * @param dst - optional Vec3 to store result. If not passed a new one is created. - * @returns The transformed vector. - */ - function transformMat4Upper3x3(v, m, dst) { - dst = dst || new VecType$1(3); - const v0 = v[0]; - const v1 = v[1]; - const v2 = v[2]; - dst[0] = v0 * m[0 * 4 + 0] + v1 * m[1 * 4 + 0] + v2 * m[2 * 4 + 0]; - dst[1] = v0 * m[0 * 4 + 1] + v1 * m[1 * 4 + 1] + v2 * m[2 * 4 + 1]; - dst[2] = v0 * m[0 * 4 + 2] + v1 * m[1 * 4 + 2] + v2 * m[2 * 4 + 2]; - return dst; - } - /** - * Transforms vec3 by 3x3 matrix - * - * @param v - the vector - * @param m - The matrix. - * @param dst - optional vec3 to store result. If not passed a new one is created. - * @returns the transformed vector - */ - function transformMat3(v, m, dst) { - dst = dst || new VecType$1(3); - const x = v[0]; - const y = v[1]; - const z = v[2]; - dst[0] = x * m[0] + y * m[4] + z * m[8]; - dst[1] = x * m[1] + y * m[5] + z * m[9]; - dst[2] = x * m[2] + y * m[6] + z * m[10]; - return dst; - } - /** - * Transforms vec3 by Quaternion - * @param v - the vector to transform - * @param q - the quaternion to transform by - * @param dst - optional vec3 to store result. If not passed a new one is created. - * @returns the transformed - */ - function transformQuat(v, q, dst) { - dst = dst || new VecType$1(3); - const qx = q[0]; - const qy = q[1]; - const qz = q[2]; - const w2 = q[3] * 2; - const x = v[0]; - const y = v[1]; - const z = v[2]; - const uvX = qy * z - qz * y; - const uvY = qz * x - qx * z; - const uvZ = qx * y - qy * x; - dst[0] = x + uvX * w2 + (qy * uvZ - qz * uvY) * 2; - dst[1] = y + uvY * w2 + (qz * uvX - qx * uvZ) * 2; - dst[2] = z + uvZ * w2 + (qx * uvY - qy * uvX) * 2; - return dst; - } - /** - * Returns the translation component of a 4-by-4 matrix as a vector with 3 - * entries. - * @param m - The matrix. - * @param dst - vector to hold result. If not passed a new one is created. - * @returns The translation component of m. - */ - function getTranslation$1(m, dst) { - dst = dst || new VecType$1(3); - dst[0] = m[12]; - dst[1] = m[13]; - dst[2] = m[14]; - return dst; - } - /** - * Returns an axis of a 4x4 matrix as a vector with 3 entries - * @param m - The matrix. - * @param axis - The axis 0 = x, 1 = y, 2 = z; - * @returns The axis component of m. - */ - function getAxis$1(m, axis, dst) { - dst = dst || new VecType$1(3); - const off = axis * 4; - dst[0] = m[off + 0]; - dst[1] = m[off + 1]; - dst[2] = m[off + 2]; - return dst; - } - /** - * Returns the scaling component of the matrix - * @param m - The Matrix - * @param dst - The vector to set. If not passed a new one is created. - */ - function getScaling$1(m, dst) { - dst = dst || new VecType$1(3); - const xx = m[0]; - const xy = m[1]; - const xz = m[2]; - const yx = m[4]; - const yy = m[5]; - const yz = m[6]; - const zx = m[8]; - const zy = m[9]; - const zz = m[10]; - dst[0] = Math.sqrt(xx * xx + xy * xy + xz * xz); - dst[1] = Math.sqrt(yx * yx + yy * yy + yz * yz); - dst[2] = Math.sqrt(zx * zx + zy * zy + zz * zz); - return dst; - } - - var vec3Impl = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create$4, - setDefaultType: setDefaultType$5, - fromValues: fromValues$2, - set: set$3, - ceil: ceil$1, - floor: floor$1, - round: round$1, - clamp: clamp$1, - add: add$2, - addScaled: addScaled$1, - angle: angle$1, - subtract: subtract$2, - sub: sub$2, - equalsApproximately: equalsApproximately$3, - equals: equals$3, - lerp: lerp$2, - lerpV: lerpV$1, - max: max$1, - min: min$1, - mulScalar: mulScalar$2, - scale: scale$3, - divScalar: divScalar$2, - inverse: inverse$3, - invert: invert$2, - cross: cross, - dot: dot$2, - length: length$2, - len: len$2, - lengthSq: lengthSq$2, - lenSq: lenSq$2, - distance: distance$1, - dist: dist$1, - distanceSq: distanceSq$1, - distSq: distSq$1, - normalize: normalize$2, - negate: negate$2, - copy: copy$3, - clone: clone$3, - multiply: multiply$3, - mul: mul$3, - divide: divide$1, - div: div$1, - random: random, - zero: zero$1, - transformMat4: transformMat4$1, - transformMat4Upper3x3: transformMat4Upper3x3, - transformMat3: transformMat3, - transformQuat: transformQuat, - getTranslation: getTranslation$1, - getAxis: getAxis$1, - getScaling: getScaling$1 - }); - - /** - * 4x4 Matrix math math functions. - * - * Almost all functions take an optional `dst` argument. If it is not passed in the - * functions will create a new matrix. In other words you can do this - * - * const mat = mat4.translation([1, 2, 3]); // Creates a new translation matrix - * - * or - * - * const mat = mat4.create(); - * mat4.translation([1, 2, 3], mat); // Puts translation matrix in mat. - * - * The first style is often easier but depending on where it's used it generates garbage where - * as there is almost never allocation with the second style. - * - * It is always save to pass any matrix as the destination. So for example - * - * const mat = mat4.identity(); - * const trans = mat4.translation([1, 2, 3]); - * mat4.multiply(mat, trans, mat); // Multiplies mat * trans and puts result in mat. - * - */ - let MatType = Float32Array; - /** - * Sets the type this library creates for a Mat4 - * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array` - * @returns previous constructor for Mat4 - */ - function setDefaultType$3(ctor) { - const oldType = MatType; - MatType = ctor; - return oldType; - } - /** - * Create a Mat4 from values - * - * Note: Since passing in a raw JavaScript array - * is valid in all circumstances, if you want to - * force a JavaScript array into a Mat4's specified type - * it would be faster to use - * - * ``` - * const m = mat4.clone(someJSArray); - * ``` - * - * Note: a consequence of the implementation is if your Mat4Type = `Array` - * instead of `Float32Array` or `Float64Array` then any values you - * don't pass in will be undefined. Usually this is not an issue since - * (a) using `Array` is rare and (b) using `mat4.create` is usually used - * to create a Mat4 to be filled out as in - * - * ``` - * const m = mat4.create(); - * mat4.perspective(fov, aspect, near, far, m); - * ``` - * - * @param v0 - value for element 0 - * @param v1 - value for element 1 - * @param v2 - value for element 2 - * @param v3 - value for element 3 - * @param v4 - value for element 4 - * @param v5 - value for element 5 - * @param v6 - value for element 6 - * @param v7 - value for element 7 - * @param v8 - value for element 8 - * @param v9 - value for element 9 - * @param v10 - value for element 10 - * @param v11 - value for element 11 - * @param v12 - value for element 12 - * @param v13 - value for element 13 - * @param v14 - value for element 14 - * @param v15 - value for element 15 - * @returns created from values. - */ - function create$2(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) { - const dst = new MatType(16); - if (v0 !== undefined) { - dst[0] = v0; - if (v1 !== undefined) { - dst[1] = v1; - if (v2 !== undefined) { - dst[2] = v2; - if (v3 !== undefined) { - dst[3] = v3; - if (v4 !== undefined) { - dst[4] = v4; - if (v5 !== undefined) { - dst[5] = v5; - if (v6 !== undefined) { - dst[6] = v6; - if (v7 !== undefined) { - dst[7] = v7; - if (v8 !== undefined) { - dst[8] = v8; - if (v9 !== undefined) { - dst[9] = v9; - if (v10 !== undefined) { - dst[10] = v10; - if (v11 !== undefined) { - dst[11] = v11; - if (v12 !== undefined) { - dst[12] = v12; - if (v13 !== undefined) { - dst[13] = v13; - if (v14 !== undefined) { - dst[14] = v14; - if (v15 !== undefined) { - dst[15] = v15; - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - return dst; - } - /** - * Sets the values of a Mat4 - * Also see {@link mat4.create} and {@link mat4.copy} - * - * @param v0 - value for element 0 - * @param v1 - value for element 1 - * @param v2 - value for element 2 - * @param v3 - value for element 3 - * @param v4 - value for element 4 - * @param v5 - value for element 5 - * @param v6 - value for element 6 - * @param v7 - value for element 7 - * @param v8 - value for element 8 - * @param v9 - value for element 9 - * @param v10 - value for element 10 - * @param v11 - value for element 11 - * @param v12 - value for element 12 - * @param v13 - value for element 13 - * @param v14 - value for element 14 - * @param v15 - value for element 15 - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns Mat4 created from values. - */ - function set$2(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, dst) { - dst = dst || new MatType(16); - dst[0] = v0; - dst[1] = v1; - dst[2] = v2; - dst[3] = v3; - dst[4] = v4; - dst[5] = v5; - dst[6] = v6; - dst[7] = v7; - dst[8] = v8; - dst[9] = v9; - dst[10] = v10; - dst[11] = v11; - dst[12] = v12; - dst[13] = v13; - dst[14] = v14; - dst[15] = v15; - return dst; - } - /** - * Creates a Mat4 from a Mat3 - * @param m3 - source matrix - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns Mat4 made from m3 - */ - function fromMat3(m3, dst) { - dst = dst || new MatType(16); - dst[0] = m3[0]; - dst[1] = m3[1]; - dst[2] = m3[2]; - dst[3] = 0; - dst[4] = m3[4]; - dst[5] = m3[5]; - dst[6] = m3[6]; - dst[7] = 0; - dst[8] = m3[8]; - dst[9] = m3[9]; - dst[10] = m3[10]; - dst[11] = 0; - dst[12] = 0; - dst[13] = 0; - dst[14] = 0; - dst[15] = 1; - return dst; - } - /** - * Creates a Mat4 rotation matrix from a quaternion - * @param q - quaternion to create matrix from - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns Mat4 made from q - */ - function fromQuat(q, dst) { - dst = dst || new MatType(16); - const x = q[0]; - const y = q[1]; - const z = q[2]; - const w = q[3]; - const x2 = x + x; - const y2 = y + y; - const z2 = z + z; - const xx = x * x2; - const yx = y * x2; - const yy = y * y2; - const zx = z * x2; - const zy = z * y2; - const zz = z * z2; - const wx = w * x2; - const wy = w * y2; - const wz = w * z2; - dst[0] = 1 - yy - zz; - dst[1] = yx + wz; - dst[2] = zx - wy; - dst[3] = 0; - dst[4] = yx - wz; - dst[5] = 1 - xx - zz; - dst[6] = zy + wx; - dst[7] = 0; - dst[8] = zx + wy; - dst[9] = zy - wx; - dst[10] = 1 - xx - yy; - dst[11] = 0; - dst[12] = 0; - dst[13] = 0; - dst[14] = 0; - dst[15] = 1; - return dst; - } - /** - * Negates a matrix. - * @param m - The matrix. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns -m. - */ - function negate$1(m, dst) { - dst = dst || new MatType(16); - dst[0] = -m[0]; - dst[1] = -m[1]; - dst[2] = -m[2]; - dst[3] = -m[3]; - dst[4] = -m[4]; - dst[5] = -m[5]; - dst[6] = -m[6]; - dst[7] = -m[7]; - dst[8] = -m[8]; - dst[9] = -m[9]; - dst[10] = -m[10]; - dst[11] = -m[11]; - dst[12] = -m[12]; - dst[13] = -m[13]; - dst[14] = -m[14]; - dst[15] = -m[15]; - return dst; - } - /** - * Copies a matrix. (same as {@link mat4.clone}) - * Also see {@link mat4.create} and {@link mat4.set} - * @param m - The matrix. - * @param dst - The matrix. If not passed a new one is created. - * @returns A copy of m. - */ - function copy$2(m, dst) { - dst = dst || new MatType(16); - dst[0] = m[0]; - dst[1] = m[1]; - dst[2] = m[2]; - dst[3] = m[3]; - dst[4] = m[4]; - dst[5] = m[5]; - dst[6] = m[6]; - dst[7] = m[7]; - dst[8] = m[8]; - dst[9] = m[9]; - dst[10] = m[10]; - dst[11] = m[11]; - dst[12] = m[12]; - dst[13] = m[13]; - dst[14] = m[14]; - dst[15] = m[15]; - return dst; - } - /** - * Copies a matrix (same as {@link mat4.copy}) - * Also see {@link mat4.create} and {@link mat4.set} - * @param m - The matrix. - * @param dst - The matrix. If not passed a new one is created. - * @returns A copy of m. - */ - const clone$2 = copy$2; - /** - * Check if 2 matrices are approximately equal - * @param a - Operand matrix. - * @param b - Operand matrix. - * @returns true if matrices are approximately equal - */ - function equalsApproximately$2(a, b) { - return Math.abs(a[0] - b[0]) < EPSILON && - Math.abs(a[1] - b[1]) < EPSILON && - Math.abs(a[2] - b[2]) < EPSILON && - Math.abs(a[3] - b[3]) < EPSILON && - Math.abs(a[4] - b[4]) < EPSILON && - Math.abs(a[5] - b[5]) < EPSILON && - Math.abs(a[6] - b[6]) < EPSILON && - Math.abs(a[7] - b[7]) < EPSILON && - Math.abs(a[8] - b[8]) < EPSILON && - Math.abs(a[9] - b[9]) < EPSILON && - Math.abs(a[10] - b[10]) < EPSILON && - Math.abs(a[11] - b[11]) < EPSILON && - Math.abs(a[12] - b[12]) < EPSILON && - Math.abs(a[13] - b[13]) < EPSILON && - Math.abs(a[14] - b[14]) < EPSILON && - Math.abs(a[15] - b[15]) < EPSILON; - } - /** - * Check if 2 matrices are exactly equal - * @param a - Operand matrix. - * @param b - Operand matrix. - * @returns true if matrices are exactly equal - */ - function equals$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] && - 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]; - } - /** - * Creates a 4-by-4 identity matrix. - * - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns A 4-by-4 identity matrix. - */ - function identity$1(dst) { - dst = dst || new MatType(16); - dst[0] = 1; - dst[1] = 0; - dst[2] = 0; - dst[3] = 0; - dst[4] = 0; - dst[5] = 1; - dst[6] = 0; - dst[7] = 0; - dst[8] = 0; - dst[9] = 0; - dst[10] = 1; - dst[11] = 0; - dst[12] = 0; - dst[13] = 0; - dst[14] = 0; - dst[15] = 1; - return dst; - } - /** - * Takes the transpose of a matrix. - * @param m - The matrix. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The transpose of m. - */ - function transpose(m, dst) { - dst = dst || new MatType(16); - if (dst === m) { - let t; - t = m[1]; - m[1] = m[4]; - m[4] = t; - t = m[2]; - m[2] = m[8]; - m[8] = t; - t = m[3]; - m[3] = m[12]; - m[12] = t; - t = m[6]; - m[6] = m[9]; - m[9] = t; - t = m[7]; - m[7] = m[13]; - m[13] = t; - t = m[11]; - m[11] = m[14]; - m[14] = t; - return dst; - } - const m00 = m[0 * 4 + 0]; - const m01 = m[0 * 4 + 1]; - const m02 = m[0 * 4 + 2]; - const m03 = m[0 * 4 + 3]; - const m10 = m[1 * 4 + 0]; - const m11 = m[1 * 4 + 1]; - const m12 = m[1 * 4 + 2]; - const m13 = m[1 * 4 + 3]; - const m20 = m[2 * 4 + 0]; - const m21 = m[2 * 4 + 1]; - const m22 = m[2 * 4 + 2]; - const m23 = m[2 * 4 + 3]; - const m30 = m[3 * 4 + 0]; - const m31 = m[3 * 4 + 1]; - const m32 = m[3 * 4 + 2]; - const m33 = m[3 * 4 + 3]; - dst[0] = m00; - dst[1] = m10; - dst[2] = m20; - dst[3] = m30; - dst[4] = m01; - dst[5] = m11; - dst[6] = m21; - dst[7] = m31; - dst[8] = m02; - dst[9] = m12; - dst[10] = m22; - dst[11] = m32; - dst[12] = m03; - dst[13] = m13; - dst[14] = m23; - dst[15] = m33; - return dst; - } - /** - * Computes the inverse of a 4-by-4 matrix. - * @param m - The matrix. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The inverse of m. - */ - function inverse$2(m, dst) { - dst = dst || new MatType(16); - const m00 = m[0 * 4 + 0]; - const m01 = m[0 * 4 + 1]; - const m02 = m[0 * 4 + 2]; - const m03 = m[0 * 4 + 3]; - const m10 = m[1 * 4 + 0]; - const m11 = m[1 * 4 + 1]; - const m12 = m[1 * 4 + 2]; - const m13 = m[1 * 4 + 3]; - const m20 = m[2 * 4 + 0]; - const m21 = m[2 * 4 + 1]; - const m22 = m[2 * 4 + 2]; - const m23 = m[2 * 4 + 3]; - const m30 = m[3 * 4 + 0]; - const m31 = m[3 * 4 + 1]; - const m32 = m[3 * 4 + 2]; - const m33 = m[3 * 4 + 3]; - const tmp0 = m22 * m33; - const tmp1 = m32 * m23; - const tmp2 = m12 * m33; - const tmp3 = m32 * m13; - const tmp4 = m12 * m23; - const tmp5 = m22 * m13; - const tmp6 = m02 * m33; - const tmp7 = m32 * m03; - const tmp8 = m02 * m23; - const tmp9 = m22 * m03; - const tmp10 = m02 * m13; - const tmp11 = m12 * m03; - const tmp12 = m20 * m31; - const tmp13 = m30 * m21; - const tmp14 = m10 * m31; - const tmp15 = m30 * m11; - const tmp16 = m10 * m21; - const tmp17 = m20 * m11; - const tmp18 = m00 * m31; - const tmp19 = m30 * m01; - const tmp20 = m00 * m21; - const tmp21 = m20 * m01; - const tmp22 = m00 * m11; - const tmp23 = m10 * m01; - const t0 = (tmp0 * m11 + tmp3 * m21 + tmp4 * m31) - - (tmp1 * m11 + tmp2 * m21 + tmp5 * m31); - const t1 = (tmp1 * m01 + tmp6 * m21 + tmp9 * m31) - - (tmp0 * m01 + tmp7 * m21 + tmp8 * m31); - const t2 = (tmp2 * m01 + tmp7 * m11 + tmp10 * m31) - - (tmp3 * m01 + tmp6 * m11 + tmp11 * m31); - const t3 = (tmp5 * m01 + tmp8 * m11 + tmp11 * m21) - - (tmp4 * m01 + tmp9 * m11 + tmp10 * m21); - const d = 1 / (m00 * t0 + m10 * t1 + m20 * t2 + m30 * t3); - dst[0] = d * t0; - dst[1] = d * t1; - dst[2] = d * t2; - dst[3] = d * t3; - dst[4] = d * ((tmp1 * m10 + tmp2 * m20 + tmp5 * m30) - - (tmp0 * m10 + tmp3 * m20 + tmp4 * m30)); - dst[5] = d * ((tmp0 * m00 + tmp7 * m20 + tmp8 * m30) - - (tmp1 * m00 + tmp6 * m20 + tmp9 * m30)); - dst[6] = d * ((tmp3 * m00 + tmp6 * m10 + tmp11 * m30) - - (tmp2 * m00 + tmp7 * m10 + tmp10 * m30)); - dst[7] = d * ((tmp4 * m00 + tmp9 * m10 + tmp10 * m20) - - (tmp5 * m00 + tmp8 * m10 + tmp11 * m20)); - dst[8] = d * ((tmp12 * m13 + tmp15 * m23 + tmp16 * m33) - - (tmp13 * m13 + tmp14 * m23 + tmp17 * m33)); - dst[9] = d * ((tmp13 * m03 + tmp18 * m23 + tmp21 * m33) - - (tmp12 * m03 + tmp19 * m23 + tmp20 * m33)); - dst[10] = d * ((tmp14 * m03 + tmp19 * m13 + tmp22 * m33) - - (tmp15 * m03 + tmp18 * m13 + tmp23 * m33)); - dst[11] = d * ((tmp17 * m03 + tmp20 * m13 + tmp23 * m23) - - (tmp16 * m03 + tmp21 * m13 + tmp22 * m23)); - dst[12] = d * ((tmp14 * m22 + tmp17 * m32 + tmp13 * m12) - - (tmp16 * m32 + tmp12 * m12 + tmp15 * m22)); - dst[13] = d * ((tmp20 * m32 + tmp12 * m02 + tmp19 * m22) - - (tmp18 * m22 + tmp21 * m32 + tmp13 * m02)); - dst[14] = d * ((tmp18 * m12 + tmp23 * m32 + tmp15 * m02) - - (tmp22 * m32 + tmp14 * m02 + tmp19 * m12)); - dst[15] = d * ((tmp22 * m22 + tmp16 * m02 + tmp21 * m12) - - (tmp20 * m12 + tmp23 * m22 + tmp17 * m02)); - return dst; - } - /** - * Compute the determinant of a matrix - * @param m - the matrix - * @returns the determinant - */ - function determinant(m) { - const m00 = m[0 * 4 + 0]; - const m01 = m[0 * 4 + 1]; - const m02 = m[0 * 4 + 2]; - const m03 = m[0 * 4 + 3]; - const m10 = m[1 * 4 + 0]; - const m11 = m[1 * 4 + 1]; - const m12 = m[1 * 4 + 2]; - const m13 = m[1 * 4 + 3]; - const m20 = m[2 * 4 + 0]; - const m21 = m[2 * 4 + 1]; - const m22 = m[2 * 4 + 2]; - const m23 = m[2 * 4 + 3]; - const m30 = m[3 * 4 + 0]; - const m31 = m[3 * 4 + 1]; - const m32 = m[3 * 4 + 2]; - const m33 = m[3 * 4 + 3]; - const tmp0 = m22 * m33; - const tmp1 = m32 * m23; - const tmp2 = m12 * m33; - const tmp3 = m32 * m13; - const tmp4 = m12 * m23; - const tmp5 = m22 * m13; - const tmp6 = m02 * m33; - const tmp7 = m32 * m03; - const tmp8 = m02 * m23; - const tmp9 = m22 * m03; - const tmp10 = m02 * m13; - const tmp11 = m12 * m03; - const t0 = (tmp0 * m11 + tmp3 * m21 + tmp4 * m31) - - (tmp1 * m11 + tmp2 * m21 + tmp5 * m31); - const t1 = (tmp1 * m01 + tmp6 * m21 + tmp9 * m31) - - (tmp0 * m01 + tmp7 * m21 + tmp8 * m31); - const t2 = (tmp2 * m01 + tmp7 * m11 + tmp10 * m31) - - (tmp3 * m01 + tmp6 * m11 + tmp11 * m31); - const t3 = (tmp5 * m01 + tmp8 * m11 + tmp11 * m21) - - (tmp4 * m01 + tmp9 * m11 + tmp10 * m21); - return m00 * t0 + m10 * t1 + m20 * t2 + m30 * t3; - } - /** - * Computes the inverse of a 4-by-4 matrix. (same as inverse) - * @param m - The matrix. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The inverse of m. - */ - const invert$1 = inverse$2; - /** - * Multiplies two 4-by-4 matrices with a on the left and b on the right - * @param a - The matrix on the left. - * @param b - The matrix on the right. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The matrix product of a and b. - */ - function multiply$2(a, b, dst) { - dst = dst || new MatType(16); - const a00 = a[0]; - const a01 = a[1]; - const a02 = a[2]; - const a03 = a[3]; - const a10 = a[4 + 0]; - const a11 = a[4 + 1]; - const a12 = a[4 + 2]; - const a13 = a[4 + 3]; - const a20 = a[8 + 0]; - const a21 = a[8 + 1]; - const a22 = a[8 + 2]; - const a23 = a[8 + 3]; - const a30 = a[12 + 0]; - const a31 = a[12 + 1]; - const a32 = a[12 + 2]; - const a33 = a[12 + 3]; - const b00 = b[0]; - const b01 = b[1]; - const b02 = b[2]; - const b03 = b[3]; - const b10 = b[4 + 0]; - const b11 = b[4 + 1]; - const b12 = b[4 + 2]; - const b13 = b[4 + 3]; - const b20 = b[8 + 0]; - const b21 = b[8 + 1]; - const b22 = b[8 + 2]; - const b23 = b[8 + 3]; - const b30 = b[12 + 0]; - const b31 = b[12 + 1]; - const b32 = b[12 + 2]; - const b33 = b[12 + 3]; - dst[0] = a00 * b00 + a10 * b01 + a20 * b02 + a30 * b03; - dst[1] = a01 * b00 + a11 * b01 + a21 * b02 + a31 * b03; - dst[2] = a02 * b00 + a12 * b01 + a22 * b02 + a32 * b03; - dst[3] = a03 * b00 + a13 * b01 + a23 * b02 + a33 * b03; - dst[4] = a00 * b10 + a10 * b11 + a20 * b12 + a30 * b13; - dst[5] = a01 * b10 + a11 * b11 + a21 * b12 + a31 * b13; - dst[6] = a02 * b10 + a12 * b11 + a22 * b12 + a32 * b13; - dst[7] = a03 * b10 + a13 * b11 + a23 * b12 + a33 * b13; - dst[8] = a00 * b20 + a10 * b21 + a20 * b22 + a30 * b23; - dst[9] = a01 * b20 + a11 * b21 + a21 * b22 + a31 * b23; - dst[10] = a02 * b20 + a12 * b21 + a22 * b22 + a32 * b23; - dst[11] = a03 * b20 + a13 * b21 + a23 * b22 + a33 * b23; - dst[12] = a00 * b30 + a10 * b31 + a20 * b32 + a30 * b33; - dst[13] = a01 * b30 + a11 * b31 + a21 * b32 + a31 * b33; - dst[14] = a02 * b30 + a12 * b31 + a22 * b32 + a32 * b33; - dst[15] = a03 * b30 + a13 * b31 + a23 * b32 + a33 * b33; - return dst; - } - /** - * Multiplies two 4-by-4 matrices with a on the left and b on the right (same as multiply) - * @param a - The matrix on the left. - * @param b - The matrix on the right. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The matrix product of a and b. - */ - const mul$2 = multiply$2; - /** - * Sets the translation component of a 4-by-4 matrix to the given - * vector. - * @param a - The matrix. - * @param v - The vector. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The matrix with translation set. - */ - function setTranslation(a, v, dst) { - dst = dst || identity$1(); - if (a !== dst) { - dst[0] = a[0]; - dst[1] = a[1]; - dst[2] = a[2]; - dst[3] = a[3]; - dst[4] = a[4]; - dst[5] = a[5]; - dst[6] = a[6]; - dst[7] = a[7]; - dst[8] = a[8]; - dst[9] = a[9]; - dst[10] = a[10]; - dst[11] = a[11]; - } - dst[12] = v[0]; - dst[13] = v[1]; - dst[14] = v[2]; - dst[15] = 1; - return dst; - } - /** - * Returns the translation component of a 4-by-4 matrix as a vector with 3 - * entries. - * @param m - The matrix. - * @param dst - vector to hold result. If not passed a new one is created. - * @returns The translation component of m. - */ - function getTranslation(m, dst) { - dst = dst || create$4(); - dst[0] = m[12]; - dst[1] = m[13]; - dst[2] = m[14]; - return dst; - } - /** - * Returns an axis of a 4x4 matrix as a vector with 3 entries - * @param m - The matrix. - * @param axis - The axis 0 = x, 1 = y, 2 = z; - * @returns The axis component of m. - */ - function getAxis(m, axis, dst) { - dst = dst || create$4(); - const off = axis * 4; - dst[0] = m[off + 0]; - dst[1] = m[off + 1]; - dst[2] = m[off + 2]; - return dst; - } - /** - * Sets an axis of a 4x4 matrix as a vector with 3 entries - * @param m - The matrix. - * @param v - the axis vector - * @param axis - The axis 0 = x, 1 = y, 2 = z; - * @param dst - The matrix to set. If not passed a new one is created. - * @returns The matrix with axis set. - */ - function setAxis(a, v, axis, dst) { - if (dst !== a) { - dst = copy$2(a, dst); - } - const off = axis * 4; - dst[off + 0] = v[0]; - dst[off + 1] = v[1]; - dst[off + 2] = v[2]; - return dst; - } - /** - * Returns the scaling component of the matrix - * @param m - The Matrix - * @param dst - The vector to set. If not passed a new one is created. - */ - function getScaling(m, dst) { - dst = dst || create$4(); - const xx = m[0]; - const xy = m[1]; - const xz = m[2]; - const yx = m[4]; - const yy = m[5]; - const yz = m[6]; - const zx = m[8]; - const zy = m[9]; - const zz = m[10]; - dst[0] = Math.sqrt(xx * xx + xy * xy + xz * xz); - dst[1] = Math.sqrt(yx * yx + yy * yy + yz * yz); - dst[2] = Math.sqrt(zx * zx + zy * zy + zz * zz); - return dst; - } - /** - * Computes a 4-by-4 perspective transformation matrix given the angular height - * of the frustum, the aspect ratio, and the near and far clipping planes. The - * arguments define a frustum extending in the negative z direction. The given - * angle is the vertical angle of the frustum, and the horizontal angle is - * determined to produce the given aspect ratio. The arguments near and far are - * the distances to the near and far clipping planes. Note that near and far - * are not z coordinates, but rather they are distances along the negative - * z-axis. The matrix generated sends the viewing frustum to the unit box. - * We assume a unit box extending from -1 to 1 in the x and y dimensions and - * from 0 to 1 in the z dimension. - * - * Note: If you pass `Infinity` for zFar then it will produce a projection matrix - * returns -Infinity for Z when transforming coordinates with Z <= 0 and +Infinity for Z - * otherwise. - * - * @param fieldOfViewYInRadians - The camera angle from top to bottom (in radians). - * @param aspect - The aspect ratio width / height. - * @param zNear - The depth (negative z coordinate) - * of the near clipping plane. - * @param zFar - The depth (negative z coordinate) - * of the far clipping plane. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The perspective matrix. - */ - function perspective(fieldOfViewYInRadians, aspect, zNear, zFar, dst) { - dst = dst || new MatType(16); - const f = Math.tan(Math.PI * 0.5 - 0.5 * fieldOfViewYInRadians); - dst[0] = f / aspect; - dst[1] = 0; - dst[2] = 0; - dst[3] = 0; - dst[4] = 0; - dst[5] = f; - dst[6] = 0; - dst[7] = 0; - dst[8] = 0; - dst[9] = 0; - dst[11] = -1; - dst[12] = 0; - dst[13] = 0; - dst[15] = 0; - if (zFar === Infinity) { - dst[10] = -1; - dst[14] = -zNear; - } - else { - const rangeInv = 1 / (zNear - zFar); - dst[10] = zFar * rangeInv; - dst[14] = zFar * zNear * rangeInv; - } - return dst; - } - /** - * Computes a 4-by-4 orthogonal transformation matrix that transforms from - * the given the left, right, bottom, and top dimensions to -1 +1 in x, and y - * and 0 to +1 in z. - * @param left - Left side of the near clipping plane viewport. - * @param right - Right side of the near clipping plane viewport. - * @param bottom - Bottom of the near clipping plane viewport. - * @param top - Top of the near clipping plane viewport. - * @param near - The depth (negative z coordinate) - * of the near clipping plane. - * @param far - The depth (negative z coordinate) - * of the far clipping plane. - * @param dst - Output matrix. If not passed a new one is created. - * @returns The orthographic projection matrix. - */ - function ortho(left, right, bottom, top, near, far, dst) { - dst = dst || new MatType(16); - dst[0] = 2 / (right - left); - dst[1] = 0; - dst[2] = 0; - dst[3] = 0; - dst[4] = 0; - dst[5] = 2 / (top - bottom); - dst[6] = 0; - dst[7] = 0; - dst[8] = 0; - dst[9] = 0; - dst[10] = 1 / (near - far); - dst[11] = 0; - dst[12] = (right + left) / (left - right); - dst[13] = (top + bottom) / (bottom - top); - dst[14] = near / (near - far); - dst[15] = 1; - return dst; - } - /** - * Computes a 4-by-4 perspective transformation matrix given the left, right, - * top, bottom, near and far clipping planes. The arguments define a frustum - * extending in the negative z direction. The arguments near and far are the - * distances to the near and far clipping planes. Note that near and far are not - * z coordinates, but rather they are distances along the negative z-axis. The - * matrix generated sends the viewing frustum to the unit box. We assume a unit - * box extending from -1 to 1 in the x and y dimensions and from 0 to 1 in the z - * dimension. - * @param left - The x coordinate of the left plane of the box. - * @param right - The x coordinate of the right plane of the box. - * @param bottom - The y coordinate of the bottom plane of the box. - * @param top - The y coordinate of the right plane of the box. - * @param near - The negative z coordinate of the near plane of the box. - * @param far - The negative z coordinate of the far plane of the box. - * @param dst - Output matrix. If not passed a new one is created. - * @returns The perspective projection matrix. - */ - function frustum(left, right, bottom, top, near, far, dst) { - dst = dst || new MatType(16); - const dx = (right - left); - const dy = (top - bottom); - const dz = (near - far); - dst[0] = 2 * near / dx; - dst[1] = 0; - dst[2] = 0; - dst[3] = 0; - dst[4] = 0; - dst[5] = 2 * near / dy; - dst[6] = 0; - dst[7] = 0; - dst[8] = (left + right) / dx; - dst[9] = (top + bottom) / dy; - dst[10] = far / dz; - dst[11] = -1; - dst[12] = 0; - dst[13] = 0; - dst[14] = near * far / dz; - dst[15] = 0; - return dst; - } - let xAxis; - let yAxis; - let zAxis; - /** - * Computes a 4-by-4 aim transformation. - * - * This is a matrix which positions an object aiming down positive Z. - * toward the target. - * - * Note: this is **NOT** the inverse of lookAt as lookAt looks at negative Z. - * - * @param position - The position of the object. - * @param target - The position meant to be aimed at. - * @param up - A vector pointing up. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The aim matrix. - */ - function aim(position, target, up, dst) { - dst = dst || new MatType(16); - xAxis = xAxis || create$4(); - yAxis = yAxis || create$4(); - zAxis = zAxis || create$4(); - normalize$2(subtract$2(target, position, zAxis), zAxis); - normalize$2(cross(up, zAxis, xAxis), xAxis); - normalize$2(cross(zAxis, xAxis, yAxis), yAxis); - dst[0] = xAxis[0]; - dst[1] = xAxis[1]; - dst[2] = xAxis[2]; - dst[3] = 0; - dst[4] = yAxis[0]; - dst[5] = yAxis[1]; - dst[6] = yAxis[2]; - dst[7] = 0; - dst[8] = zAxis[0]; - dst[9] = zAxis[1]; - dst[10] = zAxis[2]; - dst[11] = 0; - dst[12] = position[0]; - dst[13] = position[1]; - dst[14] = position[2]; - dst[15] = 1; - return dst; - } - /** - * Computes a 4-by-4 camera aim transformation. - * - * This is a matrix which positions an object aiming down negative Z. - * toward the target. - * - * Note: this is the inverse of `lookAt` - * - * @param eye - The position of the object. - * @param target - The position meant to be aimed at. - * @param up - A vector pointing up. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The aim matrix. - */ - function cameraAim(eye, target, up, dst) { - dst = dst || new MatType(16); - xAxis = xAxis || create$4(); - yAxis = yAxis || create$4(); - zAxis = zAxis || create$4(); - normalize$2(subtract$2(eye, target, zAxis), zAxis); - normalize$2(cross(up, zAxis, xAxis), xAxis); - normalize$2(cross(zAxis, xAxis, yAxis), yAxis); - dst[0] = xAxis[0]; - dst[1] = xAxis[1]; - dst[2] = xAxis[2]; - dst[3] = 0; - dst[4] = yAxis[0]; - dst[5] = yAxis[1]; - dst[6] = yAxis[2]; - dst[7] = 0; - dst[8] = zAxis[0]; - dst[9] = zAxis[1]; - dst[10] = zAxis[2]; - dst[11] = 0; - dst[12] = eye[0]; - dst[13] = eye[1]; - dst[14] = eye[2]; - dst[15] = 1; - return dst; - } - /** - * Computes a 4-by-4 view transformation. - * - * This is a view matrix which transforms all other objects - * to be in the space of the view defined by the parameters. - * - * @param eye - The position of the object. - * @param target - The position meant to be aimed at. - * @param up - A vector pointing up. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The look-at matrix. - */ - function lookAt(eye, target, up, dst) { - dst = dst || new MatType(16); - xAxis = xAxis || create$4(); - yAxis = yAxis || create$4(); - zAxis = zAxis || create$4(); - normalize$2(subtract$2(eye, target, zAxis), zAxis); - normalize$2(cross(up, zAxis, xAxis), xAxis); - normalize$2(cross(zAxis, xAxis, yAxis), yAxis); - dst[0] = xAxis[0]; - dst[1] = yAxis[0]; - dst[2] = zAxis[0]; - dst[3] = 0; - dst[4] = xAxis[1]; - dst[5] = yAxis[1]; - dst[6] = zAxis[1]; - dst[7] = 0; - dst[8] = xAxis[2]; - dst[9] = yAxis[2]; - dst[10] = zAxis[2]; - dst[11] = 0; - dst[12] = -(xAxis[0] * eye[0] + xAxis[1] * eye[1] + xAxis[2] * eye[2]); - dst[13] = -(yAxis[0] * eye[0] + yAxis[1] * eye[1] + yAxis[2] * eye[2]); - dst[14] = -(zAxis[0] * eye[0] + zAxis[1] * eye[1] + zAxis[2] * eye[2]); - dst[15] = 1; - return dst; - } - /** - * Creates a 4-by-4 matrix which translates by the given vector v. - * @param v - The vector by - * which to translate. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The translation matrix. - */ - function translation(v, dst) { - dst = dst || new MatType(16); - dst[0] = 1; - dst[1] = 0; - dst[2] = 0; - dst[3] = 0; - dst[4] = 0; - dst[5] = 1; - dst[6] = 0; - dst[7] = 0; - dst[8] = 0; - dst[9] = 0; - dst[10] = 1; - dst[11] = 0; - dst[12] = v[0]; - dst[13] = v[1]; - dst[14] = v[2]; - dst[15] = 1; - return dst; - } - /** - * Translates the given 4-by-4 matrix by the given vector v. - * @param m - The matrix. - * @param v - The vector by - * which to translate. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The translated matrix. - */ - function translate(m, v, dst) { - dst = dst || new MatType(16); - const v0 = v[0]; - const v1 = v[1]; - const v2 = v[2]; - const m00 = m[0]; - const m01 = m[1]; - const m02 = m[2]; - const m03 = m[3]; - const m10 = m[1 * 4 + 0]; - const m11 = m[1 * 4 + 1]; - const m12 = m[1 * 4 + 2]; - const m13 = m[1 * 4 + 3]; - const m20 = m[2 * 4 + 0]; - const m21 = m[2 * 4 + 1]; - const m22 = m[2 * 4 + 2]; - const m23 = m[2 * 4 + 3]; - const m30 = m[3 * 4 + 0]; - const m31 = m[3 * 4 + 1]; - const m32 = m[3 * 4 + 2]; - const m33 = m[3 * 4 + 3]; - if (m !== dst) { - dst[0] = m00; - dst[1] = m01; - dst[2] = m02; - dst[3] = m03; - dst[4] = m10; - dst[5] = m11; - dst[6] = m12; - dst[7] = m13; - dst[8] = m20; - dst[9] = m21; - dst[10] = m22; - dst[11] = m23; - } - dst[12] = m00 * v0 + m10 * v1 + m20 * v2 + m30; - dst[13] = m01 * v0 + m11 * v1 + m21 * v2 + m31; - dst[14] = m02 * v0 + m12 * v1 + m22 * v2 + m32; - dst[15] = m03 * v0 + m13 * v1 + m23 * v2 + m33; - return dst; - } - /** - * Creates a 4-by-4 matrix which rotates around the x-axis by the given angle. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotation matrix. - */ - function rotationX(angleInRadians, dst) { - dst = dst || new MatType(16); - const c = Math.cos(angleInRadians); - const s = Math.sin(angleInRadians); - dst[0] = 1; - dst[1] = 0; - dst[2] = 0; - dst[3] = 0; - dst[4] = 0; - dst[5] = c; - dst[6] = s; - dst[7] = 0; - dst[8] = 0; - dst[9] = -s; - dst[10] = c; - dst[11] = 0; - dst[12] = 0; - dst[13] = 0; - dst[14] = 0; - dst[15] = 1; - return dst; - } - /** - * Rotates the given 4-by-4 matrix around the x-axis by the given - * angle. - * @param m - The matrix. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotated matrix. - */ - function rotateX$1(m, angleInRadians, dst) { - dst = dst || new MatType(16); - const m10 = m[4]; - const m11 = m[5]; - const m12 = m[6]; - const m13 = m[7]; - const m20 = m[8]; - const m21 = m[9]; - const m22 = m[10]; - const m23 = m[11]; - const c = Math.cos(angleInRadians); - const s = Math.sin(angleInRadians); - dst[4] = c * m10 + s * m20; - dst[5] = c * m11 + s * m21; - dst[6] = c * m12 + s * m22; - dst[7] = c * m13 + s * m23; - dst[8] = c * m20 - s * m10; - dst[9] = c * m21 - s * m11; - dst[10] = c * m22 - s * m12; - dst[11] = c * m23 - s * m13; - if (m !== dst) { - dst[0] = m[0]; - dst[1] = m[1]; - dst[2] = m[2]; - dst[3] = m[3]; - dst[12] = m[12]; - dst[13] = m[13]; - dst[14] = m[14]; - dst[15] = m[15]; - } - return dst; - } - /** - * Creates a 4-by-4 matrix which rotates around the y-axis by the given angle. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotation matrix. - */ - function rotationY(angleInRadians, dst) { - dst = dst || new MatType(16); - const c = Math.cos(angleInRadians); - const s = Math.sin(angleInRadians); - dst[0] = c; - dst[1] = 0; - dst[2] = -s; - dst[3] = 0; - dst[4] = 0; - dst[5] = 1; - dst[6] = 0; - dst[7] = 0; - dst[8] = s; - dst[9] = 0; - dst[10] = c; - dst[11] = 0; - dst[12] = 0; - dst[13] = 0; - dst[14] = 0; - dst[15] = 1; - return dst; - } - /** - * Rotates the given 4-by-4 matrix around the y-axis by the given - * angle. - * @param m - The matrix. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotated matrix. - */ - function rotateY$1(m, angleInRadians, dst) { - dst = dst || new MatType(16); - const m00 = m[0 * 4 + 0]; - const m01 = m[0 * 4 + 1]; - const m02 = m[0 * 4 + 2]; - const m03 = m[0 * 4 + 3]; - const m20 = m[2 * 4 + 0]; - const m21 = m[2 * 4 + 1]; - const m22 = m[2 * 4 + 2]; - const m23 = m[2 * 4 + 3]; - const c = Math.cos(angleInRadians); - const s = Math.sin(angleInRadians); - dst[0] = c * m00 - s * m20; - dst[1] = c * m01 - s * m21; - dst[2] = c * m02 - s * m22; - dst[3] = c * m03 - s * m23; - dst[8] = c * m20 + s * m00; - dst[9] = c * m21 + s * m01; - dst[10] = c * m22 + s * m02; - dst[11] = c * m23 + s * m03; - if (m !== dst) { - dst[4] = m[4]; - dst[5] = m[5]; - dst[6] = m[6]; - dst[7] = m[7]; - dst[12] = m[12]; - dst[13] = m[13]; - dst[14] = m[14]; - dst[15] = m[15]; - } - return dst; - } - /** - * Creates a 4-by-4 matrix which rotates around the z-axis by the given angle. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotation matrix. - */ - function rotationZ(angleInRadians, dst) { - dst = dst || new MatType(16); - const c = Math.cos(angleInRadians); - const s = Math.sin(angleInRadians); - dst[0] = c; - dst[1] = s; - dst[2] = 0; - dst[3] = 0; - dst[4] = -s; - dst[5] = c; - dst[6] = 0; - dst[7] = 0; - dst[8] = 0; - dst[9] = 0; - dst[10] = 1; - dst[11] = 0; - dst[12] = 0; - dst[13] = 0; - dst[14] = 0; - dst[15] = 1; - return dst; - } - /** - * Rotates the given 4-by-4 matrix around the z-axis by the given - * angle. - * @param m - The matrix. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotated matrix. - */ - function rotateZ$1(m, angleInRadians, dst) { - dst = dst || new MatType(16); - const m00 = m[0 * 4 + 0]; - const m01 = m[0 * 4 + 1]; - const m02 = m[0 * 4 + 2]; - const m03 = m[0 * 4 + 3]; - const m10 = m[1 * 4 + 0]; - const m11 = m[1 * 4 + 1]; - const m12 = m[1 * 4 + 2]; - const m13 = m[1 * 4 + 3]; - const c = Math.cos(angleInRadians); - const s = Math.sin(angleInRadians); - dst[0] = c * m00 + s * m10; - dst[1] = c * m01 + s * m11; - dst[2] = c * m02 + s * m12; - dst[3] = c * m03 + s * m13; - dst[4] = c * m10 - s * m00; - dst[5] = c * m11 - s * m01; - dst[6] = c * m12 - s * m02; - dst[7] = c * m13 - s * m03; - if (m !== dst) { - dst[8] = m[8]; - dst[9] = m[9]; - dst[10] = m[10]; - dst[11] = m[11]; - dst[12] = m[12]; - dst[13] = m[13]; - dst[14] = m[14]; - dst[15] = m[15]; - } - return dst; - } - /** - * Creates a 4-by-4 matrix which rotates around the given axis by the given - * angle. - * @param axis - The axis - * about which to rotate. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns A matrix which rotates angle radians - * around the axis. - */ - function axisRotation(axis, angleInRadians, dst) { - dst = dst || new MatType(16); - let x = axis[0]; - let y = axis[1]; - let z = axis[2]; - const n = Math.sqrt(x * x + y * y + z * z); - x /= n; - y /= n; - z /= n; - const xx = x * x; - const yy = y * y; - const zz = z * z; - const c = Math.cos(angleInRadians); - const s = Math.sin(angleInRadians); - const oneMinusCosine = 1 - c; - dst[0] = xx + (1 - xx) * c; - dst[1] = x * y * oneMinusCosine + z * s; - dst[2] = x * z * oneMinusCosine - y * s; - dst[3] = 0; - dst[4] = x * y * oneMinusCosine - z * s; - dst[5] = yy + (1 - yy) * c; - dst[6] = y * z * oneMinusCosine + x * s; - dst[7] = 0; - dst[8] = x * z * oneMinusCosine + y * s; - dst[9] = y * z * oneMinusCosine - x * s; - dst[10] = zz + (1 - zz) * c; - dst[11] = 0; - dst[12] = 0; - dst[13] = 0; - dst[14] = 0; - dst[15] = 1; - return dst; - } - /** - * Creates a 4-by-4 matrix which rotates around the given axis by the given - * angle. (same as axisRotation) - * @param axis - The axis - * about which to rotate. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns A matrix which rotates angle radians - * around the axis. - */ - const rotation = axisRotation; - /** - * Rotates the given 4-by-4 matrix around the given axis by the - * given angle. - * @param m - The matrix. - * @param axis - The axis - * about which to rotate. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotated matrix. - */ - function axisRotate(m, axis, angleInRadians, dst) { - dst = dst || new MatType(16); - let x = axis[0]; - let y = axis[1]; - let z = axis[2]; - const n = Math.sqrt(x * x + y * y + z * z); - x /= n; - y /= n; - z /= n; - const xx = x * x; - const yy = y * y; - const zz = z * z; - const c = Math.cos(angleInRadians); - const s = Math.sin(angleInRadians); - const oneMinusCosine = 1 - c; - const r00 = xx + (1 - xx) * c; - const r01 = x * y * oneMinusCosine + z * s; - const r02 = x * z * oneMinusCosine - y * s; - const r10 = x * y * oneMinusCosine - z * s; - const r11 = yy + (1 - yy) * c; - const r12 = y * z * oneMinusCosine + x * s; - const r20 = x * z * oneMinusCosine + y * s; - const r21 = y * z * oneMinusCosine - x * s; - const r22 = zz + (1 - zz) * c; - const m00 = m[0]; - const m01 = m[1]; - const m02 = m[2]; - const m03 = m[3]; - const m10 = m[4]; - const m11 = m[5]; - const m12 = m[6]; - const m13 = m[7]; - const m20 = m[8]; - const m21 = m[9]; - const m22 = m[10]; - const m23 = m[11]; - dst[0] = r00 * m00 + r01 * m10 + r02 * m20; - dst[1] = r00 * m01 + r01 * m11 + r02 * m21; - dst[2] = r00 * m02 + r01 * m12 + r02 * m22; - dst[3] = r00 * m03 + r01 * m13 + r02 * m23; - dst[4] = r10 * m00 + r11 * m10 + r12 * m20; - dst[5] = r10 * m01 + r11 * m11 + r12 * m21; - dst[6] = r10 * m02 + r11 * m12 + r12 * m22; - dst[7] = r10 * m03 + r11 * m13 + r12 * m23; - dst[8] = r20 * m00 + r21 * m10 + r22 * m20; - dst[9] = r20 * m01 + r21 * m11 + r22 * m21; - dst[10] = r20 * m02 + r21 * m12 + r22 * m22; - dst[11] = r20 * m03 + r21 * m13 + r22 * m23; - if (m !== dst) { - dst[12] = m[12]; - dst[13] = m[13]; - dst[14] = m[14]; - dst[15] = m[15]; - } - return dst; - } - /** - * Rotates the given 4-by-4 matrix around the given axis by the - * given angle. (same as rotate) - * @param m - The matrix. - * @param axis - The axis - * about which to rotate. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotated matrix. - */ - const rotate = axisRotate; - /** - * Creates a 4-by-4 matrix which scales in each dimension by an amount given by - * the corresponding entry in the given vector; assumes the vector has three - * entries. - * @param v - A vector of - * three entries specifying the factor by which to scale in each dimension. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The scaling matrix. - */ - function scaling(v, dst) { - dst = dst || new MatType(16); - dst[0] = v[0]; - dst[1] = 0; - dst[2] = 0; - dst[3] = 0; - dst[4] = 0; - dst[5] = v[1]; - dst[6] = 0; - dst[7] = 0; - dst[8] = 0; - dst[9] = 0; - dst[10] = v[2]; - dst[11] = 0; - dst[12] = 0; - dst[13] = 0; - dst[14] = 0; - dst[15] = 1; - return dst; - } - /** - * Scales the given 4-by-4 matrix in each dimension by an amount - * given by the corresponding entry in the given vector; assumes the vector has - * three entries. - * @param m - The matrix to be modified. - * @param v - A vector of three entries specifying the - * factor by which to scale in each dimension. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The scaled matrix. - */ - function scale$2(m, v, dst) { - dst = dst || new MatType(16); - const v0 = v[0]; - const v1 = v[1]; - const v2 = v[2]; - dst[0] = v0 * m[0 * 4 + 0]; - dst[1] = v0 * m[0 * 4 + 1]; - dst[2] = v0 * m[0 * 4 + 2]; - dst[3] = v0 * m[0 * 4 + 3]; - dst[4] = v1 * m[1 * 4 + 0]; - dst[5] = v1 * m[1 * 4 + 1]; - dst[6] = v1 * m[1 * 4 + 2]; - dst[7] = v1 * m[1 * 4 + 3]; - dst[8] = v2 * m[2 * 4 + 0]; - dst[9] = v2 * m[2 * 4 + 1]; - dst[10] = v2 * m[2 * 4 + 2]; - dst[11] = v2 * m[2 * 4 + 3]; - if (m !== dst) { - dst[12] = m[12]; - dst[13] = m[13]; - dst[14] = m[14]; - dst[15] = m[15]; - } - return dst; - } - /** - * Creates a 4-by-4 matrix which scales a uniform amount in each dimension. - * @param s - the amount to scale - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The scaling matrix. - */ - function uniformScaling(s, dst) { - dst = dst || new MatType(16); - dst[0] = s; - dst[1] = 0; - dst[2] = 0; - dst[3] = 0; - dst[4] = 0; - dst[5] = s; - dst[6] = 0; - dst[7] = 0; - dst[8] = 0; - dst[9] = 0; - dst[10] = s; - dst[11] = 0; - dst[12] = 0; - dst[13] = 0; - dst[14] = 0; - dst[15] = 1; - return dst; - } - /** - * Scales the given 4-by-4 matrix in each dimension by a uniform scale. - * @param m - The matrix to be modified. - * @param s - The amount to scale. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The scaled matrix. - */ - function uniformScale(m, s, dst) { - dst = dst || new MatType(16); - dst[0] = s * m[0 * 4 + 0]; - dst[1] = s * m[0 * 4 + 1]; - dst[2] = s * m[0 * 4 + 2]; - dst[3] = s * m[0 * 4 + 3]; - dst[4] = s * m[1 * 4 + 0]; - dst[5] = s * m[1 * 4 + 1]; - dst[6] = s * m[1 * 4 + 2]; - dst[7] = s * m[1 * 4 + 3]; - dst[8] = s * m[2 * 4 + 0]; - dst[9] = s * m[2 * 4 + 1]; - dst[10] = s * m[2 * 4 + 2]; - dst[11] = s * m[2 * 4 + 3]; - if (m !== dst) { - dst[12] = m[12]; - dst[13] = m[13]; - dst[14] = m[14]; - dst[15] = m[15]; - } - return dst; - } - - var mat4Impl = /*#__PURE__*/Object.freeze({ - __proto__: null, - setDefaultType: setDefaultType$3, - create: create$2, - set: set$2, - fromMat3: fromMat3, - fromQuat: fromQuat, - negate: negate$1, - copy: copy$2, - clone: clone$2, - equalsApproximately: equalsApproximately$2, - equals: equals$2, - identity: identity$1, - transpose: transpose, - inverse: inverse$2, - determinant: determinant, - invert: invert$1, - multiply: multiply$2, - mul: mul$2, - setTranslation: setTranslation, - getTranslation: getTranslation, - getAxis: getAxis, - setAxis: setAxis, - getScaling: getScaling, - perspective: perspective, - ortho: ortho, - frustum: frustum, - aim: aim, - cameraAim: cameraAim, - lookAt: lookAt, - translation: translation, - translate: translate, - rotationX: rotationX, - rotateX: rotateX$1, - rotationY: rotationY, - rotateY: rotateY$1, - rotationZ: rotationZ, - rotateZ: rotateZ$1, - axisRotation: axisRotation, - rotation: rotation, - axisRotate: axisRotate, - rotate: rotate, - scaling: scaling, - scale: scale$2, - uniformScaling: uniformScaling, - uniformScale: uniformScale - }); - - /* - * Copyright 2022 Gregg Tavares - * - * 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. - */ - /** - * - * Quat4 math functions. - * - * Almost all functions take an optional `dst` argument. If it is not passed in the - * functions will create a new `Quat4`. In other words you can do this - * - * const v = quat4.cross(v1, v2); // Creates a new Quat4 with the cross product of v1 x v2. - * - * or - * - * const v = quat4.create(); - * quat4.cross(v1, v2, v); // Puts the cross product of v1 x v2 in v - * - * The first style is often easier but depending on where it's used it generates garbage where - * as there is almost never allocation with the second style. - * - * It is always safe to pass any vector as the destination. So for example - * - * quat4.cross(v1, v2, v1); // Puts the cross product of v1 x v2 in v1 - * - */ - let QuatType = Float32Array; - /** - * Sets the type this library creates for a Quat4 - * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array` - * @returns previous constructor for Quat4 - */ - function setDefaultType$2(ctor) { - const oldType = QuatType; - QuatType = ctor; - return oldType; - } - /** - * Creates a quat4; may be called with x, y, z to set initial values. - * @param x - Initial x value. - * @param y - Initial y value. - * @param z - Initial z value. - * @param w - Initial w value. - * @returns the created vector - */ - function create$1(x, y, z, w) { - const dst = new QuatType(4); - if (x !== undefined) { - dst[0] = x; - if (y !== undefined) { - dst[1] = y; - if (z !== undefined) { - dst[2] = z; - if (w !== undefined) { - dst[3] = w; - } - } - } - } - return dst; - } - - /* - * Copyright 2022 Gregg Tavares - * - * 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. - */ - /** - * Creates a Quat; may be called with x, y, z to set initial values. (same as create) - * @param x - Initial x value. - * @param y - Initial y value. - * @param z - Initial z value. - * @param z - Initial w value. - * @returns the created vector - */ - const fromValues$1 = create$1; - /** - * Sets the values of a Quat - * Also see {@link quat.create} and {@link quat.copy} - * - * @param x first value - * @param y second value - * @param z third value - * @param w fourth value - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector with its elements set. - */ - function set$1(x, y, z, w, dst) { - dst = dst || new QuatType(4); - dst[0] = x; - dst[1] = y; - dst[2] = z; - dst[3] = w; - return dst; - } - /** - * Sets a quaternion from the given angle and axis, - * then returns it. - * - * @param axis - the axis to rotate around - * @param angleInRadians - the angle - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns The quaternion that represents the given axis and angle - **/ - function fromAxisAngle(axis, angleInRadians, dst) { - dst = dst || new QuatType(4); - const halfAngle = angleInRadians * 0.5; - const s = Math.sin(halfAngle); - dst[0] = s * axis[0]; - dst[1] = s * axis[1]; - dst[2] = s * axis[2]; - dst[3] = Math.cos(halfAngle); - return dst; - } - /** - * Gets the rotation axis and angle - * @param q - quaternion to compute from - * @param dst - Vec3 to hold result. If not passed in a new one is created. - * @return angle and axis - */ - function toAxisAngle(q, dst) { - dst = dst || create$4(4); - const angle = Math.acos(q[3]) * 2; - const s = Math.sin(angle * 0.5); - if (s > EPSILON) { - dst[0] = q[0] / s; - dst[1] = q[1] / s; - dst[2] = q[2] / s; - } - else { - dst[0] = 1; - dst[1] = 0; - dst[2] = 0; - } - return { angle, axis: dst }; - } - /** - * Returns the angle in degrees between two rotations a and b. - * @param a - quaternion a - * @param b - quaternion b - * @return angle in radians between the two quaternions - */ - function angle(a, b) { - const d = dot$1(a, b); - return Math.acos(2 * d * d - 1); - } - /** - * Multiplies two quaternions - * - * @param a - the first quaternion - * @param b - the second quaternion - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the result of a * b - */ - function multiply$1(a, b, dst) { - dst = dst || new QuatType(4); - const ax = a[0]; - const ay = a[1]; - const az = a[2]; - const aw = a[3]; - const bx = b[0]; - const by = b[1]; - const bz = b[2]; - const bw = b[3]; - dst[0] = ax * bw + aw * bx + ay * bz - az * by; - dst[1] = ay * bw + aw * by + az * bx - ax * bz; - dst[2] = az * bw + aw * bz + ax * by - ay * bx; - dst[3] = aw * bw - ax * bx - ay * by - az * bz; - return dst; - } - /** - * Multiplies two quaternions - * - * @param a - the first quaternion - * @param b - the second quaternion - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the result of a * b - */ - const mul$1 = multiply$1; - /** - * Rotates the given quaternion around the X axis by the given angle. - * @param q - quaternion to rotate - * @param angleInRadians - The angle by which to rotate - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the result of a * b - */ - function rotateX(q, angleInRadians, dst) { - dst = dst || new QuatType(4); - const halfAngle = angleInRadians * 0.5; - const qx = q[0]; - const qy = q[1]; - const qz = q[2]; - const qw = q[3]; - const bx = Math.sin(halfAngle); - const bw = Math.cos(halfAngle); - dst[0] = qx * bw + qw * bx; - dst[1] = qy * bw + qz * bx; - dst[2] = qz * bw - qy * bx; - dst[3] = qw * bw - qx * bx; - return dst; - } - /** - * Rotates the given quaternion around the Y axis by the given angle. - * @param q - quaternion to rotate - * @param angleInRadians - The angle by which to rotate - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the result of a * b - */ - function rotateY(q, angleInRadians, dst) { - dst = dst || new QuatType(4); - const halfAngle = angleInRadians * 0.5; - const qx = q[0]; - const qy = q[1]; - const qz = q[2]; - const qw = q[3]; - const by = Math.sin(halfAngle); - const bw = Math.cos(halfAngle); - dst[0] = qx * bw - qz * by; - dst[1] = qy * bw + qw * by; - dst[2] = qz * bw + qx * by; - dst[3] = qw * bw - qy * by; - return dst; - } - /** - * Rotates the given quaternion around the Z axis by the given angle. - * @param q - quaternion to rotate - * @param angleInRadians - The angle by which to rotate - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the result of a * b - */ - function rotateZ(q, angleInRadians, dst) { - dst = dst || new QuatType(4); - const halfAngle = angleInRadians * 0.5; - const qx = q[0]; - const qy = q[1]; - const qz = q[2]; - const qw = q[3]; - const bz = Math.sin(halfAngle); - const bw = Math.cos(halfAngle); - dst[0] = qx * bw + qy * bz; - dst[1] = qy * bw - qx * bz; - dst[2] = qz * bw + qw * bz; - dst[3] = qw * bw - qz * bz; - return dst; - } - /** - * Spherically linear interpolate between two quaternions - * - * @param a - starting value - * @param b - ending value - * @param t - value where 0 = a and 1 = b - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the result of a * b - */ - function slerp(a, b, t, dst) { - dst = dst || new QuatType(4); - const ax = a[0]; - const ay = a[1]; - const az = a[2]; - const aw = a[3]; - let bx = b[0]; - let by = b[1]; - let bz = b[2]; - let bw = b[3]; - let cosOmega = ax * bx + ay * by + az * bz + aw * bw; - if (cosOmega < 0) { - cosOmega = -cosOmega; - bx = -bx; - by = -by; - bz = -bz; - bw = -bw; - } - let scale0; - let scale1; - if (1.0 - cosOmega > EPSILON) { - const omega = Math.acos(cosOmega); - const sinOmega = Math.sin(omega); - scale0 = Math.sin((1 - t) * omega) / sinOmega; - scale1 = Math.sin(t * omega) / sinOmega; - } - else { - scale0 = 1.0 - t; - scale1 = t; - } - dst[0] = scale0 * ax + scale1 * bx; - dst[1] = scale0 * ay + scale1 * by; - dst[2] = scale0 * az + scale1 * bz; - dst[3] = scale0 * aw + scale1 * bw; - return dst; - } - /** - * Compute the inverse of a quaternion - * - * @param q - quaternion to compute the inverse of - * @returns A quaternion that is the result of a * b - */ - function inverse$1(q, dst) { - dst = dst || new QuatType(4); - const a0 = q[0]; - const a1 = q[1]; - const a2 = q[2]; - const a3 = q[3]; - const dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3; - const invDot = dot ? 1 / dot : 0; - dst[0] = -a0 * invDot; - dst[1] = -a1 * invDot; - dst[2] = -a2 * invDot; - dst[3] = a3 * invDot; - return dst; - } - /** - * Compute the conjugate of a quaternion - * For quaternions with a magnitude of 1 (a unit quaternion) - * this returns the same as the inverse but is faster to calculate. - * - * @param q - quaternion to compute the conjugate of. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns The conjugate of q - */ - function conjugate(q, dst) { - dst = dst || new QuatType(4); - dst[0] = -q[0]; - dst[1] = -q[1]; - dst[2] = -q[2]; - dst[3] = q[3]; - return dst; - } - /** - * Creates a quaternion from the given rotation matrix. - * - * The created quaternion is not normalized. - * - * @param m - rotation matrix - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns the result - */ - function fromMat(m, dst) { - dst = dst || new QuatType(4); - /* - 0 1 2 - 3 4 5 - 6 7 8 - - 0 1 2 - 4 5 6 - 8 9 10 - */ - // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes - // article "Quaternion Calculus and Fast Animation". - const trace = m[0] + m[5] + m[10]; - if (trace > 0.0) { - // |w| > 1/2, may as well choose w > 1/2 - const root = Math.sqrt(trace + 1); // 2w - dst[3] = 0.5 * root; - const invRoot = 0.5 / root; // 1/(4w) - dst[0] = (m[6] - m[9]) * invRoot; - dst[1] = (m[8] - m[2]) * invRoot; - dst[2] = (m[1] - m[4]) * invRoot; - } - else { - // |w| <= 1/2 - let i = 0; - if (m[5] > m[0]) { - i = 1; - } - if (m[10] > m[i * 4 + i]) { - i = 2; - } - const j = (i + 1) % 3; - const k = (i + 2) % 3; - const root = Math.sqrt(m[i * 4 + i] - m[j * 4 + j] - m[k * 4 + k] + 1.0); - dst[i] = 0.5 * root; - const invRoot = 0.5 / root; - dst[3] = (m[j * 4 + k] - m[k * 4 + j]) * invRoot; - dst[j] = (m[j * 4 + i] + m[i * 4 + j]) * invRoot; - dst[k] = (m[k * 4 + i] + m[i * 4 + k]) * invRoot; - } - return dst; - } - /** - * Creates a quaternion from the given euler angle x, y, z using the provided intrinsic order for the conversion. - * - * @param xAngleInRadians - angle to rotate around X axis in radians. - * @param yAngleInRadians - angle to rotate around Y axis in radians. - * @param zAngleInRadians - angle to rotate around Z axis in radians. - * @param order - order to apply euler angles - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion representing the same rotation as the euler angles applied in the given order - */ - function fromEuler(xAngleInRadians, yAngleInRadians, zAngleInRadians, order, dst) { - dst = dst || new QuatType(4); - const xHalfAngle = xAngleInRadians * 0.5; - const yHalfAngle = yAngleInRadians * 0.5; - const zHalfAngle = zAngleInRadians * 0.5; - const sx = Math.sin(xHalfAngle); - const cx = Math.cos(xHalfAngle); - const sy = Math.sin(yHalfAngle); - const cy = Math.cos(yHalfAngle); - const sz = Math.sin(zHalfAngle); - const cz = Math.cos(zHalfAngle); - switch (order) { - case 'xyz': - dst[0] = sx * cy * cz + cx * sy * sz; - dst[1] = cx * sy * cz - sx * cy * sz; - dst[2] = cx * cy * sz + sx * sy * cz; - dst[3] = cx * cy * cz - sx * sy * sz; - break; - case 'xzy': - dst[0] = sx * cy * cz - cx * sy * sz; - dst[1] = cx * sy * cz - sx * cy * sz; - dst[2] = cx * cy * sz + sx * sy * cz; - dst[3] = cx * cy * cz + sx * sy * sz; - break; - case 'yxz': - dst[0] = sx * cy * cz + cx * sy * sz; - dst[1] = cx * sy * cz - sx * cy * sz; - dst[2] = cx * cy * sz - sx * sy * cz; - dst[3] = cx * cy * cz + sx * sy * sz; - break; - case 'yzx': - dst[0] = sx * cy * cz + cx * sy * sz; - dst[1] = cx * sy * cz + sx * cy * sz; - dst[2] = cx * cy * sz - sx * sy * cz; - dst[3] = cx * cy * cz - sx * sy * sz; - break; - case 'zxy': - dst[0] = sx * cy * cz - cx * sy * sz; - dst[1] = cx * sy * cz + sx * cy * sz; - dst[2] = cx * cy * sz + sx * sy * cz; - dst[3] = cx * cy * cz - sx * sy * sz; - break; - case 'zyx': - dst[0] = sx * cy * cz - cx * sy * sz; - dst[1] = cx * sy * cz + sx * cy * sz; - dst[2] = cx * cy * sz - sx * sy * cz; - dst[3] = cx * cy * cz + sx * sy * sz; - break; - default: - throw new Error(`Unknown rotation order: ${order}`); - } - return dst; - } - /** - * Copies a quaternion. (same as {@link quat.clone}) - * Also see {@link quat.create} and {@link quat.set} - * @param q - The quaternion. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is a copy of q - */ - function copy$1(q, dst) { - dst = dst || new QuatType(4); - dst[0] = q[0]; - dst[1] = q[1]; - dst[2] = q[2]; - dst[3] = q[3]; - return dst; - } - /** - * Clones a quaternion. (same as {@link quat.copy}) - * Also see {@link quat.create} and {@link quat.set} - * @param q - The quaternion. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A copy of q. - */ - const clone$1 = copy$1; - /** - * Adds two quaternions; assumes a and b have the same dimension. - * @param a - Operand quaternion. - * @param b - Operand quaternion. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the sum of a and b. - */ - function add$1(a, b, dst) { - dst = dst || new QuatType(4); - dst[0] = a[0] + b[0]; - dst[1] = a[1] + b[1]; - dst[2] = a[2] + b[2]; - dst[3] = a[3] + b[3]; - return dst; - } - /** - * Subtracts two quaternions. - * @param a - Operand quaternion. - * @param b - Operand quaternion. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the difference of a and b. - */ - function subtract$1(a, b, dst) { - dst = dst || new QuatType(4); - dst[0] = a[0] - b[0]; - dst[1] = a[1] - b[1]; - dst[2] = a[2] - b[2]; - dst[3] = a[3] - b[3]; - return dst; - } - /** - * Subtracts two quaternions. - * @param a - Operand quaternion. - * @param b - Operand quaternion. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the difference of a and b. - */ - const sub$1 = subtract$1; - /** - * Multiplies a quaternion by a scalar. - * @param v - The quaternion. - * @param k - The scalar. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns The scaled quaternion. - */ - function mulScalar$1(v, k, dst) { - dst = dst || new QuatType(4); - dst[0] = v[0] * k; - dst[1] = v[1] * k; - dst[2] = v[2] * k; - dst[3] = v[3] * k; - return dst; - } - /** - * Multiplies a quaternion by a scalar. (same as mulScalar) - * @param v - The quaternion. - * @param k - The scalar. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns The scaled quaternion. - */ - const scale$1 = mulScalar$1; - /** - * Divides a vector by a scalar. - * @param v - The vector. - * @param k - The scalar. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns The scaled quaternion. - */ - function divScalar$1(v, k, dst) { - dst = dst || new QuatType(4); - dst[0] = v[0] / k; - dst[1] = v[1] / k; - dst[2] = v[2] / k; - dst[3] = v[3] / k; - return dst; - } - /** - * Computes the dot product of two quaternions - * @param a - Operand quaternion. - * @param b - Operand quaternion. - * @returns dot product - */ - function dot$1(a, b) { - return (a[0] * b[0]) + (a[1] * b[1]) + (a[2] * b[2]) + (a[3] * b[3]); - } - /** - * Performs linear interpolation on two quaternions. - * Given quaternions a and b and interpolation coefficient t, returns - * a + t * (b - a). - * @param a - Operand quaternion. - * @param b - Operand quaternion. - * @param t - Interpolation coefficient. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns The linear interpolated result. - */ - function lerp$1(a, b, t, dst) { - dst = dst || new QuatType(4); - dst[0] = a[0] + t * (b[0] - a[0]); - dst[1] = a[1] + t * (b[1] - a[1]); - dst[2] = a[2] + t * (b[2] - a[2]); - dst[3] = a[3] + t * (b[3] - a[3]); - return dst; - } - /** - * Computes the length of quaternion - * @param v - quaternion. - * @returns length of quaternion. - */ - function length$1(v) { - const v0 = v[0]; - const v1 = v[1]; - const v2 = v[2]; - const v3 = v[3]; - return Math.sqrt(v0 * v0 + v1 * v1 + v2 * v2 + v3 * v3); - } - /** - * Computes the length of quaternion (same as length) - * @param v - quaternion. - * @returns length of quaternion. - */ - const len$1 = length$1; - /** - * Computes the square of the length of quaternion - * @param v - quaternion. - * @returns square of the length of quaternion. - */ - function lengthSq$1(v) { - const v0 = v[0]; - const v1 = v[1]; - const v2 = v[2]; - const v3 = v[3]; - return v0 * v0 + v1 * v1 + v2 * v2 + v3 * v3; - } - /** - * Computes the square of the length of quaternion (same as lengthSq) - * @param v - quaternion. - * @returns square of the length of quaternion. - */ - const lenSq$1 = lengthSq$1; - /** - * Divides a quaternion by its Euclidean length and returns the quotient. - * @param v - The quaternion. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns The normalized quaternion. - */ - function normalize$1(v, dst) { - dst = dst || new QuatType(4); - const v0 = v[0]; - const v1 = v[1]; - const v2 = v[2]; - const v3 = v[3]; - const len = Math.sqrt(v0 * v0 + v1 * v1 + v2 * v2 + v3 * v3); - if (len > 0.00001) { - dst[0] = v0 / len; - dst[1] = v1 / len; - dst[2] = v2 / len; - dst[3] = v3 / len; - } - else { - dst[0] = 0; - dst[1] = 0; - dst[2] = 0; - dst[3] = 0; - } - return dst; - } - /** - * Check if 2 quaternions are approximately equal - * @param a - Operand quaternion. - * @param b - Operand quaternion. - * @returns true if quaternions are approximately equal - */ - function equalsApproximately$1(a, b) { - return Math.abs(a[0] - b[0]) < EPSILON && - Math.abs(a[1] - b[1]) < EPSILON && - Math.abs(a[2] - b[2]) < EPSILON && - Math.abs(a[3] - b[3]) < EPSILON; - } - /** - * Check if 2 quaternions are exactly equal - * @param a - Operand quaternion. - * @param b - Operand quaternion. - * @returns true if quaternions are exactly equal - */ - function equals$1(a, b) { - return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3]; - } - /** - * Creates an identity quaternion - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns an identity quaternion - */ - function identity(dst) { - dst = dst || new QuatType(4); - dst[0] = 0; - dst[1] = 0; - dst[2] = 0; - dst[3] = 1; - return dst; - } - let tempVec3; - let xUnitVec3; - let yUnitVec3; - /** - * Computes a quaternion to represent the shortest rotation from one vector to another. - * - * @param aUnit - the start vector - * @param bUnit - the end vector - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns the result - */ - function rotationTo(aUnit, bUnit, dst) { - dst = dst || new QuatType(4); - tempVec3 = tempVec3 || create$4(); - xUnitVec3 = xUnitVec3 || create$4(1, 0, 0); - yUnitVec3 = yUnitVec3 || create$4(0, 1, 0); - const dot = dot$2(aUnit, bUnit); - if (dot < -0.999999) { - cross(xUnitVec3, aUnit, tempVec3); - if (len$2(tempVec3) < 0.000001) { - cross(yUnitVec3, aUnit, tempVec3); - } - normalize$2(tempVec3, tempVec3); - fromAxisAngle(tempVec3, Math.PI, dst); - return dst; - } - else if (dot > 0.999999) { - dst[0] = 0; - dst[1] = 0; - dst[2] = 0; - dst[3] = 1; - return dst; - } - else { - cross(aUnit, bUnit, tempVec3); - dst[0] = tempVec3[0]; - dst[1] = tempVec3[1]; - dst[2] = tempVec3[2]; - dst[3] = 1 + dot; - return normalize$1(dst, dst); - } - } - let tempQuat1; - let tempQuat2; - /** - * Performs a spherical linear interpolation with two control points - * - * @param a - the first quaternion - * @param b - the second quaternion - * @param c - the third quaternion - * @param d - the fourth quaternion - * @param t - Interpolation coefficient 0 to 1 - * @returns result - */ - function sqlerp(a, b, c, d, t, dst) { - dst = dst || new QuatType(4); - tempQuat1 = tempQuat1 || new QuatType(4); - tempQuat2 = tempQuat2 || new QuatType(4); - slerp(a, d, t, tempQuat1); - slerp(b, c, t, tempQuat2); - slerp(tempQuat1, tempQuat2, 2 * t * (1 - t), dst); - return dst; - } - - var quatImpl = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create$1, - setDefaultType: setDefaultType$2, - fromValues: fromValues$1, - set: set$1, - fromAxisAngle: fromAxisAngle, - toAxisAngle: toAxisAngle, - angle: angle, - multiply: multiply$1, - mul: mul$1, - rotateX: rotateX, - rotateY: rotateY, - rotateZ: rotateZ, - slerp: slerp, - inverse: inverse$1, - conjugate: conjugate, - fromMat: fromMat, - fromEuler: fromEuler, - copy: copy$1, - clone: clone$1, - add: add$1, - subtract: subtract$1, - sub: sub$1, - mulScalar: mulScalar$1, - scale: scale$1, - divScalar: divScalar$1, - dot: dot$1, - lerp: lerp$1, - length: length$1, - len: len$1, - lengthSq: lengthSq$1, - lenSq: lenSq$1, - normalize: normalize$1, - equalsApproximately: equalsApproximately$1, - equals: equals$1, - identity: identity, - rotationTo: rotationTo, - sqlerp: sqlerp - }); - - /* - * Copyright 2022 Gregg Tavares - * - * 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. - */ - /** - * - * Vec4 math functions. - * - * Almost all functions take an optional `dst` argument. If it is not passed in the - * functions will create a new `Vec4`. In other words you can do this - * - * const v = vec4.cross(v1, v2); // Creates a new Vec4 with the cross product of v1 x v2. - * - * or - * - * const v = vec4.create(); - * vec4.cross(v1, v2, v); // Puts the cross product of v1 x v2 in v - * - * The first style is often easier but depending on where it's used it generates garbage where - * as there is almost never allocation with the second style. - * - * It is always safe to pass any vector as the destination. So for example - * - * vec4.cross(v1, v2, v1); // Puts the cross product of v1 x v2 in v1 - * - */ - let VecType = Float32Array; - /** - * Sets the type this library creates for a Vec4 - * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array` - * @returns previous constructor for Vec4 - */ - function setDefaultType$1(ctor) { - const oldType = VecType; - VecType = ctor; - return oldType; - } - /** - * Creates a vec4; may be called with x, y, z to set initial values. - * @param x - Initial x value. - * @param y - Initial y value. - * @param z - Initial z value. - * @param w - Initial w value. - * @returns the created vector - */ - function create(x, y, z, w) { - const dst = new VecType(4); - if (x !== undefined) { - dst[0] = x; - if (y !== undefined) { - dst[1] = y; - if (z !== undefined) { - dst[2] = z; - if (w !== undefined) { - dst[3] = w; - } - } - } - } - return dst; - } - - /* - * Copyright 2022 Gregg Tavares - * - * 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. - */ - /** - * Creates a vec4; may be called with x, y, z to set initial values. (same as create) - * @param x - Initial x value. - * @param y - Initial y value. - * @param z - Initial z value. - * @param z - Initial w value. - * @returns the created vector - */ - const fromValues = create; - /** - * Sets the values of a Vec4 - * Also see {@link vec4.create} and {@link vec4.copy} - * - * @param x first value - * @param y second value - * @param z third value - * @param w fourth value - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector with its elements set. - */ - function set(x, y, z, w, dst) { - dst = dst || new VecType(4); - dst[0] = x; - dst[1] = y; - dst[2] = z; - dst[3] = w; - return dst; - } - /** - * Applies Math.ceil to each element of vector - * @param v - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the ceil of each element of v. - */ - function ceil(v, dst) { - dst = dst || new VecType(4); - dst[0] = Math.ceil(v[0]); - dst[1] = Math.ceil(v[1]); - dst[2] = Math.ceil(v[2]); - dst[3] = Math.ceil(v[3]); - return dst; - } - /** - * Applies Math.floor to each element of vector - * @param v - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the floor of each element of v. - */ - function floor(v, dst) { - dst = dst || new VecType(4); - dst[0] = Math.floor(v[0]); - dst[1] = Math.floor(v[1]); - dst[2] = Math.floor(v[2]); - dst[3] = Math.floor(v[3]); - return dst; - } - /** - * Applies Math.round to each element of vector - * @param v - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the round of each element of v. - */ - function round(v, dst) { - dst = dst || new VecType(4); - dst[0] = Math.round(v[0]); - dst[1] = Math.round(v[1]); - dst[2] = Math.round(v[2]); - dst[3] = Math.round(v[3]); - return dst; - } - /** - * Clamp each element of vector between min and max - * @param v - Operand vector. - * @param max - Min value, default 0 - * @param min - Max value, default 1 - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that the clamped value of each element of v. - */ - function clamp(v, min = 0, max = 1, dst) { - dst = dst || new VecType(4); - dst[0] = Math.min(max, Math.max(min, v[0])); - dst[1] = Math.min(max, Math.max(min, v[1])); - dst[2] = Math.min(max, Math.max(min, v[2])); - dst[3] = Math.min(max, Math.max(min, v[3])); - return dst; - } - /** - * Adds two vectors; assumes a and b have the same dimension. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the sum of a and b. - */ - function add(a, b, dst) { - dst = dst || new VecType(4); - dst[0] = a[0] + b[0]; - dst[1] = a[1] + b[1]; - dst[2] = a[2] + b[2]; - dst[3] = a[3] + b[3]; - return dst; - } - /** - * Adds two vectors, scaling the 2nd; assumes a and b have the same dimension. - * @param a - Operand vector. - * @param b - Operand vector. - * @param scale - Amount to scale b - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the sum of a + b * scale. - */ - function addScaled(a, b, scale, dst) { - dst = dst || new VecType(4); - dst[0] = a[0] + b[0] * scale; - dst[1] = a[1] + b[1] * scale; - dst[2] = a[2] + b[2] * scale; - dst[3] = a[3] + b[3] * scale; - return dst; - } - /** - * Subtracts two vectors. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the difference of a and b. - */ - function subtract(a, b, dst) { - dst = dst || new VecType(4); - dst[0] = a[0] - b[0]; - dst[1] = a[1] - b[1]; - dst[2] = a[2] - b[2]; - dst[3] = a[3] - b[3]; - return dst; - } - /** - * Subtracts two vectors. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the difference of a and b. - */ - const sub = subtract; - /** - * Check if 2 vectors are approximately equal - * @param a - Operand vector. - * @param b - Operand vector. - * @returns true if vectors are approximately equal - */ - function equalsApproximately(a, b) { - return Math.abs(a[0] - b[0]) < EPSILON && - Math.abs(a[1] - b[1]) < EPSILON && - Math.abs(a[2] - b[2]) < EPSILON && - Math.abs(a[3] - b[3]) < EPSILON; - } - /** - * Check if 2 vectors are exactly equal - * @param a - Operand vector. - * @param b - Operand vector. - * @returns true if vectors are exactly equal - */ - function equals(a, b) { - return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3]; - } - /** - * Performs linear interpolation on two vectors. - * Given vectors a and b and interpolation coefficient t, returns - * a + t * (b - a). - * @param a - Operand vector. - * @param b - Operand vector. - * @param t - Interpolation coefficient. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The linear interpolated result. - */ - function lerp(a, b, t, dst) { - dst = dst || new VecType(4); - dst[0] = a[0] + t * (b[0] - a[0]); - dst[1] = a[1] + t * (b[1] - a[1]); - dst[2] = a[2] + t * (b[2] - a[2]); - dst[3] = a[3] + t * (b[3] - a[3]); - return dst; - } - /** - * Performs linear interpolation on two vectors. - * Given vectors a and b and interpolation coefficient vector t, returns - * a + t * (b - a). - * @param a - Operand vector. - * @param b - Operand vector. - * @param t - Interpolation coefficients vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns the linear interpolated result. - */ - function lerpV(a, b, t, dst) { - dst = dst || new VecType(4); - dst[0] = a[0] + t[0] * (b[0] - a[0]); - dst[1] = a[1] + t[1] * (b[1] - a[1]); - dst[2] = a[2] + t[2] * (b[2] - a[2]); - dst[3] = a[3] + t[3] * (b[3] - a[3]); - return dst; - } - /** - * Return max values of two vectors. - * Given vectors a and b returns - * [max(a[0], b[0]), max(a[1], b[1]), max(a[2], b[2])]. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The max components vector. - */ - function max(a, b, dst) { - dst = dst || new VecType(4); - dst[0] = Math.max(a[0], b[0]); - dst[1] = Math.max(a[1], b[1]); - dst[2] = Math.max(a[2], b[2]); - dst[3] = Math.max(a[3], b[3]); - return dst; - } - /** - * Return min values of two vectors. - * Given vectors a and b returns - * [min(a[0], b[0]), min(a[1], b[1]), min(a[2], b[2])]. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The min components vector. - */ - function min(a, b, dst) { - dst = dst || new VecType(4); - dst[0] = Math.min(a[0], b[0]); - dst[1] = Math.min(a[1], b[1]); - dst[2] = Math.min(a[2], b[2]); - dst[3] = Math.min(a[3], b[3]); - return dst; - } - /** - * Multiplies a vector by a scalar. - * @param v - The vector. - * @param k - The scalar. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The scaled vector. - */ - function mulScalar(v, k, dst) { - dst = dst || new VecType(4); - dst[0] = v[0] * k; - dst[1] = v[1] * k; - dst[2] = v[2] * k; - dst[3] = v[3] * k; - return dst; - } - /** - * Multiplies a vector by a scalar. (same as mulScalar) - * @param v - The vector. - * @param k - The scalar. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The scaled vector. - */ - const scale = mulScalar; - /** - * Divides a vector by a scalar. - * @param v - The vector. - * @param k - The scalar. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The scaled vector. - */ - function divScalar(v, k, dst) { - dst = dst || new VecType(4); - dst[0] = v[0] / k; - dst[1] = v[1] / k; - dst[2] = v[2] / k; - dst[3] = v[3] / k; - return dst; - } - /** - * Inverse a vector. - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The inverted vector. - */ - function inverse(v, dst) { - dst = dst || new VecType(4); - dst[0] = 1 / v[0]; - dst[1] = 1 / v[1]; - dst[2] = 1 / v[2]; - dst[3] = 1 / v[3]; - return dst; - } - /** - * Invert a vector. (same as inverse) - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The inverted vector. - */ - const invert = inverse; - /** - * Computes the dot product of two vectors - * @param a - Operand vector. - * @param b - Operand vector. - * @returns dot product - */ - function dot(a, b) { - return (a[0] * b[0]) + (a[1] * b[1]) + (a[2] * b[2]) + (a[3] * b[3]); - } - /** - * Computes the length of vector - * @param v - vector. - * @returns length of vector. - */ - function length(v) { - const v0 = v[0]; - const v1 = v[1]; - const v2 = v[2]; - const v3 = v[3]; - return Math.sqrt(v0 * v0 + v1 * v1 + v2 * v2 + v3 * v3); - } - /** - * Computes the length of vector (same as length) - * @param v - vector. - * @returns length of vector. - */ - const len = length; - /** - * Computes the square of the length of vector - * @param v - vector. - * @returns square of the length of vector. - */ - function lengthSq(v) { - const v0 = v[0]; - const v1 = v[1]; - const v2 = v[2]; - const v3 = v[3]; - return v0 * v0 + v1 * v1 + v2 * v2 + v3 * v3; - } - /** - * Computes the square of the length of vector (same as lengthSq) - * @param v - vector. - * @returns square of the length of vector. - */ - const lenSq = lengthSq; - /** - * Computes the distance between 2 points - * @param a - vector. - * @param b - vector. - * @returns distance between a and b - */ - function distance(a, b) { - const dx = a[0] - b[0]; - const dy = a[1] - b[1]; - const dz = a[2] - b[2]; - const dw = a[3] - b[3]; - return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw); - } - /** - * Computes the distance between 2 points (same as distance) - * @param a - vector. - * @param b - vector. - * @returns distance between a and b - */ - const dist = distance; - /** - * Computes the square of the distance between 2 points - * @param a - vector. - * @param b - vector. - * @returns square of the distance between a and b - */ - function distanceSq(a, b) { - const dx = a[0] - b[0]; - const dy = a[1] - b[1]; - const dz = a[2] - b[2]; - const dw = a[3] - b[3]; - return dx * dx + dy * dy + dz * dz + dw * dw; - } - /** - * Computes the square of the distance between 2 points (same as distanceSq) - * @param a - vector. - * @param b - vector. - * @returns square of the distance between a and b - */ - const distSq = distanceSq; - /** - * Divides a vector by its Euclidean length and returns the quotient. - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The normalized vector. - */ - function normalize(v, dst) { - dst = dst || new VecType(4); - const v0 = v[0]; - const v1 = v[1]; - const v2 = v[2]; - const v3 = v[3]; - const len = Math.sqrt(v0 * v0 + v1 * v1 + v2 * v2 + v3 * v3); - if (len > 0.00001) { - dst[0] = v0 / len; - dst[1] = v1 / len; - dst[2] = v2 / len; - dst[3] = v3 / len; - } - else { - dst[0] = 0; - dst[1] = 0; - dst[2] = 0; - dst[3] = 0; - } - return dst; - } - /** - * Negates a vector. - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns -v. - */ - function negate(v, dst) { - dst = dst || new VecType(4); - dst[0] = -v[0]; - dst[1] = -v[1]; - dst[2] = -v[2]; - dst[3] = -v[3]; - return dst; - } - /** - * Copies a vector. (same as {@link vec4.clone}) - * Also see {@link vec4.create} and {@link vec4.set} - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A copy of v. - */ - function copy(v, dst) { - dst = dst || new VecType(4); - dst[0] = v[0]; - dst[1] = v[1]; - dst[2] = v[2]; - dst[3] = v[3]; - return dst; - } - /** - * Clones a vector. (same as {@link vec4.copy}) - * Also see {@link vec4.create} and {@link vec4.set} - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A copy of v. - */ - const clone = copy; - /** - * Multiplies a vector by another vector (component-wise); assumes a and - * b have the same length. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of products of entries of a and b. - */ - function multiply(a, b, dst) { - dst = dst || new VecType(4); - dst[0] = a[0] * b[0]; - dst[1] = a[1] * b[1]; - dst[2] = a[2] * b[2]; - dst[3] = a[3] * b[3]; - return dst; - } - /** - * Multiplies a vector by another vector (component-wise); assumes a and - * b have the same length. (same as mul) - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of products of entries of a and b. - */ - const mul = multiply; - /** - * Divides a vector by another vector (component-wise); assumes a and - * b have the same length. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of quotients of entries of a and b. - */ - function divide(a, b, dst) { - dst = dst || new VecType(4); - dst[0] = a[0] / b[0]; - dst[1] = a[1] / b[1]; - dst[2] = a[2] / b[2]; - dst[3] = a[3] / b[3]; - return dst; - } - /** - * Divides a vector by another vector (component-wise); assumes a and - * b have the same length. (same as divide) - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of quotients of entries of a and b. - */ - const div = divide; - /** - * Zero's a vector - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The zeroed vector. - */ - function zero(dst) { - dst = dst || new VecType(4); - dst[0] = 0; - dst[1] = 0; - dst[2] = 0; - dst[3] = 0; - return dst; - } - /** - * transform vec4 by 4x4 matrix - * @param v - the vector - * @param m - The matrix. - * @param dst - optional vec4 to store result. If not passed a new one is created. - * @returns the transformed vector - */ - function transformMat4(v, m, dst) { - dst = dst || new VecType(4); - const x = v[0]; - const y = v[1]; - const z = v[2]; - const w = v[3]; - dst[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w; - dst[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w; - dst[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w; - dst[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w; - return dst; - } - - var vec4Impl = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create, - setDefaultType: setDefaultType$1, - fromValues: fromValues, - set: set, - ceil: ceil, - floor: floor, - round: round, - clamp: clamp, - add: add, - addScaled: addScaled, - subtract: subtract, - sub: sub, - equalsApproximately: equalsApproximately, - equals: equals, - lerp: lerp, - lerpV: lerpV, - max: max, - min: min, - mulScalar: mulScalar, - scale: scale, - divScalar: divScalar, - inverse: inverse, - invert: invert, - dot: dot, - length: length, - len: len, - lengthSq: lengthSq, - lenSq: lenSq, - distance: distance, - dist: dist, - distanceSq: distanceSq, - distSq: distSq, - normalize: normalize, - negate: negate, - copy: copy, - clone: clone, - multiply: multiply, - mul: mul, - divide: divide, - div: div, - zero: zero, - transformMat4: transformMat4 - }); - - /** - * Sets the type this library creates for all types - * - * example: - * - * ``` - * setDefaultType(Float64Array); - * ``` - * - * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array` - */ - function setDefaultType(ctor) { - setDefaultType$4(ctor); - setDefaultType$3(ctor); - setDefaultType$2(ctor); - setDefaultType$6(ctor); - setDefaultType$5(ctor); - setDefaultType$1(ctor); - } - - exports.mat3 = mat3Impl; - exports.mat4 = mat4Impl; - exports.quat = quatImpl; - exports.setDefaultType = setDefaultType; - exports.utils = utils; - exports.vec2 = vec2Impl; - exports.vec3 = vec3Impl; - exports.vec4 = vec4Impl; - -})); -//# sourceMappingURL=wgpu-matrix.js.map diff --git a/dist/2.x/wgpu-matrix.js.map b/dist/2.x/wgpu-matrix.js.map deleted file mode 100644 index 3476f61..0000000 --- a/dist/2.x/wgpu-matrix.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"wgpu-matrix.js","sources":["../../../src/utils.ts","../../../src/vec2.ts","../../../src/vec3.ts","../../../src/vec2-impl.ts","../../../src/mat3-impl.ts","../../../src/vec3-impl.ts","../../../src/mat4-impl.ts","../../../src/quat.ts","../../../src/quat-impl.ts","../../../src/vec4.ts","../../../src/vec4-impl.ts","../../../src/wgpu-matrix.ts"],"sourcesContent":["/*\n * Copyright 2022 Gregg Tavares\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n */\n\nexport let EPSILON = 0.000001;\n\n/**\n * Set the value for EPSILON for various checks\n * @param v - Value to use for EPSILON.\n * @returns previous value of EPSILON;\n */\nexport function setEpsilon(v: number): number {\n const old = EPSILON;\n EPSILON = v;\n return old;\n}\n\n/**\n * Convert degrees to radians\n * @param degrees - Angle in degrees\n * @returns angle converted to radians\n */\nexport function degToRad(degrees: number): number {\n return degrees * Math.PI / 180;\n}\n\n/**\n * Convert radians to degrees\n * @param radians - Angle in radians\n * @returns angle converted to degrees\n */\nexport function radToDeg(radians: number): number {\n return radians * 180 / Math.PI;\n}\n\n/**\n * Lerps between a and b via t\n * @param a - starting value\n * @param b - ending value\n * @param t - value where 0 = a and 1 = b\n * @returns a + (b - a) * t\n */\nexport function lerp(a: number, b: number, t: number): number {\n return a + (b - a) * t;\n}\n\n/**\n * Compute the opposite of lerp. Given a and b and a value between\n * a and b returns a value between 0 and 1. 0 if a, 1 if b.\n * Note: no clamping is done.\n * @param a - start value\n * @param b - end value\n * @param v - value between a and b\n * @returns (v - a) / (b - a)\n */\nexport function inverseLerp(a: number, b: number, v: number): number {\n const d = b - a;\n return (Math.abs(b - a) < EPSILON)\n ? a\n : (v - a) / d;\n}\n\n/**\n * Compute the euclidean modulo\n *\n * ```\n * // table for n / 3\n * -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5 <- n\n * ------------------------------------\n * -2 -1 -0 -2 -1 0, 1, 2, 0, 1, 2 <- n % 3\n * 1 2 0 1 2 0, 1, 2, 0, 1, 2 <- euclideanModule(n, 3)\n * ```\n *\n * @param n - dividend\n * @param m - divisor\n * @returns the euclidean modulo of n / m\n */\nexport function euclideanModulo(n: number, m: number) {\n return ((n % m) + m) % m;\n}","/*\n * Copyright 2022 Gregg Tavares\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n */\n\n/**\n * A JavaScript array with 2 values, Float32Array with 2 values, or a Float64Array with 2 values.\n * When created by the library will create the default type which is `Float32Array`\n * but can be set by calling {@link vec2.setDefaultType}.\n */\nexport type Vec2 = number[] | Float32Array | Float64Array;\n\n/**\n *\n * Vec2 math functions.\n *\n * Almost all functions take an optional `dst` argument. If it is not passed in the\n * functions will create a new Vec2. In other words you can do this\n *\n * const v = vec2.cross(v1, v2); // Creates a new Vec2 with the cross product of v1 x v2.\n *\n * or\n *\n * const v = vec2.create();\n * vec2.cross(v1, v2, v); // Puts the cross product of v1 x v2 in v\n *\n * The first style is often easier but depending on where it's used it generates garbage where\n * as there is almost never allocation with the second style.\n *\n * It is always safe to pass any vector as the destination. So for example\n *\n * vec2.cross(v1, v2, v1); // Puts the cross product of v1 x v2 in v1\n *\n */\n\nexport let VecType: new (n: number) => Vec2 = Float32Array;\n\n/**\n * Sets the type this library creates for a Vec2\n * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array`\n * @returns previous constructor for Vec2\n */\nexport function setDefaultType(ctor: new (n: number) => Vec2) {\n const oldType = VecType;\n VecType = ctor;\n return oldType;\n}\n\n/**\n * Creates a Vec2; may be called with x, y, z to set initial values.\n *\n * Note: Since passing in a raw JavaScript array\n * is valid in all circumstances, if you want to\n * force a JavaScript array into a Vec2's specified type\n * it would be faster to use\n *\n * ```\n * const v = vec2.clone(someJSArray);\n * ```\n *\n * Note: a consequence of the implementation is if your Vec2Type = `Array`\n * instead of `Float32Array` or `Float64Array` then any values you\n * don't pass in will be undefined. Usually this is not an issue since\n * (a) using `Array` is rare and (b) using `vec2.create` is usually used\n * to create a Vec2 to be filled out as in\n *\n * ```\n * const sum = vec2.create();\n * vec2.add(v1, v2, sum);\n * ```\n *\n * @param x - Initial x value.\n * @param y - Initial y value.\n * @returns the created vector\n */\nexport function create(x = 0, y = 0): Vec2 {\n const dst = new VecType(2);\n if (x !== undefined) {\n dst[0] = x;\n if (y !== undefined) {\n dst[1] = y;\n }\n }\n return dst;\n}\n","/*\n * Copyright 2022 Gregg Tavares\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n */\n\n/**\n * A JavaScript array with 3 values, Float32Array with 3 values, or a Float64Array with 3 values.\n * When created by the library will create the default type which is `Float32Array`\n * but can be set by calling {@link vec3.setDefaultType}.\n */\nexport type Vec3 = number[] | Float32Array | Float64Array;\n\n/**\n *\n * Vec3 math functions.\n *\n * Almost all functions take an optional `dst` argument. If it is not passed in the\n * functions will create a new `Vec3`. In other words you can do this\n *\n * const v = vec3.cross(v1, v2); // Creates a new Vec3 with the cross product of v1 x v2.\n *\n * or\n *\n * const v = vec3.create();\n * vec3.cross(v1, v2, v); // Puts the cross product of v1 x v2 in v\n *\n * The first style is often easier but depending on where it's used it generates garbage where\n * as there is almost never allocation with the second style.\n *\n * It is always safe to pass any vector as the destination. So for example\n *\n * vec3.cross(v1, v2, v1); // Puts the cross product of v1 x v2 in v1\n *\n */\n\nexport let VecType: new (n: number) => Vec3 = Float32Array;\n\n/**\n * Sets the type this library creates for a Vec3\n * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array`\n * @returns previous constructor for Vec3\n */\nexport function setDefaultType(ctor: new (n: number) => Vec3) {\n const oldType = VecType;\n VecType = ctor;\n return oldType;\n}\n\n/**\n * Creates a vec3; may be called with x, y, z to set initial values.\n * @param x - Initial x value.\n * @param y - Initial y value.\n * @param z - Initial z value.\n * @returns the created vector\n */\nexport function create(x?: number, y?: number, z?: number): Vec3 {\n const dst = new VecType(3);\n if (x !== undefined) {\n dst[0] = x;\n if (y !== undefined) {\n dst[1] = y;\n if (z !== undefined) {\n dst[2] = z;\n }\n }\n }\n return dst;\n}","/*\n * Copyright 2022 Gregg Tavares\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n */\nimport * as utils from './utils.js';\nimport { Mat3 } from './mat3';\nimport { Mat4 } from './mat4';\nimport { Vec2, create, setDefaultType, VecType } from './vec2';\nimport { Vec3, VecType as Vec3Type } from './vec3';\n\nexport default Vec2;\nexport { create, setDefaultType };\n\n/**\n * Creates a Vec2; may be called with x, y, z to set initial values. (same as create)\n * @param x - Initial x value.\n * @param y - Initial y value.\n * @returns the created vector\n */\nexport const fromValues = create;\n\n/**\n * Sets the values of a Vec2\n * Also see {@link vec2.create} and {@link vec2.copy}\n *\n * @param x first value\n * @param y second value\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector with its elements set.\n */\nexport function set(x: number, y: number, dst?: Vec2) {\n dst = dst || new VecType(2);\n\n dst[0] = x;\n dst[1] = y;\n\n return dst;\n}\n\n/**\n * Applies Math.ceil to each element of vector\n * @param v - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the ceil of each element of v.\n */\nexport function ceil(v: Vec2, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = Math.ceil(v[0]);\n dst[1] = Math.ceil(v[1]);\n\n return dst;\n}\n\n/**\n * Applies Math.floor to each element of vector\n * @param v - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the floor of each element of v.\n */\nexport function floor(v: Vec2, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = Math.floor(v[0]);\n dst[1] = Math.floor(v[1]);\n\n return dst;\n}\n\n/**\n * Applies Math.round to each element of vector\n * @param v - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the round of each element of v.\n */\nexport function round(v: Vec2, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = Math.round(v[0]);\n dst[1] = Math.round(v[1]);\n\n return dst;\n}\n\n/**\n * Clamp each element of vector between min and max\n * @param v - Operand vector.\n * @param max - Min value, default 0\n * @param min - Max value, default 1\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that the clamped value of each element of v.\n */\nexport function clamp(v: Vec2, min = 0, max = 1, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = Math.min(max, Math.max(min, v[0]));\n dst[1] = Math.min(max, Math.max(min, v[1]));\n\n return dst;\n}\n\n/**\n * Adds two vectors; assumes a and b have the same dimension.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the sum of a and b.\n */\nexport function add(a: Vec2, b: Vec2, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = a[0] + b[0];\n dst[1] = a[1] + b[1];\n\n return dst;\n}\n\n/**\n * Adds two vectors, scaling the 2nd; assumes a and b have the same dimension.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param scale - Amount to scale b\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the sum of a + b * scale.\n */\nexport function addScaled(a: Vec2, b: Vec2, scale: number, dst?: Vec2) {\n dst = dst || new VecType(2);\n\n dst[0] = a[0] + b[0] * scale;\n dst[1] = a[1] + b[1] * scale;\n\n return dst;\n}\n\n/**\n * Returns the angle in radians between two vectors.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @returns The angle in radians between the 2 vectors.\n */\nexport function angle(a: Vec2, b: Vec2): number {\n const ax = a[0];\n const ay = a[1];\n const bx = a[0];\n const by = a[1];\n const mag1 = Math.sqrt(ax * ax + ay * ay);\n const mag2 = Math.sqrt(bx * bx + by * by);\n const mag = mag1 * mag2;\n const cosine = mag && dot(a, b) / mag;\n return Math.acos(cosine);\n}\n\n/**\n * Subtracts two vectors.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the difference of a and b.\n */\nexport function subtract(a: Vec2, b: Vec2, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = a[0] - b[0];\n dst[1] = a[1] - b[1];\n\n return dst;\n}\n\n/**\n * Subtracts two vectors.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the difference of a and b.\n */\nexport const sub = subtract;\n\n/**\n * Check if 2 vectors are approximately equal\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @returns true if vectors are approximately equal\n */\nexport function equalsApproximately(a: Vec2, b: Vec2): boolean {\n return Math.abs(a[0] - b[0]) < utils.EPSILON &&\n Math.abs(a[1] - b[1]) < utils.EPSILON;\n}\n\n/**\n * Check if 2 vectors are exactly equal\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @returns true if vectors are exactly equal\n */\nexport function equals(a: Vec2, b: Vec2): boolean {\n return a[0] === b[0] && a[1] === b[1];\n}\n\n/**\n * Performs linear interpolation on two vectors.\n * Given vectors a and b and interpolation coefficient t, returns\n * a + t * (b - a).\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param t - Interpolation coefficient.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The linear interpolated result.\n */\nexport function lerp(a: Vec2, b: Vec2, t: number, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = a[0] + t * (b[0] - a[0]);\n dst[1] = a[1] + t * (b[1] - a[1]);\n\n return dst;\n}\n\n/**\n * Performs linear interpolation on two vectors.\n * Given vectors a and b and interpolation coefficient vector t, returns\n * a + t * (b - a).\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param t - Interpolation coefficients vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns the linear interpolated result.\n */\nexport function lerpV(a: Vec2, b: Vec2, t: Vec2, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = a[0] + t[0] * (b[0] - a[0]);\n dst[1] = a[1] + t[1] * (b[1] - a[1]);\n\n return dst;\n}\n\n/**\n * Return max values of two vectors.\n * Given vectors a and b returns\n * [max(a[0], b[0]), max(a[1], b[1]), max(a[2], b[2])].\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The max components vector.\n */\nexport function max(a: Vec2, b: Vec2, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = Math.max(a[0], b[0]);\n dst[1] = Math.max(a[1], b[1]);\n\n return dst;\n}\n\n/**\n * Return min values of two vectors.\n * Given vectors a and b returns\n * [min(a[0], b[0]), min(a[1], b[1]), min(a[2], b[2])].\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The min components vector.\n */\nexport function min(a: Vec2, b: Vec2, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = Math.min(a[0], b[0]);\n dst[1] = Math.min(a[1], b[1]);\n\n return dst;\n}\n\n/**\n * Multiplies a vector by a scalar.\n * @param v - The vector.\n * @param k - The scalar.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The scaled vector.\n */\nexport function mulScalar(v: Vec2, k: number, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = v[0] * k;\n dst[1] = v[1] * k;\n\n return dst;\n}\n\n/**\n * Multiplies a vector by a scalar. (same as mulScalar)\n * @param v - The vector.\n * @param k - The scalar.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The scaled vector.\n */\nexport const scale = mulScalar;\n\n/**\n * Divides a vector by a scalar.\n * @param v - The vector.\n * @param k - The scalar.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The scaled vector.\n */\nexport function divScalar(v: Vec2, k: number, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = v[0] / k;\n dst[1] = v[1] / k;\n\n return dst;\n}\n\n/**\n * Inverse a vector.\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The inverted vector.\n */\nexport function inverse(v: Vec2, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = 1 / v[0];\n dst[1] = 1 / v[1];\n\n return dst;\n}\n\n/**\n * Invert a vector. (same as inverse)\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The inverted vector.\n */\nexport const invert = inverse;\n\n/**\n * Computes the cross product of two vectors; assumes both vectors have\n * three entries.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The vector of a cross b.\n */\nexport function cross(a: Vec2, b: Vec2, dst?: Vec3): Vec3 {\n dst = dst || new Vec3Type(3);\n const z = a[0] * b[1] - a[1] * b[0];\n dst[0] = 0;\n dst[1] = 0;\n dst[2] = z;\n\n return dst;\n}\n\n/**\n * Computes the dot product of two vectors; assumes both vectors have\n * three entries.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @returns dot product\n */\nexport function dot(a: Vec2, b: Vec2): number {\n return a[0] * b[0] + a[1] * b[1];\n}\n\n/**\n * Computes the length of vector\n * @param v - vector.\n * @returns length of vector.\n */\nexport function length(v: Vec2): number {\n const v0 = v[0];\n const v1 = v[1];\n return Math.sqrt(v0 * v0 + v1 * v1);\n}\n\n/**\n * Computes the length of vector (same as length)\n * @param v - vector.\n * @returns length of vector.\n */\nexport const len = length;\n\n/**\n * Computes the square of the length of vector\n * @param v - vector.\n * @returns square of the length of vector.\n */\nexport function lengthSq(v: Vec2): number {\n const v0 = v[0];\n const v1 = v[1];\n return v0 * v0 + v1 * v1;\n}\n\n/**\n * Computes the square of the length of vector (same as lengthSq)\n * @param v - vector.\n * @returns square of the length of vector.\n */\nexport const lenSq = lengthSq;\n\n/**\n * Computes the distance between 2 points\n * @param a - vector.\n * @param b - vector.\n * @returns distance between a and b\n */\nexport function distance(a: Vec2, b: Vec2): number {\n const dx = a[0] - b[0];\n const dy = a[1] - b[1];\n return Math.sqrt(dx * dx + dy * dy);\n}\n\n/**\n * Computes the distance between 2 points (same as distance)\n * @param a - vector.\n * @param b - vector.\n * @returns distance between a and b\n */\nexport const dist = distance;\n\n/**\n * Computes the square of the distance between 2 points\n * @param a - vector.\n * @param b - vector.\n * @returns square of the distance between a and b\n */\nexport function distanceSq(a: Vec2, b: Vec2): number {\n const dx = a[0] - b[0];\n const dy = a[1] - b[1];\n return dx * dx + dy * dy;\n}\n\n/**\n * Computes the square of the distance between 2 points (same as distanceSq)\n * @param a - vector.\n * @param b - vector.\n * @returns square of the distance between a and b\n */\nexport const distSq = distanceSq;\n\n/**\n * Divides a vector by its Euclidean length and returns the quotient.\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The normalized vector.\n */\nexport function normalize(v: Vec2, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n const v0 = v[0];\n const v1 = v[1];\n const len = Math.sqrt(v0 * v0 + v1 * v1);\n\n if (len > 0.00001) {\n dst[0] = v0 / len;\n dst[1] = v1 / len;\n } else {\n dst[0] = 0;\n dst[1] = 0;\n }\n\n return dst;\n}\n\n/**\n * Negates a vector.\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns -v.\n */\nexport function negate(v: Vec2, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = -v[0];\n dst[1] = -v[1];\n\n return dst;\n}\n\n/**\n * Copies a vector. (same as {@link vec2.clone})\n * Also see {@link vec2.create} and {@link vec2.set}\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A copy of v.\n */\nexport function copy(v: Vec2, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = v[0];\n dst[1] = v[1];\n\n return dst;\n}\n\n/**\n * Clones a vector. (same as {@link vec2.copy})\n * Also see {@link vec2.create} and {@link vec2.set}\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A copy of v.\n */\nexport const clone = copy;\n\n/**\n * Multiplies a vector by another vector (component-wise); assumes a and\n * b have the same length.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The vector of products of entries of a and b.\n */\nexport function multiply(a: Vec2, b: Vec2, dst?: Vec2) {\n dst = dst || new VecType(2);\n\n dst[0] = a[0] * b[0];\n dst[1] = a[1] * b[1];\n\n return dst;\n}\n\n/**\n * Multiplies a vector by another vector (component-wise); assumes a and\n * b have the same length. (same as mul)\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The vector of products of entries of a and b.\n */\nexport const mul = multiply;\n\n/**\n * Divides a vector by another vector (component-wise); assumes a and\n * b have the same length.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The vector of quotients of entries of a and b.\n */\nexport function divide(a: Vec2, b: Vec2, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = a[0] / b[0];\n dst[1] = a[1] / b[1];\n\n return dst;\n}\n\n/**\n * Divides a vector by another vector (component-wise); assumes a and\n * b have the same length. (same as divide)\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The vector of quotients of entries of a and b.\n */\nexport const div = divide;\n\n/**\n * Creates a random unit vector * scale\n * @param scale - Default 1\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The random vector.\n */\nexport function random(scale = 1, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n const angle = Math.random() * 2 * Math.PI;\n dst[0] = Math.cos(angle) * scale;\n dst[1] = Math.sin(angle) * scale;\n\n return dst;\n}\n\n/**\n * Zero's a vector\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The zeroed vector.\n */\nexport function zero(dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = 0;\n dst[1] = 0;\n\n return dst;\n}\n\n\n/**\n * transform Vec2 by 4x4 matrix\n * @param v - the vector\n * @param m - The matrix.\n * @param dst - optional Vec2 to store result. If not passed a new one is created.\n * @returns the transformed vector\n */\nexport function transformMat4(v: Vec2, m: Mat4, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n const x = v[0];\n const y = v[1];\n\n dst[0] = x * m[0] + y * m[4] + m[12];\n dst[1] = x * m[1] + y * m[5] + m[13];\n\n return dst;\n}\n\n/**\n * Transforms vec4 by 3x3 matrix\n *\n * @param v - the vector\n * @param m - The matrix.\n * @param dst - optional Vec2 to store result. If not passed a new one is created.\n * @returns the transformed vector\n */\nexport function transformMat3(v: Vec2, m: Mat3, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n const x = v[0];\n const y = v[1];\n\n dst[0] = m[0] * x + m[4] * y + m[8];\n dst[1] = m[1] * x + m[5] * y + m[9];\n\n return dst;\n}\n\n","/*\n * Copyright 2022 Gregg Tavares\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n */\n\nimport * as utils from './utils.js';\nimport { Quat } from './quat';\nimport { Mat3 } from './mat3';\nimport { Mat4 } from './mat4';\nimport Vec2, * as vec2 from './vec2-impl';\n\nexport default Mat3;\n\nexport type Mat3LikeCtor = new (n: number) => Mat3;\n\n/**\n * 3x3 Matrix math math functions.\n *\n * Almost all functions take an optional `dst` argument. If it is not passed in the\n * functions will create a new matrix. In other words you can do this\n *\n * const mat = mat3.translation([1, 2, 3]); // Creates a new translation matrix\n *\n * or\n *\n * const mat = mat3.create();\n * mat3.translation([1, 2, 3], mat); // Puts translation matrix in mat.\n *\n * The first style is often easier but depending on where it's used it generates garbage where\n * as there is almost never allocation with the second style.\n *\n * It is always save to pass any matrix as the destination. So for example\n *\n * const mat = mat3.identity();\n * const trans = mat3.translation([1, 2, 3]);\n * mat3.multiply(mat, trans, mat); // Multiplies mat * trans and puts result in mat.\n *\n */\nlet MatType: Mat3LikeCtor = Float32Array;\n\n// This mess is because with Mat3 we have 3 unused elements.\n// For Float32Array and Float64Array that's not an issue\n// but for Array it's troublesome\nconst ctorMap = new Map Mat3>([\n [Float32Array, () => new Float32Array(12)],\n [Float64Array, () => new Float64Array(12)],\n [Array, () => new Array(12).fill(0)],\n]);\nlet newMat3: () => Mat3 = ctorMap.get(Float32Array)!;\n\n/**\n * Sets the type this library creates for a Mat3\n * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array`\n * @returns previous constructor for Mat3\n */\nexport function setDefaultType(ctor: new (n: number) => Mat3) {\n const oldType = MatType;\n MatType = ctor;\n newMat3 = ctorMap.get(ctor)!;\n return oldType;\n}\n\n/**\n * Create a Mat3 from values\n *\n * Note: Since passing in a raw JavaScript array\n * is valid in all circumstances, if you want to\n * force a JavaScript array into a Mat3's specified type\n * it would be faster to use\n *\n * ```\n * const m = mat3.clone(someJSArray);\n * ```\n *\n * Note: a consequence of the implementation is if your Mat3Type = `Array`\n * instead of `Float32Array` or `Float64Array` then any values you\n * don't pass in will be undefined. Usually this is not an issue since\n * (a) using `Array` is rare and (b) using `mat3.create` is usually used\n * to create a Mat3 to be filled out as in\n *\n * ```\n * const m = mat3.create();\n * mat3.perspective(fov, aspect, near, far, m);\n * ```\n *\n * @param v0 - value for element 0\n * @param v1 - value for element 1\n * @param v2 - value for element 2\n * @param v3 - value for element 3\n * @param v4 - value for element 4\n * @param v5 - value for element 5\n * @param v6 - value for element 6\n * @param v7 - value for element 7\n * @param v8 - value for element 8\n * @returns matrix created from values.\n */\nexport function create(\n v0?: number, v1?: number, v2?: number,\n v3?: number, v4?: number, v5?: number,\n v6?: number, v7?: number, v8?: number): Mat3 {\n const dst = newMat3();\n // to make the array homogenous\n dst[3] = 0;\n dst[7] = 0;\n dst[11] = 0;\n\n if (v0 !== undefined) {\n dst[0] = v0;\n if (v1 !== undefined) {\n dst[1] = v1;\n if (v2 !== undefined) {\n dst[2] = v2;\n if (v3 !== undefined) {\n dst[4] = v3;\n if (v4 !== undefined) {\n dst[5] = v4;\n if (v5 !== undefined) {\n dst[6] = v5;\n if (v6 !== undefined) {\n dst[8] = v6;\n if (v7 !== undefined) {\n dst[9] = v7;\n if (v8 !== undefined) {\n dst[10] = v8;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n return dst;\n}\n\n/**\n * Sets the values of a Mat3\n * Also see {@link mat3.create} and {@link mat3.copy}\n *\n * @param v0 - value for element 0\n * @param v1 - value for element 1\n * @param v2 - value for element 2\n * @param v3 - value for element 3\n * @param v4 - value for element 4\n * @param v5 - value for element 5\n * @param v6 - value for element 6\n * @param v7 - value for element 7\n * @param v8 - value for element 8\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns Mat3 set from values.\n */\nexport function set(\n v0: number, v1: number, v2: number,\n v3: number, v4: number, v5: number,\n v6: number, v7: number, v8: number, dst?: Mat3) {\n dst = dst || newMat3();\n\n dst[0] = v0; dst[1] = v1; dst[ 2] = v2; dst[ 3] = 0;\n dst[4] = v3; dst[5] = v4; dst[ 6] = v5; dst[ 7] = 0;\n dst[8] = v6; dst[9] = v7; dst[10] = v8; dst[11] = 0;\n\n return dst;\n}\n\n/**\n * Creates a Mat3 from the upper left 3x3 part of a Mat4\n * @param m4 - source matrix\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns Mat3 made from m4\n */\nexport function fromMat4(m4: Mat4, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n dst[0] = m4[0]; dst[1] = m4[1]; dst[ 2] = m4[ 2]; dst[ 3] = 0;\n dst[4] = m4[4]; dst[5] = m4[5]; dst[ 6] = m4[ 6]; dst[ 7] = 0;\n dst[8] = m4[8]; dst[9] = m4[9]; dst[10] = m4[10]; dst[11] = 0;\n return dst;\n}\n\n/**\n * Creates a Mat3 rotation matrix from a quaternion\n * @param q - quaternion to create matrix from\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns Mat3 made from q\n */\nexport function fromQuat(q: Quat, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n\n const x = q[0]; const y = q[1]; const z = q[2]; const w = q[3];\n const x2 = x + x; const y2 = y + y; const z2 = z + z;\n\n const xx = x * x2;\n const yx = y * x2;\n const yy = y * y2;\n const zx = z * x2;\n const zy = z * y2;\n const zz = z * z2;\n const wx = w * x2;\n const wy = w * y2;\n const wz = w * z2;\n\n dst[ 0] = 1 - yy - zz; dst[ 1] = yx + wz; dst[ 2] = zx - wy; dst[ 3] = 0;\n dst[ 4] = yx - wz; dst[ 5] = 1 - xx - zz; dst[ 6] = zy + wx; dst[ 7] = 0;\n dst[ 8] = zx + wy; dst[ 9] = zy - wx; dst[10] = 1 - xx - yy; dst[11] = 0;\n\n return dst;\n}\n\n/**\n * Negates a matrix.\n * @param m - The matrix.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns -m.\n */\nexport function negate(m: Mat3, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n\n dst[ 0] = -m[ 0]; dst[ 1] = -m[ 1]; dst[ 2] = -m[ 2];\n dst[ 4] = -m[ 4]; dst[ 5] = -m[ 5]; dst[ 6] = -m[ 6];\n dst[ 8] = -m[ 8]; dst[ 9] = -m[ 9]; dst[10] = -m[10];\n\n return dst;\n}\n\n/**\n * Copies a matrix. (same as {@link mat3.clone})\n * Also see {@link mat3.create} and {@link mat3.set}\n * @param m - The matrix.\n * @param dst - The matrix. If not passed a new one is created.\n * @returns A copy of m.\n */\nexport function copy(m: Mat3, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n\n dst[ 0] = m[ 0]; dst[ 1] = m[ 1]; dst[ 2] = m[ 2];\n dst[ 4] = m[ 4]; dst[ 5] = m[ 5]; dst[ 6] = m[ 6];\n dst[ 8] = m[ 8]; dst[ 9] = m[ 9]; dst[10] = m[10];\n\n return dst;\n}\n\n/**\n * Copies a matrix (same as {@link mat3.copy})\n * Also see {@link mat3.create} and {@link mat3.set}\n * @param m - The matrix.\n * @param dst - The matrix. If not passed a new one is created.\n * @returns A copy of m.\n */\nexport const clone = copy;\n\n/**\n * Check if 2 matrices are approximately equal\n * @param a Operand matrix.\n * @param b Operand matrix.\n * @returns true if matrices are approximately equal\n */\nexport function equalsApproximately(a: Mat3, b: Mat3): boolean {\n return Math.abs(a[ 0] - b[ 0]) < utils.EPSILON &&\n Math.abs(a[ 1] - b[ 1]) < utils.EPSILON &&\n Math.abs(a[ 2] - b[ 2]) < utils.EPSILON &&\n Math.abs(a[ 4] - b[ 4]) < utils.EPSILON &&\n Math.abs(a[ 5] - b[ 5]) < utils.EPSILON &&\n Math.abs(a[ 6] - b[ 6]) < utils.EPSILON &&\n Math.abs(a[ 8] - b[ 8]) < utils.EPSILON &&\n Math.abs(a[ 9] - b[ 9]) < utils.EPSILON &&\n Math.abs(a[10] - b[10]) < utils.EPSILON;\n}\n\n/**\n * Check if 2 matrices are exactly equal\n * @param a Operand matrix.\n * @param b Operand matrix.\n * @returns true if matrices are exactly equal\n */\nexport function equals(a: Mat3, b: Mat3): boolean {\n return a[ 0] === b[ 0] &&\n a[ 1] === b[ 1] &&\n a[ 2] === b[ 2] &&\n a[ 4] === b[ 4] &&\n a[ 5] === b[ 5] &&\n a[ 6] === b[ 6] &&\n a[ 8] === b[ 8] &&\n a[ 9] === b[ 9] &&\n a[10] === b[10];\n}\n\n/**\n * Creates a 3-by-3 identity matrix.\n *\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns A 3-by-3 identity matrix.\n */\nexport function identity(dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n\n dst[ 0] = 1; dst[ 1] = 0; dst[ 2] = 0;\n dst[ 4] = 0; dst[ 5] = 1; dst[ 6] = 0;\n dst[ 8] = 0; dst[ 9] = 0; dst[10] = 1;\n\n return dst;\n}\n\n/**\n * Takes the transpose of a matrix.\n * @param m - The matrix.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The transpose of m.\n */\nexport function transpose(m: Mat3, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n if (dst === m) {\n let t: number;\n\n // 0 1 2\n // 4 5 6\n // 8 9 10\n\n t = m[1];\n m[1] = m[4];\n m[4] = t;\n\n t = m[2];\n m[2] = m[8];\n m[8] = t;\n\n t = m[6];\n m[6] = m[9];\n m[9] = t;\n\n return dst;\n }\n\n const m00 = m[0 * 4 + 0];\n const m01 = m[0 * 4 + 1];\n const m02 = m[0 * 4 + 2];\n const m10 = m[1 * 4 + 0];\n const m11 = m[1 * 4 + 1];\n const m12 = m[1 * 4 + 2];\n const m20 = m[2 * 4 + 0];\n const m21 = m[2 * 4 + 1];\n const m22 = m[2 * 4 + 2];\n\n dst[ 0] = m00; dst[ 1] = m10; dst[ 2] = m20;\n dst[ 4] = m01; dst[ 5] = m11; dst[ 6] = m21;\n dst[ 8] = m02; dst[ 9] = m12; dst[10] = m22;\n\n return dst;\n}\n\n/**\n * Computes the inverse of a 3-by-3 matrix.\n * @param m - The matrix.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The inverse of m.\n */\nexport function inverse(m: Mat3, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n\n const m00 = m[0 * 4 + 0];\n const m01 = m[0 * 4 + 1];\n const m02 = m[0 * 4 + 2];\n const m10 = m[1 * 4 + 0];\n const m11 = m[1 * 4 + 1];\n const m12 = m[1 * 4 + 2];\n const m20 = m[2 * 4 + 0];\n const m21 = m[2 * 4 + 1];\n const m22 = m[2 * 4 + 2];\n\n const b01 = m22 * m11 - m12 * m21;\n const b11 = -m22 * m10 + m12 * m20;\n const b21 = m21 * m10 - m11 * m20;\n\n const invDet = 1 / (m00 * b01 + m01 * b11 + m02 * b21);\n\n dst[ 0] = b01 * invDet;\n dst[ 1] = (-m22 * m01 + m02 * m21) * invDet;\n dst[ 2] = ( m12 * m01 - m02 * m11) * invDet;\n dst[ 4] = b11 * invDet;\n dst[ 5] = ( m22 * m00 - m02 * m20) * invDet;\n dst[ 6] = (-m12 * m00 + m02 * m10) * invDet;\n dst[ 8] = b21 * invDet;\n dst[ 9] = (-m21 * m00 + m01 * m20) * invDet;\n dst[10] = ( m11 * m00 - m01 * m10) * invDet;\n\n return dst;\n}\n\n/**\n * Compute the determinant of a matrix\n * @param m - the matrix\n * @returns the determinant\n */\nexport function determinant(m: Mat3): number {\n const m00 = m[0 * 4 + 0];\n const m01 = m[0 * 4 + 1];\n const m02 = m[0 * 4 + 2];\n const m10 = m[1 * 4 + 0];\n const m11 = m[1 * 4 + 1];\n const m12 = m[1 * 4 + 2];\n const m20 = m[2 * 4 + 0];\n const m21 = m[2 * 4 + 1];\n const m22 = m[2 * 4 + 2];\n\n return m00 * (m11 * m22 - m21 * m12) -\n m10 * (m01 * m22 - m21 * m02) +\n m20 * (m01 * m12 - m11 * m02);\n}\n\n/**\n * Computes the inverse of a 3-by-3 matrix. (same as inverse)\n * @param m - The matrix.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The inverse of m.\n */\nexport const invert = inverse;\n\n/**\n * Multiplies two 3-by-3 matrices with a on the left and b on the right\n * @param a - The matrix on the left.\n * @param b - The matrix on the right.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The matrix product of a and b.\n */\nexport function multiply(a: Mat3, b: Mat3, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n\n const a00 = a[0];\n const a01 = a[1];\n const a02 = a[2];\n const a10 = a[ 4 + 0];\n const a11 = a[ 4 + 1];\n const a12 = a[ 4 + 2];\n const a20 = a[ 8 + 0];\n const a21 = a[ 8 + 1];\n const a22 = a[ 8 + 2];\n const b00 = b[0];\n const b01 = b[1];\n const b02 = b[2];\n const b10 = b[ 4 + 0];\n const b11 = b[ 4 + 1];\n const b12 = b[ 4 + 2];\n const b20 = b[ 8 + 0];\n const b21 = b[ 8 + 1];\n const b22 = b[ 8 + 2];\n\n dst[ 0] = a00 * b00 + a10 * b01 + a20 * b02;\n dst[ 1] = a01 * b00 + a11 * b01 + a21 * b02;\n dst[ 2] = a02 * b00 + a12 * b01 + a22 * b02;\n dst[ 4] = a00 * b10 + a10 * b11 + a20 * b12;\n dst[ 5] = a01 * b10 + a11 * b11 + a21 * b12;\n dst[ 6] = a02 * b10 + a12 * b11 + a22 * b12;\n dst[ 8] = a00 * b20 + a10 * b21 + a20 * b22;\n dst[ 9] = a01 * b20 + a11 * b21 + a21 * b22;\n dst[10] = a02 * b20 + a12 * b21 + a22 * b22;\n\n return dst;\n}\n\n/**\n * Multiplies two 3-by-3 matrices with a on the left and b on the right (same as multiply)\n * @param a - The matrix on the left.\n * @param b - The matrix on the right.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The matrix product of a and b.\n */\nexport const mul = multiply;\n\n/**\n * Sets the translation component of a 3-by-3 matrix to the given\n * vector.\n * @param a - The matrix.\n * @param v - The vector.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The matrix with translation set.\n */\nexport function setTranslation(a: Mat3, v: Vec2, dst?: Mat3): Mat3 {\n dst = dst || identity();\n if (a !== dst) {\n dst[ 0] = a[ 0];\n dst[ 1] = a[ 1];\n dst[ 2] = a[ 2];\n dst[ 4] = a[ 4];\n dst[ 5] = a[ 5];\n dst[ 6] = a[ 6];\n }\n dst[ 8] = v[0];\n dst[ 9] = v[1];\n dst[10] = 1;\n return dst;\n}\n\n/**\n * Returns the translation component of a 3-by-3 matrix as a vector with 3\n * entries.\n * @param m - The matrix.\n * @param dst - vector to hold result. If not passed a new one is created.\n * @returns The translation component of m.\n */\nexport function getTranslation(m: Mat3, dst?: Vec2): Vec2 {\n dst = dst || vec2.create();\n dst[0] = m[8];\n dst[1] = m[9];\n return dst;\n}\n\n/**\n * Returns an axis of a 3x3 matrix as a vector with 2 entries\n * @param m - The matrix.\n * @param axis - The axis 0 = x, 1 = y,\n * @returns The axis component of m.\n */\nexport function getAxis(m: Mat3, axis: number, dst?: Vec2): Vec2 {\n dst = dst || vec2.create();\n const off = axis * 4;\n dst[0] = m[off + 0];\n dst[1] = m[off + 1];\n return dst;\n}\n\n/**\n * Sets an axis of a 3x3 matrix as a vector with 2 entries\n * @param m - The matrix.\n * @param v - the axis vector\n * @param axis - The axis 0 = x, 1 = y;\n * @param dst - The matrix to set. If not passed a new one is created.\n * @returns The matrix with axis set.\n */\nexport function setAxis(m: Mat3, v: Vec2, axis: number, dst?: Mat3): Mat3 {\n if (dst !== m) {\n dst = copy(m, dst);\n }\n const off = axis * 4;\n dst[off + 0] = v[0];\n dst[off + 1] = v[1];\n return dst;\n}\n\n/**\n * Returns the scaling component of the matrix\n * @param m - The Matrix\n * @param dst - The vector to set. If not passed a new one is created.\n */\nexport function getScaling(m: Mat3, dst?: Vec2): Vec2 {\n dst = dst || vec2.create();\n\n const xx = m[0];\n const xy = m[1];\n const yx = m[4];\n const yy = m[5];\n\n dst[0] = Math.sqrt(xx * xx + xy * xy);\n dst[1] = Math.sqrt(yx * yx + yy * yy);\n\n return dst;\n}\n\n/**\n * Creates a 3-by-3 matrix which translates by the given vector v.\n * @param v - The vector by which to translate.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The translation matrix.\n */\nexport function translation(v: Vec2, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n\n dst[ 0] = 1; dst[ 1] = 0; dst[ 2] = 0;\n dst[ 4] = 0; dst[ 5] = 1; dst[ 6] = 0;\n dst[ 8] = v[0]; dst[ 9] = v[1]; dst[10] = 1;\n\n return dst;\n}\n\n/**\n * Translates the given 3-by-3 matrix by the given vector v.\n * @param m - The matrix.\n * @param v - The vector by which to translate.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The translated matrix.\n */\nexport function translate(m: Mat3, v: Vec2, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n\n const v0 = v[0];\n const v1 = v[1];\n\n const m00 = m[0];\n const m01 = m[1];\n const m02 = m[2];\n const m10 = m[1 * 4 + 0];\n const m11 = m[1 * 4 + 1];\n const m12 = m[1 * 4 + 2];\n const m20 = m[2 * 4 + 0];\n const m21 = m[2 * 4 + 1];\n const m22 = m[2 * 4 + 2];\n\n if (m !== dst) {\n dst[ 0] = m00;\n dst[ 1] = m01;\n dst[ 2] = m02;\n dst[ 4] = m10;\n dst[ 5] = m11;\n dst[ 6] = m12;\n }\n\n dst[ 8] = m00 * v0 + m10 * v1 + m20;\n dst[ 9] = m01 * v0 + m11 * v1 + m21;\n dst[10] = m02 * v0 + m12 * v1 + m22;\n\n return dst;\n}\n\n/**\n * Creates a 3-by-3 matrix which rotates by the given angle.\n * @param angleInRadians - The angle by which to rotate (in radians).\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The rotation matrix.\n */\nexport function rotation(angleInRadians: number, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n\n const c = Math.cos(angleInRadians);\n const s = Math.sin(angleInRadians);\n\n dst[ 0] = c; dst[ 1] = s; dst[ 2] = 0;\n dst[ 4] = -s; dst[ 5] = c; dst[ 6] = 0;\n dst[ 8] = 0; dst[ 9] = 0; dst[10] = 1;\n\n return dst;\n}\n\n/**\n * Rotates the given 3-by-3 matrix by the given angle.\n * @param m - The matrix.\n * @param angleInRadians - The angle by which to rotate (in radians).\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The rotated matrix.\n */\nexport function rotate(m: Mat3, angleInRadians: number, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n\n const m00 = m[0 * 4 + 0];\n const m01 = m[0 * 4 + 1];\n const m02 = m[0 * 4 + 2];\n const m10 = m[1 * 4 + 0];\n const m11 = m[1 * 4 + 1];\n const m12 = m[1 * 4 + 2];\n const c = Math.cos(angleInRadians);\n const s = Math.sin(angleInRadians);\n\n dst[ 0] = c * m00 + s * m10;\n dst[ 1] = c * m01 + s * m11;\n dst[ 2] = c * m02 + s * m12;\n\n dst[ 4] = c * m10 - s * m00;\n dst[ 5] = c * m11 - s * m01;\n dst[ 6] = c * m12 - s * m02;\n\n\n if (m !== dst) {\n dst[ 8] = m[ 8];\n dst[ 9] = m[ 9];\n dst[10] = m[10];\n }\n\n return dst;\n}\n\n/**\n * Creates a 3-by-3 matrix which scales in each dimension by an amount given by\n * the corresponding entry in the given vector; assumes the vector has three\n * entries.\n * @param v - A vector of\n * 2 entries specifying the factor by which to scale in each dimension.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The scaling matrix.\n */\nexport function scaling(v: Vec2, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n\n dst[ 0] = v[0]; dst[ 1] = 0; dst[ 2] = 0;\n dst[ 4] = 0; dst[ 5] = v[1]; dst[ 6] = 0;\n dst[ 8] = 0; dst[ 9] = 0; dst[10] = 1;\n\n return dst;\n}\n\n/**\n * Scales the given 3-by-3 matrix in each dimension by an amount\n * given by the corresponding entry in the given vector; assumes the vector has\n * three entries.\n * @param m - The matrix to be modified.\n * @param v - A vector of 2 entries specifying the\n * factor by which to scale in each dimension.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The scaled matrix.\n */\nexport function scale(m: Mat3, v: Vec2, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n\n const v0 = v[0];\n const v1 = v[1];\n\n dst[ 0] = v0 * m[0 * 4 + 0];\n dst[ 1] = v0 * m[0 * 4 + 1];\n dst[ 2] = v0 * m[0 * 4 + 2];\n\n dst[ 4] = v1 * m[1 * 4 + 0];\n dst[ 5] = v1 * m[1 * 4 + 1];\n dst[ 6] = v1 * m[1 * 4 + 2];\n\n if (m !== dst) {\n dst[ 8] = m[ 8];\n dst[ 9] = m[ 9];\n dst[10] = m[10];\n }\n\n return dst;\n}\n\n/**\n * Creates a 3-by-3 matrix which scales uniformly in each dimension\n * @param s - Amount to scale\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The scaling matrix.\n */\nexport function uniformScaling(s: number, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n\n dst[ 0] = s; dst[ 1] = 0; dst[ 2] = 0;\n dst[ 4] = 0; dst[ 5] = s; dst[ 6] = 0;\n dst[ 8] = 0; dst[ 9] = 0; dst[10] = 1;\n\n return dst;\n}\n\n/**\n * Scales the given 3-by-3 matrix in each dimension by an amount\n * given.\n * @param m - The matrix to be modified.\n * @param s - Amount to scale.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The scaled matrix.\n */\nexport function uniformScale(m: Mat3, s: number, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n\n dst[ 0] = s * m[0 * 4 + 0];\n dst[ 1] = s * m[0 * 4 + 1];\n dst[ 2] = s * m[0 * 4 + 2];\n\n dst[ 4] = s * m[1 * 4 + 0];\n dst[ 5] = s * m[1 * 4 + 1];\n dst[ 6] = s * m[1 * 4 + 2];\n\n if (m !== dst) {\n dst[ 8] = m[ 8];\n dst[ 9] = m[ 9];\n dst[10] = m[10];\n }\n\n return dst;\n}\n","/*\n * Copyright 2022 Gregg Tavares\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n */\nimport * as utils from './utils.js';\nimport { Vec3, create, setDefaultType, VecType } from './vec3';\nimport { Mat3 } from './mat3';\nimport { Mat4 } from './mat4';\nimport { Quat } from './quat';\n\nexport default Vec3;\nexport { create, setDefaultType };\n\n/**\n * Creates a vec3; may be called with x, y, z to set initial values. (same as create)\n * @param x - Initial x value.\n * @param y - Initial y value.\n * @param z - Initial z value.\n * @returns the created vector\n */\nexport const fromValues = create;\n\n/**\n * Sets the values of a Vec3\n * Also see {@link vec3.create} and {@link vec3.copy}\n *\n * @param x first value\n * @param y second value\n * @param z third value\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector with its elements set.\n */\nexport function set(x: number, y: number, z: number, dst?: Vec3) {\n dst = dst || new VecType(3);\n\n dst[0] = x;\n dst[1] = y;\n dst[2] = z;\n\n return dst;\n}\n\n/**\n * Applies Math.ceil to each element of vector\n * @param v - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the ceil of each element of v.\n */\nexport function ceil(v: Vec3, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = Math.ceil(v[0]);\n dst[1] = Math.ceil(v[1]);\n dst[2] = Math.ceil(v[2]);\n\n return dst;\n}\n\n/**\n * Applies Math.floor to each element of vector\n * @param v - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the floor of each element of v.\n */\nexport function floor(v: Vec3, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = Math.floor(v[0]);\n dst[1] = Math.floor(v[1]);\n dst[2] = Math.floor(v[2]);\n\n return dst;\n}\n\n/**\n * Applies Math.round to each element of vector\n * @param v - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the round of each element of v.\n */\nexport function round(v: Vec3, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = Math.round(v[0]);\n dst[1] = Math.round(v[1]);\n dst[2] = Math.round(v[2]);\n\n return dst;\n}\n\n/**\n * Clamp each element of vector between min and max\n * @param v - Operand vector.\n * @param max - Min value, default 0\n * @param min - Max value, default 1\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that the clamped value of each element of v.\n */\nexport function clamp(v: Vec3, min = 0, max = 1, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = Math.min(max, Math.max(min, v[0]));\n dst[1] = Math.min(max, Math.max(min, v[1]));\n dst[2] = Math.min(max, Math.max(min, v[2]));\n\n return dst;\n}\n\n/**\n * Adds two vectors; assumes a and b have the same dimension.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the sum of a and b.\n */\nexport function add(a: Vec3, b: Vec3, dst?: Vec3) {\n dst = dst || new VecType(3);\n\n dst[0] = a[0] + b[0];\n dst[1] = a[1] + b[1];\n dst[2] = a[2] + b[2];\n\n return dst;\n}\n\n/**\n * Adds two vectors, scaling the 2nd; assumes a and b have the same dimension.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param scale - Amount to scale b\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the sum of a + b * scale.\n */\nexport function addScaled(a: Vec3, b: Vec3, scale: number, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = a[0] + b[0] * scale;\n dst[1] = a[1] + b[1] * scale;\n dst[2] = a[2] + b[2] * scale;\n\n return dst;\n}\n\n/**\n * Returns the angle in radians between two vectors.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @returns The angle in radians between the 2 vectors.\n */\nexport function angle(a: Vec3, b: Vec3): number {\n const ax = a[0];\n const ay = a[1];\n const az = a[2];\n const bx = a[0];\n const by = a[1];\n const bz = a[2];\n const mag1 = Math.sqrt(ax * ax + ay * ay + az * az);\n const mag2 = Math.sqrt(bx * bx + by * by + bz * bz);\n const mag = mag1 * mag2;\n const cosine = mag && dot(a, b) / mag;\n return Math.acos(cosine);\n}\n\n/**\n * Subtracts two vectors.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the difference of a and b.\n */\nexport function subtract(a: Vec3, b: Vec3, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = a[0] - b[0];\n dst[1] = a[1] - b[1];\n dst[2] = a[2] - b[2];\n\n return dst;\n}\n\n/**\n * Subtracts two vectors.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the difference of a and b.\n */\nexport const sub = subtract;\n\n/**\n * Check if 2 vectors are approximately equal\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @returns true if vectors are approximately equal\n */\nexport function equalsApproximately(a: Vec3, b: Vec3): boolean {\n return Math.abs(a[0] - b[0]) < utils.EPSILON &&\n Math.abs(a[1] - b[1]) < utils.EPSILON &&\n Math.abs(a[2] - b[2]) < utils.EPSILON;\n}\n\n/**\n * Check if 2 vectors are exactly equal\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @returns true if vectors are exactly equal\n */\nexport function equals(a: Vec3, b: Vec3): boolean {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2];\n}\n\n/**\n * Performs linear interpolation on two vectors.\n * Given vectors a and b and interpolation coefficient t, returns\n * a + t * (b - a).\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param t - Interpolation coefficient.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The linear interpolated result.\n */\nexport function lerp(a: Vec3, b: Vec3, t: number, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = a[0] + t * (b[0] - a[0]);\n dst[1] = a[1] + t * (b[1] - a[1]);\n dst[2] = a[2] + t * (b[2] - a[2]);\n\n return dst;\n}\n\n/**\n * Performs linear interpolation on two vectors.\n * Given vectors a and b and interpolation coefficient vector t, returns\n * a + t * (b - a).\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param t - Interpolation coefficients vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns the linear interpolated result.\n */\nexport function lerpV(a: Vec3, b: Vec3, t: Vec3, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = a[0] + t[0] * (b[0] - a[0]);\n dst[1] = a[1] + t[1] * (b[1] - a[1]);\n dst[2] = a[2] + t[2] * (b[2] - a[2]);\n\n return dst;\n}\n\n/**\n * Return max values of two vectors.\n * Given vectors a and b returns\n * [max(a[0], b[0]), max(a[1], b[1]), max(a[2], b[2])].\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The max components vector.\n */\nexport function max(a: Vec3, b: Vec3, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = Math.max(a[0], b[0]);\n dst[1] = Math.max(a[1], b[1]);\n dst[2] = Math.max(a[2], b[2]);\n\n return dst;\n}\n\n/**\n * Return min values of two vectors.\n * Given vectors a and b returns\n * [min(a[0], b[0]), min(a[1], b[1]), min(a[2], b[2])].\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The min components vector.\n */\nexport function min(a: Vec3, b: Vec3, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = Math.min(a[0], b[0]);\n dst[1] = Math.min(a[1], b[1]);\n dst[2] = Math.min(a[2], b[2]);\n\n return dst;\n}\n\n/**\n * Multiplies a vector by a scalar.\n * @param v - The vector.\n * @param k - The scalar.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The scaled vector.\n */\nexport function mulScalar(v: Vec3, k: number, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = v[0] * k;\n dst[1] = v[1] * k;\n dst[2] = v[2] * k;\n\n return dst;\n}\n\n/**\n * Multiplies a vector by a scalar. (same as mulScalar)\n * @param v - The vector.\n * @param k - The scalar.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The scaled vector.\n */\nexport const scale = mulScalar;\n\n/**\n * Divides a vector by a scalar.\n * @param v - The vector.\n * @param k - The scalar.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The scaled vector.\n */\nexport function divScalar(v: Vec3, k: number, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = v[0] / k;\n dst[1] = v[1] / k;\n dst[2] = v[2] / k;\n\n return dst;\n}\n\n/**\n * Inverse a vector.\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The inverted vector.\n */\nexport function inverse(v: Vec3, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = 1 / v[0];\n dst[1] = 1 / v[1];\n dst[2] = 1 / v[2];\n\n return dst;\n}\n\n/**\n * Invert a vector. (same as inverse)\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The inverted vector.\n */\nexport const invert = inverse;\n\n/**\n * Computes the cross product of two vectors; assumes both vectors have\n * three entries.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The vector of a cross b.\n */\nexport function cross(a: Vec3, b: Vec3, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n const t1 = a[2] * b[0] - a[0] * b[2];\n const t2 = a[0] * b[1] - a[1] * b[0];\n dst[0] = a[1] * b[2] - a[2] * b[1];\n dst[1] = t1;\n dst[2] = t2;\n\n return dst;\n}\n\n/**\n * Computes the dot product of two vectors; assumes both vectors have\n * three entries.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @returns dot product\n */\nexport function dot(a: Vec3, b: Vec3): number {\n return (a[0] * b[0]) + (a[1] * b[1]) + (a[2] * b[2]);\n}\n\n/**\n * Computes the length of vector\n * @param v - vector.\n * @returns length of vector.\n */\nexport function length(v: Vec3): number {\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n return Math.sqrt(v0 * v0 + v1 * v1 + v2 * v2);\n}\n\n/**\n * Computes the length of vector (same as length)\n * @param v - vector.\n * @returns length of vector.\n */\nexport const len = length;\n\n/**\n * Computes the square of the length of vector\n * @param v - vector.\n * @returns square of the length of vector.\n */\nexport function lengthSq(v: Vec3): number {\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n return v0 * v0 + v1 * v1 + v2 * v2;\n}\n\n/**\n * Computes the square of the length of vector (same as lengthSq)\n * @param v - vector.\n * @returns square of the length of vector.\n */\nexport const lenSq = lengthSq;\n\n/**\n * Computes the distance between 2 points\n * @param a - vector.\n * @param b - vector.\n * @returns distance between a and b\n */\nexport function distance(a: Vec3, b: Vec3): number {\n const dx = a[0] - b[0];\n const dy = a[1] - b[1];\n const dz = a[2] - b[2];\n return Math.sqrt(dx * dx + dy * dy + dz * dz);\n}\n\n/**\n * Computes the distance between 2 points (same as distance)\n * @param a - vector.\n * @param b - vector.\n * @returns distance between a and b\n */\nexport const dist = distance;\n\n/**\n * Computes the square of the distance between 2 points\n * @param a - vector.\n * @param b - vector.\n * @returns square of the distance between a and b\n */\nexport function distanceSq(a: Vec3, b: Vec3): number {\n const dx = a[0] - b[0];\n const dy = a[1] - b[1];\n const dz = a[2] - b[2];\n return dx * dx + dy * dy + dz * dz;\n}\n\n/**\n * Computes the square of the distance between 2 points (same as distanceSq)\n * @param a - vector.\n * @param b - vector.\n * @returns square of the distance between a and b\n */\nexport const distSq = distanceSq;\n\n/**\n * Divides a vector by its Euclidean length and returns the quotient.\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The normalized vector.\n */\nexport function normalize(v: Vec3, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n const len = Math.sqrt(v0 * v0 + v1 * v1 + v2 * v2);\n\n if (len > 0.00001) {\n dst[0] = v0 / len;\n dst[1] = v1 / len;\n dst[2] = v2 / len;\n } else {\n dst[0] = 0;\n dst[1] = 0;\n dst[2] = 0;\n }\n\n\n return dst;\n}\n\n/**\n * Negates a vector.\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns -v.\n */\nexport function negate(v: Vec3, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = -v[0];\n dst[1] = -v[1];\n dst[2] = -v[2];\n\n return dst;\n}\n\n/**\n * Copies a vector. (same as {@link vec3.clone})\n * Also see {@link vec3.create} and {@link vec3.set}\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A copy of v.\n */\nexport function copy(v: Vec3, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = v[0];\n dst[1] = v[1];\n dst[2] = v[2];\n\n return dst;\n}\n\n/**\n * Clones a vector. (same as {@link vec3.copy})\n * Also see {@link vec3.create} and {@link vec3.set}\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A copy of v.\n */\nexport const clone = copy;\n\n/**\n * Multiplies a vector by another vector (component-wise); assumes a and\n * b have the same length.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The vector of products of entries of a and b.\n */\nexport function multiply(a: Vec3, b: Vec3, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = a[0] * b[0];\n dst[1] = a[1] * b[1];\n dst[2] = a[2] * b[2];\n\n return dst;\n}\n\n/**\n * Multiplies a vector by another vector (component-wise); assumes a and\n * b have the same length. (same as mul)\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The vector of products of entries of a and b.\n */\nexport const mul = multiply;\n\n/**\n * Divides a vector by another vector (component-wise); assumes a and\n * b have the same length.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The vector of quotients of entries of a and b.\n */\nexport function divide(a: Vec3, b: Vec3, dst?: Vec3) {\n dst = dst || new VecType(3);\n\n dst[0] = a[0] / b[0];\n dst[1] = a[1] / b[1];\n dst[2] = a[2] / b[2];\n\n return dst;\n}\n\n/**\n * Divides a vector by another vector (component-wise); assumes a and\n * b have the same length. (same as divide)\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The vector of quotients of entries of a and b.\n */\nexport const div = divide;\n\n/**\n * Creates a random vector\n * @param scale - Default 1\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The random vector.\n */\nexport function random(scale = 1, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n const angle = Math.random() * 2 * Math.PI;\n const z = Math.random() * 2 - 1;\n const zScale = Math.sqrt(1 - z * z) * scale;\n dst[0] = Math.cos(angle) * zScale;\n dst[1] = Math.sin(angle) * zScale;\n dst[2] = z * scale;\n\n return dst;\n}\n\n/**\n * Zero's a vector\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The zeroed vector.\n */\nexport function zero(dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = 0;\n dst[1] = 0;\n dst[2] = 0;\n\n return dst;\n}\n\n\n/**\n * transform vec3 by 4x4 matrix\n * @param v - the vector\n * @param m - The matrix.\n * @param dst - optional vec3 to store result. If not passed a new one is created.\n * @returns the transformed vector\n */\nexport function transformMat4(v: Vec3, m: Mat4, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n const x = v[0];\n const y = v[1];\n const z = v[2];\n const w = (m[3] * x + m[7] * y + m[11] * z + m[15]) || 1;\n\n dst[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;\n dst[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;\n dst[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;\n\n return dst;\n}\n\n/**\n * Transform vec4 by upper 3x3 matrix inside 4x4 matrix.\n * @param v - The direction.\n * @param m - The matrix.\n * @param dst - optional Vec3 to store result. If not passed a new one is created.\n * @returns The transformed vector.\n */\nexport function transformMat4Upper3x3(v: Vec3, m: Mat4, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n\n dst[0] = v0 * m[0 * 4 + 0] + v1 * m[1 * 4 + 0] + v2 * m[2 * 4 + 0];\n dst[1] = v0 * m[0 * 4 + 1] + v1 * m[1 * 4 + 1] + v2 * m[2 * 4 + 1];\n dst[2] = v0 * m[0 * 4 + 2] + v1 * m[1 * 4 + 2] + v2 * m[2 * 4 + 2];\n\n return dst;\n}\n\n/**\n * Transforms vec3 by 3x3 matrix\n *\n * @param v - the vector\n * @param m - The matrix.\n * @param dst - optional vec3 to store result. If not passed a new one is created.\n * @returns the transformed vector\n */\nexport function transformMat3(v: Vec3, m: Mat3, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n const x = v[0];\n const y = v[1];\n const z = v[2];\n\n dst[0] = x * m[0] + y * m[4] + z * m[8];\n dst[1] = x * m[1] + y * m[5] + z * m[9];\n dst[2] = x * m[2] + y * m[6] + z * m[10];\n\n return dst;\n}\n\n/**\n * Transforms vec3 by Quaternion\n * @param v - the vector to transform\n * @param q - the quaternion to transform by\n * @param dst - optional vec3 to store result. If not passed a new one is created.\n * @returns the transformed\n */\nexport function transformQuat(v: Vec3, q: Quat, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n const qx = q[0];\n const qy = q[1];\n const qz = q[2];\n const w2 = q[3] * 2;\n\n const x = v[0];\n const y = v[1];\n const z = v[2];\n\n const uvX = qy * z - qz * y;\n const uvY = qz * x - qx * z;\n const uvZ = qx * y - qy * x;\n\n dst[0] = x + uvX * w2 + (qy * uvZ - qz * uvY) * 2;\n dst[1] = y + uvY * w2 + (qz * uvX - qx * uvZ) * 2;\n dst[2] = z + uvZ * w2 + (qx * uvY - qy * uvX) * 2;\n\n return dst;\n}\n\n/**\n * Returns the translation component of a 4-by-4 matrix as a vector with 3\n * entries.\n * @param m - The matrix.\n * @param dst - vector to hold result. If not passed a new one is created.\n * @returns The translation component of m.\n */\nexport function getTranslation(m: Mat3, dst?: Vec3) {\n dst = dst || new VecType(3);\n dst[0] = m[12];\n dst[1] = m[13];\n dst[2] = m[14];\n return dst;\n}\n/**\n * Returns an axis of a 4x4 matrix as a vector with 3 entries\n * @param m - The matrix.\n * @param axis - The axis 0 = x, 1 = y, 2 = z;\n * @returns The axis component of m.\n */\nexport function getAxis(m: Mat4, axis: number, dst?: Vec3) {\n dst = dst || new VecType(3);\n const off = axis * 4;\n dst[0] = m[off + 0];\n dst[1] = m[off + 1];\n dst[2] = m[off + 2];\n return dst;\n}\n/**\n * Returns the scaling component of the matrix\n * @param m - The Matrix\n * @param dst - The vector to set. If not passed a new one is created.\n */\nexport function getScaling(m: Mat4, dst: Vec3) {\n dst = dst || new VecType(3);\n const xx = m[0];\n const xy = m[1];\n const xz = m[2];\n const yx = m[4];\n const yy = m[5];\n const yz = m[6];\n const zx = m[8];\n const zy = m[9];\n const zz = m[10];\n dst[0] = Math.sqrt(xx * xx + xy * xy + xz * xz);\n dst[1] = Math.sqrt(yx * yx + yy * yy + yz * yz);\n dst[2] = Math.sqrt(zx * zx + zy * zy + zz * zz);\n return dst;\n}","\nimport { Mat3 } from './mat3';\nimport { Mat4 } from './mat4';\nimport { Quat } from './quat';\nimport Vec3, * as vec3 from './vec3-impl';\nimport * as utils from './utils';\n\nexport default Mat4;\n\nexport type Mat4LikeCtor = new (n: number) => Mat4;\n\n/**\n * 4x4 Matrix math math functions.\n *\n * Almost all functions take an optional `dst` argument. If it is not passed in the\n * functions will create a new matrix. In other words you can do this\n *\n * const mat = mat4.translation([1, 2, 3]); // Creates a new translation matrix\n *\n * or\n *\n * const mat = mat4.create();\n * mat4.translation([1, 2, 3], mat); // Puts translation matrix in mat.\n *\n * The first style is often easier but depending on where it's used it generates garbage where\n * as there is almost never allocation with the second style.\n *\n * It is always save to pass any matrix as the destination. So for example\n *\n * const mat = mat4.identity();\n * const trans = mat4.translation([1, 2, 3]);\n * mat4.multiply(mat, trans, mat); // Multiplies mat * trans and puts result in mat.\n *\n */\nlet MatType: Mat4LikeCtor = Float32Array;\n\n/**\n * Sets the type this library creates for a Mat4\n * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array`\n * @returns previous constructor for Mat4\n */\nexport function setDefaultType(ctor: new (n: number) => Mat4) {\n const oldType = MatType;\n MatType = ctor;\n return oldType;\n}\n\n/**\n * Create a Mat4 from values\n *\n * Note: Since passing in a raw JavaScript array\n * is valid in all circumstances, if you want to\n * force a JavaScript array into a Mat4's specified type\n * it would be faster to use\n *\n * ```\n * const m = mat4.clone(someJSArray);\n * ```\n *\n * Note: a consequence of the implementation is if your Mat4Type = `Array`\n * instead of `Float32Array` or `Float64Array` then any values you\n * don't pass in will be undefined. Usually this is not an issue since\n * (a) using `Array` is rare and (b) using `mat4.create` is usually used\n * to create a Mat4 to be filled out as in\n *\n * ```\n * const m = mat4.create();\n * mat4.perspective(fov, aspect, near, far, m);\n * ```\n *\n * @param v0 - value for element 0\n * @param v1 - value for element 1\n * @param v2 - value for element 2\n * @param v3 - value for element 3\n * @param v4 - value for element 4\n * @param v5 - value for element 5\n * @param v6 - value for element 6\n * @param v7 - value for element 7\n * @param v8 - value for element 8\n * @param v9 - value for element 9\n * @param v10 - value for element 10\n * @param v11 - value for element 11\n * @param v12 - value for element 12\n * @param v13 - value for element 13\n * @param v14 - value for element 14\n * @param v15 - value for element 15\n * @returns created from values.\n */\nexport function create(\n v0?: number, v1?: number, v2?: number, v3?: number,\n v4?: number, v5?: number, v6?: number, v7?: number,\n v8?: number, v9?: number, v10?: number, v11?: number,\n v12?: number, v13?: number, v14?: number, v15?: number): Mat4 {\n const dst = new MatType(16);\n if (v0 !== undefined) {\n dst[0] = v0;\n if (v1 !== undefined) {\n dst[1] = v1;\n if (v2 !== undefined) {\n dst[2] = v2;\n if (v3 !== undefined) {\n dst[3] = v3;\n if (v4 !== undefined) {\n dst[4] = v4;\n if (v5 !== undefined) {\n dst[5] = v5;\n if (v6 !== undefined) {\n dst[6] = v6;\n if (v7 !== undefined) {\n dst[7] = v7;\n if (v8 !== undefined) {\n dst[8] = v8;\n if (v9 !== undefined) {\n dst[9] = v9;\n if (v10 !== undefined) {\n dst[10] = v10;\n if (v11 !== undefined) {\n dst[11] = v11;\n if (v12 !== undefined) {\n dst[12] = v12;\n if (v13 !== undefined) {\n dst[13] = v13;\n if (v14 !== undefined) {\n dst[14] = v14;\n if (v15 !== undefined) {\n dst[15] = v15;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n return dst;\n}\n\n/**\n * Sets the values of a Mat4\n * Also see {@link mat4.create} and {@link mat4.copy}\n *\n * @param v0 - value for element 0\n * @param v1 - value for element 1\n * @param v2 - value for element 2\n * @param v3 - value for element 3\n * @param v4 - value for element 4\n * @param v5 - value for element 5\n * @param v6 - value for element 6\n * @param v7 - value for element 7\n * @param v8 - value for element 8\n * @param v9 - value for element 9\n * @param v10 - value for element 10\n * @param v11 - value for element 11\n * @param v12 - value for element 12\n * @param v13 - value for element 13\n * @param v14 - value for element 14\n * @param v15 - value for element 15\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns Mat4 created from values.\n */\nexport function set(\n v0: number, v1: number, v2: number, v3: number,\n v4: number, v5: number, v6: number, v7: number,\n v8: number, v9: number, v10: number, v11: number,\n v12: number, v13: number, v14: number, v15: number,\n dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n dst[ 0] = v0; dst[ 1] = v1; dst[ 2] = v2; dst[ 3] = v3;\n dst[ 4] = v4; dst[ 5] = v5; dst[ 6] = v6; dst[ 7] = v7;\n dst[ 8] = v8; dst[ 9] = v9; dst[10] = v10; dst[11] = v11;\n dst[12] = v12; dst[13] = v13; dst[14] = v14; dst[15] = v15;\n\n return dst;\n}\n\n/**\n * Creates a Mat4 from a Mat3\n * @param m3 - source matrix\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns Mat4 made from m3\n */\nexport function fromMat3(m3: Mat3, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n dst[ 0] = m3[0]; dst[ 1] = m3[1]; dst[ 2] = m3[ 2]; dst[ 3] = 0;\n dst[ 4] = m3[4]; dst[ 5] = m3[5]; dst[ 6] = m3[ 6]; dst[ 7] = 0;\n dst[ 8] = m3[8]; dst[ 9] = m3[9]; dst[10] = m3[10]; dst[11] = 0;\n dst[12] = 0; dst[13] = 0; dst[14] = 0; dst[15] = 1;\n\n return dst;\n}\n\n/**\n * Creates a Mat4 rotation matrix from a quaternion\n * @param q - quaternion to create matrix from\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns Mat4 made from q\n */\nexport function fromQuat(q: Quat, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n const x = q[0]; const y = q[1]; const z = q[2]; const w = q[3];\n const x2 = x + x; const y2 = y + y; const z2 = z + z;\n\n const xx = x * x2;\n const yx = y * x2;\n const yy = y * y2;\n const zx = z * x2;\n const zy = z * y2;\n const zz = z * z2;\n const wx = w * x2;\n const wy = w * y2;\n const wz = w * z2;\n\n dst[ 0] = 1 - yy - zz; dst[ 1] = yx + wz; dst[ 2] = zx - wy; dst[ 3] = 0;\n dst[ 4] = yx - wz; dst[ 5] = 1 - xx - zz; dst[ 6] = zy + wx; dst[ 7] = 0;\n dst[ 8] = zx + wy; dst[ 9] = zy - wx; dst[10] = 1 - xx - yy; dst[11] = 0;\n dst[12] = 0; dst[13] = 0; dst[14] = 0; dst[15] = 1;\n\n return dst;\n}\n\n/**\n * Negates a matrix.\n * @param m - The matrix.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns -m.\n */\nexport function negate(m: Mat4, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n dst[ 0] = -m[ 0]; dst[ 1] = -m[ 1]; dst[ 2] = -m[ 2]; dst[ 3] = -m[ 3];\n dst[ 4] = -m[ 4]; dst[ 5] = -m[ 5]; dst[ 6] = -m[ 6]; dst[ 7] = -m[ 7];\n dst[ 8] = -m[ 8]; dst[ 9] = -m[ 9]; dst[10] = -m[10]; dst[11] = -m[11];\n dst[12] = -m[12]; dst[13] = -m[13]; dst[14] = -m[14]; dst[15] = -m[15];\n\n return dst;\n}\n\n/**\n * Copies a matrix. (same as {@link mat4.clone})\n * Also see {@link mat4.create} and {@link mat4.set}\n * @param m - The matrix.\n * @param dst - The matrix. If not passed a new one is created.\n * @returns A copy of m.\n */\nexport function copy(m: Mat4, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n dst[ 0] = m[ 0]; dst[ 1] = m[ 1]; dst[ 2] = m[ 2]; dst[ 3] = m[ 3];\n dst[ 4] = m[ 4]; dst[ 5] = m[ 5]; dst[ 6] = m[ 6]; dst[ 7] = m[ 7];\n dst[ 8] = m[ 8]; dst[ 9] = m[ 9]; dst[10] = m[10]; dst[11] = m[11];\n dst[12] = m[12]; dst[13] = m[13]; dst[14] = m[14]; dst[15] = m[15];\n\n return dst;\n}\n\n/**\n * Copies a matrix (same as {@link mat4.copy})\n * Also see {@link mat4.create} and {@link mat4.set}\n * @param m - The matrix.\n * @param dst - The matrix. If not passed a new one is created.\n * @returns A copy of m.\n */\nexport const clone = copy;\n\n/**\n * Check if 2 matrices are approximately equal\n * @param a - Operand matrix.\n * @param b - Operand matrix.\n * @returns true if matrices are approximately equal\n */\nexport function equalsApproximately(a: Mat4, b: Mat4): boolean {\n return Math.abs(a[ 0] - b[ 0]) < utils.EPSILON &&\n Math.abs(a[ 1] - b[ 1]) < utils.EPSILON &&\n Math.abs(a[ 2] - b[ 2]) < utils.EPSILON &&\n Math.abs(a[ 3] - b[ 3]) < utils.EPSILON &&\n Math.abs(a[ 4] - b[ 4]) < utils.EPSILON &&\n Math.abs(a[ 5] - b[ 5]) < utils.EPSILON &&\n Math.abs(a[ 6] - b[ 6]) < utils.EPSILON &&\n Math.abs(a[ 7] - b[ 7]) < utils.EPSILON &&\n Math.abs(a[ 8] - b[ 8]) < utils.EPSILON &&\n Math.abs(a[ 9] - b[ 9]) < utils.EPSILON &&\n Math.abs(a[10] - b[10]) < utils.EPSILON &&\n Math.abs(a[11] - b[11]) < utils.EPSILON &&\n Math.abs(a[12] - b[12]) < utils.EPSILON &&\n Math.abs(a[13] - b[13]) < utils.EPSILON &&\n Math.abs(a[14] - b[14]) < utils.EPSILON &&\n Math.abs(a[15] - b[15]) < utils.EPSILON;\n}\n\n/**\n * Check if 2 matrices are exactly equal\n * @param a - Operand matrix.\n * @param b - Operand matrix.\n * @returns true if matrices are exactly equal\n */\nexport function equals(a: Mat4, b: Mat4): boolean {\n return a[ 0] === b[ 0] &&\n a[ 1] === b[ 1] &&\n a[ 2] === b[ 2] &&\n a[ 3] === b[ 3] &&\n a[ 4] === b[ 4] &&\n a[ 5] === b[ 5] &&\n a[ 6] === b[ 6] &&\n a[ 7] === b[ 7] &&\n a[ 8] === b[ 8] &&\n a[ 9] === b[ 9] &&\n a[10] === b[10] &&\n a[11] === b[11] &&\n a[12] === b[12] &&\n a[13] === b[13] &&\n a[14] === b[14] &&\n a[15] === b[15];\n}\n\n/**\n * Creates a 4-by-4 identity matrix.\n *\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns A 4-by-4 identity matrix.\n */\nexport function identity(dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n dst[ 0] = 1; dst[ 1] = 0; dst[ 2] = 0; dst[ 3] = 0;\n dst[ 4] = 0; dst[ 5] = 1; dst[ 6] = 0; dst[ 7] = 0;\n dst[ 8] = 0; dst[ 9] = 0; dst[10] = 1; dst[11] = 0;\n dst[12] = 0; dst[13] = 0; dst[14] = 0; dst[15] = 1;\n\n return dst;\n}\n\n/**\n * Takes the transpose of a matrix.\n * @param m - The matrix.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The transpose of m.\n */\nexport function transpose(m: Mat4, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n if (dst === m) {\n let t;\n\n t = m[1];\n m[1] = m[4];\n m[4] = t;\n\n t = m[2];\n m[2] = m[8];\n m[8] = t;\n\n t = m[3];\n m[3] = m[12];\n m[12] = t;\n\n t = m[6];\n m[6] = m[9];\n m[9] = t;\n\n t = m[7];\n m[7] = m[13];\n m[13] = t;\n\n t = m[11];\n m[11] = m[14];\n m[14] = t;\n return dst;\n }\n\n const m00 = m[0 * 4 + 0];\n const m01 = m[0 * 4 + 1];\n const m02 = m[0 * 4 + 2];\n const m03 = m[0 * 4 + 3];\n const m10 = m[1 * 4 + 0];\n const m11 = m[1 * 4 + 1];\n const m12 = m[1 * 4 + 2];\n const m13 = m[1 * 4 + 3];\n const m20 = m[2 * 4 + 0];\n const m21 = m[2 * 4 + 1];\n const m22 = m[2 * 4 + 2];\n const m23 = m[2 * 4 + 3];\n const m30 = m[3 * 4 + 0];\n const m31 = m[3 * 4 + 1];\n const m32 = m[3 * 4 + 2];\n const m33 = m[3 * 4 + 3];\n\n dst[ 0] = m00; dst[ 1] = m10; dst[ 2] = m20; dst[ 3] = m30;\n dst[ 4] = m01; dst[ 5] = m11; dst[ 6] = m21; dst[ 7] = m31;\n dst[ 8] = m02; dst[ 9] = m12; dst[10] = m22; dst[11] = m32;\n dst[12] = m03; dst[13] = m13; dst[14] = m23; dst[15] = m33;\n\n return dst;\n}\n\n/**\n * Computes the inverse of a 4-by-4 matrix.\n * @param m - The matrix.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The inverse of m.\n */\nexport function inverse(m: Mat4, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n const m00 = m[0 * 4 + 0];\n const m01 = m[0 * 4 + 1];\n const m02 = m[0 * 4 + 2];\n const m03 = m[0 * 4 + 3];\n const m10 = m[1 * 4 + 0];\n const m11 = m[1 * 4 + 1];\n const m12 = m[1 * 4 + 2];\n const m13 = m[1 * 4 + 3];\n const m20 = m[2 * 4 + 0];\n const m21 = m[2 * 4 + 1];\n const m22 = m[2 * 4 + 2];\n const m23 = m[2 * 4 + 3];\n const m30 = m[3 * 4 + 0];\n const m31 = m[3 * 4 + 1];\n const m32 = m[3 * 4 + 2];\n const m33 = m[3 * 4 + 3];\n const tmp0 = m22 * m33;\n const tmp1 = m32 * m23;\n const tmp2 = m12 * m33;\n const tmp3 = m32 * m13;\n const tmp4 = m12 * m23;\n const tmp5 = m22 * m13;\n const tmp6 = m02 * m33;\n const tmp7 = m32 * m03;\n const tmp8 = m02 * m23;\n const tmp9 = m22 * m03;\n const tmp10 = m02 * m13;\n const tmp11 = m12 * m03;\n const tmp12 = m20 * m31;\n const tmp13 = m30 * m21;\n const tmp14 = m10 * m31;\n const tmp15 = m30 * m11;\n const tmp16 = m10 * m21;\n const tmp17 = m20 * m11;\n const tmp18 = m00 * m31;\n const tmp19 = m30 * m01;\n const tmp20 = m00 * m21;\n const tmp21 = m20 * m01;\n const tmp22 = m00 * m11;\n const tmp23 = m10 * m01;\n\n const t0 = (tmp0 * m11 + tmp3 * m21 + tmp4 * m31) -\n (tmp1 * m11 + tmp2 * m21 + tmp5 * m31);\n const t1 = (tmp1 * m01 + tmp6 * m21 + tmp9 * m31) -\n (tmp0 * m01 + tmp7 * m21 + tmp8 * m31);\n const t2 = (tmp2 * m01 + tmp7 * m11 + tmp10 * m31) -\n (tmp3 * m01 + tmp6 * m11 + tmp11 * m31);\n const t3 = (tmp5 * m01 + tmp8 * m11 + tmp11 * m21) -\n (tmp4 * m01 + tmp9 * m11 + tmp10 * m21);\n\n const d = 1 / (m00 * t0 + m10 * t1 + m20 * t2 + m30 * t3);\n\n dst[ 0] = d * t0;\n dst[ 1] = d * t1;\n dst[ 2] = d * t2;\n dst[ 3] = d * t3;\n dst[ 4] = d * ((tmp1 * m10 + tmp2 * m20 + tmp5 * m30) -\n (tmp0 * m10 + tmp3 * m20 + tmp4 * m30));\n dst[ 5] = d * ((tmp0 * m00 + tmp7 * m20 + tmp8 * m30) -\n (tmp1 * m00 + tmp6 * m20 + tmp9 * m30));\n dst[ 6] = d * ((tmp3 * m00 + tmp6 * m10 + tmp11 * m30) -\n (tmp2 * m00 + tmp7 * m10 + tmp10 * m30));\n dst[ 7] = d * ((tmp4 * m00 + tmp9 * m10 + tmp10 * m20) -\n (tmp5 * m00 + tmp8 * m10 + tmp11 * m20));\n dst[ 8] = d * ((tmp12 * m13 + tmp15 * m23 + tmp16 * m33) -\n (tmp13 * m13 + tmp14 * m23 + tmp17 * m33));\n dst[ 9] = d * ((tmp13 * m03 + tmp18 * m23 + tmp21 * m33) -\n (tmp12 * m03 + tmp19 * m23 + tmp20 * m33));\n dst[10] = d * ((tmp14 * m03 + tmp19 * m13 + tmp22 * m33) -\n (tmp15 * m03 + tmp18 * m13 + tmp23 * m33));\n dst[11] = d * ((tmp17 * m03 + tmp20 * m13 + tmp23 * m23) -\n (tmp16 * m03 + tmp21 * m13 + tmp22 * m23));\n dst[12] = d * ((tmp14 * m22 + tmp17 * m32 + tmp13 * m12) -\n (tmp16 * m32 + tmp12 * m12 + tmp15 * m22));\n dst[13] = d * ((tmp20 * m32 + tmp12 * m02 + tmp19 * m22) -\n (tmp18 * m22 + tmp21 * m32 + tmp13 * m02));\n dst[14] = d * ((tmp18 * m12 + tmp23 * m32 + tmp15 * m02) -\n (tmp22 * m32 + tmp14 * m02 + tmp19 * m12));\n dst[15] = d * ((tmp22 * m22 + tmp16 * m02 + tmp21 * m12) -\n (tmp20 * m12 + tmp23 * m22 + tmp17 * m02));\n\n return dst;\n}\n\n/**\n * Compute the determinant of a matrix\n * @param m - the matrix\n * @returns the determinant\n */\nexport function determinant(m: Mat4): number {\n const m00 = m[0 * 4 + 0];\n const m01 = m[0 * 4 + 1];\n const m02 = m[0 * 4 + 2];\n const m03 = m[0 * 4 + 3];\n const m10 = m[1 * 4 + 0];\n const m11 = m[1 * 4 + 1];\n const m12 = m[1 * 4 + 2];\n const m13 = m[1 * 4 + 3];\n const m20 = m[2 * 4 + 0];\n const m21 = m[2 * 4 + 1];\n const m22 = m[2 * 4 + 2];\n const m23 = m[2 * 4 + 3];\n const m30 = m[3 * 4 + 0];\n const m31 = m[3 * 4 + 1];\n const m32 = m[3 * 4 + 2];\n const m33 = m[3 * 4 + 3];\n\n const tmp0 = m22 * m33;\n const tmp1 = m32 * m23;\n const tmp2 = m12 * m33;\n const tmp3 = m32 * m13;\n const tmp4 = m12 * m23;\n const tmp5 = m22 * m13;\n const tmp6 = m02 * m33;\n const tmp7 = m32 * m03;\n const tmp8 = m02 * m23;\n const tmp9 = m22 * m03;\n const tmp10 = m02 * m13;\n const tmp11 = m12 * m03;\n\n const t0 = (tmp0 * m11 + tmp3 * m21 + tmp4 * m31) -\n (tmp1 * m11 + tmp2 * m21 + tmp5 * m31);\n const t1 = (tmp1 * m01 + tmp6 * m21 + tmp9 * m31) -\n (tmp0 * m01 + tmp7 * m21 + tmp8 * m31);\n const t2 = (tmp2 * m01 + tmp7 * m11 + tmp10 * m31) -\n (tmp3 * m01 + tmp6 * m11 + tmp11 * m31);\n const t3 = (tmp5 * m01 + tmp8 * m11 + tmp11 * m21) -\n (tmp4 * m01 + tmp9 * m11 + tmp10 * m21);\n\n return m00 * t0 + m10 * t1 + m20 * t2 + m30 * t3;\n}\n\n/**\n * Computes the inverse of a 4-by-4 matrix. (same as inverse)\n * @param m - The matrix.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The inverse of m.\n */\nexport const invert = inverse;\n\n/**\n * Multiplies two 4-by-4 matrices with a on the left and b on the right\n * @param a - The matrix on the left.\n * @param b - The matrix on the right.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The matrix product of a and b.\n */\nexport function multiply(a: Mat4, b: Mat4, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n const a00 = a[0];\n const a01 = a[1];\n const a02 = a[2];\n const a03 = a[3];\n const a10 = a[ 4 + 0];\n const a11 = a[ 4 + 1];\n const a12 = a[ 4 + 2];\n const a13 = a[ 4 + 3];\n const a20 = a[ 8 + 0];\n const a21 = a[ 8 + 1];\n const a22 = a[ 8 + 2];\n const a23 = a[ 8 + 3];\n const a30 = a[12 + 0];\n const a31 = a[12 + 1];\n const a32 = a[12 + 2];\n const a33 = a[12 + 3];\n const b00 = b[0];\n const b01 = b[1];\n const b02 = b[2];\n const b03 = b[3];\n const b10 = b[ 4 + 0];\n const b11 = b[ 4 + 1];\n const b12 = b[ 4 + 2];\n const b13 = b[ 4 + 3];\n const b20 = b[ 8 + 0];\n const b21 = b[ 8 + 1];\n const b22 = b[ 8 + 2];\n const b23 = b[ 8 + 3];\n const b30 = b[12 + 0];\n const b31 = b[12 + 1];\n const b32 = b[12 + 2];\n const b33 = b[12 + 3];\n\n dst[ 0] = a00 * b00 + a10 * b01 + a20 * b02 + a30 * b03;\n dst[ 1] = a01 * b00 + a11 * b01 + a21 * b02 + a31 * b03;\n dst[ 2] = a02 * b00 + a12 * b01 + a22 * b02 + a32 * b03;\n dst[ 3] = a03 * b00 + a13 * b01 + a23 * b02 + a33 * b03;\n dst[ 4] = a00 * b10 + a10 * b11 + a20 * b12 + a30 * b13;\n dst[ 5] = a01 * b10 + a11 * b11 + a21 * b12 + a31 * b13;\n dst[ 6] = a02 * b10 + a12 * b11 + a22 * b12 + a32 * b13;\n dst[ 7] = a03 * b10 + a13 * b11 + a23 * b12 + a33 * b13;\n dst[ 8] = a00 * b20 + a10 * b21 + a20 * b22 + a30 * b23;\n dst[ 9] = a01 * b20 + a11 * b21 + a21 * b22 + a31 * b23;\n dst[10] = a02 * b20 + a12 * b21 + a22 * b22 + a32 * b23;\n dst[11] = a03 * b20 + a13 * b21 + a23 * b22 + a33 * b23;\n dst[12] = a00 * b30 + a10 * b31 + a20 * b32 + a30 * b33;\n dst[13] = a01 * b30 + a11 * b31 + a21 * b32 + a31 * b33;\n dst[14] = a02 * b30 + a12 * b31 + a22 * b32 + a32 * b33;\n dst[15] = a03 * b30 + a13 * b31 + a23 * b32 + a33 * b33;\n\n return dst;\n}\n\n/**\n * Multiplies two 4-by-4 matrices with a on the left and b on the right (same as multiply)\n * @param a - The matrix on the left.\n * @param b - The matrix on the right.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The matrix product of a and b.\n */\nexport const mul = multiply;\n\n/**\n * Sets the translation component of a 4-by-4 matrix to the given\n * vector.\n * @param a - The matrix.\n * @param v - The vector.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The matrix with translation set.\n */\nexport function setTranslation(a: Mat4, v: Vec3, dst?: Mat4): Mat4 {\n dst = dst || identity();\n if (a !== dst) {\n dst[ 0] = a[ 0];\n dst[ 1] = a[ 1];\n dst[ 2] = a[ 2];\n dst[ 3] = a[ 3];\n dst[ 4] = a[ 4];\n dst[ 5] = a[ 5];\n dst[ 6] = a[ 6];\n dst[ 7] = a[ 7];\n dst[ 8] = a[ 8];\n dst[ 9] = a[ 9];\n dst[10] = a[10];\n dst[11] = a[11];\n }\n dst[12] = v[0];\n dst[13] = v[1];\n dst[14] = v[2];\n dst[15] = 1;\n return dst;\n}\n\n/**\n * Returns the translation component of a 4-by-4 matrix as a vector with 3\n * entries.\n * @param m - The matrix.\n * @param dst - vector to hold result. If not passed a new one is created.\n * @returns The translation component of m.\n */\nexport function getTranslation(m: Mat4, dst?: Vec3): Vec3 {\n dst = dst || vec3.create();\n dst[0] = m[12];\n dst[1] = m[13];\n dst[2] = m[14];\n return dst;\n}\n\n/**\n * Returns an axis of a 4x4 matrix as a vector with 3 entries\n * @param m - The matrix.\n * @param axis - The axis 0 = x, 1 = y, 2 = z;\n * @returns The axis component of m.\n */\nexport function getAxis(m: Mat4, axis: number, dst?: Vec3): Vec3 {\n dst = dst || vec3.create();\n const off = axis * 4;\n dst[0] = m[off + 0];\n dst[1] = m[off + 1];\n dst[2] = m[off + 2];\n return dst;\n}\n\n/**\n * Sets an axis of a 4x4 matrix as a vector with 3 entries\n * @param m - The matrix.\n * @param v - the axis vector\n * @param axis - The axis 0 = x, 1 = y, 2 = z;\n * @param dst - The matrix to set. If not passed a new one is created.\n * @returns The matrix with axis set.\n */\nexport function setAxis(a: Mat4, v: Vec3, axis: number, dst: Mat4): Mat4 {\n if (dst !== a) {\n dst = copy(a, dst);\n }\n const off = axis * 4;\n dst[off + 0] = v[0];\n dst[off + 1] = v[1];\n dst[off + 2] = v[2];\n return dst;\n}\n\n/**\n * Returns the scaling component of the matrix\n * @param m - The Matrix\n * @param dst - The vector to set. If not passed a new one is created.\n */\nexport function getScaling(m: Mat4, dst?: Vec3): Vec3 {\n dst = dst || vec3.create();\n\n const xx = m[0];\n const xy = m[1];\n const xz = m[2];\n const yx = m[4];\n const yy = m[5];\n const yz = m[6];\n const zx = m[8];\n const zy = m[9];\n const zz = m[10];\n\n dst[0] = Math.sqrt(xx * xx + xy * xy + xz * xz);\n dst[1] = Math.sqrt(yx * yx + yy * yy + yz * yz);\n dst[2] = Math.sqrt(zx * zx + zy * zy + zz * zz);\n\n return dst;\n}\n\n/**\n * Computes a 4-by-4 perspective transformation matrix given the angular height\n * of the frustum, the aspect ratio, and the near and far clipping planes. The\n * arguments define a frustum extending in the negative z direction. The given\n * angle is the vertical angle of the frustum, and the horizontal angle is\n * determined to produce the given aspect ratio. The arguments near and far are\n * the distances to the near and far clipping planes. Note that near and far\n * are not z coordinates, but rather they are distances along the negative\n * z-axis. The matrix generated sends the viewing frustum to the unit box.\n * We assume a unit box extending from -1 to 1 in the x and y dimensions and\n * from 0 to 1 in the z dimension.\n *\n * Note: If you pass `Infinity` for zFar then it will produce a projection matrix\n * returns -Infinity for Z when transforming coordinates with Z <= 0 and +Infinity for Z\n * otherwise.\n *\n * @param fieldOfViewYInRadians - The camera angle from top to bottom (in radians).\n * @param aspect - The aspect ratio width / height.\n * @param zNear - The depth (negative z coordinate)\n * of the near clipping plane.\n * @param zFar - The depth (negative z coordinate)\n * of the far clipping plane.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The perspective matrix.\n */\nexport function perspective(fieldOfViewYInRadians: number, aspect: number, zNear: number, zFar: number, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n const f = Math.tan(Math.PI * 0.5 - 0.5 * fieldOfViewYInRadians);\n\n dst[0] = f / aspect;\n dst[1] = 0;\n dst[2] = 0;\n dst[3] = 0;\n\n dst[4] = 0;\n dst[5] = f;\n dst[6] = 0;\n dst[7] = 0;\n\n dst[8] = 0;\n dst[9] = 0;\n dst[11] = -1;\n\n dst[12] = 0;\n dst[13] = 0;\n dst[15] = 0;\n\n if (zFar === Infinity) {\n dst[10] = -1;\n dst[14] = -zNear;\n } else {\n const rangeInv = 1 / (zNear - zFar);\n dst[10] = zFar * rangeInv;\n dst[14] = zFar * zNear * rangeInv;\n }\n\n return dst;\n}\n\n/**\n * Computes a 4-by-4 orthogonal transformation matrix that transforms from\n * the given the left, right, bottom, and top dimensions to -1 +1 in x, and y\n * and 0 to +1 in z.\n * @param left - Left side of the near clipping plane viewport.\n * @param right - Right side of the near clipping plane viewport.\n * @param bottom - Bottom of the near clipping plane viewport.\n * @param top - Top of the near clipping plane viewport.\n * @param near - The depth (negative z coordinate)\n * of the near clipping plane.\n * @param far - The depth (negative z coordinate)\n * of the far clipping plane.\n * @param dst - Output matrix. If not passed a new one is created.\n * @returns The orthographic projection matrix.\n */\nexport function ortho(left: number, right: number, bottom: number, top: number, near: number, far: number, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n dst[0] = 2 / (right - left);\n dst[1] = 0;\n dst[2] = 0;\n dst[3] = 0;\n\n dst[4] = 0;\n dst[5] = 2 / (top - bottom);\n dst[6] = 0;\n dst[7] = 0;\n\n dst[8] = 0;\n dst[9] = 0;\n dst[10] = 1 / (near - far);\n dst[11] = 0;\n\n dst[12] = (right + left) / (left - right);\n dst[13] = (top + bottom) / (bottom - top);\n dst[14] = near / (near - far);\n dst[15] = 1;\n\n return dst;\n}\n\n/**\n * Computes a 4-by-4 perspective transformation matrix given the left, right,\n * top, bottom, near and far clipping planes. The arguments define a frustum\n * extending in the negative z direction. The arguments near and far are the\n * distances to the near and far clipping planes. Note that near and far are not\n * z coordinates, but rather they are distances along the negative z-axis. The\n * matrix generated sends the viewing frustum to the unit box. We assume a unit\n * box extending from -1 to 1 in the x and y dimensions and from 0 to 1 in the z\n * dimension.\n * @param left - The x coordinate of the left plane of the box.\n * @param right - The x coordinate of the right plane of the box.\n * @param bottom - The y coordinate of the bottom plane of the box.\n * @param top - The y coordinate of the right plane of the box.\n * @param near - The negative z coordinate of the near plane of the box.\n * @param far - The negative z coordinate of the far plane of the box.\n * @param dst - Output matrix. If not passed a new one is created.\n * @returns The perspective projection matrix.\n */\nexport function frustum(left: number, right: number, bottom: number, top: number, near: number, far: number, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n const dx = (right - left);\n const dy = (top - bottom);\n const dz = (near - far);\n\n dst[ 0] = 2 * near / dx;\n dst[ 1] = 0;\n dst[ 2] = 0;\n dst[ 3] = 0;\n dst[ 4] = 0;\n dst[ 5] = 2 * near / dy;\n dst[ 6] = 0;\n dst[ 7] = 0;\n dst[ 8] = (left + right) / dx;\n dst[ 9] = (top + bottom) / dy;\n dst[10] = far / dz;\n dst[11] = -1;\n dst[12] = 0;\n dst[13] = 0;\n dst[14] = near * far / dz;\n dst[15] = 0;\n\n return dst;\n}\n\nlet xAxis: Vec3;\nlet yAxis: Vec3;\nlet zAxis: Vec3;\n\n/**\n * Computes a 4-by-4 aim transformation.\n *\n * This is a matrix which positions an object aiming down positive Z.\n * toward the target.\n *\n * Note: this is **NOT** the inverse of lookAt as lookAt looks at negative Z.\n *\n * @param position - The position of the object.\n * @param target - The position meant to be aimed at.\n * @param up - A vector pointing up.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The aim matrix.\n */\nexport function aim(position: Vec3, target: Vec3, up: Vec3, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n xAxis = xAxis || vec3.create();\n yAxis = yAxis || vec3.create();\n zAxis = zAxis || vec3.create();\n\n vec3.normalize(vec3.subtract(target, position, zAxis), zAxis);\n vec3.normalize(vec3.cross(up, zAxis, xAxis), xAxis);\n vec3.normalize(vec3.cross(zAxis, xAxis, yAxis), yAxis);\n\n dst[ 0] = xAxis[0]; dst[ 1] = xAxis[1]; dst[ 2] = xAxis[2]; dst[ 3] = 0;\n dst[ 4] = yAxis[0]; dst[ 5] = yAxis[1]; dst[ 6] = yAxis[2]; dst[ 7] = 0;\n dst[ 8] = zAxis[0]; dst[ 9] = zAxis[1]; dst[10] = zAxis[2]; dst[11] = 0;\n dst[12] = position[0]; dst[13] = position[1]; dst[14] = position[2]; dst[15] = 1;\n\n return dst;\n}\n\n/**\n * Computes a 4-by-4 camera aim transformation.\n *\n * This is a matrix which positions an object aiming down negative Z.\n * toward the target.\n *\n * Note: this is the inverse of `lookAt`\n *\n * @param eye - The position of the object.\n * @param target - The position meant to be aimed at.\n * @param up - A vector pointing up.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The aim matrix.\n */\nexport function cameraAim(eye: Vec3, target: Vec3, up: Vec3, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n xAxis = xAxis || vec3.create();\n yAxis = yAxis || vec3.create();\n zAxis = zAxis || vec3.create();\n\n vec3.normalize(vec3.subtract(eye, target, zAxis), zAxis);\n vec3.normalize(vec3.cross(up, zAxis, xAxis), xAxis);\n vec3.normalize(vec3.cross(zAxis, xAxis, yAxis), yAxis);\n\n dst[ 0] = xAxis[0]; dst[ 1] = xAxis[1]; dst[ 2] = xAxis[2]; dst[ 3] = 0;\n dst[ 4] = yAxis[0]; dst[ 5] = yAxis[1]; dst[ 6] = yAxis[2]; dst[ 7] = 0;\n dst[ 8] = zAxis[0]; dst[ 9] = zAxis[1]; dst[10] = zAxis[2]; dst[11] = 0;\n dst[12] = eye[0]; dst[13] = eye[1]; dst[14] = eye[2]; dst[15] = 1;\n\n return dst;\n}\n\n/**\n * Computes a 4-by-4 view transformation.\n *\n * This is a view matrix which transforms all other objects\n * to be in the space of the view defined by the parameters.\n *\n * @param eye - The position of the object.\n * @param target - The position meant to be aimed at.\n * @param up - A vector pointing up.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The look-at matrix.\n */\nexport function lookAt(eye: Vec3, target: Vec3, up: Vec3, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n xAxis = xAxis || vec3.create();\n yAxis = yAxis || vec3.create();\n zAxis = zAxis || vec3.create();\n\n vec3.normalize(vec3.subtract(eye, target, zAxis), zAxis);\n vec3.normalize(vec3.cross(up, zAxis, xAxis), xAxis);\n vec3.normalize(vec3.cross(zAxis, xAxis, yAxis), yAxis);\n\n dst[ 0] = xAxis[0]; dst[ 1] = yAxis[0]; dst[ 2] = zAxis[0]; dst[ 3] = 0;\n dst[ 4] = xAxis[1]; dst[ 5] = yAxis[1]; dst[ 6] = zAxis[1]; dst[ 7] = 0;\n dst[ 8] = xAxis[2]; dst[ 9] = yAxis[2]; dst[10] = zAxis[2]; dst[11] = 0;\n\n dst[12] = -(xAxis[0] * eye[0] + xAxis[1] * eye[1] + xAxis[2] * eye[2]);\n dst[13] = -(yAxis[0] * eye[0] + yAxis[1] * eye[1] + yAxis[2] * eye[2]);\n dst[14] = -(zAxis[0] * eye[0] + zAxis[1] * eye[1] + zAxis[2] * eye[2]);\n dst[15] = 1;\n\n return dst;\n}\n\n/**\n * Creates a 4-by-4 matrix which translates by the given vector v.\n * @param v - The vector by\n * which to translate.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The translation matrix.\n */\nexport function translation(v: Vec3, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n dst[ 0] = 1; dst[ 1] = 0; dst[ 2] = 0; dst[ 3] = 0;\n dst[ 4] = 0; dst[ 5] = 1; dst[ 6] = 0; dst[ 7] = 0;\n dst[ 8] = 0; dst[ 9] = 0; dst[10] = 1; dst[11] = 0;\n dst[12] = v[0]; dst[13] = v[1]; dst[14] = v[2]; dst[15] = 1;\n\n return dst;\n}\n\n/**\n * Translates the given 4-by-4 matrix by the given vector v.\n * @param m - The matrix.\n * @param v - The vector by\n * which to translate.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The translated matrix.\n */\nexport function translate(m: Mat4, v: Vec3, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n const m00 = m[0];\n const m01 = m[1];\n const m02 = m[2];\n const m03 = m[3];\n const m10 = m[1 * 4 + 0];\n const m11 = m[1 * 4 + 1];\n const m12 = m[1 * 4 + 2];\n const m13 = m[1 * 4 + 3];\n const m20 = m[2 * 4 + 0];\n const m21 = m[2 * 4 + 1];\n const m22 = m[2 * 4 + 2];\n const m23 = m[2 * 4 + 3];\n const m30 = m[3 * 4 + 0];\n const m31 = m[3 * 4 + 1];\n const m32 = m[3 * 4 + 2];\n const m33 = m[3 * 4 + 3];\n\n if (m !== dst) {\n dst[ 0] = m00;\n dst[ 1] = m01;\n dst[ 2] = m02;\n dst[ 3] = m03;\n dst[ 4] = m10;\n dst[ 5] = m11;\n dst[ 6] = m12;\n dst[ 7] = m13;\n dst[ 8] = m20;\n dst[ 9] = m21;\n dst[10] = m22;\n dst[11] = m23;\n }\n\n dst[12] = m00 * v0 + m10 * v1 + m20 * v2 + m30;\n dst[13] = m01 * v0 + m11 * v1 + m21 * v2 + m31;\n dst[14] = m02 * v0 + m12 * v1 + m22 * v2 + m32;\n dst[15] = m03 * v0 + m13 * v1 + m23 * v2 + m33;\n\n return dst;\n}\n\n/**\n * Creates a 4-by-4 matrix which rotates around the x-axis by the given angle.\n * @param angleInRadians - The angle by which to rotate (in radians).\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The rotation matrix.\n */\nexport function rotationX(angleInRadians: number, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n const c = Math.cos(angleInRadians);\n const s = Math.sin(angleInRadians);\n\n dst[ 0] = 1; dst[ 1] = 0; dst[ 2] = 0; dst[ 3] = 0;\n dst[ 4] = 0; dst[ 5] = c; dst[ 6] = s; dst[ 7] = 0;\n dst[ 8] = 0; dst[ 9] = -s; dst[10] = c; dst[11] = 0;\n dst[12] = 0; dst[13] = 0; dst[14] = 0; dst[15] = 1;\n\n return dst;\n}\n\n/**\n * Rotates the given 4-by-4 matrix around the x-axis by the given\n * angle.\n * @param m - The matrix.\n * @param angleInRadians - The angle by which to rotate (in radians).\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The rotated matrix.\n */\nexport function rotateX(m: Mat4, angleInRadians: number, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n const m10 = m[4];\n const m11 = m[5];\n const m12 = m[6];\n const m13 = m[7];\n const m20 = m[8];\n const m21 = m[9];\n const m22 = m[10];\n const m23 = m[11];\n const c = Math.cos(angleInRadians);\n const s = Math.sin(angleInRadians);\n\n dst[4] = c * m10 + s * m20;\n dst[5] = c * m11 + s * m21;\n dst[6] = c * m12 + s * m22;\n dst[7] = c * m13 + s * m23;\n dst[8] = c * m20 - s * m10;\n dst[9] = c * m21 - s * m11;\n dst[10] = c * m22 - s * m12;\n dst[11] = c * m23 - s * m13;\n\n if (m !== dst) {\n dst[ 0] = m[ 0];\n dst[ 1] = m[ 1];\n dst[ 2] = m[ 2];\n dst[ 3] = m[ 3];\n dst[12] = m[12];\n dst[13] = m[13];\n dst[14] = m[14];\n dst[15] = m[15];\n }\n\n return dst;\n}\n\n/**\n * Creates a 4-by-4 matrix which rotates around the y-axis by the given angle.\n * @param angleInRadians - The angle by which to rotate (in radians).\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The rotation matrix.\n */\nexport function rotationY(angleInRadians: number, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n const c = Math.cos(angleInRadians);\n const s = Math.sin(angleInRadians);\n\n dst[ 0] = c; dst[ 1] = 0; dst[ 2] = -s; dst[ 3] = 0;\n dst[ 4] = 0; dst[ 5] = 1; dst[ 6] = 0; dst[ 7] = 0;\n dst[ 8] = s; dst[ 9] = 0; dst[10] = c; dst[11] = 0;\n dst[12] = 0; dst[13] = 0; dst[14] = 0; dst[15] = 1;\n\n return dst;\n}\n\n/**\n * Rotates the given 4-by-4 matrix around the y-axis by the given\n * angle.\n * @param m - The matrix.\n * @param angleInRadians - The angle by which to rotate (in radians).\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The rotated matrix.\n */\nexport function rotateY(m: Mat4, angleInRadians: number, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n const m00 = m[0 * 4 + 0];\n const m01 = m[0 * 4 + 1];\n const m02 = m[0 * 4 + 2];\n const m03 = m[0 * 4 + 3];\n const m20 = m[2 * 4 + 0];\n const m21 = m[2 * 4 + 1];\n const m22 = m[2 * 4 + 2];\n const m23 = m[2 * 4 + 3];\n const c = Math.cos(angleInRadians);\n const s = Math.sin(angleInRadians);\n\n dst[ 0] = c * m00 - s * m20;\n dst[ 1] = c * m01 - s * m21;\n dst[ 2] = c * m02 - s * m22;\n dst[ 3] = c * m03 - s * m23;\n dst[ 8] = c * m20 + s * m00;\n dst[ 9] = c * m21 + s * m01;\n dst[10] = c * m22 + s * m02;\n dst[11] = c * m23 + s * m03;\n\n if (m !== dst) {\n dst[ 4] = m[ 4];\n dst[ 5] = m[ 5];\n dst[ 6] = m[ 6];\n dst[ 7] = m[ 7];\n dst[12] = m[12];\n dst[13] = m[13];\n dst[14] = m[14];\n dst[15] = m[15];\n }\n\n return dst;\n}\n\n/**\n * Creates a 4-by-4 matrix which rotates around the z-axis by the given angle.\n * @param angleInRadians - The angle by which to rotate (in radians).\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The rotation matrix.\n */\nexport function rotationZ(angleInRadians: number, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n const c = Math.cos(angleInRadians);\n const s = Math.sin(angleInRadians);\n\n dst[ 0] = c; dst[ 1] = s; dst[ 2] = 0; dst[ 3] = 0;\n dst[ 4] = -s; dst[ 5] = c; dst[ 6] = 0; dst[ 7] = 0;\n dst[ 8] = 0; dst[ 9] = 0; dst[10] = 1; dst[11] = 0;\n dst[12] = 0; dst[13] = 0; dst[14] = 0; dst[15] = 1;\n\n return dst;\n}\n\n/**\n * Rotates the given 4-by-4 matrix around the z-axis by the given\n * angle.\n * @param m - The matrix.\n * @param angleInRadians - The angle by which to rotate (in radians).\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The rotated matrix.\n */\nexport function rotateZ(m: Mat4, angleInRadians: number, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n const m00 = m[0 * 4 + 0];\n const m01 = m[0 * 4 + 1];\n const m02 = m[0 * 4 + 2];\n const m03 = m[0 * 4 + 3];\n const m10 = m[1 * 4 + 0];\n const m11 = m[1 * 4 + 1];\n const m12 = m[1 * 4 + 2];\n const m13 = m[1 * 4 + 3];\n const c = Math.cos(angleInRadians);\n const s = Math.sin(angleInRadians);\n\n dst[ 0] = c * m00 + s * m10;\n dst[ 1] = c * m01 + s * m11;\n dst[ 2] = c * m02 + s * m12;\n dst[ 3] = c * m03 + s * m13;\n dst[ 4] = c * m10 - s * m00;\n dst[ 5] = c * m11 - s * m01;\n dst[ 6] = c * m12 - s * m02;\n dst[ 7] = c * m13 - s * m03;\n\n if (m !== dst) {\n dst[ 8] = m[ 8];\n dst[ 9] = m[ 9];\n dst[10] = m[10];\n dst[11] = m[11];\n dst[12] = m[12];\n dst[13] = m[13];\n dst[14] = m[14];\n dst[15] = m[15];\n }\n\n return dst;\n}\n\n/**\n * Creates a 4-by-4 matrix which rotates around the given axis by the given\n * angle.\n * @param axis - The axis\n * about which to rotate.\n * @param angleInRadians - The angle by which to rotate (in radians).\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns A matrix which rotates angle radians\n * around the axis.\n */\nexport function axisRotation(axis: Vec3, angleInRadians: number, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n let x = axis[0];\n let y = axis[1];\n let z = axis[2];\n const n = Math.sqrt(x * x + y * y + z * z);\n x /= n;\n y /= n;\n z /= n;\n const xx = x * x;\n const yy = y * y;\n const zz = z * z;\n const c = Math.cos(angleInRadians);\n const s = Math.sin(angleInRadians);\n const oneMinusCosine = 1 - c;\n\n dst[ 0] = xx + (1 - xx) * c;\n dst[ 1] = x * y * oneMinusCosine + z * s;\n dst[ 2] = x * z * oneMinusCosine - y * s;\n dst[ 3] = 0;\n dst[ 4] = x * y * oneMinusCosine - z * s;\n dst[ 5] = yy + (1 - yy) * c;\n dst[ 6] = y * z * oneMinusCosine + x * s;\n dst[ 7] = 0;\n dst[ 8] = x * z * oneMinusCosine + y * s;\n dst[ 9] = y * z * oneMinusCosine - x * s;\n dst[10] = zz + (1 - zz) * c;\n dst[11] = 0;\n dst[12] = 0;\n dst[13] = 0;\n dst[14] = 0;\n dst[15] = 1;\n\n return dst;\n}\n\n/**\n * Creates a 4-by-4 matrix which rotates around the given axis by the given\n * angle. (same as axisRotation)\n * @param axis - The axis\n * about which to rotate.\n * @param angleInRadians - The angle by which to rotate (in radians).\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns A matrix which rotates angle radians\n * around the axis.\n */\nexport const rotation = axisRotation;\n\n/**\n * Rotates the given 4-by-4 matrix around the given axis by the\n * given angle.\n * @param m - The matrix.\n * @param axis - The axis\n * about which to rotate.\n * @param angleInRadians - The angle by which to rotate (in radians).\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The rotated matrix.\n */\nexport function axisRotate(m: Mat4, axis: Vec3, angleInRadians: number, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n let x = axis[0];\n let y = axis[1];\n let z = axis[2];\n const n = Math.sqrt(x * x + y * y + z * z);\n x /= n;\n y /= n;\n z /= n;\n const xx = x * x;\n const yy = y * y;\n const zz = z * z;\n const c = Math.cos(angleInRadians);\n const s = Math.sin(angleInRadians);\n const oneMinusCosine = 1 - c;\n\n const r00 = xx + (1 - xx) * c;\n const r01 = x * y * oneMinusCosine + z * s;\n const r02 = x * z * oneMinusCosine - y * s;\n const r10 = x * y * oneMinusCosine - z * s;\n const r11 = yy + (1 - yy) * c;\n const r12 = y * z * oneMinusCosine + x * s;\n const r20 = x * z * oneMinusCosine + y * s;\n const r21 = y * z * oneMinusCosine - x * s;\n const r22 = zz + (1 - zz) * c;\n\n const m00 = m[0];\n const m01 = m[1];\n const m02 = m[2];\n const m03 = m[3];\n const m10 = m[4];\n const m11 = m[5];\n const m12 = m[6];\n const m13 = m[7];\n const m20 = m[8];\n const m21 = m[9];\n const m22 = m[10];\n const m23 = m[11];\n\n dst[ 0] = r00 * m00 + r01 * m10 + r02 * m20;\n dst[ 1] = r00 * m01 + r01 * m11 + r02 * m21;\n dst[ 2] = r00 * m02 + r01 * m12 + r02 * m22;\n dst[ 3] = r00 * m03 + r01 * m13 + r02 * m23;\n dst[ 4] = r10 * m00 + r11 * m10 + r12 * m20;\n dst[ 5] = r10 * m01 + r11 * m11 + r12 * m21;\n dst[ 6] = r10 * m02 + r11 * m12 + r12 * m22;\n dst[ 7] = r10 * m03 + r11 * m13 + r12 * m23;\n dst[ 8] = r20 * m00 + r21 * m10 + r22 * m20;\n dst[ 9] = r20 * m01 + r21 * m11 + r22 * m21;\n dst[10] = r20 * m02 + r21 * m12 + r22 * m22;\n dst[11] = r20 * m03 + r21 * m13 + r22 * m23;\n\n if (m !== dst) {\n dst[12] = m[12];\n dst[13] = m[13];\n dst[14] = m[14];\n dst[15] = m[15];\n }\n\n return dst;\n}\n\n/**\n * Rotates the given 4-by-4 matrix around the given axis by the\n * given angle. (same as rotate)\n * @param m - The matrix.\n * @param axis - The axis\n * about which to rotate.\n * @param angleInRadians - The angle by which to rotate (in radians).\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The rotated matrix.\n */\nexport const rotate = axisRotate;\n\n/**\n * Creates a 4-by-4 matrix which scales in each dimension by an amount given by\n * the corresponding entry in the given vector; assumes the vector has three\n * entries.\n * @param v - A vector of\n * three entries specifying the factor by which to scale in each dimension.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The scaling matrix.\n */\nexport function scaling(v: Vec3, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n dst[ 0] = v[0]; dst[ 1] = 0; dst[ 2] = 0; dst[ 3] = 0;\n dst[ 4] = 0; dst[ 5] = v[1]; dst[ 6] = 0; dst[ 7] = 0;\n dst[ 8] = 0; dst[ 9] = 0; dst[10] = v[2]; dst[11] = 0;\n dst[12] = 0; dst[13] = 0; dst[14] = 0; dst[15] = 1;\n\n return dst;\n}\n\n/**\n * Scales the given 4-by-4 matrix in each dimension by an amount\n * given by the corresponding entry in the given vector; assumes the vector has\n * three entries.\n * @param m - The matrix to be modified.\n * @param v - A vector of three entries specifying the\n * factor by which to scale in each dimension.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The scaled matrix.\n */\nexport function scale(m: Mat4, v: Vec3, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n\n dst[ 0] = v0 * m[0 * 4 + 0];\n dst[ 1] = v0 * m[0 * 4 + 1];\n dst[ 2] = v0 * m[0 * 4 + 2];\n dst[ 3] = v0 * m[0 * 4 + 3];\n dst[ 4] = v1 * m[1 * 4 + 0];\n dst[ 5] = v1 * m[1 * 4 + 1];\n dst[ 6] = v1 * m[1 * 4 + 2];\n dst[ 7] = v1 * m[1 * 4 + 3];\n dst[ 8] = v2 * m[2 * 4 + 0];\n dst[ 9] = v2 * m[2 * 4 + 1];\n dst[10] = v2 * m[2 * 4 + 2];\n dst[11] = v2 * m[2 * 4 + 3];\n\n if (m !== dst) {\n dst[12] = m[12];\n dst[13] = m[13];\n dst[14] = m[14];\n dst[15] = m[15];\n }\n\n return dst;\n}\n\n/**\n * Creates a 4-by-4 matrix which scales a uniform amount in each dimension.\n * @param s - the amount to scale\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The scaling matrix.\n */\nexport function uniformScaling(s: number, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n dst[ 0] = s; dst[ 1] = 0; dst[ 2] = 0; dst[ 3] = 0;\n dst[ 4] = 0; dst[ 5] = s; dst[ 6] = 0; dst[ 7] = 0;\n dst[ 8] = 0; dst[ 9] = 0; dst[10] = s; dst[11] = 0;\n dst[12] = 0; dst[13] = 0; dst[14] = 0; dst[15] = 1;\n\n return dst;\n}\n\n/**\n * Scales the given 4-by-4 matrix in each dimension by a uniform scale.\n * @param m - The matrix to be modified.\n * @param s - The amount to scale.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The scaled matrix.\n */\nexport function uniformScale(m: Mat4, s: number, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n dst[ 0] = s * m[0 * 4 + 0];\n dst[ 1] = s * m[0 * 4 + 1];\n dst[ 2] = s * m[0 * 4 + 2];\n dst[ 3] = s * m[0 * 4 + 3];\n dst[ 4] = s * m[1 * 4 + 0];\n dst[ 5] = s * m[1 * 4 + 1];\n dst[ 6] = s * m[1 * 4 + 2];\n dst[ 7] = s * m[1 * 4 + 3];\n dst[ 8] = s * m[2 * 4 + 0];\n dst[ 9] = s * m[2 * 4 + 1];\n dst[10] = s * m[2 * 4 + 2];\n dst[11] = s * m[2 * 4 + 3];\n\n if (m !== dst) {\n dst[12] = m[12];\n dst[13] = m[13];\n dst[14] = m[14];\n dst[15] = m[15];\n }\n\n return dst;\n}","/*\n * Copyright 2022 Gregg Tavares\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n */\n\n/**\n * A JavaScript array with 4 values, Float32Array with 4 values, or a Float64Array with 4 values.\n * When created by the library will create the default type which is `Float32Array`\n * but can be set by calling {@link quat.setDefaultType}.\n */\nexport type Quat = number[] | Float32Array | Float64Array;\n\n/**\n *\n * Quat4 math functions.\n *\n * Almost all functions take an optional `dst` argument. If it is not passed in the\n * functions will create a new `Quat4`. In other words you can do this\n *\n * const v = quat4.cross(v1, v2); // Creates a new Quat4 with the cross product of v1 x v2.\n *\n * or\n *\n * const v = quat4.create();\n * quat4.cross(v1, v2, v); // Puts the cross product of v1 x v2 in v\n *\n * The first style is often easier but depending on where it's used it generates garbage where\n * as there is almost never allocation with the second style.\n *\n * It is always safe to pass any vector as the destination. So for example\n *\n * quat4.cross(v1, v2, v1); // Puts the cross product of v1 x v2 in v1\n *\n */\n\nexport let QuatType: new (n: number) => Quat = Float32Array;\n\n/**\n * Sets the type this library creates for a Quat4\n * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array`\n * @returns previous constructor for Quat4\n */\nexport function setDefaultType(ctor: new (n: number) => Quat) {\n const oldType = QuatType;\n QuatType = ctor;\n return oldType;\n}\n\n/**\n * Creates a quat4; may be called with x, y, z to set initial values.\n * @param x - Initial x value.\n * @param y - Initial y value.\n * @param z - Initial z value.\n * @param w - Initial w value.\n * @returns the created vector\n */\nexport function create(x?: number, y?: number, z?: number, w?: number): Quat {\n const dst = new QuatType(4);\n if (x !== undefined) {\n dst[0] = x;\n if (y !== undefined) {\n dst[1] = y;\n if (z !== undefined) {\n dst[2] = z;\n if (w !== undefined) {\n dst[3] = w;\n }\n }\n }\n }\n return dst;\n}","/*\n * Copyright 2022 Gregg Tavares\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n */\nimport * as utils from './utils.js';\nimport { Quat, create, setDefaultType, QuatType } from './quat';\nimport { Mat3 } from './mat3.js';\nimport { Mat4 } from './mat4.js';\nimport { Vec3 } from './vec3.js';\nimport * as vec3 from './vec3-impl.js';\n\nexport type RotationOrder = 'xyz' | 'xzy' | 'yxz' | 'yzx' | 'zxy' | 'zyx';\n\nexport default Quat;\nexport { create, setDefaultType };\n\n/**\n * Creates a Quat; may be called with x, y, z to set initial values. (same as create)\n * @param x - Initial x value.\n * @param y - Initial y value.\n * @param z - Initial z value.\n * @param z - Initial w value.\n * @returns the created vector\n */\nexport const fromValues = create;\n\n/**\n * Sets the values of a Quat\n * Also see {@link quat.create} and {@link quat.copy}\n *\n * @param x first value\n * @param y second value\n * @param z third value\n * @param w fourth value\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector with its elements set.\n */\nexport function set(x: number, y: number, z: number, w: number, dst?: Quat) {\n dst = dst || new QuatType(4);\n\n dst[0] = x;\n dst[1] = y;\n dst[2] = z;\n dst[3] = w;\n\n return dst;\n}\n\n/**\n * Sets a quaternion from the given angle and axis,\n * then returns it.\n *\n * @param axis - the axis to rotate around\n * @param angleInRadians - the angle\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns The quaternion that represents the given axis and angle\n **/\nexport function fromAxisAngle(axis: Vec3, angleInRadians: number, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n const halfAngle = angleInRadians * 0.5;\n const s = Math.sin(halfAngle);\n\n dst[0] = s * axis[0];\n dst[1] = s * axis[1];\n dst[2] = s * axis[2];\n dst[3] = Math.cos(halfAngle);\n\n return dst;\n}\n\n/**\n * Gets the rotation axis and angle\n * @param q - quaternion to compute from\n * @param dst - Vec3 to hold result. If not passed in a new one is created.\n * @return angle and axis\n */\nexport function toAxisAngle(q: Quat, dst?: Vec3): { angle: number, axis: Vec3 } {\n dst = dst || vec3.create(4);\n\n const angle = Math.acos(q[3]) * 2;\n const s = Math.sin(angle * 0.5);\n if (s > utils.EPSILON) {\n dst[0] = q[0] / s;\n dst[1] = q[1] / s;\n dst[2] = q[2] / s;\n } else {\n dst[0] = 1;\n dst[1] = 0;\n dst[2] = 0;\n }\n\n return { angle, axis: dst };\n}\n\n/**\n * Returns the angle in degrees between two rotations a and b.\n * @param a - quaternion a\n * @param b - quaternion b\n * @return angle in radians between the two quaternions\n */\nexport function angle(a: Quat, b: Quat) {\n const d = dot(a, b);\n return Math.acos(2 * d * d - 1);\n}\n\n/**\n * Multiplies two quaternions\n *\n * @param a - the first quaternion\n * @param b - the second quaternion\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns A quaternion that is the result of a * b\n */\nexport function multiply(a: Quat, b: Quat, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n const ax = a[0];\n const ay = a[1];\n const az = a[2];\n const aw = a[3];\n\n const bx = b[0];\n const by = b[1];\n const bz = b[2];\n const bw = b[3];\n\n dst[0] = ax * bw + aw * bx + ay * bz - az * by;\n dst[1] = ay * bw + aw * by + az * bx - ax * bz;\n dst[2] = az * bw + aw * bz + ax * by - ay * bx;\n dst[3] = aw * bw - ax * bx - ay * by - az * bz;\n\n return dst;\n}\n\n/**\n * Multiplies two quaternions\n *\n * @param a - the first quaternion\n * @param b - the second quaternion\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns A quaternion that is the result of a * b\n */\nexport const mul = multiply;\n\n/**\n * Rotates the given quaternion around the X axis by the given angle.\n * @param q - quaternion to rotate\n * @param angleInRadians - The angle by which to rotate\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns A quaternion that is the result of a * b\n */\nexport function rotateX(q: Quat, angleInRadians: number, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n const halfAngle = angleInRadians * 0.5;\n\n const qx = q[0];\n const qy = q[1];\n const qz = q[2];\n const qw = q[3];\n\n const bx = Math.sin(halfAngle);\n const bw = Math.cos(halfAngle);\n\n dst[0] = qx * bw + qw * bx;\n dst[1] = qy * bw + qz * bx;\n dst[2] = qz * bw - qy * bx;\n dst[3] = qw * bw - qx * bx;\n\n return dst;\n}\n\n/**\n * Rotates the given quaternion around the Y axis by the given angle.\n * @param q - quaternion to rotate\n * @param angleInRadians - The angle by which to rotate\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns A quaternion that is the result of a * b\n */\nexport function rotateY(q: Quat, angleInRadians: number, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n const halfAngle = angleInRadians * 0.5;\n\n const qx = q[0];\n const qy = q[1];\n const qz = q[2];\n const qw = q[3];\n\n const by = Math.sin(halfAngle);\n const bw = Math.cos(halfAngle);\n\n dst[0] = qx * bw - qz * by;\n dst[1] = qy * bw + qw * by;\n dst[2] = qz * bw + qx * by;\n dst[3] = qw * bw - qy * by;\n\n return dst;\n}\n\n/**\n * Rotates the given quaternion around the Z axis by the given angle.\n * @param q - quaternion to rotate\n * @param angleInRadians - The angle by which to rotate\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns A quaternion that is the result of a * b\n */\nexport function rotateZ(q: Quat, angleInRadians: number, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n const halfAngle = angleInRadians * 0.5;\n\n const qx = q[0];\n const qy = q[1];\n const qz = q[2];\n const qw = q[3];\n\n const bz = Math.sin(halfAngle);\n const bw = Math.cos(halfAngle);\n\n dst[0] = qx * bw + qy * bz;\n dst[1] = qy * bw - qx * bz;\n dst[2] = qz * bw + qw * bz;\n dst[3] = qw * bw - qz * bz;\n\n return dst;\n}\n\n/**\n * Spherically linear interpolate between two quaternions\n *\n * @param a - starting value\n * @param b - ending value\n * @param t - value where 0 = a and 1 = b\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns A quaternion that is the result of a * b\n */\nexport function slerp(a: Quat, b: Quat, t: number, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n const ax = a[0];\n const ay = a[1];\n const az = a[2];\n const aw = a[3];\n\n let bx = b[0];\n let by = b[1];\n let bz = b[2];\n let bw = b[3];\n\n let cosOmega = ax * bx + ay * by + az * bz + aw * bw;\n\n if (cosOmega < 0) {\n cosOmega = -cosOmega;\n bx = -bx;\n by = -by;\n bz = -bz;\n bw = -bw;\n }\n\n let scale0;\n let scale1;\n\n if (1.0 - cosOmega > utils.EPSILON) {\n const omega = Math.acos(cosOmega);\n const sinOmega = Math.sin(omega);\n scale0 = Math.sin((1 - t) * omega) / sinOmega;\n scale1 = Math.sin(t * omega) / sinOmega;\n } else {\n scale0 = 1.0 - t;\n scale1 = t;\n }\n\n dst[0] = scale0 * ax + scale1 * bx;\n dst[1] = scale0 * ay + scale1 * by;\n dst[2] = scale0 * az + scale1 * bz;\n dst[3] = scale0 * aw + scale1 * bw;\n\n return dst;\n}\n\n/**\n * Compute the inverse of a quaternion\n *\n * @param q - quaternion to compute the inverse of\n * @returns A quaternion that is the result of a * b\n */\nexport function inverse(q: Quat, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n const a0 = q[0];\n const a1 = q[1];\n const a2 = q[2];\n const a3 = q[3];\n\n const dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\n const invDot = dot ? 1 / dot : 0;\n\n dst[0] = -a0 * invDot;\n dst[1] = -a1 * invDot;\n dst[2] = -a2 * invDot;\n dst[3] = a3 * invDot;\n\n return dst;\n}\n\n/**\n * Compute the conjugate of a quaternion\n * For quaternions with a magnitude of 1 (a unit quaternion)\n * this returns the same as the inverse but is faster to calculate.\n *\n * @param q - quaternion to compute the conjugate of.\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns The conjugate of q\n */\nexport function conjugate(q: Quat, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n dst[0] = -q[0];\n dst[1] = -q[1];\n dst[2] = -q[2];\n dst[3] = q[3];\n\n return dst;\n}\n\n/**\n * Creates a quaternion from the given rotation matrix.\n *\n * The created quaternion is not normalized.\n *\n * @param m - rotation matrix\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns the result\n */\nexport function fromMat(m: Mat3 | Mat4, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n /*\n 0 1 2\n 3 4 5\n 6 7 8\n\n 0 1 2\n 4 5 6\n 8 9 10\n */\n\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\n // article \"Quaternion Calculus and Fast Animation\".\n const trace = m[0] + m[5] + m[10];\n\n if (trace > 0.0) {\n // |w| > 1/2, may as well choose w > 1/2\n const root = Math.sqrt(trace + 1); // 2w\n dst[3] = 0.5 * root;\n const invRoot = 0.5 / root; // 1/(4w)\n\n dst[0] = (m[6] - m[9]) * invRoot;\n dst[1] = (m[8] - m[2]) * invRoot;\n dst[2] = (m[1] - m[4]) * invRoot;\n } else {\n // |w| <= 1/2\n let i = 0;\n\n if (m[5] > m[0]) {\n i = 1;\n }\n if (m[10] > m[i * 4 + i]) {\n i = 2;\n }\n\n const j = (i + 1) % 3;\n const k = (i + 2) % 3;\n\n const root = Math.sqrt(m[i * 4 + i] - m[j * 4 + j] - m[k * 4 + k] + 1.0);\n dst[i] = 0.5 * root;\n\n const invRoot = 0.5 / root;\n\n dst[3] = (m[j * 4 + k] - m[k * 4 + j]) * invRoot;\n dst[j] = (m[j * 4 + i] + m[i * 4 + j]) * invRoot;\n dst[k] = (m[k * 4 + i] + m[i * 4 + k]) * invRoot;\n }\n\n return dst;\n}\n\n/**\n * Creates a quaternion from the given euler angle x, y, z using the provided intrinsic order for the conversion.\n *\n * @param xAngleInRadians - angle to rotate around X axis in radians.\n * @param yAngleInRadians - angle to rotate around Y axis in radians.\n * @param zAngleInRadians - angle to rotate around Z axis in radians.\n * @param order - order to apply euler angles\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns A quaternion representing the same rotation as the euler angles applied in the given order\n */\nexport function fromEuler(\n xAngleInRadians: number,\n yAngleInRadians: number,\n zAngleInRadians: number,\n order: RotationOrder,\n dst?: Quat) {\n dst = dst || new QuatType(4);\n\n const xHalfAngle = xAngleInRadians * 0.5;\n const yHalfAngle = yAngleInRadians * 0.5;\n const zHalfAngle = zAngleInRadians * 0.5;\n\n const sx = Math.sin(xHalfAngle);\n const cx = Math.cos(xHalfAngle);\n const sy = Math.sin(yHalfAngle);\n const cy = Math.cos(yHalfAngle);\n const sz = Math.sin(zHalfAngle);\n const cz = Math.cos(zHalfAngle);\n\n switch (order) {\n case 'xyz':\n dst[0] = sx * cy * cz + cx * sy * sz;\n dst[1] = cx * sy * cz - sx * cy * sz;\n dst[2] = cx * cy * sz + sx * sy * cz;\n dst[3] = cx * cy * cz - sx * sy * sz;\n break;\n\n case 'xzy':\n dst[0] = sx * cy * cz - cx * sy * sz;\n dst[1] = cx * sy * cz - sx * cy * sz;\n dst[2] = cx * cy * sz + sx * sy * cz;\n dst[3] = cx * cy * cz + sx * sy * sz;\n break;\n\n case 'yxz':\n dst[0] = sx * cy * cz + cx * sy * sz;\n dst[1] = cx * sy * cz - sx * cy * sz;\n dst[2] = cx * cy * sz - sx * sy * cz;\n dst[3] = cx * cy * cz + sx * sy * sz;\n break;\n\n case 'yzx':\n dst[0] = sx * cy * cz + cx * sy * sz;\n dst[1] = cx * sy * cz + sx * cy * sz;\n dst[2] = cx * cy * sz - sx * sy * cz;\n dst[3] = cx * cy * cz - sx * sy * sz;\n break;\n\n case 'zxy':\n dst[0] = sx * cy * cz - cx * sy * sz;\n dst[1] = cx * sy * cz + sx * cy * sz;\n dst[2] = cx * cy * sz + sx * sy * cz;\n dst[3] = cx * cy * cz - sx * sy * sz;\n break;\n\n case 'zyx':\n dst[0] = sx * cy * cz - cx * sy * sz;\n dst[1] = cx * sy * cz + sx * cy * sz;\n dst[2] = cx * cy * sz - sx * sy * cz;\n dst[3] = cx * cy * cz + sx * sy * sz;\n break;\n\n default:\n throw new Error(`Unknown rotation order: ${order}`);\n }\n\n return dst;\n}\n\n/**\n * Copies a quaternion. (same as {@link quat.clone})\n * Also see {@link quat.create} and {@link quat.set}\n * @param q - The quaternion.\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns A quaternion that is a copy of q\n */\nexport function copy(q: Quat, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n dst[0] = q[0];\n dst[1] = q[1];\n dst[2] = q[2];\n dst[3] = q[3];\n\n return dst;\n}\n\n/**\n * Clones a quaternion. (same as {@link quat.copy})\n * Also see {@link quat.create} and {@link quat.set}\n * @param q - The quaternion.\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns A copy of q.\n */\nexport const clone = copy;\n\n/**\n * Adds two quaternions; assumes a and b have the same dimension.\n * @param a - Operand quaternion.\n * @param b - Operand quaternion.\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns A quaternion that is the sum of a and b.\n */\nexport function add(a: Quat, b: Quat, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n dst[0] = a[0] + b[0];\n dst[1] = a[1] + b[1];\n dst[2] = a[2] + b[2];\n dst[3] = a[3] + b[3];\n\n return dst;\n}\n\n/**\n * Subtracts two quaternions.\n * @param a - Operand quaternion.\n * @param b - Operand quaternion.\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns A quaternion that is the difference of a and b.\n */\nexport function subtract(a: Quat, b: Quat, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n dst[0] = a[0] - b[0];\n dst[1] = a[1] - b[1];\n dst[2] = a[2] - b[2];\n dst[3] = a[3] - b[3];\n\n return dst;\n}\n\n/**\n * Subtracts two quaternions.\n * @param a - Operand quaternion.\n * @param b - Operand quaternion.\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns A quaternion that is the difference of a and b.\n */\nexport const sub = subtract;\n\n/**\n * Multiplies a quaternion by a scalar.\n * @param v - The quaternion.\n * @param k - The scalar.\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns The scaled quaternion.\n */\nexport function mulScalar(v: Quat, k: number, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n dst[0] = v[0] * k;\n dst[1] = v[1] * k;\n dst[2] = v[2] * k;\n dst[3] = v[3] * k;\n\n return dst;\n}\n\n/**\n * Multiplies a quaternion by a scalar. (same as mulScalar)\n * @param v - The quaternion.\n * @param k - The scalar.\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns The scaled quaternion.\n */\nexport const scale = mulScalar;\n\n/**\n * Divides a vector by a scalar.\n * @param v - The vector.\n * @param k - The scalar.\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns The scaled quaternion.\n */\nexport function divScalar(v: Quat, k: number, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n dst[0] = v[0] / k;\n dst[1] = v[1] / k;\n dst[2] = v[2] / k;\n dst[3] = v[3] / k;\n\n return dst;\n}\n\n/**\n * Computes the dot product of two quaternions\n * @param a - Operand quaternion.\n * @param b - Operand quaternion.\n * @returns dot product\n */\nexport function dot(a: Quat, b: Quat): number {\n return (a[0] * b[0]) + (a[1] * b[1]) + (a[2] * b[2]) + (a[3] * b[3]);\n}\n\n/**\n * Performs linear interpolation on two quaternions.\n * Given quaternions a and b and interpolation coefficient t, returns\n * a + t * (b - a).\n * @param a - Operand quaternion.\n * @param b - Operand quaternion.\n * @param t - Interpolation coefficient.\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns The linear interpolated result.\n */\nexport function lerp(a: Quat, b: Quat, t: number, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n dst[0] = a[0] + t * (b[0] - a[0]);\n dst[1] = a[1] + t * (b[1] - a[1]);\n dst[2] = a[2] + t * (b[2] - a[2]);\n dst[3] = a[3] + t * (b[3] - a[3]);\n\n return dst;\n}\n\n/**\n * Computes the length of quaternion\n * @param v - quaternion.\n * @returns length of quaternion.\n */\nexport function length(v: Quat): number {\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n const v3 = v[3];\n return Math.sqrt(v0 * v0 + v1 * v1 + v2 * v2 + v3 * v3);\n}\n\n/**\n * Computes the length of quaternion (same as length)\n * @param v - quaternion.\n * @returns length of quaternion.\n */\nexport const len = length;\n\n/**\n * Computes the square of the length of quaternion\n * @param v - quaternion.\n * @returns square of the length of quaternion.\n */\nexport function lengthSq(v: Quat): number {\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n const v3 = v[3];\n return v0 * v0 + v1 * v1 + v2 * v2 + v3 * v3;\n}\n\n/**\n * Computes the square of the length of quaternion (same as lengthSq)\n * @param v - quaternion.\n * @returns square of the length of quaternion.\n */\nexport const lenSq = lengthSq;\n\n/**\n * Divides a quaternion by its Euclidean length and returns the quotient.\n * @param v - The quaternion.\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns The normalized quaternion.\n */\nexport function normalize(v: Quat, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n const v3 = v[3];\n const len = Math.sqrt(v0 * v0 + v1 * v1 + v2 * v2 + v3 * v3);\n\n if (len > 0.00001) {\n dst[0] = v0 / len;\n dst[1] = v1 / len;\n dst[2] = v2 / len;\n dst[3] = v3 / len;\n } else {\n dst[0] = 0;\n dst[1] = 0;\n dst[2] = 0;\n dst[3] = 0;\n }\n\n return dst;\n}\n\n/**\n * Check if 2 quaternions are approximately equal\n * @param a - Operand quaternion.\n * @param b - Operand quaternion.\n * @returns true if quaternions are approximately equal\n */\nexport function equalsApproximately(a: Quat, b: Quat): boolean {\n return Math.abs(a[0] - b[0]) < utils.EPSILON &&\n Math.abs(a[1] - b[1]) < utils.EPSILON &&\n Math.abs(a[2] - b[2]) < utils.EPSILON &&\n Math.abs(a[3] - b[3]) < utils.EPSILON;\n}\n\n/**\n * Check if 2 quaternions are exactly equal\n * @param a - Operand quaternion.\n * @param b - Operand quaternion.\n * @returns true if quaternions are exactly equal\n */\nexport function equals(a: Quat, b: Quat): boolean {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];\n}\n\n/**\n * Creates an identity quaternion\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns an identity quaternion\n */\nexport function identity(dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n dst[0] = 0;\n dst[1] = 0;\n dst[2] = 0;\n dst[3] = 1;\n\n return dst;\n}\n\nlet tempVec3: Vec3;\nlet xUnitVec3: Vec3;\nlet yUnitVec3: Vec3;\n\n/**\n * Computes a quaternion to represent the shortest rotation from one vector to another.\n *\n * @param aUnit - the start vector\n * @param bUnit - the end vector\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns the result\n */\nexport function rotationTo(aUnit: Vec3, bUnit: Vec3, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n tempVec3 = tempVec3 || vec3.create();\n xUnitVec3 = xUnitVec3 || vec3.create(1, 0, 0);\n yUnitVec3 = yUnitVec3 || vec3.create(0, 1, 0);\n\n const dot = vec3.dot(aUnit, bUnit);\n if (dot < -0.999999) {\n vec3.cross(xUnitVec3, aUnit, tempVec3);\n if (vec3.len(tempVec3) < 0.000001) {\n vec3.cross(yUnitVec3, aUnit, tempVec3);\n }\n\n vec3.normalize(tempVec3, tempVec3);\n fromAxisAngle(tempVec3, Math.PI, dst);\n\n return dst;\n } else if (dot > 0.999999) {\n dst[0] = 0;\n dst[1] = 0;\n dst[2] = 0;\n dst[3] = 1;\n\n return dst;\n } else {\n vec3.cross(aUnit, bUnit, tempVec3);\n\n dst[0] = tempVec3[0];\n dst[1] = tempVec3[1];\n dst[2] = tempVec3[2];\n dst[3] = 1 + dot;\n\n return normalize(dst, dst);\n }\n}\n\nlet tempQuat1: Quat;\nlet tempQuat2: Quat;\n\n/**\n * Performs a spherical linear interpolation with two control points\n *\n * @param a - the first quaternion\n * @param b - the second quaternion\n * @param c - the third quaternion\n * @param d - the fourth quaternion\n * @param t - Interpolation coefficient 0 to 1\n * @returns result\n */\nexport function sqlerp(\n a: Quat,\n b: Quat,\n c: Quat,\n d: Quat,\n t: number,\n dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n tempQuat1 = tempQuat1 || new QuatType(4);\n tempQuat2 = tempQuat2 || new QuatType(4);\n\n slerp(a, d, t, tempQuat1);\n slerp(b, c, t, tempQuat2);\n slerp(tempQuat1, tempQuat2, 2 * t * (1 - t), dst);\n\n return dst;\n}\n","/*\n * Copyright 2022 Gregg Tavares\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n */\n\n/**\n * A JavaScript array with 4 values, Float32Array with 4 values, or a Float64Array with 4 values.\n * When created by the library will create the default type which is `Float32Array`\n * but can be set by calling {@link vec4.setDefaultType}.\n */\nexport type Vec4 = number[] | Float32Array | Float64Array;\n\n/**\n *\n * Vec4 math functions.\n *\n * Almost all functions take an optional `dst` argument. If it is not passed in the\n * functions will create a new `Vec4`. In other words you can do this\n *\n * const v = vec4.cross(v1, v2); // Creates a new Vec4 with the cross product of v1 x v2.\n *\n * or\n *\n * const v = vec4.create();\n * vec4.cross(v1, v2, v); // Puts the cross product of v1 x v2 in v\n *\n * The first style is often easier but depending on where it's used it generates garbage where\n * as there is almost never allocation with the second style.\n *\n * It is always safe to pass any vector as the destination. So for example\n *\n * vec4.cross(v1, v2, v1); // Puts the cross product of v1 x v2 in v1\n *\n */\n\nexport let VecType: new (n: number) => Vec4 = Float32Array;\n\n/**\n * Sets the type this library creates for a Vec4\n * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array`\n * @returns previous constructor for Vec4\n */\nexport function setDefaultType(ctor: new (n: number) => Vec4) {\n const oldType = VecType;\n VecType = ctor;\n return oldType;\n}\n\n/**\n * Creates a vec4; may be called with x, y, z to set initial values.\n * @param x - Initial x value.\n * @param y - Initial y value.\n * @param z - Initial z value.\n * @param w - Initial w value.\n * @returns the created vector\n */\nexport function create(x?: number, y?: number, z?: number, w?: number): Vec4 {\n const dst = new VecType(4);\n if (x !== undefined) {\n dst[0] = x;\n if (y !== undefined) {\n dst[1] = y;\n if (z !== undefined) {\n dst[2] = z;\n if (w !== undefined) {\n dst[3] = w;\n }\n }\n }\n }\n return dst;\n}","/*\n * Copyright 2022 Gregg Tavares\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n */\nimport * as utils from './utils.js';\nimport { Vec4, create, setDefaultType, VecType } from './vec4';\nimport { Mat4 } from './mat4';\n\nexport default Vec4;\nexport { create, setDefaultType };\n\n/**\n * Creates a vec4; may be called with x, y, z to set initial values. (same as create)\n * @param x - Initial x value.\n * @param y - Initial y value.\n * @param z - Initial z value.\n * @param z - Initial w value.\n * @returns the created vector\n */\nexport const fromValues = create;\n\n/**\n * Sets the values of a Vec4\n * Also see {@link vec4.create} and {@link vec4.copy}\n *\n * @param x first value\n * @param y second value\n * @param z third value\n * @param w fourth value\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector with its elements set.\n */\nexport function set(x: number, y: number, z: number, w: number, dst?: Vec4) {\n dst = dst || new VecType(4);\n\n dst[0] = x;\n dst[1] = y;\n dst[2] = z;\n dst[3] = w;\n\n return dst;\n}\n\n/**\n * Applies Math.ceil to each element of vector\n * @param v - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the ceil of each element of v.\n */\nexport function ceil(v: Vec4, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = Math.ceil(v[0]);\n dst[1] = Math.ceil(v[1]);\n dst[2] = Math.ceil(v[2]);\n dst[3] = Math.ceil(v[3]);\n\n return dst;\n}\n\n/**\n * Applies Math.floor to each element of vector\n * @param v - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the floor of each element of v.\n */\nexport function floor(v: Vec4, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = Math.floor(v[0]);\n dst[1] = Math.floor(v[1]);\n dst[2] = Math.floor(v[2]);\n dst[3] = Math.floor(v[3]);\n\n return dst;\n}\n\n/**\n * Applies Math.round to each element of vector\n * @param v - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the round of each element of v.\n */\nexport function round(v: Vec4, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = Math.round(v[0]);\n dst[1] = Math.round(v[1]);\n dst[2] = Math.round(v[2]);\n dst[3] = Math.round(v[3]);\n\n return dst;\n}\n\n/**\n * Clamp each element of vector between min and max\n * @param v - Operand vector.\n * @param max - Min value, default 0\n * @param min - Max value, default 1\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that the clamped value of each element of v.\n */\nexport function clamp(v: Vec4, min = 0, max = 1, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = Math.min(max, Math.max(min, v[0]));\n dst[1] = Math.min(max, Math.max(min, v[1]));\n dst[2] = Math.min(max, Math.max(min, v[2]));\n dst[3] = Math.min(max, Math.max(min, v[3]));\n\n return dst;\n}\n\n/**\n * Adds two vectors; assumes a and b have the same dimension.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the sum of a and b.\n */\nexport function add(a: Vec4, b: Vec4, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = a[0] + b[0];\n dst[1] = a[1] + b[1];\n dst[2] = a[2] + b[2];\n dst[3] = a[3] + b[3];\n\n return dst;\n}\n\n/**\n * Adds two vectors, scaling the 2nd; assumes a and b have the same dimension.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param scale - Amount to scale b\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the sum of a + b * scale.\n */\nexport function addScaled(a: Vec4, b: Vec4, scale: number, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = a[0] + b[0] * scale;\n dst[1] = a[1] + b[1] * scale;\n dst[2] = a[2] + b[2] * scale;\n dst[3] = a[3] + b[3] * scale;\n\n return dst;\n}\n\n/**\n * Subtracts two vectors.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the difference of a and b.\n */\nexport function subtract(a: Vec4, b: Vec4, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = a[0] - b[0];\n dst[1] = a[1] - b[1];\n dst[2] = a[2] - b[2];\n dst[3] = a[3] - b[3];\n\n return dst;\n}\n\n/**\n * Subtracts two vectors.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the difference of a and b.\n */\nexport const sub = subtract;\n\n/**\n * Check if 2 vectors are approximately equal\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @returns true if vectors are approximately equal\n */\nexport function equalsApproximately(a: Vec4, b: Vec4): boolean {\n return Math.abs(a[0] - b[0]) < utils.EPSILON &&\n Math.abs(a[1] - b[1]) < utils.EPSILON &&\n Math.abs(a[2] - b[2]) < utils.EPSILON &&\n Math.abs(a[3] - b[3]) < utils.EPSILON;\n}\n\n/**\n * Check if 2 vectors are exactly equal\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @returns true if vectors are exactly equal\n */\nexport function equals(a: Vec4, b: Vec4): boolean {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];\n}\n\n/**\n * Performs linear interpolation on two vectors.\n * Given vectors a and b and interpolation coefficient t, returns\n * a + t * (b - a).\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param t - Interpolation coefficient.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The linear interpolated result.\n */\nexport function lerp(a: Vec4, b: Vec4, t: number, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = a[0] + t * (b[0] - a[0]);\n dst[1] = a[1] + t * (b[1] - a[1]);\n dst[2] = a[2] + t * (b[2] - a[2]);\n dst[3] = a[3] + t * (b[3] - a[3]);\n\n return dst;\n}\n\n/**\n * Performs linear interpolation on two vectors.\n * Given vectors a and b and interpolation coefficient vector t, returns\n * a + t * (b - a).\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param t - Interpolation coefficients vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns the linear interpolated result.\n */\nexport function lerpV(a: Vec4, b: Vec4, t: Vec4, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = a[0] + t[0] * (b[0] - a[0]);\n dst[1] = a[1] + t[1] * (b[1] - a[1]);\n dst[2] = a[2] + t[2] * (b[2] - a[2]);\n dst[3] = a[3] + t[3] * (b[3] - a[3]);\n\n return dst;\n}\n\n/**\n * Return max values of two vectors.\n * Given vectors a and b returns\n * [max(a[0], b[0]), max(a[1], b[1]), max(a[2], b[2])].\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The max components vector.\n */\nexport function max(a: Vec4, b: Vec4, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = Math.max(a[0], b[0]);\n dst[1] = Math.max(a[1], b[1]);\n dst[2] = Math.max(a[2], b[2]);\n dst[3] = Math.max(a[3], b[3]);\n\n return dst;\n}\n\n/**\n * Return min values of two vectors.\n * Given vectors a and b returns\n * [min(a[0], b[0]), min(a[1], b[1]), min(a[2], b[2])].\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The min components vector.\n */\nexport function min(a: Vec4, b: Vec4, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = Math.min(a[0], b[0]);\n dst[1] = Math.min(a[1], b[1]);\n dst[2] = Math.min(a[2], b[2]);\n dst[3] = Math.min(a[3], b[3]);\n\n return dst;\n}\n\n/**\n * Multiplies a vector by a scalar.\n * @param v - The vector.\n * @param k - The scalar.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The scaled vector.\n */\nexport function mulScalar(v: Vec4, k: number, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = v[0] * k;\n dst[1] = v[1] * k;\n dst[2] = v[2] * k;\n dst[3] = v[3] * k;\n\n return dst;\n}\n\n/**\n * Multiplies a vector by a scalar. (same as mulScalar)\n * @param v - The vector.\n * @param k - The scalar.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The scaled vector.\n */\nexport const scale = mulScalar;\n\n/**\n * Divides a vector by a scalar.\n * @param v - The vector.\n * @param k - The scalar.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The scaled vector.\n */\nexport function divScalar(v: Vec4, k: number, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = v[0] / k;\n dst[1] = v[1] / k;\n dst[2] = v[2] / k;\n dst[3] = v[3] / k;\n\n return dst;\n}\n\n/**\n * Inverse a vector.\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The inverted vector.\n */\nexport function inverse(v: Vec4, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = 1 / v[0];\n dst[1] = 1 / v[1];\n dst[2] = 1 / v[2];\n dst[3] = 1 / v[3];\n\n return dst;\n}\n\n/**\n * Invert a vector. (same as inverse)\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The inverted vector.\n */\nexport const invert = inverse;\n\n/**\n * Computes the dot product of two vectors\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @returns dot product\n */\nexport function dot(a: Vec4, b: Vec4): number {\n return (a[0] * b[0]) + (a[1] * b[1]) + (a[2] * b[2]) + (a[3] * b[3]);\n}\n\n/**\n * Computes the length of vector\n * @param v - vector.\n * @returns length of vector.\n */\nexport function length(v: Vec4): number {\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n const v3 = v[3];\n return Math.sqrt(v0 * v0 + v1 * v1 + v2 * v2 + v3 * v3);\n}\n\n/**\n * Computes the length of vector (same as length)\n * @param v - vector.\n * @returns length of vector.\n */\nexport const len = length;\n\n/**\n * Computes the square of the length of vector\n * @param v - vector.\n * @returns square of the length of vector.\n */\nexport function lengthSq(v: Vec4): number {\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n const v3 = v[3];\n return v0 * v0 + v1 * v1 + v2 * v2 + v3 * v3;\n}\n\n/**\n * Computes the square of the length of vector (same as lengthSq)\n * @param v - vector.\n * @returns square of the length of vector.\n */\nexport const lenSq = lengthSq;\n\n/**\n * Computes the distance between 2 points\n * @param a - vector.\n * @param b - vector.\n * @returns distance between a and b\n */\nexport function distance(a: Vec4, b: Vec4): number {\n const dx = a[0] - b[0];\n const dy = a[1] - b[1];\n const dz = a[2] - b[2];\n const dw = a[3] - b[3];\n return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw);\n}\n\n/**\n * Computes the distance between 2 points (same as distance)\n * @param a - vector.\n * @param b - vector.\n * @returns distance between a and b\n */\nexport const dist = distance;\n\n/**\n * Computes the square of the distance between 2 points\n * @param a - vector.\n * @param b - vector.\n * @returns square of the distance between a and b\n */\nexport function distanceSq(a: Vec4, b: Vec4): number {\n const dx = a[0] - b[0];\n const dy = a[1] - b[1];\n const dz = a[2] - b[2];\n const dw = a[3] - b[3];\n return dx * dx + dy * dy + dz * dz + dw * dw;\n}\n\n/**\n * Computes the square of the distance between 2 points (same as distanceSq)\n * @param a - vector.\n * @param b - vector.\n * @returns square of the distance between a and b\n */\nexport const distSq = distanceSq;\n\n/**\n * Divides a vector by its Euclidean length and returns the quotient.\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The normalized vector.\n */\nexport function normalize(v: Vec4, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n const v3 = v[3];\n const len = Math.sqrt(v0 * v0 + v1 * v1 + v2 * v2 + v3 * v3);\n\n if (len > 0.00001) {\n dst[0] = v0 / len;\n dst[1] = v1 / len;\n dst[2] = v2 / len;\n dst[3] = v3 / len;\n } else {\n dst[0] = 0;\n dst[1] = 0;\n dst[2] = 0;\n dst[3] = 0;\n }\n\n return dst;\n}\n\n/**\n * Negates a vector.\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns -v.\n */\nexport function negate(v: Vec4, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = -v[0];\n dst[1] = -v[1];\n dst[2] = -v[2];\n dst[3] = -v[3];\n\n return dst;\n}\n\n/**\n * Copies a vector. (same as {@link vec4.clone})\n * Also see {@link vec4.create} and {@link vec4.set}\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A copy of v.\n */\nexport function copy(v: Vec4, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = v[0];\n dst[1] = v[1];\n dst[2] = v[2];\n dst[3] = v[3];\n\n return dst;\n}\n\n/**\n * Clones a vector. (same as {@link vec4.copy})\n * Also see {@link vec4.create} and {@link vec4.set}\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A copy of v.\n */\nexport const clone = copy;\n\n/**\n * Multiplies a vector by another vector (component-wise); assumes a and\n * b have the same length.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The vector of products of entries of a and b.\n */\nexport function multiply(a: Vec4, b: Vec4, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = a[0] * b[0];\n dst[1] = a[1] * b[1];\n dst[2] = a[2] * b[2];\n dst[3] = a[3] * b[3];\n\n return dst;\n}\n\n/**\n * Multiplies a vector by another vector (component-wise); assumes a and\n * b have the same length. (same as mul)\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The vector of products of entries of a and b.\n */\nexport const mul = multiply;\n\n/**\n * Divides a vector by another vector (component-wise); assumes a and\n * b have the same length.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The vector of quotients of entries of a and b.\n */\nexport function divide(a: Vec4, b: Vec4, dst?: Vec4) {\n dst = dst || new VecType(4);\n\n dst[0] = a[0] / b[0];\n dst[1] = a[1] / b[1];\n dst[2] = a[2] / b[2];\n dst[3] = a[3] / b[3];\n\n return dst;\n}\n\n/**\n * Divides a vector by another vector (component-wise); assumes a and\n * b have the same length. (same as divide)\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The vector of quotients of entries of a and b.\n */\nexport const div = divide;\n\n/**\n * Zero's a vector\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The zeroed vector.\n */\nexport function zero(dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = 0;\n dst[1] = 0;\n dst[2] = 0;\n dst[3] = 0;\n\n return dst;\n}\n\n\n/**\n * transform vec4 by 4x4 matrix\n * @param v - the vector\n * @param m - The matrix.\n * @param dst - optional vec4 to store result. If not passed a new one is created.\n * @returns the transformed vector\n */\nexport function transformMat4(v: Vec4, m: Mat4, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n const x = v[0];\n const y = v[1];\n const z = v[2];\n const w = v[3];\n\n dst[0] = m[0] * x + m[4] * y + m[ 8] * z + m[12] * w;\n dst[1] = m[1] * x + m[5] * y + m[ 9] * z + m[13] * w;\n dst[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\n dst[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\n\n return dst;\n}\n","import Mat3, * as mat3 from './mat3-impl';\nimport Mat4, * as mat4 from './mat4-impl';\nimport Quat, * as quat from './quat-impl';\nimport Vec2, * as vec2 from './vec2-impl';\nimport Vec3, * as vec3 from './vec3-impl';\nimport Vec4, * as vec4 from './vec4-impl';\nimport * as utils from './utils';\n\n/**\n * Sets the type this library creates for all types\n *\n * example:\n *\n * ```\n * setDefaultType(Float64Array);\n * ```\n *\n * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array`\n */\nexport function setDefaultType(ctor: new (n: number) => Float32Array | Float64Array | number[]) {\n mat3.setDefaultType(ctor);\n mat4.setDefaultType(ctor);\n quat.setDefaultType(ctor);\n vec2.setDefaultType(ctor);\n vec3.setDefaultType(ctor);\n vec4.setDefaultType(ctor);\n}\n\nexport {\n Mat3,\n mat3,\n Mat4,\n mat4,\n Quat,\n quat,\n utils,\n Vec2,\n vec2,\n Vec3,\n vec3,\n Vec4,\n vec4,\n};"],"names":["lerp","VecType","setDefaultType","create","fromValues","set","ceil","floor","round","clamp","add","addScaled","angle","dot","subtract","sub","equalsApproximately","utils.EPSILON","equals","lerpV","max","min","mulScalar","scale","divScalar","inverse","invert","cross","Vec3Type","length","len","lengthSq","lenSq","distance","dist","distanceSq","distSq","normalize","negate","copy","clone","multiply","mul","divide","div","random","zero","transformMat4","transformMat3","MatType","fromQuat","identity","transpose","determinant","setTranslation","getTranslation","vec2.create","getAxis","setAxis","getScaling","translation","translate","rotation","rotate","scaling","uniformScaling","uniformScale","vec3.create","vec3.normalize","vec3.subtract","vec3.cross","rotateX","rotateY","rotateZ","vec3.dot","vec3.len","mat3.setDefaultType","mat4.setDefaultType","quat.setDefaultType","vec2.setDefaultType","vec3.setDefaultType","vec4.setDefaultType"],"mappings":";;;;;;;IAAA;;;;;;;;;;;;;;;;;;;;IAoBG;IAEI,IAAI,OAAO,GAAG,QAAQ,CAAC;IAE9B;;;;IAIG;IACG,SAAU,UAAU,CAAC,CAAS,EAAA;QAClC,MAAM,GAAG,GAAG,OAAO,CAAC;QACpB,OAAO,GAAG,CAAC,CAAC;IACZ,IAAA,OAAO,GAAG,CAAC;IACb,CAAC;IAED;;;;IAIG;IACG,SAAU,QAAQ,CAAC,OAAe,EAAA;IACtC,IAAA,OAAO,OAAO,GAAG,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC;IACjC,CAAC;IAED;;;;IAIG;IACG,SAAU,QAAQ,CAAC,OAAe,EAAA;IACtC,IAAA,OAAO,OAAO,GAAG,GAAG,GAAG,IAAI,CAAC,EAAE,CAAC;IACjC,CAAC;IAED;;;;;;IAMG;aACaA,MAAI,CAAC,CAAS,EAAE,CA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CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACrD,IAAA,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IAErD,IAAA,OAAO,GAAG,CAAC;IACb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ICjnBA;;;;;;;;;;IAUG;IACG,SAAU,cAAc,CAAC,IAA+D,EAAA;IAC5F,IAAA2D,gBAAmB,CAAC,IAAI,CAAC,CAAC;IAC1B,IAAAC,gBAAmB,CAAC,IAAI,CAAC,CAAC;IAC1B,IAAAC,gBAAmB,CAAC,IAAI,CAAC,CAAC;IAC1B,IAAAC,gBAAmB,CAAC,IAAI,CAAC,CAAC;IAC1B,IAAAC,gBAAmB,CAAC,IAAI,CAAC,CAAC;IAC1B,IAAAC,gBAAmB,CAAC,IAAI,CAAC,CAAC;IAC5B;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/dist/2.x/wgpu-matrix.min.js b/dist/2.x/wgpu-matrix.min.js deleted file mode 100644 index 15ed94b..0000000 --- a/dist/2.x/wgpu-matrix.min.js +++ /dev/null @@ -1,68 +0,0 @@ -/* wgpu-matrix@2.5.1, license MIT */ -(function(M,aa){"object"===typeof exports&&"undefined"!==typeof module?aa(exports):"function"===typeof define&&define.amd?define(["exports"],aa):(M="undefined"!==typeof globalThis?globalThis:M||self,aa(M.wgpuMatrix={}))})(this,function(M){function aa(a){const b=z;z=a;return b}function ba(a=0,b=0){const c=new z(2);void 0!==a&&(c[0]=a,void 0!==b&&(c[1]=b));return c}function va(a){const b=w;w=a;return b}function H(a,b,c){const d=new w(3);void 0!==a&&(d[0]=a,void 0!==b&&(d[1]=b,void 0!==c&&(d[2]=c))); -return d}function wa(a,b,c){c=c||new z(2);c[0]=a[0]-b[0];c[1]=a[1]-b[1];return c}function xa(a,b,c){c=c||new z(2);c[0]=a[0]*b;c[1]=a[1]*b;return c}function ya(a,b){b=b||new z(2);b[0]=1/a[0];b[1]=1/a[1];return b}function za(a,b){return a[0]*b[0]+a[1]*b[1]}function Aa(a){const b=a[0];a=a[1];return Math.sqrt(b*b+a*a)}function Ba(a){const b=a[0];a=a[1];return b*b+a*a}function Ca(a,b){const c=a[0]-b[0];a=a[1]-b[1];return Math.sqrt(c*c+a*a)}function Da(a,b){const c=a[0]-b[0];a=a[1]-b[1];return c*c+a*a} -function Ea(a,b){b=b||new z(2);b[0]=a[0];b[1]=a[1];return b}function Fa(a,b,c){c=c||new z(2);c[0]=a[0]*b[0];c[1]=a[1]*b[1];return c}function Ga(a,b,c){c=c||new z(2);c[0]=a[0]/b[0];c[1]=a[1]/b[1];return c}function Ha(a){const b=Ia;Ia=a;G=Ja.get(a);return b}function pa(a,b){b=b||G();b[0]=a[0];b[1]=a[1];b[2]=a[2];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[8]=a[8];b[9]=a[9];b[10]=a[10];return b}function Ka(a){a=a||G();a[0]=1;a[1]=0;a[2]=0;a[4]=0;a[5]=1;a[6]=0;a[8]=0;a[9]=0;a[10]=1;return a}function La(a,b){b=b|| -G();const c=a[0],d=a[1],e=a[2],f=a[4],g=a[5],h=a[6],l=a[8],k=a[9];a=a[10];const m=a*g-h*k,n=-a*f+h*l,q=k*f-g*l,r=1/(c*m+d*n+e*q);b[0]=m*r;b[1]=(-a*d+e*k)*r;b[2]=(h*d-e*g)*r;b[4]=n*r;b[5]=(a*c-e*l)*r;b[6]=(-h*c+e*f)*r;b[8]=q*r;b[9]=(-k*c+d*l)*r;b[10]=(g*c-d*f)*r;return b}function Ma(a,b,c){c=c||G();const d=a[0],e=a[1],f=a[2],g=a[4],h=a[5],l=a[6],k=a[8],m=a[9];a=a[10];const n=b[0],q=b[1],r=b[2],v=b[4],u=b[5],p=b[6],E=b[8],F=b[9];b=b[10];c[0]=d*n+g*q+k*r;c[1]=e*n+h*q+m*r;c[2]=f*n+l*q+a*r;c[4]=d*v+g* -u+k*p;c[5]=e*v+h*u+m*p;c[6]=f*v+l*u+a*p;c[8]=d*E+g*F+k*b;c[9]=e*E+h*F+m*b;c[10]=f*E+l*F+a*b;return c}function ca(a,b,c){c=c||new w(3);c[0]=a[0]-b[0];c[1]=a[1]-b[1];c[2]=a[2]-b[2];return c}function Na(a,b,c){c=c||new w(3);c[0]=a[0]*b;c[1]=a[1]*b;c[2]=a[2]*b;return c}function Oa(a,b){b=b||new w(3);b[0]=1/a[0];b[1]=1/a[1];b[2]=1/a[2];return b}function P(a,b,c){c=c||new w(3);const d=a[2]*b[0]-a[0]*b[2],e=a[0]*b[1]-a[1]*b[0];c[0]=a[1]*b[2]-a[2]*b[1];c[1]=d;c[2]=e;return c}function qa(a,b){return a[0]* -b[0]+a[1]*b[1]+a[2]*b[2]}function ra(a){const b=a[0],c=a[1];a=a[2];return Math.sqrt(b*b+c*c+a*a)}function Pa(a){const b=a[0],c=a[1];a=a[2];return b*b+c*c+a*a}function Qa(a,b){const c=a[0]-b[0],d=a[1]-b[1];a=a[2]-b[2];return Math.sqrt(c*c+d*d+a*a)}function Ra(a,b){const c=a[0]-b[0],d=a[1]-b[1];a=a[2]-b[2];return c*c+d*d+a*a}function O(a,b){b=b||new w(3);const c=a[0],d=a[1];a=a[2];const e=Math.sqrt(c*c+d*d+a*a);1E-5m&&(m=-m,h=-h,l=-l,k=-k,b=-b);if(1-m>t){const n=Math.acos(m),q=Math.sin(n);m=Math.sin((1-c)*n)/q;c=Math.sin(c*n)/q}else m=1-c;d[0]=m*e+c*h;d[1]=m*f+c* -l;d[2]=m*g+c*k;d[3]=m*a+c*b;return d}function gb(a,b){b=b||new B(4);b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];return b}function hb(a,b,c){c=c||new B(4);c[0]=a[0]-b[0];c[1]=a[1]-b[1];c[2]=a[2]-b[2];c[3]=a[3]-b[3];return c}function ib(a,b,c){c=c||new B(4);c[0]=a[0]*b;c[1]=a[1]*b;c[2]=a[2]*b;c[3]=a[3]*b;return c}function jb(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]}function kb(a){const b=a[0],c=a[1],d=a[2];a=a[3];return Math.sqrt(b*b+c*c+d*d+a*a)}function lb(a){const b=a[0],c=a[1],d=a[2];a=a[3]; -return b*b+c*c+d*d+a*a}function mb(a,b){b=b||new B(4);const c=a[0],d=a[1],e=a[2];a=a[3];const f=Math.sqrt(c*c+d*d+e*e+a*a);1E-5new Float32Array(12)],[Float64Array,()=>new Float64Array(12)],[Array,()=>Array(12).fill(0)]]);let G=Ja.get(Float32Array);var Bb=Object.freeze({__proto__:null,setDefaultType:Ha,create:function(a,b,c,d,e,f,g,h,l){const k=G();k[3]=0;k[7]=0;k[11]=0;void 0!==a&&(k[0]=a,void 0!==b&&(k[1]=b,void 0!==c&&(k[2]=c,void 0!==d&&(k[4]=d,void 0!==e&&(k[5]=e,void 0!==f&&(k[6]=f,void 0!==g&&(k[8]=g,void 0!==h&&(k[9]=h,void 0!==l&&(k[10]=l)))))))));return k},set:function(a,b,c,d,e,f,g,h,l,k){k=k||G();k[0]=a;k[1]= -b;k[2]=c;k[3]=0;k[4]=d;k[5]=e;k[6]=f;k[7]=0;k[8]=g;k[9]=h;k[10]=l;k[11]=0;return k},fromMat4:function(a,b){b=b||G();b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=0;b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=0;b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=0;return b},fromQuat:function(a,b){b=b||G();var c=a[0],d=a[1],e=a[2];a=a[3];var f=c+c,g=d+d;const h=e+e;c*=f;const l=d*f;d*=g;const k=e*f,m=e*g;e*=h;f*=a;g*=a;a*=h;b[0]=1-d-e;b[1]=l+a;b[2]=k-g;b[3]=0;b[4]=l-a;b[5]=1-c-e;b[6]=m+f;b[7]=0;b[8]=k+g;b[9]=m-f;b[10]=1-c-d;b[11]=0; -return b},negate:function(a,b){b=b||G();b[0]=-a[0];b[1]=-a[1];b[2]=-a[2];b[4]=-a[4];b[5]=-a[5];b[6]=-a[6];b[8]=-a[8];b[9]=-a[9];b[10]=-a[10];return b},copy:pa,clone:pa,equalsApproximately:function(a,b){return Math.abs(a[0]-b[0])t?(b[0]=a[0]/d,b[1]=a[1]/d,b[2]=a[2]/d):(b[0]=1,b[1]=0,b[2]=0);return{angle:c,axis:b}},angle:function(a,b){a=jb(a,b);return Math.acos(2*a*a-1)},multiply:fb,mul:fb,rotateX:function(a,b,c){c=c||new B(4);var d=.5*b;b=a[0];const e=a[1],f= -a[2];a=a[3];const g=Math.sin(d);d=Math.cos(d);c[0]=b*d+a*g;c[1]=e*d+f*g;c[2]=f*d-e*g;c[3]=a*d-b*g;return c},rotateY:function(a,b,c){c=c||new B(4);var d=.5*b;b=a[0];const e=a[1],f=a[2];a=a[3];const g=Math.sin(d);d=Math.cos(d);c[0]=b*d-f*g;c[1]=e*d+a*g;c[2]=f*d+b*g;c[3]=a*d-e*g;return c},rotateZ:function(a,b,c){c=c||new B(4);var d=.5*b;b=a[0];const e=a[1],f=a[2];a=a[3];const g=Math.sin(d);d=Math.cos(d);c[0]=b*d+e*g;c[1]=e*d-b*g;c[2]=f*d+a*g;c[3]=a*d-f*g;return c},slerp:ma,inverse:function(a,b){b=b|| -new B(4);const c=a[0],d=a[1],e=a[2];a=a[3];var f=c*c+d*d+e*e+a*a;f=f?1/f:0;b[0]=-c*f;b[1]=-d*f;b[2]=-e*f;b[3]=a*f;return b},conjugate:function(a,b){b=b||new B(4);b[0]=-a[0];b[1]=-a[1];b[2]=-a[2];b[3]=a[3];return b},fromMat:function(a,b){b=b||new B(4);var c=a[0]+a[5]+a[10];if(0a[0]&&(c=1);a[10]>a[4*c+c]&&(c=2);const e=(c+1)%3,f=(c+2)%3;var d=Math.sqrt(a[4*c+c]-a[4*e+e]-a[4*f+f]+1);b[c]=.5*d; -d=.5/d;b[3]=(a[4*e+f]-a[4*f+e])*d;b[e]=(a[4*e+c]+a[4*c+e])*d;b[f]=(a[4*f+c]+a[4*c+f])*d}return b},fromEuler:function(a,b,c,d,e){e=e||new B(4);a*=.5;var f=.5*b;b=.5*c;c=Math.sin(a);a=Math.cos(a);const g=Math.sin(f);f=Math.cos(f);const h=Math.sin(b);b=Math.cos(b);switch(d){case "xyz":e[0]=c*f*b+a*g*h;e[1]=a*g*b-c*f*h;e[2]=a*f*h+c*g*b;e[3]=a*f*b-c*g*h;break;case "xzy":e[0]=c*f*b-a*g*h;e[1]=a*g*b-c*f*h;e[2]=a*f*h+c*g*b;e[3]=a*f*b+c*g*h;break;case "yxz":e[0]=c*f*b+a*g*h;e[1]=a*g*b-c*f*h;e[2]=a*f*h-c*g* -b;e[3]=a*f*b+c*g*h;break;case "yzx":e[0]=c*f*b+a*g*h;e[1]=a*g*b+c*f*h;e[2]=a*f*h-c*g*b;e[3]=a*f*b-c*g*h;break;case "zxy":e[0]=c*f*b-a*g*h;e[1]=a*g*b+c*f*h;e[2]=a*f*h+c*g*b;e[3]=a*f*b-c*g*h;break;case "zyx":e[0]=c*f*b-a*g*h;e[1]=a*g*b+c*f*h;e[2]=a*f*h-c*g*b;e[3]=a*f*b+c*g*h;break;default:throw Error(`Unknown rotation order: ${d}`);}return e},copy:gb,clone:gb,add:function(a,b,c){c=c||new B(4);c[0]=a[0]+b[0];c[1]=a[1]+b[1];c[2]=a[2]+b[2];c[3]=a[3]+b[3];return c},subtract:hb,sub:hb,mulScalar:ib,scale:ib, -divScalar:function(a,b,c){c=c||new B(4);c[0]=a[0]/b;c[1]=a[1]/b;c[2]=a[2]/b;c[3]=a[3]/b;return c},dot:jb,lerp:function(a,b,c,d){d=d||new B(4);d[0]=a[0]+c*(b[0]-a[0]);d[1]=a[1]+c*(b[1]-a[1]);d[2]=a[2]+c*(b[2]-a[2]);d[3]=a[3]+c*(b[3]-a[3]);return d},length:kb,len:kb,lengthSq:lb,lenSq:lb,normalize:mb,equalsApproximately:function(a,b){return Math.abs(a[0]-b[0])d)return P(ta,a,N),1E-6>ra(N)&&P(ua,a,N),O(N,N),eb(N,Math.PI,c),c;if(.999999 0.00001) { - dst[0] = v0 / len; - dst[1] = v1 / len; - } - else { - dst[0] = 0; - dst[1] = 0; - } - return dst; -} -/** - * Negates a vector. - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns -v. - */ -function negate$4(v, dst) { - dst = dst || new VecType$2(2); - dst[0] = -v[0]; - dst[1] = -v[1]; - return dst; -} -/** - * Copies a vector. (same as {@link vec2.clone}) - * Also see {@link vec2.create} and {@link vec2.set} - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A copy of v. - */ -function copy$5(v, dst) { - dst = dst || new VecType$2(2); - dst[0] = v[0]; - dst[1] = v[1]; - return dst; -} -/** - * Clones a vector. (same as {@link vec2.copy}) - * Also see {@link vec2.create} and {@link vec2.set} - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A copy of v. - */ -const clone$5 = copy$5; -/** - * Multiplies a vector by another vector (component-wise); assumes a and - * b have the same length. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of products of entries of a and b. - */ -function multiply$5(a, b, dst) { - dst = dst || new VecType$2(2); - dst[0] = a[0] * b[0]; - dst[1] = a[1] * b[1]; - return dst; -} -/** - * Multiplies a vector by another vector (component-wise); assumes a and - * b have the same length. (same as mul) - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of products of entries of a and b. - */ -const mul$5 = multiply$5; -/** - * Divides a vector by another vector (component-wise); assumes a and - * b have the same length. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of quotients of entries of a and b. - */ -function divide$2(a, b, dst) { - dst = dst || new VecType$2(2); - dst[0] = a[0] / b[0]; - dst[1] = a[1] / b[1]; - return dst; -} -/** - * Divides a vector by another vector (component-wise); assumes a and - * b have the same length. (same as divide) - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of quotients of entries of a and b. - */ -const div$2 = divide$2; -/** - * Creates a random unit vector * scale - * @param scale - Default 1 - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The random vector. - */ -function random$1(scale = 1, dst) { - dst = dst || new VecType$2(2); - const angle = Math.random() * 2 * Math.PI; - dst[0] = Math.cos(angle) * scale; - dst[1] = Math.sin(angle) * scale; - return dst; -} -/** - * Zero's a vector - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The zeroed vector. - */ -function zero$2(dst) { - dst = dst || new VecType$2(2); - dst[0] = 0; - dst[1] = 0; - return dst; -} -/** - * transform Vec2 by 4x4 matrix - * @param v - the vector - * @param m - The matrix. - * @param dst - optional Vec2 to store result. If not passed a new one is created. - * @returns the transformed vector - */ -function transformMat4$2(v, m, dst) { - dst = dst || new VecType$2(2); - const x = v[0]; - const y = v[1]; - dst[0] = x * m[0] + y * m[4] + m[12]; - dst[1] = x * m[1] + y * m[5] + m[13]; - return dst; -} -/** - * Transforms vec4 by 3x3 matrix - * - * @param v - the vector - * @param m - The matrix. - * @param dst - optional Vec2 to store result. If not passed a new one is created. - * @returns the transformed vector - */ -function transformMat3$1(v, m, dst) { - dst = dst || new VecType$2(2); - const x = v[0]; - const y = v[1]; - dst[0] = m[0] * x + m[4] * y + m[8]; - dst[1] = m[1] * x + m[5] * y + m[9]; - return dst; -} - -var vec2Impl = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create$5, - setDefaultType: setDefaultType$6, - fromValues: fromValues$3, - set: set$5, - ceil: ceil$2, - floor: floor$2, - round: round$2, - clamp: clamp$2, - add: add$3, - addScaled: addScaled$2, - angle: angle$2, - subtract: subtract$3, - sub: sub$3, - equalsApproximately: equalsApproximately$5, - equals: equals$5, - lerp: lerp$3, - lerpV: lerpV$2, - max: max$2, - min: min$2, - mulScalar: mulScalar$3, - scale: scale$5, - divScalar: divScalar$3, - inverse: inverse$5, - invert: invert$4, - cross: cross$1, - dot: dot$3, - length: length$3, - len: len$3, - lengthSq: lengthSq$3, - lenSq: lenSq$3, - distance: distance$2, - dist: dist$2, - distanceSq: distanceSq$2, - distSq: distSq$2, - normalize: normalize$3, - negate: negate$4, - copy: copy$5, - clone: clone$5, - multiply: multiply$5, - mul: mul$5, - divide: divide$2, - div: div$2, - random: random$1, - zero: zero$2, - transformMat4: transformMat4$2, - transformMat3: transformMat3$1 -}); - -/* - * Copyright 2022 Gregg Tavares - * - * 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. - */ -/** - * 3x3 Matrix math math functions. - * - * Almost all functions take an optional `dst` argument. If it is not passed in the - * functions will create a new matrix. In other words you can do this - * - * const mat = mat3.translation([1, 2, 3]); // Creates a new translation matrix - * - * or - * - * const mat = mat3.create(); - * mat3.translation([1, 2, 3], mat); // Puts translation matrix in mat. - * - * The first style is often easier but depending on where it's used it generates garbage where - * as there is almost never allocation with the second style. - * - * It is always save to pass any matrix as the destination. So for example - * - * const mat = mat3.identity(); - * const trans = mat3.translation([1, 2, 3]); - * mat3.multiply(mat, trans, mat); // Multiplies mat * trans and puts result in mat. - * - */ -let MatType$1 = Float32Array; -// This mess is because with Mat3 we have 3 unused elements. -// For Float32Array and Float64Array that's not an issue -// but for Array it's troublesome -const ctorMap = new Map([ - [Float32Array, () => new Float32Array(12)], - [Float64Array, () => new Float64Array(12)], - [Array, () => new Array(12).fill(0)], -]); -let newMat3 = ctorMap.get(Float32Array); -/** - * Sets the type this library creates for a Mat3 - * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array` - * @returns previous constructor for Mat3 - */ -function setDefaultType$4(ctor) { - const oldType = MatType$1; - MatType$1 = ctor; - newMat3 = ctorMap.get(ctor); - return oldType; -} -/** - * Create a Mat3 from values - * - * Note: Since passing in a raw JavaScript array - * is valid in all circumstances, if you want to - * force a JavaScript array into a Mat3's specified type - * it would be faster to use - * - * ``` - * const m = mat3.clone(someJSArray); - * ``` - * - * Note: a consequence of the implementation is if your Mat3Type = `Array` - * instead of `Float32Array` or `Float64Array` then any values you - * don't pass in will be undefined. Usually this is not an issue since - * (a) using `Array` is rare and (b) using `mat3.create` is usually used - * to create a Mat3 to be filled out as in - * - * ``` - * const m = mat3.create(); - * mat3.perspective(fov, aspect, near, far, m); - * ``` - * - * @param v0 - value for element 0 - * @param v1 - value for element 1 - * @param v2 - value for element 2 - * @param v3 - value for element 3 - * @param v4 - value for element 4 - * @param v5 - value for element 5 - * @param v6 - value for element 6 - * @param v7 - value for element 7 - * @param v8 - value for element 8 - * @returns matrix created from values. - */ -function create$3(v0, v1, v2, v3, v4, v5, v6, v7, v8) { - const dst = newMat3(); - // to make the array homogenous - dst[3] = 0; - dst[7] = 0; - dst[11] = 0; - if (v0 !== undefined) { - dst[0] = v0; - if (v1 !== undefined) { - dst[1] = v1; - if (v2 !== undefined) { - dst[2] = v2; - if (v3 !== undefined) { - dst[4] = v3; - if (v4 !== undefined) { - dst[5] = v4; - if (v5 !== undefined) { - dst[6] = v5; - if (v6 !== undefined) { - dst[8] = v6; - if (v7 !== undefined) { - dst[9] = v7; - if (v8 !== undefined) { - dst[10] = v8; - } - } - } - } - } - } - } - } - } - return dst; -} -/** - * Sets the values of a Mat3 - * Also see {@link mat3.create} and {@link mat3.copy} - * - * @param v0 - value for element 0 - * @param v1 - value for element 1 - * @param v2 - value for element 2 - * @param v3 - value for element 3 - * @param v4 - value for element 4 - * @param v5 - value for element 5 - * @param v6 - value for element 6 - * @param v7 - value for element 7 - * @param v8 - value for element 8 - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns Mat3 set from values. - */ -function set$4(v0, v1, v2, v3, v4, v5, v6, v7, v8, dst) { - dst = dst || newMat3(); - dst[0] = v0; - dst[1] = v1; - dst[2] = v2; - dst[3] = 0; - dst[4] = v3; - dst[5] = v4; - dst[6] = v5; - dst[7] = 0; - dst[8] = v6; - dst[9] = v7; - dst[10] = v8; - dst[11] = 0; - return dst; -} -/** - * Creates a Mat3 from the upper left 3x3 part of a Mat4 - * @param m4 - source matrix - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns Mat3 made from m4 - */ -function fromMat4(m4, dst) { - dst = dst || newMat3(); - dst[0] = m4[0]; - dst[1] = m4[1]; - dst[2] = m4[2]; - dst[3] = 0; - dst[4] = m4[4]; - dst[5] = m4[5]; - dst[6] = m4[6]; - dst[7] = 0; - dst[8] = m4[8]; - dst[9] = m4[9]; - dst[10] = m4[10]; - dst[11] = 0; - return dst; -} -/** - * Creates a Mat3 rotation matrix from a quaternion - * @param q - quaternion to create matrix from - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns Mat3 made from q - */ -function fromQuat$1(q, dst) { - dst = dst || newMat3(); - const x = q[0]; - const y = q[1]; - const z = q[2]; - const w = q[3]; - const x2 = x + x; - const y2 = y + y; - const z2 = z + z; - const xx = x * x2; - const yx = y * x2; - const yy = y * y2; - const zx = z * x2; - const zy = z * y2; - const zz = z * z2; - const wx = w * x2; - const wy = w * y2; - const wz = w * z2; - dst[0] = 1 - yy - zz; - dst[1] = yx + wz; - dst[2] = zx - wy; - dst[3] = 0; - dst[4] = yx - wz; - dst[5] = 1 - xx - zz; - dst[6] = zy + wx; - dst[7] = 0; - dst[8] = zx + wy; - dst[9] = zy - wx; - dst[10] = 1 - xx - yy; - dst[11] = 0; - return dst; -} -/** - * Negates a matrix. - * @param m - The matrix. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns -m. - */ -function negate$3(m, dst) { - dst = dst || newMat3(); - dst[0] = -m[0]; - dst[1] = -m[1]; - dst[2] = -m[2]; - dst[4] = -m[4]; - dst[5] = -m[5]; - dst[6] = -m[6]; - dst[8] = -m[8]; - dst[9] = -m[9]; - dst[10] = -m[10]; - return dst; -} -/** - * Copies a matrix. (same as {@link mat3.clone}) - * Also see {@link mat3.create} and {@link mat3.set} - * @param m - The matrix. - * @param dst - The matrix. If not passed a new one is created. - * @returns A copy of m. - */ -function copy$4(m, dst) { - dst = dst || newMat3(); - dst[0] = m[0]; - dst[1] = m[1]; - dst[2] = m[2]; - dst[4] = m[4]; - dst[5] = m[5]; - dst[6] = m[6]; - dst[8] = m[8]; - dst[9] = m[9]; - dst[10] = m[10]; - return dst; -} -/** - * Copies a matrix (same as {@link mat3.copy}) - * Also see {@link mat3.create} and {@link mat3.set} - * @param m - The matrix. - * @param dst - The matrix. If not passed a new one is created. - * @returns A copy of m. - */ -const clone$4 = copy$4; -/** - * Check if 2 matrices are approximately equal - * @param a Operand matrix. - * @param b Operand matrix. - * @returns true if matrices are approximately equal - */ -function equalsApproximately$4(a, b) { - return Math.abs(a[0] - b[0]) < EPSILON && - Math.abs(a[1] - b[1]) < EPSILON && - Math.abs(a[2] - b[2]) < EPSILON && - Math.abs(a[4] - b[4]) < EPSILON && - Math.abs(a[5] - b[5]) < EPSILON && - Math.abs(a[6] - b[6]) < EPSILON && - Math.abs(a[8] - b[8]) < EPSILON && - Math.abs(a[9] - b[9]) < EPSILON && - Math.abs(a[10] - b[10]) < EPSILON; -} -/** - * Check if 2 matrices are exactly equal - * @param a Operand matrix. - * @param b Operand matrix. - * @returns true if matrices are exactly equal - */ -function equals$4(a, b) { - return a[0] === b[0] && - a[1] === b[1] && - a[2] === b[2] && - a[4] === b[4] && - a[5] === b[5] && - a[6] === b[6] && - a[8] === b[8] && - a[9] === b[9] && - a[10] === b[10]; -} -/** - * Creates a 3-by-3 identity matrix. - * - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns A 3-by-3 identity matrix. - */ -function identity$2(dst) { - dst = dst || newMat3(); - dst[0] = 1; - dst[1] = 0; - dst[2] = 0; - dst[4] = 0; - dst[5] = 1; - dst[6] = 0; - dst[8] = 0; - dst[9] = 0; - dst[10] = 1; - return dst; -} -/** - * Takes the transpose of a matrix. - * @param m - The matrix. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The transpose of m. - */ -function transpose$1(m, dst) { - dst = dst || newMat3(); - if (dst === m) { - let t; - // 0 1 2 - // 4 5 6 - // 8 9 10 - t = m[1]; - m[1] = m[4]; - m[4] = t; - t = m[2]; - m[2] = m[8]; - m[8] = t; - t = m[6]; - m[6] = m[9]; - m[9] = t; - return dst; - } - const m00 = m[0 * 4 + 0]; - const m01 = m[0 * 4 + 1]; - const m02 = m[0 * 4 + 2]; - const m10 = m[1 * 4 + 0]; - const m11 = m[1 * 4 + 1]; - const m12 = m[1 * 4 + 2]; - const m20 = m[2 * 4 + 0]; - const m21 = m[2 * 4 + 1]; - const m22 = m[2 * 4 + 2]; - dst[0] = m00; - dst[1] = m10; - dst[2] = m20; - dst[4] = m01; - dst[5] = m11; - dst[6] = m21; - dst[8] = m02; - dst[9] = m12; - dst[10] = m22; - return dst; -} -/** - * Computes the inverse of a 3-by-3 matrix. - * @param m - The matrix. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The inverse of m. - */ -function inverse$4(m, dst) { - dst = dst || newMat3(); - const m00 = m[0 * 4 + 0]; - const m01 = m[0 * 4 + 1]; - const m02 = m[0 * 4 + 2]; - const m10 = m[1 * 4 + 0]; - const m11 = m[1 * 4 + 1]; - const m12 = m[1 * 4 + 2]; - const m20 = m[2 * 4 + 0]; - const m21 = m[2 * 4 + 1]; - const m22 = m[2 * 4 + 2]; - const b01 = m22 * m11 - m12 * m21; - const b11 = -m22 * m10 + m12 * m20; - const b21 = m21 * m10 - m11 * m20; - const invDet = 1 / (m00 * b01 + m01 * b11 + m02 * b21); - dst[0] = b01 * invDet; - dst[1] = (-m22 * m01 + m02 * m21) * invDet; - dst[2] = (m12 * m01 - m02 * m11) * invDet; - dst[4] = b11 * invDet; - dst[5] = (m22 * m00 - m02 * m20) * invDet; - dst[6] = (-m12 * m00 + m02 * m10) * invDet; - dst[8] = b21 * invDet; - dst[9] = (-m21 * m00 + m01 * m20) * invDet; - dst[10] = (m11 * m00 - m01 * m10) * invDet; - return dst; -} -/** - * Compute the determinant of a matrix - * @param m - the matrix - * @returns the determinant - */ -function determinant$1(m) { - const m00 = m[0 * 4 + 0]; - const m01 = m[0 * 4 + 1]; - const m02 = m[0 * 4 + 2]; - const m10 = m[1 * 4 + 0]; - const m11 = m[1 * 4 + 1]; - const m12 = m[1 * 4 + 2]; - const m20 = m[2 * 4 + 0]; - const m21 = m[2 * 4 + 1]; - const m22 = m[2 * 4 + 2]; - return m00 * (m11 * m22 - m21 * m12) - - m10 * (m01 * m22 - m21 * m02) + - m20 * (m01 * m12 - m11 * m02); -} -/** - * Computes the inverse of a 3-by-3 matrix. (same as inverse) - * @param m - The matrix. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The inverse of m. - */ -const invert$3 = inverse$4; -/** - * Multiplies two 3-by-3 matrices with a on the left and b on the right - * @param a - The matrix on the left. - * @param b - The matrix on the right. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The matrix product of a and b. - */ -function multiply$4(a, b, dst) { - dst = dst || newMat3(); - const a00 = a[0]; - const a01 = a[1]; - const a02 = a[2]; - const a10 = a[4 + 0]; - const a11 = a[4 + 1]; - const a12 = a[4 + 2]; - const a20 = a[8 + 0]; - const a21 = a[8 + 1]; - const a22 = a[8 + 2]; - const b00 = b[0]; - const b01 = b[1]; - const b02 = b[2]; - const b10 = b[4 + 0]; - const b11 = b[4 + 1]; - const b12 = b[4 + 2]; - const b20 = b[8 + 0]; - const b21 = b[8 + 1]; - const b22 = b[8 + 2]; - dst[0] = a00 * b00 + a10 * b01 + a20 * b02; - dst[1] = a01 * b00 + a11 * b01 + a21 * b02; - dst[2] = a02 * b00 + a12 * b01 + a22 * b02; - dst[4] = a00 * b10 + a10 * b11 + a20 * b12; - dst[5] = a01 * b10 + a11 * b11 + a21 * b12; - dst[6] = a02 * b10 + a12 * b11 + a22 * b12; - dst[8] = a00 * b20 + a10 * b21 + a20 * b22; - dst[9] = a01 * b20 + a11 * b21 + a21 * b22; - dst[10] = a02 * b20 + a12 * b21 + a22 * b22; - return dst; -} -/** - * Multiplies two 3-by-3 matrices with a on the left and b on the right (same as multiply) - * @param a - The matrix on the left. - * @param b - The matrix on the right. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The matrix product of a and b. - */ -const mul$4 = multiply$4; -/** - * Sets the translation component of a 3-by-3 matrix to the given - * vector. - * @param a - The matrix. - * @param v - The vector. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The matrix with translation set. - */ -function setTranslation$1(a, v, dst) { - dst = dst || identity$2(); - if (a !== dst) { - dst[0] = a[0]; - dst[1] = a[1]; - dst[2] = a[2]; - dst[4] = a[4]; - dst[5] = a[5]; - dst[6] = a[6]; - } - dst[8] = v[0]; - dst[9] = v[1]; - dst[10] = 1; - return dst; -} -/** - * Returns the translation component of a 3-by-3 matrix as a vector with 3 - * entries. - * @param m - The matrix. - * @param dst - vector to hold result. If not passed a new one is created. - * @returns The translation component of m. - */ -function getTranslation$2(m, dst) { - dst = dst || create$5(); - dst[0] = m[8]; - dst[1] = m[9]; - return dst; -} -/** - * Returns an axis of a 3x3 matrix as a vector with 2 entries - * @param m - The matrix. - * @param axis - The axis 0 = x, 1 = y, - * @returns The axis component of m. - */ -function getAxis$2(m, axis, dst) { - dst = dst || create$5(); - const off = axis * 4; - dst[0] = m[off + 0]; - dst[1] = m[off + 1]; - return dst; -} -/** - * Sets an axis of a 3x3 matrix as a vector with 2 entries - * @param m - The matrix. - * @param v - the axis vector - * @param axis - The axis 0 = x, 1 = y; - * @param dst - The matrix to set. If not passed a new one is created. - * @returns The matrix with axis set. - */ -function setAxis$1(m, v, axis, dst) { - if (dst !== m) { - dst = copy$4(m, dst); - } - const off = axis * 4; - dst[off + 0] = v[0]; - dst[off + 1] = v[1]; - return dst; -} -/** - * Returns the scaling component of the matrix - * @param m - The Matrix - * @param dst - The vector to set. If not passed a new one is created. - */ -function getScaling$2(m, dst) { - dst = dst || create$5(); - const xx = m[0]; - const xy = m[1]; - const yx = m[4]; - const yy = m[5]; - dst[0] = Math.sqrt(xx * xx + xy * xy); - dst[1] = Math.sqrt(yx * yx + yy * yy); - return dst; -} -/** - * Creates a 3-by-3 matrix which translates by the given vector v. - * @param v - The vector by which to translate. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The translation matrix. - */ -function translation$1(v, dst) { - dst = dst || newMat3(); - dst[0] = 1; - dst[1] = 0; - dst[2] = 0; - dst[4] = 0; - dst[5] = 1; - dst[6] = 0; - dst[8] = v[0]; - dst[9] = v[1]; - dst[10] = 1; - return dst; -} -/** - * Translates the given 3-by-3 matrix by the given vector v. - * @param m - The matrix. - * @param v - The vector by which to translate. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The translated matrix. - */ -function translate$1(m, v, dst) { - dst = dst || newMat3(); - const v0 = v[0]; - const v1 = v[1]; - const m00 = m[0]; - const m01 = m[1]; - const m02 = m[2]; - const m10 = m[1 * 4 + 0]; - const m11 = m[1 * 4 + 1]; - const m12 = m[1 * 4 + 2]; - const m20 = m[2 * 4 + 0]; - const m21 = m[2 * 4 + 1]; - const m22 = m[2 * 4 + 2]; - if (m !== dst) { - dst[0] = m00; - dst[1] = m01; - dst[2] = m02; - dst[4] = m10; - dst[5] = m11; - dst[6] = m12; - } - dst[8] = m00 * v0 + m10 * v1 + m20; - dst[9] = m01 * v0 + m11 * v1 + m21; - dst[10] = m02 * v0 + m12 * v1 + m22; - return dst; -} -/** - * Creates a 3-by-3 matrix which rotates by the given angle. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotation matrix. - */ -function rotation$1(angleInRadians, dst) { - dst = dst || newMat3(); - const c = Math.cos(angleInRadians); - const s = Math.sin(angleInRadians); - dst[0] = c; - dst[1] = s; - dst[2] = 0; - dst[4] = -s; - dst[5] = c; - dst[6] = 0; - dst[8] = 0; - dst[9] = 0; - dst[10] = 1; - return dst; -} -/** - * Rotates the given 3-by-3 matrix by the given angle. - * @param m - The matrix. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotated matrix. - */ -function rotate$1(m, angleInRadians, dst) { - dst = dst || newMat3(); - const m00 = m[0 * 4 + 0]; - const m01 = m[0 * 4 + 1]; - const m02 = m[0 * 4 + 2]; - const m10 = m[1 * 4 + 0]; - const m11 = m[1 * 4 + 1]; - const m12 = m[1 * 4 + 2]; - const c = Math.cos(angleInRadians); - const s = Math.sin(angleInRadians); - dst[0] = c * m00 + s * m10; - dst[1] = c * m01 + s * m11; - dst[2] = c * m02 + s * m12; - dst[4] = c * m10 - s * m00; - dst[5] = c * m11 - s * m01; - dst[6] = c * m12 - s * m02; - if (m !== dst) { - dst[8] = m[8]; - dst[9] = m[9]; - dst[10] = m[10]; - } - return dst; -} -/** - * Creates a 3-by-3 matrix which scales in each dimension by an amount given by - * the corresponding entry in the given vector; assumes the vector has three - * entries. - * @param v - A vector of - * 2 entries specifying the factor by which to scale in each dimension. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The scaling matrix. - */ -function scaling$1(v, dst) { - dst = dst || newMat3(); - dst[0] = v[0]; - dst[1] = 0; - dst[2] = 0; - dst[4] = 0; - dst[5] = v[1]; - dst[6] = 0; - dst[8] = 0; - dst[9] = 0; - dst[10] = 1; - return dst; -} -/** - * Scales the given 3-by-3 matrix in each dimension by an amount - * given by the corresponding entry in the given vector; assumes the vector has - * three entries. - * @param m - The matrix to be modified. - * @param v - A vector of 2 entries specifying the - * factor by which to scale in each dimension. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The scaled matrix. - */ -function scale$4(m, v, dst) { - dst = dst || newMat3(); - const v0 = v[0]; - const v1 = v[1]; - dst[0] = v0 * m[0 * 4 + 0]; - dst[1] = v0 * m[0 * 4 + 1]; - dst[2] = v0 * m[0 * 4 + 2]; - dst[4] = v1 * m[1 * 4 + 0]; - dst[5] = v1 * m[1 * 4 + 1]; - dst[6] = v1 * m[1 * 4 + 2]; - if (m !== dst) { - dst[8] = m[8]; - dst[9] = m[9]; - dst[10] = m[10]; - } - return dst; -} -/** - * Creates a 3-by-3 matrix which scales uniformly in each dimension - * @param s - Amount to scale - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The scaling matrix. - */ -function uniformScaling$1(s, dst) { - dst = dst || newMat3(); - dst[0] = s; - dst[1] = 0; - dst[2] = 0; - dst[4] = 0; - dst[5] = s; - dst[6] = 0; - dst[8] = 0; - dst[9] = 0; - dst[10] = 1; - return dst; -} -/** - * Scales the given 3-by-3 matrix in each dimension by an amount - * given. - * @param m - The matrix to be modified. - * @param s - Amount to scale. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The scaled matrix. - */ -function uniformScale$1(m, s, dst) { - dst = dst || newMat3(); - dst[0] = s * m[0 * 4 + 0]; - dst[1] = s * m[0 * 4 + 1]; - dst[2] = s * m[0 * 4 + 2]; - dst[4] = s * m[1 * 4 + 0]; - dst[5] = s * m[1 * 4 + 1]; - dst[6] = s * m[1 * 4 + 2]; - if (m !== dst) { - dst[8] = m[8]; - dst[9] = m[9]; - dst[10] = m[10]; - } - return dst; -} - -var mat3Impl = /*#__PURE__*/Object.freeze({ - __proto__: null, - setDefaultType: setDefaultType$4, - create: create$3, - set: set$4, - fromMat4: fromMat4, - fromQuat: fromQuat$1, - negate: negate$3, - copy: copy$4, - clone: clone$4, - equalsApproximately: equalsApproximately$4, - equals: equals$4, - identity: identity$2, - transpose: transpose$1, - inverse: inverse$4, - determinant: determinant$1, - invert: invert$3, - multiply: multiply$4, - mul: mul$4, - setTranslation: setTranslation$1, - getTranslation: getTranslation$2, - getAxis: getAxis$2, - setAxis: setAxis$1, - getScaling: getScaling$2, - translation: translation$1, - translate: translate$1, - rotation: rotation$1, - rotate: rotate$1, - scaling: scaling$1, - scale: scale$4, - uniformScaling: uniformScaling$1, - uniformScale: uniformScale$1 -}); - -/* - * Copyright 2022 Gregg Tavares - * - * 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. - */ -/** - * Creates a vec3; may be called with x, y, z to set initial values. (same as create) - * @param x - Initial x value. - * @param y - Initial y value. - * @param z - Initial z value. - * @returns the created vector - */ -const fromValues$2 = create$4; -/** - * Sets the values of a Vec3 - * Also see {@link vec3.create} and {@link vec3.copy} - * - * @param x first value - * @param y second value - * @param z third value - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector with its elements set. - */ -function set$3(x, y, z, dst) { - dst = dst || new VecType$1(3); - dst[0] = x; - dst[1] = y; - dst[2] = z; - return dst; -} -/** - * Applies Math.ceil to each element of vector - * @param v - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the ceil of each element of v. - */ -function ceil$1(v, dst) { - dst = dst || new VecType$1(3); - dst[0] = Math.ceil(v[0]); - dst[1] = Math.ceil(v[1]); - dst[2] = Math.ceil(v[2]); - return dst; -} -/** - * Applies Math.floor to each element of vector - * @param v - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the floor of each element of v. - */ -function floor$1(v, dst) { - dst = dst || new VecType$1(3); - dst[0] = Math.floor(v[0]); - dst[1] = Math.floor(v[1]); - dst[2] = Math.floor(v[2]); - return dst; -} -/** - * Applies Math.round to each element of vector - * @param v - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the round of each element of v. - */ -function round$1(v, dst) { - dst = dst || new VecType$1(3); - dst[0] = Math.round(v[0]); - dst[1] = Math.round(v[1]); - dst[2] = Math.round(v[2]); - return dst; -} -/** - * Clamp each element of vector between min and max - * @param v - Operand vector. - * @param max - Min value, default 0 - * @param min - Max value, default 1 - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that the clamped value of each element of v. - */ -function clamp$1(v, min = 0, max = 1, dst) { - dst = dst || new VecType$1(3); - dst[0] = Math.min(max, Math.max(min, v[0])); - dst[1] = Math.min(max, Math.max(min, v[1])); - dst[2] = Math.min(max, Math.max(min, v[2])); - return dst; -} -/** - * Adds two vectors; assumes a and b have the same dimension. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the sum of a and b. - */ -function add$2(a, b, dst) { - dst = dst || new VecType$1(3); - dst[0] = a[0] + b[0]; - dst[1] = a[1] + b[1]; - dst[2] = a[2] + b[2]; - return dst; -} -/** - * Adds two vectors, scaling the 2nd; assumes a and b have the same dimension. - * @param a - Operand vector. - * @param b - Operand vector. - * @param scale - Amount to scale b - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the sum of a + b * scale. - */ -function addScaled$1(a, b, scale, dst) { - dst = dst || new VecType$1(3); - dst[0] = a[0] + b[0] * scale; - dst[1] = a[1] + b[1] * scale; - dst[2] = a[2] + b[2] * scale; - return dst; -} -/** - * Returns the angle in radians between two vectors. - * @param a - Operand vector. - * @param b - Operand vector. - * @returns The angle in radians between the 2 vectors. - */ -function angle$1(a, b) { - const ax = a[0]; - const ay = a[1]; - const az = a[2]; - const bx = a[0]; - const by = a[1]; - const bz = a[2]; - const mag1 = Math.sqrt(ax * ax + ay * ay + az * az); - const mag2 = Math.sqrt(bx * bx + by * by + bz * bz); - const mag = mag1 * mag2; - const cosine = mag && dot$2(a, b) / mag; - return Math.acos(cosine); -} -/** - * Subtracts two vectors. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the difference of a and b. - */ -function subtract$2(a, b, dst) { - dst = dst || new VecType$1(3); - dst[0] = a[0] - b[0]; - dst[1] = a[1] - b[1]; - dst[2] = a[2] - b[2]; - return dst; -} -/** - * Subtracts two vectors. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the difference of a and b. - */ -const sub$2 = subtract$2; -/** - * Check if 2 vectors are approximately equal - * @param a - Operand vector. - * @param b - Operand vector. - * @returns true if vectors are approximately equal - */ -function equalsApproximately$3(a, b) { - return Math.abs(a[0] - b[0]) < EPSILON && - Math.abs(a[1] - b[1]) < EPSILON && - Math.abs(a[2] - b[2]) < EPSILON; -} -/** - * Check if 2 vectors are exactly equal - * @param a - Operand vector. - * @param b - Operand vector. - * @returns true if vectors are exactly equal - */ -function equals$3(a, b) { - return a[0] === b[0] && a[1] === b[1] && a[2] === b[2]; -} -/** - * Performs linear interpolation on two vectors. - * Given vectors a and b and interpolation coefficient t, returns - * a + t * (b - a). - * @param a - Operand vector. - * @param b - Operand vector. - * @param t - Interpolation coefficient. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The linear interpolated result. - */ -function lerp$2(a, b, t, dst) { - dst = dst || new VecType$1(3); - dst[0] = a[0] + t * (b[0] - a[0]); - dst[1] = a[1] + t * (b[1] - a[1]); - dst[2] = a[2] + t * (b[2] - a[2]); - return dst; -} -/** - * Performs linear interpolation on two vectors. - * Given vectors a and b and interpolation coefficient vector t, returns - * a + t * (b - a). - * @param a - Operand vector. - * @param b - Operand vector. - * @param t - Interpolation coefficients vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns the linear interpolated result. - */ -function lerpV$1(a, b, t, dst) { - dst = dst || new VecType$1(3); - dst[0] = a[0] + t[0] * (b[0] - a[0]); - dst[1] = a[1] + t[1] * (b[1] - a[1]); - dst[2] = a[2] + t[2] * (b[2] - a[2]); - return dst; -} -/** - * Return max values of two vectors. - * Given vectors a and b returns - * [max(a[0], b[0]), max(a[1], b[1]), max(a[2], b[2])]. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The max components vector. - */ -function max$1(a, b, dst) { - dst = dst || new VecType$1(3); - dst[0] = Math.max(a[0], b[0]); - dst[1] = Math.max(a[1], b[1]); - dst[2] = Math.max(a[2], b[2]); - return dst; -} -/** - * Return min values of two vectors. - * Given vectors a and b returns - * [min(a[0], b[0]), min(a[1], b[1]), min(a[2], b[2])]. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The min components vector. - */ -function min$1(a, b, dst) { - dst = dst || new VecType$1(3); - dst[0] = Math.min(a[0], b[0]); - dst[1] = Math.min(a[1], b[1]); - dst[2] = Math.min(a[2], b[2]); - return dst; -} -/** - * Multiplies a vector by a scalar. - * @param v - The vector. - * @param k - The scalar. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The scaled vector. - */ -function mulScalar$2(v, k, dst) { - dst = dst || new VecType$1(3); - dst[0] = v[0] * k; - dst[1] = v[1] * k; - dst[2] = v[2] * k; - return dst; -} -/** - * Multiplies a vector by a scalar. (same as mulScalar) - * @param v - The vector. - * @param k - The scalar. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The scaled vector. - */ -const scale$3 = mulScalar$2; -/** - * Divides a vector by a scalar. - * @param v - The vector. - * @param k - The scalar. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The scaled vector. - */ -function divScalar$2(v, k, dst) { - dst = dst || new VecType$1(3); - dst[0] = v[0] / k; - dst[1] = v[1] / k; - dst[2] = v[2] / k; - return dst; -} -/** - * Inverse a vector. - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The inverted vector. - */ -function inverse$3(v, dst) { - dst = dst || new VecType$1(3); - dst[0] = 1 / v[0]; - dst[1] = 1 / v[1]; - dst[2] = 1 / v[2]; - return dst; -} -/** - * Invert a vector. (same as inverse) - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The inverted vector. - */ -const invert$2 = inverse$3; -/** - * Computes the cross product of two vectors; assumes both vectors have - * three entries. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of a cross b. - */ -function cross(a, b, dst) { - dst = dst || new VecType$1(3); - const t1 = a[2] * b[0] - a[0] * b[2]; - const t2 = a[0] * b[1] - a[1] * b[0]; - dst[0] = a[1] * b[2] - a[2] * b[1]; - dst[1] = t1; - dst[2] = t2; - return dst; -} -/** - * Computes the dot product of two vectors; assumes both vectors have - * three entries. - * @param a - Operand vector. - * @param b - Operand vector. - * @returns dot product - */ -function dot$2(a, b) { - return (a[0] * b[0]) + (a[1] * b[1]) + (a[2] * b[2]); -} -/** - * Computes the length of vector - * @param v - vector. - * @returns length of vector. - */ -function length$2(v) { - const v0 = v[0]; - const v1 = v[1]; - const v2 = v[2]; - return Math.sqrt(v0 * v0 + v1 * v1 + v2 * v2); -} -/** - * Computes the length of vector (same as length) - * @param v - vector. - * @returns length of vector. - */ -const len$2 = length$2; -/** - * Computes the square of the length of vector - * @param v - vector. - * @returns square of the length of vector. - */ -function lengthSq$2(v) { - const v0 = v[0]; - const v1 = v[1]; - const v2 = v[2]; - return v0 * v0 + v1 * v1 + v2 * v2; -} -/** - * Computes the square of the length of vector (same as lengthSq) - * @param v - vector. - * @returns square of the length of vector. - */ -const lenSq$2 = lengthSq$2; -/** - * Computes the distance between 2 points - * @param a - vector. - * @param b - vector. - * @returns distance between a and b - */ -function distance$1(a, b) { - const dx = a[0] - b[0]; - const dy = a[1] - b[1]; - const dz = a[2] - b[2]; - return Math.sqrt(dx * dx + dy * dy + dz * dz); -} -/** - * Computes the distance between 2 points (same as distance) - * @param a - vector. - * @param b - vector. - * @returns distance between a and b - */ -const dist$1 = distance$1; -/** - * Computes the square of the distance between 2 points - * @param a - vector. - * @param b - vector. - * @returns square of the distance between a and b - */ -function distanceSq$1(a, b) { - const dx = a[0] - b[0]; - const dy = a[1] - b[1]; - const dz = a[2] - b[2]; - return dx * dx + dy * dy + dz * dz; -} -/** - * Computes the square of the distance between 2 points (same as distanceSq) - * @param a - vector. - * @param b - vector. - * @returns square of the distance between a and b - */ -const distSq$1 = distanceSq$1; -/** - * Divides a vector by its Euclidean length and returns the quotient. - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The normalized vector. - */ -function normalize$2(v, dst) { - dst = dst || new VecType$1(3); - const v0 = v[0]; - const v1 = v[1]; - const v2 = v[2]; - const len = Math.sqrt(v0 * v0 + v1 * v1 + v2 * v2); - if (len > 0.00001) { - dst[0] = v0 / len; - dst[1] = v1 / len; - dst[2] = v2 / len; - } - else { - dst[0] = 0; - dst[1] = 0; - dst[2] = 0; - } - return dst; -} -/** - * Negates a vector. - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns -v. - */ -function negate$2(v, dst) { - dst = dst || new VecType$1(3); - dst[0] = -v[0]; - dst[1] = -v[1]; - dst[2] = -v[2]; - return dst; -} -/** - * Copies a vector. (same as {@link vec3.clone}) - * Also see {@link vec3.create} and {@link vec3.set} - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A copy of v. - */ -function copy$3(v, dst) { - dst = dst || new VecType$1(3); - dst[0] = v[0]; - dst[1] = v[1]; - dst[2] = v[2]; - return dst; -} -/** - * Clones a vector. (same as {@link vec3.copy}) - * Also see {@link vec3.create} and {@link vec3.set} - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A copy of v. - */ -const clone$3 = copy$3; -/** - * Multiplies a vector by another vector (component-wise); assumes a and - * b have the same length. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of products of entries of a and b. - */ -function multiply$3(a, b, dst) { - dst = dst || new VecType$1(3); - dst[0] = a[0] * b[0]; - dst[1] = a[1] * b[1]; - dst[2] = a[2] * b[2]; - return dst; -} -/** - * Multiplies a vector by another vector (component-wise); assumes a and - * b have the same length. (same as mul) - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of products of entries of a and b. - */ -const mul$3 = multiply$3; -/** - * Divides a vector by another vector (component-wise); assumes a and - * b have the same length. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of quotients of entries of a and b. - */ -function divide$1(a, b, dst) { - dst = dst || new VecType$1(3); - dst[0] = a[0] / b[0]; - dst[1] = a[1] / b[1]; - dst[2] = a[2] / b[2]; - return dst; -} -/** - * Divides a vector by another vector (component-wise); assumes a and - * b have the same length. (same as divide) - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of quotients of entries of a and b. - */ -const div$1 = divide$1; -/** - * Creates a random vector - * @param scale - Default 1 - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The random vector. - */ -function random(scale = 1, dst) { - dst = dst || new VecType$1(3); - const angle = Math.random() * 2 * Math.PI; - const z = Math.random() * 2 - 1; - const zScale = Math.sqrt(1 - z * z) * scale; - dst[0] = Math.cos(angle) * zScale; - dst[1] = Math.sin(angle) * zScale; - dst[2] = z * scale; - return dst; -} -/** - * Zero's a vector - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The zeroed vector. - */ -function zero$1(dst) { - dst = dst || new VecType$1(3); - dst[0] = 0; - dst[1] = 0; - dst[2] = 0; - return dst; -} -/** - * transform vec3 by 4x4 matrix - * @param v - the vector - * @param m - The matrix. - * @param dst - optional vec3 to store result. If not passed a new one is created. - * @returns the transformed vector - */ -function transformMat4$1(v, m, dst) { - dst = dst || new VecType$1(3); - const x = v[0]; - const y = v[1]; - const z = v[2]; - const w = (m[3] * x + m[7] * y + m[11] * z + m[15]) || 1; - dst[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w; - dst[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w; - dst[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w; - return dst; -} -/** - * Transform vec4 by upper 3x3 matrix inside 4x4 matrix. - * @param v - The direction. - * @param m - The matrix. - * @param dst - optional Vec3 to store result. If not passed a new one is created. - * @returns The transformed vector. - */ -function transformMat4Upper3x3(v, m, dst) { - dst = dst || new VecType$1(3); - const v0 = v[0]; - const v1 = v[1]; - const v2 = v[2]; - dst[0] = v0 * m[0 * 4 + 0] + v1 * m[1 * 4 + 0] + v2 * m[2 * 4 + 0]; - dst[1] = v0 * m[0 * 4 + 1] + v1 * m[1 * 4 + 1] + v2 * m[2 * 4 + 1]; - dst[2] = v0 * m[0 * 4 + 2] + v1 * m[1 * 4 + 2] + v2 * m[2 * 4 + 2]; - return dst; -} -/** - * Transforms vec3 by 3x3 matrix - * - * @param v - the vector - * @param m - The matrix. - * @param dst - optional vec3 to store result. If not passed a new one is created. - * @returns the transformed vector - */ -function transformMat3(v, m, dst) { - dst = dst || new VecType$1(3); - const x = v[0]; - const y = v[1]; - const z = v[2]; - dst[0] = x * m[0] + y * m[4] + z * m[8]; - dst[1] = x * m[1] + y * m[5] + z * m[9]; - dst[2] = x * m[2] + y * m[6] + z * m[10]; - return dst; -} -/** - * Transforms vec3 by Quaternion - * @param v - the vector to transform - * @param q - the quaternion to transform by - * @param dst - optional vec3 to store result. If not passed a new one is created. - * @returns the transformed - */ -function transformQuat(v, q, dst) { - dst = dst || new VecType$1(3); - const qx = q[0]; - const qy = q[1]; - const qz = q[2]; - const w2 = q[3] * 2; - const x = v[0]; - const y = v[1]; - const z = v[2]; - const uvX = qy * z - qz * y; - const uvY = qz * x - qx * z; - const uvZ = qx * y - qy * x; - dst[0] = x + uvX * w2 + (qy * uvZ - qz * uvY) * 2; - dst[1] = y + uvY * w2 + (qz * uvX - qx * uvZ) * 2; - dst[2] = z + uvZ * w2 + (qx * uvY - qy * uvX) * 2; - return dst; -} -/** - * Returns the translation component of a 4-by-4 matrix as a vector with 3 - * entries. - * @param m - The matrix. - * @param dst - vector to hold result. If not passed a new one is created. - * @returns The translation component of m. - */ -function getTranslation$1(m, dst) { - dst = dst || new VecType$1(3); - dst[0] = m[12]; - dst[1] = m[13]; - dst[2] = m[14]; - return dst; -} -/** - * Returns an axis of a 4x4 matrix as a vector with 3 entries - * @param m - The matrix. - * @param axis - The axis 0 = x, 1 = y, 2 = z; - * @returns The axis component of m. - */ -function getAxis$1(m, axis, dst) { - dst = dst || new VecType$1(3); - const off = axis * 4; - dst[0] = m[off + 0]; - dst[1] = m[off + 1]; - dst[2] = m[off + 2]; - return dst; -} -/** - * Returns the scaling component of the matrix - * @param m - The Matrix - * @param dst - The vector to set. If not passed a new one is created. - */ -function getScaling$1(m, dst) { - dst = dst || new VecType$1(3); - const xx = m[0]; - const xy = m[1]; - const xz = m[2]; - const yx = m[4]; - const yy = m[5]; - const yz = m[6]; - const zx = m[8]; - const zy = m[9]; - const zz = m[10]; - dst[0] = Math.sqrt(xx * xx + xy * xy + xz * xz); - dst[1] = Math.sqrt(yx * yx + yy * yy + yz * yz); - dst[2] = Math.sqrt(zx * zx + zy * zy + zz * zz); - return dst; -} - -var vec3Impl = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create$4, - setDefaultType: setDefaultType$5, - fromValues: fromValues$2, - set: set$3, - ceil: ceil$1, - floor: floor$1, - round: round$1, - clamp: clamp$1, - add: add$2, - addScaled: addScaled$1, - angle: angle$1, - subtract: subtract$2, - sub: sub$2, - equalsApproximately: equalsApproximately$3, - equals: equals$3, - lerp: lerp$2, - lerpV: lerpV$1, - max: max$1, - min: min$1, - mulScalar: mulScalar$2, - scale: scale$3, - divScalar: divScalar$2, - inverse: inverse$3, - invert: invert$2, - cross: cross, - dot: dot$2, - length: length$2, - len: len$2, - lengthSq: lengthSq$2, - lenSq: lenSq$2, - distance: distance$1, - dist: dist$1, - distanceSq: distanceSq$1, - distSq: distSq$1, - normalize: normalize$2, - negate: negate$2, - copy: copy$3, - clone: clone$3, - multiply: multiply$3, - mul: mul$3, - divide: divide$1, - div: div$1, - random: random, - zero: zero$1, - transformMat4: transformMat4$1, - transformMat4Upper3x3: transformMat4Upper3x3, - transformMat3: transformMat3, - transformQuat: transformQuat, - getTranslation: getTranslation$1, - getAxis: getAxis$1, - getScaling: getScaling$1 -}); - -/** - * 4x4 Matrix math math functions. - * - * Almost all functions take an optional `dst` argument. If it is not passed in the - * functions will create a new matrix. In other words you can do this - * - * const mat = mat4.translation([1, 2, 3]); // Creates a new translation matrix - * - * or - * - * const mat = mat4.create(); - * mat4.translation([1, 2, 3], mat); // Puts translation matrix in mat. - * - * The first style is often easier but depending on where it's used it generates garbage where - * as there is almost never allocation with the second style. - * - * It is always save to pass any matrix as the destination. So for example - * - * const mat = mat4.identity(); - * const trans = mat4.translation([1, 2, 3]); - * mat4.multiply(mat, trans, mat); // Multiplies mat * trans and puts result in mat. - * - */ -let MatType = Float32Array; -/** - * Sets the type this library creates for a Mat4 - * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array` - * @returns previous constructor for Mat4 - */ -function setDefaultType$3(ctor) { - const oldType = MatType; - MatType = ctor; - return oldType; -} -/** - * Create a Mat4 from values - * - * Note: Since passing in a raw JavaScript array - * is valid in all circumstances, if you want to - * force a JavaScript array into a Mat4's specified type - * it would be faster to use - * - * ``` - * const m = mat4.clone(someJSArray); - * ``` - * - * Note: a consequence of the implementation is if your Mat4Type = `Array` - * instead of `Float32Array` or `Float64Array` then any values you - * don't pass in will be undefined. Usually this is not an issue since - * (a) using `Array` is rare and (b) using `mat4.create` is usually used - * to create a Mat4 to be filled out as in - * - * ``` - * const m = mat4.create(); - * mat4.perspective(fov, aspect, near, far, m); - * ``` - * - * @param v0 - value for element 0 - * @param v1 - value for element 1 - * @param v2 - value for element 2 - * @param v3 - value for element 3 - * @param v4 - value for element 4 - * @param v5 - value for element 5 - * @param v6 - value for element 6 - * @param v7 - value for element 7 - * @param v8 - value for element 8 - * @param v9 - value for element 9 - * @param v10 - value for element 10 - * @param v11 - value for element 11 - * @param v12 - value for element 12 - * @param v13 - value for element 13 - * @param v14 - value for element 14 - * @param v15 - value for element 15 - * @returns created from values. - */ -function create$2(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) { - const dst = new MatType(16); - if (v0 !== undefined) { - dst[0] = v0; - if (v1 !== undefined) { - dst[1] = v1; - if (v2 !== undefined) { - dst[2] = v2; - if (v3 !== undefined) { - dst[3] = v3; - if (v4 !== undefined) { - dst[4] = v4; - if (v5 !== undefined) { - dst[5] = v5; - if (v6 !== undefined) { - dst[6] = v6; - if (v7 !== undefined) { - dst[7] = v7; - if (v8 !== undefined) { - dst[8] = v8; - if (v9 !== undefined) { - dst[9] = v9; - if (v10 !== undefined) { - dst[10] = v10; - if (v11 !== undefined) { - dst[11] = v11; - if (v12 !== undefined) { - dst[12] = v12; - if (v13 !== undefined) { - dst[13] = v13; - if (v14 !== undefined) { - dst[14] = v14; - if (v15 !== undefined) { - dst[15] = v15; - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - return dst; -} -/** - * Sets the values of a Mat4 - * Also see {@link mat4.create} and {@link mat4.copy} - * - * @param v0 - value for element 0 - * @param v1 - value for element 1 - * @param v2 - value for element 2 - * @param v3 - value for element 3 - * @param v4 - value for element 4 - * @param v5 - value for element 5 - * @param v6 - value for element 6 - * @param v7 - value for element 7 - * @param v8 - value for element 8 - * @param v9 - value for element 9 - * @param v10 - value for element 10 - * @param v11 - value for element 11 - * @param v12 - value for element 12 - * @param v13 - value for element 13 - * @param v14 - value for element 14 - * @param v15 - value for element 15 - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns Mat4 created from values. - */ -function set$2(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, dst) { - dst = dst || new MatType(16); - dst[0] = v0; - dst[1] = v1; - dst[2] = v2; - dst[3] = v3; - dst[4] = v4; - dst[5] = v5; - dst[6] = v6; - dst[7] = v7; - dst[8] = v8; - dst[9] = v9; - dst[10] = v10; - dst[11] = v11; - dst[12] = v12; - dst[13] = v13; - dst[14] = v14; - dst[15] = v15; - return dst; -} -/** - * Creates a Mat4 from a Mat3 - * @param m3 - source matrix - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns Mat4 made from m3 - */ -function fromMat3(m3, dst) { - dst = dst || new MatType(16); - dst[0] = m3[0]; - dst[1] = m3[1]; - dst[2] = m3[2]; - dst[3] = 0; - dst[4] = m3[4]; - dst[5] = m3[5]; - dst[6] = m3[6]; - dst[7] = 0; - dst[8] = m3[8]; - dst[9] = m3[9]; - dst[10] = m3[10]; - dst[11] = 0; - dst[12] = 0; - dst[13] = 0; - dst[14] = 0; - dst[15] = 1; - return dst; -} -/** - * Creates a Mat4 rotation matrix from a quaternion - * @param q - quaternion to create matrix from - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns Mat4 made from q - */ -function fromQuat(q, dst) { - dst = dst || new MatType(16); - const x = q[0]; - const y = q[1]; - const z = q[2]; - const w = q[3]; - const x2 = x + x; - const y2 = y + y; - const z2 = z + z; - const xx = x * x2; - const yx = y * x2; - const yy = y * y2; - const zx = z * x2; - const zy = z * y2; - const zz = z * z2; - const wx = w * x2; - const wy = w * y2; - const wz = w * z2; - dst[0] = 1 - yy - zz; - dst[1] = yx + wz; - dst[2] = zx - wy; - dst[3] = 0; - dst[4] = yx - wz; - dst[5] = 1 - xx - zz; - dst[6] = zy + wx; - dst[7] = 0; - dst[8] = zx + wy; - dst[9] = zy - wx; - dst[10] = 1 - xx - yy; - dst[11] = 0; - dst[12] = 0; - dst[13] = 0; - dst[14] = 0; - dst[15] = 1; - return dst; -} -/** - * Negates a matrix. - * @param m - The matrix. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns -m. - */ -function negate$1(m, dst) { - dst = dst || new MatType(16); - dst[0] = -m[0]; - dst[1] = -m[1]; - dst[2] = -m[2]; - dst[3] = -m[3]; - dst[4] = -m[4]; - dst[5] = -m[5]; - dst[6] = -m[6]; - dst[7] = -m[7]; - dst[8] = -m[8]; - dst[9] = -m[9]; - dst[10] = -m[10]; - dst[11] = -m[11]; - dst[12] = -m[12]; - dst[13] = -m[13]; - dst[14] = -m[14]; - dst[15] = -m[15]; - return dst; -} -/** - * Copies a matrix. (same as {@link mat4.clone}) - * Also see {@link mat4.create} and {@link mat4.set} - * @param m - The matrix. - * @param dst - The matrix. If not passed a new one is created. - * @returns A copy of m. - */ -function copy$2(m, dst) { - dst = dst || new MatType(16); - dst[0] = m[0]; - dst[1] = m[1]; - dst[2] = m[2]; - dst[3] = m[3]; - dst[4] = m[4]; - dst[5] = m[5]; - dst[6] = m[6]; - dst[7] = m[7]; - dst[8] = m[8]; - dst[9] = m[9]; - dst[10] = m[10]; - dst[11] = m[11]; - dst[12] = m[12]; - dst[13] = m[13]; - dst[14] = m[14]; - dst[15] = m[15]; - return dst; -} -/** - * Copies a matrix (same as {@link mat4.copy}) - * Also see {@link mat4.create} and {@link mat4.set} - * @param m - The matrix. - * @param dst - The matrix. If not passed a new one is created. - * @returns A copy of m. - */ -const clone$2 = copy$2; -/** - * Check if 2 matrices are approximately equal - * @param a - Operand matrix. - * @param b - Operand matrix. - * @returns true if matrices are approximately equal - */ -function equalsApproximately$2(a, b) { - return Math.abs(a[0] - b[0]) < EPSILON && - Math.abs(a[1] - b[1]) < EPSILON && - Math.abs(a[2] - b[2]) < EPSILON && - Math.abs(a[3] - b[3]) < EPSILON && - Math.abs(a[4] - b[4]) < EPSILON && - Math.abs(a[5] - b[5]) < EPSILON && - Math.abs(a[6] - b[6]) < EPSILON && - Math.abs(a[7] - b[7]) < EPSILON && - Math.abs(a[8] - b[8]) < EPSILON && - Math.abs(a[9] - b[9]) < EPSILON && - Math.abs(a[10] - b[10]) < EPSILON && - Math.abs(a[11] - b[11]) < EPSILON && - Math.abs(a[12] - b[12]) < EPSILON && - Math.abs(a[13] - b[13]) < EPSILON && - Math.abs(a[14] - b[14]) < EPSILON && - Math.abs(a[15] - b[15]) < EPSILON; -} -/** - * Check if 2 matrices are exactly equal - * @param a - Operand matrix. - * @param b - Operand matrix. - * @returns true if matrices are exactly equal - */ -function equals$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] && - 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]; -} -/** - * Creates a 4-by-4 identity matrix. - * - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns A 4-by-4 identity matrix. - */ -function identity$1(dst) { - dst = dst || new MatType(16); - dst[0] = 1; - dst[1] = 0; - dst[2] = 0; - dst[3] = 0; - dst[4] = 0; - dst[5] = 1; - dst[6] = 0; - dst[7] = 0; - dst[8] = 0; - dst[9] = 0; - dst[10] = 1; - dst[11] = 0; - dst[12] = 0; - dst[13] = 0; - dst[14] = 0; - dst[15] = 1; - return dst; -} -/** - * Takes the transpose of a matrix. - * @param m - The matrix. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The transpose of m. - */ -function transpose(m, dst) { - dst = dst || new MatType(16); - if (dst === m) { - let t; - t = m[1]; - m[1] = m[4]; - m[4] = t; - t = m[2]; - m[2] = m[8]; - m[8] = t; - t = m[3]; - m[3] = m[12]; - m[12] = t; - t = m[6]; - m[6] = m[9]; - m[9] = t; - t = m[7]; - m[7] = m[13]; - m[13] = t; - t = m[11]; - m[11] = m[14]; - m[14] = t; - return dst; - } - const m00 = m[0 * 4 + 0]; - const m01 = m[0 * 4 + 1]; - const m02 = m[0 * 4 + 2]; - const m03 = m[0 * 4 + 3]; - const m10 = m[1 * 4 + 0]; - const m11 = m[1 * 4 + 1]; - const m12 = m[1 * 4 + 2]; - const m13 = m[1 * 4 + 3]; - const m20 = m[2 * 4 + 0]; - const m21 = m[2 * 4 + 1]; - const m22 = m[2 * 4 + 2]; - const m23 = m[2 * 4 + 3]; - const m30 = m[3 * 4 + 0]; - const m31 = m[3 * 4 + 1]; - const m32 = m[3 * 4 + 2]; - const m33 = m[3 * 4 + 3]; - dst[0] = m00; - dst[1] = m10; - dst[2] = m20; - dst[3] = m30; - dst[4] = m01; - dst[5] = m11; - dst[6] = m21; - dst[7] = m31; - dst[8] = m02; - dst[9] = m12; - dst[10] = m22; - dst[11] = m32; - dst[12] = m03; - dst[13] = m13; - dst[14] = m23; - dst[15] = m33; - return dst; -} -/** - * Computes the inverse of a 4-by-4 matrix. - * @param m - The matrix. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The inverse of m. - */ -function inverse$2(m, dst) { - dst = dst || new MatType(16); - const m00 = m[0 * 4 + 0]; - const m01 = m[0 * 4 + 1]; - const m02 = m[0 * 4 + 2]; - const m03 = m[0 * 4 + 3]; - const m10 = m[1 * 4 + 0]; - const m11 = m[1 * 4 + 1]; - const m12 = m[1 * 4 + 2]; - const m13 = m[1 * 4 + 3]; - const m20 = m[2 * 4 + 0]; - const m21 = m[2 * 4 + 1]; - const m22 = m[2 * 4 + 2]; - const m23 = m[2 * 4 + 3]; - const m30 = m[3 * 4 + 0]; - const m31 = m[3 * 4 + 1]; - const m32 = m[3 * 4 + 2]; - const m33 = m[3 * 4 + 3]; - const tmp0 = m22 * m33; - const tmp1 = m32 * m23; - const tmp2 = m12 * m33; - const tmp3 = m32 * m13; - const tmp4 = m12 * m23; - const tmp5 = m22 * m13; - const tmp6 = m02 * m33; - const tmp7 = m32 * m03; - const tmp8 = m02 * m23; - const tmp9 = m22 * m03; - const tmp10 = m02 * m13; - const tmp11 = m12 * m03; - const tmp12 = m20 * m31; - const tmp13 = m30 * m21; - const tmp14 = m10 * m31; - const tmp15 = m30 * m11; - const tmp16 = m10 * m21; - const tmp17 = m20 * m11; - const tmp18 = m00 * m31; - const tmp19 = m30 * m01; - const tmp20 = m00 * m21; - const tmp21 = m20 * m01; - const tmp22 = m00 * m11; - const tmp23 = m10 * m01; - const t0 = (tmp0 * m11 + tmp3 * m21 + tmp4 * m31) - - (tmp1 * m11 + tmp2 * m21 + tmp5 * m31); - const t1 = (tmp1 * m01 + tmp6 * m21 + tmp9 * m31) - - (tmp0 * m01 + tmp7 * m21 + tmp8 * m31); - const t2 = (tmp2 * m01 + tmp7 * m11 + tmp10 * m31) - - (tmp3 * m01 + tmp6 * m11 + tmp11 * m31); - const t3 = (tmp5 * m01 + tmp8 * m11 + tmp11 * m21) - - (tmp4 * m01 + tmp9 * m11 + tmp10 * m21); - const d = 1 / (m00 * t0 + m10 * t1 + m20 * t2 + m30 * t3); - dst[0] = d * t0; - dst[1] = d * t1; - dst[2] = d * t2; - dst[3] = d * t3; - dst[4] = d * ((tmp1 * m10 + tmp2 * m20 + tmp5 * m30) - - (tmp0 * m10 + tmp3 * m20 + tmp4 * m30)); - dst[5] = d * ((tmp0 * m00 + tmp7 * m20 + tmp8 * m30) - - (tmp1 * m00 + tmp6 * m20 + tmp9 * m30)); - dst[6] = d * ((tmp3 * m00 + tmp6 * m10 + tmp11 * m30) - - (tmp2 * m00 + tmp7 * m10 + tmp10 * m30)); - dst[7] = d * ((tmp4 * m00 + tmp9 * m10 + tmp10 * m20) - - (tmp5 * m00 + tmp8 * m10 + tmp11 * m20)); - dst[8] = d * ((tmp12 * m13 + tmp15 * m23 + tmp16 * m33) - - (tmp13 * m13 + tmp14 * m23 + tmp17 * m33)); - dst[9] = d * ((tmp13 * m03 + tmp18 * m23 + tmp21 * m33) - - (tmp12 * m03 + tmp19 * m23 + tmp20 * m33)); - dst[10] = d * ((tmp14 * m03 + tmp19 * m13 + tmp22 * m33) - - (tmp15 * m03 + tmp18 * m13 + tmp23 * m33)); - dst[11] = d * ((tmp17 * m03 + tmp20 * m13 + tmp23 * m23) - - (tmp16 * m03 + tmp21 * m13 + tmp22 * m23)); - dst[12] = d * ((tmp14 * m22 + tmp17 * m32 + tmp13 * m12) - - (tmp16 * m32 + tmp12 * m12 + tmp15 * m22)); - dst[13] = d * ((tmp20 * m32 + tmp12 * m02 + tmp19 * m22) - - (tmp18 * m22 + tmp21 * m32 + tmp13 * m02)); - dst[14] = d * ((tmp18 * m12 + tmp23 * m32 + tmp15 * m02) - - (tmp22 * m32 + tmp14 * m02 + tmp19 * m12)); - dst[15] = d * ((tmp22 * m22 + tmp16 * m02 + tmp21 * m12) - - (tmp20 * m12 + tmp23 * m22 + tmp17 * m02)); - return dst; -} -/** - * Compute the determinant of a matrix - * @param m - the matrix - * @returns the determinant - */ -function determinant(m) { - const m00 = m[0 * 4 + 0]; - const m01 = m[0 * 4 + 1]; - const m02 = m[0 * 4 + 2]; - const m03 = m[0 * 4 + 3]; - const m10 = m[1 * 4 + 0]; - const m11 = m[1 * 4 + 1]; - const m12 = m[1 * 4 + 2]; - const m13 = m[1 * 4 + 3]; - const m20 = m[2 * 4 + 0]; - const m21 = m[2 * 4 + 1]; - const m22 = m[2 * 4 + 2]; - const m23 = m[2 * 4 + 3]; - const m30 = m[3 * 4 + 0]; - const m31 = m[3 * 4 + 1]; - const m32 = m[3 * 4 + 2]; - const m33 = m[3 * 4 + 3]; - const tmp0 = m22 * m33; - const tmp1 = m32 * m23; - const tmp2 = m12 * m33; - const tmp3 = m32 * m13; - const tmp4 = m12 * m23; - const tmp5 = m22 * m13; - const tmp6 = m02 * m33; - const tmp7 = m32 * m03; - const tmp8 = m02 * m23; - const tmp9 = m22 * m03; - const tmp10 = m02 * m13; - const tmp11 = m12 * m03; - const t0 = (tmp0 * m11 + tmp3 * m21 + tmp4 * m31) - - (tmp1 * m11 + tmp2 * m21 + tmp5 * m31); - const t1 = (tmp1 * m01 + tmp6 * m21 + tmp9 * m31) - - (tmp0 * m01 + tmp7 * m21 + tmp8 * m31); - const t2 = (tmp2 * m01 + tmp7 * m11 + tmp10 * m31) - - (tmp3 * m01 + tmp6 * m11 + tmp11 * m31); - const t3 = (tmp5 * m01 + tmp8 * m11 + tmp11 * m21) - - (tmp4 * m01 + tmp9 * m11 + tmp10 * m21); - return m00 * t0 + m10 * t1 + m20 * t2 + m30 * t3; -} -/** - * Computes the inverse of a 4-by-4 matrix. (same as inverse) - * @param m - The matrix. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The inverse of m. - */ -const invert$1 = inverse$2; -/** - * Multiplies two 4-by-4 matrices with a on the left and b on the right - * @param a - The matrix on the left. - * @param b - The matrix on the right. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The matrix product of a and b. - */ -function multiply$2(a, b, dst) { - dst = dst || new MatType(16); - const a00 = a[0]; - const a01 = a[1]; - const a02 = a[2]; - const a03 = a[3]; - const a10 = a[4 + 0]; - const a11 = a[4 + 1]; - const a12 = a[4 + 2]; - const a13 = a[4 + 3]; - const a20 = a[8 + 0]; - const a21 = a[8 + 1]; - const a22 = a[8 + 2]; - const a23 = a[8 + 3]; - const a30 = a[12 + 0]; - const a31 = a[12 + 1]; - const a32 = a[12 + 2]; - const a33 = a[12 + 3]; - const b00 = b[0]; - const b01 = b[1]; - const b02 = b[2]; - const b03 = b[3]; - const b10 = b[4 + 0]; - const b11 = b[4 + 1]; - const b12 = b[4 + 2]; - const b13 = b[4 + 3]; - const b20 = b[8 + 0]; - const b21 = b[8 + 1]; - const b22 = b[8 + 2]; - const b23 = b[8 + 3]; - const b30 = b[12 + 0]; - const b31 = b[12 + 1]; - const b32 = b[12 + 2]; - const b33 = b[12 + 3]; - dst[0] = a00 * b00 + a10 * b01 + a20 * b02 + a30 * b03; - dst[1] = a01 * b00 + a11 * b01 + a21 * b02 + a31 * b03; - dst[2] = a02 * b00 + a12 * b01 + a22 * b02 + a32 * b03; - dst[3] = a03 * b00 + a13 * b01 + a23 * b02 + a33 * b03; - dst[4] = a00 * b10 + a10 * b11 + a20 * b12 + a30 * b13; - dst[5] = a01 * b10 + a11 * b11 + a21 * b12 + a31 * b13; - dst[6] = a02 * b10 + a12 * b11 + a22 * b12 + a32 * b13; - dst[7] = a03 * b10 + a13 * b11 + a23 * b12 + a33 * b13; - dst[8] = a00 * b20 + a10 * b21 + a20 * b22 + a30 * b23; - dst[9] = a01 * b20 + a11 * b21 + a21 * b22 + a31 * b23; - dst[10] = a02 * b20 + a12 * b21 + a22 * b22 + a32 * b23; - dst[11] = a03 * b20 + a13 * b21 + a23 * b22 + a33 * b23; - dst[12] = a00 * b30 + a10 * b31 + a20 * b32 + a30 * b33; - dst[13] = a01 * b30 + a11 * b31 + a21 * b32 + a31 * b33; - dst[14] = a02 * b30 + a12 * b31 + a22 * b32 + a32 * b33; - dst[15] = a03 * b30 + a13 * b31 + a23 * b32 + a33 * b33; - return dst; -} -/** - * Multiplies two 4-by-4 matrices with a on the left and b on the right (same as multiply) - * @param a - The matrix on the left. - * @param b - The matrix on the right. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The matrix product of a and b. - */ -const mul$2 = multiply$2; -/** - * Sets the translation component of a 4-by-4 matrix to the given - * vector. - * @param a - The matrix. - * @param v - The vector. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The matrix with translation set. - */ -function setTranslation(a, v, dst) { - dst = dst || identity$1(); - if (a !== dst) { - dst[0] = a[0]; - dst[1] = a[1]; - dst[2] = a[2]; - dst[3] = a[3]; - dst[4] = a[4]; - dst[5] = a[5]; - dst[6] = a[6]; - dst[7] = a[7]; - dst[8] = a[8]; - dst[9] = a[9]; - dst[10] = a[10]; - dst[11] = a[11]; - } - dst[12] = v[0]; - dst[13] = v[1]; - dst[14] = v[2]; - dst[15] = 1; - return dst; -} -/** - * Returns the translation component of a 4-by-4 matrix as a vector with 3 - * entries. - * @param m - The matrix. - * @param dst - vector to hold result. If not passed a new one is created. - * @returns The translation component of m. - */ -function getTranslation(m, dst) { - dst = dst || create$4(); - dst[0] = m[12]; - dst[1] = m[13]; - dst[2] = m[14]; - return dst; -} -/** - * Returns an axis of a 4x4 matrix as a vector with 3 entries - * @param m - The matrix. - * @param axis - The axis 0 = x, 1 = y, 2 = z; - * @returns The axis component of m. - */ -function getAxis(m, axis, dst) { - dst = dst || create$4(); - const off = axis * 4; - dst[0] = m[off + 0]; - dst[1] = m[off + 1]; - dst[2] = m[off + 2]; - return dst; -} -/** - * Sets an axis of a 4x4 matrix as a vector with 3 entries - * @param m - The matrix. - * @param v - the axis vector - * @param axis - The axis 0 = x, 1 = y, 2 = z; - * @param dst - The matrix to set. If not passed a new one is created. - * @returns The matrix with axis set. - */ -function setAxis(a, v, axis, dst) { - if (dst !== a) { - dst = copy$2(a, dst); - } - const off = axis * 4; - dst[off + 0] = v[0]; - dst[off + 1] = v[1]; - dst[off + 2] = v[2]; - return dst; -} -/** - * Returns the scaling component of the matrix - * @param m - The Matrix - * @param dst - The vector to set. If not passed a new one is created. - */ -function getScaling(m, dst) { - dst = dst || create$4(); - const xx = m[0]; - const xy = m[1]; - const xz = m[2]; - const yx = m[4]; - const yy = m[5]; - const yz = m[6]; - const zx = m[8]; - const zy = m[9]; - const zz = m[10]; - dst[0] = Math.sqrt(xx * xx + xy * xy + xz * xz); - dst[1] = Math.sqrt(yx * yx + yy * yy + yz * yz); - dst[2] = Math.sqrt(zx * zx + zy * zy + zz * zz); - return dst; -} -/** - * Computes a 4-by-4 perspective transformation matrix given the angular height - * of the frustum, the aspect ratio, and the near and far clipping planes. The - * arguments define a frustum extending in the negative z direction. The given - * angle is the vertical angle of the frustum, and the horizontal angle is - * determined to produce the given aspect ratio. The arguments near and far are - * the distances to the near and far clipping planes. Note that near and far - * are not z coordinates, but rather they are distances along the negative - * z-axis. The matrix generated sends the viewing frustum to the unit box. - * We assume a unit box extending from -1 to 1 in the x and y dimensions and - * from 0 to 1 in the z dimension. - * - * Note: If you pass `Infinity` for zFar then it will produce a projection matrix - * returns -Infinity for Z when transforming coordinates with Z <= 0 and +Infinity for Z - * otherwise. - * - * @param fieldOfViewYInRadians - The camera angle from top to bottom (in radians). - * @param aspect - The aspect ratio width / height. - * @param zNear - The depth (negative z coordinate) - * of the near clipping plane. - * @param zFar - The depth (negative z coordinate) - * of the far clipping plane. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The perspective matrix. - */ -function perspective(fieldOfViewYInRadians, aspect, zNear, zFar, dst) { - dst = dst || new MatType(16); - const f = Math.tan(Math.PI * 0.5 - 0.5 * fieldOfViewYInRadians); - dst[0] = f / aspect; - dst[1] = 0; - dst[2] = 0; - dst[3] = 0; - dst[4] = 0; - dst[5] = f; - dst[6] = 0; - dst[7] = 0; - dst[8] = 0; - dst[9] = 0; - dst[11] = -1; - dst[12] = 0; - dst[13] = 0; - dst[15] = 0; - if (zFar === Infinity) { - dst[10] = -1; - dst[14] = -zNear; - } - else { - const rangeInv = 1 / (zNear - zFar); - dst[10] = zFar * rangeInv; - dst[14] = zFar * zNear * rangeInv; - } - return dst; -} -/** - * Computes a 4-by-4 orthogonal transformation matrix that transforms from - * the given the left, right, bottom, and top dimensions to -1 +1 in x, and y - * and 0 to +1 in z. - * @param left - Left side of the near clipping plane viewport. - * @param right - Right side of the near clipping plane viewport. - * @param bottom - Bottom of the near clipping plane viewport. - * @param top - Top of the near clipping plane viewport. - * @param near - The depth (negative z coordinate) - * of the near clipping plane. - * @param far - The depth (negative z coordinate) - * of the far clipping plane. - * @param dst - Output matrix. If not passed a new one is created. - * @returns The orthographic projection matrix. - */ -function ortho(left, right, bottom, top, near, far, dst) { - dst = dst || new MatType(16); - dst[0] = 2 / (right - left); - dst[1] = 0; - dst[2] = 0; - dst[3] = 0; - dst[4] = 0; - dst[5] = 2 / (top - bottom); - dst[6] = 0; - dst[7] = 0; - dst[8] = 0; - dst[9] = 0; - dst[10] = 1 / (near - far); - dst[11] = 0; - dst[12] = (right + left) / (left - right); - dst[13] = (top + bottom) / (bottom - top); - dst[14] = near / (near - far); - dst[15] = 1; - return dst; -} -/** - * Computes a 4-by-4 perspective transformation matrix given the left, right, - * top, bottom, near and far clipping planes. The arguments define a frustum - * extending in the negative z direction. The arguments near and far are the - * distances to the near and far clipping planes. Note that near and far are not - * z coordinates, but rather they are distances along the negative z-axis. The - * matrix generated sends the viewing frustum to the unit box. We assume a unit - * box extending from -1 to 1 in the x and y dimensions and from 0 to 1 in the z - * dimension. - * @param left - The x coordinate of the left plane of the box. - * @param right - The x coordinate of the right plane of the box. - * @param bottom - The y coordinate of the bottom plane of the box. - * @param top - The y coordinate of the right plane of the box. - * @param near - The negative z coordinate of the near plane of the box. - * @param far - The negative z coordinate of the far plane of the box. - * @param dst - Output matrix. If not passed a new one is created. - * @returns The perspective projection matrix. - */ -function frustum(left, right, bottom, top, near, far, dst) { - dst = dst || new MatType(16); - const dx = (right - left); - const dy = (top - bottom); - const dz = (near - far); - dst[0] = 2 * near / dx; - dst[1] = 0; - dst[2] = 0; - dst[3] = 0; - dst[4] = 0; - dst[5] = 2 * near / dy; - dst[6] = 0; - dst[7] = 0; - dst[8] = (left + right) / dx; - dst[9] = (top + bottom) / dy; - dst[10] = far / dz; - dst[11] = -1; - dst[12] = 0; - dst[13] = 0; - dst[14] = near * far / dz; - dst[15] = 0; - return dst; -} -let xAxis; -let yAxis; -let zAxis; -/** - * Computes a 4-by-4 aim transformation. - * - * This is a matrix which positions an object aiming down positive Z. - * toward the target. - * - * Note: this is **NOT** the inverse of lookAt as lookAt looks at negative Z. - * - * @param position - The position of the object. - * @param target - The position meant to be aimed at. - * @param up - A vector pointing up. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The aim matrix. - */ -function aim(position, target, up, dst) { - dst = dst || new MatType(16); - xAxis = xAxis || create$4(); - yAxis = yAxis || create$4(); - zAxis = zAxis || create$4(); - normalize$2(subtract$2(target, position, zAxis), zAxis); - normalize$2(cross(up, zAxis, xAxis), xAxis); - normalize$2(cross(zAxis, xAxis, yAxis), yAxis); - dst[0] = xAxis[0]; - dst[1] = xAxis[1]; - dst[2] = xAxis[2]; - dst[3] = 0; - dst[4] = yAxis[0]; - dst[5] = yAxis[1]; - dst[6] = yAxis[2]; - dst[7] = 0; - dst[8] = zAxis[0]; - dst[9] = zAxis[1]; - dst[10] = zAxis[2]; - dst[11] = 0; - dst[12] = position[0]; - dst[13] = position[1]; - dst[14] = position[2]; - dst[15] = 1; - return dst; -} -/** - * Computes a 4-by-4 camera aim transformation. - * - * This is a matrix which positions an object aiming down negative Z. - * toward the target. - * - * Note: this is the inverse of `lookAt` - * - * @param eye - The position of the object. - * @param target - The position meant to be aimed at. - * @param up - A vector pointing up. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The aim matrix. - */ -function cameraAim(eye, target, up, dst) { - dst = dst || new MatType(16); - xAxis = xAxis || create$4(); - yAxis = yAxis || create$4(); - zAxis = zAxis || create$4(); - normalize$2(subtract$2(eye, target, zAxis), zAxis); - normalize$2(cross(up, zAxis, xAxis), xAxis); - normalize$2(cross(zAxis, xAxis, yAxis), yAxis); - dst[0] = xAxis[0]; - dst[1] = xAxis[1]; - dst[2] = xAxis[2]; - dst[3] = 0; - dst[4] = yAxis[0]; - dst[5] = yAxis[1]; - dst[6] = yAxis[2]; - dst[7] = 0; - dst[8] = zAxis[0]; - dst[9] = zAxis[1]; - dst[10] = zAxis[2]; - dst[11] = 0; - dst[12] = eye[0]; - dst[13] = eye[1]; - dst[14] = eye[2]; - dst[15] = 1; - return dst; -} -/** - * Computes a 4-by-4 view transformation. - * - * This is a view matrix which transforms all other objects - * to be in the space of the view defined by the parameters. - * - * @param eye - The position of the object. - * @param target - The position meant to be aimed at. - * @param up - A vector pointing up. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The look-at matrix. - */ -function lookAt(eye, target, up, dst) { - dst = dst || new MatType(16); - xAxis = xAxis || create$4(); - yAxis = yAxis || create$4(); - zAxis = zAxis || create$4(); - normalize$2(subtract$2(eye, target, zAxis), zAxis); - normalize$2(cross(up, zAxis, xAxis), xAxis); - normalize$2(cross(zAxis, xAxis, yAxis), yAxis); - dst[0] = xAxis[0]; - dst[1] = yAxis[0]; - dst[2] = zAxis[0]; - dst[3] = 0; - dst[4] = xAxis[1]; - dst[5] = yAxis[1]; - dst[6] = zAxis[1]; - dst[7] = 0; - dst[8] = xAxis[2]; - dst[9] = yAxis[2]; - dst[10] = zAxis[2]; - dst[11] = 0; - dst[12] = -(xAxis[0] * eye[0] + xAxis[1] * eye[1] + xAxis[2] * eye[2]); - dst[13] = -(yAxis[0] * eye[0] + yAxis[1] * eye[1] + yAxis[2] * eye[2]); - dst[14] = -(zAxis[0] * eye[0] + zAxis[1] * eye[1] + zAxis[2] * eye[2]); - dst[15] = 1; - return dst; -} -/** - * Creates a 4-by-4 matrix which translates by the given vector v. - * @param v - The vector by - * which to translate. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The translation matrix. - */ -function translation(v, dst) { - dst = dst || new MatType(16); - dst[0] = 1; - dst[1] = 0; - dst[2] = 0; - dst[3] = 0; - dst[4] = 0; - dst[5] = 1; - dst[6] = 0; - dst[7] = 0; - dst[8] = 0; - dst[9] = 0; - dst[10] = 1; - dst[11] = 0; - dst[12] = v[0]; - dst[13] = v[1]; - dst[14] = v[2]; - dst[15] = 1; - return dst; -} -/** - * Translates the given 4-by-4 matrix by the given vector v. - * @param m - The matrix. - * @param v - The vector by - * which to translate. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The translated matrix. - */ -function translate(m, v, dst) { - dst = dst || new MatType(16); - const v0 = v[0]; - const v1 = v[1]; - const v2 = v[2]; - const m00 = m[0]; - const m01 = m[1]; - const m02 = m[2]; - const m03 = m[3]; - const m10 = m[1 * 4 + 0]; - const m11 = m[1 * 4 + 1]; - const m12 = m[1 * 4 + 2]; - const m13 = m[1 * 4 + 3]; - const m20 = m[2 * 4 + 0]; - const m21 = m[2 * 4 + 1]; - const m22 = m[2 * 4 + 2]; - const m23 = m[2 * 4 + 3]; - const m30 = m[3 * 4 + 0]; - const m31 = m[3 * 4 + 1]; - const m32 = m[3 * 4 + 2]; - const m33 = m[3 * 4 + 3]; - if (m !== dst) { - dst[0] = m00; - dst[1] = m01; - dst[2] = m02; - dst[3] = m03; - dst[4] = m10; - dst[5] = m11; - dst[6] = m12; - dst[7] = m13; - dst[8] = m20; - dst[9] = m21; - dst[10] = m22; - dst[11] = m23; - } - dst[12] = m00 * v0 + m10 * v1 + m20 * v2 + m30; - dst[13] = m01 * v0 + m11 * v1 + m21 * v2 + m31; - dst[14] = m02 * v0 + m12 * v1 + m22 * v2 + m32; - dst[15] = m03 * v0 + m13 * v1 + m23 * v2 + m33; - return dst; -} -/** - * Creates a 4-by-4 matrix which rotates around the x-axis by the given angle. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotation matrix. - */ -function rotationX(angleInRadians, dst) { - dst = dst || new MatType(16); - const c = Math.cos(angleInRadians); - const s = Math.sin(angleInRadians); - dst[0] = 1; - dst[1] = 0; - dst[2] = 0; - dst[3] = 0; - dst[4] = 0; - dst[5] = c; - dst[6] = s; - dst[7] = 0; - dst[8] = 0; - dst[9] = -s; - dst[10] = c; - dst[11] = 0; - dst[12] = 0; - dst[13] = 0; - dst[14] = 0; - dst[15] = 1; - return dst; -} -/** - * Rotates the given 4-by-4 matrix around the x-axis by the given - * angle. - * @param m - The matrix. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotated matrix. - */ -function rotateX$1(m, angleInRadians, dst) { - dst = dst || new MatType(16); - const m10 = m[4]; - const m11 = m[5]; - const m12 = m[6]; - const m13 = m[7]; - const m20 = m[8]; - const m21 = m[9]; - const m22 = m[10]; - const m23 = m[11]; - const c = Math.cos(angleInRadians); - const s = Math.sin(angleInRadians); - dst[4] = c * m10 + s * m20; - dst[5] = c * m11 + s * m21; - dst[6] = c * m12 + s * m22; - dst[7] = c * m13 + s * m23; - dst[8] = c * m20 - s * m10; - dst[9] = c * m21 - s * m11; - dst[10] = c * m22 - s * m12; - dst[11] = c * m23 - s * m13; - if (m !== dst) { - dst[0] = m[0]; - dst[1] = m[1]; - dst[2] = m[2]; - dst[3] = m[3]; - dst[12] = m[12]; - dst[13] = m[13]; - dst[14] = m[14]; - dst[15] = m[15]; - } - return dst; -} -/** - * Creates a 4-by-4 matrix which rotates around the y-axis by the given angle. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotation matrix. - */ -function rotationY(angleInRadians, dst) { - dst = dst || new MatType(16); - const c = Math.cos(angleInRadians); - const s = Math.sin(angleInRadians); - dst[0] = c; - dst[1] = 0; - dst[2] = -s; - dst[3] = 0; - dst[4] = 0; - dst[5] = 1; - dst[6] = 0; - dst[7] = 0; - dst[8] = s; - dst[9] = 0; - dst[10] = c; - dst[11] = 0; - dst[12] = 0; - dst[13] = 0; - dst[14] = 0; - dst[15] = 1; - return dst; -} -/** - * Rotates the given 4-by-4 matrix around the y-axis by the given - * angle. - * @param m - The matrix. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotated matrix. - */ -function rotateY$1(m, angleInRadians, dst) { - dst = dst || new MatType(16); - const m00 = m[0 * 4 + 0]; - const m01 = m[0 * 4 + 1]; - const m02 = m[0 * 4 + 2]; - const m03 = m[0 * 4 + 3]; - const m20 = m[2 * 4 + 0]; - const m21 = m[2 * 4 + 1]; - const m22 = m[2 * 4 + 2]; - const m23 = m[2 * 4 + 3]; - const c = Math.cos(angleInRadians); - const s = Math.sin(angleInRadians); - dst[0] = c * m00 - s * m20; - dst[1] = c * m01 - s * m21; - dst[2] = c * m02 - s * m22; - dst[3] = c * m03 - s * m23; - dst[8] = c * m20 + s * m00; - dst[9] = c * m21 + s * m01; - dst[10] = c * m22 + s * m02; - dst[11] = c * m23 + s * m03; - if (m !== dst) { - dst[4] = m[4]; - dst[5] = m[5]; - dst[6] = m[6]; - dst[7] = m[7]; - dst[12] = m[12]; - dst[13] = m[13]; - dst[14] = m[14]; - dst[15] = m[15]; - } - return dst; -} -/** - * Creates a 4-by-4 matrix which rotates around the z-axis by the given angle. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotation matrix. - */ -function rotationZ(angleInRadians, dst) { - dst = dst || new MatType(16); - const c = Math.cos(angleInRadians); - const s = Math.sin(angleInRadians); - dst[0] = c; - dst[1] = s; - dst[2] = 0; - dst[3] = 0; - dst[4] = -s; - dst[5] = c; - dst[6] = 0; - dst[7] = 0; - dst[8] = 0; - dst[9] = 0; - dst[10] = 1; - dst[11] = 0; - dst[12] = 0; - dst[13] = 0; - dst[14] = 0; - dst[15] = 1; - return dst; -} -/** - * Rotates the given 4-by-4 matrix around the z-axis by the given - * angle. - * @param m - The matrix. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotated matrix. - */ -function rotateZ$1(m, angleInRadians, dst) { - dst = dst || new MatType(16); - const m00 = m[0 * 4 + 0]; - const m01 = m[0 * 4 + 1]; - const m02 = m[0 * 4 + 2]; - const m03 = m[0 * 4 + 3]; - const m10 = m[1 * 4 + 0]; - const m11 = m[1 * 4 + 1]; - const m12 = m[1 * 4 + 2]; - const m13 = m[1 * 4 + 3]; - const c = Math.cos(angleInRadians); - const s = Math.sin(angleInRadians); - dst[0] = c * m00 + s * m10; - dst[1] = c * m01 + s * m11; - dst[2] = c * m02 + s * m12; - dst[3] = c * m03 + s * m13; - dst[4] = c * m10 - s * m00; - dst[5] = c * m11 - s * m01; - dst[6] = c * m12 - s * m02; - dst[7] = c * m13 - s * m03; - if (m !== dst) { - dst[8] = m[8]; - dst[9] = m[9]; - dst[10] = m[10]; - dst[11] = m[11]; - dst[12] = m[12]; - dst[13] = m[13]; - dst[14] = m[14]; - dst[15] = m[15]; - } - return dst; -} -/** - * Creates a 4-by-4 matrix which rotates around the given axis by the given - * angle. - * @param axis - The axis - * about which to rotate. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns A matrix which rotates angle radians - * around the axis. - */ -function axisRotation(axis, angleInRadians, dst) { - dst = dst || new MatType(16); - let x = axis[0]; - let y = axis[1]; - let z = axis[2]; - const n = Math.sqrt(x * x + y * y + z * z); - x /= n; - y /= n; - z /= n; - const xx = x * x; - const yy = y * y; - const zz = z * z; - const c = Math.cos(angleInRadians); - const s = Math.sin(angleInRadians); - const oneMinusCosine = 1 - c; - dst[0] = xx + (1 - xx) * c; - dst[1] = x * y * oneMinusCosine + z * s; - dst[2] = x * z * oneMinusCosine - y * s; - dst[3] = 0; - dst[4] = x * y * oneMinusCosine - z * s; - dst[5] = yy + (1 - yy) * c; - dst[6] = y * z * oneMinusCosine + x * s; - dst[7] = 0; - dst[8] = x * z * oneMinusCosine + y * s; - dst[9] = y * z * oneMinusCosine - x * s; - dst[10] = zz + (1 - zz) * c; - dst[11] = 0; - dst[12] = 0; - dst[13] = 0; - dst[14] = 0; - dst[15] = 1; - return dst; -} -/** - * Creates a 4-by-4 matrix which rotates around the given axis by the given - * angle. (same as axisRotation) - * @param axis - The axis - * about which to rotate. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns A matrix which rotates angle radians - * around the axis. - */ -const rotation = axisRotation; -/** - * Rotates the given 4-by-4 matrix around the given axis by the - * given angle. - * @param m - The matrix. - * @param axis - The axis - * about which to rotate. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotated matrix. - */ -function axisRotate(m, axis, angleInRadians, dst) { - dst = dst || new MatType(16); - let x = axis[0]; - let y = axis[1]; - let z = axis[2]; - const n = Math.sqrt(x * x + y * y + z * z); - x /= n; - y /= n; - z /= n; - const xx = x * x; - const yy = y * y; - const zz = z * z; - const c = Math.cos(angleInRadians); - const s = Math.sin(angleInRadians); - const oneMinusCosine = 1 - c; - const r00 = xx + (1 - xx) * c; - const r01 = x * y * oneMinusCosine + z * s; - const r02 = x * z * oneMinusCosine - y * s; - const r10 = x * y * oneMinusCosine - z * s; - const r11 = yy + (1 - yy) * c; - const r12 = y * z * oneMinusCosine + x * s; - const r20 = x * z * oneMinusCosine + y * s; - const r21 = y * z * oneMinusCosine - x * s; - const r22 = zz + (1 - zz) * c; - const m00 = m[0]; - const m01 = m[1]; - const m02 = m[2]; - const m03 = m[3]; - const m10 = m[4]; - const m11 = m[5]; - const m12 = m[6]; - const m13 = m[7]; - const m20 = m[8]; - const m21 = m[9]; - const m22 = m[10]; - const m23 = m[11]; - dst[0] = r00 * m00 + r01 * m10 + r02 * m20; - dst[1] = r00 * m01 + r01 * m11 + r02 * m21; - dst[2] = r00 * m02 + r01 * m12 + r02 * m22; - dst[3] = r00 * m03 + r01 * m13 + r02 * m23; - dst[4] = r10 * m00 + r11 * m10 + r12 * m20; - dst[5] = r10 * m01 + r11 * m11 + r12 * m21; - dst[6] = r10 * m02 + r11 * m12 + r12 * m22; - dst[7] = r10 * m03 + r11 * m13 + r12 * m23; - dst[8] = r20 * m00 + r21 * m10 + r22 * m20; - dst[9] = r20 * m01 + r21 * m11 + r22 * m21; - dst[10] = r20 * m02 + r21 * m12 + r22 * m22; - dst[11] = r20 * m03 + r21 * m13 + r22 * m23; - if (m !== dst) { - dst[12] = m[12]; - dst[13] = m[13]; - dst[14] = m[14]; - dst[15] = m[15]; - } - return dst; -} -/** - * Rotates the given 4-by-4 matrix around the given axis by the - * given angle. (same as rotate) - * @param m - The matrix. - * @param axis - The axis - * about which to rotate. - * @param angleInRadians - The angle by which to rotate (in radians). - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The rotated matrix. - */ -const rotate = axisRotate; -/** - * Creates a 4-by-4 matrix which scales in each dimension by an amount given by - * the corresponding entry in the given vector; assumes the vector has three - * entries. - * @param v - A vector of - * three entries specifying the factor by which to scale in each dimension. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The scaling matrix. - */ -function scaling(v, dst) { - dst = dst || new MatType(16); - dst[0] = v[0]; - dst[1] = 0; - dst[2] = 0; - dst[3] = 0; - dst[4] = 0; - dst[5] = v[1]; - dst[6] = 0; - dst[7] = 0; - dst[8] = 0; - dst[9] = 0; - dst[10] = v[2]; - dst[11] = 0; - dst[12] = 0; - dst[13] = 0; - dst[14] = 0; - dst[15] = 1; - return dst; -} -/** - * Scales the given 4-by-4 matrix in each dimension by an amount - * given by the corresponding entry in the given vector; assumes the vector has - * three entries. - * @param m - The matrix to be modified. - * @param v - A vector of three entries specifying the - * factor by which to scale in each dimension. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The scaled matrix. - */ -function scale$2(m, v, dst) { - dst = dst || new MatType(16); - const v0 = v[0]; - const v1 = v[1]; - const v2 = v[2]; - dst[0] = v0 * m[0 * 4 + 0]; - dst[1] = v0 * m[0 * 4 + 1]; - dst[2] = v0 * m[0 * 4 + 2]; - dst[3] = v0 * m[0 * 4 + 3]; - dst[4] = v1 * m[1 * 4 + 0]; - dst[5] = v1 * m[1 * 4 + 1]; - dst[6] = v1 * m[1 * 4 + 2]; - dst[7] = v1 * m[1 * 4 + 3]; - dst[8] = v2 * m[2 * 4 + 0]; - dst[9] = v2 * m[2 * 4 + 1]; - dst[10] = v2 * m[2 * 4 + 2]; - dst[11] = v2 * m[2 * 4 + 3]; - if (m !== dst) { - dst[12] = m[12]; - dst[13] = m[13]; - dst[14] = m[14]; - dst[15] = m[15]; - } - return dst; -} -/** - * Creates a 4-by-4 matrix which scales a uniform amount in each dimension. - * @param s - the amount to scale - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The scaling matrix. - */ -function uniformScaling(s, dst) { - dst = dst || new MatType(16); - dst[0] = s; - dst[1] = 0; - dst[2] = 0; - dst[3] = 0; - dst[4] = 0; - dst[5] = s; - dst[6] = 0; - dst[7] = 0; - dst[8] = 0; - dst[9] = 0; - dst[10] = s; - dst[11] = 0; - dst[12] = 0; - dst[13] = 0; - dst[14] = 0; - dst[15] = 1; - return dst; -} -/** - * Scales the given 4-by-4 matrix in each dimension by a uniform scale. - * @param m - The matrix to be modified. - * @param s - The amount to scale. - * @param dst - matrix to hold result. If not passed a new one is created. - * @returns The scaled matrix. - */ -function uniformScale(m, s, dst) { - dst = dst || new MatType(16); - dst[0] = s * m[0 * 4 + 0]; - dst[1] = s * m[0 * 4 + 1]; - dst[2] = s * m[0 * 4 + 2]; - dst[3] = s * m[0 * 4 + 3]; - dst[4] = s * m[1 * 4 + 0]; - dst[5] = s * m[1 * 4 + 1]; - dst[6] = s * m[1 * 4 + 2]; - dst[7] = s * m[1 * 4 + 3]; - dst[8] = s * m[2 * 4 + 0]; - dst[9] = s * m[2 * 4 + 1]; - dst[10] = s * m[2 * 4 + 2]; - dst[11] = s * m[2 * 4 + 3]; - if (m !== dst) { - dst[12] = m[12]; - dst[13] = m[13]; - dst[14] = m[14]; - dst[15] = m[15]; - } - return dst; -} - -var mat4Impl = /*#__PURE__*/Object.freeze({ - __proto__: null, - setDefaultType: setDefaultType$3, - create: create$2, - set: set$2, - fromMat3: fromMat3, - fromQuat: fromQuat, - negate: negate$1, - copy: copy$2, - clone: clone$2, - equalsApproximately: equalsApproximately$2, - equals: equals$2, - identity: identity$1, - transpose: transpose, - inverse: inverse$2, - determinant: determinant, - invert: invert$1, - multiply: multiply$2, - mul: mul$2, - setTranslation: setTranslation, - getTranslation: getTranslation, - getAxis: getAxis, - setAxis: setAxis, - getScaling: getScaling, - perspective: perspective, - ortho: ortho, - frustum: frustum, - aim: aim, - cameraAim: cameraAim, - lookAt: lookAt, - translation: translation, - translate: translate, - rotationX: rotationX, - rotateX: rotateX$1, - rotationY: rotationY, - rotateY: rotateY$1, - rotationZ: rotationZ, - rotateZ: rotateZ$1, - axisRotation: axisRotation, - rotation: rotation, - axisRotate: axisRotate, - rotate: rotate, - scaling: scaling, - scale: scale$2, - uniformScaling: uniformScaling, - uniformScale: uniformScale -}); - -/* - * Copyright 2022 Gregg Tavares - * - * 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. - */ -/** - * - * Quat4 math functions. - * - * Almost all functions take an optional `dst` argument. If it is not passed in the - * functions will create a new `Quat4`. In other words you can do this - * - * const v = quat4.cross(v1, v2); // Creates a new Quat4 with the cross product of v1 x v2. - * - * or - * - * const v = quat4.create(); - * quat4.cross(v1, v2, v); // Puts the cross product of v1 x v2 in v - * - * The first style is often easier but depending on where it's used it generates garbage where - * as there is almost never allocation with the second style. - * - * It is always safe to pass any vector as the destination. So for example - * - * quat4.cross(v1, v2, v1); // Puts the cross product of v1 x v2 in v1 - * - */ -let QuatType = Float32Array; -/** - * Sets the type this library creates for a Quat4 - * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array` - * @returns previous constructor for Quat4 - */ -function setDefaultType$2(ctor) { - const oldType = QuatType; - QuatType = ctor; - return oldType; -} -/** - * Creates a quat4; may be called with x, y, z to set initial values. - * @param x - Initial x value. - * @param y - Initial y value. - * @param z - Initial z value. - * @param w - Initial w value. - * @returns the created vector - */ -function create$1(x, y, z, w) { - const dst = new QuatType(4); - if (x !== undefined) { - dst[0] = x; - if (y !== undefined) { - dst[1] = y; - if (z !== undefined) { - dst[2] = z; - if (w !== undefined) { - dst[3] = w; - } - } - } - } - return dst; -} - -/* - * Copyright 2022 Gregg Tavares - * - * 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. - */ -/** - * Creates a Quat; may be called with x, y, z to set initial values. (same as create) - * @param x - Initial x value. - * @param y - Initial y value. - * @param z - Initial z value. - * @param z - Initial w value. - * @returns the created vector - */ -const fromValues$1 = create$1; -/** - * Sets the values of a Quat - * Also see {@link quat.create} and {@link quat.copy} - * - * @param x first value - * @param y second value - * @param z third value - * @param w fourth value - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector with its elements set. - */ -function set$1(x, y, z, w, dst) { - dst = dst || new QuatType(4); - dst[0] = x; - dst[1] = y; - dst[2] = z; - dst[3] = w; - return dst; -} -/** - * Sets a quaternion from the given angle and axis, - * then returns it. - * - * @param axis - the axis to rotate around - * @param angleInRadians - the angle - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns The quaternion that represents the given axis and angle - **/ -function fromAxisAngle(axis, angleInRadians, dst) { - dst = dst || new QuatType(4); - const halfAngle = angleInRadians * 0.5; - const s = Math.sin(halfAngle); - dst[0] = s * axis[0]; - dst[1] = s * axis[1]; - dst[2] = s * axis[2]; - dst[3] = Math.cos(halfAngle); - return dst; -} -/** - * Gets the rotation axis and angle - * @param q - quaternion to compute from - * @param dst - Vec3 to hold result. If not passed in a new one is created. - * @return angle and axis - */ -function toAxisAngle(q, dst) { - dst = dst || create$4(4); - const angle = Math.acos(q[3]) * 2; - const s = Math.sin(angle * 0.5); - if (s > EPSILON) { - dst[0] = q[0] / s; - dst[1] = q[1] / s; - dst[2] = q[2] / s; - } - else { - dst[0] = 1; - dst[1] = 0; - dst[2] = 0; - } - return { angle, axis: dst }; -} -/** - * Returns the angle in degrees between two rotations a and b. - * @param a - quaternion a - * @param b - quaternion b - * @return angle in radians between the two quaternions - */ -function angle(a, b) { - const d = dot$1(a, b); - return Math.acos(2 * d * d - 1); -} -/** - * Multiplies two quaternions - * - * @param a - the first quaternion - * @param b - the second quaternion - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the result of a * b - */ -function multiply$1(a, b, dst) { - dst = dst || new QuatType(4); - const ax = a[0]; - const ay = a[1]; - const az = a[2]; - const aw = a[3]; - const bx = b[0]; - const by = b[1]; - const bz = b[2]; - const bw = b[3]; - dst[0] = ax * bw + aw * bx + ay * bz - az * by; - dst[1] = ay * bw + aw * by + az * bx - ax * bz; - dst[2] = az * bw + aw * bz + ax * by - ay * bx; - dst[3] = aw * bw - ax * bx - ay * by - az * bz; - return dst; -} -/** - * Multiplies two quaternions - * - * @param a - the first quaternion - * @param b - the second quaternion - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the result of a * b - */ -const mul$1 = multiply$1; -/** - * Rotates the given quaternion around the X axis by the given angle. - * @param q - quaternion to rotate - * @param angleInRadians - The angle by which to rotate - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the result of a * b - */ -function rotateX(q, angleInRadians, dst) { - dst = dst || new QuatType(4); - const halfAngle = angleInRadians * 0.5; - const qx = q[0]; - const qy = q[1]; - const qz = q[2]; - const qw = q[3]; - const bx = Math.sin(halfAngle); - const bw = Math.cos(halfAngle); - dst[0] = qx * bw + qw * bx; - dst[1] = qy * bw + qz * bx; - dst[2] = qz * bw - qy * bx; - dst[3] = qw * bw - qx * bx; - return dst; -} -/** - * Rotates the given quaternion around the Y axis by the given angle. - * @param q - quaternion to rotate - * @param angleInRadians - The angle by which to rotate - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the result of a * b - */ -function rotateY(q, angleInRadians, dst) { - dst = dst || new QuatType(4); - const halfAngle = angleInRadians * 0.5; - const qx = q[0]; - const qy = q[1]; - const qz = q[2]; - const qw = q[3]; - const by = Math.sin(halfAngle); - const bw = Math.cos(halfAngle); - dst[0] = qx * bw - qz * by; - dst[1] = qy * bw + qw * by; - dst[2] = qz * bw + qx * by; - dst[3] = qw * bw - qy * by; - return dst; -} -/** - * Rotates the given quaternion around the Z axis by the given angle. - * @param q - quaternion to rotate - * @param angleInRadians - The angle by which to rotate - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the result of a * b - */ -function rotateZ(q, angleInRadians, dst) { - dst = dst || new QuatType(4); - const halfAngle = angleInRadians * 0.5; - const qx = q[0]; - const qy = q[1]; - const qz = q[2]; - const qw = q[3]; - const bz = Math.sin(halfAngle); - const bw = Math.cos(halfAngle); - dst[0] = qx * bw + qy * bz; - dst[1] = qy * bw - qx * bz; - dst[2] = qz * bw + qw * bz; - dst[3] = qw * bw - qz * bz; - return dst; -} -/** - * Spherically linear interpolate between two quaternions - * - * @param a - starting value - * @param b - ending value - * @param t - value where 0 = a and 1 = b - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the result of a * b - */ -function slerp(a, b, t, dst) { - dst = dst || new QuatType(4); - const ax = a[0]; - const ay = a[1]; - const az = a[2]; - const aw = a[3]; - let bx = b[0]; - let by = b[1]; - let bz = b[2]; - let bw = b[3]; - let cosOmega = ax * bx + ay * by + az * bz + aw * bw; - if (cosOmega < 0) { - cosOmega = -cosOmega; - bx = -bx; - by = -by; - bz = -bz; - bw = -bw; - } - let scale0; - let scale1; - if (1.0 - cosOmega > EPSILON) { - const omega = Math.acos(cosOmega); - const sinOmega = Math.sin(omega); - scale0 = Math.sin((1 - t) * omega) / sinOmega; - scale1 = Math.sin(t * omega) / sinOmega; - } - else { - scale0 = 1.0 - t; - scale1 = t; - } - dst[0] = scale0 * ax + scale1 * bx; - dst[1] = scale0 * ay + scale1 * by; - dst[2] = scale0 * az + scale1 * bz; - dst[3] = scale0 * aw + scale1 * bw; - return dst; -} -/** - * Compute the inverse of a quaternion - * - * @param q - quaternion to compute the inverse of - * @returns A quaternion that is the result of a * b - */ -function inverse$1(q, dst) { - dst = dst || new QuatType(4); - const a0 = q[0]; - const a1 = q[1]; - const a2 = q[2]; - const a3 = q[3]; - const dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3; - const invDot = dot ? 1 / dot : 0; - dst[0] = -a0 * invDot; - dst[1] = -a1 * invDot; - dst[2] = -a2 * invDot; - dst[3] = a3 * invDot; - return dst; -} -/** - * Compute the conjugate of a quaternion - * For quaternions with a magnitude of 1 (a unit quaternion) - * this returns the same as the inverse but is faster to calculate. - * - * @param q - quaternion to compute the conjugate of. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns The conjugate of q - */ -function conjugate(q, dst) { - dst = dst || new QuatType(4); - dst[0] = -q[0]; - dst[1] = -q[1]; - dst[2] = -q[2]; - dst[3] = q[3]; - return dst; -} -/** - * Creates a quaternion from the given rotation matrix. - * - * The created quaternion is not normalized. - * - * @param m - rotation matrix - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns the result - */ -function fromMat(m, dst) { - dst = dst || new QuatType(4); - /* - 0 1 2 - 3 4 5 - 6 7 8 - - 0 1 2 - 4 5 6 - 8 9 10 - */ - // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes - // article "Quaternion Calculus and Fast Animation". - const trace = m[0] + m[5] + m[10]; - if (trace > 0.0) { - // |w| > 1/2, may as well choose w > 1/2 - const root = Math.sqrt(trace + 1); // 2w - dst[3] = 0.5 * root; - const invRoot = 0.5 / root; // 1/(4w) - dst[0] = (m[6] - m[9]) * invRoot; - dst[1] = (m[8] - m[2]) * invRoot; - dst[2] = (m[1] - m[4]) * invRoot; - } - else { - // |w| <= 1/2 - let i = 0; - if (m[5] > m[0]) { - i = 1; - } - if (m[10] > m[i * 4 + i]) { - i = 2; - } - const j = (i + 1) % 3; - const k = (i + 2) % 3; - const root = Math.sqrt(m[i * 4 + i] - m[j * 4 + j] - m[k * 4 + k] + 1.0); - dst[i] = 0.5 * root; - const invRoot = 0.5 / root; - dst[3] = (m[j * 4 + k] - m[k * 4 + j]) * invRoot; - dst[j] = (m[j * 4 + i] + m[i * 4 + j]) * invRoot; - dst[k] = (m[k * 4 + i] + m[i * 4 + k]) * invRoot; - } - return dst; -} -/** - * Creates a quaternion from the given euler angle x, y, z using the provided intrinsic order for the conversion. - * - * @param xAngleInRadians - angle to rotate around X axis in radians. - * @param yAngleInRadians - angle to rotate around Y axis in radians. - * @param zAngleInRadians - angle to rotate around Z axis in radians. - * @param order - order to apply euler angles - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion representing the same rotation as the euler angles applied in the given order - */ -function fromEuler(xAngleInRadians, yAngleInRadians, zAngleInRadians, order, dst) { - dst = dst || new QuatType(4); - const xHalfAngle = xAngleInRadians * 0.5; - const yHalfAngle = yAngleInRadians * 0.5; - const zHalfAngle = zAngleInRadians * 0.5; - const sx = Math.sin(xHalfAngle); - const cx = Math.cos(xHalfAngle); - const sy = Math.sin(yHalfAngle); - const cy = Math.cos(yHalfAngle); - const sz = Math.sin(zHalfAngle); - const cz = Math.cos(zHalfAngle); - switch (order) { - case 'xyz': - dst[0] = sx * cy * cz + cx * sy * sz; - dst[1] = cx * sy * cz - sx * cy * sz; - dst[2] = cx * cy * sz + sx * sy * cz; - dst[3] = cx * cy * cz - sx * sy * sz; - break; - case 'xzy': - dst[0] = sx * cy * cz - cx * sy * sz; - dst[1] = cx * sy * cz - sx * cy * sz; - dst[2] = cx * cy * sz + sx * sy * cz; - dst[3] = cx * cy * cz + sx * sy * sz; - break; - case 'yxz': - dst[0] = sx * cy * cz + cx * sy * sz; - dst[1] = cx * sy * cz - sx * cy * sz; - dst[2] = cx * cy * sz - sx * sy * cz; - dst[3] = cx * cy * cz + sx * sy * sz; - break; - case 'yzx': - dst[0] = sx * cy * cz + cx * sy * sz; - dst[1] = cx * sy * cz + sx * cy * sz; - dst[2] = cx * cy * sz - sx * sy * cz; - dst[3] = cx * cy * cz - sx * sy * sz; - break; - case 'zxy': - dst[0] = sx * cy * cz - cx * sy * sz; - dst[1] = cx * sy * cz + sx * cy * sz; - dst[2] = cx * cy * sz + sx * sy * cz; - dst[3] = cx * cy * cz - sx * sy * sz; - break; - case 'zyx': - dst[0] = sx * cy * cz - cx * sy * sz; - dst[1] = cx * sy * cz + sx * cy * sz; - dst[2] = cx * cy * sz - sx * sy * cz; - dst[3] = cx * cy * cz + sx * sy * sz; - break; - default: - throw new Error(`Unknown rotation order: ${order}`); - } - return dst; -} -/** - * Copies a quaternion. (same as {@link quat.clone}) - * Also see {@link quat.create} and {@link quat.set} - * @param q - The quaternion. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is a copy of q - */ -function copy$1(q, dst) { - dst = dst || new QuatType(4); - dst[0] = q[0]; - dst[1] = q[1]; - dst[2] = q[2]; - dst[3] = q[3]; - return dst; -} -/** - * Clones a quaternion. (same as {@link quat.copy}) - * Also see {@link quat.create} and {@link quat.set} - * @param q - The quaternion. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A copy of q. - */ -const clone$1 = copy$1; -/** - * Adds two quaternions; assumes a and b have the same dimension. - * @param a - Operand quaternion. - * @param b - Operand quaternion. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the sum of a and b. - */ -function add$1(a, b, dst) { - dst = dst || new QuatType(4); - dst[0] = a[0] + b[0]; - dst[1] = a[1] + b[1]; - dst[2] = a[2] + b[2]; - dst[3] = a[3] + b[3]; - return dst; -} -/** - * Subtracts two quaternions. - * @param a - Operand quaternion. - * @param b - Operand quaternion. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the difference of a and b. - */ -function subtract$1(a, b, dst) { - dst = dst || new QuatType(4); - dst[0] = a[0] - b[0]; - dst[1] = a[1] - b[1]; - dst[2] = a[2] - b[2]; - dst[3] = a[3] - b[3]; - return dst; -} -/** - * Subtracts two quaternions. - * @param a - Operand quaternion. - * @param b - Operand quaternion. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns A quaternion that is the difference of a and b. - */ -const sub$1 = subtract$1; -/** - * Multiplies a quaternion by a scalar. - * @param v - The quaternion. - * @param k - The scalar. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns The scaled quaternion. - */ -function mulScalar$1(v, k, dst) { - dst = dst || new QuatType(4); - dst[0] = v[0] * k; - dst[1] = v[1] * k; - dst[2] = v[2] * k; - dst[3] = v[3] * k; - return dst; -} -/** - * Multiplies a quaternion by a scalar. (same as mulScalar) - * @param v - The quaternion. - * @param k - The scalar. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns The scaled quaternion. - */ -const scale$1 = mulScalar$1; -/** - * Divides a vector by a scalar. - * @param v - The vector. - * @param k - The scalar. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns The scaled quaternion. - */ -function divScalar$1(v, k, dst) { - dst = dst || new QuatType(4); - dst[0] = v[0] / k; - dst[1] = v[1] / k; - dst[2] = v[2] / k; - dst[3] = v[3] / k; - return dst; -} -/** - * Computes the dot product of two quaternions - * @param a - Operand quaternion. - * @param b - Operand quaternion. - * @returns dot product - */ -function dot$1(a, b) { - return (a[0] * b[0]) + (a[1] * b[1]) + (a[2] * b[2]) + (a[3] * b[3]); -} -/** - * Performs linear interpolation on two quaternions. - * Given quaternions a and b and interpolation coefficient t, returns - * a + t * (b - a). - * @param a - Operand quaternion. - * @param b - Operand quaternion. - * @param t - Interpolation coefficient. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns The linear interpolated result. - */ -function lerp$1(a, b, t, dst) { - dst = dst || new QuatType(4); - dst[0] = a[0] + t * (b[0] - a[0]); - dst[1] = a[1] + t * (b[1] - a[1]); - dst[2] = a[2] + t * (b[2] - a[2]); - dst[3] = a[3] + t * (b[3] - a[3]); - return dst; -} -/** - * Computes the length of quaternion - * @param v - quaternion. - * @returns length of quaternion. - */ -function length$1(v) { - const v0 = v[0]; - const v1 = v[1]; - const v2 = v[2]; - const v3 = v[3]; - return Math.sqrt(v0 * v0 + v1 * v1 + v2 * v2 + v3 * v3); -} -/** - * Computes the length of quaternion (same as length) - * @param v - quaternion. - * @returns length of quaternion. - */ -const len$1 = length$1; -/** - * Computes the square of the length of quaternion - * @param v - quaternion. - * @returns square of the length of quaternion. - */ -function lengthSq$1(v) { - const v0 = v[0]; - const v1 = v[1]; - const v2 = v[2]; - const v3 = v[3]; - return v0 * v0 + v1 * v1 + v2 * v2 + v3 * v3; -} -/** - * Computes the square of the length of quaternion (same as lengthSq) - * @param v - quaternion. - * @returns square of the length of quaternion. - */ -const lenSq$1 = lengthSq$1; -/** - * Divides a quaternion by its Euclidean length and returns the quotient. - * @param v - The quaternion. - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns The normalized quaternion. - */ -function normalize$1(v, dst) { - dst = dst || new QuatType(4); - const v0 = v[0]; - const v1 = v[1]; - const v2 = v[2]; - const v3 = v[3]; - const len = Math.sqrt(v0 * v0 + v1 * v1 + v2 * v2 + v3 * v3); - if (len > 0.00001) { - dst[0] = v0 / len; - dst[1] = v1 / len; - dst[2] = v2 / len; - dst[3] = v3 / len; - } - else { - dst[0] = 0; - dst[1] = 0; - dst[2] = 0; - dst[3] = 0; - } - return dst; -} -/** - * Check if 2 quaternions are approximately equal - * @param a - Operand quaternion. - * @param b - Operand quaternion. - * @returns true if quaternions are approximately equal - */ -function equalsApproximately$1(a, b) { - return Math.abs(a[0] - b[0]) < EPSILON && - Math.abs(a[1] - b[1]) < EPSILON && - Math.abs(a[2] - b[2]) < EPSILON && - Math.abs(a[3] - b[3]) < EPSILON; -} -/** - * Check if 2 quaternions are exactly equal - * @param a - Operand quaternion. - * @param b - Operand quaternion. - * @returns true if quaternions are exactly equal - */ -function equals$1(a, b) { - return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3]; -} -/** - * Creates an identity quaternion - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns an identity quaternion - */ -function identity(dst) { - dst = dst || new QuatType(4); - dst[0] = 0; - dst[1] = 0; - dst[2] = 0; - dst[3] = 1; - return dst; -} -let tempVec3; -let xUnitVec3; -let yUnitVec3; -/** - * Computes a quaternion to represent the shortest rotation from one vector to another. - * - * @param aUnit - the start vector - * @param bUnit - the end vector - * @param dst - quaternion to hold result. If not passed in a new one is created. - * @returns the result - */ -function rotationTo(aUnit, bUnit, dst) { - dst = dst || new QuatType(4); - tempVec3 = tempVec3 || create$4(); - xUnitVec3 = xUnitVec3 || create$4(1, 0, 0); - yUnitVec3 = yUnitVec3 || create$4(0, 1, 0); - const dot = dot$2(aUnit, bUnit); - if (dot < -0.999999) { - cross(xUnitVec3, aUnit, tempVec3); - if (len$2(tempVec3) < 0.000001) { - cross(yUnitVec3, aUnit, tempVec3); - } - normalize$2(tempVec3, tempVec3); - fromAxisAngle(tempVec3, Math.PI, dst); - return dst; - } - else if (dot > 0.999999) { - dst[0] = 0; - dst[1] = 0; - dst[2] = 0; - dst[3] = 1; - return dst; - } - else { - cross(aUnit, bUnit, tempVec3); - dst[0] = tempVec3[0]; - dst[1] = tempVec3[1]; - dst[2] = tempVec3[2]; - dst[3] = 1 + dot; - return normalize$1(dst, dst); - } -} -let tempQuat1; -let tempQuat2; -/** - * Performs a spherical linear interpolation with two control points - * - * @param a - the first quaternion - * @param b - the second quaternion - * @param c - the third quaternion - * @param d - the fourth quaternion - * @param t - Interpolation coefficient 0 to 1 - * @returns result - */ -function sqlerp(a, b, c, d, t, dst) { - dst = dst || new QuatType(4); - tempQuat1 = tempQuat1 || new QuatType(4); - tempQuat2 = tempQuat2 || new QuatType(4); - slerp(a, d, t, tempQuat1); - slerp(b, c, t, tempQuat2); - slerp(tempQuat1, tempQuat2, 2 * t * (1 - t), dst); - return dst; -} - -var quatImpl = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create$1, - setDefaultType: setDefaultType$2, - fromValues: fromValues$1, - set: set$1, - fromAxisAngle: fromAxisAngle, - toAxisAngle: toAxisAngle, - angle: angle, - multiply: multiply$1, - mul: mul$1, - rotateX: rotateX, - rotateY: rotateY, - rotateZ: rotateZ, - slerp: slerp, - inverse: inverse$1, - conjugate: conjugate, - fromMat: fromMat, - fromEuler: fromEuler, - copy: copy$1, - clone: clone$1, - add: add$1, - subtract: subtract$1, - sub: sub$1, - mulScalar: mulScalar$1, - scale: scale$1, - divScalar: divScalar$1, - dot: dot$1, - lerp: lerp$1, - length: length$1, - len: len$1, - lengthSq: lengthSq$1, - lenSq: lenSq$1, - normalize: normalize$1, - equalsApproximately: equalsApproximately$1, - equals: equals$1, - identity: identity, - rotationTo: rotationTo, - sqlerp: sqlerp -}); - -/* - * Copyright 2022 Gregg Tavares - * - * 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. - */ -/** - * - * Vec4 math functions. - * - * Almost all functions take an optional `dst` argument. If it is not passed in the - * functions will create a new `Vec4`. In other words you can do this - * - * const v = vec4.cross(v1, v2); // Creates a new Vec4 with the cross product of v1 x v2. - * - * or - * - * const v = vec4.create(); - * vec4.cross(v1, v2, v); // Puts the cross product of v1 x v2 in v - * - * The first style is often easier but depending on where it's used it generates garbage where - * as there is almost never allocation with the second style. - * - * It is always safe to pass any vector as the destination. So for example - * - * vec4.cross(v1, v2, v1); // Puts the cross product of v1 x v2 in v1 - * - */ -let VecType = Float32Array; -/** - * Sets the type this library creates for a Vec4 - * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array` - * @returns previous constructor for Vec4 - */ -function setDefaultType$1(ctor) { - const oldType = VecType; - VecType = ctor; - return oldType; -} -/** - * Creates a vec4; may be called with x, y, z to set initial values. - * @param x - Initial x value. - * @param y - Initial y value. - * @param z - Initial z value. - * @param w - Initial w value. - * @returns the created vector - */ -function create(x, y, z, w) { - const dst = new VecType(4); - if (x !== undefined) { - dst[0] = x; - if (y !== undefined) { - dst[1] = y; - if (z !== undefined) { - dst[2] = z; - if (w !== undefined) { - dst[3] = w; - } - } - } - } - return dst; -} - -/* - * Copyright 2022 Gregg Tavares - * - * 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. - */ -/** - * Creates a vec4; may be called with x, y, z to set initial values. (same as create) - * @param x - Initial x value. - * @param y - Initial y value. - * @param z - Initial z value. - * @param z - Initial w value. - * @returns the created vector - */ -const fromValues = create; -/** - * Sets the values of a Vec4 - * Also see {@link vec4.create} and {@link vec4.copy} - * - * @param x first value - * @param y second value - * @param z third value - * @param w fourth value - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector with its elements set. - */ -function set(x, y, z, w, dst) { - dst = dst || new VecType(4); - dst[0] = x; - dst[1] = y; - dst[2] = z; - dst[3] = w; - return dst; -} -/** - * Applies Math.ceil to each element of vector - * @param v - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the ceil of each element of v. - */ -function ceil(v, dst) { - dst = dst || new VecType(4); - dst[0] = Math.ceil(v[0]); - dst[1] = Math.ceil(v[1]); - dst[2] = Math.ceil(v[2]); - dst[3] = Math.ceil(v[3]); - return dst; -} -/** - * Applies Math.floor to each element of vector - * @param v - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the floor of each element of v. - */ -function floor(v, dst) { - dst = dst || new VecType(4); - dst[0] = Math.floor(v[0]); - dst[1] = Math.floor(v[1]); - dst[2] = Math.floor(v[2]); - dst[3] = Math.floor(v[3]); - return dst; -} -/** - * Applies Math.round to each element of vector - * @param v - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the round of each element of v. - */ -function round(v, dst) { - dst = dst || new VecType(4); - dst[0] = Math.round(v[0]); - dst[1] = Math.round(v[1]); - dst[2] = Math.round(v[2]); - dst[3] = Math.round(v[3]); - return dst; -} -/** - * Clamp each element of vector between min and max - * @param v - Operand vector. - * @param max - Min value, default 0 - * @param min - Max value, default 1 - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that the clamped value of each element of v. - */ -function clamp(v, min = 0, max = 1, dst) { - dst = dst || new VecType(4); - dst[0] = Math.min(max, Math.max(min, v[0])); - dst[1] = Math.min(max, Math.max(min, v[1])); - dst[2] = Math.min(max, Math.max(min, v[2])); - dst[3] = Math.min(max, Math.max(min, v[3])); - return dst; -} -/** - * Adds two vectors; assumes a and b have the same dimension. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the sum of a and b. - */ -function add(a, b, dst) { - dst = dst || new VecType(4); - dst[0] = a[0] + b[0]; - dst[1] = a[1] + b[1]; - dst[2] = a[2] + b[2]; - dst[3] = a[3] + b[3]; - return dst; -} -/** - * Adds two vectors, scaling the 2nd; assumes a and b have the same dimension. - * @param a - Operand vector. - * @param b - Operand vector. - * @param scale - Amount to scale b - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the sum of a + b * scale. - */ -function addScaled(a, b, scale, dst) { - dst = dst || new VecType(4); - dst[0] = a[0] + b[0] * scale; - dst[1] = a[1] + b[1] * scale; - dst[2] = a[2] + b[2] * scale; - dst[3] = a[3] + b[3] * scale; - return dst; -} -/** - * Subtracts two vectors. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the difference of a and b. - */ -function subtract(a, b, dst) { - dst = dst || new VecType(4); - dst[0] = a[0] - b[0]; - dst[1] = a[1] - b[1]; - dst[2] = a[2] - b[2]; - dst[3] = a[3] - b[3]; - return dst; -} -/** - * Subtracts two vectors. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A vector that is the difference of a and b. - */ -const sub = subtract; -/** - * Check if 2 vectors are approximately equal - * @param a - Operand vector. - * @param b - Operand vector. - * @returns true if vectors are approximately equal - */ -function equalsApproximately(a, b) { - return Math.abs(a[0] - b[0]) < EPSILON && - Math.abs(a[1] - b[1]) < EPSILON && - Math.abs(a[2] - b[2]) < EPSILON && - Math.abs(a[3] - b[3]) < EPSILON; -} -/** - * Check if 2 vectors are exactly equal - * @param a - Operand vector. - * @param b - Operand vector. - * @returns true if vectors are exactly equal - */ -function equals(a, b) { - return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3]; -} -/** - * Performs linear interpolation on two vectors. - * Given vectors a and b and interpolation coefficient t, returns - * a + t * (b - a). - * @param a - Operand vector. - * @param b - Operand vector. - * @param t - Interpolation coefficient. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The linear interpolated result. - */ -function lerp(a, b, t, dst) { - dst = dst || new VecType(4); - dst[0] = a[0] + t * (b[0] - a[0]); - dst[1] = a[1] + t * (b[1] - a[1]); - dst[2] = a[2] + t * (b[2] - a[2]); - dst[3] = a[3] + t * (b[3] - a[3]); - return dst; -} -/** - * Performs linear interpolation on two vectors. - * Given vectors a and b and interpolation coefficient vector t, returns - * a + t * (b - a). - * @param a - Operand vector. - * @param b - Operand vector. - * @param t - Interpolation coefficients vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns the linear interpolated result. - */ -function lerpV(a, b, t, dst) { - dst = dst || new VecType(4); - dst[0] = a[0] + t[0] * (b[0] - a[0]); - dst[1] = a[1] + t[1] * (b[1] - a[1]); - dst[2] = a[2] + t[2] * (b[2] - a[2]); - dst[3] = a[3] + t[3] * (b[3] - a[3]); - return dst; -} -/** - * Return max values of two vectors. - * Given vectors a and b returns - * [max(a[0], b[0]), max(a[1], b[1]), max(a[2], b[2])]. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The max components vector. - */ -function max(a, b, dst) { - dst = dst || new VecType(4); - dst[0] = Math.max(a[0], b[0]); - dst[1] = Math.max(a[1], b[1]); - dst[2] = Math.max(a[2], b[2]); - dst[3] = Math.max(a[3], b[3]); - return dst; -} -/** - * Return min values of two vectors. - * Given vectors a and b returns - * [min(a[0], b[0]), min(a[1], b[1]), min(a[2], b[2])]. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The min components vector. - */ -function min(a, b, dst) { - dst = dst || new VecType(4); - dst[0] = Math.min(a[0], b[0]); - dst[1] = Math.min(a[1], b[1]); - dst[2] = Math.min(a[2], b[2]); - dst[3] = Math.min(a[3], b[3]); - return dst; -} -/** - * Multiplies a vector by a scalar. - * @param v - The vector. - * @param k - The scalar. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The scaled vector. - */ -function mulScalar(v, k, dst) { - dst = dst || new VecType(4); - dst[0] = v[0] * k; - dst[1] = v[1] * k; - dst[2] = v[2] * k; - dst[3] = v[3] * k; - return dst; -} -/** - * Multiplies a vector by a scalar. (same as mulScalar) - * @param v - The vector. - * @param k - The scalar. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The scaled vector. - */ -const scale = mulScalar; -/** - * Divides a vector by a scalar. - * @param v - The vector. - * @param k - The scalar. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The scaled vector. - */ -function divScalar(v, k, dst) { - dst = dst || new VecType(4); - dst[0] = v[0] / k; - dst[1] = v[1] / k; - dst[2] = v[2] / k; - dst[3] = v[3] / k; - return dst; -} -/** - * Inverse a vector. - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The inverted vector. - */ -function inverse(v, dst) { - dst = dst || new VecType(4); - dst[0] = 1 / v[0]; - dst[1] = 1 / v[1]; - dst[2] = 1 / v[2]; - dst[3] = 1 / v[3]; - return dst; -} -/** - * Invert a vector. (same as inverse) - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The inverted vector. - */ -const invert = inverse; -/** - * Computes the dot product of two vectors - * @param a - Operand vector. - * @param b - Operand vector. - * @returns dot product - */ -function dot(a, b) { - return (a[0] * b[0]) + (a[1] * b[1]) + (a[2] * b[2]) + (a[3] * b[3]); -} -/** - * Computes the length of vector - * @param v - vector. - * @returns length of vector. - */ -function length(v) { - const v0 = v[0]; - const v1 = v[1]; - const v2 = v[2]; - const v3 = v[3]; - return Math.sqrt(v0 * v0 + v1 * v1 + v2 * v2 + v3 * v3); -} -/** - * Computes the length of vector (same as length) - * @param v - vector. - * @returns length of vector. - */ -const len = length; -/** - * Computes the square of the length of vector - * @param v - vector. - * @returns square of the length of vector. - */ -function lengthSq(v) { - const v0 = v[0]; - const v1 = v[1]; - const v2 = v[2]; - const v3 = v[3]; - return v0 * v0 + v1 * v1 + v2 * v2 + v3 * v3; -} -/** - * Computes the square of the length of vector (same as lengthSq) - * @param v - vector. - * @returns square of the length of vector. - */ -const lenSq = lengthSq; -/** - * Computes the distance between 2 points - * @param a - vector. - * @param b - vector. - * @returns distance between a and b - */ -function distance(a, b) { - const dx = a[0] - b[0]; - const dy = a[1] - b[1]; - const dz = a[2] - b[2]; - const dw = a[3] - b[3]; - return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw); -} -/** - * Computes the distance between 2 points (same as distance) - * @param a - vector. - * @param b - vector. - * @returns distance between a and b - */ -const dist = distance; -/** - * Computes the square of the distance between 2 points - * @param a - vector. - * @param b - vector. - * @returns square of the distance between a and b - */ -function distanceSq(a, b) { - const dx = a[0] - b[0]; - const dy = a[1] - b[1]; - const dz = a[2] - b[2]; - const dw = a[3] - b[3]; - return dx * dx + dy * dy + dz * dz + dw * dw; -} -/** - * Computes the square of the distance between 2 points (same as distanceSq) - * @param a - vector. - * @param b - vector. - * @returns square of the distance between a and b - */ -const distSq = distanceSq; -/** - * Divides a vector by its Euclidean length and returns the quotient. - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The normalized vector. - */ -function normalize(v, dst) { - dst = dst || new VecType(4); - const v0 = v[0]; - const v1 = v[1]; - const v2 = v[2]; - const v3 = v[3]; - const len = Math.sqrt(v0 * v0 + v1 * v1 + v2 * v2 + v3 * v3); - if (len > 0.00001) { - dst[0] = v0 / len; - dst[1] = v1 / len; - dst[2] = v2 / len; - dst[3] = v3 / len; - } - else { - dst[0] = 0; - dst[1] = 0; - dst[2] = 0; - dst[3] = 0; - } - return dst; -} -/** - * Negates a vector. - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns -v. - */ -function negate(v, dst) { - dst = dst || new VecType(4); - dst[0] = -v[0]; - dst[1] = -v[1]; - dst[2] = -v[2]; - dst[3] = -v[3]; - return dst; -} -/** - * Copies a vector. (same as {@link vec4.clone}) - * Also see {@link vec4.create} and {@link vec4.set} - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A copy of v. - */ -function copy(v, dst) { - dst = dst || new VecType(4); - dst[0] = v[0]; - dst[1] = v[1]; - dst[2] = v[2]; - dst[3] = v[3]; - return dst; -} -/** - * Clones a vector. (same as {@link vec4.copy}) - * Also see {@link vec4.create} and {@link vec4.set} - * @param v - The vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns A copy of v. - */ -const clone = copy; -/** - * Multiplies a vector by another vector (component-wise); assumes a and - * b have the same length. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of products of entries of a and b. - */ -function multiply(a, b, dst) { - dst = dst || new VecType(4); - dst[0] = a[0] * b[0]; - dst[1] = a[1] * b[1]; - dst[2] = a[2] * b[2]; - dst[3] = a[3] * b[3]; - return dst; -} -/** - * Multiplies a vector by another vector (component-wise); assumes a and - * b have the same length. (same as mul) - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of products of entries of a and b. - */ -const mul = multiply; -/** - * Divides a vector by another vector (component-wise); assumes a and - * b have the same length. - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of quotients of entries of a and b. - */ -function divide(a, b, dst) { - dst = dst || new VecType(4); - dst[0] = a[0] / b[0]; - dst[1] = a[1] / b[1]; - dst[2] = a[2] / b[2]; - dst[3] = a[3] / b[3]; - return dst; -} -/** - * Divides a vector by another vector (component-wise); assumes a and - * b have the same length. (same as divide) - * @param a - Operand vector. - * @param b - Operand vector. - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The vector of quotients of entries of a and b. - */ -const div = divide; -/** - * Zero's a vector - * @param dst - vector to hold result. If not passed in a new one is created. - * @returns The zeroed vector. - */ -function zero(dst) { - dst = dst || new VecType(4); - dst[0] = 0; - dst[1] = 0; - dst[2] = 0; - dst[3] = 0; - return dst; -} -/** - * transform vec4 by 4x4 matrix - * @param v - the vector - * @param m - The matrix. - * @param dst - optional vec4 to store result. If not passed a new one is created. - * @returns the transformed vector - */ -function transformMat4(v, m, dst) { - dst = dst || new VecType(4); - const x = v[0]; - const y = v[1]; - const z = v[2]; - const w = v[3]; - dst[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w; - dst[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w; - dst[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w; - dst[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w; - return dst; -} - -var vec4Impl = /*#__PURE__*/Object.freeze({ - __proto__: null, - create: create, - setDefaultType: setDefaultType$1, - fromValues: fromValues, - set: set, - ceil: ceil, - floor: floor, - round: round, - clamp: clamp, - add: add, - addScaled: addScaled, - subtract: subtract, - sub: sub, - equalsApproximately: equalsApproximately, - equals: equals, - lerp: lerp, - lerpV: lerpV, - max: max, - min: min, - mulScalar: mulScalar, - scale: scale, - divScalar: divScalar, - inverse: inverse, - invert: invert, - dot: dot, - length: length, - len: len, - lengthSq: lengthSq, - lenSq: lenSq, - distance: distance, - dist: dist, - distanceSq: distanceSq, - distSq: distSq, - normalize: normalize, - negate: negate, - copy: copy, - clone: clone, - multiply: multiply, - mul: mul, - divide: divide, - div: div, - zero: zero, - transformMat4: transformMat4 -}); - -/** - * Sets the type this library creates for all types - * - * example: - * - * ``` - * setDefaultType(Float64Array); - * ``` - * - * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array` - */ -function setDefaultType(ctor) { - setDefaultType$4(ctor); - setDefaultType$3(ctor); - setDefaultType$2(ctor); - setDefaultType$6(ctor); - setDefaultType$5(ctor); - setDefaultType$1(ctor); -} - -export { mat3Impl as mat3, mat4Impl as mat4, quatImpl as quat, setDefaultType, utils, vec2Impl as vec2, vec3Impl as vec3, vec4Impl as vec4 }; -//# sourceMappingURL=wgpu-matrix.module.js.map diff --git a/dist/2.x/wgpu-matrix.module.js.map b/dist/2.x/wgpu-matrix.module.js.map deleted file mode 100644 index 3f13f8a..0000000 --- a/dist/2.x/wgpu-matrix.module.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"wgpu-matrix.module.js","sources":["../../../src/utils.ts","../../../src/vec2.ts","../../../src/vec3.ts","../../../src/vec2-impl.ts","../../../src/mat3-impl.ts","../../../src/vec3-impl.ts","../../../src/mat4-impl.ts","../../../src/quat.ts","../../../src/quat-impl.ts","../../../src/vec4.ts","../../../src/vec4-impl.ts","../../../src/wgpu-matrix.ts"],"sourcesContent":["/*\n * Copyright 2022 Gregg Tavares\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n */\n\nexport let EPSILON = 0.000001;\n\n/**\n * Set the value for EPSILON for various checks\n * @param v - Value to use for EPSILON.\n * @returns previous value of EPSILON;\n */\nexport function setEpsilon(v: number): number {\n const old = EPSILON;\n EPSILON = v;\n return old;\n}\n\n/**\n * Convert degrees to radians\n * @param degrees - Angle in degrees\n * @returns angle converted to radians\n */\nexport function degToRad(degrees: number): number {\n return degrees * Math.PI / 180;\n}\n\n/**\n * Convert radians to degrees\n * @param radians - Angle in radians\n * @returns angle converted to degrees\n */\nexport function radToDeg(radians: number): number {\n return radians * 180 / Math.PI;\n}\n\n/**\n * Lerps between a and b via t\n * @param a - starting value\n * @param b - ending value\n * @param t - value where 0 = a and 1 = b\n * @returns a + (b - a) * t\n */\nexport function lerp(a: number, b: number, t: number): number {\n return a + (b - a) * t;\n}\n\n/**\n * Compute the opposite of lerp. Given a and b and a value between\n * a and b returns a value between 0 and 1. 0 if a, 1 if b.\n * Note: no clamping is done.\n * @param a - start value\n * @param b - end value\n * @param v - value between a and b\n * @returns (v - a) / (b - a)\n */\nexport function inverseLerp(a: number, b: number, v: number): number {\n const d = b - a;\n return (Math.abs(b - a) < EPSILON)\n ? a\n : (v - a) / d;\n}\n\n/**\n * Compute the euclidean modulo\n *\n * ```\n * // table for n / 3\n * -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5 <- n\n * ------------------------------------\n * -2 -1 -0 -2 -1 0, 1, 2, 0, 1, 2 <- n % 3\n * 1 2 0 1 2 0, 1, 2, 0, 1, 2 <- euclideanModule(n, 3)\n * ```\n *\n * @param n - dividend\n * @param m - divisor\n * @returns the euclidean modulo of n / m\n */\nexport function euclideanModulo(n: number, m: number) {\n return ((n % m) + m) % m;\n}","/*\n * Copyright 2022 Gregg Tavares\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n */\n\n/**\n * A JavaScript array with 2 values, Float32Array with 2 values, or a Float64Array with 2 values.\n * When created by the library will create the default type which is `Float32Array`\n * but can be set by calling {@link vec2.setDefaultType}.\n */\nexport type Vec2 = number[] | Float32Array | Float64Array;\n\n/**\n *\n * Vec2 math functions.\n *\n * Almost all functions take an optional `dst` argument. If it is not passed in the\n * functions will create a new Vec2. In other words you can do this\n *\n * const v = vec2.cross(v1, v2); // Creates a new Vec2 with the cross product of v1 x v2.\n *\n * or\n *\n * const v = vec2.create();\n * vec2.cross(v1, v2, v); // Puts the cross product of v1 x v2 in v\n *\n * The first style is often easier but depending on where it's used it generates garbage where\n * as there is almost never allocation with the second style.\n *\n * It is always safe to pass any vector as the destination. So for example\n *\n * vec2.cross(v1, v2, v1); // Puts the cross product of v1 x v2 in v1\n *\n */\n\nexport let VecType: new (n: number) => Vec2 = Float32Array;\n\n/**\n * Sets the type this library creates for a Vec2\n * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array`\n * @returns previous constructor for Vec2\n */\nexport function setDefaultType(ctor: new (n: number) => Vec2) {\n const oldType = VecType;\n VecType = ctor;\n return oldType;\n}\n\n/**\n * Creates a Vec2; may be called with x, y, z to set initial values.\n *\n * Note: Since passing in a raw JavaScript array\n * is valid in all circumstances, if you want to\n * force a JavaScript array into a Vec2's specified type\n * it would be faster to use\n *\n * ```\n * const v = vec2.clone(someJSArray);\n * ```\n *\n * Note: a consequence of the implementation is if your Vec2Type = `Array`\n * instead of `Float32Array` or `Float64Array` then any values you\n * don't pass in will be undefined. Usually this is not an issue since\n * (a) using `Array` is rare and (b) using `vec2.create` is usually used\n * to create a Vec2 to be filled out as in\n *\n * ```\n * const sum = vec2.create();\n * vec2.add(v1, v2, sum);\n * ```\n *\n * @param x - Initial x value.\n * @param y - Initial y value.\n * @returns the created vector\n */\nexport function create(x = 0, y = 0): Vec2 {\n const dst = new VecType(2);\n if (x !== undefined) {\n dst[0] = x;\n if (y !== undefined) {\n dst[1] = y;\n }\n }\n return dst;\n}\n","/*\n * Copyright 2022 Gregg Tavares\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n */\n\n/**\n * A JavaScript array with 3 values, Float32Array with 3 values, or a Float64Array with 3 values.\n * When created by the library will create the default type which is `Float32Array`\n * but can be set by calling {@link vec3.setDefaultType}.\n */\nexport type Vec3 = number[] | Float32Array | Float64Array;\n\n/**\n *\n * Vec3 math functions.\n *\n * Almost all functions take an optional `dst` argument. If it is not passed in the\n * functions will create a new `Vec3`. In other words you can do this\n *\n * const v = vec3.cross(v1, v2); // Creates a new Vec3 with the cross product of v1 x v2.\n *\n * or\n *\n * const v = vec3.create();\n * vec3.cross(v1, v2, v); // Puts the cross product of v1 x v2 in v\n *\n * The first style is often easier but depending on where it's used it generates garbage where\n * as there is almost never allocation with the second style.\n *\n * It is always safe to pass any vector as the destination. So for example\n *\n * vec3.cross(v1, v2, v1); // Puts the cross product of v1 x v2 in v1\n *\n */\n\nexport let VecType: new (n: number) => Vec3 = Float32Array;\n\n/**\n * Sets the type this library creates for a Vec3\n * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array`\n * @returns previous constructor for Vec3\n */\nexport function setDefaultType(ctor: new (n: number) => Vec3) {\n const oldType = VecType;\n VecType = ctor;\n return oldType;\n}\n\n/**\n * Creates a vec3; may be called with x, y, z to set initial values.\n * @param x - Initial x value.\n * @param y - Initial y value.\n * @param z - Initial z value.\n * @returns the created vector\n */\nexport function create(x?: number, y?: number, z?: number): Vec3 {\n const dst = new VecType(3);\n if (x !== undefined) {\n dst[0] = x;\n if (y !== undefined) {\n dst[1] = y;\n if (z !== undefined) {\n dst[2] = z;\n }\n }\n }\n return dst;\n}","/*\n * Copyright 2022 Gregg Tavares\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n */\nimport * as utils from './utils.js';\nimport { Mat3 } from './mat3';\nimport { Mat4 } from './mat4';\nimport { Vec2, create, setDefaultType, VecType } from './vec2';\nimport { Vec3, VecType as Vec3Type } from './vec3';\n\nexport default Vec2;\nexport { create, setDefaultType };\n\n/**\n * Creates a Vec2; may be called with x, y, z to set initial values. (same as create)\n * @param x - Initial x value.\n * @param y - Initial y value.\n * @returns the created vector\n */\nexport const fromValues = create;\n\n/**\n * Sets the values of a Vec2\n * Also see {@link vec2.create} and {@link vec2.copy}\n *\n * @param x first value\n * @param y second value\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector with its elements set.\n */\nexport function set(x: number, y: number, dst?: Vec2) {\n dst = dst || new VecType(2);\n\n dst[0] = x;\n dst[1] = y;\n\n return dst;\n}\n\n/**\n * Applies Math.ceil to each element of vector\n * @param v - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the ceil of each element of v.\n */\nexport function ceil(v: Vec2, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = Math.ceil(v[0]);\n dst[1] = Math.ceil(v[1]);\n\n return dst;\n}\n\n/**\n * Applies Math.floor to each element of vector\n * @param v - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the floor of each element of v.\n */\nexport function floor(v: Vec2, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = Math.floor(v[0]);\n dst[1] = Math.floor(v[1]);\n\n return dst;\n}\n\n/**\n * Applies Math.round to each element of vector\n * @param v - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the round of each element of v.\n */\nexport function round(v: Vec2, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = Math.round(v[0]);\n dst[1] = Math.round(v[1]);\n\n return dst;\n}\n\n/**\n * Clamp each element of vector between min and max\n * @param v - Operand vector.\n * @param max - Min value, default 0\n * @param min - Max value, default 1\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that the clamped value of each element of v.\n */\nexport function clamp(v: Vec2, min = 0, max = 1, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = Math.min(max, Math.max(min, v[0]));\n dst[1] = Math.min(max, Math.max(min, v[1]));\n\n return dst;\n}\n\n/**\n * Adds two vectors; assumes a and b have the same dimension.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the sum of a and b.\n */\nexport function add(a: Vec2, b: Vec2, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = a[0] + b[0];\n dst[1] = a[1] + b[1];\n\n return dst;\n}\n\n/**\n * Adds two vectors, scaling the 2nd; assumes a and b have the same dimension.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param scale - Amount to scale b\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the sum of a + b * scale.\n */\nexport function addScaled(a: Vec2, b: Vec2, scale: number, dst?: Vec2) {\n dst = dst || new VecType(2);\n\n dst[0] = a[0] + b[0] * scale;\n dst[1] = a[1] + b[1] * scale;\n\n return dst;\n}\n\n/**\n * Returns the angle in radians between two vectors.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @returns The angle in radians between the 2 vectors.\n */\nexport function angle(a: Vec2, b: Vec2): number {\n const ax = a[0];\n const ay = a[1];\n const bx = a[0];\n const by = a[1];\n const mag1 = Math.sqrt(ax * ax + ay * ay);\n const mag2 = Math.sqrt(bx * bx + by * by);\n const mag = mag1 * mag2;\n const cosine = mag && dot(a, b) / mag;\n return Math.acos(cosine);\n}\n\n/**\n * Subtracts two vectors.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the difference of a and b.\n */\nexport function subtract(a: Vec2, b: Vec2, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = a[0] - b[0];\n dst[1] = a[1] - b[1];\n\n return dst;\n}\n\n/**\n * Subtracts two vectors.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the difference of a and b.\n */\nexport const sub = subtract;\n\n/**\n * Check if 2 vectors are approximately equal\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @returns true if vectors are approximately equal\n */\nexport function equalsApproximately(a: Vec2, b: Vec2): boolean {\n return Math.abs(a[0] - b[0]) < utils.EPSILON &&\n Math.abs(a[1] - b[1]) < utils.EPSILON;\n}\n\n/**\n * Check if 2 vectors are exactly equal\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @returns true if vectors are exactly equal\n */\nexport function equals(a: Vec2, b: Vec2): boolean {\n return a[0] === b[0] && a[1] === b[1];\n}\n\n/**\n * Performs linear interpolation on two vectors.\n * Given vectors a and b and interpolation coefficient t, returns\n * a + t * (b - a).\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param t - Interpolation coefficient.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The linear interpolated result.\n */\nexport function lerp(a: Vec2, b: Vec2, t: number, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = a[0] + t * (b[0] - a[0]);\n dst[1] = a[1] + t * (b[1] - a[1]);\n\n return dst;\n}\n\n/**\n * Performs linear interpolation on two vectors.\n * Given vectors a and b and interpolation coefficient vector t, returns\n * a + t * (b - a).\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param t - Interpolation coefficients vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns the linear interpolated result.\n */\nexport function lerpV(a: Vec2, b: Vec2, t: Vec2, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = a[0] + t[0] * (b[0] - a[0]);\n dst[1] = a[1] + t[1] * (b[1] - a[1]);\n\n return dst;\n}\n\n/**\n * Return max values of two vectors.\n * Given vectors a and b returns\n * [max(a[0], b[0]), max(a[1], b[1]), max(a[2], b[2])].\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The max components vector.\n */\nexport function max(a: Vec2, b: Vec2, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = Math.max(a[0], b[0]);\n dst[1] = Math.max(a[1], b[1]);\n\n return dst;\n}\n\n/**\n * Return min values of two vectors.\n * Given vectors a and b returns\n * [min(a[0], b[0]), min(a[1], b[1]), min(a[2], b[2])].\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The min components vector.\n */\nexport function min(a: Vec2, b: Vec2, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = Math.min(a[0], b[0]);\n dst[1] = Math.min(a[1], b[1]);\n\n return dst;\n}\n\n/**\n * Multiplies a vector by a scalar.\n * @param v - The vector.\n * @param k - The scalar.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The scaled vector.\n */\nexport function mulScalar(v: Vec2, k: number, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = v[0] * k;\n dst[1] = v[1] * k;\n\n return dst;\n}\n\n/**\n * Multiplies a vector by a scalar. (same as mulScalar)\n * @param v - The vector.\n * @param k - The scalar.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The scaled vector.\n */\nexport const scale = mulScalar;\n\n/**\n * Divides a vector by a scalar.\n * @param v - The vector.\n * @param k - The scalar.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The scaled vector.\n */\nexport function divScalar(v: Vec2, k: number, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = v[0] / k;\n dst[1] = v[1] / k;\n\n return dst;\n}\n\n/**\n * Inverse a vector.\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The inverted vector.\n */\nexport function inverse(v: Vec2, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = 1 / v[0];\n dst[1] = 1 / v[1];\n\n return dst;\n}\n\n/**\n * Invert a vector. (same as inverse)\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The inverted vector.\n */\nexport const invert = inverse;\n\n/**\n * Computes the cross product of two vectors; assumes both vectors have\n * three entries.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The vector of a cross b.\n */\nexport function cross(a: Vec2, b: Vec2, dst?: Vec3): Vec3 {\n dst = dst || new Vec3Type(3);\n const z = a[0] * b[1] - a[1] * b[0];\n dst[0] = 0;\n dst[1] = 0;\n dst[2] = z;\n\n return dst;\n}\n\n/**\n * Computes the dot product of two vectors; assumes both vectors have\n * three entries.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @returns dot product\n */\nexport function dot(a: Vec2, b: Vec2): number {\n return a[0] * b[0] + a[1] * b[1];\n}\n\n/**\n * Computes the length of vector\n * @param v - vector.\n * @returns length of vector.\n */\nexport function length(v: Vec2): number {\n const v0 = v[0];\n const v1 = v[1];\n return Math.sqrt(v0 * v0 + v1 * v1);\n}\n\n/**\n * Computes the length of vector (same as length)\n * @param v - vector.\n * @returns length of vector.\n */\nexport const len = length;\n\n/**\n * Computes the square of the length of vector\n * @param v - vector.\n * @returns square of the length of vector.\n */\nexport function lengthSq(v: Vec2): number {\n const v0 = v[0];\n const v1 = v[1];\n return v0 * v0 + v1 * v1;\n}\n\n/**\n * Computes the square of the length of vector (same as lengthSq)\n * @param v - vector.\n * @returns square of the length of vector.\n */\nexport const lenSq = lengthSq;\n\n/**\n * Computes the distance between 2 points\n * @param a - vector.\n * @param b - vector.\n * @returns distance between a and b\n */\nexport function distance(a: Vec2, b: Vec2): number {\n const dx = a[0] - b[0];\n const dy = a[1] - b[1];\n return Math.sqrt(dx * dx + dy * dy);\n}\n\n/**\n * Computes the distance between 2 points (same as distance)\n * @param a - vector.\n * @param b - vector.\n * @returns distance between a and b\n */\nexport const dist = distance;\n\n/**\n * Computes the square of the distance between 2 points\n * @param a - vector.\n * @param b - vector.\n * @returns square of the distance between a and b\n */\nexport function distanceSq(a: Vec2, b: Vec2): number {\n const dx = a[0] - b[0];\n const dy = a[1] - b[1];\n return dx * dx + dy * dy;\n}\n\n/**\n * Computes the square of the distance between 2 points (same as distanceSq)\n * @param a - vector.\n * @param b - vector.\n * @returns square of the distance between a and b\n */\nexport const distSq = distanceSq;\n\n/**\n * Divides a vector by its Euclidean length and returns the quotient.\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The normalized vector.\n */\nexport function normalize(v: Vec2, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n const v0 = v[0];\n const v1 = v[1];\n const len = Math.sqrt(v0 * v0 + v1 * v1);\n\n if (len > 0.00001) {\n dst[0] = v0 / len;\n dst[1] = v1 / len;\n } else {\n dst[0] = 0;\n dst[1] = 0;\n }\n\n return dst;\n}\n\n/**\n * Negates a vector.\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns -v.\n */\nexport function negate(v: Vec2, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = -v[0];\n dst[1] = -v[1];\n\n return dst;\n}\n\n/**\n * Copies a vector. (same as {@link vec2.clone})\n * Also see {@link vec2.create} and {@link vec2.set}\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A copy of v.\n */\nexport function copy(v: Vec2, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = v[0];\n dst[1] = v[1];\n\n return dst;\n}\n\n/**\n * Clones a vector. (same as {@link vec2.copy})\n * Also see {@link vec2.create} and {@link vec2.set}\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A copy of v.\n */\nexport const clone = copy;\n\n/**\n * Multiplies a vector by another vector (component-wise); assumes a and\n * b have the same length.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The vector of products of entries of a and b.\n */\nexport function multiply(a: Vec2, b: Vec2, dst?: Vec2) {\n dst = dst || new VecType(2);\n\n dst[0] = a[0] * b[0];\n dst[1] = a[1] * b[1];\n\n return dst;\n}\n\n/**\n * Multiplies a vector by another vector (component-wise); assumes a and\n * b have the same length. (same as mul)\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The vector of products of entries of a and b.\n */\nexport const mul = multiply;\n\n/**\n * Divides a vector by another vector (component-wise); assumes a and\n * b have the same length.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The vector of quotients of entries of a and b.\n */\nexport function divide(a: Vec2, b: Vec2, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = a[0] / b[0];\n dst[1] = a[1] / b[1];\n\n return dst;\n}\n\n/**\n * Divides a vector by another vector (component-wise); assumes a and\n * b have the same length. (same as divide)\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The vector of quotients of entries of a and b.\n */\nexport const div = divide;\n\n/**\n * Creates a random unit vector * scale\n * @param scale - Default 1\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The random vector.\n */\nexport function random(scale = 1, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n const angle = Math.random() * 2 * Math.PI;\n dst[0] = Math.cos(angle) * scale;\n dst[1] = Math.sin(angle) * scale;\n\n return dst;\n}\n\n/**\n * Zero's a vector\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The zeroed vector.\n */\nexport function zero(dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n dst[0] = 0;\n dst[1] = 0;\n\n return dst;\n}\n\n\n/**\n * transform Vec2 by 4x4 matrix\n * @param v - the vector\n * @param m - The matrix.\n * @param dst - optional Vec2 to store result. If not passed a new one is created.\n * @returns the transformed vector\n */\nexport function transformMat4(v: Vec2, m: Mat4, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n const x = v[0];\n const y = v[1];\n\n dst[0] = x * m[0] + y * m[4] + m[12];\n dst[1] = x * m[1] + y * m[5] + m[13];\n\n return dst;\n}\n\n/**\n * Transforms vec4 by 3x3 matrix\n *\n * @param v - the vector\n * @param m - The matrix.\n * @param dst - optional Vec2 to store result. If not passed a new one is created.\n * @returns the transformed vector\n */\nexport function transformMat3(v: Vec2, m: Mat3, dst?: Vec2): Vec2 {\n dst = dst || new VecType(2);\n\n const x = v[0];\n const y = v[1];\n\n dst[0] = m[0] * x + m[4] * y + m[8];\n dst[1] = m[1] * x + m[5] * y + m[9];\n\n return dst;\n}\n\n","/*\n * Copyright 2022 Gregg Tavares\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n */\n\nimport * as utils from './utils.js';\nimport { Quat } from './quat';\nimport { Mat3 } from './mat3';\nimport { Mat4 } from './mat4';\nimport Vec2, * as vec2 from './vec2-impl';\n\nexport default Mat3;\n\nexport type Mat3LikeCtor = new (n: number) => Mat3;\n\n/**\n * 3x3 Matrix math math functions.\n *\n * Almost all functions take an optional `dst` argument. If it is not passed in the\n * functions will create a new matrix. In other words you can do this\n *\n * const mat = mat3.translation([1, 2, 3]); // Creates a new translation matrix\n *\n * or\n *\n * const mat = mat3.create();\n * mat3.translation([1, 2, 3], mat); // Puts translation matrix in mat.\n *\n * The first style is often easier but depending on where it's used it generates garbage where\n * as there is almost never allocation with the second style.\n *\n * It is always save to pass any matrix as the destination. So for example\n *\n * const mat = mat3.identity();\n * const trans = mat3.translation([1, 2, 3]);\n * mat3.multiply(mat, trans, mat); // Multiplies mat * trans and puts result in mat.\n *\n */\nlet MatType: Mat3LikeCtor = Float32Array;\n\n// This mess is because with Mat3 we have 3 unused elements.\n// For Float32Array and Float64Array that's not an issue\n// but for Array it's troublesome\nconst ctorMap = new Map Mat3>([\n [Float32Array, () => new Float32Array(12)],\n [Float64Array, () => new Float64Array(12)],\n [Array, () => new Array(12).fill(0)],\n]);\nlet newMat3: () => Mat3 = ctorMap.get(Float32Array)!;\n\n/**\n * Sets the type this library creates for a Mat3\n * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array`\n * @returns previous constructor for Mat3\n */\nexport function setDefaultType(ctor: new (n: number) => Mat3) {\n const oldType = MatType;\n MatType = ctor;\n newMat3 = ctorMap.get(ctor)!;\n return oldType;\n}\n\n/**\n * Create a Mat3 from values\n *\n * Note: Since passing in a raw JavaScript array\n * is valid in all circumstances, if you want to\n * force a JavaScript array into a Mat3's specified type\n * it would be faster to use\n *\n * ```\n * const m = mat3.clone(someJSArray);\n * ```\n *\n * Note: a consequence of the implementation is if your Mat3Type = `Array`\n * instead of `Float32Array` or `Float64Array` then any values you\n * don't pass in will be undefined. Usually this is not an issue since\n * (a) using `Array` is rare and (b) using `mat3.create` is usually used\n * to create a Mat3 to be filled out as in\n *\n * ```\n * const m = mat3.create();\n * mat3.perspective(fov, aspect, near, far, m);\n * ```\n *\n * @param v0 - value for element 0\n * @param v1 - value for element 1\n * @param v2 - value for element 2\n * @param v3 - value for element 3\n * @param v4 - value for element 4\n * @param v5 - value for element 5\n * @param v6 - value for element 6\n * @param v7 - value for element 7\n * @param v8 - value for element 8\n * @returns matrix created from values.\n */\nexport function create(\n v0?: number, v1?: number, v2?: number,\n v3?: number, v4?: number, v5?: number,\n v6?: number, v7?: number, v8?: number): Mat3 {\n const dst = newMat3();\n // to make the array homogenous\n dst[3] = 0;\n dst[7] = 0;\n dst[11] = 0;\n\n if (v0 !== undefined) {\n dst[0] = v0;\n if (v1 !== undefined) {\n dst[1] = v1;\n if (v2 !== undefined) {\n dst[2] = v2;\n if (v3 !== undefined) {\n dst[4] = v3;\n if (v4 !== undefined) {\n dst[5] = v4;\n if (v5 !== undefined) {\n dst[6] = v5;\n if (v6 !== undefined) {\n dst[8] = v6;\n if (v7 !== undefined) {\n dst[9] = v7;\n if (v8 !== undefined) {\n dst[10] = v8;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n return dst;\n}\n\n/**\n * Sets the values of a Mat3\n * Also see {@link mat3.create} and {@link mat3.copy}\n *\n * @param v0 - value for element 0\n * @param v1 - value for element 1\n * @param v2 - value for element 2\n * @param v3 - value for element 3\n * @param v4 - value for element 4\n * @param v5 - value for element 5\n * @param v6 - value for element 6\n * @param v7 - value for element 7\n * @param v8 - value for element 8\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns Mat3 set from values.\n */\nexport function set(\n v0: number, v1: number, v2: number,\n v3: number, v4: number, v5: number,\n v6: number, v7: number, v8: number, dst?: Mat3) {\n dst = dst || newMat3();\n\n dst[0] = v0; dst[1] = v1; dst[ 2] = v2; dst[ 3] = 0;\n dst[4] = v3; dst[5] = v4; dst[ 6] = v5; dst[ 7] = 0;\n dst[8] = v6; dst[9] = v7; dst[10] = v8; dst[11] = 0;\n\n return dst;\n}\n\n/**\n * Creates a Mat3 from the upper left 3x3 part of a Mat4\n * @param m4 - source matrix\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns Mat3 made from m4\n */\nexport function fromMat4(m4: Mat4, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n dst[0] = m4[0]; dst[1] = m4[1]; dst[ 2] = m4[ 2]; dst[ 3] = 0;\n dst[4] = m4[4]; dst[5] = m4[5]; dst[ 6] = m4[ 6]; dst[ 7] = 0;\n dst[8] = m4[8]; dst[9] = m4[9]; dst[10] = m4[10]; dst[11] = 0;\n return dst;\n}\n\n/**\n * Creates a Mat3 rotation matrix from a quaternion\n * @param q - quaternion to create matrix from\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns Mat3 made from q\n */\nexport function fromQuat(q: Quat, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n\n const x = q[0]; const y = q[1]; const z = q[2]; const w = q[3];\n const x2 = x + x; const y2 = y + y; const z2 = z + z;\n\n const xx = x * x2;\n const yx = y * x2;\n const yy = y * y2;\n const zx = z * x2;\n const zy = z * y2;\n const zz = z * z2;\n const wx = w * x2;\n const wy = w * y2;\n const wz = w * z2;\n\n dst[ 0] = 1 - yy - zz; dst[ 1] = yx + wz; dst[ 2] = zx - wy; dst[ 3] = 0;\n dst[ 4] = yx - wz; dst[ 5] = 1 - xx - zz; dst[ 6] = zy + wx; dst[ 7] = 0;\n dst[ 8] = zx + wy; dst[ 9] = zy - wx; dst[10] = 1 - xx - yy; dst[11] = 0;\n\n return dst;\n}\n\n/**\n * Negates a matrix.\n * @param m - The matrix.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns -m.\n */\nexport function negate(m: Mat3, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n\n dst[ 0] = -m[ 0]; dst[ 1] = -m[ 1]; dst[ 2] = -m[ 2];\n dst[ 4] = -m[ 4]; dst[ 5] = -m[ 5]; dst[ 6] = -m[ 6];\n dst[ 8] = -m[ 8]; dst[ 9] = -m[ 9]; dst[10] = -m[10];\n\n return dst;\n}\n\n/**\n * Copies a matrix. (same as {@link mat3.clone})\n * Also see {@link mat3.create} and {@link mat3.set}\n * @param m - The matrix.\n * @param dst - The matrix. If not passed a new one is created.\n * @returns A copy of m.\n */\nexport function copy(m: Mat3, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n\n dst[ 0] = m[ 0]; dst[ 1] = m[ 1]; dst[ 2] = m[ 2];\n dst[ 4] = m[ 4]; dst[ 5] = m[ 5]; dst[ 6] = m[ 6];\n dst[ 8] = m[ 8]; dst[ 9] = m[ 9]; dst[10] = m[10];\n\n return dst;\n}\n\n/**\n * Copies a matrix (same as {@link mat3.copy})\n * Also see {@link mat3.create} and {@link mat3.set}\n * @param m - The matrix.\n * @param dst - The matrix. If not passed a new one is created.\n * @returns A copy of m.\n */\nexport const clone = copy;\n\n/**\n * Check if 2 matrices are approximately equal\n * @param a Operand matrix.\n * @param b Operand matrix.\n * @returns true if matrices are approximately equal\n */\nexport function equalsApproximately(a: Mat3, b: Mat3): boolean {\n return Math.abs(a[ 0] - b[ 0]) < utils.EPSILON &&\n Math.abs(a[ 1] - b[ 1]) < utils.EPSILON &&\n Math.abs(a[ 2] - b[ 2]) < utils.EPSILON &&\n Math.abs(a[ 4] - b[ 4]) < utils.EPSILON &&\n Math.abs(a[ 5] - b[ 5]) < utils.EPSILON &&\n Math.abs(a[ 6] - b[ 6]) < utils.EPSILON &&\n Math.abs(a[ 8] - b[ 8]) < utils.EPSILON &&\n Math.abs(a[ 9] - b[ 9]) < utils.EPSILON &&\n Math.abs(a[10] - b[10]) < utils.EPSILON;\n}\n\n/**\n * Check if 2 matrices are exactly equal\n * @param a Operand matrix.\n * @param b Operand matrix.\n * @returns true if matrices are exactly equal\n */\nexport function equals(a: Mat3, b: Mat3): boolean {\n return a[ 0] === b[ 0] &&\n a[ 1] === b[ 1] &&\n a[ 2] === b[ 2] &&\n a[ 4] === b[ 4] &&\n a[ 5] === b[ 5] &&\n a[ 6] === b[ 6] &&\n a[ 8] === b[ 8] &&\n a[ 9] === b[ 9] &&\n a[10] === b[10];\n}\n\n/**\n * Creates a 3-by-3 identity matrix.\n *\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns A 3-by-3 identity matrix.\n */\nexport function identity(dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n\n dst[ 0] = 1; dst[ 1] = 0; dst[ 2] = 0;\n dst[ 4] = 0; dst[ 5] = 1; dst[ 6] = 0;\n dst[ 8] = 0; dst[ 9] = 0; dst[10] = 1;\n\n return dst;\n}\n\n/**\n * Takes the transpose of a matrix.\n * @param m - The matrix.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The transpose of m.\n */\nexport function transpose(m: Mat3, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n if (dst === m) {\n let t: number;\n\n // 0 1 2\n // 4 5 6\n // 8 9 10\n\n t = m[1];\n m[1] = m[4];\n m[4] = t;\n\n t = m[2];\n m[2] = m[8];\n m[8] = t;\n\n t = m[6];\n m[6] = m[9];\n m[9] = t;\n\n return dst;\n }\n\n const m00 = m[0 * 4 + 0];\n const m01 = m[0 * 4 + 1];\n const m02 = m[0 * 4 + 2];\n const m10 = m[1 * 4 + 0];\n const m11 = m[1 * 4 + 1];\n const m12 = m[1 * 4 + 2];\n const m20 = m[2 * 4 + 0];\n const m21 = m[2 * 4 + 1];\n const m22 = m[2 * 4 + 2];\n\n dst[ 0] = m00; dst[ 1] = m10; dst[ 2] = m20;\n dst[ 4] = m01; dst[ 5] = m11; dst[ 6] = m21;\n dst[ 8] = m02; dst[ 9] = m12; dst[10] = m22;\n\n return dst;\n}\n\n/**\n * Computes the inverse of a 3-by-3 matrix.\n * @param m - The matrix.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The inverse of m.\n */\nexport function inverse(m: Mat3, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n\n const m00 = m[0 * 4 + 0];\n const m01 = m[0 * 4 + 1];\n const m02 = m[0 * 4 + 2];\n const m10 = m[1 * 4 + 0];\n const m11 = m[1 * 4 + 1];\n const m12 = m[1 * 4 + 2];\n const m20 = m[2 * 4 + 0];\n const m21 = m[2 * 4 + 1];\n const m22 = m[2 * 4 + 2];\n\n const b01 = m22 * m11 - m12 * m21;\n const b11 = -m22 * m10 + m12 * m20;\n const b21 = m21 * m10 - m11 * m20;\n\n const invDet = 1 / (m00 * b01 + m01 * b11 + m02 * b21);\n\n dst[ 0] = b01 * invDet;\n dst[ 1] = (-m22 * m01 + m02 * m21) * invDet;\n dst[ 2] = ( m12 * m01 - m02 * m11) * invDet;\n dst[ 4] = b11 * invDet;\n dst[ 5] = ( m22 * m00 - m02 * m20) * invDet;\n dst[ 6] = (-m12 * m00 + m02 * m10) * invDet;\n dst[ 8] = b21 * invDet;\n dst[ 9] = (-m21 * m00 + m01 * m20) * invDet;\n dst[10] = ( m11 * m00 - m01 * m10) * invDet;\n\n return dst;\n}\n\n/**\n * Compute the determinant of a matrix\n * @param m - the matrix\n * @returns the determinant\n */\nexport function determinant(m: Mat3): number {\n const m00 = m[0 * 4 + 0];\n const m01 = m[0 * 4 + 1];\n const m02 = m[0 * 4 + 2];\n const m10 = m[1 * 4 + 0];\n const m11 = m[1 * 4 + 1];\n const m12 = m[1 * 4 + 2];\n const m20 = m[2 * 4 + 0];\n const m21 = m[2 * 4 + 1];\n const m22 = m[2 * 4 + 2];\n\n return m00 * (m11 * m22 - m21 * m12) -\n m10 * (m01 * m22 - m21 * m02) +\n m20 * (m01 * m12 - m11 * m02);\n}\n\n/**\n * Computes the inverse of a 3-by-3 matrix. (same as inverse)\n * @param m - The matrix.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The inverse of m.\n */\nexport const invert = inverse;\n\n/**\n * Multiplies two 3-by-3 matrices with a on the left and b on the right\n * @param a - The matrix on the left.\n * @param b - The matrix on the right.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The matrix product of a and b.\n */\nexport function multiply(a: Mat3, b: Mat3, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n\n const a00 = a[0];\n const a01 = a[1];\n const a02 = a[2];\n const a10 = a[ 4 + 0];\n const a11 = a[ 4 + 1];\n const a12 = a[ 4 + 2];\n const a20 = a[ 8 + 0];\n const a21 = a[ 8 + 1];\n const a22 = a[ 8 + 2];\n const b00 = b[0];\n const b01 = b[1];\n const b02 = b[2];\n const b10 = b[ 4 + 0];\n const b11 = b[ 4 + 1];\n const b12 = b[ 4 + 2];\n const b20 = b[ 8 + 0];\n const b21 = b[ 8 + 1];\n const b22 = b[ 8 + 2];\n\n dst[ 0] = a00 * b00 + a10 * b01 + a20 * b02;\n dst[ 1] = a01 * b00 + a11 * b01 + a21 * b02;\n dst[ 2] = a02 * b00 + a12 * b01 + a22 * b02;\n dst[ 4] = a00 * b10 + a10 * b11 + a20 * b12;\n dst[ 5] = a01 * b10 + a11 * b11 + a21 * b12;\n dst[ 6] = a02 * b10 + a12 * b11 + a22 * b12;\n dst[ 8] = a00 * b20 + a10 * b21 + a20 * b22;\n dst[ 9] = a01 * b20 + a11 * b21 + a21 * b22;\n dst[10] = a02 * b20 + a12 * b21 + a22 * b22;\n\n return dst;\n}\n\n/**\n * Multiplies two 3-by-3 matrices with a on the left and b on the right (same as multiply)\n * @param a - The matrix on the left.\n * @param b - The matrix on the right.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The matrix product of a and b.\n */\nexport const mul = multiply;\n\n/**\n * Sets the translation component of a 3-by-3 matrix to the given\n * vector.\n * @param a - The matrix.\n * @param v - The vector.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The matrix with translation set.\n */\nexport function setTranslation(a: Mat3, v: Vec2, dst?: Mat3): Mat3 {\n dst = dst || identity();\n if (a !== dst) {\n dst[ 0] = a[ 0];\n dst[ 1] = a[ 1];\n dst[ 2] = a[ 2];\n dst[ 4] = a[ 4];\n dst[ 5] = a[ 5];\n dst[ 6] = a[ 6];\n }\n dst[ 8] = v[0];\n dst[ 9] = v[1];\n dst[10] = 1;\n return dst;\n}\n\n/**\n * Returns the translation component of a 3-by-3 matrix as a vector with 3\n * entries.\n * @param m - The matrix.\n * @param dst - vector to hold result. If not passed a new one is created.\n * @returns The translation component of m.\n */\nexport function getTranslation(m: Mat3, dst?: Vec2): Vec2 {\n dst = dst || vec2.create();\n dst[0] = m[8];\n dst[1] = m[9];\n return dst;\n}\n\n/**\n * Returns an axis of a 3x3 matrix as a vector with 2 entries\n * @param m - The matrix.\n * @param axis - The axis 0 = x, 1 = y,\n * @returns The axis component of m.\n */\nexport function getAxis(m: Mat3, axis: number, dst?: Vec2): Vec2 {\n dst = dst || vec2.create();\n const off = axis * 4;\n dst[0] = m[off + 0];\n dst[1] = m[off + 1];\n return dst;\n}\n\n/**\n * Sets an axis of a 3x3 matrix as a vector with 2 entries\n * @param m - The matrix.\n * @param v - the axis vector\n * @param axis - The axis 0 = x, 1 = y;\n * @param dst - The matrix to set. If not passed a new one is created.\n * @returns The matrix with axis set.\n */\nexport function setAxis(m: Mat3, v: Vec2, axis: number, dst?: Mat3): Mat3 {\n if (dst !== m) {\n dst = copy(m, dst);\n }\n const off = axis * 4;\n dst[off + 0] = v[0];\n dst[off + 1] = v[1];\n return dst;\n}\n\n/**\n * Returns the scaling component of the matrix\n * @param m - The Matrix\n * @param dst - The vector to set. If not passed a new one is created.\n */\nexport function getScaling(m: Mat3, dst?: Vec2): Vec2 {\n dst = dst || vec2.create();\n\n const xx = m[0];\n const xy = m[1];\n const yx = m[4];\n const yy = m[5];\n\n dst[0] = Math.sqrt(xx * xx + xy * xy);\n dst[1] = Math.sqrt(yx * yx + yy * yy);\n\n return dst;\n}\n\n/**\n * Creates a 3-by-3 matrix which translates by the given vector v.\n * @param v - The vector by which to translate.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The translation matrix.\n */\nexport function translation(v: Vec2, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n\n dst[ 0] = 1; dst[ 1] = 0; dst[ 2] = 0;\n dst[ 4] = 0; dst[ 5] = 1; dst[ 6] = 0;\n dst[ 8] = v[0]; dst[ 9] = v[1]; dst[10] = 1;\n\n return dst;\n}\n\n/**\n * Translates the given 3-by-3 matrix by the given vector v.\n * @param m - The matrix.\n * @param v - The vector by which to translate.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The translated matrix.\n */\nexport function translate(m: Mat3, v: Vec2, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n\n const v0 = v[0];\n const v1 = v[1];\n\n const m00 = m[0];\n const m01 = m[1];\n const m02 = m[2];\n const m10 = m[1 * 4 + 0];\n const m11 = m[1 * 4 + 1];\n const m12 = m[1 * 4 + 2];\n const m20 = m[2 * 4 + 0];\n const m21 = m[2 * 4 + 1];\n const m22 = m[2 * 4 + 2];\n\n if (m !== dst) {\n dst[ 0] = m00;\n dst[ 1] = m01;\n dst[ 2] = m02;\n dst[ 4] = m10;\n dst[ 5] = m11;\n dst[ 6] = m12;\n }\n\n dst[ 8] = m00 * v0 + m10 * v1 + m20;\n dst[ 9] = m01 * v0 + m11 * v1 + m21;\n dst[10] = m02 * v0 + m12 * v1 + m22;\n\n return dst;\n}\n\n/**\n * Creates a 3-by-3 matrix which rotates by the given angle.\n * @param angleInRadians - The angle by which to rotate (in radians).\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The rotation matrix.\n */\nexport function rotation(angleInRadians: number, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n\n const c = Math.cos(angleInRadians);\n const s = Math.sin(angleInRadians);\n\n dst[ 0] = c; dst[ 1] = s; dst[ 2] = 0;\n dst[ 4] = -s; dst[ 5] = c; dst[ 6] = 0;\n dst[ 8] = 0; dst[ 9] = 0; dst[10] = 1;\n\n return dst;\n}\n\n/**\n * Rotates the given 3-by-3 matrix by the given angle.\n * @param m - The matrix.\n * @param angleInRadians - The angle by which to rotate (in radians).\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The rotated matrix.\n */\nexport function rotate(m: Mat3, angleInRadians: number, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n\n const m00 = m[0 * 4 + 0];\n const m01 = m[0 * 4 + 1];\n const m02 = m[0 * 4 + 2];\n const m10 = m[1 * 4 + 0];\n const m11 = m[1 * 4 + 1];\n const m12 = m[1 * 4 + 2];\n const c = Math.cos(angleInRadians);\n const s = Math.sin(angleInRadians);\n\n dst[ 0] = c * m00 + s * m10;\n dst[ 1] = c * m01 + s * m11;\n dst[ 2] = c * m02 + s * m12;\n\n dst[ 4] = c * m10 - s * m00;\n dst[ 5] = c * m11 - s * m01;\n dst[ 6] = c * m12 - s * m02;\n\n\n if (m !== dst) {\n dst[ 8] = m[ 8];\n dst[ 9] = m[ 9];\n dst[10] = m[10];\n }\n\n return dst;\n}\n\n/**\n * Creates a 3-by-3 matrix which scales in each dimension by an amount given by\n * the corresponding entry in the given vector; assumes the vector has three\n * entries.\n * @param v - A vector of\n * 2 entries specifying the factor by which to scale in each dimension.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The scaling matrix.\n */\nexport function scaling(v: Vec2, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n\n dst[ 0] = v[0]; dst[ 1] = 0; dst[ 2] = 0;\n dst[ 4] = 0; dst[ 5] = v[1]; dst[ 6] = 0;\n dst[ 8] = 0; dst[ 9] = 0; dst[10] = 1;\n\n return dst;\n}\n\n/**\n * Scales the given 3-by-3 matrix in each dimension by an amount\n * given by the corresponding entry in the given vector; assumes the vector has\n * three entries.\n * @param m - The matrix to be modified.\n * @param v - A vector of 2 entries specifying the\n * factor by which to scale in each dimension.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The scaled matrix.\n */\nexport function scale(m: Mat3, v: Vec2, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n\n const v0 = v[0];\n const v1 = v[1];\n\n dst[ 0] = v0 * m[0 * 4 + 0];\n dst[ 1] = v0 * m[0 * 4 + 1];\n dst[ 2] = v0 * m[0 * 4 + 2];\n\n dst[ 4] = v1 * m[1 * 4 + 0];\n dst[ 5] = v1 * m[1 * 4 + 1];\n dst[ 6] = v1 * m[1 * 4 + 2];\n\n if (m !== dst) {\n dst[ 8] = m[ 8];\n dst[ 9] = m[ 9];\n dst[10] = m[10];\n }\n\n return dst;\n}\n\n/**\n * Creates a 3-by-3 matrix which scales uniformly in each dimension\n * @param s - Amount to scale\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The scaling matrix.\n */\nexport function uniformScaling(s: number, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n\n dst[ 0] = s; dst[ 1] = 0; dst[ 2] = 0;\n dst[ 4] = 0; dst[ 5] = s; dst[ 6] = 0;\n dst[ 8] = 0; dst[ 9] = 0; dst[10] = 1;\n\n return dst;\n}\n\n/**\n * Scales the given 3-by-3 matrix in each dimension by an amount\n * given.\n * @param m - The matrix to be modified.\n * @param s - Amount to scale.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The scaled matrix.\n */\nexport function uniformScale(m: Mat3, s: number, dst?: Mat3): Mat3 {\n dst = dst || newMat3();\n\n dst[ 0] = s * m[0 * 4 + 0];\n dst[ 1] = s * m[0 * 4 + 1];\n dst[ 2] = s * m[0 * 4 + 2];\n\n dst[ 4] = s * m[1 * 4 + 0];\n dst[ 5] = s * m[1 * 4 + 1];\n dst[ 6] = s * m[1 * 4 + 2];\n\n if (m !== dst) {\n dst[ 8] = m[ 8];\n dst[ 9] = m[ 9];\n dst[10] = m[10];\n }\n\n return dst;\n}\n","/*\n * Copyright 2022 Gregg Tavares\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n */\nimport * as utils from './utils.js';\nimport { Vec3, create, setDefaultType, VecType } from './vec3';\nimport { Mat3 } from './mat3';\nimport { Mat4 } from './mat4';\nimport { Quat } from './quat';\n\nexport default Vec3;\nexport { create, setDefaultType };\n\n/**\n * Creates a vec3; may be called with x, y, z to set initial values. (same as create)\n * @param x - Initial x value.\n * @param y - Initial y value.\n * @param z - Initial z value.\n * @returns the created vector\n */\nexport const fromValues = create;\n\n/**\n * Sets the values of a Vec3\n * Also see {@link vec3.create} and {@link vec3.copy}\n *\n * @param x first value\n * @param y second value\n * @param z third value\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector with its elements set.\n */\nexport function set(x: number, y: number, z: number, dst?: Vec3) {\n dst = dst || new VecType(3);\n\n dst[0] = x;\n dst[1] = y;\n dst[2] = z;\n\n return dst;\n}\n\n/**\n * Applies Math.ceil to each element of vector\n * @param v - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the ceil of each element of v.\n */\nexport function ceil(v: Vec3, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = Math.ceil(v[0]);\n dst[1] = Math.ceil(v[1]);\n dst[2] = Math.ceil(v[2]);\n\n return dst;\n}\n\n/**\n * Applies Math.floor to each element of vector\n * @param v - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the floor of each element of v.\n */\nexport function floor(v: Vec3, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = Math.floor(v[0]);\n dst[1] = Math.floor(v[1]);\n dst[2] = Math.floor(v[2]);\n\n return dst;\n}\n\n/**\n * Applies Math.round to each element of vector\n * @param v - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the round of each element of v.\n */\nexport function round(v: Vec3, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = Math.round(v[0]);\n dst[1] = Math.round(v[1]);\n dst[2] = Math.round(v[2]);\n\n return dst;\n}\n\n/**\n * Clamp each element of vector between min and max\n * @param v - Operand vector.\n * @param max - Min value, default 0\n * @param min - Max value, default 1\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that the clamped value of each element of v.\n */\nexport function clamp(v: Vec3, min = 0, max = 1, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = Math.min(max, Math.max(min, v[0]));\n dst[1] = Math.min(max, Math.max(min, v[1]));\n dst[2] = Math.min(max, Math.max(min, v[2]));\n\n return dst;\n}\n\n/**\n * Adds two vectors; assumes a and b have the same dimension.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the sum of a and b.\n */\nexport function add(a: Vec3, b: Vec3, dst?: Vec3) {\n dst = dst || new VecType(3);\n\n dst[0] = a[0] + b[0];\n dst[1] = a[1] + b[1];\n dst[2] = a[2] + b[2];\n\n return dst;\n}\n\n/**\n * Adds two vectors, scaling the 2nd; assumes a and b have the same dimension.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param scale - Amount to scale b\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the sum of a + b * scale.\n */\nexport function addScaled(a: Vec3, b: Vec3, scale: number, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = a[0] + b[0] * scale;\n dst[1] = a[1] + b[1] * scale;\n dst[2] = a[2] + b[2] * scale;\n\n return dst;\n}\n\n/**\n * Returns the angle in radians between two vectors.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @returns The angle in radians between the 2 vectors.\n */\nexport function angle(a: Vec3, b: Vec3): number {\n const ax = a[0];\n const ay = a[1];\n const az = a[2];\n const bx = a[0];\n const by = a[1];\n const bz = a[2];\n const mag1 = Math.sqrt(ax * ax + ay * ay + az * az);\n const mag2 = Math.sqrt(bx * bx + by * by + bz * bz);\n const mag = mag1 * mag2;\n const cosine = mag && dot(a, b) / mag;\n return Math.acos(cosine);\n}\n\n/**\n * Subtracts two vectors.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the difference of a and b.\n */\nexport function subtract(a: Vec3, b: Vec3, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = a[0] - b[0];\n dst[1] = a[1] - b[1];\n dst[2] = a[2] - b[2];\n\n return dst;\n}\n\n/**\n * Subtracts two vectors.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the difference of a and b.\n */\nexport const sub = subtract;\n\n/**\n * Check if 2 vectors are approximately equal\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @returns true if vectors are approximately equal\n */\nexport function equalsApproximately(a: Vec3, b: Vec3): boolean {\n return Math.abs(a[0] - b[0]) < utils.EPSILON &&\n Math.abs(a[1] - b[1]) < utils.EPSILON &&\n Math.abs(a[2] - b[2]) < utils.EPSILON;\n}\n\n/**\n * Check if 2 vectors are exactly equal\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @returns true if vectors are exactly equal\n */\nexport function equals(a: Vec3, b: Vec3): boolean {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2];\n}\n\n/**\n * Performs linear interpolation on two vectors.\n * Given vectors a and b and interpolation coefficient t, returns\n * a + t * (b - a).\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param t - Interpolation coefficient.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The linear interpolated result.\n */\nexport function lerp(a: Vec3, b: Vec3, t: number, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = a[0] + t * (b[0] - a[0]);\n dst[1] = a[1] + t * (b[1] - a[1]);\n dst[2] = a[2] + t * (b[2] - a[2]);\n\n return dst;\n}\n\n/**\n * Performs linear interpolation on two vectors.\n * Given vectors a and b and interpolation coefficient vector t, returns\n * a + t * (b - a).\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param t - Interpolation coefficients vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns the linear interpolated result.\n */\nexport function lerpV(a: Vec3, b: Vec3, t: Vec3, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = a[0] + t[0] * (b[0] - a[0]);\n dst[1] = a[1] + t[1] * (b[1] - a[1]);\n dst[2] = a[2] + t[2] * (b[2] - a[2]);\n\n return dst;\n}\n\n/**\n * Return max values of two vectors.\n * Given vectors a and b returns\n * [max(a[0], b[0]), max(a[1], b[1]), max(a[2], b[2])].\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The max components vector.\n */\nexport function max(a: Vec3, b: Vec3, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = Math.max(a[0], b[0]);\n dst[1] = Math.max(a[1], b[1]);\n dst[2] = Math.max(a[2], b[2]);\n\n return dst;\n}\n\n/**\n * Return min values of two vectors.\n * Given vectors a and b returns\n * [min(a[0], b[0]), min(a[1], b[1]), min(a[2], b[2])].\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The min components vector.\n */\nexport function min(a: Vec3, b: Vec3, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = Math.min(a[0], b[0]);\n dst[1] = Math.min(a[1], b[1]);\n dst[2] = Math.min(a[2], b[2]);\n\n return dst;\n}\n\n/**\n * Multiplies a vector by a scalar.\n * @param v - The vector.\n * @param k - The scalar.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The scaled vector.\n */\nexport function mulScalar(v: Vec3, k: number, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = v[0] * k;\n dst[1] = v[1] * k;\n dst[2] = v[2] * k;\n\n return dst;\n}\n\n/**\n * Multiplies a vector by a scalar. (same as mulScalar)\n * @param v - The vector.\n * @param k - The scalar.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The scaled vector.\n */\nexport const scale = mulScalar;\n\n/**\n * Divides a vector by a scalar.\n * @param v - The vector.\n * @param k - The scalar.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The scaled vector.\n */\nexport function divScalar(v: Vec3, k: number, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = v[0] / k;\n dst[1] = v[1] / k;\n dst[2] = v[2] / k;\n\n return dst;\n}\n\n/**\n * Inverse a vector.\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The inverted vector.\n */\nexport function inverse(v: Vec3, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = 1 / v[0];\n dst[1] = 1 / v[1];\n dst[2] = 1 / v[2];\n\n return dst;\n}\n\n/**\n * Invert a vector. (same as inverse)\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The inverted vector.\n */\nexport const invert = inverse;\n\n/**\n * Computes the cross product of two vectors; assumes both vectors have\n * three entries.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The vector of a cross b.\n */\nexport function cross(a: Vec3, b: Vec3, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n const t1 = a[2] * b[0] - a[0] * b[2];\n const t2 = a[0] * b[1] - a[1] * b[0];\n dst[0] = a[1] * b[2] - a[2] * b[1];\n dst[1] = t1;\n dst[2] = t2;\n\n return dst;\n}\n\n/**\n * Computes the dot product of two vectors; assumes both vectors have\n * three entries.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @returns dot product\n */\nexport function dot(a: Vec3, b: Vec3): number {\n return (a[0] * b[0]) + (a[1] * b[1]) + (a[2] * b[2]);\n}\n\n/**\n * Computes the length of vector\n * @param v - vector.\n * @returns length of vector.\n */\nexport function length(v: Vec3): number {\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n return Math.sqrt(v0 * v0 + v1 * v1 + v2 * v2);\n}\n\n/**\n * Computes the length of vector (same as length)\n * @param v - vector.\n * @returns length of vector.\n */\nexport const len = length;\n\n/**\n * Computes the square of the length of vector\n * @param v - vector.\n * @returns square of the length of vector.\n */\nexport function lengthSq(v: Vec3): number {\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n return v0 * v0 + v1 * v1 + v2 * v2;\n}\n\n/**\n * Computes the square of the length of vector (same as lengthSq)\n * @param v - vector.\n * @returns square of the length of vector.\n */\nexport const lenSq = lengthSq;\n\n/**\n * Computes the distance between 2 points\n * @param a - vector.\n * @param b - vector.\n * @returns distance between a and b\n */\nexport function distance(a: Vec3, b: Vec3): number {\n const dx = a[0] - b[0];\n const dy = a[1] - b[1];\n const dz = a[2] - b[2];\n return Math.sqrt(dx * dx + dy * dy + dz * dz);\n}\n\n/**\n * Computes the distance between 2 points (same as distance)\n * @param a - vector.\n * @param b - vector.\n * @returns distance between a and b\n */\nexport const dist = distance;\n\n/**\n * Computes the square of the distance between 2 points\n * @param a - vector.\n * @param b - vector.\n * @returns square of the distance between a and b\n */\nexport function distanceSq(a: Vec3, b: Vec3): number {\n const dx = a[0] - b[0];\n const dy = a[1] - b[1];\n const dz = a[2] - b[2];\n return dx * dx + dy * dy + dz * dz;\n}\n\n/**\n * Computes the square of the distance between 2 points (same as distanceSq)\n * @param a - vector.\n * @param b - vector.\n * @returns square of the distance between a and b\n */\nexport const distSq = distanceSq;\n\n/**\n * Divides a vector by its Euclidean length and returns the quotient.\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The normalized vector.\n */\nexport function normalize(v: Vec3, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n const len = Math.sqrt(v0 * v0 + v1 * v1 + v2 * v2);\n\n if (len > 0.00001) {\n dst[0] = v0 / len;\n dst[1] = v1 / len;\n dst[2] = v2 / len;\n } else {\n dst[0] = 0;\n dst[1] = 0;\n dst[2] = 0;\n }\n\n\n return dst;\n}\n\n/**\n * Negates a vector.\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns -v.\n */\nexport function negate(v: Vec3, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = -v[0];\n dst[1] = -v[1];\n dst[2] = -v[2];\n\n return dst;\n}\n\n/**\n * Copies a vector. (same as {@link vec3.clone})\n * Also see {@link vec3.create} and {@link vec3.set}\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A copy of v.\n */\nexport function copy(v: Vec3, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = v[0];\n dst[1] = v[1];\n dst[2] = v[2];\n\n return dst;\n}\n\n/**\n * Clones a vector. (same as {@link vec3.copy})\n * Also see {@link vec3.create} and {@link vec3.set}\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A copy of v.\n */\nexport const clone = copy;\n\n/**\n * Multiplies a vector by another vector (component-wise); assumes a and\n * b have the same length.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The vector of products of entries of a and b.\n */\nexport function multiply(a: Vec3, b: Vec3, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = a[0] * b[0];\n dst[1] = a[1] * b[1];\n dst[2] = a[2] * b[2];\n\n return dst;\n}\n\n/**\n * Multiplies a vector by another vector (component-wise); assumes a and\n * b have the same length. (same as mul)\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The vector of products of entries of a and b.\n */\nexport const mul = multiply;\n\n/**\n * Divides a vector by another vector (component-wise); assumes a and\n * b have the same length.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The vector of quotients of entries of a and b.\n */\nexport function divide(a: Vec3, b: Vec3, dst?: Vec3) {\n dst = dst || new VecType(3);\n\n dst[0] = a[0] / b[0];\n dst[1] = a[1] / b[1];\n dst[2] = a[2] / b[2];\n\n return dst;\n}\n\n/**\n * Divides a vector by another vector (component-wise); assumes a and\n * b have the same length. (same as divide)\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The vector of quotients of entries of a and b.\n */\nexport const div = divide;\n\n/**\n * Creates a random vector\n * @param scale - Default 1\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The random vector.\n */\nexport function random(scale = 1, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n const angle = Math.random() * 2 * Math.PI;\n const z = Math.random() * 2 - 1;\n const zScale = Math.sqrt(1 - z * z) * scale;\n dst[0] = Math.cos(angle) * zScale;\n dst[1] = Math.sin(angle) * zScale;\n dst[2] = z * scale;\n\n return dst;\n}\n\n/**\n * Zero's a vector\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The zeroed vector.\n */\nexport function zero(dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n dst[0] = 0;\n dst[1] = 0;\n dst[2] = 0;\n\n return dst;\n}\n\n\n/**\n * transform vec3 by 4x4 matrix\n * @param v - the vector\n * @param m - The matrix.\n * @param dst - optional vec3 to store result. If not passed a new one is created.\n * @returns the transformed vector\n */\nexport function transformMat4(v: Vec3, m: Mat4, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n const x = v[0];\n const y = v[1];\n const z = v[2];\n const w = (m[3] * x + m[7] * y + m[11] * z + m[15]) || 1;\n\n dst[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;\n dst[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;\n dst[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;\n\n return dst;\n}\n\n/**\n * Transform vec4 by upper 3x3 matrix inside 4x4 matrix.\n * @param v - The direction.\n * @param m - The matrix.\n * @param dst - optional Vec3 to store result. If not passed a new one is created.\n * @returns The transformed vector.\n */\nexport function transformMat4Upper3x3(v: Vec3, m: Mat4, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n\n dst[0] = v0 * m[0 * 4 + 0] + v1 * m[1 * 4 + 0] + v2 * m[2 * 4 + 0];\n dst[1] = v0 * m[0 * 4 + 1] + v1 * m[1 * 4 + 1] + v2 * m[2 * 4 + 1];\n dst[2] = v0 * m[0 * 4 + 2] + v1 * m[1 * 4 + 2] + v2 * m[2 * 4 + 2];\n\n return dst;\n}\n\n/**\n * Transforms vec3 by 3x3 matrix\n *\n * @param v - the vector\n * @param m - The matrix.\n * @param dst - optional vec3 to store result. If not passed a new one is created.\n * @returns the transformed vector\n */\nexport function transformMat3(v: Vec3, m: Mat3, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n const x = v[0];\n const y = v[1];\n const z = v[2];\n\n dst[0] = x * m[0] + y * m[4] + z * m[8];\n dst[1] = x * m[1] + y * m[5] + z * m[9];\n dst[2] = x * m[2] + y * m[6] + z * m[10];\n\n return dst;\n}\n\n/**\n * Transforms vec3 by Quaternion\n * @param v - the vector to transform\n * @param q - the quaternion to transform by\n * @param dst - optional vec3 to store result. If not passed a new one is created.\n * @returns the transformed\n */\nexport function transformQuat(v: Vec3, q: Quat, dst?: Vec3): Vec3 {\n dst = dst || new VecType(3);\n\n const qx = q[0];\n const qy = q[1];\n const qz = q[2];\n const w2 = q[3] * 2;\n\n const x = v[0];\n const y = v[1];\n const z = v[2];\n\n const uvX = qy * z - qz * y;\n const uvY = qz * x - qx * z;\n const uvZ = qx * y - qy * x;\n\n dst[0] = x + uvX * w2 + (qy * uvZ - qz * uvY) * 2;\n dst[1] = y + uvY * w2 + (qz * uvX - qx * uvZ) * 2;\n dst[2] = z + uvZ * w2 + (qx * uvY - qy * uvX) * 2;\n\n return dst;\n}\n\n/**\n * Returns the translation component of a 4-by-4 matrix as a vector with 3\n * entries.\n * @param m - The matrix.\n * @param dst - vector to hold result. If not passed a new one is created.\n * @returns The translation component of m.\n */\nexport function getTranslation(m: Mat3, dst?: Vec3) {\n dst = dst || new VecType(3);\n dst[0] = m[12];\n dst[1] = m[13];\n dst[2] = m[14];\n return dst;\n}\n/**\n * Returns an axis of a 4x4 matrix as a vector with 3 entries\n * @param m - The matrix.\n * @param axis - The axis 0 = x, 1 = y, 2 = z;\n * @returns The axis component of m.\n */\nexport function getAxis(m: Mat4, axis: number, dst?: Vec3) {\n dst = dst || new VecType(3);\n const off = axis * 4;\n dst[0] = m[off + 0];\n dst[1] = m[off + 1];\n dst[2] = m[off + 2];\n return dst;\n}\n/**\n * Returns the scaling component of the matrix\n * @param m - The Matrix\n * @param dst - The vector to set. If not passed a new one is created.\n */\nexport function getScaling(m: Mat4, dst: Vec3) {\n dst = dst || new VecType(3);\n const xx = m[0];\n const xy = m[1];\n const xz = m[2];\n const yx = m[4];\n const yy = m[5];\n const yz = m[6];\n const zx = m[8];\n const zy = m[9];\n const zz = m[10];\n dst[0] = Math.sqrt(xx * xx + xy * xy + xz * xz);\n dst[1] = Math.sqrt(yx * yx + yy * yy + yz * yz);\n dst[2] = Math.sqrt(zx * zx + zy * zy + zz * zz);\n return dst;\n}","\nimport { Mat3 } from './mat3';\nimport { Mat4 } from './mat4';\nimport { Quat } from './quat';\nimport Vec3, * as vec3 from './vec3-impl';\nimport * as utils from './utils';\n\nexport default Mat4;\n\nexport type Mat4LikeCtor = new (n: number) => Mat4;\n\n/**\n * 4x4 Matrix math math functions.\n *\n * Almost all functions take an optional `dst` argument. If it is not passed in the\n * functions will create a new matrix. In other words you can do this\n *\n * const mat = mat4.translation([1, 2, 3]); // Creates a new translation matrix\n *\n * or\n *\n * const mat = mat4.create();\n * mat4.translation([1, 2, 3], mat); // Puts translation matrix in mat.\n *\n * The first style is often easier but depending on where it's used it generates garbage where\n * as there is almost never allocation with the second style.\n *\n * It is always save to pass any matrix as the destination. So for example\n *\n * const mat = mat4.identity();\n * const trans = mat4.translation([1, 2, 3]);\n * mat4.multiply(mat, trans, mat); // Multiplies mat * trans and puts result in mat.\n *\n */\nlet MatType: Mat4LikeCtor = Float32Array;\n\n/**\n * Sets the type this library creates for a Mat4\n * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array`\n * @returns previous constructor for Mat4\n */\nexport function setDefaultType(ctor: new (n: number) => Mat4) {\n const oldType = MatType;\n MatType = ctor;\n return oldType;\n}\n\n/**\n * Create a Mat4 from values\n *\n * Note: Since passing in a raw JavaScript array\n * is valid in all circumstances, if you want to\n * force a JavaScript array into a Mat4's specified type\n * it would be faster to use\n *\n * ```\n * const m = mat4.clone(someJSArray);\n * ```\n *\n * Note: a consequence of the implementation is if your Mat4Type = `Array`\n * instead of `Float32Array` or `Float64Array` then any values you\n * don't pass in will be undefined. Usually this is not an issue since\n * (a) using `Array` is rare and (b) using `mat4.create` is usually used\n * to create a Mat4 to be filled out as in\n *\n * ```\n * const m = mat4.create();\n * mat4.perspective(fov, aspect, near, far, m);\n * ```\n *\n * @param v0 - value for element 0\n * @param v1 - value for element 1\n * @param v2 - value for element 2\n * @param v3 - value for element 3\n * @param v4 - value for element 4\n * @param v5 - value for element 5\n * @param v6 - value for element 6\n * @param v7 - value for element 7\n * @param v8 - value for element 8\n * @param v9 - value for element 9\n * @param v10 - value for element 10\n * @param v11 - value for element 11\n * @param v12 - value for element 12\n * @param v13 - value for element 13\n * @param v14 - value for element 14\n * @param v15 - value for element 15\n * @returns created from values.\n */\nexport function create(\n v0?: number, v1?: number, v2?: number, v3?: number,\n v4?: number, v5?: number, v6?: number, v7?: number,\n v8?: number, v9?: number, v10?: number, v11?: number,\n v12?: number, v13?: number, v14?: number, v15?: number): Mat4 {\n const dst = new MatType(16);\n if (v0 !== undefined) {\n dst[0] = v0;\n if (v1 !== undefined) {\n dst[1] = v1;\n if (v2 !== undefined) {\n dst[2] = v2;\n if (v3 !== undefined) {\n dst[3] = v3;\n if (v4 !== undefined) {\n dst[4] = v4;\n if (v5 !== undefined) {\n dst[5] = v5;\n if (v6 !== undefined) {\n dst[6] = v6;\n if (v7 !== undefined) {\n dst[7] = v7;\n if (v8 !== undefined) {\n dst[8] = v8;\n if (v9 !== undefined) {\n dst[9] = v9;\n if (v10 !== undefined) {\n dst[10] = v10;\n if (v11 !== undefined) {\n dst[11] = v11;\n if (v12 !== undefined) {\n dst[12] = v12;\n if (v13 !== undefined) {\n dst[13] = v13;\n if (v14 !== undefined) {\n dst[14] = v14;\n if (v15 !== undefined) {\n dst[15] = v15;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n return dst;\n}\n\n/**\n * Sets the values of a Mat4\n * Also see {@link mat4.create} and {@link mat4.copy}\n *\n * @param v0 - value for element 0\n * @param v1 - value for element 1\n * @param v2 - value for element 2\n * @param v3 - value for element 3\n * @param v4 - value for element 4\n * @param v5 - value for element 5\n * @param v6 - value for element 6\n * @param v7 - value for element 7\n * @param v8 - value for element 8\n * @param v9 - value for element 9\n * @param v10 - value for element 10\n * @param v11 - value for element 11\n * @param v12 - value for element 12\n * @param v13 - value for element 13\n * @param v14 - value for element 14\n * @param v15 - value for element 15\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns Mat4 created from values.\n */\nexport function set(\n v0: number, v1: number, v2: number, v3: number,\n v4: number, v5: number, v6: number, v7: number,\n v8: number, v9: number, v10: number, v11: number,\n v12: number, v13: number, v14: number, v15: number,\n dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n dst[ 0] = v0; dst[ 1] = v1; dst[ 2] = v2; dst[ 3] = v3;\n dst[ 4] = v4; dst[ 5] = v5; dst[ 6] = v6; dst[ 7] = v7;\n dst[ 8] = v8; dst[ 9] = v9; dst[10] = v10; dst[11] = v11;\n dst[12] = v12; dst[13] = v13; dst[14] = v14; dst[15] = v15;\n\n return dst;\n}\n\n/**\n * Creates a Mat4 from a Mat3\n * @param m3 - source matrix\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns Mat4 made from m3\n */\nexport function fromMat3(m3: Mat3, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n dst[ 0] = m3[0]; dst[ 1] = m3[1]; dst[ 2] = m3[ 2]; dst[ 3] = 0;\n dst[ 4] = m3[4]; dst[ 5] = m3[5]; dst[ 6] = m3[ 6]; dst[ 7] = 0;\n dst[ 8] = m3[8]; dst[ 9] = m3[9]; dst[10] = m3[10]; dst[11] = 0;\n dst[12] = 0; dst[13] = 0; dst[14] = 0; dst[15] = 1;\n\n return dst;\n}\n\n/**\n * Creates a Mat4 rotation matrix from a quaternion\n * @param q - quaternion to create matrix from\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns Mat4 made from q\n */\nexport function fromQuat(q: Quat, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n const x = q[0]; const y = q[1]; const z = q[2]; const w = q[3];\n const x2 = x + x; const y2 = y + y; const z2 = z + z;\n\n const xx = x * x2;\n const yx = y * x2;\n const yy = y * y2;\n const zx = z * x2;\n const zy = z * y2;\n const zz = z * z2;\n const wx = w * x2;\n const wy = w * y2;\n const wz = w * z2;\n\n dst[ 0] = 1 - yy - zz; dst[ 1] = yx + wz; dst[ 2] = zx - wy; dst[ 3] = 0;\n dst[ 4] = yx - wz; dst[ 5] = 1 - xx - zz; dst[ 6] = zy + wx; dst[ 7] = 0;\n dst[ 8] = zx + wy; dst[ 9] = zy - wx; dst[10] = 1 - xx - yy; dst[11] = 0;\n dst[12] = 0; dst[13] = 0; dst[14] = 0; dst[15] = 1;\n\n return dst;\n}\n\n/**\n * Negates a matrix.\n * @param m - The matrix.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns -m.\n */\nexport function negate(m: Mat4, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n dst[ 0] = -m[ 0]; dst[ 1] = -m[ 1]; dst[ 2] = -m[ 2]; dst[ 3] = -m[ 3];\n dst[ 4] = -m[ 4]; dst[ 5] = -m[ 5]; dst[ 6] = -m[ 6]; dst[ 7] = -m[ 7];\n dst[ 8] = -m[ 8]; dst[ 9] = -m[ 9]; dst[10] = -m[10]; dst[11] = -m[11];\n dst[12] = -m[12]; dst[13] = -m[13]; dst[14] = -m[14]; dst[15] = -m[15];\n\n return dst;\n}\n\n/**\n * Copies a matrix. (same as {@link mat4.clone})\n * Also see {@link mat4.create} and {@link mat4.set}\n * @param m - The matrix.\n * @param dst - The matrix. If not passed a new one is created.\n * @returns A copy of m.\n */\nexport function copy(m: Mat4, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n dst[ 0] = m[ 0]; dst[ 1] = m[ 1]; dst[ 2] = m[ 2]; dst[ 3] = m[ 3];\n dst[ 4] = m[ 4]; dst[ 5] = m[ 5]; dst[ 6] = m[ 6]; dst[ 7] = m[ 7];\n dst[ 8] = m[ 8]; dst[ 9] = m[ 9]; dst[10] = m[10]; dst[11] = m[11];\n dst[12] = m[12]; dst[13] = m[13]; dst[14] = m[14]; dst[15] = m[15];\n\n return dst;\n}\n\n/**\n * Copies a matrix (same as {@link mat4.copy})\n * Also see {@link mat4.create} and {@link mat4.set}\n * @param m - The matrix.\n * @param dst - The matrix. If not passed a new one is created.\n * @returns A copy of m.\n */\nexport const clone = copy;\n\n/**\n * Check if 2 matrices are approximately equal\n * @param a - Operand matrix.\n * @param b - Operand matrix.\n * @returns true if matrices are approximately equal\n */\nexport function equalsApproximately(a: Mat4, b: Mat4): boolean {\n return Math.abs(a[ 0] - b[ 0]) < utils.EPSILON &&\n Math.abs(a[ 1] - b[ 1]) < utils.EPSILON &&\n Math.abs(a[ 2] - b[ 2]) < utils.EPSILON &&\n Math.abs(a[ 3] - b[ 3]) < utils.EPSILON &&\n Math.abs(a[ 4] - b[ 4]) < utils.EPSILON &&\n Math.abs(a[ 5] - b[ 5]) < utils.EPSILON &&\n Math.abs(a[ 6] - b[ 6]) < utils.EPSILON &&\n Math.abs(a[ 7] - b[ 7]) < utils.EPSILON &&\n Math.abs(a[ 8] - b[ 8]) < utils.EPSILON &&\n Math.abs(a[ 9] - b[ 9]) < utils.EPSILON &&\n Math.abs(a[10] - b[10]) < utils.EPSILON &&\n Math.abs(a[11] - b[11]) < utils.EPSILON &&\n Math.abs(a[12] - b[12]) < utils.EPSILON &&\n Math.abs(a[13] - b[13]) < utils.EPSILON &&\n Math.abs(a[14] - b[14]) < utils.EPSILON &&\n Math.abs(a[15] - b[15]) < utils.EPSILON;\n}\n\n/**\n * Check if 2 matrices are exactly equal\n * @param a - Operand matrix.\n * @param b - Operand matrix.\n * @returns true if matrices are exactly equal\n */\nexport function equals(a: Mat4, b: Mat4): boolean {\n return a[ 0] === b[ 0] &&\n a[ 1] === b[ 1] &&\n a[ 2] === b[ 2] &&\n a[ 3] === b[ 3] &&\n a[ 4] === b[ 4] &&\n a[ 5] === b[ 5] &&\n a[ 6] === b[ 6] &&\n a[ 7] === b[ 7] &&\n a[ 8] === b[ 8] &&\n a[ 9] === b[ 9] &&\n a[10] === b[10] &&\n a[11] === b[11] &&\n a[12] === b[12] &&\n a[13] === b[13] &&\n a[14] === b[14] &&\n a[15] === b[15];\n}\n\n/**\n * Creates a 4-by-4 identity matrix.\n *\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns A 4-by-4 identity matrix.\n */\nexport function identity(dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n dst[ 0] = 1; dst[ 1] = 0; dst[ 2] = 0; dst[ 3] = 0;\n dst[ 4] = 0; dst[ 5] = 1; dst[ 6] = 0; dst[ 7] = 0;\n dst[ 8] = 0; dst[ 9] = 0; dst[10] = 1; dst[11] = 0;\n dst[12] = 0; dst[13] = 0; dst[14] = 0; dst[15] = 1;\n\n return dst;\n}\n\n/**\n * Takes the transpose of a matrix.\n * @param m - The matrix.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The transpose of m.\n */\nexport function transpose(m: Mat4, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n if (dst === m) {\n let t;\n\n t = m[1];\n m[1] = m[4];\n m[4] = t;\n\n t = m[2];\n m[2] = m[8];\n m[8] = t;\n\n t = m[3];\n m[3] = m[12];\n m[12] = t;\n\n t = m[6];\n m[6] = m[9];\n m[9] = t;\n\n t = m[7];\n m[7] = m[13];\n m[13] = t;\n\n t = m[11];\n m[11] = m[14];\n m[14] = t;\n return dst;\n }\n\n const m00 = m[0 * 4 + 0];\n const m01 = m[0 * 4 + 1];\n const m02 = m[0 * 4 + 2];\n const m03 = m[0 * 4 + 3];\n const m10 = m[1 * 4 + 0];\n const m11 = m[1 * 4 + 1];\n const m12 = m[1 * 4 + 2];\n const m13 = m[1 * 4 + 3];\n const m20 = m[2 * 4 + 0];\n const m21 = m[2 * 4 + 1];\n const m22 = m[2 * 4 + 2];\n const m23 = m[2 * 4 + 3];\n const m30 = m[3 * 4 + 0];\n const m31 = m[3 * 4 + 1];\n const m32 = m[3 * 4 + 2];\n const m33 = m[3 * 4 + 3];\n\n dst[ 0] = m00; dst[ 1] = m10; dst[ 2] = m20; dst[ 3] = m30;\n dst[ 4] = m01; dst[ 5] = m11; dst[ 6] = m21; dst[ 7] = m31;\n dst[ 8] = m02; dst[ 9] = m12; dst[10] = m22; dst[11] = m32;\n dst[12] = m03; dst[13] = m13; dst[14] = m23; dst[15] = m33;\n\n return dst;\n}\n\n/**\n * Computes the inverse of a 4-by-4 matrix.\n * @param m - The matrix.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The inverse of m.\n */\nexport function inverse(m: Mat4, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n const m00 = m[0 * 4 + 0];\n const m01 = m[0 * 4 + 1];\n const m02 = m[0 * 4 + 2];\n const m03 = m[0 * 4 + 3];\n const m10 = m[1 * 4 + 0];\n const m11 = m[1 * 4 + 1];\n const m12 = m[1 * 4 + 2];\n const m13 = m[1 * 4 + 3];\n const m20 = m[2 * 4 + 0];\n const m21 = m[2 * 4 + 1];\n const m22 = m[2 * 4 + 2];\n const m23 = m[2 * 4 + 3];\n const m30 = m[3 * 4 + 0];\n const m31 = m[3 * 4 + 1];\n const m32 = m[3 * 4 + 2];\n const m33 = m[3 * 4 + 3];\n const tmp0 = m22 * m33;\n const tmp1 = m32 * m23;\n const tmp2 = m12 * m33;\n const tmp3 = m32 * m13;\n const tmp4 = m12 * m23;\n const tmp5 = m22 * m13;\n const tmp6 = m02 * m33;\n const tmp7 = m32 * m03;\n const tmp8 = m02 * m23;\n const tmp9 = m22 * m03;\n const tmp10 = m02 * m13;\n const tmp11 = m12 * m03;\n const tmp12 = m20 * m31;\n const tmp13 = m30 * m21;\n const tmp14 = m10 * m31;\n const tmp15 = m30 * m11;\n const tmp16 = m10 * m21;\n const tmp17 = m20 * m11;\n const tmp18 = m00 * m31;\n const tmp19 = m30 * m01;\n const tmp20 = m00 * m21;\n const tmp21 = m20 * m01;\n const tmp22 = m00 * m11;\n const tmp23 = m10 * m01;\n\n const t0 = (tmp0 * m11 + tmp3 * m21 + tmp4 * m31) -\n (tmp1 * m11 + tmp2 * m21 + tmp5 * m31);\n const t1 = (tmp1 * m01 + tmp6 * m21 + tmp9 * m31) -\n (tmp0 * m01 + tmp7 * m21 + tmp8 * m31);\n const t2 = (tmp2 * m01 + tmp7 * m11 + tmp10 * m31) -\n (tmp3 * m01 + tmp6 * m11 + tmp11 * m31);\n const t3 = (tmp5 * m01 + tmp8 * m11 + tmp11 * m21) -\n (tmp4 * m01 + tmp9 * m11 + tmp10 * m21);\n\n const d = 1 / (m00 * t0 + m10 * t1 + m20 * t2 + m30 * t3);\n\n dst[ 0] = d * t0;\n dst[ 1] = d * t1;\n dst[ 2] = d * t2;\n dst[ 3] = d * t3;\n dst[ 4] = d * ((tmp1 * m10 + tmp2 * m20 + tmp5 * m30) -\n (tmp0 * m10 + tmp3 * m20 + tmp4 * m30));\n dst[ 5] = d * ((tmp0 * m00 + tmp7 * m20 + tmp8 * m30) -\n (tmp1 * m00 + tmp6 * m20 + tmp9 * m30));\n dst[ 6] = d * ((tmp3 * m00 + tmp6 * m10 + tmp11 * m30) -\n (tmp2 * m00 + tmp7 * m10 + tmp10 * m30));\n dst[ 7] = d * ((tmp4 * m00 + tmp9 * m10 + tmp10 * m20) -\n (tmp5 * m00 + tmp8 * m10 + tmp11 * m20));\n dst[ 8] = d * ((tmp12 * m13 + tmp15 * m23 + tmp16 * m33) -\n (tmp13 * m13 + tmp14 * m23 + tmp17 * m33));\n dst[ 9] = d * ((tmp13 * m03 + tmp18 * m23 + tmp21 * m33) -\n (tmp12 * m03 + tmp19 * m23 + tmp20 * m33));\n dst[10] = d * ((tmp14 * m03 + tmp19 * m13 + tmp22 * m33) -\n (tmp15 * m03 + tmp18 * m13 + tmp23 * m33));\n dst[11] = d * ((tmp17 * m03 + tmp20 * m13 + tmp23 * m23) -\n (tmp16 * m03 + tmp21 * m13 + tmp22 * m23));\n dst[12] = d * ((tmp14 * m22 + tmp17 * m32 + tmp13 * m12) -\n (tmp16 * m32 + tmp12 * m12 + tmp15 * m22));\n dst[13] = d * ((tmp20 * m32 + tmp12 * m02 + tmp19 * m22) -\n (tmp18 * m22 + tmp21 * m32 + tmp13 * m02));\n dst[14] = d * ((tmp18 * m12 + tmp23 * m32 + tmp15 * m02) -\n (tmp22 * m32 + tmp14 * m02 + tmp19 * m12));\n dst[15] = d * ((tmp22 * m22 + tmp16 * m02 + tmp21 * m12) -\n (tmp20 * m12 + tmp23 * m22 + tmp17 * m02));\n\n return dst;\n}\n\n/**\n * Compute the determinant of a matrix\n * @param m - the matrix\n * @returns the determinant\n */\nexport function determinant(m: Mat4): number {\n const m00 = m[0 * 4 + 0];\n const m01 = m[0 * 4 + 1];\n const m02 = m[0 * 4 + 2];\n const m03 = m[0 * 4 + 3];\n const m10 = m[1 * 4 + 0];\n const m11 = m[1 * 4 + 1];\n const m12 = m[1 * 4 + 2];\n const m13 = m[1 * 4 + 3];\n const m20 = m[2 * 4 + 0];\n const m21 = m[2 * 4 + 1];\n const m22 = m[2 * 4 + 2];\n const m23 = m[2 * 4 + 3];\n const m30 = m[3 * 4 + 0];\n const m31 = m[3 * 4 + 1];\n const m32 = m[3 * 4 + 2];\n const m33 = m[3 * 4 + 3];\n\n const tmp0 = m22 * m33;\n const tmp1 = m32 * m23;\n const tmp2 = m12 * m33;\n const tmp3 = m32 * m13;\n const tmp4 = m12 * m23;\n const tmp5 = m22 * m13;\n const tmp6 = m02 * m33;\n const tmp7 = m32 * m03;\n const tmp8 = m02 * m23;\n const tmp9 = m22 * m03;\n const tmp10 = m02 * m13;\n const tmp11 = m12 * m03;\n\n const t0 = (tmp0 * m11 + tmp3 * m21 + tmp4 * m31) -\n (tmp1 * m11 + tmp2 * m21 + tmp5 * m31);\n const t1 = (tmp1 * m01 + tmp6 * m21 + tmp9 * m31) -\n (tmp0 * m01 + tmp7 * m21 + tmp8 * m31);\n const t2 = (tmp2 * m01 + tmp7 * m11 + tmp10 * m31) -\n (tmp3 * m01 + tmp6 * m11 + tmp11 * m31);\n const t3 = (tmp5 * m01 + tmp8 * m11 + tmp11 * m21) -\n (tmp4 * m01 + tmp9 * m11 + tmp10 * m21);\n\n return m00 * t0 + m10 * t1 + m20 * t2 + m30 * t3;\n}\n\n/**\n * Computes the inverse of a 4-by-4 matrix. (same as inverse)\n * @param m - The matrix.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The inverse of m.\n */\nexport const invert = inverse;\n\n/**\n * Multiplies two 4-by-4 matrices with a on the left and b on the right\n * @param a - The matrix on the left.\n * @param b - The matrix on the right.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The matrix product of a and b.\n */\nexport function multiply(a: Mat4, b: Mat4, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n const a00 = a[0];\n const a01 = a[1];\n const a02 = a[2];\n const a03 = a[3];\n const a10 = a[ 4 + 0];\n const a11 = a[ 4 + 1];\n const a12 = a[ 4 + 2];\n const a13 = a[ 4 + 3];\n const a20 = a[ 8 + 0];\n const a21 = a[ 8 + 1];\n const a22 = a[ 8 + 2];\n const a23 = a[ 8 + 3];\n const a30 = a[12 + 0];\n const a31 = a[12 + 1];\n const a32 = a[12 + 2];\n const a33 = a[12 + 3];\n const b00 = b[0];\n const b01 = b[1];\n const b02 = b[2];\n const b03 = b[3];\n const b10 = b[ 4 + 0];\n const b11 = b[ 4 + 1];\n const b12 = b[ 4 + 2];\n const b13 = b[ 4 + 3];\n const b20 = b[ 8 + 0];\n const b21 = b[ 8 + 1];\n const b22 = b[ 8 + 2];\n const b23 = b[ 8 + 3];\n const b30 = b[12 + 0];\n const b31 = b[12 + 1];\n const b32 = b[12 + 2];\n const b33 = b[12 + 3];\n\n dst[ 0] = a00 * b00 + a10 * b01 + a20 * b02 + a30 * b03;\n dst[ 1] = a01 * b00 + a11 * b01 + a21 * b02 + a31 * b03;\n dst[ 2] = a02 * b00 + a12 * b01 + a22 * b02 + a32 * b03;\n dst[ 3] = a03 * b00 + a13 * b01 + a23 * b02 + a33 * b03;\n dst[ 4] = a00 * b10 + a10 * b11 + a20 * b12 + a30 * b13;\n dst[ 5] = a01 * b10 + a11 * b11 + a21 * b12 + a31 * b13;\n dst[ 6] = a02 * b10 + a12 * b11 + a22 * b12 + a32 * b13;\n dst[ 7] = a03 * b10 + a13 * b11 + a23 * b12 + a33 * b13;\n dst[ 8] = a00 * b20 + a10 * b21 + a20 * b22 + a30 * b23;\n dst[ 9] = a01 * b20 + a11 * b21 + a21 * b22 + a31 * b23;\n dst[10] = a02 * b20 + a12 * b21 + a22 * b22 + a32 * b23;\n dst[11] = a03 * b20 + a13 * b21 + a23 * b22 + a33 * b23;\n dst[12] = a00 * b30 + a10 * b31 + a20 * b32 + a30 * b33;\n dst[13] = a01 * b30 + a11 * b31 + a21 * b32 + a31 * b33;\n dst[14] = a02 * b30 + a12 * b31 + a22 * b32 + a32 * b33;\n dst[15] = a03 * b30 + a13 * b31 + a23 * b32 + a33 * b33;\n\n return dst;\n}\n\n/**\n * Multiplies two 4-by-4 matrices with a on the left and b on the right (same as multiply)\n * @param a - The matrix on the left.\n * @param b - The matrix on the right.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The matrix product of a and b.\n */\nexport const mul = multiply;\n\n/**\n * Sets the translation component of a 4-by-4 matrix to the given\n * vector.\n * @param a - The matrix.\n * @param v - The vector.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The matrix with translation set.\n */\nexport function setTranslation(a: Mat4, v: Vec3, dst?: Mat4): Mat4 {\n dst = dst || identity();\n if (a !== dst) {\n dst[ 0] = a[ 0];\n dst[ 1] = a[ 1];\n dst[ 2] = a[ 2];\n dst[ 3] = a[ 3];\n dst[ 4] = a[ 4];\n dst[ 5] = a[ 5];\n dst[ 6] = a[ 6];\n dst[ 7] = a[ 7];\n dst[ 8] = a[ 8];\n dst[ 9] = a[ 9];\n dst[10] = a[10];\n dst[11] = a[11];\n }\n dst[12] = v[0];\n dst[13] = v[1];\n dst[14] = v[2];\n dst[15] = 1;\n return dst;\n}\n\n/**\n * Returns the translation component of a 4-by-4 matrix as a vector with 3\n * entries.\n * @param m - The matrix.\n * @param dst - vector to hold result. If not passed a new one is created.\n * @returns The translation component of m.\n */\nexport function getTranslation(m: Mat4, dst?: Vec3): Vec3 {\n dst = dst || vec3.create();\n dst[0] = m[12];\n dst[1] = m[13];\n dst[2] = m[14];\n return dst;\n}\n\n/**\n * Returns an axis of a 4x4 matrix as a vector with 3 entries\n * @param m - The matrix.\n * @param axis - The axis 0 = x, 1 = y, 2 = z;\n * @returns The axis component of m.\n */\nexport function getAxis(m: Mat4, axis: number, dst?: Vec3): Vec3 {\n dst = dst || vec3.create();\n const off = axis * 4;\n dst[0] = m[off + 0];\n dst[1] = m[off + 1];\n dst[2] = m[off + 2];\n return dst;\n}\n\n/**\n * Sets an axis of a 4x4 matrix as a vector with 3 entries\n * @param m - The matrix.\n * @param v - the axis vector\n * @param axis - The axis 0 = x, 1 = y, 2 = z;\n * @param dst - The matrix to set. If not passed a new one is created.\n * @returns The matrix with axis set.\n */\nexport function setAxis(a: Mat4, v: Vec3, axis: number, dst: Mat4): Mat4 {\n if (dst !== a) {\n dst = copy(a, dst);\n }\n const off = axis * 4;\n dst[off + 0] = v[0];\n dst[off + 1] = v[1];\n dst[off + 2] = v[2];\n return dst;\n}\n\n/**\n * Returns the scaling component of the matrix\n * @param m - The Matrix\n * @param dst - The vector to set. If not passed a new one is created.\n */\nexport function getScaling(m: Mat4, dst?: Vec3): Vec3 {\n dst = dst || vec3.create();\n\n const xx = m[0];\n const xy = m[1];\n const xz = m[2];\n const yx = m[4];\n const yy = m[5];\n const yz = m[6];\n const zx = m[8];\n const zy = m[9];\n const zz = m[10];\n\n dst[0] = Math.sqrt(xx * xx + xy * xy + xz * xz);\n dst[1] = Math.sqrt(yx * yx + yy * yy + yz * yz);\n dst[2] = Math.sqrt(zx * zx + zy * zy + zz * zz);\n\n return dst;\n}\n\n/**\n * Computes a 4-by-4 perspective transformation matrix given the angular height\n * of the frustum, the aspect ratio, and the near and far clipping planes. The\n * arguments define a frustum extending in the negative z direction. The given\n * angle is the vertical angle of the frustum, and the horizontal angle is\n * determined to produce the given aspect ratio. The arguments near and far are\n * the distances to the near and far clipping planes. Note that near and far\n * are not z coordinates, but rather they are distances along the negative\n * z-axis. The matrix generated sends the viewing frustum to the unit box.\n * We assume a unit box extending from -1 to 1 in the x and y dimensions and\n * from 0 to 1 in the z dimension.\n *\n * Note: If you pass `Infinity` for zFar then it will produce a projection matrix\n * returns -Infinity for Z when transforming coordinates with Z <= 0 and +Infinity for Z\n * otherwise.\n *\n * @param fieldOfViewYInRadians - The camera angle from top to bottom (in radians).\n * @param aspect - The aspect ratio width / height.\n * @param zNear - The depth (negative z coordinate)\n * of the near clipping plane.\n * @param zFar - The depth (negative z coordinate)\n * of the far clipping plane.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The perspective matrix.\n */\nexport function perspective(fieldOfViewYInRadians: number, aspect: number, zNear: number, zFar: number, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n const f = Math.tan(Math.PI * 0.5 - 0.5 * fieldOfViewYInRadians);\n\n dst[0] = f / aspect;\n dst[1] = 0;\n dst[2] = 0;\n dst[3] = 0;\n\n dst[4] = 0;\n dst[5] = f;\n dst[6] = 0;\n dst[7] = 0;\n\n dst[8] = 0;\n dst[9] = 0;\n dst[11] = -1;\n\n dst[12] = 0;\n dst[13] = 0;\n dst[15] = 0;\n\n if (zFar === Infinity) {\n dst[10] = -1;\n dst[14] = -zNear;\n } else {\n const rangeInv = 1 / (zNear - zFar);\n dst[10] = zFar * rangeInv;\n dst[14] = zFar * zNear * rangeInv;\n }\n\n return dst;\n}\n\n/**\n * Computes a 4-by-4 orthogonal transformation matrix that transforms from\n * the given the left, right, bottom, and top dimensions to -1 +1 in x, and y\n * and 0 to +1 in z.\n * @param left - Left side of the near clipping plane viewport.\n * @param right - Right side of the near clipping plane viewport.\n * @param bottom - Bottom of the near clipping plane viewport.\n * @param top - Top of the near clipping plane viewport.\n * @param near - The depth (negative z coordinate)\n * of the near clipping plane.\n * @param far - The depth (negative z coordinate)\n * of the far clipping plane.\n * @param dst - Output matrix. If not passed a new one is created.\n * @returns The orthographic projection matrix.\n */\nexport function ortho(left: number, right: number, bottom: number, top: number, near: number, far: number, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n dst[0] = 2 / (right - left);\n dst[1] = 0;\n dst[2] = 0;\n dst[3] = 0;\n\n dst[4] = 0;\n dst[5] = 2 / (top - bottom);\n dst[6] = 0;\n dst[7] = 0;\n\n dst[8] = 0;\n dst[9] = 0;\n dst[10] = 1 / (near - far);\n dst[11] = 0;\n\n dst[12] = (right + left) / (left - right);\n dst[13] = (top + bottom) / (bottom - top);\n dst[14] = near / (near - far);\n dst[15] = 1;\n\n return dst;\n}\n\n/**\n * Computes a 4-by-4 perspective transformation matrix given the left, right,\n * top, bottom, near and far clipping planes. The arguments define a frustum\n * extending in the negative z direction. The arguments near and far are the\n * distances to the near and far clipping planes. Note that near and far are not\n * z coordinates, but rather they are distances along the negative z-axis. The\n * matrix generated sends the viewing frustum to the unit box. We assume a unit\n * box extending from -1 to 1 in the x and y dimensions and from 0 to 1 in the z\n * dimension.\n * @param left - The x coordinate of the left plane of the box.\n * @param right - The x coordinate of the right plane of the box.\n * @param bottom - The y coordinate of the bottom plane of the box.\n * @param top - The y coordinate of the right plane of the box.\n * @param near - The negative z coordinate of the near plane of the box.\n * @param far - The negative z coordinate of the far plane of the box.\n * @param dst - Output matrix. If not passed a new one is created.\n * @returns The perspective projection matrix.\n */\nexport function frustum(left: number, right: number, bottom: number, top: number, near: number, far: number, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n const dx = (right - left);\n const dy = (top - bottom);\n const dz = (near - far);\n\n dst[ 0] = 2 * near / dx;\n dst[ 1] = 0;\n dst[ 2] = 0;\n dst[ 3] = 0;\n dst[ 4] = 0;\n dst[ 5] = 2 * near / dy;\n dst[ 6] = 0;\n dst[ 7] = 0;\n dst[ 8] = (left + right) / dx;\n dst[ 9] = (top + bottom) / dy;\n dst[10] = far / dz;\n dst[11] = -1;\n dst[12] = 0;\n dst[13] = 0;\n dst[14] = near * far / dz;\n dst[15] = 0;\n\n return dst;\n}\n\nlet xAxis: Vec3;\nlet yAxis: Vec3;\nlet zAxis: Vec3;\n\n/**\n * Computes a 4-by-4 aim transformation.\n *\n * This is a matrix which positions an object aiming down positive Z.\n * toward the target.\n *\n * Note: this is **NOT** the inverse of lookAt as lookAt looks at negative Z.\n *\n * @param position - The position of the object.\n * @param target - The position meant to be aimed at.\n * @param up - A vector pointing up.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The aim matrix.\n */\nexport function aim(position: Vec3, target: Vec3, up: Vec3, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n xAxis = xAxis || vec3.create();\n yAxis = yAxis || vec3.create();\n zAxis = zAxis || vec3.create();\n\n vec3.normalize(vec3.subtract(target, position, zAxis), zAxis);\n vec3.normalize(vec3.cross(up, zAxis, xAxis), xAxis);\n vec3.normalize(vec3.cross(zAxis, xAxis, yAxis), yAxis);\n\n dst[ 0] = xAxis[0]; dst[ 1] = xAxis[1]; dst[ 2] = xAxis[2]; dst[ 3] = 0;\n dst[ 4] = yAxis[0]; dst[ 5] = yAxis[1]; dst[ 6] = yAxis[2]; dst[ 7] = 0;\n dst[ 8] = zAxis[0]; dst[ 9] = zAxis[1]; dst[10] = zAxis[2]; dst[11] = 0;\n dst[12] = position[0]; dst[13] = position[1]; dst[14] = position[2]; dst[15] = 1;\n\n return dst;\n}\n\n/**\n * Computes a 4-by-4 camera aim transformation.\n *\n * This is a matrix which positions an object aiming down negative Z.\n * toward the target.\n *\n * Note: this is the inverse of `lookAt`\n *\n * @param eye - The position of the object.\n * @param target - The position meant to be aimed at.\n * @param up - A vector pointing up.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The aim matrix.\n */\nexport function cameraAim(eye: Vec3, target: Vec3, up: Vec3, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n xAxis = xAxis || vec3.create();\n yAxis = yAxis || vec3.create();\n zAxis = zAxis || vec3.create();\n\n vec3.normalize(vec3.subtract(eye, target, zAxis), zAxis);\n vec3.normalize(vec3.cross(up, zAxis, xAxis), xAxis);\n vec3.normalize(vec3.cross(zAxis, xAxis, yAxis), yAxis);\n\n dst[ 0] = xAxis[0]; dst[ 1] = xAxis[1]; dst[ 2] = xAxis[2]; dst[ 3] = 0;\n dst[ 4] = yAxis[0]; dst[ 5] = yAxis[1]; dst[ 6] = yAxis[2]; dst[ 7] = 0;\n dst[ 8] = zAxis[0]; dst[ 9] = zAxis[1]; dst[10] = zAxis[2]; dst[11] = 0;\n dst[12] = eye[0]; dst[13] = eye[1]; dst[14] = eye[2]; dst[15] = 1;\n\n return dst;\n}\n\n/**\n * Computes a 4-by-4 view transformation.\n *\n * This is a view matrix which transforms all other objects\n * to be in the space of the view defined by the parameters.\n *\n * @param eye - The position of the object.\n * @param target - The position meant to be aimed at.\n * @param up - A vector pointing up.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The look-at matrix.\n */\nexport function lookAt(eye: Vec3, target: Vec3, up: Vec3, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n xAxis = xAxis || vec3.create();\n yAxis = yAxis || vec3.create();\n zAxis = zAxis || vec3.create();\n\n vec3.normalize(vec3.subtract(eye, target, zAxis), zAxis);\n vec3.normalize(vec3.cross(up, zAxis, xAxis), xAxis);\n vec3.normalize(vec3.cross(zAxis, xAxis, yAxis), yAxis);\n\n dst[ 0] = xAxis[0]; dst[ 1] = yAxis[0]; dst[ 2] = zAxis[0]; dst[ 3] = 0;\n dst[ 4] = xAxis[1]; dst[ 5] = yAxis[1]; dst[ 6] = zAxis[1]; dst[ 7] = 0;\n dst[ 8] = xAxis[2]; dst[ 9] = yAxis[2]; dst[10] = zAxis[2]; dst[11] = 0;\n\n dst[12] = -(xAxis[0] * eye[0] + xAxis[1] * eye[1] + xAxis[2] * eye[2]);\n dst[13] = -(yAxis[0] * eye[0] + yAxis[1] * eye[1] + yAxis[2] * eye[2]);\n dst[14] = -(zAxis[0] * eye[0] + zAxis[1] * eye[1] + zAxis[2] * eye[2]);\n dst[15] = 1;\n\n return dst;\n}\n\n/**\n * Creates a 4-by-4 matrix which translates by the given vector v.\n * @param v - The vector by\n * which to translate.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The translation matrix.\n */\nexport function translation(v: Vec3, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n dst[ 0] = 1; dst[ 1] = 0; dst[ 2] = 0; dst[ 3] = 0;\n dst[ 4] = 0; dst[ 5] = 1; dst[ 6] = 0; dst[ 7] = 0;\n dst[ 8] = 0; dst[ 9] = 0; dst[10] = 1; dst[11] = 0;\n dst[12] = v[0]; dst[13] = v[1]; dst[14] = v[2]; dst[15] = 1;\n\n return dst;\n}\n\n/**\n * Translates the given 4-by-4 matrix by the given vector v.\n * @param m - The matrix.\n * @param v - The vector by\n * which to translate.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The translated matrix.\n */\nexport function translate(m: Mat4, v: Vec3, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n const m00 = m[0];\n const m01 = m[1];\n const m02 = m[2];\n const m03 = m[3];\n const m10 = m[1 * 4 + 0];\n const m11 = m[1 * 4 + 1];\n const m12 = m[1 * 4 + 2];\n const m13 = m[1 * 4 + 3];\n const m20 = m[2 * 4 + 0];\n const m21 = m[2 * 4 + 1];\n const m22 = m[2 * 4 + 2];\n const m23 = m[2 * 4 + 3];\n const m30 = m[3 * 4 + 0];\n const m31 = m[3 * 4 + 1];\n const m32 = m[3 * 4 + 2];\n const m33 = m[3 * 4 + 3];\n\n if (m !== dst) {\n dst[ 0] = m00;\n dst[ 1] = m01;\n dst[ 2] = m02;\n dst[ 3] = m03;\n dst[ 4] = m10;\n dst[ 5] = m11;\n dst[ 6] = m12;\n dst[ 7] = m13;\n dst[ 8] = m20;\n dst[ 9] = m21;\n dst[10] = m22;\n dst[11] = m23;\n }\n\n dst[12] = m00 * v0 + m10 * v1 + m20 * v2 + m30;\n dst[13] = m01 * v0 + m11 * v1 + m21 * v2 + m31;\n dst[14] = m02 * v0 + m12 * v1 + m22 * v2 + m32;\n dst[15] = m03 * v0 + m13 * v1 + m23 * v2 + m33;\n\n return dst;\n}\n\n/**\n * Creates a 4-by-4 matrix which rotates around the x-axis by the given angle.\n * @param angleInRadians - The angle by which to rotate (in radians).\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The rotation matrix.\n */\nexport function rotationX(angleInRadians: number, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n const c = Math.cos(angleInRadians);\n const s = Math.sin(angleInRadians);\n\n dst[ 0] = 1; dst[ 1] = 0; dst[ 2] = 0; dst[ 3] = 0;\n dst[ 4] = 0; dst[ 5] = c; dst[ 6] = s; dst[ 7] = 0;\n dst[ 8] = 0; dst[ 9] = -s; dst[10] = c; dst[11] = 0;\n dst[12] = 0; dst[13] = 0; dst[14] = 0; dst[15] = 1;\n\n return dst;\n}\n\n/**\n * Rotates the given 4-by-4 matrix around the x-axis by the given\n * angle.\n * @param m - The matrix.\n * @param angleInRadians - The angle by which to rotate (in radians).\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The rotated matrix.\n */\nexport function rotateX(m: Mat4, angleInRadians: number, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n const m10 = m[4];\n const m11 = m[5];\n const m12 = m[6];\n const m13 = m[7];\n const m20 = m[8];\n const m21 = m[9];\n const m22 = m[10];\n const m23 = m[11];\n const c = Math.cos(angleInRadians);\n const s = Math.sin(angleInRadians);\n\n dst[4] = c * m10 + s * m20;\n dst[5] = c * m11 + s * m21;\n dst[6] = c * m12 + s * m22;\n dst[7] = c * m13 + s * m23;\n dst[8] = c * m20 - s * m10;\n dst[9] = c * m21 - s * m11;\n dst[10] = c * m22 - s * m12;\n dst[11] = c * m23 - s * m13;\n\n if (m !== dst) {\n dst[ 0] = m[ 0];\n dst[ 1] = m[ 1];\n dst[ 2] = m[ 2];\n dst[ 3] = m[ 3];\n dst[12] = m[12];\n dst[13] = m[13];\n dst[14] = m[14];\n dst[15] = m[15];\n }\n\n return dst;\n}\n\n/**\n * Creates a 4-by-4 matrix which rotates around the y-axis by the given angle.\n * @param angleInRadians - The angle by which to rotate (in radians).\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The rotation matrix.\n */\nexport function rotationY(angleInRadians: number, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n const c = Math.cos(angleInRadians);\n const s = Math.sin(angleInRadians);\n\n dst[ 0] = c; dst[ 1] = 0; dst[ 2] = -s; dst[ 3] = 0;\n dst[ 4] = 0; dst[ 5] = 1; dst[ 6] = 0; dst[ 7] = 0;\n dst[ 8] = s; dst[ 9] = 0; dst[10] = c; dst[11] = 0;\n dst[12] = 0; dst[13] = 0; dst[14] = 0; dst[15] = 1;\n\n return dst;\n}\n\n/**\n * Rotates the given 4-by-4 matrix around the y-axis by the given\n * angle.\n * @param m - The matrix.\n * @param angleInRadians - The angle by which to rotate (in radians).\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The rotated matrix.\n */\nexport function rotateY(m: Mat4, angleInRadians: number, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n const m00 = m[0 * 4 + 0];\n const m01 = m[0 * 4 + 1];\n const m02 = m[0 * 4 + 2];\n const m03 = m[0 * 4 + 3];\n const m20 = m[2 * 4 + 0];\n const m21 = m[2 * 4 + 1];\n const m22 = m[2 * 4 + 2];\n const m23 = m[2 * 4 + 3];\n const c = Math.cos(angleInRadians);\n const s = Math.sin(angleInRadians);\n\n dst[ 0] = c * m00 - s * m20;\n dst[ 1] = c * m01 - s * m21;\n dst[ 2] = c * m02 - s * m22;\n dst[ 3] = c * m03 - s * m23;\n dst[ 8] = c * m20 + s * m00;\n dst[ 9] = c * m21 + s * m01;\n dst[10] = c * m22 + s * m02;\n dst[11] = c * m23 + s * m03;\n\n if (m !== dst) {\n dst[ 4] = m[ 4];\n dst[ 5] = m[ 5];\n dst[ 6] = m[ 6];\n dst[ 7] = m[ 7];\n dst[12] = m[12];\n dst[13] = m[13];\n dst[14] = m[14];\n dst[15] = m[15];\n }\n\n return dst;\n}\n\n/**\n * Creates a 4-by-4 matrix which rotates around the z-axis by the given angle.\n * @param angleInRadians - The angle by which to rotate (in radians).\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The rotation matrix.\n */\nexport function rotationZ(angleInRadians: number, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n const c = Math.cos(angleInRadians);\n const s = Math.sin(angleInRadians);\n\n dst[ 0] = c; dst[ 1] = s; dst[ 2] = 0; dst[ 3] = 0;\n dst[ 4] = -s; dst[ 5] = c; dst[ 6] = 0; dst[ 7] = 0;\n dst[ 8] = 0; dst[ 9] = 0; dst[10] = 1; dst[11] = 0;\n dst[12] = 0; dst[13] = 0; dst[14] = 0; dst[15] = 1;\n\n return dst;\n}\n\n/**\n * Rotates the given 4-by-4 matrix around the z-axis by the given\n * angle.\n * @param m - The matrix.\n * @param angleInRadians - The angle by which to rotate (in radians).\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The rotated matrix.\n */\nexport function rotateZ(m: Mat4, angleInRadians: number, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n const m00 = m[0 * 4 + 0];\n const m01 = m[0 * 4 + 1];\n const m02 = m[0 * 4 + 2];\n const m03 = m[0 * 4 + 3];\n const m10 = m[1 * 4 + 0];\n const m11 = m[1 * 4 + 1];\n const m12 = m[1 * 4 + 2];\n const m13 = m[1 * 4 + 3];\n const c = Math.cos(angleInRadians);\n const s = Math.sin(angleInRadians);\n\n dst[ 0] = c * m00 + s * m10;\n dst[ 1] = c * m01 + s * m11;\n dst[ 2] = c * m02 + s * m12;\n dst[ 3] = c * m03 + s * m13;\n dst[ 4] = c * m10 - s * m00;\n dst[ 5] = c * m11 - s * m01;\n dst[ 6] = c * m12 - s * m02;\n dst[ 7] = c * m13 - s * m03;\n\n if (m !== dst) {\n dst[ 8] = m[ 8];\n dst[ 9] = m[ 9];\n dst[10] = m[10];\n dst[11] = m[11];\n dst[12] = m[12];\n dst[13] = m[13];\n dst[14] = m[14];\n dst[15] = m[15];\n }\n\n return dst;\n}\n\n/**\n * Creates a 4-by-4 matrix which rotates around the given axis by the given\n * angle.\n * @param axis - The axis\n * about which to rotate.\n * @param angleInRadians - The angle by which to rotate (in radians).\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns A matrix which rotates angle radians\n * around the axis.\n */\nexport function axisRotation(axis: Vec3, angleInRadians: number, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n let x = axis[0];\n let y = axis[1];\n let z = axis[2];\n const n = Math.sqrt(x * x + y * y + z * z);\n x /= n;\n y /= n;\n z /= n;\n const xx = x * x;\n const yy = y * y;\n const zz = z * z;\n const c = Math.cos(angleInRadians);\n const s = Math.sin(angleInRadians);\n const oneMinusCosine = 1 - c;\n\n dst[ 0] = xx + (1 - xx) * c;\n dst[ 1] = x * y * oneMinusCosine + z * s;\n dst[ 2] = x * z * oneMinusCosine - y * s;\n dst[ 3] = 0;\n dst[ 4] = x * y * oneMinusCosine - z * s;\n dst[ 5] = yy + (1 - yy) * c;\n dst[ 6] = y * z * oneMinusCosine + x * s;\n dst[ 7] = 0;\n dst[ 8] = x * z * oneMinusCosine + y * s;\n dst[ 9] = y * z * oneMinusCosine - x * s;\n dst[10] = zz + (1 - zz) * c;\n dst[11] = 0;\n dst[12] = 0;\n dst[13] = 0;\n dst[14] = 0;\n dst[15] = 1;\n\n return dst;\n}\n\n/**\n * Creates a 4-by-4 matrix which rotates around the given axis by the given\n * angle. (same as axisRotation)\n * @param axis - The axis\n * about which to rotate.\n * @param angleInRadians - The angle by which to rotate (in radians).\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns A matrix which rotates angle radians\n * around the axis.\n */\nexport const rotation = axisRotation;\n\n/**\n * Rotates the given 4-by-4 matrix around the given axis by the\n * given angle.\n * @param m - The matrix.\n * @param axis - The axis\n * about which to rotate.\n * @param angleInRadians - The angle by which to rotate (in radians).\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The rotated matrix.\n */\nexport function axisRotate(m: Mat4, axis: Vec3, angleInRadians: number, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n let x = axis[0];\n let y = axis[1];\n let z = axis[2];\n const n = Math.sqrt(x * x + y * y + z * z);\n x /= n;\n y /= n;\n z /= n;\n const xx = x * x;\n const yy = y * y;\n const zz = z * z;\n const c = Math.cos(angleInRadians);\n const s = Math.sin(angleInRadians);\n const oneMinusCosine = 1 - c;\n\n const r00 = xx + (1 - xx) * c;\n const r01 = x * y * oneMinusCosine + z * s;\n const r02 = x * z * oneMinusCosine - y * s;\n const r10 = x * y * oneMinusCosine - z * s;\n const r11 = yy + (1 - yy) * c;\n const r12 = y * z * oneMinusCosine + x * s;\n const r20 = x * z * oneMinusCosine + y * s;\n const r21 = y * z * oneMinusCosine - x * s;\n const r22 = zz + (1 - zz) * c;\n\n const m00 = m[0];\n const m01 = m[1];\n const m02 = m[2];\n const m03 = m[3];\n const m10 = m[4];\n const m11 = m[5];\n const m12 = m[6];\n const m13 = m[7];\n const m20 = m[8];\n const m21 = m[9];\n const m22 = m[10];\n const m23 = m[11];\n\n dst[ 0] = r00 * m00 + r01 * m10 + r02 * m20;\n dst[ 1] = r00 * m01 + r01 * m11 + r02 * m21;\n dst[ 2] = r00 * m02 + r01 * m12 + r02 * m22;\n dst[ 3] = r00 * m03 + r01 * m13 + r02 * m23;\n dst[ 4] = r10 * m00 + r11 * m10 + r12 * m20;\n dst[ 5] = r10 * m01 + r11 * m11 + r12 * m21;\n dst[ 6] = r10 * m02 + r11 * m12 + r12 * m22;\n dst[ 7] = r10 * m03 + r11 * m13 + r12 * m23;\n dst[ 8] = r20 * m00 + r21 * m10 + r22 * m20;\n dst[ 9] = r20 * m01 + r21 * m11 + r22 * m21;\n dst[10] = r20 * m02 + r21 * m12 + r22 * m22;\n dst[11] = r20 * m03 + r21 * m13 + r22 * m23;\n\n if (m !== dst) {\n dst[12] = m[12];\n dst[13] = m[13];\n dst[14] = m[14];\n dst[15] = m[15];\n }\n\n return dst;\n}\n\n/**\n * Rotates the given 4-by-4 matrix around the given axis by the\n * given angle. (same as rotate)\n * @param m - The matrix.\n * @param axis - The axis\n * about which to rotate.\n * @param angleInRadians - The angle by which to rotate (in radians).\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The rotated matrix.\n */\nexport const rotate = axisRotate;\n\n/**\n * Creates a 4-by-4 matrix which scales in each dimension by an amount given by\n * the corresponding entry in the given vector; assumes the vector has three\n * entries.\n * @param v - A vector of\n * three entries specifying the factor by which to scale in each dimension.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The scaling matrix.\n */\nexport function scaling(v: Vec3, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n dst[ 0] = v[0]; dst[ 1] = 0; dst[ 2] = 0; dst[ 3] = 0;\n dst[ 4] = 0; dst[ 5] = v[1]; dst[ 6] = 0; dst[ 7] = 0;\n dst[ 8] = 0; dst[ 9] = 0; dst[10] = v[2]; dst[11] = 0;\n dst[12] = 0; dst[13] = 0; dst[14] = 0; dst[15] = 1;\n\n return dst;\n}\n\n/**\n * Scales the given 4-by-4 matrix in each dimension by an amount\n * given by the corresponding entry in the given vector; assumes the vector has\n * three entries.\n * @param m - The matrix to be modified.\n * @param v - A vector of three entries specifying the\n * factor by which to scale in each dimension.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The scaled matrix.\n */\nexport function scale(m: Mat4, v: Vec3, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n\n dst[ 0] = v0 * m[0 * 4 + 0];\n dst[ 1] = v0 * m[0 * 4 + 1];\n dst[ 2] = v0 * m[0 * 4 + 2];\n dst[ 3] = v0 * m[0 * 4 + 3];\n dst[ 4] = v1 * m[1 * 4 + 0];\n dst[ 5] = v1 * m[1 * 4 + 1];\n dst[ 6] = v1 * m[1 * 4 + 2];\n dst[ 7] = v1 * m[1 * 4 + 3];\n dst[ 8] = v2 * m[2 * 4 + 0];\n dst[ 9] = v2 * m[2 * 4 + 1];\n dst[10] = v2 * m[2 * 4 + 2];\n dst[11] = v2 * m[2 * 4 + 3];\n\n if (m !== dst) {\n dst[12] = m[12];\n dst[13] = m[13];\n dst[14] = m[14];\n dst[15] = m[15];\n }\n\n return dst;\n}\n\n/**\n * Creates a 4-by-4 matrix which scales a uniform amount in each dimension.\n * @param s - the amount to scale\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The scaling matrix.\n */\nexport function uniformScaling(s: number, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n dst[ 0] = s; dst[ 1] = 0; dst[ 2] = 0; dst[ 3] = 0;\n dst[ 4] = 0; dst[ 5] = s; dst[ 6] = 0; dst[ 7] = 0;\n dst[ 8] = 0; dst[ 9] = 0; dst[10] = s; dst[11] = 0;\n dst[12] = 0; dst[13] = 0; dst[14] = 0; dst[15] = 1;\n\n return dst;\n}\n\n/**\n * Scales the given 4-by-4 matrix in each dimension by a uniform scale.\n * @param m - The matrix to be modified.\n * @param s - The amount to scale.\n * @param dst - matrix to hold result. If not passed a new one is created.\n * @returns The scaled matrix.\n */\nexport function uniformScale(m: Mat4, s: number, dst?: Mat4): Mat4 {\n dst = dst || new MatType(16);\n\n dst[ 0] = s * m[0 * 4 + 0];\n dst[ 1] = s * m[0 * 4 + 1];\n dst[ 2] = s * m[0 * 4 + 2];\n dst[ 3] = s * m[0 * 4 + 3];\n dst[ 4] = s * m[1 * 4 + 0];\n dst[ 5] = s * m[1 * 4 + 1];\n dst[ 6] = s * m[1 * 4 + 2];\n dst[ 7] = s * m[1 * 4 + 3];\n dst[ 8] = s * m[2 * 4 + 0];\n dst[ 9] = s * m[2 * 4 + 1];\n dst[10] = s * m[2 * 4 + 2];\n dst[11] = s * m[2 * 4 + 3];\n\n if (m !== dst) {\n dst[12] = m[12];\n dst[13] = m[13];\n dst[14] = m[14];\n dst[15] = m[15];\n }\n\n return dst;\n}","/*\n * Copyright 2022 Gregg Tavares\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n */\n\n/**\n * A JavaScript array with 4 values, Float32Array with 4 values, or a Float64Array with 4 values.\n * When created by the library will create the default type which is `Float32Array`\n * but can be set by calling {@link quat.setDefaultType}.\n */\nexport type Quat = number[] | Float32Array | Float64Array;\n\n/**\n *\n * Quat4 math functions.\n *\n * Almost all functions take an optional `dst` argument. If it is not passed in the\n * functions will create a new `Quat4`. In other words you can do this\n *\n * const v = quat4.cross(v1, v2); // Creates a new Quat4 with the cross product of v1 x v2.\n *\n * or\n *\n * const v = quat4.create();\n * quat4.cross(v1, v2, v); // Puts the cross product of v1 x v2 in v\n *\n * The first style is often easier but depending on where it's used it generates garbage where\n * as there is almost never allocation with the second style.\n *\n * It is always safe to pass any vector as the destination. So for example\n *\n * quat4.cross(v1, v2, v1); // Puts the cross product of v1 x v2 in v1\n *\n */\n\nexport let QuatType: new (n: number) => Quat = Float32Array;\n\n/**\n * Sets the type this library creates for a Quat4\n * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array`\n * @returns previous constructor for Quat4\n */\nexport function setDefaultType(ctor: new (n: number) => Quat) {\n const oldType = QuatType;\n QuatType = ctor;\n return oldType;\n}\n\n/**\n * Creates a quat4; may be called with x, y, z to set initial values.\n * @param x - Initial x value.\n * @param y - Initial y value.\n * @param z - Initial z value.\n * @param w - Initial w value.\n * @returns the created vector\n */\nexport function create(x?: number, y?: number, z?: number, w?: number): Quat {\n const dst = new QuatType(4);\n if (x !== undefined) {\n dst[0] = x;\n if (y !== undefined) {\n dst[1] = y;\n if (z !== undefined) {\n dst[2] = z;\n if (w !== undefined) {\n dst[3] = w;\n }\n }\n }\n }\n return dst;\n}","/*\n * Copyright 2022 Gregg Tavares\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n */\nimport * as utils from './utils.js';\nimport { Quat, create, setDefaultType, QuatType } from './quat';\nimport { Mat3 } from './mat3.js';\nimport { Mat4 } from './mat4.js';\nimport { Vec3 } from './vec3.js';\nimport * as vec3 from './vec3-impl.js';\n\nexport type RotationOrder = 'xyz' | 'xzy' | 'yxz' | 'yzx' | 'zxy' | 'zyx';\n\nexport default Quat;\nexport { create, setDefaultType };\n\n/**\n * Creates a Quat; may be called with x, y, z to set initial values. (same as create)\n * @param x - Initial x value.\n * @param y - Initial y value.\n * @param z - Initial z value.\n * @param z - Initial w value.\n * @returns the created vector\n */\nexport const fromValues = create;\n\n/**\n * Sets the values of a Quat\n * Also see {@link quat.create} and {@link quat.copy}\n *\n * @param x first value\n * @param y second value\n * @param z third value\n * @param w fourth value\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector with its elements set.\n */\nexport function set(x: number, y: number, z: number, w: number, dst?: Quat) {\n dst = dst || new QuatType(4);\n\n dst[0] = x;\n dst[1] = y;\n dst[2] = z;\n dst[3] = w;\n\n return dst;\n}\n\n/**\n * Sets a quaternion from the given angle and axis,\n * then returns it.\n *\n * @param axis - the axis to rotate around\n * @param angleInRadians - the angle\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns The quaternion that represents the given axis and angle\n **/\nexport function fromAxisAngle(axis: Vec3, angleInRadians: number, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n const halfAngle = angleInRadians * 0.5;\n const s = Math.sin(halfAngle);\n\n dst[0] = s * axis[0];\n dst[1] = s * axis[1];\n dst[2] = s * axis[2];\n dst[3] = Math.cos(halfAngle);\n\n return dst;\n}\n\n/**\n * Gets the rotation axis and angle\n * @param q - quaternion to compute from\n * @param dst - Vec3 to hold result. If not passed in a new one is created.\n * @return angle and axis\n */\nexport function toAxisAngle(q: Quat, dst?: Vec3): { angle: number, axis: Vec3 } {\n dst = dst || vec3.create(4);\n\n const angle = Math.acos(q[3]) * 2;\n const s = Math.sin(angle * 0.5);\n if (s > utils.EPSILON) {\n dst[0] = q[0] / s;\n dst[1] = q[1] / s;\n dst[2] = q[2] / s;\n } else {\n dst[0] = 1;\n dst[1] = 0;\n dst[2] = 0;\n }\n\n return { angle, axis: dst };\n}\n\n/**\n * Returns the angle in degrees between two rotations a and b.\n * @param a - quaternion a\n * @param b - quaternion b\n * @return angle in radians between the two quaternions\n */\nexport function angle(a: Quat, b: Quat) {\n const d = dot(a, b);\n return Math.acos(2 * d * d - 1);\n}\n\n/**\n * Multiplies two quaternions\n *\n * @param a - the first quaternion\n * @param b - the second quaternion\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns A quaternion that is the result of a * b\n */\nexport function multiply(a: Quat, b: Quat, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n const ax = a[0];\n const ay = a[1];\n const az = a[2];\n const aw = a[3];\n\n const bx = b[0];\n const by = b[1];\n const bz = b[2];\n const bw = b[3];\n\n dst[0] = ax * bw + aw * bx + ay * bz - az * by;\n dst[1] = ay * bw + aw * by + az * bx - ax * bz;\n dst[2] = az * bw + aw * bz + ax * by - ay * bx;\n dst[3] = aw * bw - ax * bx - ay * by - az * bz;\n\n return dst;\n}\n\n/**\n * Multiplies two quaternions\n *\n * @param a - the first quaternion\n * @param b - the second quaternion\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns A quaternion that is the result of a * b\n */\nexport const mul = multiply;\n\n/**\n * Rotates the given quaternion around the X axis by the given angle.\n * @param q - quaternion to rotate\n * @param angleInRadians - The angle by which to rotate\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns A quaternion that is the result of a * b\n */\nexport function rotateX(q: Quat, angleInRadians: number, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n const halfAngle = angleInRadians * 0.5;\n\n const qx = q[0];\n const qy = q[1];\n const qz = q[2];\n const qw = q[3];\n\n const bx = Math.sin(halfAngle);\n const bw = Math.cos(halfAngle);\n\n dst[0] = qx * bw + qw * bx;\n dst[1] = qy * bw + qz * bx;\n dst[2] = qz * bw - qy * bx;\n dst[3] = qw * bw - qx * bx;\n\n return dst;\n}\n\n/**\n * Rotates the given quaternion around the Y axis by the given angle.\n * @param q - quaternion to rotate\n * @param angleInRadians - The angle by which to rotate\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns A quaternion that is the result of a * b\n */\nexport function rotateY(q: Quat, angleInRadians: number, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n const halfAngle = angleInRadians * 0.5;\n\n const qx = q[0];\n const qy = q[1];\n const qz = q[2];\n const qw = q[3];\n\n const by = Math.sin(halfAngle);\n const bw = Math.cos(halfAngle);\n\n dst[0] = qx * bw - qz * by;\n dst[1] = qy * bw + qw * by;\n dst[2] = qz * bw + qx * by;\n dst[3] = qw * bw - qy * by;\n\n return dst;\n}\n\n/**\n * Rotates the given quaternion around the Z axis by the given angle.\n * @param q - quaternion to rotate\n * @param angleInRadians - The angle by which to rotate\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns A quaternion that is the result of a * b\n */\nexport function rotateZ(q: Quat, angleInRadians: number, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n const halfAngle = angleInRadians * 0.5;\n\n const qx = q[0];\n const qy = q[1];\n const qz = q[2];\n const qw = q[3];\n\n const bz = Math.sin(halfAngle);\n const bw = Math.cos(halfAngle);\n\n dst[0] = qx * bw + qy * bz;\n dst[1] = qy * bw - qx * bz;\n dst[2] = qz * bw + qw * bz;\n dst[3] = qw * bw - qz * bz;\n\n return dst;\n}\n\n/**\n * Spherically linear interpolate between two quaternions\n *\n * @param a - starting value\n * @param b - ending value\n * @param t - value where 0 = a and 1 = b\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns A quaternion that is the result of a * b\n */\nexport function slerp(a: Quat, b: Quat, t: number, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n const ax = a[0];\n const ay = a[1];\n const az = a[2];\n const aw = a[3];\n\n let bx = b[0];\n let by = b[1];\n let bz = b[2];\n let bw = b[3];\n\n let cosOmega = ax * bx + ay * by + az * bz + aw * bw;\n\n if (cosOmega < 0) {\n cosOmega = -cosOmega;\n bx = -bx;\n by = -by;\n bz = -bz;\n bw = -bw;\n }\n\n let scale0;\n let scale1;\n\n if (1.0 - cosOmega > utils.EPSILON) {\n const omega = Math.acos(cosOmega);\n const sinOmega = Math.sin(omega);\n scale0 = Math.sin((1 - t) * omega) / sinOmega;\n scale1 = Math.sin(t * omega) / sinOmega;\n } else {\n scale0 = 1.0 - t;\n scale1 = t;\n }\n\n dst[0] = scale0 * ax + scale1 * bx;\n dst[1] = scale0 * ay + scale1 * by;\n dst[2] = scale0 * az + scale1 * bz;\n dst[3] = scale0 * aw + scale1 * bw;\n\n return dst;\n}\n\n/**\n * Compute the inverse of a quaternion\n *\n * @param q - quaternion to compute the inverse of\n * @returns A quaternion that is the result of a * b\n */\nexport function inverse(q: Quat, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n const a0 = q[0];\n const a1 = q[1];\n const a2 = q[2];\n const a3 = q[3];\n\n const dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\n const invDot = dot ? 1 / dot : 0;\n\n dst[0] = -a0 * invDot;\n dst[1] = -a1 * invDot;\n dst[2] = -a2 * invDot;\n dst[3] = a3 * invDot;\n\n return dst;\n}\n\n/**\n * Compute the conjugate of a quaternion\n * For quaternions with a magnitude of 1 (a unit quaternion)\n * this returns the same as the inverse but is faster to calculate.\n *\n * @param q - quaternion to compute the conjugate of.\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns The conjugate of q\n */\nexport function conjugate(q: Quat, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n dst[0] = -q[0];\n dst[1] = -q[1];\n dst[2] = -q[2];\n dst[3] = q[3];\n\n return dst;\n}\n\n/**\n * Creates a quaternion from the given rotation matrix.\n *\n * The created quaternion is not normalized.\n *\n * @param m - rotation matrix\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns the result\n */\nexport function fromMat(m: Mat3 | Mat4, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n /*\n 0 1 2\n 3 4 5\n 6 7 8\n\n 0 1 2\n 4 5 6\n 8 9 10\n */\n\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\n // article \"Quaternion Calculus and Fast Animation\".\n const trace = m[0] + m[5] + m[10];\n\n if (trace > 0.0) {\n // |w| > 1/2, may as well choose w > 1/2\n const root = Math.sqrt(trace + 1); // 2w\n dst[3] = 0.5 * root;\n const invRoot = 0.5 / root; // 1/(4w)\n\n dst[0] = (m[6] - m[9]) * invRoot;\n dst[1] = (m[8] - m[2]) * invRoot;\n dst[2] = (m[1] - m[4]) * invRoot;\n } else {\n // |w| <= 1/2\n let i = 0;\n\n if (m[5] > m[0]) {\n i = 1;\n }\n if (m[10] > m[i * 4 + i]) {\n i = 2;\n }\n\n const j = (i + 1) % 3;\n const k = (i + 2) % 3;\n\n const root = Math.sqrt(m[i * 4 + i] - m[j * 4 + j] - m[k * 4 + k] + 1.0);\n dst[i] = 0.5 * root;\n\n const invRoot = 0.5 / root;\n\n dst[3] = (m[j * 4 + k] - m[k * 4 + j]) * invRoot;\n dst[j] = (m[j * 4 + i] + m[i * 4 + j]) * invRoot;\n dst[k] = (m[k * 4 + i] + m[i * 4 + k]) * invRoot;\n }\n\n return dst;\n}\n\n/**\n * Creates a quaternion from the given euler angle x, y, z using the provided intrinsic order for the conversion.\n *\n * @param xAngleInRadians - angle to rotate around X axis in radians.\n * @param yAngleInRadians - angle to rotate around Y axis in radians.\n * @param zAngleInRadians - angle to rotate around Z axis in radians.\n * @param order - order to apply euler angles\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns A quaternion representing the same rotation as the euler angles applied in the given order\n */\nexport function fromEuler(\n xAngleInRadians: number,\n yAngleInRadians: number,\n zAngleInRadians: number,\n order: RotationOrder,\n dst?: Quat) {\n dst = dst || new QuatType(4);\n\n const xHalfAngle = xAngleInRadians * 0.5;\n const yHalfAngle = yAngleInRadians * 0.5;\n const zHalfAngle = zAngleInRadians * 0.5;\n\n const sx = Math.sin(xHalfAngle);\n const cx = Math.cos(xHalfAngle);\n const sy = Math.sin(yHalfAngle);\n const cy = Math.cos(yHalfAngle);\n const sz = Math.sin(zHalfAngle);\n const cz = Math.cos(zHalfAngle);\n\n switch (order) {\n case 'xyz':\n dst[0] = sx * cy * cz + cx * sy * sz;\n dst[1] = cx * sy * cz - sx * cy * sz;\n dst[2] = cx * cy * sz + sx * sy * cz;\n dst[3] = cx * cy * cz - sx * sy * sz;\n break;\n\n case 'xzy':\n dst[0] = sx * cy * cz - cx * sy * sz;\n dst[1] = cx * sy * cz - sx * cy * sz;\n dst[2] = cx * cy * sz + sx * sy * cz;\n dst[3] = cx * cy * cz + sx * sy * sz;\n break;\n\n case 'yxz':\n dst[0] = sx * cy * cz + cx * sy * sz;\n dst[1] = cx * sy * cz - sx * cy * sz;\n dst[2] = cx * cy * sz - sx * sy * cz;\n dst[3] = cx * cy * cz + sx * sy * sz;\n break;\n\n case 'yzx':\n dst[0] = sx * cy * cz + cx * sy * sz;\n dst[1] = cx * sy * cz + sx * cy * sz;\n dst[2] = cx * cy * sz - sx * sy * cz;\n dst[3] = cx * cy * cz - sx * sy * sz;\n break;\n\n case 'zxy':\n dst[0] = sx * cy * cz - cx * sy * sz;\n dst[1] = cx * sy * cz + sx * cy * sz;\n dst[2] = cx * cy * sz + sx * sy * cz;\n dst[3] = cx * cy * cz - sx * sy * sz;\n break;\n\n case 'zyx':\n dst[0] = sx * cy * cz - cx * sy * sz;\n dst[1] = cx * sy * cz + sx * cy * sz;\n dst[2] = cx * cy * sz - sx * sy * cz;\n dst[3] = cx * cy * cz + sx * sy * sz;\n break;\n\n default:\n throw new Error(`Unknown rotation order: ${order}`);\n }\n\n return dst;\n}\n\n/**\n * Copies a quaternion. (same as {@link quat.clone})\n * Also see {@link quat.create} and {@link quat.set}\n * @param q - The quaternion.\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns A quaternion that is a copy of q\n */\nexport function copy(q: Quat, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n dst[0] = q[0];\n dst[1] = q[1];\n dst[2] = q[2];\n dst[3] = q[3];\n\n return dst;\n}\n\n/**\n * Clones a quaternion. (same as {@link quat.copy})\n * Also see {@link quat.create} and {@link quat.set}\n * @param q - The quaternion.\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns A copy of q.\n */\nexport const clone = copy;\n\n/**\n * Adds two quaternions; assumes a and b have the same dimension.\n * @param a - Operand quaternion.\n * @param b - Operand quaternion.\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns A quaternion that is the sum of a and b.\n */\nexport function add(a: Quat, b: Quat, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n dst[0] = a[0] + b[0];\n dst[1] = a[1] + b[1];\n dst[2] = a[2] + b[2];\n dst[3] = a[3] + b[3];\n\n return dst;\n}\n\n/**\n * Subtracts two quaternions.\n * @param a - Operand quaternion.\n * @param b - Operand quaternion.\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns A quaternion that is the difference of a and b.\n */\nexport function subtract(a: Quat, b: Quat, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n dst[0] = a[0] - b[0];\n dst[1] = a[1] - b[1];\n dst[2] = a[2] - b[2];\n dst[3] = a[3] - b[3];\n\n return dst;\n}\n\n/**\n * Subtracts two quaternions.\n * @param a - Operand quaternion.\n * @param b - Operand quaternion.\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns A quaternion that is the difference of a and b.\n */\nexport const sub = subtract;\n\n/**\n * Multiplies a quaternion by a scalar.\n * @param v - The quaternion.\n * @param k - The scalar.\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns The scaled quaternion.\n */\nexport function mulScalar(v: Quat, k: number, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n dst[0] = v[0] * k;\n dst[1] = v[1] * k;\n dst[2] = v[2] * k;\n dst[3] = v[3] * k;\n\n return dst;\n}\n\n/**\n * Multiplies a quaternion by a scalar. (same as mulScalar)\n * @param v - The quaternion.\n * @param k - The scalar.\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns The scaled quaternion.\n */\nexport const scale = mulScalar;\n\n/**\n * Divides a vector by a scalar.\n * @param v - The vector.\n * @param k - The scalar.\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns The scaled quaternion.\n */\nexport function divScalar(v: Quat, k: number, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n dst[0] = v[0] / k;\n dst[1] = v[1] / k;\n dst[2] = v[2] / k;\n dst[3] = v[3] / k;\n\n return dst;\n}\n\n/**\n * Computes the dot product of two quaternions\n * @param a - Operand quaternion.\n * @param b - Operand quaternion.\n * @returns dot product\n */\nexport function dot(a: Quat, b: Quat): number {\n return (a[0] * b[0]) + (a[1] * b[1]) + (a[2] * b[2]) + (a[3] * b[3]);\n}\n\n/**\n * Performs linear interpolation on two quaternions.\n * Given quaternions a and b and interpolation coefficient t, returns\n * a + t * (b - a).\n * @param a - Operand quaternion.\n * @param b - Operand quaternion.\n * @param t - Interpolation coefficient.\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns The linear interpolated result.\n */\nexport function lerp(a: Quat, b: Quat, t: number, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n dst[0] = a[0] + t * (b[0] - a[0]);\n dst[1] = a[1] + t * (b[1] - a[1]);\n dst[2] = a[2] + t * (b[2] - a[2]);\n dst[3] = a[3] + t * (b[3] - a[3]);\n\n return dst;\n}\n\n/**\n * Computes the length of quaternion\n * @param v - quaternion.\n * @returns length of quaternion.\n */\nexport function length(v: Quat): number {\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n const v3 = v[3];\n return Math.sqrt(v0 * v0 + v1 * v1 + v2 * v2 + v3 * v3);\n}\n\n/**\n * Computes the length of quaternion (same as length)\n * @param v - quaternion.\n * @returns length of quaternion.\n */\nexport const len = length;\n\n/**\n * Computes the square of the length of quaternion\n * @param v - quaternion.\n * @returns square of the length of quaternion.\n */\nexport function lengthSq(v: Quat): number {\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n const v3 = v[3];\n return v0 * v0 + v1 * v1 + v2 * v2 + v3 * v3;\n}\n\n/**\n * Computes the square of the length of quaternion (same as lengthSq)\n * @param v - quaternion.\n * @returns square of the length of quaternion.\n */\nexport const lenSq = lengthSq;\n\n/**\n * Divides a quaternion by its Euclidean length and returns the quotient.\n * @param v - The quaternion.\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns The normalized quaternion.\n */\nexport function normalize(v: Quat, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n const v3 = v[3];\n const len = Math.sqrt(v0 * v0 + v1 * v1 + v2 * v2 + v3 * v3);\n\n if (len > 0.00001) {\n dst[0] = v0 / len;\n dst[1] = v1 / len;\n dst[2] = v2 / len;\n dst[3] = v3 / len;\n } else {\n dst[0] = 0;\n dst[1] = 0;\n dst[2] = 0;\n dst[3] = 0;\n }\n\n return dst;\n}\n\n/**\n * Check if 2 quaternions are approximately equal\n * @param a - Operand quaternion.\n * @param b - Operand quaternion.\n * @returns true if quaternions are approximately equal\n */\nexport function equalsApproximately(a: Quat, b: Quat): boolean {\n return Math.abs(a[0] - b[0]) < utils.EPSILON &&\n Math.abs(a[1] - b[1]) < utils.EPSILON &&\n Math.abs(a[2] - b[2]) < utils.EPSILON &&\n Math.abs(a[3] - b[3]) < utils.EPSILON;\n}\n\n/**\n * Check if 2 quaternions are exactly equal\n * @param a - Operand quaternion.\n * @param b - Operand quaternion.\n * @returns true if quaternions are exactly equal\n */\nexport function equals(a: Quat, b: Quat): boolean {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];\n}\n\n/**\n * Creates an identity quaternion\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns an identity quaternion\n */\nexport function identity(dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n dst[0] = 0;\n dst[1] = 0;\n dst[2] = 0;\n dst[3] = 1;\n\n return dst;\n}\n\nlet tempVec3: Vec3;\nlet xUnitVec3: Vec3;\nlet yUnitVec3: Vec3;\n\n/**\n * Computes a quaternion to represent the shortest rotation from one vector to another.\n *\n * @param aUnit - the start vector\n * @param bUnit - the end vector\n * @param dst - quaternion to hold result. If not passed in a new one is created.\n * @returns the result\n */\nexport function rotationTo(aUnit: Vec3, bUnit: Vec3, dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n tempVec3 = tempVec3 || vec3.create();\n xUnitVec3 = xUnitVec3 || vec3.create(1, 0, 0);\n yUnitVec3 = yUnitVec3 || vec3.create(0, 1, 0);\n\n const dot = vec3.dot(aUnit, bUnit);\n if (dot < -0.999999) {\n vec3.cross(xUnitVec3, aUnit, tempVec3);\n if (vec3.len(tempVec3) < 0.000001) {\n vec3.cross(yUnitVec3, aUnit, tempVec3);\n }\n\n vec3.normalize(tempVec3, tempVec3);\n fromAxisAngle(tempVec3, Math.PI, dst);\n\n return dst;\n } else if (dot > 0.999999) {\n dst[0] = 0;\n dst[1] = 0;\n dst[2] = 0;\n dst[3] = 1;\n\n return dst;\n } else {\n vec3.cross(aUnit, bUnit, tempVec3);\n\n dst[0] = tempVec3[0];\n dst[1] = tempVec3[1];\n dst[2] = tempVec3[2];\n dst[3] = 1 + dot;\n\n return normalize(dst, dst);\n }\n}\n\nlet tempQuat1: Quat;\nlet tempQuat2: Quat;\n\n/**\n * Performs a spherical linear interpolation with two control points\n *\n * @param a - the first quaternion\n * @param b - the second quaternion\n * @param c - the third quaternion\n * @param d - the fourth quaternion\n * @param t - Interpolation coefficient 0 to 1\n * @returns result\n */\nexport function sqlerp(\n a: Quat,\n b: Quat,\n c: Quat,\n d: Quat,\n t: number,\n dst?: Quat): Quat {\n dst = dst || new QuatType(4);\n\n tempQuat1 = tempQuat1 || new QuatType(4);\n tempQuat2 = tempQuat2 || new QuatType(4);\n\n slerp(a, d, t, tempQuat1);\n slerp(b, c, t, tempQuat2);\n slerp(tempQuat1, tempQuat2, 2 * t * (1 - t), dst);\n\n return dst;\n}\n","/*\n * Copyright 2022 Gregg Tavares\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n */\n\n/**\n * A JavaScript array with 4 values, Float32Array with 4 values, or a Float64Array with 4 values.\n * When created by the library will create the default type which is `Float32Array`\n * but can be set by calling {@link vec4.setDefaultType}.\n */\nexport type Vec4 = number[] | Float32Array | Float64Array;\n\n/**\n *\n * Vec4 math functions.\n *\n * Almost all functions take an optional `dst` argument. If it is not passed in the\n * functions will create a new `Vec4`. In other words you can do this\n *\n * const v = vec4.cross(v1, v2); // Creates a new Vec4 with the cross product of v1 x v2.\n *\n * or\n *\n * const v = vec4.create();\n * vec4.cross(v1, v2, v); // Puts the cross product of v1 x v2 in v\n *\n * The first style is often easier but depending on where it's used it generates garbage where\n * as there is almost never allocation with the second style.\n *\n * It is always safe to pass any vector as the destination. So for example\n *\n * vec4.cross(v1, v2, v1); // Puts the cross product of v1 x v2 in v1\n *\n */\n\nexport let VecType: new (n: number) => Vec4 = Float32Array;\n\n/**\n * Sets the type this library creates for a Vec4\n * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array`\n * @returns previous constructor for Vec4\n */\nexport function setDefaultType(ctor: new (n: number) => Vec4) {\n const oldType = VecType;\n VecType = ctor;\n return oldType;\n}\n\n/**\n * Creates a vec4; may be called with x, y, z to set initial values.\n * @param x - Initial x value.\n * @param y - Initial y value.\n * @param z - Initial z value.\n * @param w - Initial w value.\n * @returns the created vector\n */\nexport function create(x?: number, y?: number, z?: number, w?: number): Vec4 {\n const dst = new VecType(4);\n if (x !== undefined) {\n dst[0] = x;\n if (y !== undefined) {\n dst[1] = y;\n if (z !== undefined) {\n dst[2] = z;\n if (w !== undefined) {\n dst[3] = w;\n }\n }\n }\n }\n return dst;\n}","/*\n * Copyright 2022 Gregg Tavares\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n */\nimport * as utils from './utils.js';\nimport { Vec4, create, setDefaultType, VecType } from './vec4';\nimport { Mat4 } from './mat4';\n\nexport default Vec4;\nexport { create, setDefaultType };\n\n/**\n * Creates a vec4; may be called with x, y, z to set initial values. (same as create)\n * @param x - Initial x value.\n * @param y - Initial y value.\n * @param z - Initial z value.\n * @param z - Initial w value.\n * @returns the created vector\n */\nexport const fromValues = create;\n\n/**\n * Sets the values of a Vec4\n * Also see {@link vec4.create} and {@link vec4.copy}\n *\n * @param x first value\n * @param y second value\n * @param z third value\n * @param w fourth value\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector with its elements set.\n */\nexport function set(x: number, y: number, z: number, w: number, dst?: Vec4) {\n dst = dst || new VecType(4);\n\n dst[0] = x;\n dst[1] = y;\n dst[2] = z;\n dst[3] = w;\n\n return dst;\n}\n\n/**\n * Applies Math.ceil to each element of vector\n * @param v - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the ceil of each element of v.\n */\nexport function ceil(v: Vec4, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = Math.ceil(v[0]);\n dst[1] = Math.ceil(v[1]);\n dst[2] = Math.ceil(v[2]);\n dst[3] = Math.ceil(v[3]);\n\n return dst;\n}\n\n/**\n * Applies Math.floor to each element of vector\n * @param v - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the floor of each element of v.\n */\nexport function floor(v: Vec4, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = Math.floor(v[0]);\n dst[1] = Math.floor(v[1]);\n dst[2] = Math.floor(v[2]);\n dst[3] = Math.floor(v[3]);\n\n return dst;\n}\n\n/**\n * Applies Math.round to each element of vector\n * @param v - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the round of each element of v.\n */\nexport function round(v: Vec4, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = Math.round(v[0]);\n dst[1] = Math.round(v[1]);\n dst[2] = Math.round(v[2]);\n dst[3] = Math.round(v[3]);\n\n return dst;\n}\n\n/**\n * Clamp each element of vector between min and max\n * @param v - Operand vector.\n * @param max - Min value, default 0\n * @param min - Max value, default 1\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that the clamped value of each element of v.\n */\nexport function clamp(v: Vec4, min = 0, max = 1, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = Math.min(max, Math.max(min, v[0]));\n dst[1] = Math.min(max, Math.max(min, v[1]));\n dst[2] = Math.min(max, Math.max(min, v[2]));\n dst[3] = Math.min(max, Math.max(min, v[3]));\n\n return dst;\n}\n\n/**\n * Adds two vectors; assumes a and b have the same dimension.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the sum of a and b.\n */\nexport function add(a: Vec4, b: Vec4, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = a[0] + b[0];\n dst[1] = a[1] + b[1];\n dst[2] = a[2] + b[2];\n dst[3] = a[3] + b[3];\n\n return dst;\n}\n\n/**\n * Adds two vectors, scaling the 2nd; assumes a and b have the same dimension.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param scale - Amount to scale b\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the sum of a + b * scale.\n */\nexport function addScaled(a: Vec4, b: Vec4, scale: number, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = a[0] + b[0] * scale;\n dst[1] = a[1] + b[1] * scale;\n dst[2] = a[2] + b[2] * scale;\n dst[3] = a[3] + b[3] * scale;\n\n return dst;\n}\n\n/**\n * Subtracts two vectors.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the difference of a and b.\n */\nexport function subtract(a: Vec4, b: Vec4, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = a[0] - b[0];\n dst[1] = a[1] - b[1];\n dst[2] = a[2] - b[2];\n dst[3] = a[3] - b[3];\n\n return dst;\n}\n\n/**\n * Subtracts two vectors.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A vector that is the difference of a and b.\n */\nexport const sub = subtract;\n\n/**\n * Check if 2 vectors are approximately equal\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @returns true if vectors are approximately equal\n */\nexport function equalsApproximately(a: Vec4, b: Vec4): boolean {\n return Math.abs(a[0] - b[0]) < utils.EPSILON &&\n Math.abs(a[1] - b[1]) < utils.EPSILON &&\n Math.abs(a[2] - b[2]) < utils.EPSILON &&\n Math.abs(a[3] - b[3]) < utils.EPSILON;\n}\n\n/**\n * Check if 2 vectors are exactly equal\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @returns true if vectors are exactly equal\n */\nexport function equals(a: Vec4, b: Vec4): boolean {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];\n}\n\n/**\n * Performs linear interpolation on two vectors.\n * Given vectors a and b and interpolation coefficient t, returns\n * a + t * (b - a).\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param t - Interpolation coefficient.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The linear interpolated result.\n */\nexport function lerp(a: Vec4, b: Vec4, t: number, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = a[0] + t * (b[0] - a[0]);\n dst[1] = a[1] + t * (b[1] - a[1]);\n dst[2] = a[2] + t * (b[2] - a[2]);\n dst[3] = a[3] + t * (b[3] - a[3]);\n\n return dst;\n}\n\n/**\n * Performs linear interpolation on two vectors.\n * Given vectors a and b and interpolation coefficient vector t, returns\n * a + t * (b - a).\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param t - Interpolation coefficients vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns the linear interpolated result.\n */\nexport function lerpV(a: Vec4, b: Vec4, t: Vec4, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = a[0] + t[0] * (b[0] - a[0]);\n dst[1] = a[1] + t[1] * (b[1] - a[1]);\n dst[2] = a[2] + t[2] * (b[2] - a[2]);\n dst[3] = a[3] + t[3] * (b[3] - a[3]);\n\n return dst;\n}\n\n/**\n * Return max values of two vectors.\n * Given vectors a and b returns\n * [max(a[0], b[0]), max(a[1], b[1]), max(a[2], b[2])].\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The max components vector.\n */\nexport function max(a: Vec4, b: Vec4, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = Math.max(a[0], b[0]);\n dst[1] = Math.max(a[1], b[1]);\n dst[2] = Math.max(a[2], b[2]);\n dst[3] = Math.max(a[3], b[3]);\n\n return dst;\n}\n\n/**\n * Return min values of two vectors.\n * Given vectors a and b returns\n * [min(a[0], b[0]), min(a[1], b[1]), min(a[2], b[2])].\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The min components vector.\n */\nexport function min(a: Vec4, b: Vec4, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = Math.min(a[0], b[0]);\n dst[1] = Math.min(a[1], b[1]);\n dst[2] = Math.min(a[2], b[2]);\n dst[3] = Math.min(a[3], b[3]);\n\n return dst;\n}\n\n/**\n * Multiplies a vector by a scalar.\n * @param v - The vector.\n * @param k - The scalar.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The scaled vector.\n */\nexport function mulScalar(v: Vec4, k: number, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = v[0] * k;\n dst[1] = v[1] * k;\n dst[2] = v[2] * k;\n dst[3] = v[3] * k;\n\n return dst;\n}\n\n/**\n * Multiplies a vector by a scalar. (same as mulScalar)\n * @param v - The vector.\n * @param k - The scalar.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The scaled vector.\n */\nexport const scale = mulScalar;\n\n/**\n * Divides a vector by a scalar.\n * @param v - The vector.\n * @param k - The scalar.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The scaled vector.\n */\nexport function divScalar(v: Vec4, k: number, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = v[0] / k;\n dst[1] = v[1] / k;\n dst[2] = v[2] / k;\n dst[3] = v[3] / k;\n\n return dst;\n}\n\n/**\n * Inverse a vector.\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The inverted vector.\n */\nexport function inverse(v: Vec4, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = 1 / v[0];\n dst[1] = 1 / v[1];\n dst[2] = 1 / v[2];\n dst[3] = 1 / v[3];\n\n return dst;\n}\n\n/**\n * Invert a vector. (same as inverse)\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The inverted vector.\n */\nexport const invert = inverse;\n\n/**\n * Computes the dot product of two vectors\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @returns dot product\n */\nexport function dot(a: Vec4, b: Vec4): number {\n return (a[0] * b[0]) + (a[1] * b[1]) + (a[2] * b[2]) + (a[3] * b[3]);\n}\n\n/**\n * Computes the length of vector\n * @param v - vector.\n * @returns length of vector.\n */\nexport function length(v: Vec4): number {\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n const v3 = v[3];\n return Math.sqrt(v0 * v0 + v1 * v1 + v2 * v2 + v3 * v3);\n}\n\n/**\n * Computes the length of vector (same as length)\n * @param v - vector.\n * @returns length of vector.\n */\nexport const len = length;\n\n/**\n * Computes the square of the length of vector\n * @param v - vector.\n * @returns square of the length of vector.\n */\nexport function lengthSq(v: Vec4): number {\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n const v3 = v[3];\n return v0 * v0 + v1 * v1 + v2 * v2 + v3 * v3;\n}\n\n/**\n * Computes the square of the length of vector (same as lengthSq)\n * @param v - vector.\n * @returns square of the length of vector.\n */\nexport const lenSq = lengthSq;\n\n/**\n * Computes the distance between 2 points\n * @param a - vector.\n * @param b - vector.\n * @returns distance between a and b\n */\nexport function distance(a: Vec4, b: Vec4): number {\n const dx = a[0] - b[0];\n const dy = a[1] - b[1];\n const dz = a[2] - b[2];\n const dw = a[3] - b[3];\n return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw);\n}\n\n/**\n * Computes the distance between 2 points (same as distance)\n * @param a - vector.\n * @param b - vector.\n * @returns distance between a and b\n */\nexport const dist = distance;\n\n/**\n * Computes the square of the distance between 2 points\n * @param a - vector.\n * @param b - vector.\n * @returns square of the distance between a and b\n */\nexport function distanceSq(a: Vec4, b: Vec4): number {\n const dx = a[0] - b[0];\n const dy = a[1] - b[1];\n const dz = a[2] - b[2];\n const dw = a[3] - b[3];\n return dx * dx + dy * dy + dz * dz + dw * dw;\n}\n\n/**\n * Computes the square of the distance between 2 points (same as distanceSq)\n * @param a - vector.\n * @param b - vector.\n * @returns square of the distance between a and b\n */\nexport const distSq = distanceSq;\n\n/**\n * Divides a vector by its Euclidean length and returns the quotient.\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The normalized vector.\n */\nexport function normalize(v: Vec4, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n const v0 = v[0];\n const v1 = v[1];\n const v2 = v[2];\n const v3 = v[3];\n const len = Math.sqrt(v0 * v0 + v1 * v1 + v2 * v2 + v3 * v3);\n\n if (len > 0.00001) {\n dst[0] = v0 / len;\n dst[1] = v1 / len;\n dst[2] = v2 / len;\n dst[3] = v3 / len;\n } else {\n dst[0] = 0;\n dst[1] = 0;\n dst[2] = 0;\n dst[3] = 0;\n }\n\n return dst;\n}\n\n/**\n * Negates a vector.\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns -v.\n */\nexport function negate(v: Vec4, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = -v[0];\n dst[1] = -v[1];\n dst[2] = -v[2];\n dst[3] = -v[3];\n\n return dst;\n}\n\n/**\n * Copies a vector. (same as {@link vec4.clone})\n * Also see {@link vec4.create} and {@link vec4.set}\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A copy of v.\n */\nexport function copy(v: Vec4, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = v[0];\n dst[1] = v[1];\n dst[2] = v[2];\n dst[3] = v[3];\n\n return dst;\n}\n\n/**\n * Clones a vector. (same as {@link vec4.copy})\n * Also see {@link vec4.create} and {@link vec4.set}\n * @param v - The vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns A copy of v.\n */\nexport const clone = copy;\n\n/**\n * Multiplies a vector by another vector (component-wise); assumes a and\n * b have the same length.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The vector of products of entries of a and b.\n */\nexport function multiply(a: Vec4, b: Vec4, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = a[0] * b[0];\n dst[1] = a[1] * b[1];\n dst[2] = a[2] * b[2];\n dst[3] = a[3] * b[3];\n\n return dst;\n}\n\n/**\n * Multiplies a vector by another vector (component-wise); assumes a and\n * b have the same length. (same as mul)\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The vector of products of entries of a and b.\n */\nexport const mul = multiply;\n\n/**\n * Divides a vector by another vector (component-wise); assumes a and\n * b have the same length.\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The vector of quotients of entries of a and b.\n */\nexport function divide(a: Vec4, b: Vec4, dst?: Vec4) {\n dst = dst || new VecType(4);\n\n dst[0] = a[0] / b[0];\n dst[1] = a[1] / b[1];\n dst[2] = a[2] / b[2];\n dst[3] = a[3] / b[3];\n\n return dst;\n}\n\n/**\n * Divides a vector by another vector (component-wise); assumes a and\n * b have the same length. (same as divide)\n * @param a - Operand vector.\n * @param b - Operand vector.\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The vector of quotients of entries of a and b.\n */\nexport const div = divide;\n\n/**\n * Zero's a vector\n * @param dst - vector to hold result. If not passed in a new one is created.\n * @returns The zeroed vector.\n */\nexport function zero(dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n dst[0] = 0;\n dst[1] = 0;\n dst[2] = 0;\n dst[3] = 0;\n\n return dst;\n}\n\n\n/**\n * transform vec4 by 4x4 matrix\n * @param v - the vector\n * @param m - The matrix.\n * @param dst - optional vec4 to store result. If not passed a new one is created.\n * @returns the transformed vector\n */\nexport function transformMat4(v: Vec4, m: Mat4, dst?: Vec4): Vec4 {\n dst = dst || new VecType(4);\n\n const x = v[0];\n const y = v[1];\n const z = v[2];\n const w = v[3];\n\n dst[0] = m[0] * x + m[4] * y + m[ 8] * z + m[12] * w;\n dst[1] = m[1] * x + m[5] * y + m[ 9] * z + m[13] * w;\n dst[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\n dst[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\n\n return dst;\n}\n","import Mat3, * as mat3 from './mat3-impl';\nimport Mat4, * as mat4 from './mat4-impl';\nimport Quat, * as quat from './quat-impl';\nimport Vec2, * as vec2 from './vec2-impl';\nimport Vec3, * as vec3 from './vec3-impl';\nimport Vec4, * as vec4 from './vec4-impl';\nimport * as utils from './utils';\n\n/**\n * Sets the type this library creates for all types\n *\n * example:\n *\n * ```\n * setDefaultType(Float64Array);\n * ```\n *\n * @param ctor - the constructor for the type. Either `Float32Array`, `Float64Array`, or `Array`\n */\nexport function setDefaultType(ctor: new (n: number) => Float32Array | Float64Array | number[]) {\n mat3.setDefaultType(ctor);\n mat4.setDefaultType(ctor);\n quat.setDefaultType(ctor);\n vec2.setDefaultType(ctor);\n vec3.setDefaultType(ctor);\n vec4.setDefaultType(ctor);\n}\n\nexport {\n Mat3,\n mat3,\n Mat4,\n mat4,\n Quat,\n quat,\n utils,\n Vec2,\n vec2,\n Vec3,\n vec3,\n Vec4,\n vec4,\n};"],"names":["lerp","VecType","setDefaultType","create","fromValues","set","ceil","floor","round","clamp","add","addScaled","angle","dot","subtract","sub","equalsApproximately","utils.EPSILON","equals","lerpV","max","min","mulScalar","scale","divScalar","inverse","invert","cross","Vec3Type","length","len","lengthSq","lenSq","distance","dist","distanceSq","distSq","normalize","negate","copy","clone","multiply","mul","divide","div","random","zero","transformMat4","transformMat3","MatType","fromQuat","identity","transpose","determinant","setTranslation","getTranslation","vec2.create","getAxis","setAxis","getScaling","translation","translate","rotation","rotate","scaling","uniformScaling","uniformScale","vec3.create","vec3.normalize","vec3.subtract","vec3.cross","rotateX","rotateY","rotateZ","vec3.dot","vec3.len","mat3.setDefaultType","mat4.setDefaultType","quat.setDefaultType","vec2.setDefaultType","vec3.setDefaultType","vec4.setDefaultType"],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;AAoBG;AAEI,IAAI,OAAO,GAAG,QAAQ,CAAC;AAE9B;;;;AAIG;AACG,SAAU,UAAU,CAAC,CAAS,EAAA;IAClC,MAAM,GAAG,GAAG,OAAO,CAAC;IACpB,OAAO,GAAG,CAAC,CAAC;AACZ,IAAA,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;AAIG;AACG,SAAU,QAAQ,CAAC,OAAe,EAAA;AACtC,IAAA,OAAO,OAAO,GAAG,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC;AACjC,CAAC;AAED;;;;AAIG;AACG,SAAU,QAAQ,CAAC,OAAe,EAAA;AACtC,IAAA,OAAO,OAAO,GAAG,GAAG,GAAG,IAAI,CAAC,EAAE,CAAC;AACjC,CAAC;AAED;;;;;;AAMG;SACaA,MAAI,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS,EAAA;IAClD,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AAED;;;;;;;;AAQG;SACa,WAAW,CAA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CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AAErD,IAAA,OAAO,GAAG,CAAC;AACb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjnBA;;;;;;;;;;AAUG;AACG,SAAU,cAAc,CAAC,IAA+D,EAAA;AAC5F,IAAA2D,gBAAmB,CAAC,IAAI,CAAC,CAAC;AAC1B,IAAAC,gBAAmB,CAAC,IAAI,CAAC,CAAC;AAC1B,IAAAC,gBAAmB,CAAC,IAAI,CAAC,CAAC;AAC1B,IAAAC,gBAAmB,CAAC,IAAI,CAAC,CAAC;AAC1B,IAAAC,gBAAmB,CAAC,IAAI,CAAC,CAAC;AAC1B,IAAAC,gBAAmB,CAAC,IAAI,CAAC,CAAC;AAC5B;;;;"} \ No newline at end of file diff --git a/docs/.nojekyll b/docs/.nojekyll deleted file mode 100644 index e2ac661..0000000 --- a/docs/.nojekyll +++ /dev/null @@ -1 +0,0 @@ -TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. \ No newline at end of file diff --git a/docs/assets/highlight.css b/docs/assets/highlight.css deleted file mode 100644 index 7fb83ae..0000000 --- a/docs/assets/highlight.css +++ /dev/null @@ -1,92 +0,0 @@ -:root { - --light-hl-0: #008000; - --dark-hl-0: #6A9955; - --light-hl-1: #0000FF; - --dark-hl-1: #569CD6; - --light-hl-2: #000000; - --dark-hl-2: #D4D4D4; - --light-hl-3: #0070C1; - --dark-hl-3: #4FC1FF; - --light-hl-4: #001080; - --dark-hl-4: #9CDCFE; - --light-hl-5: #795E26; - --dark-hl-5: #DCDCAA; - --light-hl-6: #AF00DB; - --dark-hl-6: #C586C0; - --light-hl-7: #A31515; - --dark-hl-7: #CE9178; - --light-hl-8: #098658; - --dark-hl-8: #B5CEA8; - --light-hl-9: #000000; - --dark-hl-9: #C8C8C8; - --light-code-background: #FFFFFF; - --dark-code-background: #1E1E1E; -} - -@media (prefers-color-scheme: light) { :root { - --hl-0: var(--light-hl-0); - --hl-1: var(--light-hl-1); - --hl-2: var(--light-hl-2); - --hl-3: var(--light-hl-3); - --hl-4: var(--light-hl-4); - --hl-5: var(--light-hl-5); - --hl-6: var(--light-hl-6); - --hl-7: var(--light-hl-7); - --hl-8: var(--light-hl-8); - --hl-9: var(--light-hl-9); - --code-background: var(--light-code-background); -} } - -@media (prefers-color-scheme: dark) { :root { - --hl-0: var(--dark-hl-0); - --hl-1: var(--dark-hl-1); - --hl-2: var(--dark-hl-2); - --hl-3: var(--dark-hl-3); - --hl-4: var(--dark-hl-4); - --hl-5: var(--dark-hl-5); - --hl-6: var(--dark-hl-6); - --hl-7: var(--dark-hl-7); - --hl-8: var(--dark-hl-8); - --hl-9: var(--dark-hl-9); - --code-background: var(--dark-code-background); -} } - -:root[data-theme='light'] { - --hl-0: var(--light-hl-0); - --hl-1: var(--light-hl-1); - --hl-2: var(--light-hl-2); - --hl-3: var(--light-hl-3); - --hl-4: var(--light-hl-4); - --hl-5: var(--light-hl-5); - --hl-6: var(--light-hl-6); - --hl-7: var(--light-hl-7); - --hl-8: var(--light-hl-8); - --hl-9: var(--light-hl-9); - --code-background: var(--light-code-background); -} - -:root[data-theme='dark'] { - --hl-0: var(--dark-hl-0); - --hl-1: var(--dark-hl-1); - --hl-2: var(--dark-hl-2); - --hl-3: var(--dark-hl-3); - --hl-4: var(--dark-hl-4); - --hl-5: var(--dark-hl-5); - --hl-6: var(--dark-hl-6); - --hl-7: var(--dark-hl-7); - --hl-8: var(--dark-hl-8); - --hl-9: var(--dark-hl-9); - --code-background: var(--dark-code-background); -} - -.hl-0 { color: var(--hl-0); } -.hl-1 { color: var(--hl-1); } -.hl-2 { color: var(--hl-2); } -.hl-3 { color: var(--hl-3); } -.hl-4 { color: var(--hl-4); } -.hl-5 { color: var(--hl-5); } -.hl-6 { color: var(--hl-6); } -.hl-7 { color: var(--hl-7); } -.hl-8 { color: var(--hl-8); } -.hl-9 { color: var(--hl-9); } -pre, code { background: var(--code-background); } diff --git a/docs/assets/main.js b/docs/assets/main.js deleted file mode 100644 index abd0485..0000000 --- a/docs/assets/main.js +++ /dev/null @@ -1,54 +0,0 @@ -"use strict"; -"use strict";(()=>{var Qe=Object.create;var ae=Object.defineProperty;var Pe=Object.getOwnPropertyDescriptor;var Ce=Object.getOwnPropertyNames;var Oe=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty;var _e=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Me=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ce(e))!Re.call(t,i)&&i!==n&&ae(t,i,{get:()=>e[i],enumerable:!(r=Pe(e,i))||r.enumerable});return t};var De=(t,e,n)=>(n=t!=null?Qe(Oe(t)):{},Me(e||!t||!t.__esModule?ae(n,"default",{value:t,enumerable:!0}):n,t));var de=_e((ce,he)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i0){var h=t.utils.clone(n)||{};h.position=[a,l],h.index=s.length,s.push(new t.Token(r.slice(a,o),h))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. -`,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r1&&(oe&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ou?h+=2:a==u&&(n+=r[l+1]*i[h+1],l+=2,h+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}if(s.str.length==0&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}s.str.length==1&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var h=s.str.charAt(0),m=s.str.charAt(1),v;m in s.node.edges?v=s.node.edges[m]:(v=new t.TokenSet,s.node.edges[m]=v),s.str.length==1&&(v.final=!0),i.push({node:v,editsRemaining:s.editsRemaining-1,str:h+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof ce=="object"?he.exports=n():e.lunr=n()}(this,function(){return t})})()});var le=[];function j(t,e){le.push({selector:e,constructor:t})}var Y=class{constructor(){this.createComponents(document.body)}createComponents(e){le.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r}),r.dataset.hasInstance=String(!0))})})}};var k=class{constructor(e){this.el=e.el}};var J=class{constructor(){this.listeners={}}addEventListener(e,n){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push(n)}removeEventListener(e,n){if(!(e in this.listeners))return;let r=this.listeners[e];for(let i=0,s=r.length;i{let n=Date.now();return(...r)=>{n+e-Date.now()<0&&(t(...r),n=Date.now())}};var re=class extends J{constructor(){super();this.scrollTop=0;this.lastY=0;this.width=0;this.height=0;this.showToolbar=!0;this.toolbar=document.querySelector(".tsd-page-toolbar"),this.navigation=document.querySelector(".col-menu"),window.addEventListener("scroll",ne(()=>this.onScroll(),10)),window.addEventListener("resize",ne(()=>this.onResize(),10)),this.searchInput=document.querySelector("#tsd-search input"),this.searchInput&&this.searchInput.addEventListener("focus",()=>{this.hideShowToolbar()}),this.onResize(),this.onScroll()}triggerResize(){let n=new CustomEvent("resize",{detail:{width:this.width,height:this.height}});this.dispatchEvent(n)}onResize(){this.width=window.innerWidth||0,this.height=window.innerHeight||0;let n=new CustomEvent("resize",{detail:{width:this.width,height:this.height}});this.dispatchEvent(n)}onScroll(){this.scrollTop=window.scrollY||0;let n=new CustomEvent("scroll",{detail:{scrollTop:this.scrollTop}});this.dispatchEvent(n),this.hideShowToolbar()}hideShowToolbar(){let n=this.showToolbar;this.showToolbar=this.lastY>=this.scrollTop||this.scrollTop<=0||!!this.searchInput&&this.searchInput===document.activeElement,n!==this.showToolbar&&(this.toolbar.classList.toggle("tsd-page-toolbar--hide"),this.navigation?.classList.toggle("col-menu--hide")),this.lastY=this.scrollTop}},R=re;R.instance=new re;var X=class extends k{constructor(n){super(n);this.anchors=[];this.index=-1;R.instance.addEventListener("resize",()=>this.onResize()),R.instance.addEventListener("scroll",r=>this.onScroll(r)),this.createAnchors()}createAnchors(){let n=window.location.href;n.indexOf("#")!=-1&&(n=n.substring(0,n.indexOf("#"))),this.el.querySelectorAll("a").forEach(r=>{let i=r.href;if(i.indexOf("#")==-1||i.substring(0,n.length)!=n)return;let s=i.substring(i.indexOf("#")+1),o=document.querySelector("a.tsd-anchor[name="+s+"]"),a=r.parentNode;!o||!a||this.anchors.push({link:a,anchor:o,position:0})}),this.onResize()}onResize(){let n;for(let i=0,s=this.anchors.length;ii.position-s.position);let r=new CustomEvent("scroll",{detail:{scrollTop:R.instance.scrollTop}});this.onScroll(r)}onScroll(n){let r=n.detail.scrollTop+5,i=this.anchors,s=i.length-1,o=this.index;for(;o>-1&&i[o].position>r;)o-=1;for(;o-1&&this.anchors[this.index].link.classList.remove("focus"),this.index=o,this.index>-1&&this.anchors[this.index].link.classList.add("focus"))}};var ue=(t,e=100)=>{let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>t(r),e)}};var me=De(de());function ve(){let t=document.getElementById("tsd-search");if(!t)return;let e=document.getElementById("search-script");t.classList.add("loading"),e&&(e.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),e.addEventListener("load",()=>{t.classList.remove("loading"),t.classList.add("ready")}),window.searchData&&t.classList.remove("loading"));let n=document.querySelector("#tsd-search input"),r=document.querySelector("#tsd-search .results");if(!n||!r)throw new Error("The input field or the result list wrapper was not found");let i=!1;r.addEventListener("mousedown",()=>i=!0),r.addEventListener("mouseup",()=>{i=!1,t.classList.remove("has-focus")}),n.addEventListener("focus",()=>t.classList.add("has-focus")),n.addEventListener("blur",()=>{i||(i=!1,t.classList.remove("has-focus"))});let s={base:t.dataset.base+"/"};Fe(t,r,n,s)}function Fe(t,e,n,r){n.addEventListener("input",ue(()=>{Ae(t,e,n,r)},200));let i=!1;n.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?Ve(e,n):s.key=="Escape"?n.blur():s.key=="ArrowUp"?fe(e,-1):s.key==="ArrowDown"?fe(e,1):i=!1}),n.addEventListener("keypress",s=>{i&&s.preventDefault()}),document.body.addEventListener("keydown",s=>{s.altKey||s.ctrlKey||s.metaKey||!n.matches(":focus")&&s.key==="/"&&(n.focus(),s.preventDefault())})}function He(t,e){t.index||window.searchData&&(e.classList.remove("loading"),e.classList.add("ready"),t.data=window.searchData,t.index=me.Index.load(window.searchData.index))}function Ae(t,e,n,r){if(He(r,t),!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s=i?r.index.search(`*${i}*`):[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o${pe(u.parent,i)}.${l}`);let h=document.createElement("li");h.classList.value=u.classes??"";let m=document.createElement("a");m.href=r.base+u.url,m.innerHTML=l,h.append(m),e.appendChild(h)}}function fe(t,e){let n=t.querySelector(".current");if(!n)n=t.querySelector(e==1?"li:first-child":"li:last-child"),n&&n.classList.add("current");else{let r=n;if(e===1)do r=r.nextElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);else do r=r.previousElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);r&&(n.classList.remove("current"),r.classList.add("current"))}}function Ve(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),e.blur()}}function pe(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(ie(t.substring(s,o)),`${ie(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(ie(t.substring(s))),i.join("")}var Ne={"&":"&","<":"<",">":">","'":"'",'"':"""};function ie(t){return t.replace(/[&<>"'"]/g,e=>Ne[e])}var F="mousedown",ye="mousemove",B="mouseup",Z={x:0,y:0},ge=!1,se=!1,je=!1,H=!1,xe=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(xe?"is-mobile":"not-mobile");xe&&"ontouchstart"in document.documentElement&&(je=!0,F="touchstart",ye="touchmove",B="touchend");document.addEventListener(F,t=>{se=!0,H=!1;let e=F=="touchstart"?t.targetTouches[0]:t;Z.y=e.pageY||0,Z.x=e.pageX||0});document.addEventListener(ye,t=>{if(!!se&&!H){let e=F=="touchstart"?t.targetTouches[0]:t,n=Z.x-(e.pageX||0),r=Z.y-(e.pageY||0);H=Math.sqrt(n*n+r*r)>10}});document.addEventListener(B,()=>{se=!1});document.addEventListener("click",t=>{ge&&(t.preventDefault(),t.stopImmediatePropagation(),ge=!1)});var K=class extends k{constructor(n){super(n);this.className=this.el.dataset.toggle||"",this.el.addEventListener(B,r=>this.onPointerUp(r)),this.el.addEventListener("click",r=>r.preventDefault()),document.addEventListener(F,r=>this.onDocumentPointerDown(r)),document.addEventListener(B,r=>this.onDocumentPointerUp(r))}setActive(n){if(this.active==n)return;this.active=n,document.documentElement.classList.toggle("has-"+this.className,n),this.el.classList.toggle("active",n);let r=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(r),setTimeout(()=>document.documentElement.classList.remove(r),500)}onPointerUp(n){H||(this.setActive(!0),n.preventDefault())}onDocumentPointerDown(n){if(this.active){if(n.target.closest(".col-menu, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(n){if(!H&&this.active&&n.target.closest(".col-menu")){let r=n.target.closest("a");if(r){let i=window.location.href;i.indexOf("#")!=-1&&(i=i.substring(0,i.indexOf("#"))),r.href.substring(0,i.length)==i&&setTimeout(()=>this.setActive(!1),250)}}}};var oe;try{oe=localStorage}catch{oe={getItem(){return null},setItem(){}}}var Q=oe;var Le=document.head.appendChild(document.createElement("style"));Le.dataset.for="filters";var ee=class extends k{constructor(n){super(n);this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),Le.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } -`}fromLocalStorage(){let n=Q.getItem(this.key);return n?n==="true":this.el.checked}setLocalStorage(n){Q.setItem(this.key,n.toString()),this.value=n,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),document.querySelectorAll(".tsd-index-section").forEach(n=>{n.style.display="block";let r=Array.from(n.querySelectorAll(".tsd-index-link")).every(i=>i.offsetParent==null);n.style.display=r?"none":"block"})}};var te=class extends k{constructor(n){super(n);this.calculateHeights(),this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.textContent.replace(/\s+/g,"-").toLowerCase()}`,this.setLocalStorage(this.fromLocalStorage(),!0),this.summary.addEventListener("click",r=>this.toggleVisibility(r)),this.icon.style.transform=this.getIconRotation()}getIconRotation(n=this.el.open){return`rotate(${n?0:-90}deg)`}calculateHeights(){let n=this.el.open,{position:r,left:i}=this.el.style;this.el.style.position="fixed",this.el.style.left="-9999px",this.el.open=!0,this.expandedHeight=this.el.offsetHeight+"px",this.el.open=!1,this.collapsedHeight=this.el.offsetHeight+"px",this.el.open=n,this.el.style.height=n?this.expandedHeight:this.collapsedHeight,this.el.style.position=r,this.el.style.left=i}toggleVisibility(n){n.preventDefault(),this.el.style.overflow="hidden",this.el.open?this.collapse():this.expand()}expand(n=!0){this.el.open=!0,this.animate(this.collapsedHeight,this.expandedHeight,{opening:!0,duration:n?300:0})}collapse(n=!0){this.animate(this.expandedHeight,this.collapsedHeight,{opening:!1,duration:n?300:0})}animate(n,r,{opening:i,duration:s=300}){if(this.animation)return;let o={duration:s,easing:"ease"};this.animation=this.el.animate({height:[n,r]},o),this.icon.animate({transform:[this.icon.style.transform||this.getIconRotation(!i),this.getIconRotation(i)]},o).addEventListener("finish",()=>{this.icon.style.transform=this.getIconRotation(i)}),this.animation.addEventListener("finish",()=>this.animationEnd(i))}animationEnd(n){this.el.open=n,this.animation=void 0,this.el.style.height="auto",this.el.style.overflow="visible",this.setLocalStorage(n)}fromLocalStorage(){let n=Q.getItem(this.key);return n?n==="true":this.el.open}setLocalStorage(n,r=!1){this.fromLocalStorage()===n&&!r||(Q.setItem(this.key,n.toString()),this.el.open=n,this.handleValueChange(r))}handleValueChange(n=!1){this.fromLocalStorage()===this.el.open&&!n||(this.fromLocalStorage()?this.expand(!1):this.collapse(!1))}};function be(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,Ee(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),Ee(t.value)})}function Ee(t){document.documentElement.dataset.theme=t}ve();j(X,".menu-highlight");j(K,"a[data-toggle]");j(te,".tsd-index-accordion");j(ee,".tsd-filter-item input[type=checkbox]");var Se=document.getElementById("theme");Se&&be(Se);var Be=new Y;Object.defineProperty(window,"app",{value:Be});})(); -/*! - * lunr.Builder - * Copyright (C) 2020 Oliver Nightingale - */ -/*! - * lunr.Index - * Copyright (C) 2020 Oliver Nightingale - */ -/*! - * lunr.Pipeline - * Copyright (C) 2020 Oliver Nightingale - */ -/*! - * lunr.Set - * Copyright (C) 2020 Oliver Nightingale - */ -/*! - * lunr.TokenSet - * Copyright (C) 2020 Oliver Nightingale - */ -/*! - * lunr.Vector - * Copyright (C) 2020 Oliver Nightingale - */ -/*! - * lunr.stemmer - * Copyright (C) 2020 Oliver Nightingale - * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt - */ -/*! - * lunr.stopWordFilter - * Copyright (C) 2020 Oliver Nightingale - */ -/*! - * lunr.tokenizer - * Copyright (C) 2020 Oliver Nightingale - */ -/*! - * lunr.trimmer - * Copyright (C) 2020 Oliver Nightingale - */ -/*! - * lunr.utils - * Copyright (C) 2020 Oliver Nightingale - */ -/** - * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9 - * Copyright (C) 2020 Oliver Nightingale - * @license MIT - */ diff --git a/docs/assets/search.js b/docs/assets/search.js deleted file mode 100644 index 756537b..0000000 --- a/docs/assets/search.js +++ /dev/null @@ -1 +0,0 @@ -window.searchData = JSON.parse("{\"kinds\":{\"4\":\"Namespace\",\"32\":\"Variable\",\"64\":\"Function\",\"512\":\"Constructor\",\"1024\":\"Property\",\"65536\":\"Type literal\",\"4194304\":\"Type alias\",\"8388608\":\"Reference\"},\"rows\":[{\"kind\":64,\"name\":\"setDefaultType\",\"url\":\"functions/setDefaultType.html\",\"classes\":\"tsd-kind-function\"},{\"kind\":4194304,\"name\":\"Mat3\",\"url\":\"types/Mat3-1.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4,\"name\":\"mat3\",\"url\":\"modules/mat3.html\",\"classes\":\"tsd-kind-namespace\"},{\"kind\":64,\"name\":\"setDefaultType\",\"url\":\"functions/mat3.setDefaultType.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":64,\"name\":\"create\",\"url\":\"functions/mat3.create.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":64,\"name\":\"set\",\"url\":\"functions/mat3.set.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":64,\"name\":\"fromMat4\",\"url\":\"functions/mat3.fromMat4.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":64,\"name\":\"fromQuat\",\"url\":\"functions/mat3.fromQuat.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":64,\"name\":\"negate\",\"url\":\"functions/mat3.negate.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":64,\"name\":\"copy\",\"url\":\"functions/mat3.copy.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":64,\"name\":\"equalsApproximately\",\"url\":\"functions/mat3.equalsApproximately.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":64,\"name\":\"equals\",\"url\":\"functions/mat3.equals.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":64,\"name\":\"identity\",\"url\":\"functions/mat3.identity.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":64,\"name\":\"transpose\",\"url\":\"functions/mat3.transpose.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":64,\"name\":\"inverse\",\"url\":\"functions/mat3.inverse.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":64,\"name\":\"determinant\",\"url\":\"functions/mat3.determinant.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":64,\"name\":\"multiply\",\"url\":\"functions/mat3.multiply.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":64,\"name\":\"setTranslation\",\"url\":\"functions/mat3.setTranslation.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":64,\"name\":\"getTranslation\",\"url\":\"functions/mat3.getTranslation.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":64,\"name\":\"getAxis\",\"url\":\"functions/mat3.getAxis.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":64,\"name\":\"setAxis\",\"url\":\"functions/mat3.setAxis.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":64,\"name\":\"getScaling\",\"url\":\"functions/mat3.getScaling.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":64,\"name\":\"translation\",\"url\":\"functions/mat3.translation.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":64,\"name\":\"translate\",\"url\":\"functions/mat3.translate.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":64,\"name\":\"rotation\",\"url\":\"functions/mat3.rotation.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":64,\"name\":\"rotate\",\"url\":\"functions/mat3.rotate.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":64,\"name\":\"scaling\",\"url\":\"functions/mat3.scaling.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":64,\"name\":\"scale\",\"url\":\"functions/mat3.scale.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":64,\"name\":\"uniformScaling\",\"url\":\"functions/mat3.uniformScaling.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":64,\"name\":\"uniformScale\",\"url\":\"functions/mat3.uniformScale.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":8388608,\"name\":\"default\",\"url\":\"modules/mat3.html#default\",\"classes\":\"tsd-kind-reference tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":4194304,\"name\":\"Mat3LikeCtor\",\"url\":\"types/mat3.Mat3LikeCtor.html\",\"classes\":\"tsd-kind-type-alias tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":512,\"name\":\"__type\",\"url\":\"types/mat3.Mat3LikeCtor.html#__type\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-type-alias\",\"parent\":\"mat3.Mat3LikeCtor\"},{\"kind\":64,\"name\":\"clone\",\"url\":\"functions/mat3.clone.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":64,\"name\":\"invert\",\"url\":\"functions/mat3.invert.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":64,\"name\":\"mul\",\"url\":\"functions/mat3.mul.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat3\"},{\"kind\":4194304,\"name\":\"Mat4\",\"url\":\"types/Mat4-1.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4,\"name\":\"mat4\",\"url\":\"modules/mat4.html\",\"classes\":\"tsd-kind-namespace\"},{\"kind\":64,\"name\":\"setDefaultType\",\"url\":\"functions/mat4.setDefaultType.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"create\",\"url\":\"functions/mat4.create.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"set\",\"url\":\"functions/mat4.set.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"fromMat3\",\"url\":\"functions/mat4.fromMat3.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"fromQuat\",\"url\":\"functions/mat4.fromQuat.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"negate\",\"url\":\"functions/mat4.negate.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"copy\",\"url\":\"functions/mat4.copy.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"equalsApproximately\",\"url\":\"functions/mat4.equalsApproximately.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"equals\",\"url\":\"functions/mat4.equals.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"identity\",\"url\":\"functions/mat4.identity.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"transpose\",\"url\":\"functions/mat4.transpose.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"inverse\",\"url\":\"functions/mat4.inverse.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"determinant\",\"url\":\"functions/mat4.determinant.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"multiply\",\"url\":\"functions/mat4.multiply.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"setTranslation\",\"url\":\"functions/mat4.setTranslation.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"getTranslation\",\"url\":\"functions/mat4.getTranslation.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"getAxis\",\"url\":\"functions/mat4.getAxis.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"setAxis\",\"url\":\"functions/mat4.setAxis.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"getScaling\",\"url\":\"functions/mat4.getScaling.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"perspective\",\"url\":\"functions/mat4.perspective.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"ortho\",\"url\":\"functions/mat4.ortho.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"frustum\",\"url\":\"functions/mat4.frustum.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"aim\",\"url\":\"functions/mat4.aim.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"cameraAim\",\"url\":\"functions/mat4.cameraAim.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"lookAt\",\"url\":\"functions/mat4.lookAt.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"translation\",\"url\":\"functions/mat4.translation.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"translate\",\"url\":\"functions/mat4.translate.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"rotationX\",\"url\":\"functions/mat4.rotationX.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"rotateX\",\"url\":\"functions/mat4.rotateX.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"rotationY\",\"url\":\"functions/mat4.rotationY.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"rotateY\",\"url\":\"functions/mat4.rotateY.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"rotationZ\",\"url\":\"functions/mat4.rotationZ.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"rotateZ\",\"url\":\"functions/mat4.rotateZ.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"axisRotation\",\"url\":\"functions/mat4.axisRotation.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"axisRotate\",\"url\":\"functions/mat4.axisRotate.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"scaling\",\"url\":\"functions/mat4.scaling.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"scale\",\"url\":\"functions/mat4.scale.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"uniformScaling\",\"url\":\"functions/mat4.uniformScaling.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"uniformScale\",\"url\":\"functions/mat4.uniformScale.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":8388608,\"name\":\"default\",\"url\":\"modules/mat4.html#default\",\"classes\":\"tsd-kind-reference tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":4194304,\"name\":\"Mat4LikeCtor\",\"url\":\"types/mat4.Mat4LikeCtor.html\",\"classes\":\"tsd-kind-type-alias tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":512,\"name\":\"__type\",\"url\":\"types/mat4.Mat4LikeCtor.html#__type\",\"classes\":\"tsd-kind-constructor tsd-parent-kind-type-alias\",\"parent\":\"mat4.Mat4LikeCtor\"},{\"kind\":64,\"name\":\"clone\",\"url\":\"functions/mat4.clone.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"invert\",\"url\":\"functions/mat4.invert.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"mul\",\"url\":\"functions/mat4.mul.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"rotation\",\"url\":\"functions/mat4.rotation.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":64,\"name\":\"rotate\",\"url\":\"functions/mat4.rotate.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"mat4\"},{\"kind\":4194304,\"name\":\"Quat\",\"url\":\"types/Quat-1.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4,\"name\":\"quat\",\"url\":\"modules/quat.html\",\"classes\":\"tsd-kind-namespace\"},{\"kind\":64,\"name\":\"set\",\"url\":\"functions/quat.set.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"fromAxisAngle\",\"url\":\"functions/quat.fromAxisAngle.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"toAxisAngle\",\"url\":\"functions/quat.toAxisAngle.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":65536,\"name\":\"__type\",\"url\":\"functions/quat.toAxisAngle.html#toAxisAngle.__type\",\"classes\":\"tsd-kind-type-literal\",\"parent\":\"quat.toAxisAngle.toAxisAngle\"},{\"kind\":1024,\"name\":\"angle\",\"url\":\"functions/quat.toAxisAngle.html#toAxisAngle.__type.angle\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"quat.toAxisAngle.toAxisAngle.__type\"},{\"kind\":1024,\"name\":\"axis\",\"url\":\"functions/quat.toAxisAngle.html#toAxisAngle.__type.axis\",\"classes\":\"tsd-kind-property tsd-parent-kind-type-literal\",\"parent\":\"quat.toAxisAngle.toAxisAngle.__type\"},{\"kind\":64,\"name\":\"angle\",\"url\":\"functions/quat.angle.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"multiply\",\"url\":\"functions/quat.multiply.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"rotateX\",\"url\":\"functions/quat.rotateX.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"rotateY\",\"url\":\"functions/quat.rotateY.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"rotateZ\",\"url\":\"functions/quat.rotateZ.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"slerp\",\"url\":\"functions/quat.slerp.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"inverse\",\"url\":\"functions/quat.inverse.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"conjugate\",\"url\":\"functions/quat.conjugate.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"fromMat\",\"url\":\"functions/quat.fromMat.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"fromEuler\",\"url\":\"functions/quat.fromEuler.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"copy\",\"url\":\"functions/quat.copy.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"add\",\"url\":\"functions/quat.add.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"subtract\",\"url\":\"functions/quat.subtract.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"mulScalar\",\"url\":\"functions/quat.mulScalar.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"divScalar\",\"url\":\"functions/quat.divScalar.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"dot\",\"url\":\"functions/quat.dot.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"lerp\",\"url\":\"functions/quat.lerp.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"length\",\"url\":\"functions/quat.length.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"lengthSq\",\"url\":\"functions/quat.lengthSq.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"normalize\",\"url\":\"functions/quat.normalize.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"equalsApproximately\",\"url\":\"functions/quat.equalsApproximately.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"equals\",\"url\":\"functions/quat.equals.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"identity\",\"url\":\"functions/quat.identity.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"rotationTo\",\"url\":\"functions/quat.rotationTo.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"sqlerp\",\"url\":\"functions/quat.sqlerp.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":4194304,\"name\":\"RotationOrder\",\"url\":\"types/quat.RotationOrder.html\",\"classes\":\"tsd-kind-type-alias tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":8388608,\"name\":\"default\",\"url\":\"modules/quat.html#default\",\"classes\":\"tsd-kind-reference tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"create\",\"url\":\"functions/quat.create.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"setDefaultType\",\"url\":\"functions/quat.setDefaultType.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":512,\"name\":\"__type\",\"url\":\"functions/quat.setDefaultType.html#setDefaultType.__type\",\"classes\":\"tsd-kind-constructor\",\"parent\":\"quat.setDefaultType.setDefaultType\"},{\"kind\":64,\"name\":\"fromValues\",\"url\":\"functions/quat.fromValues.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"mul\",\"url\":\"functions/quat.mul.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"clone\",\"url\":\"functions/quat.clone.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"sub\",\"url\":\"functions/quat.sub.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"scale\",\"url\":\"functions/quat.scale.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"len\",\"url\":\"functions/quat.len.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":64,\"name\":\"lenSq\",\"url\":\"functions/quat.lenSq.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"quat\"},{\"kind\":4,\"name\":\"utils\",\"url\":\"modules/utils.html\",\"classes\":\"tsd-kind-namespace\"},{\"kind\":64,\"name\":\"setEpsilon\",\"url\":\"functions/utils.setEpsilon.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"utils\"},{\"kind\":64,\"name\":\"degToRad\",\"url\":\"functions/utils.degToRad.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"utils\"},{\"kind\":64,\"name\":\"radToDeg\",\"url\":\"functions/utils.radToDeg.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"utils\"},{\"kind\":64,\"name\":\"lerp\",\"url\":\"functions/utils.lerp.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"utils\"},{\"kind\":64,\"name\":\"inverseLerp\",\"url\":\"functions/utils.inverseLerp.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"utils\"},{\"kind\":64,\"name\":\"euclideanModulo\",\"url\":\"functions/utils.euclideanModulo.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"utils\"},{\"kind\":32,\"name\":\"EPSILON\",\"url\":\"variables/utils.EPSILON.html\",\"classes\":\"tsd-kind-variable tsd-parent-kind-namespace\",\"parent\":\"utils\"},{\"kind\":4194304,\"name\":\"Vec2\",\"url\":\"types/Vec2-1.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4,\"name\":\"vec2\",\"url\":\"modules/vec2.html\",\"classes\":\"tsd-kind-namespace\"},{\"kind\":64,\"name\":\"set\",\"url\":\"functions/vec2.set.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"ceil\",\"url\":\"functions/vec2.ceil.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"floor\",\"url\":\"functions/vec2.floor.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"round\",\"url\":\"functions/vec2.round.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"clamp\",\"url\":\"functions/vec2.clamp.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"add\",\"url\":\"functions/vec2.add.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"addScaled\",\"url\":\"functions/vec2.addScaled.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"angle\",\"url\":\"functions/vec2.angle.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"subtract\",\"url\":\"functions/vec2.subtract.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"equalsApproximately\",\"url\":\"functions/vec2.equalsApproximately.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"equals\",\"url\":\"functions/vec2.equals.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"lerp\",\"url\":\"functions/vec2.lerp.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"lerpV\",\"url\":\"functions/vec2.lerpV.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"max\",\"url\":\"functions/vec2.max.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"min\",\"url\":\"functions/vec2.min.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"mulScalar\",\"url\":\"functions/vec2.mulScalar.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"divScalar\",\"url\":\"functions/vec2.divScalar.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"inverse\",\"url\":\"functions/vec2.inverse.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"cross\",\"url\":\"functions/vec2.cross.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"dot\",\"url\":\"functions/vec2.dot.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"length\",\"url\":\"functions/vec2.length.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"lengthSq\",\"url\":\"functions/vec2.lengthSq.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"distance\",\"url\":\"functions/vec2.distance.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"distanceSq\",\"url\":\"functions/vec2.distanceSq.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"normalize\",\"url\":\"functions/vec2.normalize.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"negate\",\"url\":\"functions/vec2.negate.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"copy\",\"url\":\"functions/vec2.copy.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"multiply\",\"url\":\"functions/vec2.multiply.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"divide\",\"url\":\"functions/vec2.divide.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"random\",\"url\":\"functions/vec2.random.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"zero\",\"url\":\"functions/vec2.zero.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"transformMat4\",\"url\":\"functions/vec2.transformMat4.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"transformMat3\",\"url\":\"functions/vec2.transformMat3.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":8388608,\"name\":\"default\",\"url\":\"modules/vec2.html#default\",\"classes\":\"tsd-kind-reference tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"create\",\"url\":\"functions/vec2.create.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"setDefaultType\",\"url\":\"functions/vec2.setDefaultType.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":512,\"name\":\"__type\",\"url\":\"functions/vec2.setDefaultType.html#setDefaultType.__type\",\"classes\":\"tsd-kind-constructor\",\"parent\":\"vec2.setDefaultType.setDefaultType\"},{\"kind\":64,\"name\":\"fromValues\",\"url\":\"functions/vec2.fromValues.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"sub\",\"url\":\"functions/vec2.sub.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"scale\",\"url\":\"functions/vec2.scale.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"invert\",\"url\":\"functions/vec2.invert.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"len\",\"url\":\"functions/vec2.len.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"lenSq\",\"url\":\"functions/vec2.lenSq.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"dist\",\"url\":\"functions/vec2.dist.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"distSq\",\"url\":\"functions/vec2.distSq.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"clone\",\"url\":\"functions/vec2.clone.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"mul\",\"url\":\"functions/vec2.mul.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":64,\"name\":\"div\",\"url\":\"functions/vec2.div.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec2\"},{\"kind\":4194304,\"name\":\"Vec3\",\"url\":\"types/Vec3-1.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4,\"name\":\"vec3\",\"url\":\"modules/vec3.html\",\"classes\":\"tsd-kind-namespace\"},{\"kind\":64,\"name\":\"set\",\"url\":\"functions/vec3.set.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"ceil\",\"url\":\"functions/vec3.ceil.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"floor\",\"url\":\"functions/vec3.floor.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"round\",\"url\":\"functions/vec3.round.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"clamp\",\"url\":\"functions/vec3.clamp.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"add\",\"url\":\"functions/vec3.add.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"addScaled\",\"url\":\"functions/vec3.addScaled.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"angle\",\"url\":\"functions/vec3.angle.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"subtract\",\"url\":\"functions/vec3.subtract.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"equalsApproximately\",\"url\":\"functions/vec3.equalsApproximately.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"equals\",\"url\":\"functions/vec3.equals.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"lerp\",\"url\":\"functions/vec3.lerp.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"lerpV\",\"url\":\"functions/vec3.lerpV.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"max\",\"url\":\"functions/vec3.max.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"min\",\"url\":\"functions/vec3.min.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"mulScalar\",\"url\":\"functions/vec3.mulScalar.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"divScalar\",\"url\":\"functions/vec3.divScalar.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"inverse\",\"url\":\"functions/vec3.inverse.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"cross\",\"url\":\"functions/vec3.cross.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"dot\",\"url\":\"functions/vec3.dot.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"length\",\"url\":\"functions/vec3.length.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"lengthSq\",\"url\":\"functions/vec3.lengthSq.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"distance\",\"url\":\"functions/vec3.distance.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"distanceSq\",\"url\":\"functions/vec3.distanceSq.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"normalize\",\"url\":\"functions/vec3.normalize.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"negate\",\"url\":\"functions/vec3.negate.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"copy\",\"url\":\"functions/vec3.copy.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"multiply\",\"url\":\"functions/vec3.multiply.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"divide\",\"url\":\"functions/vec3.divide.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"random\",\"url\":\"functions/vec3.random.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"zero\",\"url\":\"functions/vec3.zero.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"transformMat4\",\"url\":\"functions/vec3.transformMat4.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"transformMat4Upper3x3\",\"url\":\"functions/vec3.transformMat4Upper3x3.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"transformMat3\",\"url\":\"functions/vec3.transformMat3.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"transformQuat\",\"url\":\"functions/vec3.transformQuat.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"getTranslation\",\"url\":\"functions/vec3.getTranslation.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"getAxis\",\"url\":\"functions/vec3.getAxis.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"getScaling\",\"url\":\"functions/vec3.getScaling.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":8388608,\"name\":\"default\",\"url\":\"modules/vec3.html#default\",\"classes\":\"tsd-kind-reference tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"create\",\"url\":\"functions/vec3.create.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"setDefaultType\",\"url\":\"functions/vec3.setDefaultType.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":512,\"name\":\"__type\",\"url\":\"functions/vec3.setDefaultType.html#setDefaultType.__type\",\"classes\":\"tsd-kind-constructor\",\"parent\":\"vec3.setDefaultType.setDefaultType\"},{\"kind\":64,\"name\":\"fromValues\",\"url\":\"functions/vec3.fromValues.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"sub\",\"url\":\"functions/vec3.sub.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"scale\",\"url\":\"functions/vec3.scale.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"invert\",\"url\":\"functions/vec3.invert.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"len\",\"url\":\"functions/vec3.len.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"lenSq\",\"url\":\"functions/vec3.lenSq.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"dist\",\"url\":\"functions/vec3.dist.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"distSq\",\"url\":\"functions/vec3.distSq.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"clone\",\"url\":\"functions/vec3.clone.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"mul\",\"url\":\"functions/vec3.mul.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":64,\"name\":\"div\",\"url\":\"functions/vec3.div.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec3\"},{\"kind\":4194304,\"name\":\"Vec4\",\"url\":\"types/Vec4-1.html\",\"classes\":\"tsd-kind-type-alias\"},{\"kind\":4,\"name\":\"vec4\",\"url\":\"modules/vec4.html\",\"classes\":\"tsd-kind-namespace\"},{\"kind\":64,\"name\":\"set\",\"url\":\"functions/vec4.set.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"ceil\",\"url\":\"functions/vec4.ceil.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"floor\",\"url\":\"functions/vec4.floor.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"round\",\"url\":\"functions/vec4.round.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"clamp\",\"url\":\"functions/vec4.clamp.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"add\",\"url\":\"functions/vec4.add.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"addScaled\",\"url\":\"functions/vec4.addScaled.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"subtract\",\"url\":\"functions/vec4.subtract.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"equalsApproximately\",\"url\":\"functions/vec4.equalsApproximately.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"equals\",\"url\":\"functions/vec4.equals.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"lerp\",\"url\":\"functions/vec4.lerp.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"lerpV\",\"url\":\"functions/vec4.lerpV.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"max\",\"url\":\"functions/vec4.max.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"min\",\"url\":\"functions/vec4.min.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"mulScalar\",\"url\":\"functions/vec4.mulScalar.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"divScalar\",\"url\":\"functions/vec4.divScalar.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"inverse\",\"url\":\"functions/vec4.inverse.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"dot\",\"url\":\"functions/vec4.dot.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"length\",\"url\":\"functions/vec4.length.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"lengthSq\",\"url\":\"functions/vec4.lengthSq.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"distance\",\"url\":\"functions/vec4.distance.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"distanceSq\",\"url\":\"functions/vec4.distanceSq.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"normalize\",\"url\":\"functions/vec4.normalize.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"negate\",\"url\":\"functions/vec4.negate.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"copy\",\"url\":\"functions/vec4.copy.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"multiply\",\"url\":\"functions/vec4.multiply.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"divide\",\"url\":\"functions/vec4.divide.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"zero\",\"url\":\"functions/vec4.zero.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"transformMat4\",\"url\":\"functions/vec4.transformMat4.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":8388608,\"name\":\"default\",\"url\":\"modules/vec4.html#default\",\"classes\":\"tsd-kind-reference tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"create\",\"url\":\"functions/vec4.create.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"setDefaultType\",\"url\":\"functions/vec4.setDefaultType.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":512,\"name\":\"__type\",\"url\":\"functions/vec4.setDefaultType.html#setDefaultType.__type\",\"classes\":\"tsd-kind-constructor\",\"parent\":\"vec4.setDefaultType.setDefaultType\"},{\"kind\":64,\"name\":\"fromValues\",\"url\":\"functions/vec4.fromValues.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"sub\",\"url\":\"functions/vec4.sub.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"scale\",\"url\":\"functions/vec4.scale.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"invert\",\"url\":\"functions/vec4.invert.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"len\",\"url\":\"functions/vec4.len.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"lenSq\",\"url\":\"functions/vec4.lenSq.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"dist\",\"url\":\"functions/vec4.dist.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"distSq\",\"url\":\"functions/vec4.distSq.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"clone\",\"url\":\"functions/vec4.clone.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"mul\",\"url\":\"functions/vec4.mul.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"},{\"kind\":64,\"name\":\"div\",\"url\":\"functions/vec4.div.html\",\"classes\":\"tsd-kind-function tsd-parent-kind-namespace\",\"parent\":\"vec4\"}],\"index\":{\"version\":\"2.3.9\",\"fields\":[\"name\",\"comment\"],\"fieldVectors\":[[\"name/0\",[0,36.55]],[\"comment/0\",[]],[\"name/1\",[1,47.536]],[\"comment/1\",[]],[\"name/2\",[1,47.536]],[\"comment/2\",[]],[\"name/3\",[0,36.55]],[\"comment/3\",[]],[\"name/4\",[2,37.981]],[\"comment/4\",[]],[\"name/5\",[3,37.981]],[\"comment/5\",[]],[\"name/6\",[4,52.644]],[\"comment/6\",[]],[\"name/7\",[5,47.536]],[\"comment/7\",[]],[\"name/8\",[6,39.651]],[\"comment/8\",[]],[\"name/9\",[7,37.981]],[\"comment/9\",[]],[\"name/10\",[8,37.981]],[\"comment/10\",[]],[\"name/11\",[9,37.981]],[\"comment/11\",[]],[\"name/12\",[10,44.171]],[\"comment/12\",[]],[\"name/13\",[11,47.536]],[\"comment/13\",[]],[\"name/14\",[12,37.981]],[\"comment/14\",[]],[\"name/15\",[13,47.536]],[\"comment/15\",[]],[\"name/16\",[14,37.981]],[\"comment/16\",[]],[\"name/17\",[15,47.536]],[\"comment/17\",[]],[\"name/18\",[16,44.171]],[\"comment/18\",[]],[\"name/19\",[17,44.171]],[\"comment/19\",[]],[\"name/20\",[18,47.536]],[\"comment/20\",[]],[\"name/21\",[19,44.171]],[\"comment/21\",[]],[\"name/22\",[20,47.536]],[\"comment/22\",[]],[\"name/23\",[21,47.536]],[\"comment/23\",[]],[\"name/24\",[22,47.536]],[\"comment/24\",[]],[\"name/25\",[23,47.536]],[\"comment/25\",[]],[\"name/26\",[24,47.536]],[\"comment/26\",[]],[\"name/27\",[25,37.981]],[\"comment/27\",[]],[\"name/28\",[26,47.536]],[\"comment/28\",[]],[\"name/29\",[27,47.536]],[\"comment/29\",[]],[\"name/30\",[28,37.981]],[\"comment/30\",[]],[\"name/31\",[29,52.644]],[\"comment/31\",[]],[\"name/32\",[30,36.55]],[\"comment/32\",[]],[\"name/33\",[31,37.981]],[\"comment/33\",[]],[\"name/34\",[32,39.651]],[\"comment/34\",[]],[\"name/35\",[33,37.981]],[\"comment/35\",[]],[\"name/36\",[34,47.536]],[\"comment/36\",[]],[\"name/37\",[34,47.536]],[\"comment/37\",[]],[\"name/38\",[0,36.55]],[\"comment/38\",[]],[\"name/39\",[2,37.981]],[\"comment/39\",[]],[\"name/40\",[3,37.981]],[\"comment/40\",[]],[\"name/41\",[35,52.644]],[\"comment/41\",[]],[\"name/42\",[5,47.536]],[\"comment/42\",[]],[\"name/43\",[6,39.651]],[\"comment/43\",[]],[\"name/44\",[7,37.981]],[\"comment/44\",[]],[\"name/45\",[8,37.981]],[\"comment/45\",[]],[\"name/46\",[9,37.981]],[\"comment/46\",[]],[\"name/47\",[10,44.171]],[\"comment/47\",[]],[\"name/48\",[11,47.536]],[\"comment/48\",[]],[\"name/49\",[12,37.981]],[\"comment/49\",[]],[\"name/50\",[13,47.536]],[\"comment/50\",[]],[\"name/51\",[14,37.981]],[\"comment/51\",[]],[\"name/52\",[15,47.536]],[\"comment/52\",[]],[\"name/53\",[16,44.171]],[\"comment/53\",[]],[\"name/54\",[17,44.171]],[\"comment/54\",[]],[\"name/55\",[18,47.536]],[\"comment/55\",[]],[\"name/56\",[19,44.171]],[\"comment/56\",[]],[\"name/57\",[36,52.644]],[\"comment/57\",[]],[\"name/58\",[37,52.644]],[\"comment/58\",[]],[\"name/59\",[38,52.644]],[\"comment/59\",[]],[\"name/60\",[39,52.644]],[\"comment/60\",[]],[\"name/61\",[40,52.644]],[\"comment/61\",[]],[\"name/62\",[41,52.644]],[\"comment/62\",[]],[\"name/63\",[20,47.536]],[\"comment/63\",[]],[\"name/64\",[21,47.536]],[\"comment/64\",[]],[\"name/65\",[42,52.644]],[\"comment/65\",[]],[\"name/66\",[43,47.536]],[\"comment/66\",[]],[\"name/67\",[44,52.644]],[\"comment/67\",[]],[\"name/68\",[45,47.536]],[\"comment/68\",[]],[\"name/69\",[46,52.644]],[\"comment/69\",[]],[\"name/70\",[47,47.536]],[\"comment/70\",[]],[\"name/71\",[48,52.644]],[\"comment/71\",[]],[\"name/72\",[49,52.644]],[\"comment/72\",[]],[\"name/73\",[24,47.536]],[\"comment/73\",[]],[\"name/74\",[25,37.981]],[\"comment/74\",[]],[\"name/75\",[26,47.536]],[\"comment/75\",[]],[\"name/76\",[27,47.536]],[\"comment/76\",[]],[\"name/77\",[28,37.981]],[\"comment/77\",[]],[\"name/78\",[50,52.644]],[\"comment/78\",[]],[\"name/79\",[30,36.55]],[\"comment/79\",[]],[\"name/80\",[31,37.981]],[\"comment/80\",[]],[\"name/81\",[32,39.651]],[\"comment/81\",[]],[\"name/82\",[33,37.981]],[\"comment/82\",[]],[\"name/83\",[22,47.536]],[\"comment/83\",[]],[\"name/84\",[23,47.536]],[\"comment/84\",[]],[\"name/85\",[51,47.536]],[\"comment/85\",[]],[\"name/86\",[51,47.536]],[\"comment/86\",[]],[\"name/87\",[3,37.981]],[\"comment/87\",[]],[\"name/88\",[52,52.644]],[\"comment/88\",[]],[\"name/89\",[53,52.644]],[\"comment/89\",[]],[\"name/90\",[30,36.55]],[\"comment/90\",[]],[\"name/91\",[54,41.658]],[\"comment/91\",[]],[\"name/92\",[55,52.644]],[\"comment/92\",[]],[\"name/93\",[54,41.658]],[\"comment/93\",[]],[\"name/94\",[14,37.981]],[\"comment/94\",[]],[\"name/95\",[43,47.536]],[\"comment/95\",[]],[\"name/96\",[45,47.536]],[\"comment/96\",[]],[\"name/97\",[47,47.536]],[\"comment/97\",[]],[\"name/98\",[56,52.644]],[\"comment/98\",[]],[\"name/99\",[12,37.981]],[\"comment/99\",[]],[\"name/100\",[57,52.644]],[\"comment/100\",[]],[\"name/101\",[58,52.644]],[\"comment/101\",[]],[\"name/102\",[59,52.644]],[\"comment/102\",[]],[\"name/103\",[7,37.981]],[\"comment/103\",[]],[\"name/104\",[60,41.658]],[\"comment/104\",[]],[\"name/105\",[61,41.658]],[\"comment/105\",[]],[\"name/106\",[62,41.658]],[\"comment/106\",[]],[\"name/107\",[63,41.658]],[\"comment/107\",[]],[\"name/108\",[64,41.658]],[\"comment/108\",[]],[\"name/109\",[65,39.651]],[\"comment/109\",[]],[\"name/110\",[66,41.658]],[\"comment/110\",[]],[\"name/111\",[67,41.658]],[\"comment/111\",[]],[\"name/112\",[68,41.658]],[\"comment/112\",[]],[\"name/113\",[8,37.981]],[\"comment/113\",[]],[\"name/114\",[9,37.981]],[\"comment/114\",[]],[\"name/115\",[10,44.171]],[\"comment/115\",[]],[\"name/116\",[69,52.644]],[\"comment/116\",[]],[\"name/117\",[70,52.644]],[\"comment/117\",[]],[\"name/118\",[71,52.644]],[\"comment/118\",[]],[\"name/119\",[28,37.981]],[\"comment/119\",[]],[\"name/120\",[2,37.981]],[\"comment/120\",[]],[\"name/121\",[0,36.55]],[\"comment/121\",[]],[\"name/122\",[30,36.55]],[\"comment/122\",[]],[\"name/123\",[72,41.658]],[\"comment/123\",[]],[\"name/124\",[33,37.981]],[\"comment/124\",[]],[\"name/125\",[31,37.981]],[\"comment/125\",[]],[\"name/126\",[73,41.658]],[\"comment/126\",[]],[\"name/127\",[25,37.981]],[\"comment/127\",[]],[\"name/128\",[74,41.658]],[\"comment/128\",[]],[\"name/129\",[75,41.658]],[\"comment/129\",[]],[\"name/130\",[76,52.644]],[\"comment/130\",[]],[\"name/131\",[77,52.644]],[\"comment/131\",[]],[\"name/132\",[78,52.644]],[\"comment/132\",[]],[\"name/133\",[79,52.644]],[\"comment/133\",[]],[\"name/134\",[65,39.651]],[\"comment/134\",[]],[\"name/135\",[80,52.644]],[\"comment/135\",[]],[\"name/136\",[81,52.644]],[\"comment/136\",[]],[\"name/137\",[82,52.644]],[\"comment/137\",[]],[\"name/138\",[83,47.536]],[\"comment/138\",[]],[\"name/139\",[83,47.536]],[\"comment/139\",[]],[\"name/140\",[3,37.981]],[\"comment/140\",[]],[\"name/141\",[84,44.171]],[\"comment/141\",[]],[\"name/142\",[85,44.171]],[\"comment/142\",[]],[\"name/143\",[86,44.171]],[\"comment/143\",[]],[\"name/144\",[87,44.171]],[\"comment/144\",[]],[\"name/145\",[60,41.658]],[\"comment/145\",[]],[\"name/146\",[88,44.171]],[\"comment/146\",[]],[\"name/147\",[54,41.658]],[\"comment/147\",[]],[\"name/148\",[61,41.658]],[\"comment/148\",[]],[\"name/149\",[8,37.981]],[\"comment/149\",[]],[\"name/150\",[9,37.981]],[\"comment/150\",[]],[\"name/151\",[65,39.651]],[\"comment/151\",[]],[\"name/152\",[89,44.171]],[\"comment/152\",[]],[\"name/153\",[90,44.171]],[\"comment/153\",[]],[\"name/154\",[91,44.171]],[\"comment/154\",[]],[\"name/155\",[62,41.658]],[\"comment/155\",[]],[\"name/156\",[63,41.658]],[\"comment/156\",[]],[\"name/157\",[12,37.981]],[\"comment/157\",[]],[\"name/158\",[92,47.536]],[\"comment/158\",[]],[\"name/159\",[64,41.658]],[\"comment/159\",[]],[\"name/160\",[66,41.658]],[\"comment/160\",[]],[\"name/161\",[67,41.658]],[\"comment/161\",[]],[\"name/162\",[93,44.171]],[\"comment/162\",[]],[\"name/163\",[94,44.171]],[\"comment/163\",[]],[\"name/164\",[68,41.658]],[\"comment/164\",[]],[\"name/165\",[6,39.651]],[\"comment/165\",[]],[\"name/166\",[7,37.981]],[\"comment/166\",[]],[\"name/167\",[14,37.981]],[\"comment/167\",[]],[\"name/168\",[95,44.171]],[\"comment/168\",[]],[\"name/169\",[96,47.536]],[\"comment/169\",[]],[\"name/170\",[97,44.171]],[\"comment/170\",[]],[\"name/171\",[98,44.171]],[\"comment/171\",[]],[\"name/172\",[99,47.536]],[\"comment/172\",[]],[\"name/173\",[28,37.981]],[\"comment/173\",[]],[\"name/174\",[2,37.981]],[\"comment/174\",[]],[\"name/175\",[0,36.55]],[\"comment/175\",[]],[\"name/176\",[30,36.55]],[\"comment/176\",[]],[\"name/177\",[72,41.658]],[\"comment/177\",[]],[\"name/178\",[73,41.658]],[\"comment/178\",[]],[\"name/179\",[25,37.981]],[\"comment/179\",[]],[\"name/180\",[32,39.651]],[\"comment/180\",[]],[\"name/181\",[74,41.658]],[\"comment/181\",[]],[\"name/182\",[75,41.658]],[\"comment/182\",[]],[\"name/183\",[100,44.171]],[\"comment/183\",[]],[\"name/184\",[101,44.171]],[\"comment/184\",[]],[\"name/185\",[31,37.981]],[\"comment/185\",[]],[\"name/186\",[33,37.981]],[\"comment/186\",[]],[\"name/187\",[102,44.171]],[\"comment/187\",[]],[\"name/188\",[103,47.536]],[\"comment/188\",[]],[\"name/189\",[103,47.536]],[\"comment/189\",[]],[\"name/190\",[3,37.981]],[\"comment/190\",[]],[\"name/191\",[84,44.171]],[\"comment/191\",[]],[\"name/192\",[85,44.171]],[\"comment/192\",[]],[\"name/193\",[86,44.171]],[\"comment/193\",[]],[\"name/194\",[87,44.171]],[\"comment/194\",[]],[\"name/195\",[60,41.658]],[\"comment/195\",[]],[\"name/196\",[88,44.171]],[\"comment/196\",[]],[\"name/197\",[54,41.658]],[\"comment/197\",[]],[\"name/198\",[61,41.658]],[\"comment/198\",[]],[\"name/199\",[8,37.981]],[\"comment/199\",[]],[\"name/200\",[9,37.981]],[\"comment/200\",[]],[\"name/201\",[65,39.651]],[\"comment/201\",[]],[\"name/202\",[89,44.171]],[\"comment/202\",[]],[\"name/203\",[90,44.171]],[\"comment/203\",[]],[\"name/204\",[91,44.171]],[\"comment/204\",[]],[\"name/205\",[62,41.658]],[\"comment/205\",[]],[\"name/206\",[63,41.658]],[\"comment/206\",[]],[\"name/207\",[12,37.981]],[\"comment/207\",[]],[\"name/208\",[92,47.536]],[\"comment/208\",[]],[\"name/209\",[64,41.658]],[\"comment/209\",[]],[\"name/210\",[66,41.658]],[\"comment/210\",[]],[\"name/211\",[67,41.658]],[\"comment/211\",[]],[\"name/212\",[93,44.171]],[\"comment/212\",[]],[\"name/213\",[94,44.171]],[\"comment/213\",[]],[\"name/214\",[68,41.658]],[\"comment/214\",[]],[\"name/215\",[6,39.651]],[\"comment/215\",[]],[\"name/216\",[7,37.981]],[\"comment/216\",[]],[\"name/217\",[14,37.981]],[\"comment/217\",[]],[\"name/218\",[95,44.171]],[\"comment/218\",[]],[\"name/219\",[96,47.536]],[\"comment/219\",[]],[\"name/220\",[97,44.171]],[\"comment/220\",[]],[\"name/221\",[98,44.171]],[\"comment/221\",[]],[\"name/222\",[104,52.644]],[\"comment/222\",[]],[\"name/223\",[99,47.536]],[\"comment/223\",[]],[\"name/224\",[105,52.644]],[\"comment/224\",[]],[\"name/225\",[16,44.171]],[\"comment/225\",[]],[\"name/226\",[17,44.171]],[\"comment/226\",[]],[\"name/227\",[19,44.171]],[\"comment/227\",[]],[\"name/228\",[28,37.981]],[\"comment/228\",[]],[\"name/229\",[2,37.981]],[\"comment/229\",[]],[\"name/230\",[0,36.55]],[\"comment/230\",[]],[\"name/231\",[30,36.55]],[\"comment/231\",[]],[\"name/232\",[72,41.658]],[\"comment/232\",[]],[\"name/233\",[73,41.658]],[\"comment/233\",[]],[\"name/234\",[25,37.981]],[\"comment/234\",[]],[\"name/235\",[32,39.651]],[\"comment/235\",[]],[\"name/236\",[74,41.658]],[\"comment/236\",[]],[\"name/237\",[75,41.658]],[\"comment/237\",[]],[\"name/238\",[100,44.171]],[\"comment/238\",[]],[\"name/239\",[101,44.171]],[\"comment/239\",[]],[\"name/240\",[31,37.981]],[\"comment/240\",[]],[\"name/241\",[33,37.981]],[\"comment/241\",[]],[\"name/242\",[102,44.171]],[\"comment/242\",[]],[\"name/243\",[106,47.536]],[\"comment/243\",[]],[\"name/244\",[106,47.536]],[\"comment/244\",[]],[\"name/245\",[3,37.981]],[\"comment/245\",[]],[\"name/246\",[84,44.171]],[\"comment/246\",[]],[\"name/247\",[85,44.171]],[\"comment/247\",[]],[\"name/248\",[86,44.171]],[\"comment/248\",[]],[\"name/249\",[87,44.171]],[\"comment/249\",[]],[\"name/250\",[60,41.658]],[\"comment/250\",[]],[\"name/251\",[88,44.171]],[\"comment/251\",[]],[\"name/252\",[61,41.658]],[\"comment/252\",[]],[\"name/253\",[8,37.981]],[\"comment/253\",[]],[\"name/254\",[9,37.981]],[\"comment/254\",[]],[\"name/255\",[65,39.651]],[\"comment/255\",[]],[\"name/256\",[89,44.171]],[\"comment/256\",[]],[\"name/257\",[90,44.171]],[\"comment/257\",[]],[\"name/258\",[91,44.171]],[\"comment/258\",[]],[\"name/259\",[62,41.658]],[\"comment/259\",[]],[\"name/260\",[63,41.658]],[\"comment/260\",[]],[\"name/261\",[12,37.981]],[\"comment/261\",[]],[\"name/262\",[64,41.658]],[\"comment/262\",[]],[\"name/263\",[66,41.658]],[\"comment/263\",[]],[\"name/264\",[67,41.658]],[\"comment/264\",[]],[\"name/265\",[93,44.171]],[\"comment/265\",[]],[\"name/266\",[94,44.171]],[\"comment/266\",[]],[\"name/267\",[68,41.658]],[\"comment/267\",[]],[\"name/268\",[6,39.651]],[\"comment/268\",[]],[\"name/269\",[7,37.981]],[\"comment/269\",[]],[\"name/270\",[14,37.981]],[\"comment/270\",[]],[\"name/271\",[95,44.171]],[\"comment/271\",[]],[\"name/272\",[97,44.171]],[\"comment/272\",[]],[\"name/273\",[98,44.171]],[\"comment/273\",[]],[\"name/274\",[28,37.981]],[\"comment/274\",[]],[\"name/275\",[2,37.981]],[\"comment/275\",[]],[\"name/276\",[0,36.55]],[\"comment/276\",[]],[\"name/277\",[30,36.55]],[\"comment/277\",[]],[\"name/278\",[72,41.658]],[\"comment/278\",[]],[\"name/279\",[73,41.658]],[\"comment/279\",[]],[\"name/280\",[25,37.981]],[\"comment/280\",[]],[\"name/281\",[32,39.651]],[\"comment/281\",[]],[\"name/282\",[74,41.658]],[\"comment/282\",[]],[\"name/283\",[75,41.658]],[\"comment/283\",[]],[\"name/284\",[100,44.171]],[\"comment/284\",[]],[\"name/285\",[101,44.171]],[\"comment/285\",[]],[\"name/286\",[31,37.981]],[\"comment/286\",[]],[\"name/287\",[33,37.981]],[\"comment/287\",[]],[\"name/288\",[102,44.171]],[\"comment/288\",[]]],\"invertedIndex\":[[\"__type\",{\"_index\":30,\"name\":{\"32\":{},\"79\":{},\"90\":{},\"122\":{},\"176\":{},\"231\":{},\"277\":{}},\"comment\":{}}],[\"add\",{\"_index\":60,\"name\":{\"104\":{},\"145\":{},\"195\":{},\"250\":{}},\"comment\":{}}],[\"addscaled\",{\"_index\":88,\"name\":{\"146\":{},\"196\":{},\"251\":{}},\"comment\":{}}],[\"aim\",{\"_index\":39,\"name\":{\"60\":{}},\"comment\":{}}],[\"angle\",{\"_index\":54,\"name\":{\"91\":{},\"93\":{},\"147\":{},\"197\":{}},\"comment\":{}}],[\"axis\",{\"_index\":55,\"name\":{\"92\":{}},\"comment\":{}}],[\"axisrotate\",{\"_index\":49,\"name\":{\"72\":{}},\"comment\":{}}],[\"axisrotation\",{\"_index\":48,\"name\":{\"71\":{}},\"comment\":{}}],[\"cameraaim\",{\"_index\":40,\"name\":{\"61\":{}},\"comment\":{}}],[\"ceil\",{\"_index\":84,\"name\":{\"141\":{},\"191\":{},\"246\":{}},\"comment\":{}}],[\"clamp\",{\"_index\":87,\"name\":{\"144\":{},\"194\":{},\"249\":{}},\"comment\":{}}],[\"clone\",{\"_index\":31,\"name\":{\"33\":{},\"80\":{},\"125\":{},\"185\":{},\"240\":{},\"286\":{}},\"comment\":{}}],[\"conjugate\",{\"_index\":57,\"name\":{\"100\":{}},\"comment\":{}}],[\"copy\",{\"_index\":7,\"name\":{\"9\":{},\"44\":{},\"103\":{},\"166\":{},\"216\":{},\"269\":{}},\"comment\":{}}],[\"create\",{\"_index\":2,\"name\":{\"4\":{},\"39\":{},\"120\":{},\"174\":{},\"229\":{},\"275\":{}},\"comment\":{}}],[\"cross\",{\"_index\":92,\"name\":{\"158\":{},\"208\":{}},\"comment\":{}}],[\"default\",{\"_index\":28,\"name\":{\"30\":{},\"77\":{},\"119\":{},\"173\":{},\"228\":{},\"274\":{}},\"comment\":{}}],[\"degtorad\",{\"_index\":78,\"name\":{\"132\":{}},\"comment\":{}}],[\"determinant\",{\"_index\":13,\"name\":{\"15\":{},\"50\":{}},\"comment\":{}}],[\"dist\",{\"_index\":100,\"name\":{\"183\":{},\"238\":{},\"284\":{}},\"comment\":{}}],[\"distance\",{\"_index\":93,\"name\":{\"162\":{},\"212\":{},\"265\":{}},\"comment\":{}}],[\"distancesq\",{\"_index\":94,\"name\":{\"163\":{},\"213\":{},\"266\":{}},\"comment\":{}}],[\"distsq\",{\"_index\":101,\"name\":{\"184\":{},\"239\":{},\"285\":{}},\"comment\":{}}],[\"div\",{\"_index\":102,\"name\":{\"187\":{},\"242\":{},\"288\":{}},\"comment\":{}}],[\"divide\",{\"_index\":95,\"name\":{\"168\":{},\"218\":{},\"271\":{}},\"comment\":{}}],[\"divscalar\",{\"_index\":63,\"name\":{\"107\":{},\"156\":{},\"206\":{},\"260\":{}},\"comment\":{}}],[\"dot\",{\"_index\":64,\"name\":{\"108\":{},\"159\":{},\"209\":{},\"262\":{}},\"comment\":{}}],[\"epsilon\",{\"_index\":82,\"name\":{\"137\":{}},\"comment\":{}}],[\"equals\",{\"_index\":9,\"name\":{\"11\":{},\"46\":{},\"114\":{},\"150\":{},\"200\":{},\"254\":{}},\"comment\":{}}],[\"equalsapproximately\",{\"_index\":8,\"name\":{\"10\":{},\"45\":{},\"113\":{},\"149\":{},\"199\":{},\"253\":{}},\"comment\":{}}],[\"euclideanmodulo\",{\"_index\":81,\"name\":{\"136\":{}},\"comment\":{}}],[\"floor\",{\"_index\":85,\"name\":{\"142\":{},\"192\":{},\"247\":{}},\"comment\":{}}],[\"fromaxisangle\",{\"_index\":52,\"name\":{\"88\":{}},\"comment\":{}}],[\"fromeuler\",{\"_index\":59,\"name\":{\"102\":{}},\"comment\":{}}],[\"frommat\",{\"_index\":58,\"name\":{\"101\":{}},\"comment\":{}}],[\"frommat3\",{\"_index\":35,\"name\":{\"41\":{}},\"comment\":{}}],[\"frommat4\",{\"_index\":4,\"name\":{\"6\":{}},\"comment\":{}}],[\"fromquat\",{\"_index\":5,\"name\":{\"7\":{},\"42\":{}},\"comment\":{}}],[\"fromvalues\",{\"_index\":72,\"name\":{\"123\":{},\"177\":{},\"232\":{},\"278\":{}},\"comment\":{}}],[\"frustum\",{\"_index\":38,\"name\":{\"59\":{}},\"comment\":{}}],[\"getaxis\",{\"_index\":17,\"name\":{\"19\":{},\"54\":{},\"226\":{}},\"comment\":{}}],[\"getscaling\",{\"_index\":19,\"name\":{\"21\":{},\"56\":{},\"227\":{}},\"comment\":{}}],[\"gettranslation\",{\"_index\":16,\"name\":{\"18\":{},\"53\":{},\"225\":{}},\"comment\":{}}],[\"identity\",{\"_index\":10,\"name\":{\"12\":{},\"47\":{},\"115\":{}},\"comment\":{}}],[\"inverse\",{\"_index\":12,\"name\":{\"14\":{},\"49\":{},\"99\":{},\"157\":{},\"207\":{},\"261\":{}},\"comment\":{}}],[\"inverselerp\",{\"_index\":80,\"name\":{\"135\":{}},\"comment\":{}}],[\"invert\",{\"_index\":32,\"name\":{\"34\":{},\"81\":{},\"180\":{},\"235\":{},\"281\":{}},\"comment\":{}}],[\"len\",{\"_index\":74,\"name\":{\"128\":{},\"181\":{},\"236\":{},\"282\":{}},\"comment\":{}}],[\"length\",{\"_index\":66,\"name\":{\"110\":{},\"160\":{},\"210\":{},\"263\":{}},\"comment\":{}}],[\"lengthsq\",{\"_index\":67,\"name\":{\"111\":{},\"161\":{},\"211\":{},\"264\":{}},\"comment\":{}}],[\"lensq\",{\"_index\":75,\"name\":{\"129\":{},\"182\":{},\"237\":{},\"283\":{}},\"comment\":{}}],[\"lerp\",{\"_index\":65,\"name\":{\"109\":{},\"134\":{},\"151\":{},\"201\":{},\"255\":{}},\"comment\":{}}],[\"lerpv\",{\"_index\":89,\"name\":{\"152\":{},\"202\":{},\"256\":{}},\"comment\":{}}],[\"lookat\",{\"_index\":41,\"name\":{\"62\":{}},\"comment\":{}}],[\"mat3\",{\"_index\":1,\"name\":{\"1\":{},\"2\":{}},\"comment\":{}}],[\"mat3likector\",{\"_index\":29,\"name\":{\"31\":{}},\"comment\":{}}],[\"mat4\",{\"_index\":34,\"name\":{\"36\":{},\"37\":{}},\"comment\":{}}],[\"mat4likector\",{\"_index\":50,\"name\":{\"78\":{}},\"comment\":{}}],[\"max\",{\"_index\":90,\"name\":{\"153\":{},\"203\":{},\"257\":{}},\"comment\":{}}],[\"min\",{\"_index\":91,\"name\":{\"154\":{},\"204\":{},\"258\":{}},\"comment\":{}}],[\"mul\",{\"_index\":33,\"name\":{\"35\":{},\"82\":{},\"124\":{},\"186\":{},\"241\":{},\"287\":{}},\"comment\":{}}],[\"mulscalar\",{\"_index\":62,\"name\":{\"106\":{},\"155\":{},\"205\":{},\"259\":{}},\"comment\":{}}],[\"multiply\",{\"_index\":14,\"name\":{\"16\":{},\"51\":{},\"94\":{},\"167\":{},\"217\":{},\"270\":{}},\"comment\":{}}],[\"negate\",{\"_index\":6,\"name\":{\"8\":{},\"43\":{},\"165\":{},\"215\":{},\"268\":{}},\"comment\":{}}],[\"normalize\",{\"_index\":68,\"name\":{\"112\":{},\"164\":{},\"214\":{},\"267\":{}},\"comment\":{}}],[\"ortho\",{\"_index\":37,\"name\":{\"58\":{}},\"comment\":{}}],[\"perspective\",{\"_index\":36,\"name\":{\"57\":{}},\"comment\":{}}],[\"quat\",{\"_index\":51,\"name\":{\"85\":{},\"86\":{}},\"comment\":{}}],[\"radtodeg\",{\"_index\":79,\"name\":{\"133\":{}},\"comment\":{}}],[\"random\",{\"_index\":96,\"name\":{\"169\":{},\"219\":{}},\"comment\":{}}],[\"rotate\",{\"_index\":23,\"name\":{\"25\":{},\"84\":{}},\"comment\":{}}],[\"rotatex\",{\"_index\":43,\"name\":{\"66\":{},\"95\":{}},\"comment\":{}}],[\"rotatey\",{\"_index\":45,\"name\":{\"68\":{},\"96\":{}},\"comment\":{}}],[\"rotatez\",{\"_index\":47,\"name\":{\"70\":{},\"97\":{}},\"comment\":{}}],[\"rotation\",{\"_index\":22,\"name\":{\"24\":{},\"83\":{}},\"comment\":{}}],[\"rotationorder\",{\"_index\":71,\"name\":{\"118\":{}},\"comment\":{}}],[\"rotationto\",{\"_index\":69,\"name\":{\"116\":{}},\"comment\":{}}],[\"rotationx\",{\"_index\":42,\"name\":{\"65\":{}},\"comment\":{}}],[\"rotationy\",{\"_index\":44,\"name\":{\"67\":{}},\"comment\":{}}],[\"rotationz\",{\"_index\":46,\"name\":{\"69\":{}},\"comment\":{}}],[\"round\",{\"_index\":86,\"name\":{\"143\":{},\"193\":{},\"248\":{}},\"comment\":{}}],[\"scale\",{\"_index\":25,\"name\":{\"27\":{},\"74\":{},\"127\":{},\"179\":{},\"234\":{},\"280\":{}},\"comment\":{}}],[\"scaling\",{\"_index\":24,\"name\":{\"26\":{},\"73\":{}},\"comment\":{}}],[\"set\",{\"_index\":3,\"name\":{\"5\":{},\"40\":{},\"87\":{},\"140\":{},\"190\":{},\"245\":{}},\"comment\":{}}],[\"setaxis\",{\"_index\":18,\"name\":{\"20\":{},\"55\":{}},\"comment\":{}}],[\"setdefaulttype\",{\"_index\":0,\"name\":{\"0\":{},\"3\":{},\"38\":{},\"121\":{},\"175\":{},\"230\":{},\"276\":{}},\"comment\":{}}],[\"setepsilon\",{\"_index\":77,\"name\":{\"131\":{}},\"comment\":{}}],[\"settranslation\",{\"_index\":15,\"name\":{\"17\":{},\"52\":{}},\"comment\":{}}],[\"slerp\",{\"_index\":56,\"name\":{\"98\":{}},\"comment\":{}}],[\"sqlerp\",{\"_index\":70,\"name\":{\"117\":{}},\"comment\":{}}],[\"sub\",{\"_index\":73,\"name\":{\"126\":{},\"178\":{},\"233\":{},\"279\":{}},\"comment\":{}}],[\"subtract\",{\"_index\":61,\"name\":{\"105\":{},\"148\":{},\"198\":{},\"252\":{}},\"comment\":{}}],[\"toaxisangle\",{\"_index\":53,\"name\":{\"89\":{}},\"comment\":{}}],[\"transformmat3\",{\"_index\":99,\"name\":{\"172\":{},\"223\":{}},\"comment\":{}}],[\"transformmat4\",{\"_index\":98,\"name\":{\"171\":{},\"221\":{},\"273\":{}},\"comment\":{}}],[\"transformmat4upper3x3\",{\"_index\":104,\"name\":{\"222\":{}},\"comment\":{}}],[\"transformquat\",{\"_index\":105,\"name\":{\"224\":{}},\"comment\":{}}],[\"translate\",{\"_index\":21,\"name\":{\"23\":{},\"64\":{}},\"comment\":{}}],[\"translation\",{\"_index\":20,\"name\":{\"22\":{},\"63\":{}},\"comment\":{}}],[\"transpose\",{\"_index\":11,\"name\":{\"13\":{},\"48\":{}},\"comment\":{}}],[\"uniformscale\",{\"_index\":27,\"name\":{\"29\":{},\"76\":{}},\"comment\":{}}],[\"uniformscaling\",{\"_index\":26,\"name\":{\"28\":{},\"75\":{}},\"comment\":{}}],[\"utils\",{\"_index\":76,\"name\":{\"130\":{}},\"comment\":{}}],[\"vec2\",{\"_index\":83,\"name\":{\"138\":{},\"139\":{}},\"comment\":{}}],[\"vec3\",{\"_index\":103,\"name\":{\"188\":{},\"189\":{}},\"comment\":{}}],[\"vec4\",{\"_index\":106,\"name\":{\"243\":{},\"244\":{}},\"comment\":{}}],[\"zero\",{\"_index\":97,\"name\":{\"170\":{},\"220\":{},\"272\":{}},\"comment\":{}}]],\"pipeline\":[]}}"); \ No newline at end of file diff --git a/docs/assets/style.css b/docs/assets/style.css deleted file mode 100644 index e509385..0000000 --- a/docs/assets/style.css +++ /dev/null @@ -1,1257 +0,0 @@ -:root { - /* Light */ - --light-color-background: #f2f4f8; - --light-color-background-secondary: #eff0f1; - --light-color-icon-background: var(--light-color-background); - --light-color-accent: #c5c7c9; - --light-color-text: #222; - --light-color-text-aside: #707070; - --light-color-link: #4da6ff; - --light-color-ts: #db1373; - --light-color-ts-interface: #139d2c; - --light-color-ts-enum: #9c891a; - --light-color-ts-class: #2484e5; - --light-color-ts-function: #572be7; - --light-color-ts-namespace: #b111c9; - --light-color-ts-private: #707070; - --light-color-ts-variable: #4d68ff; - --light-external-icon: url("data:image/svg+xml;utf8,"); - --light-color-scheme: light; - - /* Dark */ - --dark-color-background: #2b2e33; - --dark-color-background-secondary: #1e2024; - --dark-color-icon-background: var(--dark-color-background-secondary); - --dark-color-accent: #9096a2; - --dark-color-text: #f5f5f5; - --dark-color-text-aside: #dddddd; - --dark-color-link: #00aff4; - --dark-color-ts: #ff6492; - --dark-color-ts-interface: #6cff87; - --dark-color-ts-enum: #f4d93e; - --dark-color-ts-class: #61b0ff; - --dark-color-ts-function: #9772ff; - --dark-color-ts-namespace: #e14dff; - --dark-color-ts-private: #e2e2e2; - --dark-color-ts-variable: #4d68ff; - --dark-external-icon: url("data:image/svg+xml;utf8,"); - --dark-color-scheme: dark; -} - -@media (prefers-color-scheme: light) { - :root { - --color-background: var(--light-color-background); - --color-background-secondary: var(--light-color-background-secondary); - --color-icon-background: var(--light-color-icon-background); - --color-accent: var(--light-color-accent); - --color-text: var(--light-color-text); - --color-text-aside: var(--light-color-text-aside); - --color-link: var(--light-color-link); - --color-ts: var(--light-color-ts); - --color-ts-interface: var(--light-color-ts-interface); - --color-ts-enum: var(--light-color-ts-enum); - --color-ts-class: var(--light-color-ts-class); - --color-ts-function: var(--light-color-ts-function); - --color-ts-namespace: var(--light-color-ts-namespace); - --color-ts-private: var(--light-color-ts-private); - --color-ts-variable: var(--light-color-ts-variable); - --external-icon: var(--light-external-icon); - --color-scheme: var(--light-color-scheme); - } -} - -@media (prefers-color-scheme: dark) { - :root { - --color-background: var(--dark-color-background); - --color-background-secondary: var(--dark-color-background-secondary); - --color-icon-background: var(--dark-color-icon-background); - --color-accent: var(--dark-color-accent); - --color-text: var(--dark-color-text); - --color-text-aside: var(--dark-color-text-aside); - --color-link: var(--dark-color-link); - --color-ts: var(--dark-color-ts); - --color-ts-interface: var(--dark-color-ts-interface); - --color-ts-enum: var(--dark-color-ts-enum); - --color-ts-class: var(--dark-color-ts-class); - --color-ts-function: var(--dark-color-ts-function); - --color-ts-namespace: var(--dark-color-ts-namespace); - --color-ts-private: var(--dark-color-ts-private); - --color-ts-variable: var(--dark-color-ts-variable); - --external-icon: var(--dark-external-icon); - --color-scheme: var(--dark-color-scheme); - } -} - -html { - color-scheme: var(--color-scheme); -} - -body { - margin: 0; -} - -:root[data-theme="light"] { - --color-background: var(--light-color-background); - --color-background-secondary: var(--light-color-background-secondary); - --color-icon-background: var(--light-color-icon-background); - --color-accent: var(--light-color-accent); - --color-text: var(--light-color-text); - --color-text-aside: var(--light-color-text-aside); - --color-link: var(--light-color-link); - --color-ts: var(--light-color-ts); - --color-ts-interface: var(--light-color-ts-interface); - --color-ts-enum: var(--light-color-ts-enum); - --color-ts-class: var(--light-color-ts-class); - --color-ts-function: var(--light-color-ts-function); - --color-ts-namespace: var(--light-color-ts-namespace); - --color-ts-private: var(--light-color-ts-private); - --color-ts-variable: var(--light-color-ts-variable); - --external-icon: var(--light-external-icon); - --color-scheme: var(--light-color-scheme); -} - -:root[data-theme="dark"] { - --color-background: var(--dark-color-background); - --color-background-secondary: var(--dark-color-background-secondary); - --color-icon-background: var(--dark-color-icon-background); - --color-accent: var(--dark-color-accent); - --color-text: var(--dark-color-text); - --color-text-aside: var(--dark-color-text-aside); - --color-link: var(--dark-color-link); - --color-ts: var(--dark-color-ts); - --color-ts-interface: var(--dark-color-ts-interface); - --color-ts-enum: var(--dark-color-ts-enum); - --color-ts-class: var(--dark-color-ts-class); - --color-ts-function: var(--dark-color-ts-function); - --color-ts-namespace: var(--dark-color-ts-namespace); - --color-ts-private: var(--dark-color-ts-private); - --color-ts-variable: var(--dark-color-ts-variable); - --external-icon: var(--dark-external-icon); - --color-scheme: var(--dark-color-scheme); -} - -h1, -h2, -h3, -h4, -h5, -h6 { - line-height: 1.2; -} - -h1 { - font-size: 1.875rem; - margin: 0.67rem 0; -} - -h2 { - font-size: 1.5rem; - margin: 0.83rem 0; -} - -h3 { - font-size: 1.25rem; - margin: 1rem 0; -} - -h4 { - font-size: 1.05rem; - margin: 1.33rem 0; -} - -h5 { - font-size: 1rem; - margin: 1.5rem 0; -} - -h6 { - font-size: 0.875rem; - margin: 2.33rem 0; -} - -.uppercase { - text-transform: uppercase; -} - -pre { - white-space: pre; - white-space: pre-wrap; - word-wrap: break-word; -} - -dl, -menu, -ol, -ul { - margin: 1em 0; -} - -dd { - margin: 0 0 0 40px; -} - -.container { - max-width: 1600px; - padding: 0 2rem; -} - -@media (min-width: 640px) { - .container { - padding: 0 4rem; - } -} -@media (min-width: 1200px) { - .container { - padding: 0 8rem; - } -} -@media (min-width: 1600px) { - .container { - padding: 0 12rem; - } -} - -/* Footer */ -.tsd-generator { - border-top: 1px solid var(--color-accent); - padding-top: 1rem; - padding-bottom: 1rem; - max-height: 3.5rem; -} - -.tsd-generator > p { - margin-top: 0; - margin-bottom: 0; - padding: 0 1rem; -} - -.container-main { - display: flex; - justify-content: space-between; - position: relative; - margin: 0 auto; -} - -.col-4, -.col-8 { - box-sizing: border-box; - float: left; - padding: 2rem 1rem; -} - -.col-4 { - flex: 0 0 25%; -} -.col-8 { - flex: 1 0; - flex-wrap: wrap; - padding-left: 0; -} - -@keyframes fade-in { - from { - opacity: 0; - } - to { - opacity: 1; - } -} -@keyframes fade-out { - from { - opacity: 1; - visibility: visible; - } - to { - opacity: 0; - } -} -@keyframes fade-in-delayed { - 0% { - opacity: 0; - } - 33% { - opacity: 0; - } - 100% { - opacity: 1; - } -} -@keyframes fade-out-delayed { - 0% { - opacity: 1; - visibility: visible; - } - 66% { - opacity: 0; - } - 100% { - opacity: 0; - } -} -@keyframes shift-to-left { - from { - transform: translate(0, 0); - } - to { - transform: translate(-25%, 0); - } -} -@keyframes unshift-to-left { - from { - transform: translate(-25%, 0); - } - to { - transform: translate(0, 0); - } -} -@keyframes pop-in-from-right { - from { - transform: translate(100%, 0); - } - to { - transform: translate(0, 0); - } -} -@keyframes pop-out-to-right { - from { - transform: translate(0, 0); - visibility: visible; - } - to { - transform: translate(100%, 0); - } -} -body { - background: var(--color-background); - font-family: "Segoe UI", sans-serif; - font-size: 16px; - color: var(--color-text); -} - -a { - color: var(--color-link); - text-decoration: none; -} -a:hover { - text-decoration: underline; -} -a.external[target="_blank"] { - background-image: var(--external-icon); - background-position: top 3px right; - background-repeat: no-repeat; - padding-right: 13px; -} - -code, -pre { - font-family: Menlo, Monaco, Consolas, "Courier New", monospace; - padding: 0.2em; - margin: 0; - font-size: 0.875rem; - border-radius: 0.8em; -} - -pre { - padding: 10px; - border: 0.1em solid var(--color-accent); -} -pre code { - padding: 0; - font-size: 100%; -} - -blockquote { - margin: 1em 0; - padding-left: 1em; - border-left: 4px solid gray; -} - -.tsd-typography { - line-height: 1.333em; -} -.tsd-typography ul { - list-style: square; - padding: 0 0 0 20px; - margin: 0; -} -.tsd-typography h4, -.tsd-typography .tsd-index-panel h3, -.tsd-index-panel .tsd-typography h3, -.tsd-typography h5, -.tsd-typography h6 { - font-size: 1em; - margin: 0; -} -.tsd-typography h5, -.tsd-typography h6 { - font-weight: normal; -} -.tsd-typography p, -.tsd-typography ul, -.tsd-typography ol { - margin: 1em 0; -} - -@media (max-width: 1024px) { - html .col-content { - float: none; - max-width: 100%; - width: 100%; - padding-top: 3rem; - } - html .col-menu { - position: fixed !important; - overflow-y: auto; - -webkit-overflow-scrolling: touch; - z-index: 1024; - top: 0 !important; - bottom: 0 !important; - left: auto !important; - right: 0 !important; - padding: 1.5rem 1.5rem 0 0; - max-width: 25rem; - visibility: hidden; - background-color: var(--color-background); - transform: translate(100%, 0); - } - html .col-menu > *:last-child { - padding-bottom: 20px; - } - html .overlay { - content: ""; - display: block; - position: fixed; - z-index: 1023; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: rgba(0, 0, 0, 0.75); - visibility: hidden; - } - - .to-has-menu .overlay { - animation: fade-in 0.4s; - } - - .to-has-menu :is(header, footer, .col-content) { - animation: shift-to-left 0.4s; - } - - .to-has-menu .col-menu { - animation: pop-in-from-right 0.4s; - } - - .from-has-menu .overlay { - animation: fade-out 0.4s; - } - - .from-has-menu :is(header, footer, .col-content) { - animation: unshift-to-left 0.4s; - } - - .from-has-menu .col-menu { - animation: pop-out-to-right 0.4s; - } - - .has-menu body { - overflow: hidden; - } - .has-menu .overlay { - visibility: visible; - } - .has-menu :is(header, footer, .col-content) { - transform: translate(-25%, 0); - } - .has-menu .col-menu { - visibility: visible; - transform: translate(0, 0); - display: grid; - align-items: center; - grid-template-rows: auto 1fr; - grid-gap: 1.5rem; - max-height: 100vh; - padding: 1rem 2rem; - } - .has-menu .tsd-navigation { - max-height: 100%; - } -} - -.tsd-breadcrumb { - margin: 0; - padding: 0; - color: var(--color-text-aside); -} -.tsd-breadcrumb a { - color: var(--color-text-aside); - text-decoration: none; -} -.tsd-breadcrumb a:hover { - text-decoration: underline; -} -.tsd-breadcrumb li { - display: inline; -} -.tsd-breadcrumb li:after { - content: " / "; -} - -.tsd-comment-tags { - display: flex; - flex-direction: column; -} -dl.tsd-comment-tag-group { - display: flex; - align-items: center; - overflow: hidden; - margin: 0.5em 0; -} -dl.tsd-comment-tag-group dt { - display: flex; - margin-right: 0.5em; - font-size: 0.875em; - font-weight: normal; -} -dl.tsd-comment-tag-group dd { - margin: 0; -} -code.tsd-tag { - padding: 0.25em 0.4em; - border: 0.1em solid var(--color-accent); - margin-right: 0.25em; - font-size: 70%; -} -h1 code.tsd-tag:first-of-type { - margin-left: 0.25em; -} - -dl.tsd-comment-tag-group dd:before, -dl.tsd-comment-tag-group dd:after { - content: " "; -} -dl.tsd-comment-tag-group dd pre, -dl.tsd-comment-tag-group dd:after { - clear: both; -} -dl.tsd-comment-tag-group p { - margin: 0; -} - -.tsd-panel.tsd-comment .lead { - font-size: 1.1em; - line-height: 1.333em; - margin-bottom: 2em; -} -.tsd-panel.tsd-comment .lead:last-child { - margin-bottom: 0; -} - -.tsd-filter-visibility h4 { - font-size: 1rem; - padding-top: 0.75rem; - padding-bottom: 0.5rem; - margin: 0; -} -.tsd-filter-item:not(:last-child) { - margin-bottom: 0.5rem; -} -.tsd-filter-input { - display: flex; - width: fit-content; - width: -moz-fit-content; - align-items: center; - user-select: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - cursor: pointer; -} -.tsd-filter-input input[type="checkbox"] { - cursor: pointer; - position: absolute; - width: 1.5em; - height: 1.5em; - opacity: 0; -} -.tsd-filter-input input[type="checkbox"]:disabled { - pointer-events: none; -} -.tsd-filter-input svg { - cursor: pointer; - width: 1.5em; - height: 1.5em; - margin-right: 0.5em; - border-radius: 0.33em; - /* Leaving this at full opacity breaks event listeners on Firefox. - Don't remove unless you know what you're doing. */ - opacity: 0.99; -} -.tsd-filter-input input[type="checkbox"]:focus + svg { - transform: scale(0.95); -} -.tsd-filter-input input[type="checkbox"]:focus:not(:focus-visible) + svg { - transform: scale(1); -} -.tsd-checkbox-background { - fill: var(--color-accent); -} -input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { - stroke: var(--color-text); -} -.tsd-filter-input input:disabled ~ svg > .tsd-checkbox-background { - fill: var(--color-background); - stroke: var(--color-accent); - stroke-width: 0.25rem; -} -.tsd-filter-input input:disabled ~ svg > .tsd-checkbox-checkmark { - stroke: var(--color-accent); -} - -.tsd-theme-toggle { - padding-top: 0.75rem; -} -.tsd-theme-toggle > h4 { - display: inline; - vertical-align: middle; - margin-right: 0.75rem; -} - -.tsd-hierarchy { - list-style: square; - margin: 0; -} -.tsd-hierarchy .target { - font-weight: bold; -} - -.tsd-panel-group.tsd-index-group { - margin-bottom: 0; -} -.tsd-index-panel .tsd-index-list { - list-style: none; - line-height: 1.333em; - margin: 0; - padding: 0.25rem 0 0 0; - overflow: hidden; - display: grid; - grid-template-columns: repeat(3, 1fr); - column-gap: 1rem; - grid-template-rows: auto; -} -@media (max-width: 1024px) { - .tsd-index-panel .tsd-index-list { - grid-template-columns: repeat(2, 1fr); - } -} -@media (max-width: 768px) { - .tsd-index-panel .tsd-index-list { - grid-template-columns: repeat(1, 1fr); - } -} -.tsd-index-panel .tsd-index-list li { - -webkit-page-break-inside: avoid; - -moz-page-break-inside: avoid; - -ms-page-break-inside: avoid; - -o-page-break-inside: avoid; - page-break-inside: avoid; -} -.tsd-index-panel a, -.tsd-index-panel a.tsd-parent-kind-module { - color: var(--color-ts); -} -.tsd-index-panel a.tsd-parent-kind-interface { - color: var(--color-ts-interface); -} -.tsd-index-panel a.tsd-parent-kind-enum { - color: var(--color-ts-enum); -} -.tsd-index-panel a.tsd-parent-kind-class { - color: var(--color-ts-class); -} -.tsd-index-panel a.tsd-kind-module { - color: var(--color-ts-namespace); -} -.tsd-index-panel a.tsd-kind-interface { - color: var(--color-ts-interface); -} -.tsd-index-panel a.tsd-kind-enum { - color: var(--color-ts-enum); -} -.tsd-index-panel a.tsd-kind-class { - color: var(--color-ts-class); -} -.tsd-index-panel a.tsd-kind-function { - color: var(--color-ts-function); -} -.tsd-index-panel a.tsd-kind-namespace { - color: var(--color-ts-namespace); -} -.tsd-index-panel a.tsd-kind-variable { - color: var(--color-ts-variable); -} -.tsd-index-panel a.tsd-is-private { - color: var(--color-ts-private); -} - -.tsd-flag { - display: inline-block; - padding: 0.25em 0.4em; - border-radius: 4px; - color: var(--color-comment-tag-text); - background-color: var(--color-comment-tag); - text-indent: 0; - font-size: 75%; - line-height: 1; - font-weight: normal; -} - -.tsd-anchor { - position: absolute; - top: -100px; -} - -.tsd-member { - position: relative; -} -.tsd-member .tsd-anchor + h3 { - display: flex; - align-items: center; - margin-top: 0; - margin-bottom: 0; - border-bottom: none; -} -.tsd-member [data-tsd-kind] { - color: var(--color-ts); -} -.tsd-member [data-tsd-kind="Interface"] { - color: var(--color-ts-interface); -} -.tsd-member [data-tsd-kind="Enum"] { - color: var(--color-ts-enum); -} -.tsd-member [data-tsd-kind="Class"] { - color: var(--color-ts-class); -} -.tsd-member [data-tsd-kind="Private"] { - color: var(--color-ts-private); -} - -.tsd-navigation a { - display: block; - margin: 0.4rem 0; - border-left: 2px solid transparent; - color: var(--color-text); - text-decoration: none; - transition: border-left-color 0.1s; -} -.tsd-navigation a:hover { - text-decoration: underline; -} -.tsd-navigation ul { - margin: 0; - padding: 0; - list-style: none; -} -.tsd-navigation li { - padding: 0; -} - -.tsd-navigation.primary .tsd-accordion-details > ul { - margin-top: 0.75rem; -} -.tsd-navigation.primary a { - padding: 0.75rem 0.5rem; - margin: 0; -} -.tsd-navigation.primary ul li a { - margin-left: 0.5rem; -} -.tsd-navigation.primary ul li li a { - margin-left: 1.5rem; -} -.tsd-navigation.primary ul li li li a { - margin-left: 2.5rem; -} -.tsd-navigation.primary ul li li li li a { - margin-left: 3.5rem; -} -.tsd-navigation.primary ul li li li li li a { - margin-left: 4.5rem; -} -.tsd-navigation.primary ul li li li li li li a { - margin-left: 5.5rem; -} -.tsd-navigation.primary li.current > a { - border-left: 0.15rem var(--color-text) solid; -} -.tsd-navigation.primary li.selected > a { - font-weight: bold; - border-left: 0.2rem var(--color-text) solid; -} -.tsd-navigation.primary ul li a:hover { - border-left: 0.2rem var(--color-text-aside) solid; -} -.tsd-navigation.primary li.globals + li > span, -.tsd-navigation.primary li.globals + li > a { - padding-top: 20px; -} - -.tsd-navigation.secondary.tsd-navigation--toolbar-hide { - max-height: calc(100vh - 1rem); - top: 0.5rem; -} -.tsd-navigation.secondary > ul { - display: inline; - padding-right: 0.5rem; - transition: opacity 0.2s; -} -.tsd-navigation.secondary ul li a { - padding-left: 0; -} -.tsd-navigation.secondary ul li li a { - padding-left: 1.1rem; -} -.tsd-navigation.secondary ul li li li a { - padding-left: 2.2rem; -} -.tsd-navigation.secondary ul li li li li a { - padding-left: 3.3rem; -} -.tsd-navigation.secondary ul li li li li li a { - padding-left: 4.4rem; -} -.tsd-navigation.secondary ul li li li li li li a { - padding-left: 5.5rem; -} - -#tsd-sidebar-links a { - margin-top: 0; - margin-bottom: 0.5rem; - line-height: 1.25rem; -} -#tsd-sidebar-links a:last-of-type { - margin-bottom: 0; -} - -a.tsd-index-link { - margin: 0.25rem 0; - font-size: 1rem; - line-height: 1.25rem; - display: inline-flex; - align-items: center; -} -.tsd-accordion-summary > h1, -.tsd-accordion-summary > h2, -.tsd-accordion-summary > h3, -.tsd-accordion-summary > h4, -.tsd-accordion-summary > h5 { - display: inline-flex; - align-items: center; - vertical-align: middle; - margin-bottom: 0; - user-select: none; - -moz-user-select: none; - -webkit-user-select: none; - -ms-user-select: none; -} -.tsd-accordion-summary { - display: block; - cursor: pointer; -} -.tsd-accordion-summary > * { - margin-top: 0; - margin-bottom: 0; - padding-top: 0; - padding-bottom: 0; -} -.tsd-accordion-summary::-webkit-details-marker { - display: none; -} -.tsd-index-accordion .tsd-accordion-summary svg { - margin-right: 0.25rem; -} -.tsd-index-content > :not(:first-child) { - margin-top: 0.75rem; -} -.tsd-index-heading { - margin-top: 1.5rem; - margin-bottom: 0.75rem; -} - -.tsd-kind-icon { - margin-right: 0.5rem; - width: 1.25rem; - height: 1.25rem; - min-width: 1.25rem; - min-height: 1.25rem; -} -.tsd-kind-icon path { - transform-origin: center; - transform: scale(1.1); -} -.tsd-signature > .tsd-kind-icon { - margin-right: 0.8rem; -} - -@media (min-width: 1024px) { - .col-content { - margin: 2rem auto; - } - - .menu-sticky-wrap { - position: sticky; - height: calc(100vh - 2rem); - top: 4rem; - right: 0; - padding: 0 1.5rem; - padding-top: 1rem; - margin-top: 3rem; - transition: 0.3s ease-in-out; - transition-property: top, padding-top, padding, height; - overflow-y: auto; - } - .col-menu { - border-left: 1px solid var(--color-accent); - } - .col-menu--hide { - top: 1rem; - } - .col-menu .tsd-navigation:not(:last-child) { - padding-bottom: 1.75rem; - } -} - -.tsd-panel { - margin-bottom: 2.5rem; -} -.tsd-panel.tsd-member { - margin-bottom: 4rem; -} -.tsd-panel:empty { - display: none; -} -.tsd-panel > h1, -.tsd-panel > h2, -.tsd-panel > h3 { - margin: 1.5rem -1.5rem 0.75rem -1.5rem; - padding: 0 1.5rem 0.75rem 1.5rem; -} -.tsd-panel > h1.tsd-before-signature, -.tsd-panel > h2.tsd-before-signature, -.tsd-panel > h3.tsd-before-signature { - margin-bottom: 0; - border-bottom: none; -} - -.tsd-panel-group { - margin: 4rem 0; -} -.tsd-panel-group.tsd-index-group { - margin: 2rem 0; -} -.tsd-panel-group.tsd-index-group details { - margin: 2rem 0; -} - -#tsd-search { - transition: background-color 0.2s; -} -#tsd-search .title { - position: relative; - z-index: 2; -} -#tsd-search .field { - position: absolute; - left: 0; - top: 0; - right: 2.5rem; - height: 100%; -} -#tsd-search .field input { - box-sizing: border-box; - position: relative; - top: -50px; - z-index: 1; - width: 100%; - padding: 0 10px; - opacity: 0; - outline: 0; - border: 0; - background: transparent; - color: var(--color-text); -} -#tsd-search .field label { - position: absolute; - overflow: hidden; - right: -40px; -} -#tsd-search .field input, -#tsd-search .title, -#tsd-toolbar-links a { - transition: opacity 0.2s; -} -#tsd-search .results { - position: absolute; - visibility: hidden; - top: 40px; - width: 100%; - margin: 0; - padding: 0; - list-style: none; - box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); -} -#tsd-search .results li { - padding: 0 10px; - background-color: var(--color-background); -} -#tsd-search .results li:nth-child(even) { - background-color: var(--color-background-secondary); -} -#tsd-search .results li.state { - display: none; -} -#tsd-search .results li.current, -#tsd-search .results li:hover { - background-color: var(--color-accent); -} -#tsd-search .results a { - display: block; -} -#tsd-search .results a:before { - top: 10px; -} -#tsd-search .results span.parent { - color: var(--color-text-aside); - font-weight: normal; -} -#tsd-search.has-focus { - background-color: var(--color-accent); -} -#tsd-search.has-focus .field input { - top: 0; - opacity: 1; -} -#tsd-search.has-focus .title, -#tsd-search.has-focus #tsd-toolbar-links a { - z-index: 0; - opacity: 0; -} -#tsd-search.has-focus .results { - visibility: visible; -} -#tsd-search.loading .results li.state.loading { - display: block; -} -#tsd-search.failure .results li.state.failure { - display: block; -} - -#tsd-toolbar-links { - position: absolute; - top: 0; - right: 2rem; - height: 100%; - display: flex; - align-items: center; - justify-content: flex-end; -} -#tsd-toolbar-links a { - margin-left: 1.5rem; -} -#tsd-toolbar-links a:hover { - text-decoration: underline; -} - -.tsd-signature { - margin: 0 0 1rem 0; - padding: 1rem 0.5rem; - border: 1px solid var(--color-accent); - font-family: Menlo, Monaco, Consolas, "Courier New", monospace; - font-size: 14px; - overflow-x: auto; -} - -.tsd-signature-symbol { - color: var(--color-text-aside); - font-weight: normal; -} - -.tsd-signature-type { - font-style: italic; - font-weight: normal; -} - -.tsd-signatures { - padding: 0; - margin: 0 0 1em 0; - list-style-type: none; -} -.tsd-signatures .tsd-signature { - margin: 0; - border-color: var(--color-accent); - border-width: 1px 0; - transition: background-color 0.1s; -} -.tsd-description .tsd-signatures .tsd-signature { - border-width: 1px; -} - -ul.tsd-parameter-list, -ul.tsd-type-parameter-list { - list-style: square; - margin: 0; - padding-left: 20px; -} -ul.tsd-parameter-list > li.tsd-parameter-signature, -ul.tsd-type-parameter-list > li.tsd-parameter-signature { - list-style: none; - margin-left: -20px; -} -ul.tsd-parameter-list h5, -ul.tsd-type-parameter-list h5 { - font-size: 16px; - margin: 1em 0 0.5em 0; -} -.tsd-sources { - margin-top: 1rem; - font-size: 0.875em; -} -.tsd-sources a { - color: var(--color-text-aside); - text-decoration: underline; -} -.tsd-sources ul { - list-style: none; - padding: 0; -} - -.tsd-page-toolbar { - position: fixed; - z-index: 1; - top: 0; - left: 0; - width: 100%; - color: var(--color-text); - background: var(--color-background-secondary); - border-bottom: 1px var(--color-accent) solid; - transition: transform 0.3s ease-in-out; -} -.tsd-page-toolbar a { - color: var(--color-text); - text-decoration: none; -} -.tsd-page-toolbar a.title { - font-weight: bold; -} -.tsd-page-toolbar a.title:hover { - text-decoration: underline; -} -.tsd-page-toolbar .tsd-toolbar-contents { - display: flex; - justify-content: space-between; - height: 2.5rem; - margin: 0 auto; -} -.tsd-page-toolbar .table-cell { - position: relative; - white-space: nowrap; - line-height: 40px; -} -.tsd-page-toolbar .table-cell:first-child { - width: 100%; -} -.tsd-page-toolbar .tsd-toolbar-icon { - box-sizing: border-box; - line-height: 0; - padding: 12px 0; -} - -.tsd-page-toolbar--hide { - transform: translateY(-100%); -} - -.tsd-widget { - display: inline-block; - overflow: hidden; - opacity: 0.8; - height: 40px; - transition: opacity 0.1s, background-color 0.2s; - vertical-align: bottom; - cursor: pointer; -} -.tsd-widget:hover { - opacity: 0.9; -} -.tsd-widget.active { - opacity: 1; - background-color: var(--color-accent); -} -.tsd-widget.no-caption { - width: 40px; -} -.tsd-widget.no-caption:before { - margin: 0; -} - -.tsd-widget.options, -.tsd-widget.menu { - display: none; -} -@media (max-width: 1024px) { - .tsd-widget.options, - .tsd-widget.menu { - display: inline-block; - } -} -input[type="checkbox"] + .tsd-widget:before { - background-position: -120px 0; -} -input[type="checkbox"]:checked + .tsd-widget:before { - background-position: -160px 0; -} - -img { - max-width: 100%; -} - -.tsd-anchor-icon { - display: inline-flex; - align-items: center; - margin-left: 0.5rem; - vertical-align: middle; - color: var(--color-text); -} - -.tsd-anchor-icon svg { - width: 1em; - height: 1em; - visibility: hidden; -} - -.tsd-anchor-link:hover > .tsd-anchor-icon svg { - visibility: visible; -} - -.deprecated { - text-decoration: line-through; -} - -* { - scrollbar-width: thin; - scrollbar-color: var(--color-accent) var(--color-icon-background); -} - -*::-webkit-scrollbar { - width: 0.75rem; -} - -*::-webkit-scrollbar-track { - background: var(--color-icon-background); -} - -*::-webkit-scrollbar-thumb { - background-color: var(--color-accent); - border-radius: 999rem; - border: 0.25rem solid var(--color-icon-background); -} diff --git a/docs/functions/mat3.clone.html b/docs/functions/mat3.clone.html deleted file mode 100644 index 1c5f19b..0000000 --- a/docs/functions/mat3.clone.html +++ /dev/null @@ -1,104 +0,0 @@ -clone | wgpu-matrix
-
- -
-
-
-
- -

Function clone

-
-
    - -
  • -

    Copies a matrix (same as copy) -Also see create and set

    - -

    Returns

    A copy of m.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat3
      -

      The matrix.

      -
    • -
    • -
      Optional dst: Mat3
      -

      The matrix. If not passed a new one is created.

      -
    -

    Returns Mat3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.copy.html b/docs/functions/mat3.copy.html deleted file mode 100644 index 6b1f976..0000000 --- a/docs/functions/mat3.copy.html +++ /dev/null @@ -1,104 +0,0 @@ -copy | wgpu-matrix
-
- -
-
-
-
- -

Function copy

-
-
    - -
  • -

    Copies a matrix. (same as clone) -Also see create and set

    - -

    Returns

    A copy of m.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat3
      -

      The matrix.

      -
    • -
    • -
      Optional dst: Mat3
      -

      The matrix. If not passed a new one is created.

      -
    -

    Returns Mat3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.create.html b/docs/functions/mat3.create.html deleted file mode 100644 index 133710b..0000000 --- a/docs/functions/mat3.create.html +++ /dev/null @@ -1,144 +0,0 @@ -create | wgpu-matrix
-
- -
-
-
-
- -

Function create

-
-
    - -
  • -

    Create a Mat3 from values

    -

    Note: Since passing in a raw JavaScript array -is valid in all circumstances, if you want to -force a JavaScript array into a Mat3's specified type -it would be faster to use

    -
    const m = mat3.clone(someJSArray);
    -
    -

    Note: a consequence of the implementation is if your Mat3Type = Array -instead of Float32Array or Float64Array then any values you -don't pass in will be undefined. Usually this is not an issue since -(a) using Array is rare and (b) using mat3.create is usually used -to create a Mat3 to be filled out as in

    -
    const m = mat3.create();
    mat3.perspective(fov, aspect, near, far, m); -
    - -

    Returns

    matrix created from values.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional v0: number
      -

      value for element 0

      -
    • -
    • -
      Optional v1: number
      -

      value for element 1

      -
    • -
    • -
      Optional v2: number
      -

      value for element 2

      -
    • -
    • -
      Optional v3: number
      -

      value for element 3

      -
    • -
    • -
      Optional v4: number
      -

      value for element 4

      -
    • -
    • -
      Optional v5: number
      -

      value for element 5

      -
    • -
    • -
      Optional v6: number
      -

      value for element 6

      -
    • -
    • -
      Optional v7: number
      -

      value for element 7

      -
    • -
    • -
      Optional v8: number
      -

      value for element 8

      -
    -

    Returns Mat3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.determinant.html b/docs/functions/mat3.determinant.html deleted file mode 100644 index da87277..0000000 --- a/docs/functions/mat3.determinant.html +++ /dev/null @@ -1,99 +0,0 @@ -determinant | wgpu-matrix
-
- -
-
-
-
- -

Function determinant

-
-
    - -
  • -

    Compute the determinant of a matrix

    - -

    Returns

    the determinant

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat3
      -

      the matrix

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.equals.html b/docs/functions/mat3.equals.html deleted file mode 100644 index f0719c6..0000000 --- a/docs/functions/mat3.equals.html +++ /dev/null @@ -1,103 +0,0 @@ -equals | wgpu-matrix
-
- -
-
-
-
- -

Function equals

-
-
    - -
  • -

    Check if 2 matrices are exactly equal

    - -

    Returns

    true if matrices are exactly equal

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Mat3
      -

      Operand matrix.

      -
    • -
    • -
      b: Mat3
      -

      Operand matrix.

      -
    -

    Returns boolean

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.equalsApproximately.html b/docs/functions/mat3.equalsApproximately.html deleted file mode 100644 index 5ab47a0..0000000 --- a/docs/functions/mat3.equalsApproximately.html +++ /dev/null @@ -1,103 +0,0 @@ -equalsApproximately | wgpu-matrix
-
- -
-
-
-
- -

Function equalsApproximately

-
-
    - -
  • -

    Check if 2 matrices are approximately equal

    - -

    Returns

    true if matrices are approximately equal

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Mat3
      -

      Operand matrix.

      -
    • -
    • -
      b: Mat3
      -

      Operand matrix.

      -
    -

    Returns boolean

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.fromMat4.html b/docs/functions/mat3.fromMat4.html deleted file mode 100644 index 6cfb7ba..0000000 --- a/docs/functions/mat3.fromMat4.html +++ /dev/null @@ -1,103 +0,0 @@ -fromMat4 | wgpu-matrix
-
- -
-
-
-
- -

Function fromMat4

-
-
    - -
  • -

    Creates a Mat3 from the upper left 3x3 part of a Mat4

    - -

    Returns

    Mat3 made from m4

    -
    -
    -

    Parameters

    -
      -
    • -
      m4: Mat4
      -

      source matrix

      -
    • -
    • -
      Optional dst: Mat3
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.fromQuat.html b/docs/functions/mat3.fromQuat.html deleted file mode 100644 index 2bfb918..0000000 --- a/docs/functions/mat3.fromQuat.html +++ /dev/null @@ -1,103 +0,0 @@ -fromQuat | wgpu-matrix
-
- -
-
-
-
- -

Function fromQuat

-
-
    - -
  • -

    Creates a Mat3 rotation matrix from a quaternion

    - -

    Returns

    Mat3 made from q

    -
    -
    -

    Parameters

    -
      -
    • -
      q: Quat
      -

      quaternion to create matrix from

      -
    • -
    • -
      Optional dst: Mat3
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.getAxis.html b/docs/functions/mat3.getAxis.html deleted file mode 100644 index 899ef2b..0000000 --- a/docs/functions/mat3.getAxis.html +++ /dev/null @@ -1,105 +0,0 @@ -getAxis | wgpu-matrix
-
- -
-
-
-
- -

Function getAxis

-
-
    - -
  • -

    Returns an axis of a 3x3 matrix as a vector with 2 entries

    - -

    Returns

    The axis component of m.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat3
      -

      The matrix.

      -
    • -
    • -
      axis: number
      -

      The axis 0 = x, 1 = y,

      -
    • -
    • -
      Optional dst: Vec2
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.getScaling.html b/docs/functions/mat3.getScaling.html deleted file mode 100644 index 68db125..0000000 --- a/docs/functions/mat3.getScaling.html +++ /dev/null @@ -1,101 +0,0 @@ -getScaling | wgpu-matrix
-
- -
-
-
-
- -

Function getScaling

-
-
    - -
  • -

    Returns the scaling component of the matrix

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat3
      -

      The Matrix

      -
    • -
    • -
      Optional dst: Vec2
      -

      The vector to set. If not passed a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.getTranslation.html b/docs/functions/mat3.getTranslation.html deleted file mode 100644 index 4da71ea..0000000 --- a/docs/functions/mat3.getTranslation.html +++ /dev/null @@ -1,104 +0,0 @@ -getTranslation | wgpu-matrix
-
- -
-
-
-
- -

Function getTranslation

-
-
    - -
  • -

    Returns the translation component of a 3-by-3 matrix as a vector with 3 -entries.

    - -

    Returns

    The translation component of m.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat3
      -

      The matrix.

      -
    • -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.identity.html b/docs/functions/mat3.identity.html deleted file mode 100644 index 53d8198..0000000 --- a/docs/functions/mat3.identity.html +++ /dev/null @@ -1,99 +0,0 @@ -identity | wgpu-matrix
-
- -
-
-
-
- -

Function identity

-
-
    - -
  • -

    Creates a 3-by-3 identity matrix.

    - -

    Returns

    A 3-by-3 identity matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional dst: Mat3
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.inverse.html b/docs/functions/mat3.inverse.html deleted file mode 100644 index 38bfe3b..0000000 --- a/docs/functions/mat3.inverse.html +++ /dev/null @@ -1,103 +0,0 @@ -inverse | wgpu-matrix
-
- -
-
-
-
- -

Function inverse

-
-
    - -
  • -

    Computes the inverse of a 3-by-3 matrix.

    - -

    Returns

    The inverse of m.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat3
      -

      The matrix.

      -
    • -
    • -
      Optional dst: Mat3
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.invert.html b/docs/functions/mat3.invert.html deleted file mode 100644 index 2417fdf..0000000 --- a/docs/functions/mat3.invert.html +++ /dev/null @@ -1,103 +0,0 @@ -invert | wgpu-matrix
-
- -
-
-
-
- -

Function invert

-
-
    - -
  • -

    Computes the inverse of a 3-by-3 matrix. (same as inverse)

    - -

    Returns

    The inverse of m.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat3
      -

      The matrix.

      -
    • -
    • -
      Optional dst: Mat3
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.mul.html b/docs/functions/mat3.mul.html deleted file mode 100644 index d16060f..0000000 --- a/docs/functions/mat3.mul.html +++ /dev/null @@ -1,107 +0,0 @@ -mul | wgpu-matrix
-
- -
-
-
-
- -

Function mul

-
-
    - -
  • -

    Multiplies two 3-by-3 matrices with a on the left and b on the right (same as multiply)

    - -

    Returns

    The matrix product of a and b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Mat3
      -

      The matrix on the left.

      -
    • -
    • -
      b: Mat3
      -

      The matrix on the right.

      -
    • -
    • -
      Optional dst: Mat3
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.multiply.html b/docs/functions/mat3.multiply.html deleted file mode 100644 index 666f539..0000000 --- a/docs/functions/mat3.multiply.html +++ /dev/null @@ -1,107 +0,0 @@ -multiply | wgpu-matrix
-
- -
-
-
-
- -

Function multiply

-
-
    - -
  • -

    Multiplies two 3-by-3 matrices with a on the left and b on the right

    - -

    Returns

    The matrix product of a and b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Mat3
      -

      The matrix on the left.

      -
    • -
    • -
      b: Mat3
      -

      The matrix on the right.

      -
    • -
    • -
      Optional dst: Mat3
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.negate.html b/docs/functions/mat3.negate.html deleted file mode 100644 index e65fdbe..0000000 --- a/docs/functions/mat3.negate.html +++ /dev/null @@ -1,103 +0,0 @@ -negate | wgpu-matrix
-
- -
-
-
-
- -

Function negate

-
-
    - -
  • -

    Negates a matrix.

    - -

    Returns

    -m.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat3
      -

      The matrix.

      -
    • -
    • -
      Optional dst: Mat3
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.rotate.html b/docs/functions/mat3.rotate.html deleted file mode 100644 index 243ee6f..0000000 --- a/docs/functions/mat3.rotate.html +++ /dev/null @@ -1,107 +0,0 @@ -rotate | wgpu-matrix
-
- -
-
-
-
- -

Function rotate

-
-
    - -
  • -

    Rotates the given 3-by-3 matrix by the given angle.

    - -

    Returns

    The rotated matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat3
      -

      The matrix.

      -
    • -
    • -
      angleInRadians: number
      -

      The angle by which to rotate (in radians).

      -
    • -
    • -
      Optional dst: Mat3
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.rotation.html b/docs/functions/mat3.rotation.html deleted file mode 100644 index 683ca37..0000000 --- a/docs/functions/mat3.rotation.html +++ /dev/null @@ -1,103 +0,0 @@ -rotation | wgpu-matrix
-
- -
-
-
-
- -

Function rotation

-
-
    - -
  • -

    Creates a 3-by-3 matrix which rotates by the given angle.

    - -

    Returns

    The rotation matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      angleInRadians: number
      -

      The angle by which to rotate (in radians).

      -
    • -
    • -
      Optional dst: Mat3
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.scale.html b/docs/functions/mat3.scale.html deleted file mode 100644 index 7078d38..0000000 --- a/docs/functions/mat3.scale.html +++ /dev/null @@ -1,110 +0,0 @@ -scale | wgpu-matrix
-
- -
-
-
-
- -

Function scale

-
-
    - -
  • -

    Scales the given 3-by-3 matrix in each dimension by an amount -given by the corresponding entry in the given vector; assumes the vector has -three entries.

    - -

    Returns

    The scaled matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat3
      -

      The matrix to be modified.

      -
    • -
    • -
      v: Vec2
      -

      A vector of 2 entries specifying the - factor by which to scale in each dimension.

      -
    • -
    • -
      Optional dst: Mat3
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.scaling.html b/docs/functions/mat3.scaling.html deleted file mode 100644 index 32b251e..0000000 --- a/docs/functions/mat3.scaling.html +++ /dev/null @@ -1,106 +0,0 @@ -scaling | wgpu-matrix
-
- -
-
-
-
- -

Function scaling

-
-
    - -
  • -

    Creates a 3-by-3 matrix which scales in each dimension by an amount given by -the corresponding entry in the given vector; assumes the vector has three -entries.

    - -

    Returns

    The scaling matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec2
      -

      A vector of - 2 entries specifying the factor by which to scale in each dimension.

      -
    • -
    • -
      Optional dst: Mat3
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.set.html b/docs/functions/mat3.set.html deleted file mode 100644 index 419caa0..0000000 --- a/docs/functions/mat3.set.html +++ /dev/null @@ -1,136 +0,0 @@ -set | wgpu-matrix
-
- -
-
-
-
- -

Function set

-
-
    - -
  • -

    Sets the values of a Mat3 -Also see create and copy

    - -

    Returns

    Mat3 set from values.

    -
    -
    -

    Parameters

    -
      -
    • -
      v0: number
      -

      value for element 0

      -
    • -
    • -
      v1: number
      -

      value for element 1

      -
    • -
    • -
      v2: number
      -

      value for element 2

      -
    • -
    • -
      v3: number
      -

      value for element 3

      -
    • -
    • -
      v4: number
      -

      value for element 4

      -
    • -
    • -
      v5: number
      -

      value for element 5

      -
    • -
    • -
      v6: number
      -

      value for element 6

      -
    • -
    • -
      v7: number
      -

      value for element 7

      -
    • -
    • -
      v8: number
      -

      value for element 8

      -
    • -
    • -
      Optional dst: Mat3
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.setAxis.html b/docs/functions/mat3.setAxis.html deleted file mode 100644 index 6a968fe..0000000 --- a/docs/functions/mat3.setAxis.html +++ /dev/null @@ -1,111 +0,0 @@ -setAxis | wgpu-matrix
-
- -
-
-
-
- -

Function setAxis

-
-
    - -
  • -

    Sets an axis of a 3x3 matrix as a vector with 2 entries

    - -

    Returns

    The matrix with axis set.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat3
      -

      The matrix.

      -
    • -
    • -
      v: Vec2
      -

      the axis vector

      -
    • -
    • -
      axis: number
      -

      The axis 0 = x, 1 = y;

      -
    • -
    • -
      Optional dst: Mat3
      -

      The matrix to set. If not passed a new one is created.

      -
    -

    Returns Mat3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.setDefaultType.html b/docs/functions/mat3.setDefaultType.html deleted file mode 100644 index 5bc4f02..0000000 --- a/docs/functions/mat3.setDefaultType.html +++ /dev/null @@ -1,110 +0,0 @@ -setDefaultType | wgpu-matrix
-
- -
-
-
-
- -

Function setDefaultType

-
-
    - -
  • -

    Sets the type this library creates for a Mat3

    - -

    Returns

    previous constructor for Mat3

    -
    -
    -

    Parameters

    -
      -
    • -
      ctor: (new (n: number) => Mat3)
      -

      the constructor for the type. Either Float32Array, Float64Array, or Array

      -
      -
        -
      • -
          -
        • new (n: number): Mat3
        • -
        • -
          -

          Parameters

          -
            -
          • -
            n: number
          -

          Returns Mat3

    -

    Returns Mat3LikeCtor

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.setTranslation.html b/docs/functions/mat3.setTranslation.html deleted file mode 100644 index f8ec3d3..0000000 --- a/docs/functions/mat3.setTranslation.html +++ /dev/null @@ -1,108 +0,0 @@ -setTranslation | wgpu-matrix
-
- -
-
-
-
- -

Function setTranslation

-
-
    - -
  • -

    Sets the translation component of a 3-by-3 matrix to the given -vector.

    - -

    Returns

    The matrix with translation set.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Mat3
      -

      The matrix.

      -
    • -
    • -
      v: Vec2
      -

      The vector.

      -
    • -
    • -
      Optional dst: Mat3
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.translate.html b/docs/functions/mat3.translate.html deleted file mode 100644 index 3655f6a..0000000 --- a/docs/functions/mat3.translate.html +++ /dev/null @@ -1,107 +0,0 @@ -translate | wgpu-matrix
-
- -
-
-
-
- -

Function translate

-
-
    - -
  • -

    Translates the given 3-by-3 matrix by the given vector v.

    - -

    Returns

    The translated matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat3
      -

      The matrix.

      -
    • -
    • -
      v: Vec2
      -

      The vector by which to translate.

      -
    • -
    • -
      Optional dst: Mat3
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.translation.html b/docs/functions/mat3.translation.html deleted file mode 100644 index af7137c..0000000 --- a/docs/functions/mat3.translation.html +++ /dev/null @@ -1,103 +0,0 @@ -translation | wgpu-matrix
-
- -
-
-
-
- -

Function translation

-
-
    - -
  • -

    Creates a 3-by-3 matrix which translates by the given vector v.

    - -

    Returns

    The translation matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec2
      -

      The vector by which to translate.

      -
    • -
    • -
      Optional dst: Mat3
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.transpose.html b/docs/functions/mat3.transpose.html deleted file mode 100644 index 31d1514..0000000 --- a/docs/functions/mat3.transpose.html +++ /dev/null @@ -1,103 +0,0 @@ -transpose | wgpu-matrix
-
- -
-
-
-
- -

Function transpose

-
-
    - -
  • -

    Takes the transpose of a matrix.

    - -

    Returns

    The transpose of m.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat3
      -

      The matrix.

      -
    • -
    • -
      Optional dst: Mat3
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.uniformScale.html b/docs/functions/mat3.uniformScale.html deleted file mode 100644 index d554b08..0000000 --- a/docs/functions/mat3.uniformScale.html +++ /dev/null @@ -1,108 +0,0 @@ -uniformScale | wgpu-matrix
-
- -
-
-
-
- -

Function uniformScale

-
-
    - -
  • -

    Scales the given 3-by-3 matrix in each dimension by an amount -given.

    - -

    Returns

    The scaled matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat3
      -

      The matrix to be modified.

      -
    • -
    • -
      s: number
      -

      Amount to scale.

      -
    • -
    • -
      Optional dst: Mat3
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat3.uniformScaling.html b/docs/functions/mat3.uniformScaling.html deleted file mode 100644 index 2c0d814..0000000 --- a/docs/functions/mat3.uniformScaling.html +++ /dev/null @@ -1,103 +0,0 @@ -uniformScaling | wgpu-matrix
-
- -
-
-
-
- -

Function uniformScaling

-
-
    - -
  • -

    Creates a 3-by-3 matrix which scales uniformly in each dimension

    - -

    Returns

    The scaling matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      s: number
      -

      Amount to scale

      -
    • -
    • -
      Optional dst: Mat3
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.aim.html b/docs/functions/mat4.aim.html deleted file mode 100644 index 7577d4d..0000000 --- a/docs/functions/mat4.aim.html +++ /dev/null @@ -1,128 +0,0 @@ -aim | wgpu-matrix
-
- -
-
-
-
- -

Function aim

-
-
    - -
  • -

    Computes a 4-by-4 aim transformation.

    -

    This is a matrix which positions an object aiming down positive Z. -toward the target.

    -

    Note: this is NOT the inverse of lookAt as lookAt looks at negative Z.

    - -

    Returns

    The aim matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      position: Vec3
      -

      The position of the object.

      -
    • -
    • -
      target: Vec3
      -

      The position meant to be aimed at.

      -
    • -
    • -
      up: Vec3
      -

      A vector pointing up.

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.axisRotate.html b/docs/functions/mat4.axisRotate.html deleted file mode 100644 index 175d87b..0000000 --- a/docs/functions/mat4.axisRotate.html +++ /dev/null @@ -1,127 +0,0 @@ -axisRotate | wgpu-matrix
-
- -
-
-
-
- -

Function axisRotate

-
-
    - -
  • -

    Rotates the given 4-by-4 matrix around the given axis by the -given angle.

    - -

    Returns

    The rotated matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat4
      -

      The matrix.

      -
    • -
    • -
      axis: Vec3
      -

      The axis - about which to rotate.

      -
    • -
    • -
      angleInRadians: number
      -

      The angle by which to rotate (in radians).

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.axisRotation.html b/docs/functions/mat4.axisRotation.html deleted file mode 100644 index 60867e8..0000000 --- a/docs/functions/mat4.axisRotation.html +++ /dev/null @@ -1,124 +0,0 @@ -axisRotation | wgpu-matrix
-
- -
-
-
-
- -

Function axisRotation

-
-
    - -
  • -

    Creates a 4-by-4 matrix which rotates around the given axis by the given -angle.

    - -

    Returns

    A matrix which rotates angle radians - around the axis.

    -
    -
    -

    Parameters

    -
      -
    • -
      axis: Vec3
      -

      The axis - about which to rotate.

      -
    • -
    • -
      angleInRadians: number
      -

      The angle by which to rotate (in radians).

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.cameraAim.html b/docs/functions/mat4.cameraAim.html deleted file mode 100644 index f5c2d57..0000000 --- a/docs/functions/mat4.cameraAim.html +++ /dev/null @@ -1,128 +0,0 @@ -cameraAim | wgpu-matrix
-
- -
-
-
-
- -

Function cameraAim

-
-
    - -
  • -

    Computes a 4-by-4 camera aim transformation.

    -

    This is a matrix which positions an object aiming down negative Z. -toward the target.

    -

    Note: this is the inverse of lookAt

    - -

    Returns

    The aim matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      eye: Vec3
      -

      The position of the object.

      -
    • -
    • -
      target: Vec3
      -

      The position meant to be aimed at.

      -
    • -
    • -
      up: Vec3
      -

      A vector pointing up.

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.clone.html b/docs/functions/mat4.clone.html deleted file mode 100644 index a3d6660..0000000 --- a/docs/functions/mat4.clone.html +++ /dev/null @@ -1,118 +0,0 @@ -clone | wgpu-matrix
-
- -
-
-
-
- -

Function clone

-
-
    - -
  • -

    Copies a matrix (same as copy) -Also see create and set

    - -

    Returns

    A copy of m.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat4
      -

      The matrix.

      -
    • -
    • -
      Optional dst: Mat4
      -

      The matrix. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.copy.html b/docs/functions/mat4.copy.html deleted file mode 100644 index 5494f97..0000000 --- a/docs/functions/mat4.copy.html +++ /dev/null @@ -1,118 +0,0 @@ -copy | wgpu-matrix
-
- -
-
-
-
- -

Function copy

-
-
    - -
  • -

    Copies a matrix. (same as clone) -Also see create and set

    - -

    Returns

    A copy of m.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat4
      -

      The matrix.

      -
    • -
    • -
      Optional dst: Mat4
      -

      The matrix. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.create.html b/docs/functions/mat4.create.html deleted file mode 100644 index 845b8a6..0000000 --- a/docs/functions/mat4.create.html +++ /dev/null @@ -1,186 +0,0 @@ -create | wgpu-matrix
-
- -
-
-
-
- -

Function create

-
-
    - -
  • -

    Create a Mat4 from values

    -

    Note: Since passing in a raw JavaScript array -is valid in all circumstances, if you want to -force a JavaScript array into a Mat4's specified type -it would be faster to use

    -
    const m = mat4.clone(someJSArray);
    -
    -

    Note: a consequence of the implementation is if your Mat4Type = Array -instead of Float32Array or Float64Array then any values you -don't pass in will be undefined. Usually this is not an issue since -(a) using Array is rare and (b) using mat4.create is usually used -to create a Mat4 to be filled out as in

    -
    const m = mat4.create();
    mat4.perspective(fov, aspect, near, far, m); -
    - -

    Returns

    created from values.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional v0: number
      -

      value for element 0

      -
    • -
    • -
      Optional v1: number
      -

      value for element 1

      -
    • -
    • -
      Optional v2: number
      -

      value for element 2

      -
    • -
    • -
      Optional v3: number
      -

      value for element 3

      -
    • -
    • -
      Optional v4: number
      -

      value for element 4

      -
    • -
    • -
      Optional v5: number
      -

      value for element 5

      -
    • -
    • -
      Optional v6: number
      -

      value for element 6

      -
    • -
    • -
      Optional v7: number
      -

      value for element 7

      -
    • -
    • -
      Optional v8: number
      -

      value for element 8

      -
    • -
    • -
      Optional v9: number
      -

      value for element 9

      -
    • -
    • -
      Optional v10: number
      -

      value for element 10

      -
    • -
    • -
      Optional v11: number
      -

      value for element 11

      -
    • -
    • -
      Optional v12: number
      -

      value for element 12

      -
    • -
    • -
      Optional v13: number
      -

      value for element 13

      -
    • -
    • -
      Optional v14: number
      -

      value for element 14

      -
    • -
    • -
      Optional v15: number
      -

      value for element 15

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.determinant.html b/docs/functions/mat4.determinant.html deleted file mode 100644 index f5978e5..0000000 --- a/docs/functions/mat4.determinant.html +++ /dev/null @@ -1,113 +0,0 @@ -determinant | wgpu-matrix
-
- -
-
-
-
- -

Function determinant

-
-
    - -
  • -

    Compute the determinant of a matrix

    - -

    Returns

    the determinant

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat4
      -

      the matrix

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.equals.html b/docs/functions/mat4.equals.html deleted file mode 100644 index 88afcc6..0000000 --- a/docs/functions/mat4.equals.html +++ /dev/null @@ -1,117 +0,0 @@ -equals | wgpu-matrix
-
- -
-
-
-
- -

Function equals

-
-
    - -
  • -

    Check if 2 matrices are exactly equal

    - -

    Returns

    true if matrices are exactly equal

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Mat4
      -

      Operand matrix.

      -
    • -
    • -
      b: Mat4
      -

      Operand matrix.

      -
    -

    Returns boolean

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.equalsApproximately.html b/docs/functions/mat4.equalsApproximately.html deleted file mode 100644 index ed8d4ec..0000000 --- a/docs/functions/mat4.equalsApproximately.html +++ /dev/null @@ -1,117 +0,0 @@ -equalsApproximately | wgpu-matrix
-
- -
-
-
-
- -

Function equalsApproximately

-
-
    - -
  • -

    Check if 2 matrices are approximately equal

    - -

    Returns

    true if matrices are approximately equal

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Mat4
      -

      Operand matrix.

      -
    • -
    • -
      b: Mat4
      -

      Operand matrix.

      -
    -

    Returns boolean

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.fromMat3.html b/docs/functions/mat4.fromMat3.html deleted file mode 100644 index 00c1485..0000000 --- a/docs/functions/mat4.fromMat3.html +++ /dev/null @@ -1,117 +0,0 @@ -fromMat3 | wgpu-matrix
-
- -
-
-
-
- -

Function fromMat3

-
-
    - -
  • -

    Creates a Mat4 from a Mat3

    - -

    Returns

    Mat4 made from m3

    -
    -
    -

    Parameters

    -
      -
    • -
      m3: Mat3
      -

      source matrix

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.fromQuat.html b/docs/functions/mat4.fromQuat.html deleted file mode 100644 index 8f20a54..0000000 --- a/docs/functions/mat4.fromQuat.html +++ /dev/null @@ -1,117 +0,0 @@ -fromQuat | wgpu-matrix
-
- -
-
-
-
- -

Function fromQuat

-
-
    - -
  • -

    Creates a Mat4 rotation matrix from a quaternion

    - -

    Returns

    Mat4 made from q

    -
    -
    -

    Parameters

    -
      -
    • -
      q: Quat
      -

      quaternion to create matrix from

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.frustum.html b/docs/functions/mat4.frustum.html deleted file mode 100644 index be45811..0000000 --- a/docs/functions/mat4.frustum.html +++ /dev/null @@ -1,144 +0,0 @@ -frustum | wgpu-matrix
-
- -
-
-
-
- -

Function frustum

-
-
    - -
  • -

    Computes a 4-by-4 perspective transformation matrix given the left, right, -top, bottom, near and far clipping planes. The arguments define a frustum -extending in the negative z direction. The arguments near and far are the -distances to the near and far clipping planes. Note that near and far are not -z coordinates, but rather they are distances along the negative z-axis. The -matrix generated sends the viewing frustum to the unit box. We assume a unit -box extending from -1 to 1 in the x and y dimensions and from 0 to 1 in the z -dimension.

    - -

    Returns

    The perspective projection matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      left: number
      -

      The x coordinate of the left plane of the box.

      -
    • -
    • -
      right: number
      -

      The x coordinate of the right plane of the box.

      -
    • -
    • -
      bottom: number
      -

      The y coordinate of the bottom plane of the box.

      -
    • -
    • -
      top: number
      -

      The y coordinate of the right plane of the box.

      -
    • -
    • -
      near: number
      -

      The negative z coordinate of the near plane of the box.

      -
    • -
    • -
      far: number
      -

      The negative z coordinate of the far plane of the box.

      -
    • -
    • -
      Optional dst: Mat4
      -

      Output matrix. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.getAxis.html b/docs/functions/mat4.getAxis.html deleted file mode 100644 index e08e6ab..0000000 --- a/docs/functions/mat4.getAxis.html +++ /dev/null @@ -1,119 +0,0 @@ -getAxis | wgpu-matrix
-
- -
-
-
-
- -

Function getAxis

-
-
    - -
  • -

    Returns an axis of a 4x4 matrix as a vector with 3 entries

    - -

    Returns

    The axis component of m.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat4
      -

      The matrix.

      -
    • -
    • -
      axis: number
      -

      The axis 0 = x, 1 = y, 2 = z;

      -
    • -
    • -
      Optional dst: Vec3
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.getScaling.html b/docs/functions/mat4.getScaling.html deleted file mode 100644 index 18fe7ad..0000000 --- a/docs/functions/mat4.getScaling.html +++ /dev/null @@ -1,115 +0,0 @@ -getScaling | wgpu-matrix
-
- -
-
-
-
- -

Function getScaling

-
-
    - -
  • -

    Returns the scaling component of the matrix

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat4
      -

      The Matrix

      -
    • -
    • -
      Optional dst: Vec3
      -

      The vector to set. If not passed a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.getTranslation.html b/docs/functions/mat4.getTranslation.html deleted file mode 100644 index 842a5cc..0000000 --- a/docs/functions/mat4.getTranslation.html +++ /dev/null @@ -1,118 +0,0 @@ -getTranslation | wgpu-matrix
-
- -
-
-
-
- -

Function getTranslation

-
-
    - -
  • -

    Returns the translation component of a 4-by-4 matrix as a vector with 3 -entries.

    - -

    Returns

    The translation component of m.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat4
      -

      The matrix.

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.identity.html b/docs/functions/mat4.identity.html deleted file mode 100644 index 60df92b..0000000 --- a/docs/functions/mat4.identity.html +++ /dev/null @@ -1,113 +0,0 @@ -identity | wgpu-matrix
-
- -
-
-
-
- -

Function identity

-
-
    - -
  • -

    Creates a 4-by-4 identity matrix.

    - -

    Returns

    A 4-by-4 identity matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.inverse.html b/docs/functions/mat4.inverse.html deleted file mode 100644 index de65f1c..0000000 --- a/docs/functions/mat4.inverse.html +++ /dev/null @@ -1,117 +0,0 @@ -inverse | wgpu-matrix
-
- -
-
-
-
- -

Function inverse

-
-
    - -
  • -

    Computes the inverse of a 4-by-4 matrix.

    - -

    Returns

    The inverse of m.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat4
      -

      The matrix.

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.invert.html b/docs/functions/mat4.invert.html deleted file mode 100644 index 9fc1ce7..0000000 --- a/docs/functions/mat4.invert.html +++ /dev/null @@ -1,117 +0,0 @@ -invert | wgpu-matrix
-
- -
-
-
-
- -

Function invert

-
-
    - -
  • -

    Computes the inverse of a 4-by-4 matrix. (same as inverse)

    - -

    Returns

    The inverse of m.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat4
      -

      The matrix.

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.lookAt.html b/docs/functions/mat4.lookAt.html deleted file mode 100644 index 52cedce..0000000 --- a/docs/functions/mat4.lookAt.html +++ /dev/null @@ -1,127 +0,0 @@ -lookAt | wgpu-matrix
-
- -
-
-
-
- -

Function lookAt

-
-
    - -
  • -

    Computes a 4-by-4 view transformation.

    -

    This is a view matrix which transforms all other objects -to be in the space of the view defined by the parameters.

    - -

    Returns

    The look-at matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      eye: Vec3
      -

      The position of the object.

      -
    • -
    • -
      target: Vec3
      -

      The position meant to be aimed at.

      -
    • -
    • -
      up: Vec3
      -

      A vector pointing up.

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.mul.html b/docs/functions/mat4.mul.html deleted file mode 100644 index 37b4f31..0000000 --- a/docs/functions/mat4.mul.html +++ /dev/null @@ -1,121 +0,0 @@ -mul | wgpu-matrix
-
- -
-
-
-
- -

Function mul

-
-
    - -
  • -

    Multiplies two 4-by-4 matrices with a on the left and b on the right (same as multiply)

    - -

    Returns

    The matrix product of a and b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Mat4
      -

      The matrix on the left.

      -
    • -
    • -
      b: Mat4
      -

      The matrix on the right.

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.multiply.html b/docs/functions/mat4.multiply.html deleted file mode 100644 index bd2892e..0000000 --- a/docs/functions/mat4.multiply.html +++ /dev/null @@ -1,121 +0,0 @@ -multiply | wgpu-matrix
-
- -
-
-
-
- -

Function multiply

-
-
    - -
  • -

    Multiplies two 4-by-4 matrices with a on the left and b on the right

    - -

    Returns

    The matrix product of a and b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Mat4
      -

      The matrix on the left.

      -
    • -
    • -
      b: Mat4
      -

      The matrix on the right.

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.negate.html b/docs/functions/mat4.negate.html deleted file mode 100644 index 1db93f8..0000000 --- a/docs/functions/mat4.negate.html +++ /dev/null @@ -1,117 +0,0 @@ -negate | wgpu-matrix
-
- -
-
-
-
- -

Function negate

-
-
    - -
  • -

    Negates a matrix.

    - -

    Returns

    -m.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat4
      -

      The matrix.

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.ortho.html b/docs/functions/mat4.ortho.html deleted file mode 100644 index 0973972..0000000 --- a/docs/functions/mat4.ortho.html +++ /dev/null @@ -1,141 +0,0 @@ -ortho | wgpu-matrix
-
- -
-
-
-
- -

Function ortho

-
-
    - -
  • -

    Computes a 4-by-4 orthogonal transformation matrix that transforms from -the given the left, right, bottom, and top dimensions to -1 +1 in x, and y -and 0 to +1 in z.

    - -

    Returns

    The orthographic projection matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      left: number
      -

      Left side of the near clipping plane viewport.

      -
    • -
    • -
      right: number
      -

      Right side of the near clipping plane viewport.

      -
    • -
    • -
      bottom: number
      -

      Bottom of the near clipping plane viewport.

      -
    • -
    • -
      top: number
      -

      Top of the near clipping plane viewport.

      -
    • -
    • -
      near: number
      -

      The depth (negative z coordinate) - of the near clipping plane.

      -
    • -
    • -
      far: number
      -

      The depth (negative z coordinate) - of the far clipping plane.

      -
    • -
    • -
      Optional dst: Mat4
      -

      Output matrix. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.perspective.html b/docs/functions/mat4.perspective.html deleted file mode 100644 index 35a9a74..0000000 --- a/docs/functions/mat4.perspective.html +++ /dev/null @@ -1,143 +0,0 @@ -perspective | wgpu-matrix
-
- -
-
-
-
- -

Function perspective

-
-
    - -
  • -

    Computes a 4-by-4 perspective transformation matrix given the angular height -of the frustum, the aspect ratio, and the near and far clipping planes. The -arguments define a frustum extending in the negative z direction. The given -angle is the vertical angle of the frustum, and the horizontal angle is -determined to produce the given aspect ratio. The arguments near and far are -the distances to the near and far clipping planes. Note that near and far -are not z coordinates, but rather they are distances along the negative -z-axis. The matrix generated sends the viewing frustum to the unit box. -We assume a unit box extending from -1 to 1 in the x and y dimensions and -from 0 to 1 in the z dimension.

    -

    Note: If you pass Infinity for zFar then it will produce a projection matrix -returns -Infinity for Z when transforming coordinates with Z <= 0 and +Infinity for Z -otherwise.

    - -

    Returns

    The perspective matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      fieldOfViewYInRadians: number
      -

      The camera angle from top to bottom (in radians).

      -
    • -
    • -
      aspect: number
      -

      The aspect ratio width / height.

      -
    • -
    • -
      zNear: number
      -

      The depth (negative z coordinate) - of the near clipping plane.

      -
    • -
    • -
      zFar: number
      -

      The depth (negative z coordinate) - of the far clipping plane.

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.rotate.html b/docs/functions/mat4.rotate.html deleted file mode 100644 index 61a3431..0000000 --- a/docs/functions/mat4.rotate.html +++ /dev/null @@ -1,127 +0,0 @@ -rotate | wgpu-matrix
-
- -
-
-
-
- -

Function rotate

-
-
    - -
  • -

    Rotates the given 4-by-4 matrix around the given axis by the -given angle. (same as rotate)

    - -

    Returns

    The rotated matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat4
      -

      The matrix.

      -
    • -
    • -
      axis: Vec3
      -

      The axis - about which to rotate.

      -
    • -
    • -
      angleInRadians: number
      -

      The angle by which to rotate (in radians).

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.rotateX.html b/docs/functions/mat4.rotateX.html deleted file mode 100644 index ba03e4a..0000000 --- a/docs/functions/mat4.rotateX.html +++ /dev/null @@ -1,122 +0,0 @@ -rotateX | wgpu-matrix
-
- -
-
-
-
- -

Function rotateX

-
-
    - -
  • -

    Rotates the given 4-by-4 matrix around the x-axis by the given -angle.

    - -

    Returns

    The rotated matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat4
      -

      The matrix.

      -
    • -
    • -
      angleInRadians: number
      -

      The angle by which to rotate (in radians).

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.rotateY.html b/docs/functions/mat4.rotateY.html deleted file mode 100644 index 776bada..0000000 --- a/docs/functions/mat4.rotateY.html +++ /dev/null @@ -1,122 +0,0 @@ -rotateY | wgpu-matrix
-
- -
-
-
-
- -

Function rotateY

-
-
    - -
  • -

    Rotates the given 4-by-4 matrix around the y-axis by the given -angle.

    - -

    Returns

    The rotated matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat4
      -

      The matrix.

      -
    • -
    • -
      angleInRadians: number
      -

      The angle by which to rotate (in radians).

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.rotateZ.html b/docs/functions/mat4.rotateZ.html deleted file mode 100644 index 06a2930..0000000 --- a/docs/functions/mat4.rotateZ.html +++ /dev/null @@ -1,122 +0,0 @@ -rotateZ | wgpu-matrix
-
- -
-
-
-
- -

Function rotateZ

-
-
    - -
  • -

    Rotates the given 4-by-4 matrix around the z-axis by the given -angle.

    - -

    Returns

    The rotated matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat4
      -

      The matrix.

      -
    • -
    • -
      angleInRadians: number
      -

      The angle by which to rotate (in radians).

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.rotation.html b/docs/functions/mat4.rotation.html deleted file mode 100644 index 1cb273e..0000000 --- a/docs/functions/mat4.rotation.html +++ /dev/null @@ -1,124 +0,0 @@ -rotation | wgpu-matrix
-
- -
-
-
-
- -

Function rotation

-
-
    - -
  • -

    Creates a 4-by-4 matrix which rotates around the given axis by the given -angle. (same as axisRotation)

    - -

    Returns

    A matrix which rotates angle radians - around the axis.

    -
    -
    -

    Parameters

    -
      -
    • -
      axis: Vec3
      -

      The axis - about which to rotate.

      -
    • -
    • -
      angleInRadians: number
      -

      The angle by which to rotate (in radians).

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.rotationX.html b/docs/functions/mat4.rotationX.html deleted file mode 100644 index d7f5df4..0000000 --- a/docs/functions/mat4.rotationX.html +++ /dev/null @@ -1,117 +0,0 @@ -rotationX | wgpu-matrix
-
- -
-
-
-
- -

Function rotationX

-
-
    - -
  • -

    Creates a 4-by-4 matrix which rotates around the x-axis by the given angle.

    - -

    Returns

    The rotation matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      angleInRadians: number
      -

      The angle by which to rotate (in radians).

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.rotationY.html b/docs/functions/mat4.rotationY.html deleted file mode 100644 index 0341a6d..0000000 --- a/docs/functions/mat4.rotationY.html +++ /dev/null @@ -1,117 +0,0 @@ -rotationY | wgpu-matrix
-
- -
-
-
-
- -

Function rotationY

-
-
    - -
  • -

    Creates a 4-by-4 matrix which rotates around the y-axis by the given angle.

    - -

    Returns

    The rotation matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      angleInRadians: number
      -

      The angle by which to rotate (in radians).

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.rotationZ.html b/docs/functions/mat4.rotationZ.html deleted file mode 100644 index f37b509..0000000 --- a/docs/functions/mat4.rotationZ.html +++ /dev/null @@ -1,117 +0,0 @@ -rotationZ | wgpu-matrix
-
- -
-
-
-
- -

Function rotationZ

-
-
    - -
  • -

    Creates a 4-by-4 matrix which rotates around the z-axis by the given angle.

    - -

    Returns

    The rotation matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      angleInRadians: number
      -

      The angle by which to rotate (in radians).

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.scale.html b/docs/functions/mat4.scale.html deleted file mode 100644 index 414dd34..0000000 --- a/docs/functions/mat4.scale.html +++ /dev/null @@ -1,124 +0,0 @@ -scale | wgpu-matrix
-
- -
-
-
-
- -

Function scale

-
-
    - -
  • -

    Scales the given 4-by-4 matrix in each dimension by an amount -given by the corresponding entry in the given vector; assumes the vector has -three entries.

    - -

    Returns

    The scaled matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat4
      -

      The matrix to be modified.

      -
    • -
    • -
      v: Vec3
      -

      A vector of three entries specifying the - factor by which to scale in each dimension.

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.scaling.html b/docs/functions/mat4.scaling.html deleted file mode 100644 index a3520c8..0000000 --- a/docs/functions/mat4.scaling.html +++ /dev/null @@ -1,120 +0,0 @@ -scaling | wgpu-matrix
-
- -
-
-
-
- -

Function scaling

-
-
    - -
  • -

    Creates a 4-by-4 matrix which scales in each dimension by an amount given by -the corresponding entry in the given vector; assumes the vector has three -entries.

    - -

    Returns

    The scaling matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec3
      -

      A vector of - three entries specifying the factor by which to scale in each dimension.

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.set.html b/docs/functions/mat4.set.html deleted file mode 100644 index 8b5937c..0000000 --- a/docs/functions/mat4.set.html +++ /dev/null @@ -1,178 +0,0 @@ -set | wgpu-matrix
-
- -
-
-
-
- -

Function set

-
-
    - -
  • -

    Sets the values of a Mat4 -Also see create and copy

    - -

    Returns

    Mat4 created from values.

    -
    -
    -

    Parameters

    -
      -
    • -
      v0: number
      -

      value for element 0

      -
    • -
    • -
      v1: number
      -

      value for element 1

      -
    • -
    • -
      v2: number
      -

      value for element 2

      -
    • -
    • -
      v3: number
      -

      value for element 3

      -
    • -
    • -
      v4: number
      -

      value for element 4

      -
    • -
    • -
      v5: number
      -

      value for element 5

      -
    • -
    • -
      v6: number
      -

      value for element 6

      -
    • -
    • -
      v7: number
      -

      value for element 7

      -
    • -
    • -
      v8: number
      -

      value for element 8

      -
    • -
    • -
      v9: number
      -

      value for element 9

      -
    • -
    • -
      v10: number
      -

      value for element 10

      -
    • -
    • -
      v11: number
      -

      value for element 11

      -
    • -
    • -
      v12: number
      -

      value for element 12

      -
    • -
    • -
      v13: number
      -

      value for element 13

      -
    • -
    • -
      v14: number
      -

      value for element 14

      -
    • -
    • -
      v15: number
      -

      value for element 15

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.setAxis.html b/docs/functions/mat4.setAxis.html deleted file mode 100644 index b43a43b..0000000 --- a/docs/functions/mat4.setAxis.html +++ /dev/null @@ -1,123 +0,0 @@ -setAxis | wgpu-matrix
-
- -
-
-
-
- -

Function setAxis

-
-
    - -
  • -

    Sets an axis of a 4x4 matrix as a vector with 3 entries

    - -

    Returns

    The matrix with axis set.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Mat4
    • -
    • -
      v: Vec3
      -

      the axis vector

      -
    • -
    • -
      axis: number
      -

      The axis 0 = x, 1 = y, 2 = z;

      -
    • -
    • -
      dst: Mat4
      -

      The matrix to set. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.setDefaultType.html b/docs/functions/mat4.setDefaultType.html deleted file mode 100644 index c4a1492..0000000 --- a/docs/functions/mat4.setDefaultType.html +++ /dev/null @@ -1,124 +0,0 @@ -setDefaultType | wgpu-matrix
-
- -
-
-
-
- -

Function setDefaultType

-
-
    - -
  • -

    Sets the type this library creates for a Mat4

    - -

    Returns

    previous constructor for Mat4

    -
    -
    -

    Parameters

    -
      -
    • -
      ctor: (new (n: number) => Mat4)
      -

      the constructor for the type. Either Float32Array, Float64Array, or Array

      -
      -
        -
      • -
          -
        • new (n: number): Mat4
        • -
        • -
          -

          Parameters

          -
            -
          • -
            n: number
          -

          Returns Mat4

    -

    Returns Mat4LikeCtor

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.setTranslation.html b/docs/functions/mat4.setTranslation.html deleted file mode 100644 index f3eac73..0000000 --- a/docs/functions/mat4.setTranslation.html +++ /dev/null @@ -1,122 +0,0 @@ -setTranslation | wgpu-matrix
-
- -
-
-
-
- -

Function setTranslation

-
-
    - -
  • -

    Sets the translation component of a 4-by-4 matrix to the given -vector.

    - -

    Returns

    The matrix with translation set.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Mat4
      -

      The matrix.

      -
    • -
    • -
      v: Vec3
      -

      The vector.

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.translate.html b/docs/functions/mat4.translate.html deleted file mode 100644 index 3b0c196..0000000 --- a/docs/functions/mat4.translate.html +++ /dev/null @@ -1,122 +0,0 @@ -translate | wgpu-matrix
-
- -
-
-
-
- -

Function translate

-
-
    - -
  • -

    Translates the given 4-by-4 matrix by the given vector v.

    - -

    Returns

    The translated matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat4
      -

      The matrix.

      -
    • -
    • -
      v: Vec3
      -

      The vector by - which to translate.

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.translation.html b/docs/functions/mat4.translation.html deleted file mode 100644 index d1567d5..0000000 --- a/docs/functions/mat4.translation.html +++ /dev/null @@ -1,118 +0,0 @@ -translation | wgpu-matrix
-
- -
-
-
-
- -

Function translation

-
-
    - -
  • -

    Creates a 4-by-4 matrix which translates by the given vector v.

    - -

    Returns

    The translation matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec3
      -

      The vector by - which to translate.

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.transpose.html b/docs/functions/mat4.transpose.html deleted file mode 100644 index 766daa4..0000000 --- a/docs/functions/mat4.transpose.html +++ /dev/null @@ -1,117 +0,0 @@ -transpose | wgpu-matrix
-
- -
-
-
-
- -

Function transpose

-
-
    - -
  • -

    Takes the transpose of a matrix.

    - -

    Returns

    The transpose of m.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat4
      -

      The matrix.

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.uniformScale.html b/docs/functions/mat4.uniformScale.html deleted file mode 100644 index 319186b..0000000 --- a/docs/functions/mat4.uniformScale.html +++ /dev/null @@ -1,121 +0,0 @@ -uniformScale | wgpu-matrix
-
- -
-
-
-
- -

Function uniformScale

-
-
    - -
  • -

    Scales the given 4-by-4 matrix in each dimension by a uniform scale.

    - -

    Returns

    The scaled matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat4
      -

      The matrix to be modified.

      -
    • -
    • -
      s: number
      -

      The amount to scale.

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/mat4.uniformScaling.html b/docs/functions/mat4.uniformScaling.html deleted file mode 100644 index 576f028..0000000 --- a/docs/functions/mat4.uniformScaling.html +++ /dev/null @@ -1,117 +0,0 @@ -uniformScaling | wgpu-matrix
-
- -
-
-
-
- -

Function uniformScaling

-
-
    - -
  • -

    Creates a 4-by-4 matrix which scales a uniform amount in each dimension.

    - -

    Returns

    The scaling matrix.

    -
    -
    -

    Parameters

    -
      -
    • -
      s: number
      -

      the amount to scale

      -
    • -
    • -
      Optional dst: Mat4
      -

      matrix to hold result. If not passed a new one is created.

      -
    -

    Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.add.html b/docs/functions/quat.add.html deleted file mode 100644 index cf7c52c..0000000 --- a/docs/functions/quat.add.html +++ /dev/null @@ -1,114 +0,0 @@ -add | wgpu-matrix
-
- -
-
-
-
- -

Function add

-
-
    - -
  • -

    Adds two quaternions; assumes a and b have the same dimension.

    - -

    Returns

    A quaternion that is the sum of a and b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Quat
      -

      Operand quaternion.

      -
    • -
    • -
      b: Quat
      -

      Operand quaternion.

      -
    • -
    • -
      Optional dst: Quat
      -

      quaternion to hold result. If not passed in a new one is created.

      -
    -

    Returns Quat

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.angle.html b/docs/functions/quat.angle.html deleted file mode 100644 index 5c27af2..0000000 --- a/docs/functions/quat.angle.html +++ /dev/null @@ -1,110 +0,0 @@ -angle | wgpu-matrix
-
- -
-
-
-
- -

Function angle

-
-
    - -
  • -

    Returns the angle in degrees between two rotations a and b.

    - -

    Returns

    angle in radians between the two quaternions

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Quat
      -

      quaternion a

      -
    • -
    • -
      b: Quat
      -

      quaternion b

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.clone.html b/docs/functions/quat.clone.html deleted file mode 100644 index e08ccc1..0000000 --- a/docs/functions/quat.clone.html +++ /dev/null @@ -1,111 +0,0 @@ -clone | wgpu-matrix
-
- -
-
-
-
- -

Function clone

-
-
    - -
  • -

    Clones a quaternion. (same as copy) -Also see create and set

    - -

    Returns

    A copy of q.

    -
    -
    -

    Parameters

    -
      -
    • -
      q: Quat
      -

      The quaternion.

      -
    • -
    • -
      Optional dst: Quat
      -

      quaternion to hold result. If not passed in a new one is created.

      -
    -

    Returns Quat

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.conjugate.html b/docs/functions/quat.conjugate.html deleted file mode 100644 index b54b73d..0000000 --- a/docs/functions/quat.conjugate.html +++ /dev/null @@ -1,112 +0,0 @@ -conjugate | wgpu-matrix
-
- -
-
-
-
- -

Function conjugate

-
-
    - -
  • -

    Compute the conjugate of a quaternion -For quaternions with a magnitude of 1 (a unit quaternion) -this returns the same as the inverse but is faster to calculate.

    - -

    Returns

    The conjugate of q

    -
    -
    -

    Parameters

    -
      -
    • -
      q: Quat
      -

      quaternion to compute the conjugate of.

      -
    • -
    • -
      Optional dst: Quat
      -

      quaternion to hold result. If not passed in a new one is created.

      -
    -

    Returns Quat

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.copy.html b/docs/functions/quat.copy.html deleted file mode 100644 index 2d25e0c..0000000 --- a/docs/functions/quat.copy.html +++ /dev/null @@ -1,111 +0,0 @@ -copy | wgpu-matrix
-
- -
-
-
-
- -

Function copy

-
-
    - -
  • -

    Copies a quaternion. (same as clone) -Also see create and set

    - -

    Returns

    A quaternion that is a copy of q

    -
    -
    -

    Parameters

    -
      -
    • -
      q: Quat
      -

      The quaternion.

      -
    • -
    • -
      Optional dst: Quat
      -

      quaternion to hold result. If not passed in a new one is created.

      -
    -

    Returns Quat

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.create.html b/docs/functions/quat.create.html deleted file mode 100644 index fc75230..0000000 --- a/docs/functions/quat.create.html +++ /dev/null @@ -1,118 +0,0 @@ -create | wgpu-matrix
-
- -
-
-
-
- -

Function create

-
-
    - -
  • -

    Creates a quat4; may be called with x, y, z to set initial values.

    - -

    Returns

    the created vector

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional x: number
      -

      Initial x value.

      -
    • -
    • -
      Optional y: number
      -

      Initial y value.

      -
    • -
    • -
      Optional z: number
      -

      Initial z value.

      -
    • -
    • -
      Optional w: number
      -

      Initial w value.

      -
    -

    Returns Quat

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.divScalar.html b/docs/functions/quat.divScalar.html deleted file mode 100644 index 2e4fa67..0000000 --- a/docs/functions/quat.divScalar.html +++ /dev/null @@ -1,114 +0,0 @@ -divScalar | wgpu-matrix
-
- -
-
-
-
- -

Function divScalar

-
-
    - -
  • -

    Divides a vector by a scalar.

    - -

    Returns

    The scaled quaternion.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Quat
      -

      The vector.

      -
    • -
    • -
      k: number
      -

      The scalar.

      -
    • -
    • -
      Optional dst: Quat
      -

      quaternion to hold result. If not passed in a new one is created.

      -
    -

    Returns Quat

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.dot.html b/docs/functions/quat.dot.html deleted file mode 100644 index 9ff6cf4..0000000 --- a/docs/functions/quat.dot.html +++ /dev/null @@ -1,110 +0,0 @@ -dot | wgpu-matrix
-
- -
-
-
-
- -

Function dot

-
-
    - -
  • -

    Computes the dot product of two quaternions

    - -

    Returns

    dot product

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Quat
      -

      Operand quaternion.

      -
    • -
    • -
      b: Quat
      -

      Operand quaternion.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.equals.html b/docs/functions/quat.equals.html deleted file mode 100644 index fa62b35..0000000 --- a/docs/functions/quat.equals.html +++ /dev/null @@ -1,110 +0,0 @@ -equals | wgpu-matrix
-
- -
-
-
-
- -

Function equals

-
-
    - -
  • -

    Check if 2 quaternions are exactly equal

    - -

    Returns

    true if quaternions are exactly equal

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Quat
      -

      Operand quaternion.

      -
    • -
    • -
      b: Quat
      -

      Operand quaternion.

      -
    -

    Returns boolean

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.equalsApproximately.html b/docs/functions/quat.equalsApproximately.html deleted file mode 100644 index 02cc2b6..0000000 --- a/docs/functions/quat.equalsApproximately.html +++ /dev/null @@ -1,110 +0,0 @@ -equalsApproximately | wgpu-matrix
-
- -
-
-
-
- -

Function equalsApproximately

-
-
    - -
  • -

    Check if 2 quaternions are approximately equal

    - -

    Returns

    true if quaternions are approximately equal

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Quat
      -

      Operand quaternion.

      -
    • -
    • -
      b: Quat
      -

      Operand quaternion.

      -
    -

    Returns boolean

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.fromAxisAngle.html b/docs/functions/quat.fromAxisAngle.html deleted file mode 100644 index 5bedd8d..0000000 --- a/docs/functions/quat.fromAxisAngle.html +++ /dev/null @@ -1,115 +0,0 @@ -fromAxisAngle | wgpu-matrix
-
- -
-
-
-
- -

Function fromAxisAngle

-
-
    - -
  • -

    Sets a quaternion from the given angle and axis, -then returns it.

    - -

    Returns

    The quaternion that represents the given axis and angle

    -
    -
    -

    Parameters

    -
      -
    • -
      axis: Vec3
      -

      the axis to rotate around

      -
    • -
    • -
      angleInRadians: number
      -

      the angle

      -
    • -
    • -
      Optional dst: Quat
      -

      quaternion to hold result. If not passed in a new one is created.

      -
    -

    Returns Quat

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.fromEuler.html b/docs/functions/quat.fromEuler.html deleted file mode 100644 index caaf22d..0000000 --- a/docs/functions/quat.fromEuler.html +++ /dev/null @@ -1,122 +0,0 @@ -fromEuler | wgpu-matrix
-
- -
-
-
-
- -

Function fromEuler

-
-
    - -
  • -

    Creates a quaternion from the given euler angle x, y, z using the provided intrinsic order for the conversion.

    - -

    Returns

    A quaternion representing the same rotation as the euler angles applied in the given order

    -
    -
    -

    Parameters

    -
      -
    • -
      xAngleInRadians: number
      -

      angle to rotate around X axis in radians.

      -
    • -
    • -
      yAngleInRadians: number
      -

      angle to rotate around Y axis in radians.

      -
    • -
    • -
      zAngleInRadians: number
      -

      angle to rotate around Z axis in radians.

      -
    • -
    • -
      order: RotationOrder
      -

      order to apply euler angles

      -
    • -
    • -
      Optional dst: Quat
      -

      quaternion to hold result. If not passed in a new one is created.

      -
    -

    Returns Quat

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.fromMat.html b/docs/functions/quat.fromMat.html deleted file mode 100644 index 78ef7ad..0000000 --- a/docs/functions/quat.fromMat.html +++ /dev/null @@ -1,111 +0,0 @@ -fromMat | wgpu-matrix
-
- -
-
-
-
- -

Function fromMat

-
-
    - -
  • -

    Creates a quaternion from the given rotation matrix.

    -

    The created quaternion is not normalized.

    - -

    Returns

    the result

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Float32Array | Float64Array | number[]
      -

      rotation matrix

      -
    • -
    • -
      Optional dst: Quat
      -

      quaternion to hold result. If not passed in a new one is created.

      -
    -

    Returns Quat

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.fromValues.html b/docs/functions/quat.fromValues.html deleted file mode 100644 index b3122c9..0000000 --- a/docs/functions/quat.fromValues.html +++ /dev/null @@ -1,116 +0,0 @@ -fromValues | wgpu-matrix
-
- -
-
-
-
- -

Function fromValues

-
-
    - -
  • -

    Creates a Quat; may be called with x, y, z to set initial values. (same as create)

    - -

    Returns

    the created vector

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional x: number
      -

      Initial x value.

      -
    • -
    • -
      Optional y: number
      -

      Initial y value.

      -
    • -
    • -
      Optional z: number
      -

      Initial z value.

      -
    • -
    • -
      Optional w: number
    -

    Returns Quat

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.identity.html b/docs/functions/quat.identity.html deleted file mode 100644 index 96b692c..0000000 --- a/docs/functions/quat.identity.html +++ /dev/null @@ -1,106 +0,0 @@ -identity | wgpu-matrix
-
- -
-
-
-
- -

Function identity

-
-
    - -
  • -

    Creates an identity quaternion

    - -

    Returns

    an identity quaternion

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional dst: Quat
      -

      quaternion to hold result. If not passed in a new one is created.

      -
    -

    Returns Quat

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.inverse.html b/docs/functions/quat.inverse.html deleted file mode 100644 index 9dd54a4..0000000 --- a/docs/functions/quat.inverse.html +++ /dev/null @@ -1,108 +0,0 @@ -inverse | wgpu-matrix
-
- -
-
-
-
- -

Function inverse

-
-
    - -
  • -

    Compute the inverse of a quaternion

    - -

    Returns

    A quaternion that is the result of a * b

    -
    -
    -

    Parameters

    -
      -
    • -
      q: Quat
      -

      quaternion to compute the inverse of

      -
    • -
    • -
      Optional dst: Quat
    -

    Returns Quat

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.len.html b/docs/functions/quat.len.html deleted file mode 100644 index 714defe..0000000 --- a/docs/functions/quat.len.html +++ /dev/null @@ -1,106 +0,0 @@ -len | wgpu-matrix
-
- -
-
-
-
- -

Function len

-
-
    - -
  • -

    Computes the length of quaternion (same as length)

    - -

    Returns

    length of quaternion.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Quat
      -

      quaternion.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.lenSq.html b/docs/functions/quat.lenSq.html deleted file mode 100644 index 82e6430..0000000 --- a/docs/functions/quat.lenSq.html +++ /dev/null @@ -1,106 +0,0 @@ -lenSq | wgpu-matrix
-
- -
-
-
-
- -

Function lenSq

-
-
    - -
  • -

    Computes the square of the length of quaternion (same as lengthSq)

    - -

    Returns

    square of the length of quaternion.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Quat
      -

      quaternion.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.length.html b/docs/functions/quat.length.html deleted file mode 100644 index b050fec..0000000 --- a/docs/functions/quat.length.html +++ /dev/null @@ -1,106 +0,0 @@ -length | wgpu-matrix
-
- -
-
-
-
- -

Function length

-
-
    - -
  • -

    Computes the length of quaternion

    - -

    Returns

    length of quaternion.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Quat
      -

      quaternion.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.lengthSq.html b/docs/functions/quat.lengthSq.html deleted file mode 100644 index 1530d51..0000000 --- a/docs/functions/quat.lengthSq.html +++ /dev/null @@ -1,106 +0,0 @@ -lengthSq | wgpu-matrix
-
- -
-
-
-
- -

Function lengthSq

-
-
    - -
  • -

    Computes the square of the length of quaternion

    - -

    Returns

    square of the length of quaternion.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Quat
      -

      quaternion.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.lerp.html b/docs/functions/quat.lerp.html deleted file mode 100644 index b5732e2..0000000 --- a/docs/functions/quat.lerp.html +++ /dev/null @@ -1,120 +0,0 @@ -lerp | wgpu-matrix
-
- -
-
-
-
- -

Function lerp

-
-
    - -
  • -

    Performs linear interpolation on two quaternions. -Given quaternions a and b and interpolation coefficient t, returns -a + t * (b - a).

    - -

    Returns

    The linear interpolated result.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Quat
      -

      Operand quaternion.

      -
    • -
    • -
      b: Quat
      -

      Operand quaternion.

      -
    • -
    • -
      t: number
      -

      Interpolation coefficient.

      -
    • -
    • -
      Optional dst: Quat
      -

      quaternion to hold result. If not passed in a new one is created.

      -
    -

    Returns Quat

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.mul.html b/docs/functions/quat.mul.html deleted file mode 100644 index 0f24632..0000000 --- a/docs/functions/quat.mul.html +++ /dev/null @@ -1,114 +0,0 @@ -mul | wgpu-matrix
-
- -
-
-
-
- -

Function mul

-
-
    - -
  • -

    Multiplies two quaternions

    - -

    Returns

    A quaternion that is the result of a * b

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Quat
      -

      the first quaternion

      -
    • -
    • -
      b: Quat
      -

      the second quaternion

      -
    • -
    • -
      Optional dst: Quat
      -

      quaternion to hold result. If not passed in a new one is created.

      -
    -

    Returns Quat

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.mulScalar.html b/docs/functions/quat.mulScalar.html deleted file mode 100644 index 64f2784..0000000 --- a/docs/functions/quat.mulScalar.html +++ /dev/null @@ -1,114 +0,0 @@ -mulScalar | wgpu-matrix
-
- -
-
-
-
- -

Function mulScalar

-
-
    - -
  • -

    Multiplies a quaternion by a scalar.

    - -

    Returns

    The scaled quaternion.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Quat
      -

      The quaternion.

      -
    • -
    • -
      k: number
      -

      The scalar.

      -
    • -
    • -
      Optional dst: Quat
      -

      quaternion to hold result. If not passed in a new one is created.

      -
    -

    Returns Quat

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.multiply.html b/docs/functions/quat.multiply.html deleted file mode 100644 index 4c40d3b..0000000 --- a/docs/functions/quat.multiply.html +++ /dev/null @@ -1,114 +0,0 @@ -multiply | wgpu-matrix
-
- -
-
-
-
- -

Function multiply

-
-
    - -
  • -

    Multiplies two quaternions

    - -

    Returns

    A quaternion that is the result of a * b

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Quat
      -

      the first quaternion

      -
    • -
    • -
      b: Quat
      -

      the second quaternion

      -
    • -
    • -
      Optional dst: Quat
      -

      quaternion to hold result. If not passed in a new one is created.

      -
    -

    Returns Quat

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.normalize.html b/docs/functions/quat.normalize.html deleted file mode 100644 index 2721f20..0000000 --- a/docs/functions/quat.normalize.html +++ /dev/null @@ -1,110 +0,0 @@ -normalize | wgpu-matrix
-
- -
-
-
-
- -

Function normalize

-
-
    - -
  • -

    Divides a quaternion by its Euclidean length and returns the quotient.

    - -

    Returns

    The normalized quaternion.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Quat
      -

      The quaternion.

      -
    • -
    • -
      Optional dst: Quat
      -

      quaternion to hold result. If not passed in a new one is created.

      -
    -

    Returns Quat

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.rotateX.html b/docs/functions/quat.rotateX.html deleted file mode 100644 index 56aaf6d..0000000 --- a/docs/functions/quat.rotateX.html +++ /dev/null @@ -1,114 +0,0 @@ -rotateX | wgpu-matrix
-
- -
-
-
-
- -

Function rotateX

-
-
    - -
  • -

    Rotates the given quaternion around the X axis by the given angle.

    - -

    Returns

    A quaternion that is the result of a * b

    -
    -
    -

    Parameters

    -
      -
    • -
      q: Quat
      -

      quaternion to rotate

      -
    • -
    • -
      angleInRadians: number
      -

      The angle by which to rotate

      -
    • -
    • -
      Optional dst: Quat
      -

      quaternion to hold result. If not passed in a new one is created.

      -
    -

    Returns Quat

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.rotateY.html b/docs/functions/quat.rotateY.html deleted file mode 100644 index 6e15536..0000000 --- a/docs/functions/quat.rotateY.html +++ /dev/null @@ -1,114 +0,0 @@ -rotateY | wgpu-matrix
-
- -
-
-
-
- -

Function rotateY

-
-
    - -
  • -

    Rotates the given quaternion around the Y axis by the given angle.

    - -

    Returns

    A quaternion that is the result of a * b

    -
    -
    -

    Parameters

    -
      -
    • -
      q: Quat
      -

      quaternion to rotate

      -
    • -
    • -
      angleInRadians: number
      -

      The angle by which to rotate

      -
    • -
    • -
      Optional dst: Quat
      -

      quaternion to hold result. If not passed in a new one is created.

      -
    -

    Returns Quat

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.rotateZ.html b/docs/functions/quat.rotateZ.html deleted file mode 100644 index 1c2217c..0000000 --- a/docs/functions/quat.rotateZ.html +++ /dev/null @@ -1,114 +0,0 @@ -rotateZ | wgpu-matrix
-
- -
-
-
-
- -

Function rotateZ

-
-
    - -
  • -

    Rotates the given quaternion around the Z axis by the given angle.

    - -

    Returns

    A quaternion that is the result of a * b

    -
    -
    -

    Parameters

    -
      -
    • -
      q: Quat
      -

      quaternion to rotate

      -
    • -
    • -
      angleInRadians: number
      -

      The angle by which to rotate

      -
    • -
    • -
      Optional dst: Quat
      -

      quaternion to hold result. If not passed in a new one is created.

      -
    -

    Returns Quat

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.rotationTo.html b/docs/functions/quat.rotationTo.html deleted file mode 100644 index 58b94f3..0000000 --- a/docs/functions/quat.rotationTo.html +++ /dev/null @@ -1,114 +0,0 @@ -rotationTo | wgpu-matrix
-
- -
-
-
-
- -

Function rotationTo

-
-
    - -
  • -

    Computes a quaternion to represent the shortest rotation from one vector to another.

    - -

    Returns

    the result

    -
    -
    -

    Parameters

    -
      -
    • -
      aUnit: Vec3
      -

      the start vector

      -
    • -
    • -
      bUnit: Vec3
      -

      the end vector

      -
    • -
    • -
      Optional dst: Quat
      -

      quaternion to hold result. If not passed in a new one is created.

      -
    -

    Returns Quat

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.scale.html b/docs/functions/quat.scale.html deleted file mode 100644 index 56a47c7..0000000 --- a/docs/functions/quat.scale.html +++ /dev/null @@ -1,114 +0,0 @@ -scale | wgpu-matrix
-
- -
-
-
-
- -

Function scale

-
-
    - -
  • -

    Multiplies a quaternion by a scalar. (same as mulScalar)

    - -

    Returns

    The scaled quaternion.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Quat
      -

      The quaternion.

      -
    • -
    • -
      k: number
      -

      The scalar.

      -
    • -
    • -
      Optional dst: Quat
      -

      quaternion to hold result. If not passed in a new one is created.

      -
    -

    Returns Quat

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.set.html b/docs/functions/quat.set.html deleted file mode 100644 index e86e07c..0000000 --- a/docs/functions/quat.set.html +++ /dev/null @@ -1,123 +0,0 @@ -set | wgpu-matrix
-
- -
-
-
-
- -

Function set

-
-
    - -
  • -

    Sets the values of a Quat -Also see create and copy

    - -

    Returns

    A vector with its elements set.

    -
    -
    -

    Parameters

    -
      -
    • -
      x: number
      -

      first value

      -
    • -
    • -
      y: number
      -

      second value

      -
    • -
    • -
      z: number
      -

      third value

      -
    • -
    • -
      w: number
      -

      fourth value

      -
    • -
    • -
      Optional dst: Quat
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Quat

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.setDefaultType.html b/docs/functions/quat.setDefaultType.html deleted file mode 100644 index dd69059..0000000 --- a/docs/functions/quat.setDefaultType.html +++ /dev/null @@ -1,142 +0,0 @@ -setDefaultType | wgpu-matrix
-
- -
-
-
-
- -

Function setDefaultType

-
-
    - -
  • -

    Sets the type this library creates for a Quat4

    - -

    Returns

    previous constructor for Quat4

    -
    -
    -

    Parameters

    -
      -
    • -
      ctor: (new (n: number) => Quat)
      -

      the constructor for the type. Either Float32Array, Float64Array, or Array

      -
      -
        -
      • -
          -
        • new (n: number): Quat
        • -
        • -
          -

          Parameters

          -
            -
          • -
            n: number
          -

          Returns Quat

    -

    Returns (new (n: number) => Quat)

    -
      -
    • -
        -
      • new (n: number): Quat
      • -
      • -

        Quat4 math functions.

        -

        Almost all functions take an optional dst argument. If it is not passed in the -functions will create a new Quat4. In other words you can do this

        -
        const v = quat4.cross(v1, v2);  // Creates a new Quat4 with the cross product of v1 x v2.
        -
        -

        or

        -
        const v = quat4.create();
        quat4.cross(v1, v2, v); // Puts the cross product of v1 x v2 in v -
        -

        The first style is often easier but depending on where it's used it generates garbage where -as there is almost never allocation with the second style.

        -

        It is always safe to pass any vector as the destination. So for example

        -
        quat4.cross(v1, v2, v1);  // Puts the cross product of v1 x v2 in v1
        -
        -
        -
        -

        Parameters

        -
          -
        • -
          n: number
        -

        Returns Quat

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.slerp.html b/docs/functions/quat.slerp.html deleted file mode 100644 index f4fa377..0000000 --- a/docs/functions/quat.slerp.html +++ /dev/null @@ -1,118 +0,0 @@ -slerp | wgpu-matrix
-
- -
-
-
-
- -

Function slerp

-
-
    - -
  • -

    Spherically linear interpolate between two quaternions

    - -

    Returns

    A quaternion that is the result of a * b

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Quat
      -

      starting value

      -
    • -
    • -
      b: Quat
      -

      ending value

      -
    • -
    • -
      t: number
      -

      value where 0 = a and 1 = b

      -
    • -
    • -
      Optional dst: Quat
      -

      quaternion to hold result. If not passed in a new one is created.

      -
    -

    Returns Quat

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.sqlerp.html b/docs/functions/quat.sqlerp.html deleted file mode 100644 index 96f4030..0000000 --- a/docs/functions/quat.sqlerp.html +++ /dev/null @@ -1,124 +0,0 @@ -sqlerp | wgpu-matrix
-
- -
-
-
-
- -

Function sqlerp

-
-
    - -
  • -

    Performs a spherical linear interpolation with two control points

    - -

    Returns

    result

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Quat
      -

      the first quaternion

      -
    • -
    • -
      b: Quat
      -

      the second quaternion

      -
    • -
    • -
      c: Quat
      -

      the third quaternion

      -
    • -
    • -
      d: Quat
      -

      the fourth quaternion

      -
    • -
    • -
      t: number
      -

      Interpolation coefficient 0 to 1

      -
    • -
    • -
      Optional dst: Quat
    -

    Returns Quat

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.sub.html b/docs/functions/quat.sub.html deleted file mode 100644 index c0a8b58..0000000 --- a/docs/functions/quat.sub.html +++ /dev/null @@ -1,114 +0,0 @@ -sub | wgpu-matrix
-
- -
-
-
-
- -

Function sub

-
-
    - -
  • -

    Subtracts two quaternions.

    - -

    Returns

    A quaternion that is the difference of a and b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Quat
      -

      Operand quaternion.

      -
    • -
    • -
      b: Quat
      -

      Operand quaternion.

      -
    • -
    • -
      Optional dst: Quat
      -

      quaternion to hold result. If not passed in a new one is created.

      -
    -

    Returns Quat

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.subtract.html b/docs/functions/quat.subtract.html deleted file mode 100644 index 81e7283..0000000 --- a/docs/functions/quat.subtract.html +++ /dev/null @@ -1,114 +0,0 @@ -subtract | wgpu-matrix
-
- -
-
-
-
- -

Function subtract

-
-
    - -
  • -

    Subtracts two quaternions.

    - -

    Returns

    A quaternion that is the difference of a and b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Quat
      -

      Operand quaternion.

      -
    • -
    • -
      b: Quat
      -

      Operand quaternion.

      -
    • -
    • -
      Optional dst: Quat
      -

      quaternion to hold result. If not passed in a new one is created.

      -
    -

    Returns Quat

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/quat.toAxisAngle.html b/docs/functions/quat.toAxisAngle.html deleted file mode 100644 index 2449c74..0000000 --- a/docs/functions/quat.toAxisAngle.html +++ /dev/null @@ -1,115 +0,0 @@ -toAxisAngle | wgpu-matrix
-
- -
-
-
-
- -

Function toAxisAngle

-
-
    - -
  • -

    Gets the rotation axis and angle

    - -

    Returns

    angle and axis

    -
    -
    -

    Parameters

    -
      -
    • -
      q: Quat
      -

      quaternion to compute from

      -
    • -
    • -
      Optional dst: Vec3
      -

      Vec3 to hold result. If not passed in a new one is created.

      -
    -

    Returns {
        angle: number;
        axis: Vec3;
    }

    -
      -
    • -
      angle: number
    • -
    • -
      axis: Vec3
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/setDefaultType.html b/docs/functions/setDefaultType.html deleted file mode 100644 index 8dc7812..0000000 --- a/docs/functions/setDefaultType.html +++ /dev/null @@ -1,85 +0,0 @@ -setDefaultType | wgpu-matrix
-
- -
-
-
-
- -

Function setDefaultType

-
-
    - -
  • -

    Sets the type this library creates for all types

    -

    example:

    -
    setDefaultType(Float64Array);
    -
    -
    -
    -

    Parameters

    -
      -
    • -
      ctor: (new (n: number) => Float32Array | Float64Array | number[])
      -

      the constructor for the type. Either Float32Array, Float64Array, or Array

      -
      -
        -
      • -
          -
        • new (n: number): Float32Array | Float64Array | number[]
        • -
        • -
          -

          Parameters

          -
            -
          • -
            n: number
          -

          Returns Float32Array | Float64Array | number[]

    -

    Returns void

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/utils.degToRad.html b/docs/functions/utils.degToRad.html deleted file mode 100644 index 96cc633..0000000 --- a/docs/functions/utils.degToRad.html +++ /dev/null @@ -1,74 +0,0 @@ -degToRad | wgpu-matrix
-
- -
-
-
-
- -

Function degToRad

-
-
    - -
  • -

    Convert degrees to radians

    - -

    Returns

    angle converted to radians

    -
    -
    -

    Parameters

    -
      -
    • -
      degrees: number
      -

      Angle in degrees

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/utils.euclideanModulo.html b/docs/functions/utils.euclideanModulo.html deleted file mode 100644 index f7f9d50..0000000 --- a/docs/functions/utils.euclideanModulo.html +++ /dev/null @@ -1,80 +0,0 @@ -euclideanModulo | wgpu-matrix
-
- -
-
-
-
- -

Function euclideanModulo

-
-
    - -
  • -

    Compute the euclidean modulo

    -
    // table for n / 3
    -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5 <- n
    ------------------------------------
    -2 -1 -0 -2 -1 0, 1, 2, 0, 1, 2 <- n % 3
    1 2 0 1 2 0, 1, 2, 0, 1, 2 <- euclideanModule(n, 3) -
    - -

    Returns

    the euclidean modulo of n / m

    -
    -
    -

    Parameters

    -
      -
    • -
      n: number
      -

      dividend

      -
    • -
    • -
      m: number
      -

      divisor

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/utils.inverseLerp.html b/docs/functions/utils.inverseLerp.html deleted file mode 100644 index 9debbdb..0000000 --- a/docs/functions/utils.inverseLerp.html +++ /dev/null @@ -1,84 +0,0 @@ -inverseLerp | wgpu-matrix
-
- -
-
-
-
- -

Function inverseLerp

-
-
    - -
  • -

    Compute the opposite of lerp. Given a and b and a value between -a and b returns a value between 0 and 1. 0 if a, 1 if b. -Note: no clamping is done.

    - -

    Returns

    (v - a) / (b - a)

    -
    -
    -

    Parameters

    -
      -
    • -
      a: number
      -

      start value

      -
    • -
    • -
      b: number
      -

      end value

      -
    • -
    • -
      v: number
      -

      value between a and b

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/utils.lerp.html b/docs/functions/utils.lerp.html deleted file mode 100644 index 161429b..0000000 --- a/docs/functions/utils.lerp.html +++ /dev/null @@ -1,82 +0,0 @@ -lerp | wgpu-matrix
-
- -
-
-
-
- -

Function lerp

-
-
    - -
  • -

    Lerps between a and b via t

    - -

    Returns

    a + (b - a) * t

    -
    -
    -

    Parameters

    -
      -
    • -
      a: number
      -

      starting value

      -
    • -
    • -
      b: number
      -

      ending value

      -
    • -
    • -
      t: number
      -

      value where 0 = a and 1 = b

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/utils.radToDeg.html b/docs/functions/utils.radToDeg.html deleted file mode 100644 index 8e7e90b..0000000 --- a/docs/functions/utils.radToDeg.html +++ /dev/null @@ -1,74 +0,0 @@ -radToDeg | wgpu-matrix
-
- -
-
-
-
- -

Function radToDeg

-
-
    - -
  • -

    Convert radians to degrees

    - -

    Returns

    angle converted to degrees

    -
    -
    -

    Parameters

    -
      -
    • -
      radians: number
      -

      Angle in radians

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/utils.setEpsilon.html b/docs/functions/utils.setEpsilon.html deleted file mode 100644 index 964e812..0000000 --- a/docs/functions/utils.setEpsilon.html +++ /dev/null @@ -1,74 +0,0 @@ -setEpsilon | wgpu-matrix
-
- -
-
-
-
- -

Function setEpsilon

-
-
    - -
  • -

    Set the value for EPSILON for various checks

    - -

    Returns

    previous value of EPSILON;

    -
    -
    -

    Parameters

    -
      -
    • -
      v: number
      -

      Value to use for EPSILON.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.add.html b/docs/functions/vec2.add.html deleted file mode 100644 index c1c15ed..0000000 --- a/docs/functions/vec2.add.html +++ /dev/null @@ -1,122 +0,0 @@ -add | wgpu-matrix
-
- -
-
-
-
- -

Function add

-
-
    - -
  • -

    Adds two vectors; assumes a and b have the same dimension.

    - -

    Returns

    A vector that is the sum of a and b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec2
      -

      Operand vector.

      -
    • -
    • -
      b: Vec2
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.addScaled.html b/docs/functions/vec2.addScaled.html deleted file mode 100644 index 991780f..0000000 --- a/docs/functions/vec2.addScaled.html +++ /dev/null @@ -1,126 +0,0 @@ -addScaled | wgpu-matrix
-
- -
-
-
-
- -

Function addScaled

-
-
    - -
  • -

    Adds two vectors, scaling the 2nd; assumes a and b have the same dimension.

    - -

    Returns

    A vector that is the sum of a + b * scale.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec2
      -

      Operand vector.

      -
    • -
    • -
      b: Vec2
      -

      Operand vector.

      -
    • -
    • -
      scale: number
      -

      Amount to scale b

      -
    • -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.angle.html b/docs/functions/vec2.angle.html deleted file mode 100644 index 9bde391..0000000 --- a/docs/functions/vec2.angle.html +++ /dev/null @@ -1,118 +0,0 @@ -angle | wgpu-matrix
-
- -
-
-
-
- -

Function angle

-
-
    - -
  • -

    Returns the angle in radians between two vectors.

    - -

    Returns

    The angle in radians between the 2 vectors.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec2
      -

      Operand vector.

      -
    • -
    • -
      b: Vec2
      -

      Operand vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.ceil.html b/docs/functions/vec2.ceil.html deleted file mode 100644 index 989c13b..0000000 --- a/docs/functions/vec2.ceil.html +++ /dev/null @@ -1,118 +0,0 @@ -ceil | wgpu-matrix
-
- -
-
-
-
- -

Function ceil

-
-
    - -
  • -

    Applies Math.ceil to each element of vector

    - -

    Returns

    A vector that is the ceil of each element of v.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec2
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.clamp.html b/docs/functions/vec2.clamp.html deleted file mode 100644 index 460a4c0..0000000 --- a/docs/functions/vec2.clamp.html +++ /dev/null @@ -1,126 +0,0 @@ -clamp | wgpu-matrix
-
- -
-
-
-
- -

Function clamp

-
-
    - -
  • -

    Clamp each element of vector between min and max

    - -

    Returns

    A vector that the clamped value of each element of v.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec2
      -

      Operand vector.

      -
    • -
    • -
      min: number = 0
      -

      Max value, default 1

      -
    • -
    • -
      max: number = 1
      -

      Min value, default 0

      -
    • -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.clone.html b/docs/functions/vec2.clone.html deleted file mode 100644 index 295c39a..0000000 --- a/docs/functions/vec2.clone.html +++ /dev/null @@ -1,119 +0,0 @@ -clone | wgpu-matrix
-
- -
-
-
-
- -

Function clone

-
-
    - -
  • -

    Clones a vector. (same as copy) -Also see create and set

    - -

    Returns

    A copy of v.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec2
      -

      The vector.

      -
    • -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.copy.html b/docs/functions/vec2.copy.html deleted file mode 100644 index 57b8c00..0000000 --- a/docs/functions/vec2.copy.html +++ /dev/null @@ -1,119 +0,0 @@ -copy | wgpu-matrix
-
- -
-
-
-
- -

Function copy

-
-
    - -
  • -

    Copies a vector. (same as clone) -Also see create and set

    - -

    Returns

    A copy of v.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec2
      -

      The vector.

      -
    • -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.create.html b/docs/functions/vec2.create.html deleted file mode 100644 index 18318b7..0000000 --- a/docs/functions/vec2.create.html +++ /dev/null @@ -1,131 +0,0 @@ -create | wgpu-matrix
-
- -
-
-
-
- -

Function create

-
-
    - -
  • -

    Creates a Vec2; may be called with x, y, z to set initial values.

    -

    Note: Since passing in a raw JavaScript array -is valid in all circumstances, if you want to -force a JavaScript array into a Vec2's specified type -it would be faster to use

    -
    const v = vec2.clone(someJSArray);
    -
    -

    Note: a consequence of the implementation is if your Vec2Type = Array -instead of Float32Array or Float64Array then any values you -don't pass in will be undefined. Usually this is not an issue since -(a) using Array is rare and (b) using vec2.create is usually used -to create a Vec2 to be filled out as in

    -
    const sum = vec2.create();
    vec2.add(v1, v2, sum); -
    - -

    Returns

    the created vector

    -
    -
    -

    Parameters

    -
      -
    • -
      x: number = 0
      -

      Initial x value.

      -
    • -
    • -
      y: number = 0
      -

      Initial y value.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.cross.html b/docs/functions/vec2.cross.html deleted file mode 100644 index 23656c7..0000000 --- a/docs/functions/vec2.cross.html +++ /dev/null @@ -1,123 +0,0 @@ -cross | wgpu-matrix
-
- -
-
-
-
- -

Function cross

-
-
    - -
  • -

    Computes the cross product of two vectors; assumes both vectors have -three entries.

    - -

    Returns

    The vector of a cross b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec2
      -

      Operand vector.

      -
    • -
    • -
      b: Vec2
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.dist.html b/docs/functions/vec2.dist.html deleted file mode 100644 index 9f6e72d..0000000 --- a/docs/functions/vec2.dist.html +++ /dev/null @@ -1,118 +0,0 @@ -dist | wgpu-matrix
-
- -
-
-
-
- -

Function dist

-
-
    - -
  • -

    Computes the distance between 2 points (same as distance)

    - -

    Returns

    distance between a and b

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec2
      -

      vector.

      -
    • -
    • -
      b: Vec2
      -

      vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.distSq.html b/docs/functions/vec2.distSq.html deleted file mode 100644 index 9a41d04..0000000 --- a/docs/functions/vec2.distSq.html +++ /dev/null @@ -1,118 +0,0 @@ -distSq | wgpu-matrix
-
- -
-
-
-
- -

Function distSq

-
-
    - -
  • -

    Computes the square of the distance between 2 points (same as distanceSq)

    - -

    Returns

    square of the distance between a and b

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec2
      -

      vector.

      -
    • -
    • -
      b: Vec2
      -

      vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.distance.html b/docs/functions/vec2.distance.html deleted file mode 100644 index cde32ea..0000000 --- a/docs/functions/vec2.distance.html +++ /dev/null @@ -1,118 +0,0 @@ -distance | wgpu-matrix
-
- -
-
-
-
- -

Function distance

-
-
    - -
  • -

    Computes the distance between 2 points

    - -

    Returns

    distance between a and b

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec2
      -

      vector.

      -
    • -
    • -
      b: Vec2
      -

      vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.distanceSq.html b/docs/functions/vec2.distanceSq.html deleted file mode 100644 index 82e6bcf..0000000 --- a/docs/functions/vec2.distanceSq.html +++ /dev/null @@ -1,118 +0,0 @@ -distanceSq | wgpu-matrix
-
- -
-
-
-
- -

Function distanceSq

-
-
    - -
  • -

    Computes the square of the distance between 2 points

    - -

    Returns

    square of the distance between a and b

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec2
      -

      vector.

      -
    • -
    • -
      b: Vec2
      -

      vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.div.html b/docs/functions/vec2.div.html deleted file mode 100644 index b593f72..0000000 --- a/docs/functions/vec2.div.html +++ /dev/null @@ -1,123 +0,0 @@ -div | wgpu-matrix
-
- -
-
-
-
- -

Function div

-
-
    - -
  • -

    Divides a vector by another vector (component-wise); assumes a and -b have the same length. (same as divide)

    - -

    Returns

    The vector of quotients of entries of a and b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec2
      -

      Operand vector.

      -
    • -
    • -
      b: Vec2
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.divScalar.html b/docs/functions/vec2.divScalar.html deleted file mode 100644 index a9e8b32..0000000 --- a/docs/functions/vec2.divScalar.html +++ /dev/null @@ -1,122 +0,0 @@ -divScalar | wgpu-matrix
-
- -
-
-
-
- -

Function divScalar

-
-
    - -
  • -

    Divides a vector by a scalar.

    - -

    Returns

    The scaled vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec2
      -

      The vector.

      -
    • -
    • -
      k: number
      -

      The scalar.

      -
    • -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.divide.html b/docs/functions/vec2.divide.html deleted file mode 100644 index fd5e9d1..0000000 --- a/docs/functions/vec2.divide.html +++ /dev/null @@ -1,123 +0,0 @@ -divide | wgpu-matrix
-
- -
-
-
-
- -

Function divide

-
-
    - -
  • -

    Divides a vector by another vector (component-wise); assumes a and -b have the same length.

    - -

    Returns

    The vector of quotients of entries of a and b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec2
      -

      Operand vector.

      -
    • -
    • -
      b: Vec2
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.dot.html b/docs/functions/vec2.dot.html deleted file mode 100644 index 608e735..0000000 --- a/docs/functions/vec2.dot.html +++ /dev/null @@ -1,119 +0,0 @@ -dot | wgpu-matrix
-
- -
-
-
-
- -

Function dot

-
-
    - -
  • -

    Computes the dot product of two vectors; assumes both vectors have -three entries.

    - -

    Returns

    dot product

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec2
      -

      Operand vector.

      -
    • -
    • -
      b: Vec2
      -

      Operand vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.equals.html b/docs/functions/vec2.equals.html deleted file mode 100644 index 445e15d..0000000 --- a/docs/functions/vec2.equals.html +++ /dev/null @@ -1,118 +0,0 @@ -equals | wgpu-matrix
-
- -
-
-
-
- -

Function equals

-
-
    - -
  • -

    Check if 2 vectors are exactly equal

    - -

    Returns

    true if vectors are exactly equal

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec2
      -

      Operand vector.

      -
    • -
    • -
      b: Vec2
      -

      Operand vector.

      -
    -

    Returns boolean

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.equalsApproximately.html b/docs/functions/vec2.equalsApproximately.html deleted file mode 100644 index e927a19..0000000 --- a/docs/functions/vec2.equalsApproximately.html +++ /dev/null @@ -1,118 +0,0 @@ -equalsApproximately | wgpu-matrix
-
- -
-
-
-
- -

Function equalsApproximately

-
-
    - -
  • -

    Check if 2 vectors are approximately equal

    - -

    Returns

    true if vectors are approximately equal

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec2
      -

      Operand vector.

      -
    • -
    • -
      b: Vec2
      -

      Operand vector.

      -
    -

    Returns boolean

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.floor.html b/docs/functions/vec2.floor.html deleted file mode 100644 index 8ef5052..0000000 --- a/docs/functions/vec2.floor.html +++ /dev/null @@ -1,118 +0,0 @@ -floor | wgpu-matrix
-
- -
-
-
-
- -

Function floor

-
-
    - -
  • -

    Applies Math.floor to each element of vector

    - -

    Returns

    A vector that is the floor of each element of v.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec2
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.fromValues.html b/docs/functions/vec2.fromValues.html deleted file mode 100644 index 0917428..0000000 --- a/docs/functions/vec2.fromValues.html +++ /dev/null @@ -1,118 +0,0 @@ -fromValues | wgpu-matrix
-
- -
-
-
-
- -

Function fromValues

-
-
    - -
  • -

    Creates a Vec2; may be called with x, y, z to set initial values. (same as create)

    - -

    Returns

    the created vector

    -
    -
    -

    Parameters

    -
      -
    • -
      x: number = 0
      -

      Initial x value.

      -
    • -
    • -
      y: number = 0
      -

      Initial y value.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.inverse.html b/docs/functions/vec2.inverse.html deleted file mode 100644 index 1aa42d8..0000000 --- a/docs/functions/vec2.inverse.html +++ /dev/null @@ -1,118 +0,0 @@ -inverse | wgpu-matrix
-
- -
-
-
-
- -

Function inverse

-
-
    - -
  • -

    Inverse a vector.

    - -

    Returns

    The inverted vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec2
      -

      The vector.

      -
    • -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.invert.html b/docs/functions/vec2.invert.html deleted file mode 100644 index 441a1c8..0000000 --- a/docs/functions/vec2.invert.html +++ /dev/null @@ -1,118 +0,0 @@ -invert | wgpu-matrix
-
- -
-
-
-
- -

Function invert

-
-
    - -
  • -

    Invert a vector. (same as inverse)

    - -

    Returns

    The inverted vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec2
      -

      The vector.

      -
    • -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.len.html b/docs/functions/vec2.len.html deleted file mode 100644 index dfd7780..0000000 --- a/docs/functions/vec2.len.html +++ /dev/null @@ -1,114 +0,0 @@ -len | wgpu-matrix
-
- -
-
-
-
- -

Function len

-
-
    - -
  • -

    Computes the length of vector (same as length)

    - -

    Returns

    length of vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec2
      -

      vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.lenSq.html b/docs/functions/vec2.lenSq.html deleted file mode 100644 index 2f34ebe..0000000 --- a/docs/functions/vec2.lenSq.html +++ /dev/null @@ -1,114 +0,0 @@ -lenSq | wgpu-matrix
-
- -
-
-
-
- -

Function lenSq

-
-
    - -
  • -

    Computes the square of the length of vector (same as lengthSq)

    - -

    Returns

    square of the length of vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec2
      -

      vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.length.html b/docs/functions/vec2.length.html deleted file mode 100644 index 263a342..0000000 --- a/docs/functions/vec2.length.html +++ /dev/null @@ -1,114 +0,0 @@ -length | wgpu-matrix
-
- -
-
-
-
- -

Function length

-
-
    - -
  • -

    Computes the length of vector

    - -

    Returns

    length of vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec2
      -

      vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.lengthSq.html b/docs/functions/vec2.lengthSq.html deleted file mode 100644 index 09f0679..0000000 --- a/docs/functions/vec2.lengthSq.html +++ /dev/null @@ -1,114 +0,0 @@ -lengthSq | wgpu-matrix
-
- -
-
-
-
- -

Function lengthSq

-
-
    - -
  • -

    Computes the square of the length of vector

    - -

    Returns

    square of the length of vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec2
      -

      vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.lerp.html b/docs/functions/vec2.lerp.html deleted file mode 100644 index 8277442..0000000 --- a/docs/functions/vec2.lerp.html +++ /dev/null @@ -1,128 +0,0 @@ -lerp | wgpu-matrix
-
- -
-
-
-
- -

Function lerp

-
-
    - -
  • -

    Performs linear interpolation on two vectors. -Given vectors a and b and interpolation coefficient t, returns -a + t * (b - a).

    - -

    Returns

    The linear interpolated result.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec2
      -

      Operand vector.

      -
    • -
    • -
      b: Vec2
      -

      Operand vector.

      -
    • -
    • -
      t: number
      -

      Interpolation coefficient.

      -
    • -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.lerpV.html b/docs/functions/vec2.lerpV.html deleted file mode 100644 index df27d3a..0000000 --- a/docs/functions/vec2.lerpV.html +++ /dev/null @@ -1,128 +0,0 @@ -lerpV | wgpu-matrix
-
- -
-
-
-
- -

Function lerpV

-
-
    - -
  • -

    Performs linear interpolation on two vectors. -Given vectors a and b and interpolation coefficient vector t, returns -a + t * (b - a).

    - -

    Returns

    the linear interpolated result.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec2
      -

      Operand vector.

      -
    • -
    • -
      b: Vec2
      -

      Operand vector.

      -
    • -
    • -
      t: Vec2
      -

      Interpolation coefficients vector.

      -
    • -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.max.html b/docs/functions/vec2.max.html deleted file mode 100644 index 47f4a56..0000000 --- a/docs/functions/vec2.max.html +++ /dev/null @@ -1,124 +0,0 @@ -max | wgpu-matrix
-
- -
-
-
-
- -

Function max

-
-
    - -
  • -

    Return max values of two vectors. -Given vectors a and b returns -[max(a[0], b[0]), max(a[1], b[1]), max(a[2], b[2])].

    - -

    Returns

    The max components vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec2
      -

      Operand vector.

      -
    • -
    • -
      b: Vec2
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.min.html b/docs/functions/vec2.min.html deleted file mode 100644 index f5514c0..0000000 --- a/docs/functions/vec2.min.html +++ /dev/null @@ -1,124 +0,0 @@ -min | wgpu-matrix
-
- -
-
-
-
- -

Function min

-
-
    - -
  • -

    Return min values of two vectors. -Given vectors a and b returns -[min(a[0], b[0]), min(a[1], b[1]), min(a[2], b[2])].

    - -

    Returns

    The min components vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec2
      -

      Operand vector.

      -
    • -
    • -
      b: Vec2
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.mul.html b/docs/functions/vec2.mul.html deleted file mode 100644 index 41e0ef1..0000000 --- a/docs/functions/vec2.mul.html +++ /dev/null @@ -1,123 +0,0 @@ -mul | wgpu-matrix
-
- -
-
-
-
- -

Function mul

-
-
    - -
  • -

    Multiplies a vector by another vector (component-wise); assumes a and -b have the same length. (same as mul)

    - -

    Returns

    The vector of products of entries of a and b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec2
      -

      Operand vector.

      -
    • -
    • -
      b: Vec2
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.mulScalar.html b/docs/functions/vec2.mulScalar.html deleted file mode 100644 index 773aed4..0000000 --- a/docs/functions/vec2.mulScalar.html +++ /dev/null @@ -1,122 +0,0 @@ -mulScalar | wgpu-matrix
-
- -
-
-
-
- -

Function mulScalar

-
-
    - -
  • -

    Multiplies a vector by a scalar.

    - -

    Returns

    The scaled vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec2
      -

      The vector.

      -
    • -
    • -
      k: number
      -

      The scalar.

      -
    • -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.multiply.html b/docs/functions/vec2.multiply.html deleted file mode 100644 index 1dc4738..0000000 --- a/docs/functions/vec2.multiply.html +++ /dev/null @@ -1,123 +0,0 @@ -multiply | wgpu-matrix
-
- -
-
-
-
- -

Function multiply

-
-
    - -
  • -

    Multiplies a vector by another vector (component-wise); assumes a and -b have the same length.

    - -

    Returns

    The vector of products of entries of a and b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec2
      -

      Operand vector.

      -
    • -
    • -
      b: Vec2
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.negate.html b/docs/functions/vec2.negate.html deleted file mode 100644 index 768345a..0000000 --- a/docs/functions/vec2.negate.html +++ /dev/null @@ -1,118 +0,0 @@ -negate | wgpu-matrix
-
- -
-
-
-
- -

Function negate

-
-
    - -
  • -

    Negates a vector.

    - -

    Returns

    -v.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec2
      -

      The vector.

      -
    • -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.normalize.html b/docs/functions/vec2.normalize.html deleted file mode 100644 index 166d533..0000000 --- a/docs/functions/vec2.normalize.html +++ /dev/null @@ -1,118 +0,0 @@ -normalize | wgpu-matrix
-
- -
-
-
-
- -

Function normalize

-
-
    - -
  • -

    Divides a vector by its Euclidean length and returns the quotient.

    - -

    Returns

    The normalized vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec2
      -

      The vector.

      -
    • -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.random.html b/docs/functions/vec2.random.html deleted file mode 100644 index 762d229..0000000 --- a/docs/functions/vec2.random.html +++ /dev/null @@ -1,118 +0,0 @@ -random | wgpu-matrix
-
- -
-
-
-
- -

Function random

-
-
    - -
  • -

    Creates a random unit vector * scale

    - -

    Returns

    The random vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      scale: number = 1
      -

      Default 1

      -
    • -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.round.html b/docs/functions/vec2.round.html deleted file mode 100644 index ff980e9..0000000 --- a/docs/functions/vec2.round.html +++ /dev/null @@ -1,118 +0,0 @@ -round | wgpu-matrix
-
- -
-
-
-
- -

Function round

-
-
    - -
  • -

    Applies Math.round to each element of vector

    - -

    Returns

    A vector that is the round of each element of v.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec2
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.scale.html b/docs/functions/vec2.scale.html deleted file mode 100644 index 7c1b1d2..0000000 --- a/docs/functions/vec2.scale.html +++ /dev/null @@ -1,122 +0,0 @@ -scale | wgpu-matrix
-
- -
-
-
-
- -

Function scale

-
-
    - -
  • -

    Multiplies a vector by a scalar. (same as mulScalar)

    - -

    Returns

    The scaled vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec2
      -

      The vector.

      -
    • -
    • -
      k: number
      -

      The scalar.

      -
    • -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.set.html b/docs/functions/vec2.set.html deleted file mode 100644 index 4c5c786..0000000 --- a/docs/functions/vec2.set.html +++ /dev/null @@ -1,123 +0,0 @@ -set | wgpu-matrix
-
- -
-
-
-
- -

Function set

-
-
    - -
  • -

    Sets the values of a Vec2 -Also see create and copy

    - -

    Returns

    A vector with its elements set.

    -
    -
    -

    Parameters

    -
      -
    • -
      x: number
      -

      first value

      -
    • -
    • -
      y: number
      -

      second value

      -
    • -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.setDefaultType.html b/docs/functions/vec2.setDefaultType.html deleted file mode 100644 index b6df841..0000000 --- a/docs/functions/vec2.setDefaultType.html +++ /dev/null @@ -1,150 +0,0 @@ -setDefaultType | wgpu-matrix
-
- -
-
-
-
- -

Function setDefaultType

-
-
    - -
  • -

    Sets the type this library creates for a Vec2

    - -

    Returns

    previous constructor for Vec2

    -
    -
    -

    Parameters

    -
      -
    • -
      ctor: (new (n: number) => Vec2)
      -

      the constructor for the type. Either Float32Array, Float64Array, or Array

      -
      -
        -
      • -
          -
        • new (n: number): Vec2
        • -
        • -
          -

          Parameters

          -
            -
          • -
            n: number
          -

          Returns Vec2

    -

    Returns (new (n: number) => Vec2)

    -
      -
    • -
        -
      • new (n: number): Vec2
      • -
      • -

        Vec2 math functions.

        -

        Almost all functions take an optional dst argument. If it is not passed in the -functions will create a new Vec2. In other words you can do this

        -
        const v = vec2.cross(v1, v2);  // Creates a new Vec2 with the cross product of v1 x v2.
        -
        -

        or

        -
        const v = vec2.create();
        vec2.cross(v1, v2, v); // Puts the cross product of v1 x v2 in v -
        -

        The first style is often easier but depending on where it's used it generates garbage where -as there is almost never allocation with the second style.

        -

        It is always safe to pass any vector as the destination. So for example

        -
        vec2.cross(v1, v2, v1);  // Puts the cross product of v1 x v2 in v1
        -
        -
        -
        -

        Parameters

        -
          -
        • -
          n: number
        -

        Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.sub.html b/docs/functions/vec2.sub.html deleted file mode 100644 index 5f928eb..0000000 --- a/docs/functions/vec2.sub.html +++ /dev/null @@ -1,122 +0,0 @@ -sub | wgpu-matrix
-
- -
-
-
-
- -

Function sub

-
-
    - -
  • -

    Subtracts two vectors.

    - -

    Returns

    A vector that is the difference of a and b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec2
      -

      Operand vector.

      -
    • -
    • -
      b: Vec2
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.subtract.html b/docs/functions/vec2.subtract.html deleted file mode 100644 index cea10b3..0000000 --- a/docs/functions/vec2.subtract.html +++ /dev/null @@ -1,122 +0,0 @@ -subtract | wgpu-matrix
-
- -
-
-
-
- -

Function subtract

-
-
    - -
  • -

    Subtracts two vectors.

    - -

    Returns

    A vector that is the difference of a and b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec2
      -

      Operand vector.

      -
    • -
    • -
      b: Vec2
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.transformMat3.html b/docs/functions/vec2.transformMat3.html deleted file mode 100644 index e0cf0e4..0000000 --- a/docs/functions/vec2.transformMat3.html +++ /dev/null @@ -1,122 +0,0 @@ -transformMat3 | wgpu-matrix
-
- -
-
-
-
- -

Function transformMat3

-
-
    - -
  • -

    Transforms vec4 by 3x3 matrix

    - -

    Returns

    the transformed vector

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec2
      -

      the vector

      -
    • -
    • -
      m: Mat3
      -

      The matrix.

      -
    • -
    • -
      Optional dst: Vec2
      -

      optional Vec2 to store result. If not passed a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.transformMat4.html b/docs/functions/vec2.transformMat4.html deleted file mode 100644 index a36cad1..0000000 --- a/docs/functions/vec2.transformMat4.html +++ /dev/null @@ -1,122 +0,0 @@ -transformMat4 | wgpu-matrix
-
- -
-
-
-
- -

Function transformMat4

-
-
    - -
  • -

    transform Vec2 by 4x4 matrix

    - -

    Returns

    the transformed vector

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec2
      -

      the vector

      -
    • -
    • -
      m: Mat4
      -

      The matrix.

      -
    • -
    • -
      Optional dst: Vec2
      -

      optional Vec2 to store result. If not passed a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec2.zero.html b/docs/functions/vec2.zero.html deleted file mode 100644 index 99afaef..0000000 --- a/docs/functions/vec2.zero.html +++ /dev/null @@ -1,114 +0,0 @@ -zero | wgpu-matrix
-
- -
-
-
-
- -

Function zero

-
-
    - -
  • -

    Zero's a vector

    - -

    Returns

    The zeroed vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional dst: Vec2
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec2

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.add.html b/docs/functions/vec3.add.html deleted file mode 100644 index 228d64c..0000000 --- a/docs/functions/vec3.add.html +++ /dev/null @@ -1,127 +0,0 @@ -add | wgpu-matrix
-
- -
-
-
-
- -

Function add

-
-
    - -
  • -

    Adds two vectors; assumes a and b have the same dimension.

    - -

    Returns

    A vector that is the sum of a and b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec3
      -

      Operand vector.

      -
    • -
    • -
      b: Vec3
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.addScaled.html b/docs/functions/vec3.addScaled.html deleted file mode 100644 index 44fa577..0000000 --- a/docs/functions/vec3.addScaled.html +++ /dev/null @@ -1,131 +0,0 @@ -addScaled | wgpu-matrix
-
- -
-
-
-
- -

Function addScaled

-
-
    - -
  • -

    Adds two vectors, scaling the 2nd; assumes a and b have the same dimension.

    - -

    Returns

    A vector that is the sum of a + b * scale.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec3
      -

      Operand vector.

      -
    • -
    • -
      b: Vec3
      -

      Operand vector.

      -
    • -
    • -
      scale: number
      -

      Amount to scale b

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.angle.html b/docs/functions/vec3.angle.html deleted file mode 100644 index fbfffce..0000000 --- a/docs/functions/vec3.angle.html +++ /dev/null @@ -1,123 +0,0 @@ -angle | wgpu-matrix
-
- -
-
-
-
- -

Function angle

-
-
    - -
  • -

    Returns the angle in radians between two vectors.

    - -

    Returns

    The angle in radians between the 2 vectors.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec3
      -

      Operand vector.

      -
    • -
    • -
      b: Vec3
      -

      Operand vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.ceil.html b/docs/functions/vec3.ceil.html deleted file mode 100644 index 0906e3a..0000000 --- a/docs/functions/vec3.ceil.html +++ /dev/null @@ -1,123 +0,0 @@ -ceil | wgpu-matrix
-
- -
-
-
-
- -

Function ceil

-
-
    - -
  • -

    Applies Math.ceil to each element of vector

    - -

    Returns

    A vector that is the ceil of each element of v.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec3
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.clamp.html b/docs/functions/vec3.clamp.html deleted file mode 100644 index 18c2462..0000000 --- a/docs/functions/vec3.clamp.html +++ /dev/null @@ -1,131 +0,0 @@ -clamp | wgpu-matrix
-
- -
-
-
-
- -

Function clamp

-
-
    - -
  • -

    Clamp each element of vector between min and max

    - -

    Returns

    A vector that the clamped value of each element of v.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec3
      -

      Operand vector.

      -
    • -
    • -
      min: number = 0
      -

      Max value, default 1

      -
    • -
    • -
      max: number = 1
      -

      Min value, default 0

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.clone.html b/docs/functions/vec3.clone.html deleted file mode 100644 index 8333c8c..0000000 --- a/docs/functions/vec3.clone.html +++ /dev/null @@ -1,124 +0,0 @@ -clone | wgpu-matrix
-
- -
-
-
-
- -

Function clone

-
-
    - -
  • -

    Clones a vector. (same as copy) -Also see create and set

    - -

    Returns

    A copy of v.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec3
      -

      The vector.

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.copy.html b/docs/functions/vec3.copy.html deleted file mode 100644 index 16f85be..0000000 --- a/docs/functions/vec3.copy.html +++ /dev/null @@ -1,124 +0,0 @@ -copy | wgpu-matrix
-
- -
-
-
-
- -

Function copy

-
-
    - -
  • -

    Copies a vector. (same as clone) -Also see create and set

    - -

    Returns

    A copy of v.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec3
      -

      The vector.

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.create.html b/docs/functions/vec3.create.html deleted file mode 100644 index 5f1eda4..0000000 --- a/docs/functions/vec3.create.html +++ /dev/null @@ -1,127 +0,0 @@ -create | wgpu-matrix
-
- -
-
-
-
- -

Function create

-
-
    - -
  • -

    Creates a vec3; may be called with x, y, z to set initial values.

    - -

    Returns

    the created vector

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional x: number
      -

      Initial x value.

      -
    • -
    • -
      Optional y: number
      -

      Initial y value.

      -
    • -
    • -
      Optional z: number
      -

      Initial z value.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.cross.html b/docs/functions/vec3.cross.html deleted file mode 100644 index 9c3126b..0000000 --- a/docs/functions/vec3.cross.html +++ /dev/null @@ -1,128 +0,0 @@ -cross | wgpu-matrix
-
- -
-
-
-
- -

Function cross

-
-
    - -
  • -

    Computes the cross product of two vectors; assumes both vectors have -three entries.

    - -

    Returns

    The vector of a cross b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec3
      -

      Operand vector.

      -
    • -
    • -
      b: Vec3
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.dist.html b/docs/functions/vec3.dist.html deleted file mode 100644 index 4d0bc98..0000000 --- a/docs/functions/vec3.dist.html +++ /dev/null @@ -1,123 +0,0 @@ -dist | wgpu-matrix
-
- -
-
-
-
- -

Function dist

-
-
    - -
  • -

    Computes the distance between 2 points (same as distance)

    - -

    Returns

    distance between a and b

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec3
      -

      vector.

      -
    • -
    • -
      b: Vec3
      -

      vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.distSq.html b/docs/functions/vec3.distSq.html deleted file mode 100644 index 5fce341..0000000 --- a/docs/functions/vec3.distSq.html +++ /dev/null @@ -1,123 +0,0 @@ -distSq | wgpu-matrix
-
- -
-
-
-
- -

Function distSq

-
-
    - -
  • -

    Computes the square of the distance between 2 points (same as distanceSq)

    - -

    Returns

    square of the distance between a and b

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec3
      -

      vector.

      -
    • -
    • -
      b: Vec3
      -

      vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.distance.html b/docs/functions/vec3.distance.html deleted file mode 100644 index adfb322..0000000 --- a/docs/functions/vec3.distance.html +++ /dev/null @@ -1,123 +0,0 @@ -distance | wgpu-matrix
-
- -
-
-
-
- -

Function distance

-
-
    - -
  • -

    Computes the distance between 2 points

    - -

    Returns

    distance between a and b

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec3
      -

      vector.

      -
    • -
    • -
      b: Vec3
      -

      vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.distanceSq.html b/docs/functions/vec3.distanceSq.html deleted file mode 100644 index 2ea3be0..0000000 --- a/docs/functions/vec3.distanceSq.html +++ /dev/null @@ -1,123 +0,0 @@ -distanceSq | wgpu-matrix
-
- -
-
-
-
- -

Function distanceSq

-
-
    - -
  • -

    Computes the square of the distance between 2 points

    - -

    Returns

    square of the distance between a and b

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec3
      -

      vector.

      -
    • -
    • -
      b: Vec3
      -

      vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.div.html b/docs/functions/vec3.div.html deleted file mode 100644 index 0326dbe..0000000 --- a/docs/functions/vec3.div.html +++ /dev/null @@ -1,128 +0,0 @@ -div | wgpu-matrix
-
- -
-
-
-
- -

Function div

-
-
    - -
  • -

    Divides a vector by another vector (component-wise); assumes a and -b have the same length. (same as divide)

    - -

    Returns

    The vector of quotients of entries of a and b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec3
      -

      Operand vector.

      -
    • -
    • -
      b: Vec3
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.divScalar.html b/docs/functions/vec3.divScalar.html deleted file mode 100644 index 0ba2d4c..0000000 --- a/docs/functions/vec3.divScalar.html +++ /dev/null @@ -1,127 +0,0 @@ -divScalar | wgpu-matrix
-
- -
-
-
-
- -

Function divScalar

-
-
    - -
  • -

    Divides a vector by a scalar.

    - -

    Returns

    The scaled vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec3
      -

      The vector.

      -
    • -
    • -
      k: number
      -

      The scalar.

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.divide.html b/docs/functions/vec3.divide.html deleted file mode 100644 index 5a091cc..0000000 --- a/docs/functions/vec3.divide.html +++ /dev/null @@ -1,128 +0,0 @@ -divide | wgpu-matrix
-
- -
-
-
-
- -

Function divide

-
-
    - -
  • -

    Divides a vector by another vector (component-wise); assumes a and -b have the same length.

    - -

    Returns

    The vector of quotients of entries of a and b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec3
      -

      Operand vector.

      -
    • -
    • -
      b: Vec3
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.dot.html b/docs/functions/vec3.dot.html deleted file mode 100644 index 6010f81..0000000 --- a/docs/functions/vec3.dot.html +++ /dev/null @@ -1,124 +0,0 @@ -dot | wgpu-matrix
-
- -
-
-
-
- -

Function dot

-
-
    - -
  • -

    Computes the dot product of two vectors; assumes both vectors have -three entries.

    - -

    Returns

    dot product

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec3
      -

      Operand vector.

      -
    • -
    • -
      b: Vec3
      -

      Operand vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.equals.html b/docs/functions/vec3.equals.html deleted file mode 100644 index c22b967..0000000 --- a/docs/functions/vec3.equals.html +++ /dev/null @@ -1,123 +0,0 @@ -equals | wgpu-matrix
-
- -
-
-
-
- -

Function equals

-
-
    - -
  • -

    Check if 2 vectors are exactly equal

    - -

    Returns

    true if vectors are exactly equal

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec3
      -

      Operand vector.

      -
    • -
    • -
      b: Vec3
      -

      Operand vector.

      -
    -

    Returns boolean

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.equalsApproximately.html b/docs/functions/vec3.equalsApproximately.html deleted file mode 100644 index 7fde7b2..0000000 --- a/docs/functions/vec3.equalsApproximately.html +++ /dev/null @@ -1,123 +0,0 @@ -equalsApproximately | wgpu-matrix
-
- -
-
-
-
- -

Function equalsApproximately

-
-
    - -
  • -

    Check if 2 vectors are approximately equal

    - -

    Returns

    true if vectors are approximately equal

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec3
      -

      Operand vector.

      -
    • -
    • -
      b: Vec3
      -

      Operand vector.

      -
    -

    Returns boolean

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.floor.html b/docs/functions/vec3.floor.html deleted file mode 100644 index a444433..0000000 --- a/docs/functions/vec3.floor.html +++ /dev/null @@ -1,123 +0,0 @@ -floor | wgpu-matrix
-
- -
-
-
-
- -

Function floor

-
-
    - -
  • -

    Applies Math.floor to each element of vector

    - -

    Returns

    A vector that is the floor of each element of v.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec3
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.fromValues.html b/docs/functions/vec3.fromValues.html deleted file mode 100644 index 81d5d06..0000000 --- a/docs/functions/vec3.fromValues.html +++ /dev/null @@ -1,127 +0,0 @@ -fromValues | wgpu-matrix
-
- -
-
-
-
- -

Function fromValues

-
-
    - -
  • -

    Creates a vec3; may be called with x, y, z to set initial values. (same as create)

    - -

    Returns

    the created vector

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional x: number
      -

      Initial x value.

      -
    • -
    • -
      Optional y: number
      -

      Initial y value.

      -
    • -
    • -
      Optional z: number
      -

      Initial z value.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.getAxis.html b/docs/functions/vec3.getAxis.html deleted file mode 100644 index 09d9779..0000000 --- a/docs/functions/vec3.getAxis.html +++ /dev/null @@ -1,125 +0,0 @@ -getAxis | wgpu-matrix
-
- -
-
-
-
- -

Function getAxis

-
-
    - -
  • -

    Returns an axis of a 4x4 matrix as a vector with 3 entries

    - -

    Returns

    The axis component of m.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat4
      -

      The matrix.

      -
    • -
    • -
      axis: number
      -

      The axis 0 = x, 1 = y, 2 = z;

      -
    • -
    • -
      Optional dst: Vec3
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.getScaling.html b/docs/functions/vec3.getScaling.html deleted file mode 100644 index d2f8063..0000000 --- a/docs/functions/vec3.getScaling.html +++ /dev/null @@ -1,121 +0,0 @@ -getScaling | wgpu-matrix
-
- -
-
-
-
- -

Function getScaling

-
-
    - -
  • -

    Returns the scaling component of the matrix

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat4
      -

      The Matrix

      -
    • -
    • -
      dst: Vec3
      -

      The vector to set. If not passed a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.getTranslation.html b/docs/functions/vec3.getTranslation.html deleted file mode 100644 index b9bb177..0000000 --- a/docs/functions/vec3.getTranslation.html +++ /dev/null @@ -1,124 +0,0 @@ -getTranslation | wgpu-matrix
-
- -
-
-
-
- -

Function getTranslation

-
-
    - -
  • -

    Returns the translation component of a 4-by-4 matrix as a vector with 3 -entries.

    - -

    Returns

    The translation component of m.

    -
    -
    -

    Parameters

    -
      -
    • -
      m: Mat3
      -

      The matrix.

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.inverse.html b/docs/functions/vec3.inverse.html deleted file mode 100644 index 920ddad..0000000 --- a/docs/functions/vec3.inverse.html +++ /dev/null @@ -1,123 +0,0 @@ -inverse | wgpu-matrix
-
- -
-
-
-
- -

Function inverse

-
-
    - -
  • -

    Inverse a vector.

    - -

    Returns

    The inverted vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec3
      -

      The vector.

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.invert.html b/docs/functions/vec3.invert.html deleted file mode 100644 index c1ac437..0000000 --- a/docs/functions/vec3.invert.html +++ /dev/null @@ -1,123 +0,0 @@ -invert | wgpu-matrix
-
- -
-
-
-
- -

Function invert

-
-
    - -
  • -

    Invert a vector. (same as inverse)

    - -

    Returns

    The inverted vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec3
      -

      The vector.

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.len.html b/docs/functions/vec3.len.html deleted file mode 100644 index 1d5fcf3..0000000 --- a/docs/functions/vec3.len.html +++ /dev/null @@ -1,119 +0,0 @@ -len | wgpu-matrix
-
- -
-
-
-
- -

Function len

-
-
    - -
  • -

    Computes the length of vector (same as length)

    - -

    Returns

    length of vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec3
      -

      vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.lenSq.html b/docs/functions/vec3.lenSq.html deleted file mode 100644 index a31f13a..0000000 --- a/docs/functions/vec3.lenSq.html +++ /dev/null @@ -1,119 +0,0 @@ -lenSq | wgpu-matrix
-
- -
-
-
-
- -

Function lenSq

-
-
    - -
  • -

    Computes the square of the length of vector (same as lengthSq)

    - -

    Returns

    square of the length of vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec3
      -

      vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.length.html b/docs/functions/vec3.length.html deleted file mode 100644 index 9a3432b..0000000 --- a/docs/functions/vec3.length.html +++ /dev/null @@ -1,119 +0,0 @@ -length | wgpu-matrix
-
- -
-
-
-
- -

Function length

-
-
    - -
  • -

    Computes the length of vector

    - -

    Returns

    length of vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec3
      -

      vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.lengthSq.html b/docs/functions/vec3.lengthSq.html deleted file mode 100644 index 6e0a254..0000000 --- a/docs/functions/vec3.lengthSq.html +++ /dev/null @@ -1,119 +0,0 @@ -lengthSq | wgpu-matrix
-
- -
-
-
-
- -

Function lengthSq

-
-
    - -
  • -

    Computes the square of the length of vector

    - -

    Returns

    square of the length of vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec3
      -

      vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.lerp.html b/docs/functions/vec3.lerp.html deleted file mode 100644 index 06f42c0..0000000 --- a/docs/functions/vec3.lerp.html +++ /dev/null @@ -1,133 +0,0 @@ -lerp | wgpu-matrix
-
- -
-
-
-
- -

Function lerp

-
-
    - -
  • -

    Performs linear interpolation on two vectors. -Given vectors a and b and interpolation coefficient t, returns -a + t * (b - a).

    - -

    Returns

    The linear interpolated result.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec3
      -

      Operand vector.

      -
    • -
    • -
      b: Vec3
      -

      Operand vector.

      -
    • -
    • -
      t: number
      -

      Interpolation coefficient.

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.lerpV.html b/docs/functions/vec3.lerpV.html deleted file mode 100644 index b37c083..0000000 --- a/docs/functions/vec3.lerpV.html +++ /dev/null @@ -1,133 +0,0 @@ -lerpV | wgpu-matrix
-
- -
-
-
-
- -

Function lerpV

-
-
    - -
  • -

    Performs linear interpolation on two vectors. -Given vectors a and b and interpolation coefficient vector t, returns -a + t * (b - a).

    - -

    Returns

    the linear interpolated result.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec3
      -

      Operand vector.

      -
    • -
    • -
      b: Vec3
      -

      Operand vector.

      -
    • -
    • -
      t: Vec3
      -

      Interpolation coefficients vector.

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.max.html b/docs/functions/vec3.max.html deleted file mode 100644 index 5f76c63..0000000 --- a/docs/functions/vec3.max.html +++ /dev/null @@ -1,129 +0,0 @@ -max | wgpu-matrix
-
- -
-
-
-
- -

Function max

-
-
    - -
  • -

    Return max values of two vectors. -Given vectors a and b returns -[max(a[0], b[0]), max(a[1], b[1]), max(a[2], b[2])].

    - -

    Returns

    The max components vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec3
      -

      Operand vector.

      -
    • -
    • -
      b: Vec3
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.min.html b/docs/functions/vec3.min.html deleted file mode 100644 index 7b0cab9..0000000 --- a/docs/functions/vec3.min.html +++ /dev/null @@ -1,129 +0,0 @@ -min | wgpu-matrix
-
- -
-
-
-
- -

Function min

-
-
    - -
  • -

    Return min values of two vectors. -Given vectors a and b returns -[min(a[0], b[0]), min(a[1], b[1]), min(a[2], b[2])].

    - -

    Returns

    The min components vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec3
      -

      Operand vector.

      -
    • -
    • -
      b: Vec3
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.mul.html b/docs/functions/vec3.mul.html deleted file mode 100644 index df84778..0000000 --- a/docs/functions/vec3.mul.html +++ /dev/null @@ -1,128 +0,0 @@ -mul | wgpu-matrix
-
- -
-
-
-
- -

Function mul

-
-
    - -
  • -

    Multiplies a vector by another vector (component-wise); assumes a and -b have the same length. (same as mul)

    - -

    Returns

    The vector of products of entries of a and b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec3
      -

      Operand vector.

      -
    • -
    • -
      b: Vec3
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.mulScalar.html b/docs/functions/vec3.mulScalar.html deleted file mode 100644 index d8cba7c..0000000 --- a/docs/functions/vec3.mulScalar.html +++ /dev/null @@ -1,127 +0,0 @@ -mulScalar | wgpu-matrix
-
- -
-
-
-
- -

Function mulScalar

-
-
    - -
  • -

    Multiplies a vector by a scalar.

    - -

    Returns

    The scaled vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec3
      -

      The vector.

      -
    • -
    • -
      k: number
      -

      The scalar.

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.multiply.html b/docs/functions/vec3.multiply.html deleted file mode 100644 index df81999..0000000 --- a/docs/functions/vec3.multiply.html +++ /dev/null @@ -1,128 +0,0 @@ -multiply | wgpu-matrix
-
- -
-
-
-
- -

Function multiply

-
-
    - -
  • -

    Multiplies a vector by another vector (component-wise); assumes a and -b have the same length.

    - -

    Returns

    The vector of products of entries of a and b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec3
      -

      Operand vector.

      -
    • -
    • -
      b: Vec3
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.negate.html b/docs/functions/vec3.negate.html deleted file mode 100644 index d2a0aad..0000000 --- a/docs/functions/vec3.negate.html +++ /dev/null @@ -1,123 +0,0 @@ -negate | wgpu-matrix
-
- -
-
-
-
- -

Function negate

-
-
    - -
  • -

    Negates a vector.

    - -

    Returns

    -v.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec3
      -

      The vector.

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.normalize.html b/docs/functions/vec3.normalize.html deleted file mode 100644 index a6de142..0000000 --- a/docs/functions/vec3.normalize.html +++ /dev/null @@ -1,123 +0,0 @@ -normalize | wgpu-matrix
-
- -
-
-
-
- -

Function normalize

-
-
    - -
  • -

    Divides a vector by its Euclidean length and returns the quotient.

    - -

    Returns

    The normalized vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec3
      -

      The vector.

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.random.html b/docs/functions/vec3.random.html deleted file mode 100644 index f60661d..0000000 --- a/docs/functions/vec3.random.html +++ /dev/null @@ -1,123 +0,0 @@ -random | wgpu-matrix
-
- -
-
-
-
- -

Function random

-
-
    - -
  • -

    Creates a random vector

    - -

    Returns

    The random vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      scale: number = 1
      -

      Default 1

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.round.html b/docs/functions/vec3.round.html deleted file mode 100644 index 52b16f2..0000000 --- a/docs/functions/vec3.round.html +++ /dev/null @@ -1,123 +0,0 @@ -round | wgpu-matrix
-
- -
-
-
-
- -

Function round

-
-
    - -
  • -

    Applies Math.round to each element of vector

    - -

    Returns

    A vector that is the round of each element of v.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec3
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.scale.html b/docs/functions/vec3.scale.html deleted file mode 100644 index 1b97336..0000000 --- a/docs/functions/vec3.scale.html +++ /dev/null @@ -1,127 +0,0 @@ -scale | wgpu-matrix
-
- -
-
-
-
- -

Function scale

-
-
    - -
  • -

    Multiplies a vector by a scalar. (same as mulScalar)

    - -

    Returns

    The scaled vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec3
      -

      The vector.

      -
    • -
    • -
      k: number
      -

      The scalar.

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.set.html b/docs/functions/vec3.set.html deleted file mode 100644 index c8bf9b2..0000000 --- a/docs/functions/vec3.set.html +++ /dev/null @@ -1,132 +0,0 @@ -set | wgpu-matrix
-
- -
-
-
-
- -

Function set

-
-
    - -
  • -

    Sets the values of a Vec3 -Also see create and copy

    - -

    Returns

    A vector with its elements set.

    -
    -
    -

    Parameters

    -
      -
    • -
      x: number
      -

      first value

      -
    • -
    • -
      y: number
      -

      second value

      -
    • -
    • -
      z: number
      -

      third value

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.setDefaultType.html b/docs/functions/vec3.setDefaultType.html deleted file mode 100644 index b898537..0000000 --- a/docs/functions/vec3.setDefaultType.html +++ /dev/null @@ -1,155 +0,0 @@ -setDefaultType | wgpu-matrix
-
- -
-
-
-
- -

Function setDefaultType

-
-
    - -
  • -

    Sets the type this library creates for a Vec3

    - -

    Returns

    previous constructor for Vec3

    -
    -
    -

    Parameters

    -
      -
    • -
      ctor: (new (n: number) => Vec3)
      -

      the constructor for the type. Either Float32Array, Float64Array, or Array

      -
      -
        -
      • -
          -
        • new (n: number): Vec3
        • -
        • -
          -

          Parameters

          -
            -
          • -
            n: number
          -

          Returns Vec3

    -

    Returns (new (n: number) => Vec3)

    -
      -
    • -
        -
      • new (n: number): Vec3
      • -
      • -

        Vec3 math functions.

        -

        Almost all functions take an optional dst argument. If it is not passed in the -functions will create a new Vec3. In other words you can do this

        -
        const v = vec3.cross(v1, v2);  // Creates a new Vec3 with the cross product of v1 x v2.
        -
        -

        or

        -
        const v = vec3.create();
        vec3.cross(v1, v2, v); // Puts the cross product of v1 x v2 in v -
        -

        The first style is often easier but depending on where it's used it generates garbage where -as there is almost never allocation with the second style.

        -

        It is always safe to pass any vector as the destination. So for example

        -
        vec3.cross(v1, v2, v1);  // Puts the cross product of v1 x v2 in v1
        -
        -
        -
        -

        Parameters

        -
          -
        • -
          n: number
        -

        Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.sub.html b/docs/functions/vec3.sub.html deleted file mode 100644 index efb4fd8..0000000 --- a/docs/functions/vec3.sub.html +++ /dev/null @@ -1,127 +0,0 @@ -sub | wgpu-matrix
-
- -
-
-
-
- -

Function sub

-
-
    - -
  • -

    Subtracts two vectors.

    - -

    Returns

    A vector that is the difference of a and b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec3
      -

      Operand vector.

      -
    • -
    • -
      b: Vec3
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.subtract.html b/docs/functions/vec3.subtract.html deleted file mode 100644 index 3693514..0000000 --- a/docs/functions/vec3.subtract.html +++ /dev/null @@ -1,127 +0,0 @@ -subtract | wgpu-matrix
-
- -
-
-
-
- -

Function subtract

-
-
    - -
  • -

    Subtracts two vectors.

    - -

    Returns

    A vector that is the difference of a and b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec3
      -

      Operand vector.

      -
    • -
    • -
      b: Vec3
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.transformMat3.html b/docs/functions/vec3.transformMat3.html deleted file mode 100644 index c920cf2..0000000 --- a/docs/functions/vec3.transformMat3.html +++ /dev/null @@ -1,127 +0,0 @@ -transformMat3 | wgpu-matrix
-
- -
-
-
-
- -

Function transformMat3

-
-
    - -
  • -

    Transforms vec3 by 3x3 matrix

    - -

    Returns

    the transformed vector

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec3
      -

      the vector

      -
    • -
    • -
      m: Mat3
      -

      The matrix.

      -
    • -
    • -
      Optional dst: Vec3
      -

      optional vec3 to store result. If not passed a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.transformMat4.html b/docs/functions/vec3.transformMat4.html deleted file mode 100644 index 4630c5f..0000000 --- a/docs/functions/vec3.transformMat4.html +++ /dev/null @@ -1,127 +0,0 @@ -transformMat4 | wgpu-matrix
-
- -
-
-
-
- -

Function transformMat4

-
-
    - -
  • -

    transform vec3 by 4x4 matrix

    - -

    Returns

    the transformed vector

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec3
      -

      the vector

      -
    • -
    • -
      m: Mat4
      -

      The matrix.

      -
    • -
    • -
      Optional dst: Vec3
      -

      optional vec3 to store result. If not passed a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.transformMat4Upper3x3.html b/docs/functions/vec3.transformMat4Upper3x3.html deleted file mode 100644 index 7fde240..0000000 --- a/docs/functions/vec3.transformMat4Upper3x3.html +++ /dev/null @@ -1,127 +0,0 @@ -transformMat4Upper3x3 | wgpu-matrix
-
- -
-
-
-
- -

Function transformMat4Upper3x3

-
-
    - -
  • -

    Transform vec4 by upper 3x3 matrix inside 4x4 matrix.

    - -

    Returns

    The transformed vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec3
      -

      The direction.

      -
    • -
    • -
      m: Mat4
      -

      The matrix.

      -
    • -
    • -
      Optional dst: Vec3
      -

      optional Vec3 to store result. If not passed a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.transformQuat.html b/docs/functions/vec3.transformQuat.html deleted file mode 100644 index d55473a..0000000 --- a/docs/functions/vec3.transformQuat.html +++ /dev/null @@ -1,127 +0,0 @@ -transformQuat | wgpu-matrix
-
- -
-
-
-
- -

Function transformQuat

-
-
    - -
  • -

    Transforms vec3 by Quaternion

    - -

    Returns

    the transformed

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec3
      -

      the vector to transform

      -
    • -
    • -
      q: Quat
      -

      the quaternion to transform by

      -
    • -
    • -
      Optional dst: Vec3
      -

      optional vec3 to store result. If not passed a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec3.zero.html b/docs/functions/vec3.zero.html deleted file mode 100644 index 5970a45..0000000 --- a/docs/functions/vec3.zero.html +++ /dev/null @@ -1,119 +0,0 @@ -zero | wgpu-matrix
-
- -
-
-
-
- -

Function zero

-
-
    - -
  • -

    Zero's a vector

    - -

    Returns

    The zeroed vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional dst: Vec3
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.add.html b/docs/functions/vec4.add.html deleted file mode 100644 index e82be3b..0000000 --- a/docs/functions/vec4.add.html +++ /dev/null @@ -1,118 +0,0 @@ -add | wgpu-matrix
-
- -
-
-
-
- -

Function add

-
-
    - -
  • -

    Adds two vectors; assumes a and b have the same dimension.

    - -

    Returns

    A vector that is the sum of a and b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec4
      -

      Operand vector.

      -
    • -
    • -
      b: Vec4
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec4
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.addScaled.html b/docs/functions/vec4.addScaled.html deleted file mode 100644 index bb717cf..0000000 --- a/docs/functions/vec4.addScaled.html +++ /dev/null @@ -1,122 +0,0 @@ -addScaled | wgpu-matrix
-
- -
-
-
-
- -

Function addScaled

-
-
    - -
  • -

    Adds two vectors, scaling the 2nd; assumes a and b have the same dimension.

    - -

    Returns

    A vector that is the sum of a + b * scale.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec4
      -

      Operand vector.

      -
    • -
    • -
      b: Vec4
      -

      Operand vector.

      -
    • -
    • -
      scale: number
      -

      Amount to scale b

      -
    • -
    • -
      Optional dst: Vec4
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.ceil.html b/docs/functions/vec4.ceil.html deleted file mode 100644 index 07590a5..0000000 --- a/docs/functions/vec4.ceil.html +++ /dev/null @@ -1,114 +0,0 @@ -ceil | wgpu-matrix
-
- -
-
-
-
- -

Function ceil

-
-
    - -
  • -

    Applies Math.ceil to each element of vector

    - -

    Returns

    A vector that is the ceil of each element of v.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec4
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec4
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.clamp.html b/docs/functions/vec4.clamp.html deleted file mode 100644 index 44c7e6e..0000000 --- a/docs/functions/vec4.clamp.html +++ /dev/null @@ -1,122 +0,0 @@ -clamp | wgpu-matrix
-
- -
-
-
-
- -

Function clamp

-
-
    - -
  • -

    Clamp each element of vector between min and max

    - -

    Returns

    A vector that the clamped value of each element of v.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec4
      -

      Operand vector.

      -
    • -
    • -
      min: number = 0
      -

      Max value, default 1

      -
    • -
    • -
      max: number = 1
      -

      Min value, default 0

      -
    • -
    • -
      Optional dst: Vec4
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.clone.html b/docs/functions/vec4.clone.html deleted file mode 100644 index 8e0172f..0000000 --- a/docs/functions/vec4.clone.html +++ /dev/null @@ -1,115 +0,0 @@ -clone | wgpu-matrix
-
- -
-
-
-
- -

Function clone

-
-
    - -
  • -

    Clones a vector. (same as copy) -Also see create and set

    - -

    Returns

    A copy of v.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec4
      -

      The vector.

      -
    • -
    • -
      Optional dst: Vec4
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.copy.html b/docs/functions/vec4.copy.html deleted file mode 100644 index d7c9f74..0000000 --- a/docs/functions/vec4.copy.html +++ /dev/null @@ -1,115 +0,0 @@ -copy | wgpu-matrix
-
- -
-
-
-
- -

Function copy

-
-
    - -
  • -

    Copies a vector. (same as clone) -Also see create and set

    - -

    Returns

    A copy of v.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec4
      -

      The vector.

      -
    • -
    • -
      Optional dst: Vec4
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.create.html b/docs/functions/vec4.create.html deleted file mode 100644 index ab6f8c4..0000000 --- a/docs/functions/vec4.create.html +++ /dev/null @@ -1,122 +0,0 @@ -create | wgpu-matrix
-
- -
-
-
-
- -

Function create

-
-
    - -
  • -

    Creates a vec4; may be called with x, y, z to set initial values.

    - -

    Returns

    the created vector

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional x: number
      -

      Initial x value.

      -
    • -
    • -
      Optional y: number
      -

      Initial y value.

      -
    • -
    • -
      Optional z: number
      -

      Initial z value.

      -
    • -
    • -
      Optional w: number
      -

      Initial w value.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.dist.html b/docs/functions/vec4.dist.html deleted file mode 100644 index 225d54d..0000000 --- a/docs/functions/vec4.dist.html +++ /dev/null @@ -1,114 +0,0 @@ -dist | wgpu-matrix
-
- -
-
-
-
- -

Function dist

-
-
    - -
  • -

    Computes the distance between 2 points (same as distance)

    - -

    Returns

    distance between a and b

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec4
      -

      vector.

      -
    • -
    • -
      b: Vec4
      -

      vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.distSq.html b/docs/functions/vec4.distSq.html deleted file mode 100644 index d771efc..0000000 --- a/docs/functions/vec4.distSq.html +++ /dev/null @@ -1,114 +0,0 @@ -distSq | wgpu-matrix
-
- -
-
-
-
- -

Function distSq

-
-
    - -
  • -

    Computes the square of the distance between 2 points (same as distanceSq)

    - -

    Returns

    square of the distance between a and b

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec4
      -

      vector.

      -
    • -
    • -
      b: Vec4
      -

      vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.distance.html b/docs/functions/vec4.distance.html deleted file mode 100644 index 7150ae8..0000000 --- a/docs/functions/vec4.distance.html +++ /dev/null @@ -1,114 +0,0 @@ -distance | wgpu-matrix
-
- -
-
-
-
- -

Function distance

-
-
    - -
  • -

    Computes the distance between 2 points

    - -

    Returns

    distance between a and b

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec4
      -

      vector.

      -
    • -
    • -
      b: Vec4
      -

      vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.distanceSq.html b/docs/functions/vec4.distanceSq.html deleted file mode 100644 index efed7bb..0000000 --- a/docs/functions/vec4.distanceSq.html +++ /dev/null @@ -1,114 +0,0 @@ -distanceSq | wgpu-matrix
-
- -
-
-
-
- -

Function distanceSq

-
-
    - -
  • -

    Computes the square of the distance between 2 points

    - -

    Returns

    square of the distance between a and b

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec4
      -

      vector.

      -
    • -
    • -
      b: Vec4
      -

      vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.div.html b/docs/functions/vec4.div.html deleted file mode 100644 index 3444794..0000000 --- a/docs/functions/vec4.div.html +++ /dev/null @@ -1,119 +0,0 @@ -div | wgpu-matrix
-
- -
-
-
-
- -

Function div

-
-
    - -
  • -

    Divides a vector by another vector (component-wise); assumes a and -b have the same length. (same as divide)

    - -

    Returns

    The vector of quotients of entries of a and b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec4
      -

      Operand vector.

      -
    • -
    • -
      b: Vec4
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec4
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.divScalar.html b/docs/functions/vec4.divScalar.html deleted file mode 100644 index 30737a5..0000000 --- a/docs/functions/vec4.divScalar.html +++ /dev/null @@ -1,118 +0,0 @@ -divScalar | wgpu-matrix
-
- -
-
-
-
- -

Function divScalar

-
-
    - -
  • -

    Divides a vector by a scalar.

    - -

    Returns

    The scaled vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec4
      -

      The vector.

      -
    • -
    • -
      k: number
      -

      The scalar.

      -
    • -
    • -
      Optional dst: Vec4
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.divide.html b/docs/functions/vec4.divide.html deleted file mode 100644 index 28f2c41..0000000 --- a/docs/functions/vec4.divide.html +++ /dev/null @@ -1,119 +0,0 @@ -divide | wgpu-matrix
-
- -
-
-
-
- -

Function divide

-
-
    - -
  • -

    Divides a vector by another vector (component-wise); assumes a and -b have the same length.

    - -

    Returns

    The vector of quotients of entries of a and b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec4
      -

      Operand vector.

      -
    • -
    • -
      b: Vec4
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec4
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.dot.html b/docs/functions/vec4.dot.html deleted file mode 100644 index a6a7e0e..0000000 --- a/docs/functions/vec4.dot.html +++ /dev/null @@ -1,114 +0,0 @@ -dot | wgpu-matrix
-
- -
-
-
-
- -

Function dot

-
-
    - -
  • -

    Computes the dot product of two vectors

    - -

    Returns

    dot product

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec4
      -

      Operand vector.

      -
    • -
    • -
      b: Vec4
      -

      Operand vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.equals.html b/docs/functions/vec4.equals.html deleted file mode 100644 index 2d0d9d3..0000000 --- a/docs/functions/vec4.equals.html +++ /dev/null @@ -1,114 +0,0 @@ -equals | wgpu-matrix
-
- -
-
-
-
- -

Function equals

-
-
    - -
  • -

    Check if 2 vectors are exactly equal

    - -

    Returns

    true if vectors are exactly equal

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec4
      -

      Operand vector.

      -
    • -
    • -
      b: Vec4
      -

      Operand vector.

      -
    -

    Returns boolean

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.equalsApproximately.html b/docs/functions/vec4.equalsApproximately.html deleted file mode 100644 index 6718a12..0000000 --- a/docs/functions/vec4.equalsApproximately.html +++ /dev/null @@ -1,114 +0,0 @@ -equalsApproximately | wgpu-matrix
-
- -
-
-
-
- -

Function equalsApproximately

-
-
    - -
  • -

    Check if 2 vectors are approximately equal

    - -

    Returns

    true if vectors are approximately equal

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec4
      -

      Operand vector.

      -
    • -
    • -
      b: Vec4
      -

      Operand vector.

      -
    -

    Returns boolean

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.floor.html b/docs/functions/vec4.floor.html deleted file mode 100644 index 3db2f4d..0000000 --- a/docs/functions/vec4.floor.html +++ /dev/null @@ -1,114 +0,0 @@ -floor | wgpu-matrix
-
- -
-
-
-
- -

Function floor

-
-
    - -
  • -

    Applies Math.floor to each element of vector

    - -

    Returns

    A vector that is the floor of each element of v.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec4
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec4
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.fromValues.html b/docs/functions/vec4.fromValues.html deleted file mode 100644 index 9d95c69..0000000 --- a/docs/functions/vec4.fromValues.html +++ /dev/null @@ -1,120 +0,0 @@ -fromValues | wgpu-matrix
-
- -
-
-
-
- -

Function fromValues

-
-
    - -
  • -

    Creates a vec4; may be called with x, y, z to set initial values. (same as create)

    - -

    Returns

    the created vector

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional x: number
      -

      Initial x value.

      -
    • -
    • -
      Optional y: number
      -

      Initial y value.

      -
    • -
    • -
      Optional z: number
      -

      Initial z value.

      -
    • -
    • -
      Optional w: number
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.inverse.html b/docs/functions/vec4.inverse.html deleted file mode 100644 index 13ddb84..0000000 --- a/docs/functions/vec4.inverse.html +++ /dev/null @@ -1,114 +0,0 @@ -inverse | wgpu-matrix
-
- -
-
-
-
- -

Function inverse

-
-
    - -
  • -

    Inverse a vector.

    - -

    Returns

    The inverted vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec4
      -

      The vector.

      -
    • -
    • -
      Optional dst: Vec4
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.invert.html b/docs/functions/vec4.invert.html deleted file mode 100644 index 3422574..0000000 --- a/docs/functions/vec4.invert.html +++ /dev/null @@ -1,114 +0,0 @@ -invert | wgpu-matrix
-
- -
-
-
-
- -

Function invert

-
-
    - -
  • -

    Invert a vector. (same as inverse)

    - -

    Returns

    The inverted vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec4
      -

      The vector.

      -
    • -
    • -
      Optional dst: Vec4
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.len.html b/docs/functions/vec4.len.html deleted file mode 100644 index 1c802d5..0000000 --- a/docs/functions/vec4.len.html +++ /dev/null @@ -1,110 +0,0 @@ -len | wgpu-matrix
-
- -
-
-
-
- -

Function len

-
-
    - -
  • -

    Computes the length of vector (same as length)

    - -

    Returns

    length of vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec4
      -

      vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.lenSq.html b/docs/functions/vec4.lenSq.html deleted file mode 100644 index 0d9f7ed..0000000 --- a/docs/functions/vec4.lenSq.html +++ /dev/null @@ -1,110 +0,0 @@ -lenSq | wgpu-matrix
-
- -
-
-
-
- -

Function lenSq

-
-
    - -
  • -

    Computes the square of the length of vector (same as lengthSq)

    - -

    Returns

    square of the length of vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec4
      -

      vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.length.html b/docs/functions/vec4.length.html deleted file mode 100644 index 6e16601..0000000 --- a/docs/functions/vec4.length.html +++ /dev/null @@ -1,110 +0,0 @@ -length | wgpu-matrix
-
- -
-
-
-
- -

Function length

-
-
    - -
  • -

    Computes the length of vector

    - -

    Returns

    length of vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec4
      -

      vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.lengthSq.html b/docs/functions/vec4.lengthSq.html deleted file mode 100644 index afb6f67..0000000 --- a/docs/functions/vec4.lengthSq.html +++ /dev/null @@ -1,110 +0,0 @@ -lengthSq | wgpu-matrix
-
- -
-
-
-
- -

Function lengthSq

-
-
    - -
  • -

    Computes the square of the length of vector

    - -

    Returns

    square of the length of vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec4
      -

      vector.

      -
    -

    Returns number

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.lerp.html b/docs/functions/vec4.lerp.html deleted file mode 100644 index f2c0416..0000000 --- a/docs/functions/vec4.lerp.html +++ /dev/null @@ -1,124 +0,0 @@ -lerp | wgpu-matrix
-
- -
-
-
-
- -

Function lerp

-
-
    - -
  • -

    Performs linear interpolation on two vectors. -Given vectors a and b and interpolation coefficient t, returns -a + t * (b - a).

    - -

    Returns

    The linear interpolated result.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec4
      -

      Operand vector.

      -
    • -
    • -
      b: Vec4
      -

      Operand vector.

      -
    • -
    • -
      t: number
      -

      Interpolation coefficient.

      -
    • -
    • -
      Optional dst: Vec4
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.lerpV.html b/docs/functions/vec4.lerpV.html deleted file mode 100644 index b6ffcdb..0000000 --- a/docs/functions/vec4.lerpV.html +++ /dev/null @@ -1,124 +0,0 @@ -lerpV | wgpu-matrix
-
- -
-
-
-
- -

Function lerpV

-
-
    - -
  • -

    Performs linear interpolation on two vectors. -Given vectors a and b and interpolation coefficient vector t, returns -a + t * (b - a).

    - -

    Returns

    the linear interpolated result.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec4
      -

      Operand vector.

      -
    • -
    • -
      b: Vec4
      -

      Operand vector.

      -
    • -
    • -
      t: Vec4
      -

      Interpolation coefficients vector.

      -
    • -
    • -
      Optional dst: Vec4
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.max.html b/docs/functions/vec4.max.html deleted file mode 100644 index 87b6eb5..0000000 --- a/docs/functions/vec4.max.html +++ /dev/null @@ -1,120 +0,0 @@ -max | wgpu-matrix
-
- -
-
-
-
- -

Function max

-
-
    - -
  • -

    Return max values of two vectors. -Given vectors a and b returns -[max(a[0], b[0]), max(a[1], b[1]), max(a[2], b[2])].

    - -

    Returns

    The max components vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec4
      -

      Operand vector.

      -
    • -
    • -
      b: Vec4
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec4
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.min.html b/docs/functions/vec4.min.html deleted file mode 100644 index 5c65a8f..0000000 --- a/docs/functions/vec4.min.html +++ /dev/null @@ -1,120 +0,0 @@ -min | wgpu-matrix
-
- -
-
-
-
- -

Function min

-
-
    - -
  • -

    Return min values of two vectors. -Given vectors a and b returns -[min(a[0], b[0]), min(a[1], b[1]), min(a[2], b[2])].

    - -

    Returns

    The min components vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec4
      -

      Operand vector.

      -
    • -
    • -
      b: Vec4
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec4
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.mul.html b/docs/functions/vec4.mul.html deleted file mode 100644 index 7843b31..0000000 --- a/docs/functions/vec4.mul.html +++ /dev/null @@ -1,119 +0,0 @@ -mul | wgpu-matrix
-
- -
-
-
-
- -

Function mul

-
-
    - -
  • -

    Multiplies a vector by another vector (component-wise); assumes a and -b have the same length. (same as mul)

    - -

    Returns

    The vector of products of entries of a and b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec4
      -

      Operand vector.

      -
    • -
    • -
      b: Vec4
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec4
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.mulScalar.html b/docs/functions/vec4.mulScalar.html deleted file mode 100644 index 5dda10d..0000000 --- a/docs/functions/vec4.mulScalar.html +++ /dev/null @@ -1,118 +0,0 @@ -mulScalar | wgpu-matrix
-
- -
-
-
-
- -

Function mulScalar

-
-
    - -
  • -

    Multiplies a vector by a scalar.

    - -

    Returns

    The scaled vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec4
      -

      The vector.

      -
    • -
    • -
      k: number
      -

      The scalar.

      -
    • -
    • -
      Optional dst: Vec4
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.multiply.html b/docs/functions/vec4.multiply.html deleted file mode 100644 index 8969b53..0000000 --- a/docs/functions/vec4.multiply.html +++ /dev/null @@ -1,119 +0,0 @@ -multiply | wgpu-matrix
-
- -
-
-
-
- -

Function multiply

-
-
    - -
  • -

    Multiplies a vector by another vector (component-wise); assumes a and -b have the same length.

    - -

    Returns

    The vector of products of entries of a and b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec4
      -

      Operand vector.

      -
    • -
    • -
      b: Vec4
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec4
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.negate.html b/docs/functions/vec4.negate.html deleted file mode 100644 index c826ba2..0000000 --- a/docs/functions/vec4.negate.html +++ /dev/null @@ -1,114 +0,0 @@ -negate | wgpu-matrix
-
- -
-
-
-
- -

Function negate

-
-
    - -
  • -

    Negates a vector.

    - -

    Returns

    -v.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec4
      -

      The vector.

      -
    • -
    • -
      Optional dst: Vec4
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.normalize.html b/docs/functions/vec4.normalize.html deleted file mode 100644 index 0eacf66..0000000 --- a/docs/functions/vec4.normalize.html +++ /dev/null @@ -1,114 +0,0 @@ -normalize | wgpu-matrix
-
- -
-
-
-
- -

Function normalize

-
-
    - -
  • -

    Divides a vector by its Euclidean length and returns the quotient.

    - -

    Returns

    The normalized vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec4
      -

      The vector.

      -
    • -
    • -
      Optional dst: Vec4
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.round.html b/docs/functions/vec4.round.html deleted file mode 100644 index 76e5935..0000000 --- a/docs/functions/vec4.round.html +++ /dev/null @@ -1,114 +0,0 @@ -round | wgpu-matrix
-
- -
-
-
-
- -

Function round

-
-
    - -
  • -

    Applies Math.round to each element of vector

    - -

    Returns

    A vector that is the round of each element of v.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec4
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec4
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.scale.html b/docs/functions/vec4.scale.html deleted file mode 100644 index 095bf9e..0000000 --- a/docs/functions/vec4.scale.html +++ /dev/null @@ -1,118 +0,0 @@ -scale | wgpu-matrix
-
- -
-
-
-
- -

Function scale

-
-
    - -
  • -

    Multiplies a vector by a scalar. (same as mulScalar)

    - -

    Returns

    The scaled vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec4
      -

      The vector.

      -
    • -
    • -
      k: number
      -

      The scalar.

      -
    • -
    • -
      Optional dst: Vec4
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.set.html b/docs/functions/vec4.set.html deleted file mode 100644 index 291d469..0000000 --- a/docs/functions/vec4.set.html +++ /dev/null @@ -1,127 +0,0 @@ -set | wgpu-matrix
-
- -
-
-
-
- -

Function set

-
-
    - -
  • -

    Sets the values of a Vec4 -Also see create and copy

    - -

    Returns

    A vector with its elements set.

    -
    -
    -

    Parameters

    -
      -
    • -
      x: number
      -

      first value

      -
    • -
    • -
      y: number
      -

      second value

      -
    • -
    • -
      z: number
      -

      third value

      -
    • -
    • -
      w: number
      -

      fourth value

      -
    • -
    • -
      Optional dst: Vec4
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.setDefaultType.html b/docs/functions/vec4.setDefaultType.html deleted file mode 100644 index aac3ef1..0000000 --- a/docs/functions/vec4.setDefaultType.html +++ /dev/null @@ -1,146 +0,0 @@ -setDefaultType | wgpu-matrix
-
- -
-
-
-
- -

Function setDefaultType

-
-
    - -
  • -

    Sets the type this library creates for a Vec4

    - -

    Returns

    previous constructor for Vec4

    -
    -
    -

    Parameters

    -
      -
    • -
      ctor: (new (n: number) => Vec4)
      -

      the constructor for the type. Either Float32Array, Float64Array, or Array

      -
      -
        -
      • -
          -
        • new (n: number): Vec4
        • -
        • -
          -

          Parameters

          -
            -
          • -
            n: number
          -

          Returns Vec4

    -

    Returns (new (n: number) => Vec4)

    -
      -
    • -
        -
      • new (n: number): Vec4
      • -
      • -

        Vec4 math functions.

        -

        Almost all functions take an optional dst argument. If it is not passed in the -functions will create a new Vec4. In other words you can do this

        -
        const v = vec4.cross(v1, v2);  // Creates a new Vec4 with the cross product of v1 x v2.
        -
        -

        or

        -
        const v = vec4.create();
        vec4.cross(v1, v2, v); // Puts the cross product of v1 x v2 in v -
        -

        The first style is often easier but depending on where it's used it generates garbage where -as there is almost never allocation with the second style.

        -

        It is always safe to pass any vector as the destination. So for example

        -
        vec4.cross(v1, v2, v1);  // Puts the cross product of v1 x v2 in v1
        -
        -
        -
        -

        Parameters

        -
          -
        • -
          n: number
        -

        Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.sub.html b/docs/functions/vec4.sub.html deleted file mode 100644 index aea4822..0000000 --- a/docs/functions/vec4.sub.html +++ /dev/null @@ -1,118 +0,0 @@ -sub | wgpu-matrix
-
- -
-
-
-
- -

Function sub

-
-
    - -
  • -

    Subtracts two vectors.

    - -

    Returns

    A vector that is the difference of a and b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec4
      -

      Operand vector.

      -
    • -
    • -
      b: Vec4
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec4
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.subtract.html b/docs/functions/vec4.subtract.html deleted file mode 100644 index c145bb3..0000000 --- a/docs/functions/vec4.subtract.html +++ /dev/null @@ -1,118 +0,0 @@ -subtract | wgpu-matrix
-
- -
-
-
-
- -

Function subtract

-
-
    - -
  • -

    Subtracts two vectors.

    - -

    Returns

    A vector that is the difference of a and b.

    -
    -
    -

    Parameters

    -
      -
    • -
      a: Vec4
      -

      Operand vector.

      -
    • -
    • -
      b: Vec4
      -

      Operand vector.

      -
    • -
    • -
      Optional dst: Vec4
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.transformMat4.html b/docs/functions/vec4.transformMat4.html deleted file mode 100644 index 083c740..0000000 --- a/docs/functions/vec4.transformMat4.html +++ /dev/null @@ -1,118 +0,0 @@ -transformMat4 | wgpu-matrix
-
- -
-
-
-
- -

Function transformMat4

-
-
    - -
  • -

    transform vec4 by 4x4 matrix

    - -

    Returns

    the transformed vector

    -
    -
    -

    Parameters

    -
      -
    • -
      v: Vec4
      -

      the vector

      -
    • -
    • -
      m: Mat4
      -

      The matrix.

      -
    • -
    • -
      Optional dst: Vec4
      -

      optional vec4 to store result. If not passed a new one is created.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/vec4.zero.html b/docs/functions/vec4.zero.html deleted file mode 100644 index c1d6883..0000000 --- a/docs/functions/vec4.zero.html +++ /dev/null @@ -1,110 +0,0 @@ -zero | wgpu-matrix
-
- -
-
-
-
- -

Function zero

-
-
    - -
  • -

    Zero's a vector

    - -

    Returns

    The zeroed vector.

    -
    -
    -

    Parameters

    -
      -
    • -
      Optional dst: Vec4
      -

      vector to hold result. If not passed in a new one is created.

      -
    -

    Returns Vec4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 4227bc7..0000000 --- a/docs/index.html +++ /dev/null @@ -1,217 +0,0 @@ -wgpu-matrix
-
- -
-
-
-
-

wgpu-matrix

-
- -

wgpu-matrix

-
-

NPM Package

-

Fast 3d math library for webgpu

- - - -

Why another 3d math library?

-
-
    -
  • Most other 3D math libraries are designed for WebGL, not WebGPU
      -
    • WebGPU uses clip space Z 0 to 1, vs WebGL -1 to 1. So ortho, perspective, frustum are different
    • -
    • WebGPU mat3s are 12 floats (padded), WebGL they're 9.
    • -
    -
  • -
  • Many other 3D math libraries are overly verbose
      -
    • compare

      -
      // wgpu-matrix
      const t = mat4.translation([x, y, z]);
      const p = mat4.perspective(fov, aspect, near, far);
      const r = mat4.rotationX(rad); -
      -
      // gl-matrix
      const t = mat4.create();
      mat4.fromTranslation(t, [x, y, z]);

      const p = mat4.create();
      mat4.perspective(p, fov, aspect, near, far);

      const r = mat4.create();
      mat4.fromXRotation(r, rad); -
      -

      note that if you want to pre-create matrices you can still do this in wgpu-matrix

      -
      const t = mat4.create();
      mat4.translation([x, y, z], t);

      const p = mat4.create();
      mat4.perspective(fov, aspect, near, far, p);

      const r = mat4.create();
      mat4.rotationX(rad, r); -
      -
    • -
    -
  • -
- - -

Usage

-
-
import {
vec3,
mat4,
} from 'https://wgpu-matrix.org/dist/2.x/wgpu-matrix.module.js';

const fov = 60 * Math.PI / 180
const aspect = width / height;
const near = 0.1;
const far = 1000;
const perspective = mat4.perspective(fov, aspect, near, far);

const eye = [3, 5, 10];
const target = [0, 4, 0];
const up = [0, 1, 0];
const view = mat4.lookAt(eye, target, up); -
-

Note: for translation, rotation, and scaling there are 2 versions -of each function. One generates a translation, rotation, or scaling matrix. -The other translates, rotates, or scales a matrix.

-
const t = mat4.translation([1, 2, 3]);    // a translation matrix
const r = mat4.rotationX(Math.PI * 0.5); // a rotation matrix
const s = mat4.scaling([1, 2, 3]); // a scaling matrix -
-
const m = mat4.identity();
const t = mat4.translate(m, [1, 2, 3]); // m * translation([1, 2, 3])
const r = mat4.rotateX(m, Math.PI * 0.5); // m * rotationX(Math.PI * 0.5)
const s = mat4.scale(m, [1, 2, 3]); // m * scaling([1, 2, 3]) -
-

Functions take an optional destination to hold the result.

-
const m = mat4.create();            // m = new mat4
mat4.identity(m); // m = identity
mat4.translate(m, [1, 2, 3], m); // m *= translation([1, 2, 3])
mat4.rotateX(m, Math.PI * 0.5, m); // m *= rotationX(Math.PI * 0.5)
mat4.scale(m, [1, 2, 3], m); // m *= scaling([1, 2, 3]) -
-

There is also the minified version

-
import {
vec3,
mat4,
} from 'https://wgpu-matrix.org/dist/2.x/wgpu-matrix.module.min.js';

// ... etc ... -
-

or via npm

-
npm install --save wgpu-matrix
-
-

then using a build process

-
import {vec3, mat3} from 'wgpu-matrix';

// ... etc ... -
-

Example

- - -

Download

-
- - - -

Notes

-
-

mat4.perspective, -mat4.ortho, and -mat4.frustum -all return matrices with Z clip space from 0 to 1 (unlike most WebGL matrix libraries which return -1 to 1)

-

mat4.create makes an all zero matrix if passed no parameters. -If you want an identity matrix call mat4.identity

- - -

Important!

-
-

mat3 uses the space of 12 elements

-
// a mat3
[
xx, xy, xz, ?
yx, yy, yz, ?
zx, zy, zz, ?
] -
-

This is because WebGPU requires mat3s to be in this format and since -this library is for WebGPU it makes sense to match so you can manipulate -mat3s in TypeArrays directly.

-

vec3 in this library uses 3 floats per but be aware that an array of -vec3 in a Uniform Block or other structure in WGSL, each vec3 is -padded to 4 floats! In other words, if you declare

-
struct Foo {
bar: vec3<f32>[3];
}; -
-

then bar[0] is at byte offset 0, bar[1] at byte offset 16, bar[2] at byte offset 32.

-

See the WGSL spec on alignment and size.

- - -

Columns vs Rows

-
-

WebGPU follows the same conventions as OpenGL, Vulkan, Metal for matrices. Some people call this "column major". The issue is the columns of -a traditional "math" matrix are stored as rows when declaring a matrix in code.

-
[
x1, x2, x3, x4, // <- column 0
y1, y2, y3, y4, // <- column 1
z1, z2, z3, z4, // <- column 2
w1, w2, w3, w4, // <- column 3
] -
-

To put it another way, the translation vector is in elements 12, 13, 14

-
[
xx, xy, xz, 0, // <- x-axis
yx, yy, yz, 0, // <- y-axis
zx, zy, zz, 0, // <- z-axis
tx, ty, tz, 1, // <- translation
] -
-

This issue has confused programmers since at least the early 90s 😌

- - -

Performance vs Convenience

-
-

Most functions take an optional destination as the last argument. -If you don't supply it, a new one (vector, matrix) will be created -for you.

-
// convenient usage

const persp = mat4.perspective(fov, aspect, near, far);
const camera = mat4.lookAt(eye, target, up);
const view = mat4.inverse(camera); -
-
// performant usage

// at init time
const persp = mat4.create();
const camera = mat4.create();
const view = mat4.create();

// at usage time
mat4.perspective(fov, aspect, near, far, persp);
mat4.lookAt(eye, target, up, camera);
mat4.inverse(camera, view); -
-

For me, most of the stuff I do in WebGPU, the supposed performance I might lose -from using the convenient style is so small as to be unmeasurable. I'd prefer to -stay convenient and then, if and only if I find a performance issue, then I -might bother to switch to the performant style.

-

As the saying goes premature optimization is the root of all evil. 😉

- - -

Migration

-
- - -

1.x -> 2.x

-
-
    -
  • mat4.lookAt -changed from a "camera matrix" to a "view matrix" (same as gluLookAt). -If you want a matrix that orients an something in world space see -mat4.aim. -Sorry about this change but people are used to lookAt making a a view matrix -and it seemed prudent to make this change now and save more people from -frustration going forward.
  • -
- - -

Development

-
-
git clone https://github.com/greggman/wgpu-matrix.git
cd wgpu-matrix
npm i
npm run build
npm test -
-

You can run tests in the browser by starting a local server

-
npx servez
-
-

Now go to wherever your server serves pages. In the case of servez that's -probably http://localhost:8080/test/.

-

By default the tests test the minified version. To test the source use src=true -as in http://localhost:8080/test/?src=true.

-

To limit which tests are run use grep=<regex>. For example -http://localhost:8080/test/?src=true&grep=mat3.*?translate -runs only tests with mat3 followed by translate in the name of test.

- - -

License

-
-

MIT

-
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/modules.html b/docs/modules.html deleted file mode 100644 index 58e6754..0000000 --- a/docs/modules.html +++ /dev/null @@ -1,80 +0,0 @@ -wgpu-matrix
-
- -
-
-
-
-

wgpu-matrix

-
-
-

Index

-
-

Namespaces

-
-
-

Type Aliases

-
-
-

Functions

-
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/modules/mat3.html b/docs/modules/mat3.html deleted file mode 100644 index b6c700d..0000000 --- a/docs/modules/mat3.html +++ /dev/null @@ -1,132 +0,0 @@ -mat3 | wgpu-matrix
-
- -
-
-
-
- -

Namespace mat3

-
-
-
- -
-
-

References

-
-Renames and re-exports Mat3
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/modules/mat4.html b/docs/modules/mat4.html deleted file mode 100644 index 51859a0..0000000 --- a/docs/modules/mat4.html +++ /dev/null @@ -1,160 +0,0 @@ -mat4 | wgpu-matrix
-
- -
- -
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/modules/quat.html b/docs/modules/quat.html deleted file mode 100644 index 8a9d48c..0000000 --- a/docs/modules/quat.html +++ /dev/null @@ -1,146 +0,0 @@ -quat | wgpu-matrix
-
- -
-
-
-
- -

Namespace quat

-
-
-
- -
-
-

References

-
-Renames and re-exports Quat
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/modules/utils.html b/docs/modules/utils.html deleted file mode 100644 index 5ccf636..0000000 --- a/docs/modules/utils.html +++ /dev/null @@ -1,73 +0,0 @@ -utils | wgpu-matrix
-
- -
-
-
-
- -

Namespace utils

-
-
-

Index

-
-

Variables

-
-
-

Functions

-
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/modules/vec2.html b/docs/modules/vec2.html deleted file mode 100644 index e5c722f..0000000 --- a/docs/modules/vec2.html +++ /dev/null @@ -1,159 +0,0 @@ -vec2 | wgpu-matrix
-
- -
-
- -
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/modules/vec3.html b/docs/modules/vec3.html deleted file mode 100644 index a3f309d..0000000 --- a/docs/modules/vec3.html +++ /dev/null @@ -1,169 +0,0 @@ -vec3 | wgpu-matrix
-
- -
- -
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/modules/vec4.html b/docs/modules/vec4.html deleted file mode 100644 index d0d9de6..0000000 --- a/docs/modules/vec4.html +++ /dev/null @@ -1,151 +0,0 @@ -vec4 | wgpu-matrix
-
- -
-
-
-
- -

Namespace vec4

-
-
-
- -
-
-

References

-
-Renames and re-exports Vec4
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/types/Mat3-1.html b/docs/types/Mat3-1.html deleted file mode 100644 index 2ceb9f0..0000000 --- a/docs/types/Mat3-1.html +++ /dev/null @@ -1,62 +0,0 @@ -Mat3 | wgpu-matrix
-
- -
-
-
-
- -

Type alias Mat3

-
Mat3: number[] | Float32Array | Float64Array
-

A JavaScript array with 12 values, a Float32Array with 12 values, or a Float64Array with 12 values. -When created by the library will create the default type which is Float32Array -but can be set by calling setDefaultType.

-
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/types/Mat4-1.html b/docs/types/Mat4-1.html deleted file mode 100644 index 35844c6..0000000 --- a/docs/types/Mat4-1.html +++ /dev/null @@ -1,62 +0,0 @@ -Mat4 | wgpu-matrix
-
- -
-
-
-
- -

Type alias Mat4

-
Mat4: number[] | Float32Array | Float64Array
-

A JavaScript array with 16 values, a Float32Array with 16 values, or a Float64Array with 16 values. -When created by the library will create the default type which is Float32Array -but can be set by calling setDefaultType.

-
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/types/Quat-1.html b/docs/types/Quat-1.html deleted file mode 100644 index f39a994..0000000 --- a/docs/types/Quat-1.html +++ /dev/null @@ -1,62 +0,0 @@ -Quat | wgpu-matrix
-
- -
-
-
-
- -

Type alias Quat

-
Quat: number[] | Float32Array | Float64Array
-

A JavaScript array with 4 values, Float32Array with 4 values, or a Float64Array with 4 values. -When created by the library will create the default type which is Float32Array -but can be set by calling setDefaultType.

-
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/types/Vec2-1.html b/docs/types/Vec2-1.html deleted file mode 100644 index 45bf401..0000000 --- a/docs/types/Vec2-1.html +++ /dev/null @@ -1,62 +0,0 @@ -Vec2 | wgpu-matrix
-
- -
-
-
-
- -

Type alias Vec2

-
Vec2: number[] | Float32Array | Float64Array
-

A JavaScript array with 2 values, Float32Array with 2 values, or a Float64Array with 2 values. -When created by the library will create the default type which is Float32Array -but can be set by calling setDefaultType.

-
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/types/Vec3-1.html b/docs/types/Vec3-1.html deleted file mode 100644 index 7a10912..0000000 --- a/docs/types/Vec3-1.html +++ /dev/null @@ -1,62 +0,0 @@ -Vec3 | wgpu-matrix
-
- -
-
-
-
- -

Type alias Vec3

-
Vec3: number[] | Float32Array | Float64Array
-

A JavaScript array with 3 values, Float32Array with 3 values, or a Float64Array with 3 values. -When created by the library will create the default type which is Float32Array -but can be set by calling setDefaultType.

-
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/types/Vec4-1.html b/docs/types/Vec4-1.html deleted file mode 100644 index 8652c39..0000000 --- a/docs/types/Vec4-1.html +++ /dev/null @@ -1,62 +0,0 @@ -Vec4 | wgpu-matrix
-
- -
-
-
-
- -

Type alias Vec4

-
Vec4: number[] | Float32Array | Float64Array
-

A JavaScript array with 4 values, Float32Array with 4 values, or a Float64Array with 4 values. -When created by the library will create the default type which is Float32Array -but can be set by calling setDefaultType.

-
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/types/mat3.Mat3LikeCtor.html b/docs/types/mat3.Mat3LikeCtor.html deleted file mode 100644 index 0131f8c..0000000 --- a/docs/types/mat3.Mat3LikeCtor.html +++ /dev/null @@ -1,97 +0,0 @@ -Mat3LikeCtor | wgpu-matrix
-
- -
-
-
-
- -

Type alias Mat3LikeCtor

-
Mat3LikeCtor: (new (n: number) => Mat3)
-
-

Type declaration

-
    -
  • -
      -
    • new (n: number): Mat3
    • -
    • -
      -

      Parameters

      -
        -
      • -
        n: number
      -

      Returns Mat3

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/types/mat4.Mat4LikeCtor.html b/docs/types/mat4.Mat4LikeCtor.html deleted file mode 100644 index 13abbc7..0000000 --- a/docs/types/mat4.Mat4LikeCtor.html +++ /dev/null @@ -1,111 +0,0 @@ -Mat4LikeCtor | wgpu-matrix
-
- -
-
-
-
- -

Type alias Mat4LikeCtor

-
Mat4LikeCtor: (new (n: number) => Mat4)
-
-

Type declaration

-
    -
  • -
      -
    • new (n: number): Mat4
    • -
    • -
      -

      Parameters

      -
        -
      • -
        n: number
      -

      Returns Mat4

-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/types/quat.RotationOrder.html b/docs/types/quat.RotationOrder.html deleted file mode 100644 index 8fc6dd2..0000000 --- a/docs/types/quat.RotationOrder.html +++ /dev/null @@ -1,91 +0,0 @@ -RotationOrder | wgpu-matrix
-
- -
-
-
-
- -

Type alias RotationOrder

-
RotationOrder: "xyz" | "xzy" | "yxz" | "yzx" | "zxy" | "zyx"
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/variables/utils.EPSILON.html b/docs/variables/utils.EPSILON.html deleted file mode 100644 index 5128524..0000000 --- a/docs/variables/utils.EPSILON.html +++ /dev/null @@ -1,59 +0,0 @@ -EPSILON | wgpu-matrix
-
- -
-
-
-
- -

Variable EPSILON

-
EPSILON: number = 0.000001
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 6d778de..98c6783 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,6 +22,7 @@ "google-closure-compiler": "^20230228.0.0", "mocha": "^10.2.0", "rollup": "^3.21.7", + "showdown": "^2.1.0", "tslib": "^2.5.0", "typedoc": "^0.24.7", "typescript": "^5.0.4" @@ -778,6 +779,15 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "node_modules/commander": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", + "dev": true, + "engines": { + "node": "^12.20.0 || >=14" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -947,18 +957,6 @@ "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" } }, - "node_modules/dom-serializer/node_modules/entities": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", - "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==", - "dev": true, - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, "node_modules/domelementtype": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", @@ -1021,6 +1019,18 @@ "node": ">= 0.8" } }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true, + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -1770,18 +1780,6 @@ "entities": "^4.3.0" } }, - "node_modules/htmlparser2/node_modules/entities": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", - "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==", - "dev": true, - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -2884,6 +2882,22 @@ "vscode-textmate": "^8.0.0" } }, + "node_modules/showdown": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/showdown/-/showdown-2.1.0.tgz", + "integrity": "sha512-/6NVYu4U819R2pUIk79n67SYgJHWCce0a5xTP979WbNp0FL9MN1I1QK662IDU1b6JzKTvmhgI7T7JYIxBi3kMQ==", + "dev": true, + "dependencies": { + "commander": "^9.0.0" + }, + "bin": { + "showdown": "bin/showdown.js" + }, + "funding": { + "type": "individual", + "url": "https://www.paypal.me/tiviesantos" + } + }, "node_modules/side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -3873,6 +3887,12 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "commander": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", + "dev": true + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -3997,14 +4017,6 @@ "domelementtype": "^2.3.0", "domhandler": "^5.0.2", "entities": "^4.2.0" - }, - "dependencies": { - "entities": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", - "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==", - "dev": true - } } }, "domelementtype": { @@ -4051,6 +4063,12 @@ "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", "dev": true }, + "entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true + }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -4617,14 +4635,6 @@ "domhandler": "^5.0.2", "domutils": "^3.0.1", "entities": "^4.3.0" - }, - "dependencies": { - "entities": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", - "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==", - "dev": true - } } }, "http-errors": { @@ -5437,6 +5447,15 @@ "vscode-textmate": "^8.0.0" } }, + "showdown": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/showdown/-/showdown-2.1.0.tgz", + "integrity": "sha512-/6NVYu4U819R2pUIk79n67SYgJHWCce0a5xTP979WbNp0FL9MN1I1QK662IDU1b6JzKTvmhgI7T7JYIxBi3kMQ==", + "dev": true, + "requires": { + "commander": "^9.0.0" + } + }, "side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", diff --git a/package.json b/package.json index a3cd276..7cc1a90 100644 --- a/package.json +++ b/package.json @@ -13,11 +13,13 @@ "scripts": { "build": "npm run build-min", "build-normal": "rollup -c && tsc --emitDeclarationOnly --declaration", - "build-min": "npm run build-normal && google-closure-compiler --warning_level=VERBOSE --jscomp_off=globalThis --jscomp_off=checkTypes --externs build/externs.js --language_in=ECMASCRIPT_2019 --language_out=ECMASCRIPT_2019 --js dist/2.x/wgpu-matrix.js --js_output_file dist/2.x/wgpu-matrix.min.js && node ./build/append-banner.js dist/2.x/wgpu-matrix.min.js", + "build-min": "npm run build-normal && google-closure-compiler --warning_level=VERBOSE --jscomp_off=globalThis --jscomp_off=checkTypes --externs build/externs.js --language_in=ECMASCRIPT_2019 --language_out=ECMASCRIPT_2019 --js dist/2.x/wgpu-matrix.js --js_output_file dist/2.x/wgpu-matrix.min.js && node ./build/tools/append-banner.js dist/2.x/wgpu-matrix.min.js", + "build-ci": "npm run pre-push && npm build/tools/prep-for-deploy.js", "check": "npm run lint", "check-ci": "npm run pre-push", "docs": "typedoc --disableSources src/wgpu-matrix.ts", "lint": "eslint \"src/**/*.{js,ts,tsx}\"", + "makeindex": "node build/tools/makeindex.js", "pre-push": "npm run lint && npm run build && npm run test && npm run docs", "rollup-watch": "rollup -c -w", "start": "rollup -c rollup.config.js -w", @@ -59,6 +61,7 @@ "google-closure-compiler": "^20230228.0.0", "mocha": "^10.2.0", "rollup": "^3.21.7", + "showdown": "^2.1.0", "tslib": "^2.5.0", "typedoc": "^0.24.7", "typescript": "^5.0.4" diff --git a/resources/3rdparty/prettify.js b/resources/3rdparty/prettify.js new file mode 100644 index 0000000..de713a4 --- /dev/null +++ b/resources/3rdparty/prettify.js @@ -0,0 +1,1713 @@ +// Copyright (C) 2006 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +/** + * @fileoverview + * some functions for browser-side pretty printing of code contained in html. + * + *

+ * For a fairly comprehensive set of languages see the + * README + * file that came with this source. At a minimum, the lexer should work on a + * number of languages including C and friends, Java, Python, Bash, SQL, HTML, + * XML, CSS, Javascript, and Makefiles. It works passably on Ruby, PHP and Awk + * and a subset of Perl, but, because of commenting conventions, doesn't work on + * Smalltalk, Lisp-like, or CAML-like languages without an explicit lang class. + *

+ * Usage:

    + *
  1. include this source file in an html page via + * {@code } + *
  2. define style rules. See the example page for examples. + *
  3. mark the {@code
    } and {@code } tags in your source with
    + *    {@code class=prettyprint.}
    + *    You can also use the (html deprecated) {@code } tag, but the pretty
    + *    printer needs to do more substantial DOM manipulations to support that, so
    + *    some css styles may not be preserved.
    + * </ol>
    + * That's it.  I wanted to keep the API as simple as possible, so there's no
    + * need to specify which language the code is in, but if you wish, you can add
    + * another class to the {@code <pre>} or {@code <code>} element to specify the
    + * language, as in {@code <pre class="prettyprint lang-java">}.  Any class that
    + * starts with "lang-" followed by a file extension, specifies the file type.
    + * See the "lang-*.js" files in this directory for code that implements
    + * per-language file handlers.
    + * <p>
    + * Change log:<br>
    + * cbeust, 2006/08/22
    + * <blockquote>
    + *   Java annotations (start with "@") are now captured as literals ("lit")
    + * </blockquote>
    + * @requires console
    + */
    +
    +// JSLint declarations
    +/*global console, document, navigator, setTimeout, window, define */
    +
    +/** @define {boolean} */
    +var IN_GLOBAL_SCOPE = true;
    +
    +/**
    + * Split {@code prettyPrint} into multiple timeouts so as not to interfere with
    + * UI events.
    + * If set to {@code false}, {@code prettyPrint()} is synchronous.
    + */
    +window['PR_SHOULD_USE_CONTINUATION'] = true;
    +
    +/**
    + * Pretty print a chunk of code.
    + * @param {string} sourceCodeHtml The HTML to pretty print.
    + * @param {string} opt_langExtension The language name to use.
    + *     Typically, a filename extension like 'cpp' or 'java'.
    + * @param {number|boolean} opt_numberLines True to number lines,
    + *     or the 1-indexed number of the first line in sourceCodeHtml.
    + * @return {string} code as html, but prettier
    + */
    +var prettyPrintOne;
    +/**
    + * Find all the {@code <pre>} and {@code <code>} tags in the DOM with
    + * {@code class=prettyprint} and prettify them.
    + *
    + * @param {Function} opt_whenDone called when prettifying is done.
    + * @param {HTMLElement|HTMLDocument} opt_root an element or document
    + *   containing all the elements to pretty print.
    + *   Defaults to {@code document.body}.
    + */
    +var prettyPrint;
    +
    +
    +(function () {
    +  var win = window;
    +  // Keyword lists for various languages.
    +  // We use things that coerce to strings to make them compact when minified
    +  // and to defeat aggressive optimizers that fold large string constants.
    +  var FLOW_CONTROL_KEYWORDS = ["break,continue,do,else,for,if,return,while"];
    +  var C_KEYWORDS = [FLOW_CONTROL_KEYWORDS,"auto,case,char,const,default," + 
    +      "double,enum,extern,float,goto,inline,int,long,register,short,signed," +
    +      "sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];
    +  var COMMON_KEYWORDS = [C_KEYWORDS,"catch,class,delete,false,import," +
    +      "new,operator,private,protected,public,this,throw,true,try,typeof"];
    +  var CPP_KEYWORDS = [COMMON_KEYWORDS,"alignof,align_union,asm,axiom,bool," +
    +      "concept,concept_map,const_cast,constexpr,decltype,delegate," +
    +      "dynamic_cast,explicit,export,friend,generic,late_check," +
    +      "mutable,namespace,nullptr,property,reinterpret_cast,static_assert," +
    +      "static_cast,template,typeid,typename,using,virtual,where"];
    +  var JAVA_KEYWORDS = [COMMON_KEYWORDS,
    +      "abstract,assert,boolean,byte,extends,final,finally,implements,import," +
    +      "instanceof,interface,null,native,package,strictfp,super,synchronized," +
    +      "throws,transient"];
    +  var CSHARP_KEYWORDS = [COMMON_KEYWORDS,
    +      "abstract,as,base,bool,by,byte,checked,decimal,delegate,descending," +
    +      "dynamic,event,finally,fixed,foreach,from,group,implicit,in,interface," +
    +      "internal,into,is,let,lock,null,object,out,override,orderby,params," +
    +      "partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong," +
    +      "unchecked,unsafe,ushort,var,virtual,where"];
    +  var COFFEE_KEYWORDS = "all,and,by,catch,class,else,extends,false,finally," +
    +      "for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then," +
    +      "throw,true,try,unless,until,when,while,yes";
    +  var JSCRIPT_KEYWORDS = [COMMON_KEYWORDS,
    +      "debugger,eval,export,function,get,null,set,undefined,var,with," +
    +      "Infinity,NaN"];
    +  var PERL_KEYWORDS = "caller,delete,die,do,dump,elsif,eval,exit,foreach,for," +
    +      "goto,if,import,last,local,my,next,no,our,print,package,redo,require," +
    +      "sub,undef,unless,until,use,wantarray,while,BEGIN,END";
    +  var PYTHON_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "and,as,assert,class,def,del," +
    +      "elif,except,exec,finally,from,global,import,in,is,lambda," +
    +      "nonlocal,not,or,pass,print,raise,try,with,yield," +
    +      "False,True,None"];
    +  var RUBY_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "alias,and,begin,case,class," +
    +      "def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo," +
    +      "rescue,retry,self,super,then,true,undef,unless,until,when,yield," +
    +      "BEGIN,END"];
    +   var RUST_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "as,assert,const,copy,drop," +
    +      "enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv," +
    +      "pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"];
    +  var SH_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "case,done,elif,esac,eval,fi," +
    +      "function,in,local,set,then,until"];
    +  var ALL_KEYWORDS = [
    +      CPP_KEYWORDS, CSHARP_KEYWORDS, JSCRIPT_KEYWORDS, PERL_KEYWORDS,
    +      PYTHON_KEYWORDS, RUBY_KEYWORDS, SH_KEYWORDS];
    +  var C_TYPES = /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/;
    +
    +  // token style names.  correspond to css classes
    +  /**
    +   * token style for a string literal
    +   * @const
    +   */
    +  var PR_STRING = 'str';
    +  /**
    +   * token style for a keyword
    +   * @const
    +   */
    +  var PR_KEYWORD = 'kwd';
    +  /**
    +   * token style for a comment
    +   * @const
    +   */
    +  var PR_COMMENT = 'com';
    +  /**
    +   * token style for a type
    +   * @const
    +   */
    +  var PR_TYPE = 'typ';
    +  /**
    +   * token style for a literal value.  e.g. 1, null, true.
    +   * @const
    +   */
    +  var PR_LITERAL = 'lit';
    +  /**
    +   * token style for a punctuation string.
    +   * @const
    +   */
    +  var PR_PUNCTUATION = 'pun';
    +  /**
    +   * token style for plain text.
    +   * @const
    +   */
    +  var PR_PLAIN = 'pln';
    +
    +  /**
    +   * token style for an sgml tag.
    +   * @const
    +   */
    +  var PR_TAG = 'tag';
    +  /**
    +   * token style for a markup declaration such as a DOCTYPE.
    +   * @const
    +   */
    +  var PR_DECLARATION = 'dec';
    +  /**
    +   * token style for embedded source.
    +   * @const
    +   */
    +  var PR_SOURCE = 'src';
    +  /**
    +   * token style for an sgml attribute name.
    +   * @const
    +   */
    +  var PR_ATTRIB_NAME = 'atn';
    +  /**
    +   * token style for an sgml attribute value.
    +   * @const
    +   */
    +  var PR_ATTRIB_VALUE = 'atv';
    +
    +  /**
    +   * A class that indicates a section of markup that is not code, e.g. to allow
    +   * embedding of line numbers within code listings.
    +   * @const
    +   */
    +  var PR_NOCODE = 'nocode';
    +
    +  
    +  
    +  /**
    +   * A set of tokens that can precede a regular expression literal in
    +   * javascript
    +   * http://web.archive.org/web/20070717142515/http://www.mozilla.org/js/language/js20/rationale/syntax.html
    +   * has the full list, but I've removed ones that might be problematic when
    +   * seen in languages that don't support regular expression literals.
    +   *
    +   * <p>Specifically, I've removed any keywords that can't precede a regexp
    +   * literal in a syntactically legal javascript program, and I've removed the
    +   * "in" keyword since it's not a keyword in many languages, and might be used
    +   * as a count of inches.
    +   *
    +   * <p>The link above does not accurately describe EcmaScript rules since
    +   * it fails to distinguish between (a=++/b/i) and (a++/b/i) but it works
    +   * very well in practice.
    +   *
    +   * @private
    +   * @const
    +   */
    +  var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*';
    +  
    +  // CAVEAT: this does not properly handle the case where a regular
    +  // expression immediately follows another since a regular expression may
    +  // have flags for case-sensitivity and the like.  Having regexp tokens
    +  // adjacent is not valid in any language I'm aware of, so I'm punting.
    +  // TODO: maybe style special characters inside a regexp as punctuation.
    +
    +  /**
    +   * Given a group of {@link RegExp}s, returns a {@code RegExp} that globally
    +   * matches the union of the sets of strings matched by the input RegExp.
    +   * Since it matches globally, if the input strings have a start-of-input
    +   * anchor (/^.../), it is ignored for the purposes of unioning.
    +   * @param {Array.<RegExp>} regexs non multiline, non-global regexs.
    +   * @return {RegExp} a global regex.
    +   */
    +  function combinePrefixPatterns(regexs) {
    +    var capturedGroupIndex = 0;
    +  
    +    var needToFoldCase = false;
    +    var ignoreCase = false;
    +    for (var i = 0, n = regexs.length; i < n; ++i) {
    +      var regex = regexs[i];
    +      if (regex.ignoreCase) {
    +        ignoreCase = true;
    +      } else if (/[a-z]/i.test(regex.source.replace(
    +                     /\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ''))) {
    +        needToFoldCase = true;
    +        ignoreCase = false;
    +        break;
    +      }
    +    }
    +  
    +    var escapeCharToCodeUnit = {
    +      'b': 8,
    +      't': 9,
    +      'n': 0xa,
    +      'v': 0xb,
    +      'f': 0xc,
    +      'r': 0xd
    +    };
    +  
    +    function decodeEscape(charsetPart) {
    +      var cc0 = charsetPart.charCodeAt(0);
    +      if (cc0 !== 92 /* \\ */) {
    +        return cc0;
    +      }
    +      var c1 = charsetPart.charAt(1);
    +      cc0 = escapeCharToCodeUnit[c1];
    +      if (cc0) {
    +        return cc0;
    +      } else if ('0' <= c1 && c1 <= '7') {
    +        return parseInt(charsetPart.substring(1), 8);
    +      } else if (c1 === 'u' || c1 === 'x') {
    +        return parseInt(charsetPart.substring(2), 16);
    +      } else {
    +        return charsetPart.charCodeAt(1);
    +      }
    +    }
    +  
    +    function encodeEscape(charCode) {
    +      if (charCode < 0x20) {
    +        return (charCode < 0x10 ? '\\x0' : '\\x') + charCode.toString(16);
    +      }
    +      var ch = String.fromCharCode(charCode);
    +      return (ch === '\\' || ch === '-' || ch === ']' || ch === '^')
    +          ? "\\" + ch : ch;
    +    }
    +  
    +    function caseFoldCharset(charSet) {
    +      var charsetParts = charSet.substring(1, charSet.length - 1).match(
    +          new RegExp(
    +              '\\\\u[0-9A-Fa-f]{4}'
    +              + '|\\\\x[0-9A-Fa-f]{2}'
    +              + '|\\\\[0-3][0-7]{0,2}'
    +              + '|\\\\[0-7]{1,2}'
    +              + '|\\\\[\\s\\S]'
    +              + '|-'
    +              + '|[^-\\\\]',
    +              'g'));
    +      var ranges = [];
    +      var inverse = charsetParts[0] === '^';
    +  
    +      var out = ['['];
    +      if (inverse) { out.push('^'); }
    +  
    +      for (var i = inverse ? 1 : 0, n = charsetParts.length; i < n; ++i) {
    +        var p = charsetParts[i];
    +        if (/\\[bdsw]/i.test(p)) {  // Don't muck with named groups.
    +          out.push(p);
    +        } else {
    +          var start = decodeEscape(p);
    +          var end;
    +          if (i + 2 < n && '-' === charsetParts[i + 1]) {
    +            end = decodeEscape(charsetParts[i + 2]);
    +            i += 2;
    +          } else {
    +            end = start;
    +          }
    +          ranges.push([start, end]);
    +          // If the range might intersect letters, then expand it.
    +          // This case handling is too simplistic.
    +          // It does not deal with non-latin case folding.
    +          // It works for latin source code identifiers though.
    +          if (!(end < 65 || start > 122)) {
    +            if (!(end < 65 || start > 90)) {
    +              ranges.push([Math.max(65, start) | 32, Math.min(end, 90) | 32]);
    +            }
    +            if (!(end < 97 || start > 122)) {
    +              ranges.push([Math.max(97, start) & ~32, Math.min(end, 122) & ~32]);
    +            }
    +          }
    +        }
    +      }
    +  
    +      // [[1, 10], [3, 4], [8, 12], [14, 14], [16, 16], [17, 17]]
    +      // -> [[1, 12], [14, 14], [16, 17]]
    +      ranges.sort(function (a, b) { return (a[0] - b[0]) || (b[1]  - a[1]); });
    +      var consolidatedRanges = [];
    +      var lastRange = [];
    +      for (var i = 0; i < ranges.length; ++i) {
    +        var range = ranges[i];
    +        if (range[0] <= lastRange[1] + 1) {
    +          lastRange[1] = Math.max(lastRange[1], range[1]);
    +        } else {
    +          consolidatedRanges.push(lastRange = range);
    +        }
    +      }
    +  
    +      for (var i = 0; i < consolidatedRanges.length; ++i) {
    +        var range = consolidatedRanges[i];
    +        out.push(encodeEscape(range[0]));
    +        if (range[1] > range[0]) {
    +          if (range[1] + 1 > range[0]) { out.push('-'); }
    +          out.push(encodeEscape(range[1]));
    +        }
    +      }
    +      out.push(']');
    +      return out.join('');
    +    }
    +  
    +    function allowAnywhereFoldCaseAndRenumberGroups(regex) {
    +      // Split into character sets, escape sequences, punctuation strings
    +      // like ('(', '(?:', ')', '^'), and runs of characters that do not
    +      // include any of the above.
    +      var parts = regex.source.match(
    +          new RegExp(
    +              '(?:'
    +              + '\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]'  // a character set
    +              + '|\\\\u[A-Fa-f0-9]{4}'  // a unicode escape
    +              + '|\\\\x[A-Fa-f0-9]{2}'  // a hex escape
    +              + '|\\\\[0-9]+'  // a back-reference or octal escape
    +              + '|\\\\[^ux0-9]'  // other escape sequence
    +              + '|\\(\\?[:!=]'  // start of a non-capturing group
    +              + '|[\\(\\)\\^]'  // start/end of a group, or line start
    +              + '|[^\\x5B\\x5C\\(\\)\\^]+'  // run of other characters
    +              + ')',
    +              'g'));
    +      var n = parts.length;
    +  
    +      // Maps captured group numbers to the number they will occupy in
    +      // the output or to -1 if that has not been determined, or to
    +      // undefined if they need not be capturing in the output.
    +      var capturedGroups = [];
    +  
    +      // Walk over and identify back references to build the capturedGroups
    +      // mapping.
    +      for (var i = 0, groupIndex = 0; i < n; ++i) {
    +        var p = parts[i];
    +        if (p === '(') {
    +          // groups are 1-indexed, so max group index is count of '('
    +          ++groupIndex;
    +        } else if ('\\' === p.charAt(0)) {
    +          var decimalValue = +p.substring(1);
    +          if (decimalValue) {
    +            if (decimalValue <= groupIndex) {
    +              capturedGroups[decimalValue] = -1;
    +            } else {
    +              // Replace with an unambiguous escape sequence so that
    +              // an octal escape sequence does not turn into a backreference
    +              // to a capturing group from an earlier regex.
    +              parts[i] = encodeEscape(decimalValue);
    +            }
    +          }
    +        }
    +      }
    +  
    +      // Renumber groups and reduce capturing groups to non-capturing groups
    +      // where possible.
    +      for (var i = 1; i < capturedGroups.length; ++i) {
    +        if (-1 === capturedGroups[i]) {
    +          capturedGroups[i] = ++capturedGroupIndex;
    +        }
    +      }
    +      for (var i = 0, groupIndex = 0; i < n; ++i) {
    +        var p = parts[i];
    +        if (p === '(') {
    +          ++groupIndex;
    +          if (!capturedGroups[groupIndex]) {
    +            parts[i] = '(?:';
    +          }
    +        } else if ('\\' === p.charAt(0)) {
    +          var decimalValue = +p.substring(1);
    +          if (decimalValue && decimalValue <= groupIndex) {
    +            parts[i] = '\\' + capturedGroups[decimalValue];
    +          }
    +        }
    +      }
    +  
    +      // Remove any prefix anchors so that the output will match anywhere.
    +      // ^^ really does mean an anchored match though.
    +      for (var i = 0; i < n; ++i) {
    +        if ('^' === parts[i] && '^' !== parts[i + 1]) { parts[i] = ''; }
    +      }
    +  
    +      // Expand letters to groups to handle mixing of case-sensitive and
    +      // case-insensitive patterns if necessary.
    +      if (regex.ignoreCase && needToFoldCase) {
    +        for (var i = 0; i < n; ++i) {
    +          var p = parts[i];
    +          var ch0 = p.charAt(0);
    +          if (p.length >= 2 && ch0 === '[') {
    +            parts[i] = caseFoldCharset(p);
    +          } else if (ch0 !== '\\') {
    +            // TODO: handle letters in numeric escapes.
    +            parts[i] = p.replace(
    +                /[a-zA-Z]/g,
    +                function (ch) {
    +                  var cc = ch.charCodeAt(0);
    +                  return '[' + String.fromCharCode(cc & ~32, cc | 32) + ']';
    +                });
    +          }
    +        }
    +      }
    +  
    +      return parts.join('');
    +    }
    +  
    +    var rewritten = [];
    +    for (var i = 0, n = regexs.length; i < n; ++i) {
    +      var regex = regexs[i];
    +      if (regex.global || regex.multiline) { throw new Error('' + regex); }
    +      rewritten.push(
    +          '(?:' + allowAnywhereFoldCaseAndRenumberGroups(regex) + ')');
    +    }
    +  
    +    return new RegExp(rewritten.join('|'), ignoreCase ? 'gi' : 'g');
    +  }
    +
    +  /**
    +   * Split markup into a string of source code and an array mapping ranges in
    +   * that string to the text nodes in which they appear.
    +   *
    +   * <p>
    +   * The HTML DOM structure:</p>
    +   * <pre>
    +   * (Element   "p"
    +   *   (Element "b"
    +   *     (Text  "print "))       ; #1
    +   *   (Text    "'Hello '")      ; #2
    +   *   (Element "br")            ; #3
    +   *   (Text    "  + 'World';")) ; #4
    +   * </pre>
    +   * <p>
    +   * corresponds to the HTML
    +   * {@code <p><b>print </b>'Hello '<br>  + 'World';</p>}.</p>
    +   *
    +   * <p>
    +   * It will produce the output:</p>
    +   * <pre>
    +   * {
    +   *   sourceCode: "print 'Hello '\n  + 'World';",
    +   *   //                     1          2
    +   *   //           012345678901234 5678901234567
    +   *   spans: [0, #1, 6, #2, 14, #3, 15, #4]
    +   * }
    +   * </pre>
    +   * <p>
    +   * where #1 is a reference to the {@code "print "} text node above, and so
    +   * on for the other text nodes.
    +   * </p>
    +   *
    +   * <p>
    +   * The {@code} spans array is an array of pairs.  Even elements are the start
    +   * indices of substrings, and odd elements are the text nodes (or BR elements)
    +   * that contain the text for those substrings.
    +   * Substrings continue until the next index or the end of the source.
    +   * </p>
    +   *
    +   * @param {Node} node an HTML DOM subtree containing source-code.
    +   * @param {boolean} isPreformatted true if white-space in text nodes should
    +   *    be considered significant.
    +   * @return {Object} source code and the text nodes in which they occur.
    +   */
    +  function extractSourceSpans(node, isPreformatted) {
    +    var nocode = /(?:^|\s)nocode(?:\s|$)/;
    +  
    +    var chunks = [];
    +    var length = 0;
    +    var spans = [];
    +    var k = 0;
    +  
    +    function walk(node) {
    +      var type = node.nodeType;
    +      if (type == 1) {  // Element
    +        if (nocode.test(node.className)) { return; }
    +        for (var child = node.firstChild; child; child = child.nextSibling) {
    +          walk(child);
    +        }
    +        var nodeName = node.nodeName.toLowerCase();
    +        if ('br' === nodeName || 'li' === nodeName) {
    +          chunks[k] = '\n';
    +          spans[k << 1] = length++;
    +          spans[(k++ << 1) | 1] = node;
    +        }
    +      } else if (type == 3 || type == 4) {  // Text
    +        var text = node.nodeValue;
    +        if (text.length) {
    +          if (!isPreformatted) {
    +            text = text.replace(/[ \t\r\n]+/g, ' ');
    +          } else {
    +            text = text.replace(/\r\n?/g, '\n');  // Normalize newlines.
    +          }
    +          // TODO: handle tabs here?
    +          chunks[k] = text;
    +          spans[k << 1] = length;
    +          length += text.length;
    +          spans[(k++ << 1) | 1] = node;
    +        }
    +      }
    +    }
    +  
    +    walk(node);
    +  
    +    return {
    +      sourceCode: chunks.join('').replace(/\n$/, ''),
    +      spans: spans
    +    };
    +  }
    +
    +  /**
    +   * Apply the given language handler to sourceCode and add the resulting
    +   * decorations to out.
    +   * @param {number} basePos the index of sourceCode within the chunk of source
    +   *    whose decorations are already present on out.
    +   */
    +  function appendDecorations(basePos, sourceCode, langHandler, out) {
    +    if (!sourceCode) { return; }
    +    var job = {
    +      sourceCode: sourceCode,
    +      basePos: basePos
    +    };
    +    langHandler(job);
    +    out.push.apply(out, job.decorations);
    +  }
    +
    +  var notWs = /\S/;
    +
    +  /**
    +   * Given an element, if it contains only one child element and any text nodes
    +   * it contains contain only space characters, return the sole child element.
    +   * Otherwise returns undefined.
    +   * <p>
    +   * This is meant to return the CODE element in {@code <pre><code ...>} when
    +   * there is a single child element that contains all the non-space textual
    +   * content, but not to return anything where there are multiple child elements
    +   * as in {@code <pre><code>...</code><code>...</code></pre>} or when there
    +   * is textual content.
    +   */
    +  function childContentWrapper(element) {
    +    var wrapper = undefined;
    +    for (var c = element.firstChild; c; c = c.nextSibling) {
    +      var type = c.nodeType;
    +      wrapper = (type === 1)  // Element Node
    +          ? (wrapper ? element : c)
    +          : (type === 3)  // Text Node
    +          ? (notWs.test(c.nodeValue) ? element : wrapper)
    +          : wrapper;
    +    }
    +    return wrapper === element ? undefined : wrapper;
    +  }
    +
    +  /** Given triples of [style, pattern, context] returns a lexing function,
    +    * The lexing function interprets the patterns to find token boundaries and
    +    * returns a decoration list of the form
    +    * [index_0, style_0, index_1, style_1, ..., index_n, style_n]
    +    * where index_n is an index into the sourceCode, and style_n is a style
    +    * constant like PR_PLAIN.  index_n-1 <= index_n, and style_n-1 applies to
    +    * all characters in sourceCode[index_n-1:index_n].
    +    *
    +    * The stylePatterns is a list whose elements have the form
    +    * [style : string, pattern : RegExp, DEPRECATED, shortcut : string].
    +    *
    +    * Style is a style constant like PR_PLAIN, or can be a string of the
    +    * form 'lang-FOO', where FOO is a language extension describing the
    +    * language of the portion of the token in $1 after pattern executes.
    +    * E.g., if style is 'lang-lisp', and group 1 contains the text
    +    * '(hello (world))', then that portion of the token will be passed to the
    +    * registered lisp handler for formatting.
    +    * The text before and after group 1 will be restyled using this decorator
    +    * so decorators should take care that this doesn't result in infinite
    +    * recursion.  For example, the HTML lexer rule for SCRIPT elements looks
    +    * something like ['lang-js', /<[s]cript>(.+?)<\/script>/].  This may match
    +    * '<script>foo()<\/script>', which would cause the current decorator to
    +    * be called with '<script>' which would not match the same rule since
    +    * group 1 must not be empty, so it would be instead styled as PR_TAG by
    +    * the generic tag rule.  The handler registered for the 'js' extension would
    +    * then be called with 'foo()', and finally, the current decorator would
    +    * be called with '<\/script>' which would not match the original rule and
    +    * so the generic tag rule would identify it as a tag.
    +    *
    +    * Pattern must only match prefixes, and if it matches a prefix, then that
    +    * match is considered a token with the same style.
    +    *
    +    * Context is applied to the last non-whitespace, non-comment token
    +    * recognized.
    +    *
    +    * Shortcut is an optional string of characters, any of which, if the first
    +    * character, gurantee that this pattern and only this pattern matches.
    +    *
    +    * @param {Array} shortcutStylePatterns patterns that always start with
    +    *   a known character.  Must have a shortcut string.
    +    * @param {Array} fallthroughStylePatterns patterns that will be tried in
    +    *   order if the shortcut ones fail.  May have shortcuts.
    +    *
    +    * @return {function (Object)} a
    +    *   function that takes source code and returns a list of decorations.
    +    */
    +  function createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns) {
    +    var shortcuts = {};
    +    var tokenizer;
    +    (function () {
    +      var allPatterns = shortcutStylePatterns.concat(fallthroughStylePatterns);
    +      var allRegexs = [];
    +      var regexKeys = {};
    +      for (var i = 0, n = allPatterns.length; i < n; ++i) {
    +        var patternParts = allPatterns[i];
    +        var shortcutChars = patternParts[3];
    +        if (shortcutChars) {
    +          for (var c = shortcutChars.length; --c >= 0;) {
    +            shortcuts[shortcutChars.charAt(c)] = patternParts;
    +          }
    +        }
    +        var regex = patternParts[1];
    +        var k = '' + regex;
    +        if (!regexKeys.hasOwnProperty(k)) {
    +          allRegexs.push(regex);
    +          regexKeys[k] = null;
    +        }
    +      }
    +      allRegexs.push(/[\0-\uffff]/);
    +      tokenizer = combinePrefixPatterns(allRegexs);
    +    })();
    +
    +    var nPatterns = fallthroughStylePatterns.length;
    +
    +    /**
    +     * Lexes job.sourceCode and produces an output array job.decorations of
    +     * style classes preceded by the position at which they start in
    +     * job.sourceCode in order.
    +     *
    +     * @param {Object} job an object like <pre>{
    +     *    sourceCode: {string} sourceText plain text,
    +     *    basePos: {int} position of job.sourceCode in the larger chunk of
    +     *        sourceCode.
    +     * }</pre>
    +     */
    +    var decorate = function (job) {
    +      var sourceCode = job.sourceCode, basePos = job.basePos;
    +      /** Even entries are positions in source in ascending order.  Odd enties
    +        * are style markers (e.g., PR_COMMENT) that run from that position until
    +        * the end.
    +        * @type {Array.<number|string>}
    +        */
    +      var decorations = [basePos, PR_PLAIN];
    +      var pos = 0;  // index into sourceCode
    +      var tokens = sourceCode.match(tokenizer) || [];
    +      var styleCache = {};
    +
    +      for (var ti = 0, nTokens = tokens.length; ti < nTokens; ++ti) {
    +        var token = tokens[ti];
    +        var style = styleCache[token];
    +        var match = void 0;
    +
    +        var isEmbedded;
    +        if (typeof style === 'string') {
    +          isEmbedded = false;
    +        } else {
    +          var patternParts = shortcuts[token.charAt(0)];
    +          if (patternParts) {
    +            match = token.match(patternParts[1]);
    +            style = patternParts[0];
    +          } else {
    +            for (var i = 0; i < nPatterns; ++i) {
    +              patternParts = fallthroughStylePatterns[i];
    +              match = token.match(patternParts[1]);
    +              if (match) {
    +                style = patternParts[0];
    +                break;
    +              }
    +            }
    +
    +            if (!match) {  // make sure that we make progress
    +              style = PR_PLAIN;
    +            }
    +          }
    +
    +          isEmbedded = style.length >= 5 && 'lang-' === style.substring(0, 5);
    +          if (isEmbedded && !(match && typeof match[1] === 'string')) {
    +            isEmbedded = false;
    +            style = PR_SOURCE;
    +          }
    +
    +          if (!isEmbedded) { styleCache[token] = style; }
    +        }
    +
    +        var tokenStart = pos;
    +        pos += token.length;
    +
    +        if (!isEmbedded) {
    +          decorations.push(basePos + tokenStart, style);
    +        } else {  // Treat group 1 as an embedded block of source code.
    +          var embeddedSource = match[1];
    +          var embeddedSourceStart = token.indexOf(embeddedSource);
    +          var embeddedSourceEnd = embeddedSourceStart + embeddedSource.length;
    +          if (match[2]) {
    +            // If embeddedSource can be blank, then it would match at the
    +            // beginning which would cause us to infinitely recurse on the
    +            // entire token, so we catch the right context in match[2].
    +            embeddedSourceEnd = token.length - match[2].length;
    +            embeddedSourceStart = embeddedSourceEnd - embeddedSource.length;
    +          }
    +          var lang = style.substring(5);
    +          // Decorate the left of the embedded source
    +          appendDecorations(
    +              basePos + tokenStart,
    +              token.substring(0, embeddedSourceStart),
    +              decorate, decorations);
    +          // Decorate the embedded source
    +          appendDecorations(
    +              basePos + tokenStart + embeddedSourceStart,
    +              embeddedSource,
    +              langHandlerForExtension(lang, embeddedSource),
    +              decorations);
    +          // Decorate the right of the embedded section
    +          appendDecorations(
    +              basePos + tokenStart + embeddedSourceEnd,
    +              token.substring(embeddedSourceEnd),
    +              decorate, decorations);
    +        }
    +      }
    +      job.decorations = decorations;
    +    };
    +    return decorate;
    +  }
    +
    +  /** returns a function that produces a list of decorations from source text.
    +    *
    +    * This code treats ", ', and ` as string delimiters, and \ as a string
    +    * escape.  It does not recognize perl's qq() style strings.
    +    * It has no special handling for double delimiter escapes as in basic, or
    +    * the tripled delimiters used in python, but should work on those regardless
    +    * although in those cases a single string literal may be broken up into
    +    * multiple adjacent string literals.
    +    *
    +    * It recognizes C, C++, and shell style comments.
    +    *
    +    * @param {Object} options a set of optional parameters.
    +    * @return {function (Object)} a function that examines the source code
    +    *     in the input job and builds the decoration list.
    +    */
    +  function sourceDecorator(options) {
    +    var shortcutStylePatterns = [], fallthroughStylePatterns = [];
    +    if (options['tripleQuotedStrings']) {
    +      // '''multi-line-string''', 'single-line-string', and double-quoted
    +      shortcutStylePatterns.push(
    +          [PR_STRING,  /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,
    +           null, '\'"']);
    +    } else if (options['multiLineStrings']) {
    +      // 'multi-line-string', "multi-line-string"
    +      shortcutStylePatterns.push(
    +          [PR_STRING,  /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,
    +           null, '\'"`']);
    +    } else {
    +      // 'single-line-string', "single-line-string"
    +      shortcutStylePatterns.push(
    +          [PR_STRING,
    +           /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,
    +           null, '"\'']);
    +    }
    +    if (options['verbatimStrings']) {
    +      // verbatim-string-literal production from the C# grammar.  See issue 93.
    +      fallthroughStylePatterns.push(
    +          [PR_STRING, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
    +    }
    +    var hc = options['hashComments'];
    +    if (hc) {
    +      if (options['cStyleComments']) {
    +        if (hc > 1) {  // multiline hash comments
    +          shortcutStylePatterns.push(
    +              [PR_COMMENT, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, '#']);
    +        } else {
    +          // Stop C preprocessor declarations at an unclosed open comment
    +          shortcutStylePatterns.push(
    +              [PR_COMMENT, /^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,
    +               null, '#']);
    +        }
    +        // #include <stdio.h>
    +        fallthroughStylePatterns.push(
    +            [PR_STRING,
    +             /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,
    +             null]);
    +      } else {
    +        shortcutStylePatterns.push([PR_COMMENT, /^#[^\r\n]*/, null, '#']);
    +      }
    +    }
    +    if (options['cStyleComments']) {
    +      fallthroughStylePatterns.push([PR_COMMENT, /^\/\/[^\r\n]*/, null]);
    +      fallthroughStylePatterns.push(
    +          [PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/, null]);
    +    }
    +    var regexLiterals = options['regexLiterals'];
    +    if (regexLiterals) {
    +      /**
    +       * @const
    +       */
    +      var regexExcls = regexLiterals > 1
    +        ? ''  // Multiline regex literals
    +        : '\n\r';
    +      /**
    +       * @const
    +       */
    +      var regexAny = regexExcls ? '.' : '[\\S\\s]';
    +      /**
    +       * @const
    +       */
    +      var REGEX_LITERAL = (
    +          // A regular expression literal starts with a slash that is
    +          // not followed by * or / so that it is not confused with
    +          // comments.
    +          '/(?=[^/*' + regexExcls + '])'
    +          // and then contains any number of raw characters,
    +          + '(?:[^/\\x5B\\x5C' + regexExcls + ']'
    +          // escape sequences (\x5C),
    +          +    '|\\x5C' + regexAny
    +          // or non-nesting character sets (\x5B\x5D);
    +          +    '|\\x5B(?:[^\\x5C\\x5D' + regexExcls + ']'
    +          +             '|\\x5C' + regexAny + ')*(?:\\x5D|$))+'
    +          // finally closed by a /.
    +          + '/');
    +      fallthroughStylePatterns.push(
    +          ['lang-regex',
    +           RegExp('^' + REGEXP_PRECEDER_PATTERN + '(' + REGEX_LITERAL + ')')
    +           ]);
    +    }
    +
    +    var types = options['types'];
    +    if (types) {
    +      fallthroughStylePatterns.push([PR_TYPE, types]);
    +    }
    +
    +    var keywords = ("" + options['keywords']).replace(/^ | $/g, '');
    +    if (keywords.length) {
    +      fallthroughStylePatterns.push(
    +          [PR_KEYWORD,
    +           new RegExp('^(?:' + keywords.replace(/[\s,]+/g, '|') + ')\\b'),
    +           null]);
    +    }
    +
    +    shortcutStylePatterns.push([PR_PLAIN,       /^\s+/, null, ' \r\n\t\xA0']);
    +
    +    var punctuation =
    +      // The Bash man page says
    +
    +      // A word is a sequence of characters considered as a single
    +      // unit by GRUB. Words are separated by metacharacters,
    +      // which are the following plus space, tab, and newline: { }
    +      // | & $ ; < >
    +      // ...
    +      
    +      // A word beginning with # causes that word and all remaining
    +      // characters on that line to be ignored.
    +
    +      // which means that only a '#' after /(?:^|[{}|&$;<>\s])/ starts a
    +      // comment but empirically
    +      // $ echo {#}
    +      // {#}
    +      // $ echo \$#
    +      // $#
    +      // $ echo }#
    +      // }#
    +
    +      // so /(?:^|[|&;<>\s])/ is more appropriate.
    +
    +      // http://gcc.gnu.org/onlinedocs/gcc-2.95.3/cpp_1.html#SEC3
    +      // suggests that this definition is compatible with a
    +      // default mode that tries to use a single token definition
    +      // to recognize both bash/python style comments and C
    +      // preprocessor directives.
    +
    +      // This definition of punctuation does not include # in the list of
    +      // follow-on exclusions, so # will not be broken before if preceeded
    +      // by a punctuation character.  We could try to exclude # after
    +      // [|&;<>] but that doesn't seem to cause many major problems.
    +      // If that does turn out to be a problem, we should change the below
    +      // when hc is truthy to include # in the run of punctuation characters
    +      // only when not followint [|&;<>].
    +      '^.[^\\s\\w.$@\'"`/\\\\]*';
    +    if (options['regexLiterals']) {
    +      punctuation += '(?!\s*\/)';
    +    }
    +
    +    fallthroughStylePatterns.push(
    +        // TODO(mikesamuel): recognize non-latin letters and numerals in idents
    +        [PR_LITERAL,     /^@[a-z_$][a-z_$@0-9]*/i, null],
    +        [PR_TYPE,        /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null],
    +        [PR_PLAIN,       /^[a-z_$][a-z_$@0-9]*/i, null],
    +        [PR_LITERAL,
    +         new RegExp(
    +             '^(?:'
    +             // A hex number
    +             + '0x[a-f0-9]+'
    +             // or an octal or decimal number,
    +             + '|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)'
    +             // possibly in scientific notation
    +             + '(?:e[+\\-]?\\d+)?'
    +             + ')'
    +             // with an optional modifier like UL for unsigned long
    +             + '[a-z]*', 'i'),
    +         null, '0123456789'],
    +        // Don't treat escaped quotes in bash as starting strings.
    +        // See issue 144.
    +        [PR_PLAIN,       /^\\[\s\S]?/, null],
    +        [PR_PUNCTUATION, new RegExp(punctuation), null]);
    +
    +    return createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns);
    +  }
    +
    +  var decorateSource = sourceDecorator({
    +        'keywords': ALL_KEYWORDS,
    +        'hashComments': true,
    +        'cStyleComments': true,
    +        'multiLineStrings': true,
    +        'regexLiterals': true
    +      });
    +
    +  /**
    +   * Given a DOM subtree, wraps it in a list, and puts each line into its own
    +   * list item.
    +   *
    +   * @param {Node} node modified in place.  Its content is pulled into an
    +   *     HTMLOListElement, and each line is moved into a separate list item.
    +   *     This requires cloning elements, so the input might not have unique
    +   *     IDs after numbering.
    +   * @param {boolean} isPreformatted true if white-space in text nodes should
    +   *     be treated as significant.
    +   */
    +  function numberLines(node, opt_startLineNum, isPreformatted, opt_numberLines, opt_calloutModifiedLines) {
    +    var nocode = /(?:^|\s)nocode(?:\s|$)/;
    +    var lineBreak = /\r\n?|\n/;
    +    var prefixes = [
    +      { prefix: "*", className: "linemodified", },
    +      { prefix: "-", className: "linedeleted", },
    +      { prefix: "+", className: "lineadded", },
    +    ];
    +    opt_numberLines = (opt_numberLines == undefined) ? true : opt_numberLines;
    +
    +    var startsWith = function(str, prefix) {
    +      return str.length >= prefix.length && str.substring(0, prefix.length) == prefix;
    +    };
    +  
    +    var document = node.ownerDocument;
    +  
    +    var li = document.createElement('li');
    +    while (node.firstChild) {
    +      li.appendChild(node.firstChild);
    +    }
    +    // An array of lines.  We split below, so this is initialized to one
    +    // un-split line.
    +    var listItems = [li];
    +  
    +    function walk(node) {
    +      var type = node.nodeType;
    +      if (type == 1 && !nocode.test(node.className)) {  // Element
    +        if ('br' === node.nodeName) {
    +          breakAfter(node);
    +          // Discard the <BR> since it is now flush against a </LI>.
    +          if (node.parentNode) {
    +            node.parentNode.removeChild(node);
    +          }
    +        } else {
    +          for (var child = node.firstChild; child; child = child.nextSibling) {
    +            walk(child);
    +          }
    +        }
    +      } else if ((type == 3 || type == 4) && isPreformatted) {  // Text
    +        var text = node.nodeValue;
    +        var match = text.match(lineBreak);
    +        if (match) {
    +          var firstLine = text.substring(0, match.index);
    +          node.nodeValue = firstLine;
    +          var tail = text.substring(match.index + match[0].length);
    +          if (tail) {
    +            var parent = node.parentNode;
    +            parent.insertBefore(
    +              document.createTextNode(tail), node.nextSibling);
    +          }
    +          breakAfter(node);
    +          if (!firstLine) {
    +            // Don't leave blank text nodes in the DOM.
    +            node.parentNode.removeChild(node);
    +          }
    +        }
    +      }
    +    }
    +  
    +    // Split a line after the given node.
    +    function breakAfter(lineEndNode) {
    +      // If there's nothing to the right, then we can skip ending the line
    +      // here, and move root-wards since splitting just before an end-tag
    +      // would require us to create a bunch of empty copies.
    +      while (!lineEndNode.nextSibling) {
    +        lineEndNode = lineEndNode.parentNode;
    +        if (!lineEndNode) { return; }
    +      }
    +  
    +      function breakLeftOf(limit, copy) {
    +        // Clone shallowly if this node needs to be on both sides of the break.
    +        var rightSide = copy ? limit.cloneNode(false) : limit;
    +        var parent = limit.parentNode;
    +        if (parent) {
    +          // We clone the parent chain.
    +          // This helps us resurrect important styling elements that cross lines.
    +          // E.g. in <i>Foo<br>Bar</i>
    +          // should be rewritten to <li><i>Foo</i></li><li><i>Bar</i></li>.
    +          var parentClone = breakLeftOf(parent, 1);
    +          // Move the clone and everything to the right of the original
    +          // onto the cloned parent.
    +          var next = limit.nextSibling;
    +          parentClone.appendChild(rightSide);
    +          for (var sibling = next; sibling; sibling = next) {
    +            next = sibling.nextSibling;
    +            parentClone.appendChild(sibling);
    +          }
    +        }
    +        return rightSide;
    +      }
    +  
    +      var copiedListItem = breakLeftOf(lineEndNode.nextSibling, 0);
    +  
    +      // Walk the parent chain until we reach an unattached LI.
    +      for (var parent;
    +           // Check nodeType since IE invents document fragments.
    +           (parent = copiedListItem.parentNode) && parent.nodeType === 1;) {
    +        copiedListItem = parent;
    +      }
    +      // Put it on the list of lines for later processing.
    +      listItems.push(copiedListItem);
    +    }
    +  
    +    // Split lines while there are lines left to split.
    +    for (var i = 0;  // Number of lines that have been split so far.
    +         i < listItems.length;  // length updated by breakAfter calls.
    +         ++i) {
    +      walk(listItems[i]);
    +    }
    +  
    +    // Make sure numeric indices show correctly.
    +    if (opt_startLineNum === (opt_startLineNum|0)) {
    +      listItems[0].setAttribute('value', opt_startLineNum);
    +    }
    +  
    +    var ol = document.createElement(opt_numberLines ? 'ol' : 'ul');
    +    var classNames = [];
    +    if (opt_numberLines) {
    +      classNames.push('linenums');
    +    }
    +    if (opt_calloutModifiedLines) {
    +      classNames.push('modifiedlines');
    +    }
    +    ol.className = classNames.join(" ");
    +    var offset = Math.max(0, ((opt_startLineNum - 1 /* zero index */)) | 0) || 0;
    +    for (var i = 0, n = listItems.length; i < n; ++i) {
    +      li = listItems[i];
    +      // Stick a class on the LIs so that stylesheets can
    +      // color odd/even rows, or any other row pattern that
    +      // is co-prime with 10.
    +      var classNames = [];
    +      if (opt_numberLines) {
    +        classNames.push('L' + ((i + offset) % 10));
    +      }
    +      if (!li.firstChild) {
    +        li.appendChild(document.createTextNode('\xA0'));
    +      }
    +      if (opt_calloutModifiedLines) {
    +        // returns undefined to continue, true of found, false if not found
    +        function findTextWithPrefix(node) {
    +          if (!node) {
    +            return;
    +          }
    +          var type = node.nodeType;
    +          if (type == 1) { // Element
    +            for (var child = node.firstChild; child; child = child.nextSibling) {
    +              var result = findTextWithPrefix(child);
    +              if (result !== undefined) {
    +                  return result;
    +              }
    +            }
    +          } else if (type == 3 || type == 4) {
    +            var text = node.nodeValue;
    +            if (text.length > 0) {
    +              for (var pp = 0; pp < prefixes.length; ++pp) {
    +                var prefixInfo = prefixes[pp];
    +                if (startsWith(text, prefixInfo.prefix)) {
    +                  node.nodeValue = text.substring(prefixInfo.prefix.length);
    +                  return prefixInfo.className;
    +                }
    +              }
    +              return false;
    +            }
    +          }
    +        }
    +        var foundPrefix = findTextWithPrefix(li);
    +        if (foundPrefix) {
    +          classNames.push(foundPrefix);
    +        }
    +      }
    +      li.className = classNames.join(" ");
    +      ol.appendChild(li);
    +    }
    +  
    +    node.appendChild(ol);
    +  }
    +  /**
    +   * Breaks {@code job.sourceCode} around style boundaries in
    +   * {@code job.decorations} and modifies {@code job.sourceNode} in place.
    +   * @param {Object} job like <pre>{
    +   *    sourceCode: {string} source as plain text,
    +   *    sourceNode: {HTMLElement} the element containing the source,
    +   *    spans: {Array.<number|Node>} alternating span start indices into source
    +   *       and the text node or element (e.g. {@code <BR>}) corresponding to that
    +   *       span.
    +   *    decorations: {Array.<number|string} an array of style classes preceded
    +   *       by the position at which they start in job.sourceCode in order
    +   * }</pre>
    +   * @private
    +   */
    +  function recombineTagsAndDecorations(job) {
    +    var isIE8OrEarlier = /\bMSIE\s(\d+)/.exec(navigator.userAgent);
    +    isIE8OrEarlier = isIE8OrEarlier && +isIE8OrEarlier[1] <= 8;
    +    var newlineRe = /\n/g;
    +  
    +    var source = job.sourceCode;
    +    var sourceLength = source.length;
    +    // Index into source after the last code-unit recombined.
    +    var sourceIndex = 0;
    +  
    +    var spans = job.spans;
    +    var nSpans = spans.length;
    +    // Index into spans after the last span which ends at or before sourceIndex.
    +    var spanIndex = 0;
    +  
    +    var decorations = job.decorations;
    +    var nDecorations = decorations.length;
    +    // Index into decorations after the last decoration which ends at or before
    +    // sourceIndex.
    +    var decorationIndex = 0;
    +  
    +    // Remove all zero-length decorations.
    +    decorations[nDecorations] = sourceLength;
    +    var decPos, i;
    +    for (i = decPos = 0; i < nDecorations;) {
    +      if (decorations[i] !== decorations[i + 2]) {
    +        decorations[decPos++] = decorations[i++];
    +        decorations[decPos++] = decorations[i++];
    +      } else {
    +        i += 2;
    +      }
    +    }
    +    nDecorations = decPos;
    +  
    +    // Simplify decorations.
    +    for (i = decPos = 0; i < nDecorations;) {
    +      var startPos = decorations[i];
    +      // Conflate all adjacent decorations that use the same style.
    +      var startDec = decorations[i + 1];
    +      var end = i + 2;
    +      while (end + 2 <= nDecorations && decorations[end + 1] === startDec) {
    +        end += 2;
    +      }
    +      decorations[decPos++] = startPos;
    +      decorations[decPos++] = startDec;
    +      i = end;
    +    }
    +  
    +    nDecorations = decorations.length = decPos;
    +  
    +    var sourceNode = job.sourceNode;
    +    var oldDisplay;
    +    if (sourceNode) {
    +      oldDisplay = sourceNode.style.display;
    +      sourceNode.style.display = 'none';
    +    }
    +    try {
    +      var decoration = null;
    +      while (spanIndex < nSpans) {
    +        var spanStart = spans[spanIndex];
    +        var spanEnd = spans[spanIndex + 2] || sourceLength;
    +  
    +        var decEnd = decorations[decorationIndex + 2] || sourceLength;
    +  
    +        var end = Math.min(spanEnd, decEnd);
    +  
    +        var textNode = spans[spanIndex + 1];
    +        var styledText;
    +        if (textNode.nodeType !== 1  // Don't muck with <BR>s or <LI>s
    +            // Don't introduce spans around empty text nodes.
    +            && (styledText = source.substring(sourceIndex, end))) {
    +          // This may seem bizarre, and it is.  Emitting LF on IE causes the
    +          // code to display with spaces instead of line breaks.
    +          // Emitting Windows standard issue linebreaks (CRLF) causes a blank
    +          // space to appear at the beginning of every line but the first.
    +          // Emitting an old Mac OS 9 line separator makes everything spiffy.
    +          if (isIE8OrEarlier) {
    +            styledText = styledText.replace(newlineRe, '\r');
    +          }
    +          textNode.nodeValue = styledText;
    +          var document = textNode.ownerDocument;
    +          var span = document.createElement('span');
    +          span.className = decorations[decorationIndex + 1];
    +          var parentNode = textNode.parentNode;
    +          parentNode.replaceChild(span, textNode);
    +          span.appendChild(textNode);
    +          if (sourceIndex < spanEnd) {  // Split off a text node.
    +            spans[spanIndex + 1] = textNode
    +                // TODO: Possibly optimize by using '' if there's no flicker.
    +                = document.createTextNode(source.substring(end, spanEnd));
    +            parentNode.insertBefore(textNode, span.nextSibling);
    +          }
    +        }
    +  
    +        sourceIndex = end;
    +  
    +        if (sourceIndex >= spanEnd) {
    +          spanIndex += 2;
    +        }
    +        if (sourceIndex >= decEnd) {
    +          decorationIndex += 2;
    +        }
    +      }
    +    } finally {
    +      if (sourceNode) {
    +        sourceNode.style.display = oldDisplay;
    +      }
    +    }
    +  }
    +
    +  /** Maps language-specific file extensions to handlers. */
    +  var langHandlerRegistry = {};
    +  /** Register a language handler for the given file extensions.
    +    * @param {function (Object)} handler a function from source code to a list
    +    *      of decorations.  Takes a single argument job which describes the
    +    *      state of the computation.   The single parameter has the form
    +    *      {@code {
    +    *        sourceCode: {string} as plain text.
    +    *        decorations: {Array.<number|string>} an array of style classes
    +    *                     preceded by the position at which they start in
    +    *                     job.sourceCode in order.
    +    *                     The language handler should assigned this field.
    +    *        basePos: {int} the position of source in the larger source chunk.
    +    *                 All positions in the output decorations array are relative
    +    *                 to the larger source chunk.
    +    *      } }
    +    * @param {Array.<string>} fileExtensions
    +    */
    +  function registerLangHandler(handler, fileExtensions) {
    +    for (var i = fileExtensions.length; --i >= 0;) {
    +      var ext = fileExtensions[i];
    +      if (!langHandlerRegistry.hasOwnProperty(ext)) {
    +        langHandlerRegistry[ext] = handler;
    +      } else if (win['console']) {
    +        console['warn']('cannot override language handler %s', ext);
    +      }
    +    }
    +  }
    +  function langHandlerForExtension(extension, source) {
    +    if (!(extension && langHandlerRegistry.hasOwnProperty(extension))) {
    +      // Treat it as markup if the first non whitespace character is a < and
    +      // the last non-whitespace character is a >.
    +      extension = /^\s*</.test(source)
    +          ? 'default-markup'
    +          : 'default-code';
    +    }
    +    return langHandlerRegistry[extension];
    +  }
    +  registerLangHandler(decorateSource, ['default-code']);
    +  registerLangHandler(
    +      createSimpleLexer(
    +          [],
    +          [
    +           [PR_PLAIN,       /^[^<?]+/],
    +           [PR_DECLARATION, /^<!\w[^>]*(?:>|$)/],
    +           [PR_COMMENT,     /^<\!--[\s\S]*?(?:-\->|$)/],
    +           // Unescaped content in an unknown language
    +           ['lang-',        /^<\?([\s\S]+?)(?:\?>|$)/],
    +           ['lang-',        /^<%([\s\S]+?)(?:%>|$)/],
    +           [PR_PUNCTUATION, /^(?:<[%?]|[%?]>)/],
    +           ['lang-',        /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],
    +           // Unescaped content in javascript.  (Or possibly vbscript).
    +           ['lang-js',      /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],
    +           // Contains unescaped stylesheet content
    +           ['lang-css',     /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],
    +           ['lang-in.tag',  /^(<\/?[a-z][^<>]*>)/i]
    +          ]),
    +      ['default-markup', 'htm', 'html', 'mxml', 'xhtml', 'xml', 'xsl']);
    +  registerLangHandler(
    +      createSimpleLexer(
    +          [
    +           [PR_PLAIN,        /^[\s]+/, null, ' \t\r\n'],
    +           [PR_ATTRIB_VALUE, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, '\"\'']
    +           ],
    +          [
    +           [PR_TAG,          /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],
    +           [PR_ATTRIB_NAME,  /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],
    +           ['lang-uq.val',   /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],
    +           [PR_PUNCTUATION,  /^[=<>\/]+/],
    +           ['lang-js',       /^on\w+\s*=\s*\"([^\"]+)\"/i],
    +           ['lang-js',       /^on\w+\s*=\s*\'([^\']+)\'/i],
    +           ['lang-js',       /^on\w+\s*=\s*([^\"\'>\s]+)/i],
    +           ['lang-css',      /^style\s*=\s*\"([^\"]+)\"/i],
    +           ['lang-css',      /^style\s*=\s*\'([^\']+)\'/i],
    +           ['lang-css',      /^style\s*=\s*([^\"\'>\s]+)/i]
    +           ]),
    +      ['in.tag']);
    +  registerLangHandler(
    +      createSimpleLexer([], [[PR_ATTRIB_VALUE, /^[\s\S]+/]]), ['uq.val']);
    +  registerLangHandler(sourceDecorator({
    +          'keywords': CPP_KEYWORDS,
    +          'hashComments': true,
    +          'cStyleComments': true,
    +          'types': C_TYPES
    +        }), ['c', 'cc', 'cpp', 'cxx', 'cyc', 'm']);
    +  registerLangHandler(sourceDecorator({
    +          'keywords': 'null,true,false'
    +        }), ['json']);
    +  registerLangHandler(sourceDecorator({
    +          'keywords': CSHARP_KEYWORDS,
    +          'hashComments': true,
    +          'cStyleComments': true,
    +          'verbatimStrings': true,
    +          'types': C_TYPES
    +        }), ['cs']);
    +  registerLangHandler(sourceDecorator({
    +          'keywords': JAVA_KEYWORDS,
    +          'cStyleComments': true
    +        }), ['java']);
    +  registerLangHandler(sourceDecorator({
    +          'keywords': SH_KEYWORDS,
    +          'hashComments': true,
    +          'multiLineStrings': true
    +        }), ['bash', 'bsh', 'csh', 'sh']);
    +  registerLangHandler(sourceDecorator({
    +          'keywords': PYTHON_KEYWORDS,
    +          'hashComments': true,
    +          'multiLineStrings': true,
    +          'tripleQuotedStrings': true
    +        }), ['cv', 'py', 'python']);
    +  registerLangHandler(sourceDecorator({
    +          'keywords': PERL_KEYWORDS,
    +          'hashComments': true,
    +          'multiLineStrings': true,
    +          'regexLiterals': 2  // multiline regex literals
    +        }), ['perl', 'pl', 'pm']);
    +  registerLangHandler(sourceDecorator({
    +          'keywords': RUBY_KEYWORDS,
    +          'hashComments': true,
    +          'multiLineStrings': true,
    +          'regexLiterals': true
    +        }), ['rb', 'ruby']);
    +  registerLangHandler(sourceDecorator({
    +          'keywords': JSCRIPT_KEYWORDS,
    +          'cStyleComments': true,
    +          'regexLiterals': true
    +        }), ['javascript', 'js']);
    +  registerLangHandler(sourceDecorator({
    +          'keywords': COFFEE_KEYWORDS,
    +          'hashComments': 3,  // ### style block comments
    +          'cStyleComments': true,
    +          'multilineStrings': true,
    +          'tripleQuotedStrings': true,
    +          'regexLiterals': true
    +        }), ['coffee']);
    +  registerLangHandler(sourceDecorator({
    +          'keywords': RUST_KEYWORDS,
    +          'cStyleComments': true,
    +          'multilineStrings': true
    +        }), ['rc', 'rs', 'rust']);
    +  registerLangHandler(
    +      createSimpleLexer([], [[PR_STRING, /^[\s\S]+/]]), ['regex']);
    +
    +  function applyDecorator(job) {
    +    var opt_langExtension = job.langExtension;
    +
    +    try {
    +      // Extract tags, and convert the source code to plain text.
    +      var sourceAndSpans = extractSourceSpans(job.sourceNode, job.pre);
    +      /** Plain text. @type {string} */
    +      var source = sourceAndSpans.sourceCode;
    +      job.sourceCode = source;
    +      job.spans = sourceAndSpans.spans;
    +      job.basePos = 0;
    +
    +      // Apply the appropriate language handler
    +      langHandlerForExtension(opt_langExtension, source)(job);
    +
    +      // Integrate the decorations and tags back into the source code,
    +      // modifying the sourceNode in place.
    +      recombineTagsAndDecorations(job);
    +    } catch (e) {
    +      if (win['console']) {
    +        console['log'](e && e['stack'] || e);
    +      }
    +    }
    +  }
    +
    +  /**
    +   * Pretty print a chunk of code.
    +   * @param sourceCodeHtml {string} The HTML to pretty print.
    +   * @param opt_langExtension {string} The language name to use.
    +   *     Typically, a filename extension like 'cpp' or 'java'.
    +   * @param opt_numberLines {number|boolean} True to number lines,
    +   *     or the 1-indexed number of the first line in sourceCodeHtml.
    +   */
    +  function $prettyPrintOne(sourceCodeHtml, opt_langExtension, opt_numberLines) {
    +    var container = document.createElement('div');
    +    // This could cause images to load and onload listeners to fire.
    +    // E.g. <img onerror="alert(1337)" src="nosuchimage.png">.
    +    // We assume that the inner HTML is from a trusted source.
    +    // The pre-tag is required for IE8 which strips newlines from innerHTML
    +    // when it is injected into a <pre> tag.
    +    // http://stackoverflow.com/questions/451486/pre-tag-loses-line-breaks-when-setting-innerhtml-in-ie
    +    // http://stackoverflow.com/questions/195363/inserting-a-newline-into-a-pre-tag-ie-javascript
    +    container.innerHTML = '<pre>' + sourceCodeHtml + '</pre>';
    +    container = container.firstChild;
    +    if (opt_numberLines) {
    +      numberLines(container, opt_numberLines, true);
    +    }
    +
    +    var job = {
    +      langExtension: opt_langExtension,
    +      numberLines: opt_numberLines,
    +      sourceNode: container,
    +      pre: 1
    +    };
    +    applyDecorator(job);
    +    return container.innerHTML;
    +  }
    +
    +   /**
    +    * Find all the {@code <pre>} and {@code <code>} tags in the DOM with
    +    * {@code class=prettyprint} and prettify them.
    +    *
    +    * @param {Function} opt_whenDone called when prettifying is done.
    +    * @param {HTMLElement|HTMLDocument} opt_root an element or document
    +    *   containing all the elements to pretty print.
    +    *   Defaults to {@code document.body}.
    +    */
    +  function $prettyPrint(opt_whenDone, opt_root) {
    +    var root = opt_root || document.body;
    +    var doc = root.ownerDocument || document;
    +    function byTagName(tn) { return root.getElementsByTagName(tn); }
    +    // fetch a list of nodes to rewrite
    +    var codeSegments = [byTagName('pre'), byTagName('code'), byTagName('xmp')];
    +    var elements = [];
    +    for (var i = 0; i < codeSegments.length; ++i) {
    +      for (var j = 0, n = codeSegments[i].length; j < n; ++j) {
    +        elements.push(codeSegments[i][j]);
    +      }
    +    }
    +    codeSegments = null;
    +
    +    var clock = Date;
    +    if (!clock['now']) {
    +      clock = { 'now': function () { return +(new Date); } };
    +    }
    +
    +    // The loop is broken into a series of continuations to make sure that we
    +    // don't make the browser unresponsive when rewriting a large page.
    +    var k = 0;
    +    var prettyPrintingJob;
    +
    +    var langExtensionRe = /\blang(?:uage)?-([\w.]+)(?!\S)/;
    +    var prettyPrintRe = /\bprettyprint\b/;
    +    var prettyPrintedRe = /\bprettyprinted\b/;
    +    var preformattedTagNameRe = /pre|xmp/i;
    +    var codeRe = /^code$/i;
    +    var preCodeXmpRe = /^(?:pre|code|xmp)$/i;
    +    var EMPTY = {};
    +
    +    function doWork() {
    +      var endTime = (win['PR_SHOULD_USE_CONTINUATION'] ?
    +                     clock['now']() + 250 /* ms */ :
    +                     Infinity);
    +      for (; k < elements.length && clock['now']() < endTime; k++) {
    +        var cs = elements[k];
    +
    +        // Look for a preceding comment like
    +        // <?prettify lang="..." linenums="..."?>
    +        var attrs = EMPTY;
    +        {
    +          for (var preceder = cs; (preceder = preceder.previousSibling);) {
    +            var nt = preceder.nodeType;
    +            // <?foo?> is parsed by HTML 5 to a comment node (8)
    +            // like <!--?foo?-->, but in XML is a processing instruction
    +            var value = (nt === 7 || nt === 8) && preceder.nodeValue;
    +            if (value
    +                ? !/^\??prettify\b/.test(value)
    +                : (nt !== 3 || /\S/.test(preceder.nodeValue))) {
    +              // Skip over white-space text nodes but not others.
    +              break;
    +            }
    +            if (value) {
    +              attrs = {};
    +              value.replace(
    +                  /\b(\w+)=([\w:.%+-]+)/g,
    +                function (_, name, value) { attrs[name] = value; });
    +              break;
    +            }
    +          }
    +        }
    +
    +        var className = cs.className;
    +        if ((attrs !== EMPTY || prettyPrintRe.test(className))
    +            // Don't redo this if we've already done it.
    +            // This allows recalling pretty print to just prettyprint elements
    +            // that have been added to the page since last call.
    +            && !prettyPrintedRe.test(className)) {
    +
    +          // make sure this is not nested in an already prettified element
    +          var nested = false;
    +          for (var p = cs.parentNode; p; p = p.parentNode) {
    +            var tn = p.tagName;
    +            if (preCodeXmpRe.test(tn)
    +                && p.className && prettyPrintRe.test(p.className)) {
    +              nested = true;
    +              break;
    +            }
    +          }
    +          if (!nested) {
    +            // Mark done.  If we fail to prettyprint for whatever reason,
    +            // we shouldn't try again.
    +            cs.className += ' prettyprinted';
    +
    +            // If the classes includes a language extensions, use it.
    +            // Language extensions can be specified like
    +            //     <pre class="prettyprint lang-cpp">
    +            // the language extension "cpp" is used to find a language handler
    +            // as passed to PR.registerLangHandler.
    +            // HTML5 recommends that a language be specified using "language-"
    +            // as the prefix instead.  Google Code Prettify supports both.
    +            // http://dev.w3.org/html5/spec-author-view/the-code-element.html
    +            var langExtension = attrs['lang'];
    +            if (!langExtension) {
    +              langExtension = className.match(langExtensionRe);
    +              // Support <pre class="prettyprint"><code class="language-c">
    +              var wrapper;
    +              if (!langExtension && (wrapper = childContentWrapper(cs))
    +                  && codeRe.test(wrapper.tagName)) {
    +                langExtension = wrapper.className.match(langExtensionRe);
    +              }
    +
    +              if (langExtension) { langExtension = langExtension[1]; }
    +            }
    +
    +            var preformatted;
    +            if (preformattedTagNameRe.test(cs.tagName)) {
    +              preformatted = 1;
    +            } else {
    +              var currentStyle = cs['currentStyle'];
    +              var defaultView = doc.defaultView;
    +              var whitespace = (
    +                  currentStyle
    +                  ? currentStyle['whiteSpace']
    +                  : (defaultView
    +                     && defaultView.getComputedStyle)
    +                  ? defaultView.getComputedStyle(cs, null)
    +                  .getPropertyValue('white-space')
    +                  : 0);
    +              preformatted = whitespace
    +                  && 'pre' === whitespace.substring(0, 3);
    +            }
    +
    +            // Look for a class like linenums or linenums:<n> where <n> is the
    +            // 1-indexed number of the first line.
    +            var lineNums = attrs['linenums'];
    +            if (!(lineNums = lineNums === 'true' || +lineNums)) {
    +              lineNums = className.match(/\blinenums\b(?::(\d+))?/);
    +              lineNums =
    +                lineNums
    +                ? lineNums[1] && lineNums[1].length
    +                  ? +lineNums[1] : true
    +                : false;
    +            }
    +            var showLineMods = attrs['showlinemods'];
    +            if (showLineMods === undefined) {
    +              showLineMods = className.match(/\bshowlinemods\b/);
    +            }
    +            if (lineNums || showLineMods) { numberLines(cs, lineNums, preformatted, lineNums, showLineMods); }
    +
    +            // do the pretty printing
    +            prettyPrintingJob = {
    +              langExtension: langExtension,
    +              sourceNode: cs,
    +              numberLines: lineNums,
    +              pre: preformatted
    +            };
    +            applyDecorator(prettyPrintingJob);
    +          }
    +        }
    +      }
    +      if (k < elements.length) {
    +        // finish up in a continuation
    +        setTimeout(doWork, 250);
    +      } else if ('function' === typeof opt_whenDone) {
    +        opt_whenDone();
    +      }
    +    }
    +
    +    doWork();
    +  }
    +
    +  /**
    +   * Contains functions for creating and registering new language handlers.
    +   * @type {Object}
    +   */
    +  var PR = win['PR'] = {
    +        'createSimpleLexer': createSimpleLexer,
    +        'registerLangHandler': registerLangHandler,
    +        'sourceDecorator': sourceDecorator,
    +        'PR_ATTRIB_NAME': PR_ATTRIB_NAME,
    +        'PR_ATTRIB_VALUE': PR_ATTRIB_VALUE,
    +        'PR_COMMENT': PR_COMMENT,
    +        'PR_DECLARATION': PR_DECLARATION,
    +        'PR_KEYWORD': PR_KEYWORD,
    +        'PR_LITERAL': PR_LITERAL,
    +        'PR_NOCODE': PR_NOCODE,
    +        'PR_PLAIN': PR_PLAIN,
    +        'PR_PUNCTUATION': PR_PUNCTUATION,
    +        'PR_SOURCE': PR_SOURCE,
    +        'PR_STRING': PR_STRING,
    +        'PR_TAG': PR_TAG,
    +        'PR_TYPE': PR_TYPE,
    +        'prettyPrintOne':
    +           IN_GLOBAL_SCOPE
    +             ? (win['prettyPrintOne'] = $prettyPrintOne)
    +             : (prettyPrintOne = $prettyPrintOne),
    +        'prettyPrint': prettyPrint =
    +           IN_GLOBAL_SCOPE
    +             ? (win['prettyPrint'] = $prettyPrint)
    +             : (prettyPrint = $prettyPrint)
    +      };
    +
    +  // Make PR available via the Asynchronous Module Definition (AMD) API.
    +  // Per https://github.com/amdjs/amdjs-api/wiki/AMD:
    +  // The Asynchronous Module Definition (AMD) API specifies a
    +  // mechanism for defining modules such that the module and its
    +  // dependencies can be asynchronously loaded.
    +  // ...
    +  // To allow a clear indicator that a global define function (as
    +  // needed for script src browser loading) conforms to the AMD API,
    +  // any global define function SHOULD have a property called "amd"
    +  // whose value is an object. This helps avoid conflict with any
    +  // other existing JavaScript code that could have defined a define()
    +  // function that does not conform to the AMD API.
    +  if (typeof define === "function" && define['amd']) {
    +    define("google-code-prettify", [], function () {
    +      return PR; 
    +    });
    +  }
    +})();
    diff --git a/resources/css/style.css b/resources/css/style.css
    new file mode 100644
    index 0000000..b1817c2
    --- /dev/null
    +++ b/resources/css/style.css
    @@ -0,0 +1,253 @@
    +* {
    +    box-sizing: border-box;
    +}
    +
    +iframe {
    +  border: none;
    +  display: block;
    +  position: fixed;
    +  left: 0;
    +  top: 0;
    +  width: 100%;
    +  height: 100%;
    +  z-index: -1;
    +}
    +
    +body {
    +    margin: 0;
    +    font-family: Helvetica, Arial, sanf-serif;
    +    line-height: 1.5em;
    +}
    +html {
    +    background-color: rgb(51, 102, 204);
    +}
    +
    +.nav ul {
    +  list-style: none;
    +  background-color: #444;
    +  padding: 0;
    +  margin: 0;
    +}
    +.nav li {
    +  line-height: 2em;
    +  font-family: sans-serif;
    +  font-size: 1.2em;
    +  border-bottom: 1px solid #888;
    +}
    +
    +.nav a {
    +  padding-left: 1em;
    +  padding-right: 1em;
    +  text-decoration: none;
    +  color: #fff;
    +  display: block;
    +  transition: .3s background-color;
    +}
    +
    +.nav a:hover {
    +  background-color: #8AF;
    +  color: #000;
    +}
    +
    +.nav a.active {
    +  background-color: #fff;
    +  color: #444;
    +  cursor: default;
    +}
    +
    +@media screen and (min-width: 600px) {
    +  .nav li {
    +    border-bottom: none;
    +    font-size: 1.4em;
    +  }
    +
    +  /* Option 1 - Display Inline */
    +  .nav li {
    +    display: inline-block;
    +    margin-right: -4px;
    +  }
    +}
    +
    +
    +@media screen and (max-width: 400px) {
    +  ul {
    +      padding-left: 1em;
    +  }
    +}
    +
    +h1 {
    +    line-height: 1.5em;
    +    position: relative;
    +}
    +h2,h3 {
    +    margin-top: 1.5em;
    +}
    +
    +#pronounce {
    +    position: absolute;
    +    font-size: xx-small;
    +    bottom: 0em;
    +    left: 0px;
    +    line-height: 1em;
    +    height: 1em;
    +    display: block;
    +}
    +
    +#frame {
    +    margin: 10px;
    +    max-width: 800px;
    +    margin: auto;
    +    background-color: rgba(255, 255, 255, 0.9);
    +}
    +#content {
    +    padding: 20px;
    +}
    +
    +code {
    +    background-color: #DDD;
    +    color: black;
    +    font-family: monospace;
    +    font-size: larger;
    +    padding: 0.2em;
    +}
    +
    +pre {
    +    background-color: #CCC;
    +    overflow-x: auto;
    +    font-size: small;
    +}
    +
    +.lang-javascript {
    +    font-size: small;
    +    background-color: #CCC;
    +    display: block;
    +    padding: 1em;
    +    line-height: 1.2em;
    +    border: 1px solid #000;
    +    box-shadow: 3px 3px 10px #ccc;
    +    font-family: "Lucida Console", Monaco, monospace;
    +}
    +
    +/* --- Prettify --- */
    +pre.prettyprint .nocode { background-color: none; color: #000 }
    +pre.prettyprint .str { color: #080 } /* string          */
    +pre.prettyprint .kwd { color: #008 } /* keyword         */
    +pre.prettyprint .com { color: #800 } /* comment         */
    +pre.prettyprint .typ { color: #606 } /* type            */
    +pre.prettyprint .lit { color: #066 } /* literal         */
    +pre.prettyprint .pun { color: #660 } /* punctuation     */
    +pre.prettyprint .pln { color: #000 } /* plaintext       */
    +pre.prettyprint .tag { color: #008 } /* html/xml tag    */
    +pre.prettyprint .atn { color: #606 } /* attribute name  */
    +pre.prettyprint .atv { color: #080 } /* attribute value */
    +pre.prettyprint .dec { color: #606 } /* decimal         */
    +pre.prettyprint .var { color: #606 } /* variable name   */
    +pre.prettyprint .fun { color: #F00 } /* function name   */
    +
    +pre.prettyprint ul.modifiedlines {
    +    list-style-type: none;
    +    padding-left: 0;
    +}
    +pre.prettyprint ul.modifiedlines li.linemodified {
    +    list-style-type: none;
    +    background-color: #A1EAF6;
    +}
    +pre.prettyprint ul.modifiedlines li.linedeleted {
    +    list-style-type: none;
    +    background-color: #F0B9B9;
    +    text-decoration: line-through;
    +}
    +
    +pre.prettyprint ul.modifiedlines li.lineadded {
    +    list-style-type: none;
    +    background-color: #A2EDC9;
    +}
    +
    +
    +pre.prettyprint, code.prettyprint {
    +    color: #000;
    +    background: #ddd;
    +    border: 1px solid #000;
    +    box-shadow: 3px 3px 10px #ccc;
    +    font-family: "Lucida Console", Monaco, monospace;
    +    width: 95%;
    +    margin: auto;
    +    padding: 1em;
    +    text-align: left;           /* override justify on body */
    +    goverflow: auto;             /* allow scroll bar in case of long lines - goes together with white-space: nowrap! */
    +    white-space: pre;        /* was nowrap, prevent line wrapping */
    +    line-height: 1.2em;
    +}
    +@media print{
    +    pre.prettyprint .str, code.prettyprint .str{color:#060}
    +    pre.prettyprint .kwd, code.prettyprint .kwd{color:#006;font-weight:bold}
    +    pre.prettyprint .com, code.prettyprint .com{color:#600;font-style:italic}
    +    pre.prettyprint .typ, code.prettyprint .typ{color:#404;font-weight:bold}
    +    pre.prettyprint .lit, code.prettyprint .lit{color:#044}
    +    pre.prettyprint .pun, code.prettyprint .pun{color:#440}
    +    pre.prettyprint .pln, code.prettyprint .pln{color:#000}
    +    pre.prettyprint .tag, code.prettyprint .tag{color:#006;font-weight:bold}
    +    pre.prettyprint .atn, code.prettyprint .atn{color:#404}
    +    pre.prettyprint .atv, code.prettyprint .atv{color:#060}
    +pre.prettyprint, code.prettyprint {
    +    color: #000;
    +    background: #EEE;
    +    font-size: 8pt;
    +    font-family: "Lucida Console", Monaco, monospace;
    +    width: 95%;
    +    margin: auto;
    +    padding: 6px 3px 13px 3px;  /* padding-bottom solves hor. scrollbar hiding single line of code in IE6 but causes vert. scrollbar... */
    +    text-align: left;           /* override justify on body */
    +    goverflow: auto;             /* allow scroll bar in case of long lines - goes together with white-space: nowrap! */
    +    white-space: pre;        /* was nowrap, prevent line wrapping */
    +    line-height: 10pt;
    +}
    +}
    +
    +@media (prefers-color-scheme: dark) {
    +  #frame {
    +      background-color: rgba(0, 0, 0, 0.7);
    +      color: #ddd;
    +  }
    +
    +  a {
    +    color: #8AF;
    +  }
    +
    +  a:visited {
    +    color: #CAF;
    +  }
    +
    +  code {
    +      background-color: #444;
    +      color: #ddd;
    +  }
    +
    +  pre {
    +      background-color: #CCC;
    +  }
    +
    +  .lang-javascript {
    +      background-color: #CCC;
    +  }
    +
    +  pre.prettyprint, code.prettyprint {
    +    color: #CCC;
    +    background: #333;
    +    box-shadow: 3px 3px 10px #000;
    +  }
    +
    +  pre.prettyprint .str { color: #b9ca4a } /* string          */
    +  pre.prettyprint .kwd { color: #c397d8 } /* keyword         */
    +  pre.prettyprint .com { color: #f3efb2 } /* comment         */
    +  pre.prettyprint .typ { color: #7aa6da } /* type            */
    +  pre.prettyprint .lit { color: #45e7a6 } /* literal         */
    +  pre.prettyprint .pun { color: #7ecce0 } /* punctuation     */
    +  pre.prettyprint .pln { color: #eaeaea } /* plaintext       */
    +  pre.prettyprint .tag { color: #d54e53 } /* html/xml tag    */
    +  pre.prettyprint .atn { color: #e78c45 } /* attribute name  */
    +  pre.prettyprint .atv { color: #70c0b1 } /* attribute value */
    +  pre.prettyprint .dec { color: #e78c45 } /* decimal         */
    +  pre.prettyprint .var { color: #d54e53 } /* variable name   */
    +  pre.prettyprint .fun { color: #7aa6da } /* function name   */
    +}
    \ No newline at end of file
    diff --git a/resources/js/index.js b/resources/js/index.js
    new file mode 100644
    index 0000000..1fda489
    --- /dev/null
    +++ b/resources/js/index.js
    @@ -0,0 +1,18 @@
    +/* global prettyPrint */
    +
    +document.addEventListener("DOMContentLoaded", function () {
    +  Array.prototype.forEach.call(document.querySelectorAll('pre>code'), function (section) {
    +    // Unwrap
    +    const parent = section.parentElement;
    +    while (section.firstChild) {
    +      const child = section.firstChild;
    +      section.removeChild(child);
    +      parent.appendChild(child);
    +    }
    +    parent.removeChild(section);
    +    // Add class
    +    parent.className = `prettyprint showlinemods ${section.className.replace(/language-(\w+)/g, 'lang-$1')}`;
    +  });
    +  prettyPrint();
    +});
    +