{ "version": 3, "sources": ["../src/index.ts", "../src/lib/common.ts", "../src/classes/base/math-array.ts", "../src/lib/validators.ts", "../src/lib/assert.ts", "../src/classes/base/vector.ts", "../src/gl-matrix/vec2.ts", "../src/gl-matrix/common.js", "../src/lib/gl-matrix-extras.ts", "../src/classes/vector2.ts", "../src/gl-matrix/vec3.ts", "../src/classes/vector3.ts", "../src/classes/vector4.ts", "../src/classes/base/matrix.ts", "../src/gl-matrix/mat3.ts", "../src/classes/matrix3.ts", "../src/gl-matrix/mat4.ts", "../src/gl-matrix/vec4.ts", "../src/classes/matrix4.ts", "../src/gl-matrix/quat.ts", "../src/classes/quaternion.ts", "../src/classes/spherical-coordinates.ts", "../src/classes/euler.ts", "../src/classes/pose.ts", "../src/lib/math-utils.ts"], "sourcesContent": ["// math.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n// types\nexport type {\n TypedArray,\n TypedArrayConstructor,\n NumericArray,\n NumberArray,\n NumberArray2,\n NumberArray3,\n NumberArray4,\n NumberArray6,\n NumberArray8,\n NumberArray9,\n NumberArray12,\n NumberArray16\n} from '@math.gl/types';\n\nexport type {isTypedArray, isNumberArray, isNumericArray} from '@math.gl/types';\n\n// classes\nexport {Vector2} from './classes/vector2';\nexport {Vector3} from './classes/vector3';\nexport {Vector4} from './classes/vector4';\nexport {Matrix3} from './classes/matrix3';\nexport {Matrix4} from './classes/matrix4';\nexport {Quaternion} from './classes/quaternion';\n\nexport type {Vector2Like} from './classes/vector2';\nexport type {Vector3Like} from './classes/vector3';\nexport type {Vector4Like} from './classes/vector4';\nexport type {Matrix3Like} from './classes/matrix3';\nexport type {Matrix4Like} from './classes/matrix4';\n\n// experimental\nexport {SphericalCoordinates} from './classes/spherical-coordinates';\nexport {Pose} from './classes/pose';\nexport {Euler} from './classes/euler';\n\nexport * as _MathUtils from './lib/math-utils';\n\n// lib\nexport {assert} from './lib/assert';\n\nexport {\n // math.gl global utility methods\n config,\n configure,\n formatValue,\n isArray,\n clone,\n equals,\n exactEquals,\n toRadians,\n toDegrees,\n // math.gl \"GLSL\"-style functions\n radians,\n degrees,\n sin,\n cos,\n tan,\n asin,\n acos,\n atan,\n clamp,\n lerp,\n withEpsilon\n} from './lib/common';\n\n// DEPRECATED\nexport {SphericalCoordinates as _SphericalCoordinates} from './classes/spherical-coordinates';\nexport {Pose as _Pose} from './classes/pose';\nexport {Euler as _Euler} from './classes/euler';\n\n/** @deprecated Use Matrix3 */\nexport * as mat3 from './gl-matrix/mat3';\n/** @deprecated Use Matrix4 */\nexport * as mat4 from './gl-matrix/mat4';\n/** @deprecated Use Quaterinion */\nexport * as quat from './gl-matrix/quat';\n/** @deprecated UseVector */\nexport * as vec2 from './gl-matrix/vec2';\n/** @deprecated Use Vector3 */\nexport * as vec3 from './gl-matrix/vec3';\n/** @deprecated Use Vector4 */\nexport * as vec4 from './gl-matrix/vec4';\n", "// math.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n/* eslint-disable no-shadow */ // radians and degrees are common variable names\n\nimport type {NumericArray} from '@math.gl/types';\n\nimport type {MathArray} from '../classes/base/math-array';\n\nconst RADIANS_TO_DEGREES = (1 / Math.PI) * 180;\nconst DEGREES_TO_RADIANS = (1 / 180) * Math.PI;\n\nexport type ConfigurationOptions = {\n EPSILON: number;\n debug?: boolean;\n precision: number;\n printTypes?: boolean;\n printDegrees?: boolean;\n printRowMajor?: boolean;\n _cartographicRadians?: boolean;\n};\n\nconst DEFAULT_CONFIG: Required = {\n EPSILON: 1e-12,\n debug: false,\n precision: 4,\n printTypes: false,\n printDegrees: false,\n printRowMajor: true,\n _cartographicRadians: false\n};\n\n// We use a global field to store the config\ndeclare global {\n // eslint-disable-next-line no-var\n var mathgl: {\n config: Required;\n };\n}\n\n// Configuration is truly global as of v3.6 to ensure single config even if multiple copies of math.gl\n// Multiple copies of config can be quite tricky to debug...\nglobalThis.mathgl = globalThis.mathgl || {config: {...DEFAULT_CONFIG}};\n\nexport const config = globalThis.mathgl.config;\n\nexport function configure(options: Partial): ConfigurationOptions {\n // Only copy existing keys\n Object.assign(config, options);\n return config;\n}\n\n/**\n * Formats a value into a string\n * @param value\n * @param param1\n * @returns\n */\nexport function formatValue(\n value: number,\n {precision = config.precision}: {precision?: number} = {}\n): string {\n value = round(value);\n // get rid of trailing zeros\n return `${parseFloat(value.toPrecision(precision))}`;\n}\n\n/**\n * Check if value is an \"array\"\n * Returns `true` if value is either an array or a typed array\n * Note: returns `false` for `ArrayBuffer` and `DataView` instances\n * @note isTypedArray and isNumericArray are often more useful in TypeScript\n */\nexport function isArray(value: unknown): boolean {\n return Array.isArray(value) || (ArrayBuffer.isView(value) && !(value instanceof DataView));\n}\n\nexport function clone(array: NumericArray | MathArray): NumericArray {\n return 'clone' in array ? array.clone() : array.slice();\n}\n\nexport function toRadians(degrees: number): number;\nexport function toRadians(degrees: NumericArray): NumericArray;\n\nexport function toRadians(degrees: number | NumericArray): number | NumericArray {\n return radians(degrees as NumericArray);\n}\n\nexport function toDegrees(degrees: number): number;\nexport function toDegrees(degrees: NumericArray): NumericArray;\n\nexport function toDegrees(radians: number | NumericArray): number | NumericArray {\n return degrees(radians as NumericArray);\n}\n\n// GLSL math function equivalents - Works on both single values and vectors\n\n/**\n * \"GLSL equivalent\" radians: Works on single values and vectors\n */\nexport function radians(degrees: number): number;\nexport function radians(degrees: NumericArray, result?: NumericArray): NumericArray;\n\nexport function radians(\n degrees: number | NumericArray,\n result?: NumericArray\n): number | NumericArray {\n return map(degrees, (degrees) => degrees * DEGREES_TO_RADIANS, result);\n}\n\n/**\n * \"GLSL equivalent\" degrees: Works on single values and vectors\n */\nexport function degrees(radians: number): number;\nexport function degrees(radians: NumericArray, result?: NumericArray): NumericArray;\n\nexport function degrees(\n radians: number | NumericArray,\n result?: NumericArray\n): number | NumericArray {\n return map(radians, (radians) => radians * RADIANS_TO_DEGREES, result);\n}\n\n/**\n * \"GLSL equivalent\" of `Math.sin`: Works on single values and vectors\n * @deprecated\n */\nexport function sin(radians: number | NumericArray, result?: NumericArray): number | NumericArray {\n return map(radians, (angle) => Math.sin(angle), result);\n}\n\n/**\n * \"GLSL equivalent\" of `Math.cos`: Works on single values and vectors\n * @deprecated\n */\nexport function cos(radians: number | NumericArray, result?: NumericArray): number | NumericArray {\n return map(radians, (angle) => Math.cos(angle), result);\n}\n\n/**\n * \"GLSL equivalent\" of `Math.tan`: Works on single values and vectors\n * @deprecated\n */\nexport function tan(radians: number | NumericArray, result?: NumericArray): number | NumericArray {\n return map(radians, (angle) => Math.tan(angle), result);\n}\n\n/**\n * \"GLSL equivalent\" of `Math.asin`: Works on single values and vectors\n * @deprecated\n */\nexport function asin(radians: number | NumericArray, result?: NumericArray): number | NumericArray {\n return map(radians, (angle) => Math.asin(angle), result);\n}\n\n/**\n * \"GLSL equivalent\" of `Math.acos`: Works on single values and vectors\n * @deprecated\n */\nexport function acos(radians: number | NumericArray, result?: NumericArray): number | NumericArray {\n return map(radians, (angle) => Math.acos(angle), result);\n}\n\n/**\n * \"GLSL equivalent\" of `Math.atan`: Works on single values and vectors\n * @deprecated\n */\nexport function atan(radians: number | NumericArray, result?: NumericArray): number | NumericArray {\n return map(radians, (angle) => Math.atan(angle), result);\n}\n\n/**\n * GLSL style value clamping: Works on single values and vectors\n */\nexport function clamp(value: number, min: number, max: number): number;\nexport function clamp(value: NumericArray, min: number, max: number): NumericArray;\n\nexport function clamp(\n value: number | NumericArray,\n min: number,\n max: number\n): number | NumericArray {\n return map(value, (value) => Math.max(min, Math.min(max, value)));\n}\n\n/**\n * Interpolate between two numbers or two arrays\n */\nexport function lerp(a: number, b: number, t: number): number;\nexport function lerp(a: NumericArray, b: NumericArray, t: number): NumericArray;\n\nexport function lerp(\n a: number | NumericArray,\n b: number | NumericArray,\n t: number\n): number | NumericArray {\n if (isArray(a)) {\n return (a as NumericArray).map((ai: number, i: number) => lerp(ai, (b as NumericArray)[i], t));\n }\n return t * (b as number) + (1 - t) * (a as number);\n}\n\n/* eslint-disable */\n\n/**\n * Compares any two math objects, using `equals` method if available.\n * @param a\n * @param b\n * @param epsilon\n * @returns\n */\nexport function equals(a: any, b: any, epsilon?: number): boolean {\n const oldEpsilon = config.EPSILON;\n if (epsilon) {\n config.EPSILON = epsilon;\n }\n try {\n if (a === b) {\n return true;\n }\n if (isArray(a) && isArray(b)) {\n if (a.length !== b.length) {\n return false;\n }\n for (let i = 0; i < a.length; ++i) {\n // eslint-disable-next-line max-depth\n if (!equals(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n if (a && a.equals) {\n return a.equals(b);\n }\n if (b && b.equals) {\n return b.equals(a);\n }\n if (typeof a === 'number' && typeof b === 'number') {\n return Math.abs(a - b) <= config.EPSILON * Math.max(1, Math.abs(a), Math.abs(b));\n }\n return false;\n } finally {\n config.EPSILON = oldEpsilon;\n }\n}\n\nexport function exactEquals(a: any, b: any): boolean {\n if (a === b) {\n return true;\n }\n if (a && typeof a === 'object' && b && typeof b === 'object') {\n if (a.constructor !== b.constructor) {\n return false;\n }\n if (a.exactEquals) {\n return a.exactEquals(b);\n }\n }\n if (isArray(a) && isArray(b)) {\n if (a.length !== b.length) {\n return false;\n }\n for (let i = 0; i < a.length; ++i) {\n if (!exactEquals(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n return false;\n}\n\n/* eslint-enable */\n\nexport function withEpsilon(epsilon: number, func: () => T): T {\n const oldPrecision = config.EPSILON;\n config.EPSILON = epsilon;\n let value: T;\n try {\n value = func();\n } finally {\n config.EPSILON = oldPrecision;\n }\n return value;\n}\n\n// HELPERS\n\nfunction round(value: number): number {\n return Math.round(value / config.EPSILON) * config.EPSILON;\n}\n\n// If the array has a clone function, calls it, otherwise returns a copy\nfunction duplicateArray(array: NumericArray): NumericArray {\n // @ts-expect-error We check for math.gl class methods\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n return array.clone ? (array.clone() as NumericArray) : (new Array(array.length) as number[]);\n}\n\n// If the argument value is an array, applies the func element wise,\n// otherwise applies func to the argument value\nfunction map(\n value: number | NumericArray,\n func: (x: number, index?: number, resultArray?: NumericArray) => number,\n result?: NumericArray\n): number | NumericArray {\n if (isArray(value)) {\n const array = value as NumericArray;\n result = result || duplicateArray(array);\n for (let i = 0; i < result.length && i < array.length; ++i) {\n const val = typeof value === 'number' ? value : value[i];\n result[i] = func(val, i, result);\n }\n return result;\n }\n return func(value as number);\n}\n", "// math.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {NumericArray} from '@math.gl/types';\nimport {ConfigurationOptions, config, formatValue, equals, isArray} from '../../lib/common';\n\n/** Base class for vectors and matrices */\nexport abstract class MathArray extends Array {\n /** Number of elements (values) in this array */\n abstract get ELEMENTS(): number;\n\n abstract copy(vector: Readonly): this;\n\n abstract fromObject(object: Record): this;\n\n // Common methods\n\n /**\n * Clone the current object\n * @returns a new copy of this object\n */\n clone(): this {\n // @ts-expect-error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.\n return new this.constructor().copy(this); // eslint-disable-line\n }\n\n fromArray(array: Readonly, offset: number = 0): this {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] = array[i + offset];\n }\n return this.check();\n }\n\n toArray(targetArray: TypedArray, offset?: number): TypedArray;\n toArray(targetArray?: number[], offset?: number): NumericArray;\n\n toArray(targetArray: NumericArray = [], offset: number = 0): NumericArray {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n targetArray[offset + i] = this[i];\n }\n return targetArray;\n }\n\n toObject(targetObject: Record): Record {\n return targetObject;\n }\n\n from(arrayOrObject: Readonly | Record): this {\n return Array.isArray(arrayOrObject)\n ? this.copy(arrayOrObject)\n : // @ts-ignore\n this.fromObject(arrayOrObject);\n }\n\n to>(arrayOrObject: T): T {\n // @ts-ignore\n if (arrayOrObject === this) {\n return this as T;\n }\n // @ts-expect-error TS2339: Property 'toObject' does not exist on type 'MathArray'.\n return isArray(arrayOrObject) ? this.toArray(arrayOrObject) : this.toObject(arrayOrObject);\n }\n\n toTarget(target: this): this {\n return target ? this.to(target) : this;\n }\n\n /** @deprecated */\n toFloat32Array(): Float32Array {\n return new Float32Array(this);\n }\n\n override toString(): string {\n return this.formatString(config);\n }\n\n /** Formats string according to options */\n formatString(opts: ConfigurationOptions): string {\n let string = '';\n for (let i = 0; i < this.ELEMENTS; ++i) {\n string += (i > 0 ? ', ' : '') + formatValue(this[i], opts);\n }\n return `${opts.printTypes ? this.constructor.name : ''}[${string}]`;\n }\n\n equals(array: Readonly): boolean {\n if (!array || this.length !== array.length) {\n return false;\n }\n for (let i = 0; i < this.ELEMENTS; ++i) {\n if (!equals(this[i], array[i])) {\n return false;\n }\n }\n return true;\n }\n\n exactEquals(array: Readonly): boolean {\n if (!array || this.length !== array.length) {\n return false;\n }\n for (let i = 0; i < this.ELEMENTS; ++i) {\n if (this[i] !== array[i]) {\n return false;\n }\n }\n return true;\n }\n\n // Modifiers\n\n /** Negates all values in this object */\n negate(): this {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] = -this[i];\n }\n return this.check();\n }\n\n /** Linearly interpolates between two values */\n lerp(a: Readonly, t: number): this;\n lerp(a: Readonly, b: Readonly, t: number): this;\n\n lerp(a: Readonly, b: Readonly | number, t?: number): this {\n if (t === undefined) {\n return this.lerp(this, a, b as number);\n }\n for (let i = 0; i < this.ELEMENTS; ++i) {\n const ai = a[i];\n const endValue = typeof b === 'number' ? b : b[i];\n this[i] = ai + t * (endValue - ai);\n }\n return this.check();\n }\n\n /** Minimal */\n min(vector: Readonly): this {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] = Math.min(vector[i], this[i]);\n }\n return this.check();\n }\n\n /** Maximal */\n max(vector: Readonly): this {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] = Math.max(vector[i], this[i]);\n }\n return this.check();\n }\n\n clamp(minVector: Readonly, maxVector: Readonly): this {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] = Math.min(Math.max(this[i], minVector[i]), maxVector[i]);\n }\n return this.check();\n }\n\n add(...vectors: Readonly[]): this {\n for (const vector of vectors) {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] += vector[i];\n }\n }\n return this.check();\n }\n\n subtract(...vectors: Readonly[]): this {\n for (const vector of vectors) {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] -= vector[i];\n }\n }\n return this.check();\n }\n\n scale(scale: number | Readonly): this {\n if (typeof scale === 'number') {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] *= scale;\n }\n } else {\n for (let i = 0; i < this.ELEMENTS && i < scale.length; ++i) {\n this[i] *= scale[i];\n }\n }\n return this.check();\n }\n\n /**\n * Multiplies all elements by `scale`\n * Note: `Matrix4.multiplyByScalar` only scales its 3x3 \"minor\"\n */\n multiplyByScalar(scalar: number): this {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] *= scalar;\n }\n return this.check();\n }\n\n // Debug checks\n\n /** Throws an error if array length is incorrect or contains illegal values */\n check(): this {\n if (config.debug && !this.validate()) {\n throw new Error(`math.gl: ${this.constructor.name} some fields set to invalid numbers'`);\n }\n return this;\n }\n\n /** Returns false if the array length is incorrect or contains illegal values */\n validate(): boolean {\n let valid = this.length === this.ELEMENTS;\n for (let i = 0; i < this.ELEMENTS; ++i) {\n valid = valid && Number.isFinite(this[i]);\n }\n return valid;\n }\n\n // three.js compatibility\n\n /** @deprecated */\n sub(a: Readonly): this {\n return this.subtract(a);\n }\n\n /** @deprecated */\n setScalar(a: number): this {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] = a;\n }\n return this.check();\n }\n\n /** @deprecated */\n addScalar(a: number): this {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] += a;\n }\n return this.check();\n }\n\n /** @deprecated */\n subScalar(a: number): this {\n return this.addScalar(-a);\n }\n\n /** @deprecated */\n multiplyScalar(scalar: number): this {\n // Multiplies all elements\n // `Matrix4.scale` only scales its 3x3 \"minor\"\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] *= scalar;\n }\n return this.check();\n }\n\n /** @deprecated */\n divideScalar(a: number): this {\n return this.multiplyByScalar(1 / a);\n }\n\n /** @deprecated */\n clampScalar(min: number, max: number): this {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] = Math.min(Math.max(this[i], min), max);\n }\n return this.check();\n }\n\n /** @deprecated */\n get elements(): NumericArray {\n return this;\n }\n}\n", "// math.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {NumericArray} from '@math.gl/types';\nimport {config} from './common';\n\nexport function validateVector(v: NumericArray, length: number): boolean {\n if (v.length !== length) {\n return false;\n }\n // Could be arguments \"array\" (v.every not availasble)\n for (let i = 0; i < v.length; ++i) {\n if (!Number.isFinite(v[i])) {\n return false;\n }\n }\n return true;\n}\n\nexport function checkNumber(value: unknown): number {\n if (!Number.isFinite(value)) {\n throw new Error(`Invalid number ${JSON.stringify(value)}`);\n }\n return value as number;\n}\n\nexport function checkVector(\n v: T,\n length: number,\n callerName: string = ''\n): T {\n if (config.debug && !validateVector(v, length)) {\n throw new Error(`math.gl: ${callerName} some fields set to invalid numbers'`);\n }\n return v;\n}\n\nconst map: Record = {};\n\nexport function deprecated(method: string, version: string): void {\n if (!map[method]) {\n map[method] = true;\n // eslint-disable-next-line\n console.warn(\n `${method} has been removed in version ${version}, see upgrade guide for more information`\n );\n }\n}\n", "// math.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nexport function assert(condition: unknown, message?: string): void {\n if (!condition) {\n throw new Error(`math.gl assertion ${message}`);\n }\n}\n", "// math.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n// Copyright (c) 2017 Uber Technologies, Inc.\n\nimport {NumericArray} from '@math.gl/types';\nimport {MathArray} from './math-array';\nimport {checkNumber} from '../../lib/validators';\nimport {assert} from '../../lib/assert';\n\n/** Base class for vectors with at least 2 elements */\nexport abstract class Vector extends MathArray {\n // ACCESSORS\n\n get x(): number {\n return this[0];\n }\n\n set x(value: number) {\n this[0] = checkNumber(value);\n }\n\n get y(): number {\n return this[1];\n }\n\n set y(value: number) {\n this[1] = checkNumber(value);\n }\n\n /**\n * Returns the length of the vector from the origin to the point described by this vector\n *\n * @note `length` is a reserved word for Arrays, so `v.length()` will return number of elements\n * Instead we provide `len` and `magnitude`\n */\n len(): number {\n return Math.sqrt(this.lengthSquared());\n }\n\n /**\n * Returns the length of the vector from the origin to the point described by this vector\n */\n magnitude(): number {\n return this.len();\n }\n\n /**\n * Returns the squared length of the vector from the origin to the point described by this vector\n */\n lengthSquared(): number {\n let length = 0;\n for (let i = 0; i < this.ELEMENTS; ++i) {\n length += this[i] * this[i];\n }\n return length;\n }\n\n /**\n * Returns the squared length of the vector from the origin to the point described by this vector\n */\n magnitudeSquared(): number {\n return this.lengthSquared();\n }\n\n distance(mathArray: Readonly): number {\n return Math.sqrt(this.distanceSquared(mathArray));\n }\n\n distanceSquared(mathArray: Readonly): number {\n let length = 0;\n for (let i = 0; i < this.ELEMENTS; ++i) {\n const dist = this[i] - mathArray[i];\n length += dist * dist;\n }\n return checkNumber(length);\n }\n\n dot(mathArray: Readonly): number {\n let product = 0;\n for (let i = 0; i < this.ELEMENTS; ++i) {\n product += this[i] * mathArray[i];\n }\n return checkNumber(product);\n }\n\n // MODIFIERS\n\n normalize(): this {\n const length = this.magnitude();\n if (length !== 0) {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] /= length;\n }\n }\n return this.check();\n }\n\n multiply(...vectors: Readonly[]): this {\n for (const vector of vectors) {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] *= vector[i];\n }\n }\n return this.check();\n }\n\n divide(...vectors: Readonly[]): this {\n for (const vector of vectors) {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] /= vector[i];\n }\n }\n return this.check();\n }\n\n // THREE.js compatibility\n\n lengthSq(): number {\n return this.lengthSquared();\n }\n distanceTo(vector: Readonly): number {\n return this.distance(vector);\n }\n distanceToSquared(vector: Readonly): number {\n return this.distanceSquared(vector);\n }\n\n getComponent(i: number): number {\n assert(i >= 0 && i < this.ELEMENTS, 'index is out of range');\n return checkNumber(this[i]);\n }\n\n setComponent(i: number, value: number): this {\n assert(i >= 0 && i < this.ELEMENTS, 'index is out of range');\n this[i] = value;\n return this.check();\n }\n\n addVectors(a: Readonly, b: Readonly): this {\n return this.copy(a).add(b);\n }\n\n subVectors(a: Readonly, b: Readonly): this {\n return this.copy(a).subtract(b);\n }\n\n multiplyVectors(a: Readonly, b: Readonly): this {\n return this.copy(a).multiply(b);\n }\n\n addScaledVector(a: Readonly, b: number): this {\n // @ts-expect-error error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.\n return this.add((new this.constructor(a) as this).multiplyScalar(b));\n }\n}\n", "// @eslint-disable\n// @ts-nocheck\n\nimport type {NumericArray} from '@math.gl/types';\nimport * as glMatrix from './common.js';\n\n/**\n * 2 Dimensional Vector\n * @module vec2\n */\n\n/**\n * Creates a new, empty vec2\n *\n * @returns a new 2D vector\n */\nexport function create(): NumericArray {\n const out = new glMatrix.ARRAY_TYPE(2);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n }\n return out;\n}\n\n/**\n * Creates a new vec2 initialized with values from an existing vector\n *\n * @param a vector to clone\n * @returns a new 2D vector\n */\nexport function clone(a: Readonly): NumericArray {\n const out = new glMatrix.ARRAY_TYPE(2);\n out[0] = a[0];\n out[1] = a[1];\n return out;\n}\n\n/**\n * Creates a new vec2 initialized with the given values\n *\n * @param x X component\n * @param y Y component\n * @returns a new 2D vector\n */\nexport function fromValues(x: number, y: number): NumericArray {\n const out = new glMatrix.ARRAY_TYPE(2);\n out[0] = x;\n out[1] = y;\n return out;\n}\n\n/**\n * Copy the values from one vec2 to another\n *\n * @param {NumericArray} out the receiving vector\n * @param {Readonly} a the source vector\n * @returns {NumericArray} out\n */\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n return out;\n}\n\n/**\n * Set the components of a vec2 to the given values\n *\n * @param {NumericArray} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @returns {NumericArray} out\n */\nexport function set(out, x, y) {\n out[0] = x;\n out[1] = y;\n return out;\n}\n\n/**\n * Adds two vec2's\n *\n * @param {NumericArray} out the receiving vector\n * @param {Readonly} a the first operand\n * @param {Readonly} b the second operand\n * @returns {NumericArray} out\n */\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n return out;\n}\n\n/**\n * Subtracts vector b from vector a\n *\n * @param {NumericArray} out the receiving vector\n * @param {Readonly} a the first operand\n * @param {Readonly} b the second operand\n * @returns {NumericArray} out\n */\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n return out;\n}\n\n/**\n * Multiplies two vec2's\n *\n * @param {NumericArray} out the receiving vector\n * @param {Readonly} a the first operand\n * @param {Readonly} b the second operand\n * @returns {NumericArray} out\n */\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n return out;\n}\n\n/**\n * Divides two vec2's\n *\n * @param {NumericArray} out the receiving vector\n * @param {Readonly} a the first operand\n * @param {Readonly} b the second operand\n * @returns {NumericArray} out\n */\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n return out;\n}\n\n/**\n * Math.ceil the components of a vec2\n *\n * @param {NumericArray} out the receiving vector\n * @param {Readonly} a vector to ceil\n * @returns {NumericArray} out\n */\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n return out;\n}\n\n/**\n * Math.floor the components of a vec2\n *\n * @param {NumericArray} out the receiving vector\n * @param {Readonly} a vector to floor\n * @returns {NumericArray} out\n */\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n return out;\n}\n\n/**\n * Returns the minimum of two vec2's\n *\n * @param {NumericArray} out the receiving vector\n * @param {Readonly} a the first operand\n * @param {Readonly} b the second operand\n * @returns {NumericArray} out\n */\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n return out;\n}\n\n/**\n * Returns the maximum of two vec2's\n *\n * @param {NumericArray} out the receiving vector\n * @param {Readonly} a the first operand\n * @param {Readonly} b the second operand\n * @returns {NumericArray} out\n */\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n return out;\n}\n\n/**\n * symmetric round the components of a vec2\n *\n * @param {NumericArray} out the receiving vector\n * @param {Readonly} a vector to round\n * @returns {NumericArray} out\n */\nexport function round(out, a) {\n out[0] = glMatrix.round(a[0]);\n out[1] = glMatrix.round(a[1]);\n return out;\n}\n\n/**\n * Scales a vec2 by a scalar number\n *\n * @param {NumericArray} out the receiving vector\n * @param {Readonly} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {NumericArray} out\n */\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n return out;\n}\n\n/**\n * Adds two vec2's after scaling the second operand by a scalar value\n *\n * @param {NumericArray} out the receiving vector\n * @param {Readonly} a the first operand\n * @param {Readonly} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {NumericArray} out\n */\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n return out;\n}\n\n/**\n * Calculates the euclidian distance between two vec2's\n *\n * @param {Readonly} a the first operand\n * @param {Readonly} b the second operand\n * @returns {Number} distance between a and b\n */\nexport function distance(a, b) {\n const x = b[0] - a[0];\n const y = b[1] - a[1];\n return Math.sqrt(x * x + y * y);\n}\n\n/**\n * Calculates the squared euclidian distance between two vec2's\n *\n * @param {Readonly} a the first operand\n * @param {Readonly} b the second operand\n * @returns {Number} squared distance between a and b\n */\nexport function squaredDistance(a, b) {\n const x = b[0] - a[0];\n const y = b[1] - a[1];\n return x * x + y * y;\n}\n\n/**\n * Calculates the length of a vec2\n *\n * @param {Readonly} a vector to calculate length of\n * @returns {Number} length of a\n */\nexport function length(a) {\n const x = a[0];\n const y = a[1];\n return Math.sqrt(x * x + y * y);\n}\n\n/**\n * Calculates the squared length of a vec2\n *\n * @param {Readonly} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\nexport function squaredLength(a) {\n const x = a[0];\n const y = a[1];\n return x * x + y * y;\n}\n\n/**\n * Negates the components of a vec2\n *\n * @param {NumericArray} out the receiving vector\n * @param {Readonly} a vector to negate\n * @returns {NumericArray} out\n */\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n return out;\n}\n\n/**\n * Returns the inverse of the components of a vec2\n *\n * @param {NumericArray} out the receiving vector\n * @param {Readonly} a vector to invert\n * @returns {NumericArray} out\n */\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n return out;\n}\n\n/**\n * Normalize a vec2\n *\n * @param {NumericArray} out the receiving vector\n * @param {Readonly} a vector to normalize\n * @returns {NumericArray} out\n */\nexport function normalize(out, a) {\n const x = a[0];\n const y = a[1];\n let len = x * x + y * y;\n if (len > 0) {\n // TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n }\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n return out;\n}\n\n/**\n * Calculates the dot product of two vec2's\n *\n * @param {Readonly} a the first operand\n * @param {Readonly} b the second operand\n * @returns {Number} dot product of a and b\n */\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1];\n}\n\n/**\n * Computes the cross product of two vec2's\n * Note that the cross product must by definition produce a 3D vector\n *\n * @param {vec3} out the receiving vector\n * @param {Readonly} a the first operand\n * @param {Readonly} b the second operand\n * @returns {vec3} out\n */\nexport function cross(out, a, b) {\n const z = a[0] * b[1] - a[1] * b[0];\n out[0] = out[1] = 0;\n out[2] = z;\n return out;\n}\n\n/**\n * Performs a linear interpolation between two vec2's\n *\n * @param {NumericArray} out the receiving vector\n * @param {Readonly} a the first operand\n * @param {Readonly} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {NumericArray} out\n */\nexport function lerp(out, a, b, t) {\n const ax = a[0];\n const ay = a[1];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n return out;\n}\n\n/**\n * Generates a random vector with the given scale\n *\n * @param {NumericArray} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If omitted, a unit vector will be returned\n * @returns {NumericArray} out\n */\nexport function random(out, scale) {\n scale = scale === undefined ? 1.0 : scale;\n const r = glMatrix.RANDOM() * 2.0 * Math.PI;\n out[0] = Math.cos(r) * scale;\n out[1] = Math.sin(r) * scale;\n return out;\n}\n\n/**\n * Transforms the vec2 with a mat2\n *\n * @param {NumericArray} out the receiving vector\n * @param {Readonly} a the vector to transform\n * @param {ReadonlyMat2} m matrix to transform with\n * @returns {NumericArray} out\n */\nexport function transformMat2(out, a, m) {\n const x = a[0];\n const y = a[1];\n out[0] = m[0] * x + m[2] * y;\n out[1] = m[1] * x + m[3] * y;\n return out;\n}\n\n/**\n * Transforms the vec2 with a mat2d\n *\n * @param {NumericArray} out the receiving vector\n * @param {Readonly} a the vector to transform\n * @param {ReadonlyMat2d} m matrix to transform with\n * @returns {NumericArray} out\n */\nexport function transformMat2d(out, a, m) {\n const x = a[0];\n const y = a[1];\n out[0] = m[0] * x + m[2] * y + m[4];\n out[1] = m[1] * x + m[3] * y + m[5];\n return out;\n}\n\n/**\n * Transforms the vec2 with a mat3\n * 3rd vector component is implicitly '1'\n *\n * @param {NumericArray} out the receiving vector\n * @param {Readonly} a the vector to transform\n * @param {ReadonlyMat3} m matrix to transform with\n * @returns {NumericArray} out\n */\nexport function transformMat3(out, a, m) {\n const x = a[0];\n const y = a[1];\n out[0] = m[0] * x + m[3] * y + m[6];\n out[1] = m[1] * x + m[4] * y + m[7];\n return out;\n}\n\n/**\n * Transforms the vec2 with a mat4\n * 3rd vector component is implicitly '0'\n * 4th vector component is implicitly '1'\n *\n * @param {NumericArray} out the receiving vector\n * @param {Readonly} a the vector to transform\n * @param {ReadonlyMat4} m matrix to transform with\n * @returns {NumericArray} out\n */\nexport function transformMat4(out, a, m) {\n const x = a[0];\n const y = a[1];\n out[0] = m[0] * x + m[4] * y + m[12];\n out[1] = m[1] * x + m[5] * y + m[13];\n return out;\n}\n\n/**\n * Rotate a 2D vector\n * @param {NumericArray} out The receiving vec2\n * @param {Readonly} a The vec2 point to rotate\n * @param {Readonly} b The origin of the rotation\n * @param {Number} rad The angle of rotation in radians\n * @returns {NumericArray} out\n */\nexport function rotate(out, a, b, rad) {\n // Translate point to the origin\n const p0 = a[0] - b[0];\n const p1 = a[1] - b[1];\n const sinC = Math.sin(rad);\n const cosC = Math.cos(rad);\n\n // perform rotation and translate to correct position\n out[0] = p0 * cosC - p1 * sinC + b[0];\n out[1] = p0 * sinC + p1 * cosC + b[1];\n\n return out;\n}\n\n/**\n * Get the angle between two 2D vectors\n * @param {Readonly} a The first operand\n * @param {Readonly} b The second operand\n * @returns {Number} The angle in radians\n */\nexport function angle(a, b) {\n const x1 = a[0];\n const y1 = a[1];\n const x2 = b[0];\n const y2 = b[1];\n // mag is the product of the magnitudes of a and b\n const mag = Math.sqrt((x1 * x1 + y1 * y1) * (x2 * x2 + y2 * y2));\n // mag &&.. short circuits if mag == 0\n const cosine = mag && (x1 * x2 + y1 * y2) / mag;\n // Math.min(Math.max(cosine, -1), 1) clamps the cosine between -1 and 1\n return Math.acos(Math.min(Math.max(cosine, -1), 1));\n}\n\n/**\n * Set the components of a vec2 to zero\n *\n * @param {NumericArray} out the receiving vector\n * @returns {NumericArray} out\n */\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n return out;\n}\n\n/**\n * Returns a string representation of a vector\n *\n * @param {Readonly} a vector to represent as a string\n * @returns {String} string representation of the vector\n */\nexport function str(a) {\n return `vec2(${a[0]}, ${a[1]})`;\n}\n\n/**\n * Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===)\n *\n * @param {Readonly} a The first vector.\n * @param {Readonly} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1];\n}\n\n/**\n * Returns whether or not the vectors have approximately the same elements in the same position.\n *\n * @param {Readonly} a The first vector.\n * @param {Readonly} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\nexport function equals(a, b) {\n const a0 = a[0];\n const a1 = a[1];\n const b0 = b[0];\n const b1 = b[1];\n return (\n Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) &&\n Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1))\n );\n}\n\n/**\n * Alias for {@link vec2.length}\n * @function\n */\nexport const len = length;\n\n/**\n * Alias for {@link vec2.subtract}\n * @function\n */\nexport const sub = subtract;\n\n/**\n * Alias for {@link vec2.multiply}\n * @function\n */\nexport const mul = multiply;\n\n/**\n * Alias for {@link vec2.divide}\n * @function\n */\nexport const div = divide;\n\n/**\n * Alias for {@link vec2.distance}\n * @function\n */\nexport const dist = distance;\n\n/**\n * Alias for {@link vec2.squaredDistance}\n * @function\n */\nexport const sqrDist = squaredDistance;\n\n/**\n * Alias for {@link vec2.squaredLength}\n * @function\n */\nexport const sqrLen = squaredLength;\n\n/**\n * Perform some operation over an array of vec2s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\nexport const forEach = (function () {\n const vec = create();\n\n return function (a, stride, offset, count, fn, arg) {\n let i;\n let l;\n if (!stride) {\n stride = 2;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n }\n\n return a;\n };\n})();\n", "// @eslint-disable\n// @ts-nocheck\n\n/**\n * Common utilities\n * @module glMatrix\n */\n\n// Configuration Constants\nexport const EPSILON = 0.000001;\nexport let ARRAY_TYPE = typeof Float32Array !== 'undefined' ? Float32Array : Array;\nexport const RANDOM = Math.random;\nexport const ANGLE_ORDER = 'zyx';\n\n/**\n * Symmetric round\n * see https://www.npmjs.com/package/round-half-up-symmetric#user-content-detailed-background\n *\n * @param {Number} a value to round\n */\nexport function round(a) {\n if (a >= 0) return Math.round(a);\n\n return a % 0.5 === 0 ? Math.floor(a) : Math.round(a);\n}\n\n/**\n * Sets the type of array used when creating new vectors and matrices\n *\n * @param {Float32ArrayConstructor | ArrayConstructor} type Array type, such as Float32Array or Array\n */\nexport function setMatrixArrayType(type) {\n ARRAY_TYPE = type;\n}\n\nconst degree = Math.PI / 180;\n\n/**\n * Convert Degree To Radian\n *\n * @param {Number} a Angle in Degrees\n */\nexport function toRadian(a) {\n return a * degree;\n}\n\n/**\n * Tests whether or not the arguments have approximately the same value, within an absolute\n * or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less\n * than or equal to 1.0, and a relative tolerance is used for larger values)\n *\n * @param {Number} a The first number to test.\n * @param {Number} b The second number to test.\n * @returns {Boolean} True if the numbers are approximately equal, false otherwise.\n */\nexport function equals(a, b) {\n return Math.abs(a - b) <= EPSILON * Math.max(1.0, Math.abs(a), Math.abs(b));\n}\n", "// math.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n/* eslint-disable camelcase */\nimport {NumericArray} from '@math.gl/types';\n// vec2 additions\n\nexport function vec2_transformMat4AsVector(\n out: T,\n a: Readonly,\n m: Readonly\n): T {\n const x = a[0];\n const y = a[1];\n const w = m[3] * x + m[7] * y || 1.0;\n out[0] = (m[0] * x + m[4] * y) / w;\n out[1] = (m[1] * x + m[5] * y) / w;\n return out;\n}\n\n// vec3 additions\n\n// Transform as vector, only uses 3x3 minor matrix\nexport function vec3_transformMat4AsVector(\n out: T,\n a: Readonly,\n m: Readonly\n): T {\n const x = a[0];\n const y = a[1];\n const z = a[2];\n const w = m[3] * x + m[7] * y + m[11] * z || 1.0;\n out[0] = (m[0] * x + m[4] * y + m[8] * z) / w;\n out[1] = (m[1] * x + m[5] * y + m[9] * z) / w;\n out[2] = (m[2] * x + m[6] * y + m[10] * z) / w;\n return out;\n}\n\nexport function vec3_transformMat2(\n out: T,\n a: Readonly,\n m: Readonly\n): T {\n const x = a[0];\n const y = a[1];\n out[0] = m[0] * x + m[2] * y;\n out[1] = m[1] * x + m[3] * y;\n out[2] = a[2];\n return out;\n}\n\n// vec4 additions\n\nexport function vec4_transformMat2(\n out: T,\n a: Readonly,\n m: Readonly\n): T {\n const x = a[0];\n const y = a[1];\n out[0] = m[0] * x + m[2] * y;\n out[1] = m[1] * x + m[3] * y;\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n\nexport function vec4_transformMat3(\n out: T,\n a: Readonly,\n m: Readonly\n): T {\n const x = a[0];\n const y = a[1];\n const z = a[2];\n out[0] = m[0] * x + m[3] * y + m[6] * z;\n out[1] = m[1] * x + m[4] * y + m[7] * z;\n out[2] = m[2] * x + m[5] * y + m[8] * z;\n out[3] = a[3];\n return out;\n}\n", "// math.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n// Copyright (c) 2017 Uber Technologies, Inc.\n\nimport {NumericArray, NumericArray2} from '@math.gl/types';\n\nimport {Vector} from './base/vector';\nimport {config, isArray} from '../lib/common';\nimport {checkNumber} from '../lib/validators';\nimport {\n transformMat4 as vec2_transformMat4,\n transformMat3 as vec2_transformMat3,\n transformMat2d as vec2_transformMat2d,\n transformMat2 as vec2_transformMat2\n} from '../gl-matrix/vec2';\nimport {vec2_transformMat4AsVector} from '../lib/gl-matrix-extras';\n\n/** Helper type that captures array length for a 2 element vector */\nexport type Vector2Like = Vector2 | NumericArray2;\n\n/**\n * Two-element vector class with common linear algebra operations.\n * Subclass of Array meaning that it is highly compatible with other libraries\n */\nexport class Vector2 extends Vector {\n // Creates a new, empty vec2\n constructor(x: number | Readonly = 0, y: number = 0) {\n // PERF NOTE: initialize elements as double precision numbers\n super(2); // -0, -0);\n if (isArray(x) && arguments.length === 1) {\n this.copy(x as Readonly);\n } else {\n if (config.debug) {\n checkNumber(x);\n checkNumber(y);\n }\n this[0] = x as number;\n this[1] = y;\n }\n }\n\n set(x: number, y: number): this {\n this[0] = x;\n this[1] = y;\n return this.check();\n }\n\n copy(array: Readonly): this {\n this[0] = array[0];\n this[1] = array[1];\n return this.check();\n }\n\n fromObject(object: {x: number; y: number}): this {\n if (config.debug) {\n checkNumber(object.x);\n checkNumber(object.y);\n }\n this[0] = object.x;\n this[1] = object.y;\n return this.check();\n }\n\n override toObject(object: {x?: number; y?: number}): {x: number; y: number} {\n object.x = this[0];\n object.y = this[1];\n return object as {x: number; y: number};\n }\n\n // Getters/setters\n\n get ELEMENTS(): number {\n return 2;\n }\n\n /**\n * Returns angle from x axis\n * @returns\n */\n horizontalAngle(): number {\n return Math.atan2(this.y, this.x);\n }\n\n /**\n * Returns angle from y axis\n * @returns\n */\n verticalAngle(): number {\n return Math.atan2(this.x, this.y);\n }\n\n // Transforms\n\n /**\n * Transforms as point\n * @param matrix4\n * @returns\n */\n transform(matrix4: Readonly): this {\n return this.transformAsPoint(matrix4);\n }\n\n /**\n * transforms as point (4th component is implicitly 1)\n * @param matrix4\n * @returns\n */\n transformAsPoint(matrix4: Readonly): this {\n vec2_transformMat4(this, this, matrix4);\n return this.check();\n }\n\n /**\n * transforms as vector (4th component is implicitly 0, ignores translation. slightly faster)\n * @param matrix4\n * @returns\n */\n transformAsVector(matrix4: Readonly): this {\n vec2_transformMat4AsVector(this, this, matrix4);\n return this.check();\n }\n\n transformByMatrix3(matrix3: Readonly): this {\n vec2_transformMat3(this, this, matrix3);\n return this.check();\n }\n\n transformByMatrix2x3(matrix2x3: Readonly): this {\n vec2_transformMat2d(this, this, matrix2x3);\n return this.check();\n }\n\n transformByMatrix2(matrix2: Readonly): this {\n vec2_transformMat2(this, this, matrix2);\n return this.check();\n }\n}\n", "// @eslint-disable\n// @ts-nocheck\n\nimport * as glMatrix from './common.js';\n\n/**\n * 3 Dimensional Vector\n * @module vec3\n */\n\n/**\n * Creates a new, empty vec3\n *\n * @returns {vec3} a new 3D vector\n */\nexport function create() {\n const out = new glMatrix.ARRAY_TYPE(3);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n }\n return out;\n}\n\n/**\n * Creates a new vec3 initialized with values from an existing vector\n *\n * @param {ReadonlyVec3} a vector to clone\n * @returns {vec3} a new 3D vector\n */\nexport function clone(a) {\n const out = new glMatrix.ARRAY_TYPE(3);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n}\n\n/**\n * Calculates the length of a vec3\n *\n * @param {ReadonlyVec3} a vector to calculate length of\n * @returns {Number} length of a\n */\nexport function length(a) {\n const x = a[0];\n const y = a[1];\n const z = a[2];\n return Math.sqrt(x * x + y * y + z * z);\n}\n\n/**\n * Creates a new vec3 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @returns {vec3} a new 3D vector\n */\nexport function fromValues(x, y, z) {\n const out = new glMatrix.ARRAY_TYPE(3);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n}\n\n/**\n * Copy the values from one vec3 to another\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the source vector\n * @returns {vec3} out\n */\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n}\n\n/**\n * Set the components of a vec3 to the given values\n *\n * @param {vec3} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @returns {vec3} out\n */\nexport function set(out, x, y, z) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n}\n\n/**\n * Adds two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n return out;\n}\n\n/**\n * Subtracts vector b from vector a\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n return out;\n}\n\n/**\n * Multiplies two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n return out;\n}\n\n/**\n * Divides two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n return out;\n}\n\n/**\n * Math.ceil the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to ceil\n * @returns {vec3} out\n */\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n out[2] = Math.ceil(a[2]);\n return out;\n}\n\n/**\n * Math.floor the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to floor\n * @returns {vec3} out\n */\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n out[2] = Math.floor(a[2]);\n return out;\n}\n\n/**\n * Returns the minimum of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n return out;\n}\n\n/**\n * Returns the maximum of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n return out;\n}\n\n/**\n * symmetric round the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to round\n * @returns {vec3} out\n */\nexport function round(out, a) {\n out[0] = glMatrix.round(a[0]);\n out[1] = glMatrix.round(a[1]);\n out[2] = glMatrix.round(a[2]);\n return out;\n}\n\n/**\n * Scales a vec3 by a scalar number\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec3} out\n */\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n return out;\n}\n\n/**\n * Adds two vec3's after scaling the second operand by a scalar value\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec3} out\n */\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n return out;\n}\n\n/**\n * Calculates the euclidian distance between two vec3's\n *\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {Number} distance between a and b\n */\nexport function distance(a, b) {\n const x = b[0] - a[0];\n const y = b[1] - a[1];\n const z = b[2] - a[2];\n return Math.sqrt(x * x + y * y + z * z);\n}\n\n/**\n * Calculates the squared euclidian distance between two vec3's\n *\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {Number} squared distance between a and b\n */\nexport function squaredDistance(a, b) {\n const x = b[0] - a[0];\n const y = b[1] - a[1];\n const z = b[2] - a[2];\n return x * x + y * y + z * z;\n}\n\n/**\n * Calculates the squared length of a vec3\n *\n * @param {ReadonlyVec3} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\nexport function squaredLength(a) {\n const x = a[0];\n const y = a[1];\n const z = a[2];\n return x * x + y * y + z * z;\n}\n\n/**\n * Negates the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to negate\n * @returns {vec3} out\n */\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n return out;\n}\n\n/**\n * Returns the inverse of the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to invert\n * @returns {vec3} out\n */\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n return out;\n}\n\n/**\n * Normalize a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a vector to normalize\n * @returns {vec3} out\n */\nexport function normalize(out, a) {\n const x = a[0];\n const y = a[1];\n const z = a[2];\n let len = x * x + y * y + z * z;\n if (len > 0) {\n // TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n }\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n out[2] = a[2] * len;\n return out;\n}\n\n/**\n * Calculates the dot product of two vec3's\n *\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {Number} dot product of a and b\n */\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n\n/**\n * Computes the cross product of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @returns {vec3} out\n */\nexport function cross(out, a, b) {\n const ax = a[0];\n const ay = a[1];\n const az = a[2];\n const bx = b[0];\n const by = b[1];\n const bz = b[2];\n\n out[0] = ay * bz - az * by;\n out[1] = az * bx - ax * bz;\n out[2] = ax * by - ay * bx;\n return out;\n}\n\n/**\n * Performs a linear interpolation between two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec3} out\n */\nexport function lerp(out, a, b, t) {\n const ax = a[0];\n const ay = a[1];\n const az = a[2];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n return out;\n}\n\n/**\n * Performs a spherical linear interpolation between two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec3} out\n */\nexport function slerp(out, a, b, t) {\n const angle = Math.acos(Math.min(Math.max(dot(a, b), -1), 1));\n const sinTotal = Math.sin(angle);\n\n const ratioA = Math.sin((1 - t) * angle) / sinTotal;\n const ratioB = Math.sin(t * angle) / sinTotal;\n out[0] = ratioA * a[0] + ratioB * b[0];\n out[1] = ratioA * a[1] + ratioB * b[1];\n out[2] = ratioA * a[2] + ratioB * b[2];\n\n return out;\n}\n\n/**\n * Performs a hermite interpolation with two control points\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @param {ReadonlyVec3} c the third operand\n * @param {ReadonlyVec3} d the fourth operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec3} out\n */\nexport function hermite(out, a, b, c, d, t) {\n const factorTimes2 = t * t;\n const factor1 = factorTimes2 * (2 * t - 3) + 1;\n const factor2 = factorTimes2 * (t - 2) + t;\n const factor3 = factorTimes2 * (t - 1);\n const factor4 = factorTimes2 * (3 - 2 * t);\n\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n\n return out;\n}\n\n/**\n * Performs a bezier interpolation with two control points\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the first operand\n * @param {ReadonlyVec3} b the second operand\n * @param {ReadonlyVec3} c the third operand\n * @param {ReadonlyVec3} d the fourth operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec3} out\n */\nexport function bezier(out, a, b, c, d, t) {\n const inverseFactor = 1 - t;\n const inverseFactorTimesTwo = inverseFactor * inverseFactor;\n const factorTimes2 = t * t;\n const factor1 = inverseFactorTimesTwo * inverseFactor;\n const factor2 = 3 * t * inverseFactorTimesTwo;\n const factor3 = 3 * factorTimes2 * inverseFactor;\n const factor4 = factorTimes2 * t;\n\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n\n return out;\n}\n\n/**\n * Generates a random vector with the given scale\n *\n * @param {vec3} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If omitted, a unit vector will be returned\n * @returns {vec3} out\n */\nexport function random(out, scale) {\n scale = scale === undefined ? 1.0 : scale;\n\n const r = glMatrix.RANDOM() * 2.0 * Math.PI;\n const z = glMatrix.RANDOM() * 2.0 - 1.0;\n const zScale = Math.sqrt(1.0 - z * z) * scale;\n\n out[0] = Math.cos(r) * zScale;\n out[1] = Math.sin(r) * zScale;\n out[2] = z * scale;\n return out;\n}\n\n/**\n * Transforms the vec3 with a mat4.\n * 4th vector component is implicitly '1'\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the vector to transform\n * @param {ReadonlyMat4} m matrix to transform with\n * @returns {vec3} out\n */\nexport function transformMat4(out, a, m) {\n const x = a[0];\n const y = a[1];\n const z = a[2];\n let w = m[3] * x + m[7] * y + m[11] * z + m[15];\n w = w || 1.0;\n out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;\n out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;\n out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;\n return out;\n}\n\n/**\n * Transforms the vec3 with a mat3.\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the vector to transform\n * @param {ReadonlyMat3} m the 3x3 matrix to transform with\n * @returns {vec3} out\n */\nexport function transformMat3(out, a, m) {\n const x = a[0];\n const y = a[1];\n const z = a[2];\n out[0] = x * m[0] + y * m[3] + z * m[6];\n out[1] = x * m[1] + y * m[4] + z * m[7];\n out[2] = x * m[2] + y * m[5] + z * m[8];\n return out;\n}\n\n/**\n * Transforms the vec3 with a quat\n * Can also be used for dual quaternions. (Multiply it with the real part)\n *\n * @param {vec3} out the receiving vector\n * @param {ReadonlyVec3} a the vector to transform\n * @param {ReadonlyQuat} q quaternion to transform with\n * @returns {vec3} out\n */\nexport function transformQuat(out, a, q) {\n // benchmarks: https://jsperf.com/quaternion-transform-vec3-implementations-fixed\n const qx = q[0];\n const qy = q[1];\n const qz = q[2];\n const qw = q[3];\n const x = a[0];\n const y = a[1];\n const z = a[2];\n // var qvec = [qx, qy, qz];\n // var uv = vec3.cross([], qvec, a);\n let uvx = qy * z - qz * y;\n let uvy = qz * x - qx * z;\n let uvz = qx * y - qy * x;\n // var uuv = vec3.cross([], qvec, uv);\n let uuvx = qy * uvz - qz * uvy;\n let uuvy = qz * uvx - qx * uvz;\n let uuvz = qx * uvy - qy * uvx;\n // vec3.scale(uv, uv, 2 * w);\n const w2 = qw * 2;\n uvx *= w2;\n uvy *= w2;\n uvz *= w2;\n // vec3.scale(uuv, uuv, 2);\n uuvx *= 2;\n uuvy *= 2;\n uuvz *= 2;\n // return vec3.add(out, a, vec3.add(out, uv, uuv));\n out[0] = x + uvx + uuvx;\n out[1] = y + uvy + uuvy;\n out[2] = z + uvz + uuvz;\n return out;\n}\n\n/**\n * Rotate a 3D vector around the x-axis\n * @param {vec3} out The receiving vec3\n * @param {ReadonlyVec3} a The vec3 point to rotate\n * @param {ReadonlyVec3} b The origin of the rotation\n * @param {Number} rad The angle of rotation in radians\n * @returns {vec3} out\n */\nexport function rotateX(out, a, b, rad) {\n const p = [];\n const r = [];\n // Translate point to the origin\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2];\n\n // perform rotation\n r[0] = p[0];\n r[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad);\n r[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad);\n\n // translate to correct position\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n\n return out;\n}\n\n/**\n * Rotate a 3D vector around the y-axis\n * @param {vec3} out The receiving vec3\n * @param {ReadonlyVec3} a The vec3 point to rotate\n * @param {ReadonlyVec3} b The origin of the rotation\n * @param {Number} rad The angle of rotation in radians\n * @returns {vec3} out\n */\nexport function rotateY(out, a, b, rad) {\n const p = [];\n const r = [];\n // Translate point to the origin\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2];\n\n // perform rotation\n r[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad);\n r[1] = p[1];\n r[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad);\n\n // translate to correct position\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n\n return out;\n}\n\n/**\n * Rotate a 3D vector around the z-axis\n * @param {vec3} out The receiving vec3\n * @param {ReadonlyVec3} a The vec3 point to rotate\n * @param {ReadonlyVec3} b The origin of the rotation\n * @param {Number} rad The angle of rotation in radians\n * @returns {vec3} out\n */\nexport function rotateZ(out, a, b, rad) {\n const p = [];\n const r = [];\n // Translate point to the origin\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2];\n\n // perform rotation\n r[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad);\n r[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad);\n r[2] = p[2];\n\n // translate to correct position\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n\n return out;\n}\n\n/**\n * Get the angle between two 3D vectors\n * @param {ReadonlyVec3} a The first operand\n * @param {ReadonlyVec3} b The second operand\n * @returns {Number} The angle in radians\n */\nexport function angle(a, b) {\n const ax = a[0];\n const ay = a[1];\n const az = a[2];\n const bx = b[0];\n const by = b[1];\n const bz = b[2];\n const mag = Math.sqrt((ax * ax + ay * ay + az * az) * (bx * bx + by * by + bz * bz));\n const cosine = mag && dot(a, b) / mag;\n return Math.acos(Math.min(Math.max(cosine, -1), 1));\n}\n\n/**\n * Set the components of a vec3 to zero\n *\n * @param {vec3} out the receiving vector\n * @returns {vec3} out\n */\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n out[2] = 0.0;\n return out;\n}\n\n/**\n * Returns a string representation of a vector\n *\n * @param {ReadonlyVec3} a vector to represent as a string\n * @returns {String} string representation of the vector\n */\nexport function str(a) {\n return `vec3(${a[0]}, ${a[1]}, ${a[2]})`;\n}\n\n/**\n * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyVec3} a The first vector.\n * @param {ReadonlyVec3} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2];\n}\n\n/**\n * Returns whether or not the vectors have approximately the same elements in the same position.\n *\n * @param {ReadonlyVec3} a The first vector.\n * @param {ReadonlyVec3} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\nexport function equals(a, b) {\n const a0 = a[0];\n const a1 = a[1];\n const a2 = a[2];\n const b0 = b[0];\n const b1 = b[1];\n const b2 = b[2];\n return (\n Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) &&\n Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) &&\n Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2))\n );\n}\n\n/**\n * Alias for {@link vec3.subtract}\n * @function\n */\nexport const sub = subtract;\n\n/**\n * Alias for {@link vec3.multiply}\n * @function\n */\nexport const mul = multiply;\n\n/**\n * Alias for {@link vec3.divide}\n * @function\n */\nexport const div = divide;\n\n/**\n * Alias for {@link vec3.distance}\n * @function\n */\nexport const dist = distance;\n\n/**\n * Alias for {@link vec3.squaredDistance}\n * @function\n */\nexport const sqrDist = squaredDistance;\n\n/**\n * Alias for {@link vec3.length}\n * @function\n */\nexport const len = length;\n\n/**\n * Alias for {@link vec3.squaredLength}\n * @function\n */\nexport const sqrLen = squaredLength;\n\n/**\n * Perform some operation over an array of vec3s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\nexport const forEach = (function () {\n const vec = create();\n\n return function (a, stride, offset, count, fn, arg) {\n let i;\n let l;\n if (!stride) {\n stride = 3;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n vec[2] = a[i + 2];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n a[i + 2] = vec[2];\n }\n\n return a;\n };\n})();\n", "// math.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n// Copyright (c) 2017 Uber Technologies, Inc.\n\nimport {NumericArray, NumericArray3} from '@math.gl/types';\nimport {Vector} from './base/vector';\nimport {config, isArray} from '../lib/common';\nimport {checkNumber} from '../lib/validators';\n// @ts-ignore gl-matrix types\nimport {\n angle as vec3_angle,\n cross as vec3_cross,\n rotateX as vec3_rotateX,\n rotateY as vec3_rotateY,\n rotateZ as vec3_rotateZ,\n transformMat4 as vec3_transformMat4,\n transformMat3 as vec3_transformMat3,\n transformQuat as vec3_transformQuat\n} from '../gl-matrix/vec3';\n/* eslint-disable camelcase */\nimport {vec3_transformMat2, vec3_transformMat4AsVector} from '../lib/gl-matrix-extras';\n\nconst ORIGIN = [0, 0, 0];\n\nlet ZERO: Vector3;\n\n/** Helper type that captures array length for a 3 element vector */\nexport type Vector3Like = Vector3 | NumericArray3;\n\n/**\n * Three-element vector class with common linear algebra operations.\n * Subclass of Array meaning that it is highly compatible with other libraries\n */\nexport class Vector3 extends Vector {\n static get ZERO(): Vector3 {\n if (!ZERO) {\n ZERO = new Vector3(0, 0, 0);\n Object.freeze(ZERO);\n }\n return ZERO;\n }\n\n /**\n * @class\n * @param x\n * @param y\n * @param z\n */\n constructor(x: number | Readonly = 0, y: number = 0, z: number = 0) {\n // PERF NOTE: initialize elements as double precision numbers\n super(-0, -0, -0);\n if (arguments.length === 1 && isArray(x)) {\n this.copy(x as NumericArray);\n } else {\n // this.set(x, y, z);\n if (config.debug) {\n checkNumber(x);\n checkNumber(y);\n checkNumber(z);\n }\n // @ts-expect-error TS2412: Property '0' of type 'number | [number, number, number]' is not assignable to numeric index type 'number'\n this[0] = x;\n this[1] = y;\n this[2] = z;\n }\n }\n\n set(x: number, y: number, z: number): this {\n this[0] = x;\n this[1] = y;\n this[2] = z;\n return this.check();\n }\n\n copy(array: Readonly): this {\n this[0] = array[0];\n this[1] = array[1];\n this[2] = array[2];\n return this.check();\n }\n\n fromObject(object: {x: number; y: number; z: number}): this {\n if (config.debug) {\n checkNumber(object.x);\n checkNumber(object.y);\n checkNumber(object.z);\n }\n this[0] = object.x;\n this[1] = object.y;\n this[2] = object.z;\n return this.check();\n }\n\n override toObject(object: {x?: number; y?: number; z?: number}): {\n x: number;\n y: number;\n z: number;\n } {\n object.x = this[0];\n object.y = this[1];\n object.z = this[2];\n return object as {x: number; y: number; z: number};\n }\n\n // Getters/setters\n\n get ELEMENTS(): number {\n return 3;\n }\n get z(): number {\n return this[2];\n }\n set z(value: number) {\n this[2] = checkNumber(value);\n }\n\n // ACCESSORS\n\n angle(vector: Readonly): number {\n return vec3_angle(this, vector);\n }\n\n // MODIFIERS\n\n cross(vector: Readonly): this {\n vec3_cross(this, this, vector);\n return this.check();\n }\n\n rotateX({radians, origin = ORIGIN}: {radians: number; origin?: Readonly}): this {\n vec3_rotateX(this, this, origin, radians);\n return this.check();\n }\n\n rotateY({radians, origin = ORIGIN}: {radians: number; origin?: Readonly}): this {\n vec3_rotateY(this, this, origin, radians);\n return this.check();\n }\n\n rotateZ({radians, origin = ORIGIN}: {radians: number; origin?: Readonly}): this {\n vec3_rotateZ(this, this, origin, radians);\n return this.check();\n }\n\n // Transforms\n\n // transforms as point (4th component is implicitly 1)\n transform(matrix4: Readonly): this {\n return this.transformAsPoint(matrix4);\n }\n\n // transforms as point (4th component is implicitly 1)\n transformAsPoint(matrix4: Readonly): this {\n vec3_transformMat4(this, this, matrix4);\n return this.check();\n }\n\n // transforms as vector (4th component is implicitly 0, ignores translation. slightly faster)\n transformAsVector(matrix4: Readonly): this {\n vec3_transformMat4AsVector(this, this, matrix4);\n return this.check();\n }\n\n transformByMatrix3(matrix3: Readonly): this {\n vec3_transformMat3(this, this, matrix3);\n return this.check();\n }\n\n transformByMatrix2(matrix2: Readonly): this {\n vec3_transformMat2(this, this, matrix2);\n return this.check();\n }\n\n transformByQuaternion(quaternion: Readonly): this {\n vec3_transformQuat(this, this, quaternion);\n return this.check();\n }\n}\n", "// math.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n// Copyright (c) 2017 Uber Technologies, Inc.\n\nimport {NumericArray, NumericArray4} from '@math.gl/types';\n/* eslint-disable camelcase */\nimport {\n transformMat4 as vec4_transformMat4,\n transformQuat as vec4_transformQuat\n} from '../gl-matrix/vec3';\nimport {vec4_transformMat2, vec4_transformMat3} from '../lib/gl-matrix-extras';\n\nimport {Vector} from './base/vector';\nimport {config, isArray} from '../lib/common';\nimport {checkNumber} from '../lib/validators';\n\nimport type {Matrix4} from './matrix4';\n\nlet ZERO: Vector4;\n\n/** Helper type that captures array length for a 4 element vector */\nexport type Vector4Like = Vector4 | NumericArray4;\n\n/**\n * Four-element vector class with common linear algebra operations.\n * Subclass of Array meaning that it is highly compatible with other libraries\n */\nexport class Vector4 extends Vector {\n static get ZERO(): Vector4 {\n if (!ZERO) {\n ZERO = new Vector4(0, 0, 0, 0);\n Object.freeze(ZERO);\n }\n return ZERO;\n }\n\n constructor(x: number | Readonly = 0, y: number = 0, z: number = 0, w: number = 0) {\n // PERF NOTE: initialize elements as double precision numbers\n super(-0, -0, -0, -0);\n if (isArray(x) && arguments.length === 1) {\n this.copy(x as Readonly);\n } else {\n // this.set(x, y, z, w);\n if (config.debug) {\n checkNumber(x);\n checkNumber(y);\n checkNumber(z);\n checkNumber(w);\n }\n this[0] = x as number;\n this[1] = y;\n this[2] = z;\n this[3] = w;\n }\n }\n\n set(x: number, y: number, z: number, w: number): this {\n this[0] = x;\n this[1] = y;\n this[2] = z;\n this[3] = w;\n return this.check();\n }\n\n copy(array: Readonly): this {\n this[0] = array[0];\n this[1] = array[1];\n this[2] = array[2];\n this[3] = array[3];\n return this.check();\n }\n\n fromObject(object: {x: number; y: number; z: number; w: number}): this {\n if (config.debug) {\n checkNumber(object.x);\n checkNumber(object.y);\n checkNumber(object.z);\n checkNumber(object.w);\n }\n this[0] = object.x;\n this[1] = object.y;\n this[2] = object.z;\n this[3] = object.w;\n return this;\n }\n\n override toObject(object: {x?: number; y?: number; z?: number; w?: number}): {\n x: number;\n y: number;\n z: number;\n w: number;\n } {\n object.x = this[0];\n object.y = this[1];\n object.z = this[2];\n object.w = this[3];\n return object as {\n x: number;\n y: number;\n z: number;\n w: number;\n };\n }\n\n // Getters/setters\n /* eslint-disable no-multi-spaces, brace-style, no-return-assign */\n get ELEMENTS(): number {\n return 4;\n }\n\n get z(): number {\n return this[2];\n }\n set z(value: number) {\n this[2] = checkNumber(value);\n }\n get w(): number {\n return this[3];\n }\n set w(value: number) {\n this[3] = checkNumber(value);\n }\n\n transform(matrix4: Readonly): this {\n vec4_transformMat4(this, this, matrix4);\n return this.check();\n }\n\n transformByMatrix3(matrix3: Readonly): this {\n vec4_transformMat3(this, this, matrix3);\n return this.check();\n }\n\n transformByMatrix2(matrix2: Readonly): this {\n vec4_transformMat2(this, this, matrix2);\n return this.check();\n }\n\n transformByQuaternion(quaternion: Readonly): this {\n vec4_transformQuat(this, this, quaternion);\n return this.check();\n }\n\n // three.js compatibility\n applyMatrix4(m: Matrix4): this {\n m.transform(this, this);\n return this;\n }\n}\n", "// math.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n// Copyright (c) 2017 Uber Technologies, Inc.\n\nimport {NumericArray} from '@math.gl/types';\nimport {MathArray} from './math-array';\nimport {checkNumber} from '../../lib/validators';\nimport {config} from '../../lib/common';\n\n/** Base class for matrices */\nexport abstract class Matrix extends MathArray {\n abstract get RANK(): number;\n\n // fromObject(object) {\n // const array = object.elements;\n // return this.fromRowMajor(array);\n // }\n // toObject(object) {\n // const array = object.elements;\n // this.toRowMajor(array);\n // return object;\n // }\n\n // TODO better override formatString?\n override toString(): string {\n let string = '[';\n if (config.printRowMajor) {\n string += 'row-major:';\n for (let row = 0; row < this.RANK; ++row) {\n for (let col = 0; col < this.RANK; ++col) {\n string += ` ${this[col * this.RANK + row]}`;\n }\n }\n } else {\n string += 'column-major:';\n for (let i = 0; i < this.ELEMENTS; ++i) {\n string += ` ${this[i]}`;\n }\n }\n string += ']';\n return string;\n }\n\n getElementIndex(row: number, col: number): number {\n return col * this.RANK + row;\n }\n\n // By default assumes row major indices\n getElement(row: number, col: number): number {\n return this[col * this.RANK + row];\n }\n\n // By default assumes row major indices\n setElement(row: number, col: number, value: number): this {\n this[col * this.RANK + row] = checkNumber(value);\n return this;\n }\n getColumn(columnIndex: number, result: NumArrayT): NumArrayT;\n getColumn(columnIndex: number): number[];\n\n getColumn(\n columnIndex: number,\n result: number[] = new Array(this.RANK).fill(-0)\n ): number[] {\n const firstIndex = columnIndex * this.RANK;\n for (let i = 0; i < this.RANK; ++i) {\n result[i] = this[firstIndex + i];\n }\n return result;\n }\n\n setColumn(columnIndex: number, columnVector: Readonly): this {\n const firstIndex = columnIndex * this.RANK;\n for (let i = 0; i < this.RANK; ++i) {\n this[firstIndex + i] = columnVector[i];\n }\n return this;\n }\n}\n", "import * as glMatrix from './common.js';\n\n/**\n * 3x3 Matrix\n * @module mat3\n */\n\n/**\n * Creates a new identity mat3\n *\n * @returns {mat3} a new 3x3 matrix\n */\nexport function create() {\n const out = new glMatrix.ARRAY_TYPE(9);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n }\n out[0] = 1;\n out[4] = 1;\n out[8] = 1;\n return out;\n}\n\n/**\n * Copies the upper-left 3x3 values into the given mat3.\n *\n * @param {mat3} out the receiving 3x3 matrix\n * @param {ReadonlyMat4} a the source 4x4 matrix\n * @returns {mat3} out\n */\nexport function fromMat4(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[4];\n out[4] = a[5];\n out[5] = a[6];\n out[6] = a[8];\n out[7] = a[9];\n out[8] = a[10];\n return out;\n}\n\n/**\n * Creates a new mat3 initialized with values from an existing matrix\n *\n * @param {ReadonlyMat3} a matrix to clone\n * @returns {mat3} a new 3x3 matrix\n */\nexport function clone(a) {\n const out = new glMatrix.ARRAY_TYPE(9);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n}\n\n/**\n * Copy the values from one mat3 to another\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the source matrix\n * @returns {mat3} out\n */\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n}\n\n/**\n * Create a new mat3 with the given values\n *\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\n * @param {Number} m10 Component in column 1, row 0 position (index 3)\n * @param {Number} m11 Component in column 1, row 1 position (index 4)\n * @param {Number} m12 Component in column 1, row 2 position (index 5)\n * @param {Number} m20 Component in column 2, row 0 position (index 6)\n * @param {Number} m21 Component in column 2, row 1 position (index 7)\n * @param {Number} m22 Component in column 2, row 2 position (index 8)\n * @returns {mat3} A new mat3\n */\nexport function fromValues(m00, m01, m02, m10, m11, m12, m20, m21, m22) {\n const out = new glMatrix.ARRAY_TYPE(9);\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m10;\n out[4] = m11;\n out[5] = m12;\n out[6] = m20;\n out[7] = m21;\n out[8] = m22;\n return out;\n}\n\n/**\n * Set the components of a mat3 to the given values\n *\n * @param {mat3} out the receiving matrix\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\n * @param {Number} m10 Component in column 1, row 0 position (index 3)\n * @param {Number} m11 Component in column 1, row 1 position (index 4)\n * @param {Number} m12 Component in column 1, row 2 position (index 5)\n * @param {Number} m20 Component in column 2, row 0 position (index 6)\n * @param {Number} m21 Component in column 2, row 1 position (index 7)\n * @param {Number} m22 Component in column 2, row 2 position (index 8)\n * @returns {mat3} out\n */\nexport function set(out, m00, m01, m02, m10, m11, m12, m20, m21, m22) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m10;\n out[4] = m11;\n out[5] = m12;\n out[6] = m20;\n out[7] = m21;\n out[8] = m22;\n return out;\n}\n\n/**\n * Set a mat3 to the identity matrix\n *\n * @param {mat3} out the receiving matrix\n * @returns {mat3} out\n */\nexport function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\n\n/**\n * Transpose the values of a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the source matrix\n * @returns {mat3} out\n */\nexport function transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n const a01 = a[1];\n const a02 = a[2];\n const a12 = a[5];\n out[1] = a[3];\n out[2] = a[6];\n out[3] = a01;\n out[5] = a[7];\n out[6] = a02;\n out[7] = a12;\n } else {\n out[0] = a[0];\n out[1] = a[3];\n out[2] = a[6];\n out[3] = a[1];\n out[4] = a[4];\n out[5] = a[7];\n out[6] = a[2];\n out[7] = a[5];\n out[8] = a[8];\n }\n\n return out;\n}\n\n/**\n * Inverts a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the source matrix\n * @returns {mat3} out\n */\nexport function invert(out, a) {\n const a00 = a[0];\n const a01 = a[1];\n const a02 = a[2];\n const a10 = a[3];\n const a11 = a[4];\n const a12 = a[5];\n const a20 = a[6];\n const a21 = a[7];\n const a22 = a[8];\n\n const b01 = a22 * a11 - a12 * a21;\n const b11 = -a22 * a10 + a12 * a20;\n const b21 = a21 * a10 - a11 * a20;\n\n // Calculate the determinant\n let det = a00 * b01 + a01 * b11 + a02 * b21;\n\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n\n out[0] = b01 * det;\n out[1] = (-a22 * a01 + a02 * a21) * det;\n out[2] = (a12 * a01 - a02 * a11) * det;\n out[3] = b11 * det;\n out[4] = (a22 * a00 - a02 * a20) * det;\n out[5] = (-a12 * a00 + a02 * a10) * det;\n out[6] = b21 * det;\n out[7] = (-a21 * a00 + a01 * a20) * det;\n out[8] = (a11 * a00 - a01 * a10) * det;\n return out;\n}\n\n/**\n * Calculates the adjugate of a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the source matrix\n * @returns {mat3} out\n */\nexport function adjoint(out, a) {\n const a00 = a[0];\n const a01 = a[1];\n const a02 = a[2];\n const a10 = a[3];\n const a11 = a[4];\n const a12 = a[5];\n const a20 = a[6];\n const a21 = a[7];\n const a22 = a[8];\n\n out[0] = a11 * a22 - a12 * a21;\n out[1] = a02 * a21 - a01 * a22;\n out[2] = a01 * a12 - a02 * a11;\n out[3] = a12 * a20 - a10 * a22;\n out[4] = a00 * a22 - a02 * a20;\n out[5] = a02 * a10 - a00 * a12;\n out[6] = a10 * a21 - a11 * a20;\n out[7] = a01 * a20 - a00 * a21;\n out[8] = a00 * a11 - a01 * a10;\n return out;\n}\n\n/**\n * Calculates the determinant of a mat3\n *\n * @param {ReadonlyMat3} a the source matrix\n * @returns {Number} determinant of a\n */\nexport function determinant(a) {\n const a00 = a[0];\n const a01 = a[1];\n const a02 = a[2];\n const a10 = a[3];\n const a11 = a[4];\n const a12 = a[5];\n const a20 = a[6];\n const a21 = a[7];\n const a22 = a[8];\n\n return (\n a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20)\n );\n}\n\n/**\n * Multiplies two mat3's\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the first operand\n * @param {ReadonlyMat3} b the second operand\n * @returns {mat3} out\n */\nexport function multiply(out, a, b) {\n const a00 = a[0];\n const a01 = a[1];\n const a02 = a[2];\n const a10 = a[3];\n const a11 = a[4];\n const a12 = a[5];\n const a20 = a[6];\n const a21 = a[7];\n const a22 = a[8];\n\n const b00 = b[0];\n const b01 = b[1];\n const b02 = b[2];\n const b10 = b[3];\n const b11 = b[4];\n const b12 = b[5];\n const b20 = b[6];\n const b21 = b[7];\n const b22 = b[8];\n\n out[0] = b00 * a00 + b01 * a10 + b02 * a20;\n out[1] = b00 * a01 + b01 * a11 + b02 * a21;\n out[2] = b00 * a02 + b01 * a12 + b02 * a22;\n\n out[3] = b10 * a00 + b11 * a10 + b12 * a20;\n out[4] = b10 * a01 + b11 * a11 + b12 * a21;\n out[5] = b10 * a02 + b11 * a12 + b12 * a22;\n\n out[6] = b20 * a00 + b21 * a10 + b22 * a20;\n out[7] = b20 * a01 + b21 * a11 + b22 * a21;\n out[8] = b20 * a02 + b21 * a12 + b22 * a22;\n return out;\n}\n\n/**\n * Translate a mat3 by the given vector\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the matrix to translate\n * @param {ReadonlyVec2} v vector to translate by\n * @returns {mat3} out\n */\nexport function translate(out, a, v) {\n const a00 = a[0];\n const a01 = a[1];\n const a02 = a[2];\n const a10 = a[3];\n const a11 = a[4];\n const a12 = a[5];\n const a20 = a[6];\n const a21 = a[7];\n const a22 = a[8];\n const x = v[0];\n const y = v[1];\n\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n\n out[3] = a10;\n out[4] = a11;\n out[5] = a12;\n\n out[6] = x * a00 + y * a10 + a20;\n out[7] = x * a01 + y * a11 + a21;\n out[8] = x * a02 + y * a12 + a22;\n return out;\n}\n\n/**\n * Rotates a mat3 by the given angle\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat3} out\n */\nexport function rotate(out, a, rad) {\n const a00 = a[0];\n const a01 = a[1];\n const a02 = a[2];\n const a10 = a[3];\n const a11 = a[4];\n const a12 = a[5];\n const a20 = a[6];\n const a21 = a[7];\n const a22 = a[8];\n const s = Math.sin(rad);\n const c = Math.cos(rad);\n\n out[0] = c * a00 + s * a10;\n out[1] = c * a01 + s * a11;\n out[2] = c * a02 + s * a12;\n\n out[3] = c * a10 - s * a00;\n out[4] = c * a11 - s * a01;\n out[5] = c * a12 - s * a02;\n\n out[6] = a20;\n out[7] = a21;\n out[8] = a22;\n return out;\n}\n\n/**\n * Scales the mat3 by the dimensions in the given vec2\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the matrix to scale\n * @param {ReadonlyVec2} v the vec2 to scale the matrix by\n * @returns {mat3} out\n **/\nexport function scale(out, a, v) {\n const x = v[0];\n const y = v[1];\n\n out[0] = x * a[0];\n out[1] = x * a[1];\n out[2] = x * a[2];\n\n out[3] = y * a[3];\n out[4] = y * a[4];\n out[5] = y * a[5];\n\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n}\n\n/**\n * Creates a matrix from a vector translation\n * This is equivalent to (but much faster than):\n *\n * mat3.identity(dest);\n * mat3.translate(dest, dest, vec);\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {ReadonlyVec2} v Translation vector\n * @returns {mat3} out\n */\nexport function fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = v[0];\n out[7] = v[1];\n out[8] = 1;\n return out;\n}\n\n/**\n * Creates a matrix from a given angle\n * This is equivalent to (but much faster than):\n *\n * mat3.identity(dest);\n * mat3.rotate(dest, dest, rad);\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat3} out\n */\nexport function fromRotation(out, rad) {\n const s = Math.sin(rad);\n const c = Math.cos(rad);\n\n out[0] = c;\n out[1] = s;\n out[2] = 0;\n\n out[3] = -s;\n out[4] = c;\n out[5] = 0;\n\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\n\n/**\n * Creates a matrix from a vector scaling\n * This is equivalent to (but much faster than):\n *\n * mat3.identity(dest);\n * mat3.scale(dest, dest, vec);\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {ReadonlyVec2} v Scaling vector\n * @returns {mat3} out\n */\nexport function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n\n out[3] = 0;\n out[4] = v[1];\n out[5] = 0;\n\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\n\n/**\n * Copies the values from a mat2d into a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat2d} a the matrix to copy\n * @returns {mat3} out\n **/\nexport function fromMat2d(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = 0;\n\n out[3] = a[2];\n out[4] = a[3];\n out[5] = 0;\n\n out[6] = a[4];\n out[7] = a[5];\n out[8] = 1;\n return out;\n}\n\n/**\n * Calculates a 3x3 matrix from the given quaternion\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {ReadonlyQuat} q Quaternion to create matrix from\n *\n * @returns {mat3} out\n */\nexport function fromQuat(out, q) {\n const x = q[0];\n const y = q[1];\n const z = q[2];\n const w = q[3];\n const x2 = x + x;\n const y2 = y + y;\n 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 out[0] = 1 - yy - zz;\n out[3] = yx - wz;\n out[6] = zx + wy;\n\n out[1] = yx + wz;\n out[4] = 1 - xx - zz;\n out[7] = zy - wx;\n\n out[2] = zx - wy;\n out[5] = zy + wx;\n out[8] = 1 - xx - yy;\n\n return out;\n}\n\n/**\n * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {ReadonlyMat4} a Mat4 to derive the normal matrix from\n *\n * @returns {mat3} out\n */\nexport function normalFromMat4(out, a) {\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];\n const a11 = a[5];\n const a12 = a[6];\n const a13 = a[7];\n const a20 = a[8];\n const a21 = a[9];\n const a22 = a[10];\n const a23 = a[11];\n const a30 = a[12];\n const a31 = a[13];\n const a32 = a[14];\n const a33 = a[15];\n\n const b00 = a00 * a11 - a01 * a10;\n const b01 = a00 * a12 - a02 * a10;\n const b02 = a00 * a13 - a03 * a10;\n const b03 = a01 * a12 - a02 * a11;\n const b04 = a01 * a13 - a03 * a11;\n const b05 = a02 * a13 - a03 * a12;\n const b06 = a20 * a31 - a21 * a30;\n const b07 = a20 * a32 - a22 * a30;\n const b08 = a20 * a33 - a23 * a30;\n const b09 = a21 * a32 - a22 * a31;\n const b10 = a21 * a33 - a23 * a31;\n const b11 = a22 * a33 - a23 * a32;\n\n // Calculate the determinant\n let det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n\n return out;\n}\n\n/**\n * Generates a 2D projection matrix with the given bounds\n *\n * @param {mat3} out mat3 frustum matrix will be written into\n * @param {number} width Width of your gl context\n * @param {number} height Height of gl context\n * @returns {mat3} out\n */\nexport function projection(out, width, height) {\n out[0] = 2 / width;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = -2 / height;\n out[5] = 0;\n out[6] = -1;\n out[7] = 1;\n out[8] = 1;\n return out;\n}\n\n/**\n * Returns a string representation of a mat3\n *\n * @param {ReadonlyMat3} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\nexport function str(a) {\n return `mat3(${a[0]}, ${a[1]}, ${a[2]}, ${a[3]}, ${a[4]}, ${a[5]}, ${a[6]}, ${a[7]}, ${a[8]})`;\n}\n\n/**\n * Returns Frobenius norm of a mat3\n *\n * @param {ReadonlyMat3} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\nexport function frob(a) {\n return Math.sqrt(\n a[0] * a[0] +\n a[1] * a[1] +\n a[2] * a[2] +\n a[3] * a[3] +\n a[4] * a[4] +\n a[5] * a[5] +\n a[6] * a[6] +\n a[7] * a[7] +\n a[8] * a[8]\n );\n}\n\n/**\n * Adds two mat3's\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the first operand\n * @param {ReadonlyMat3} b the second operand\n * @returns {mat3} out\n */\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n out[8] = a[8] + b[8];\n return out;\n}\n\n/**\n * Subtracts matrix b from matrix a\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the first operand\n * @param {ReadonlyMat3} b the second operand\n * @returns {mat3} out\n */\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n out[6] = a[6] - b[6];\n out[7] = a[7] - b[7];\n out[8] = a[8] - b[8];\n return out;\n}\n\n/**\n * Multiply each element of the matrix by a scalar.\n *\n * @param {mat3} out the receiving matrix\n * @param {ReadonlyMat3} a the matrix to scale\n * @param {Number} b amount to scale the matrix's elements by\n * @returns {mat3} out\n */\nexport function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n out[8] = a[8] * b;\n return out;\n}\n\n/**\n * Adds two mat3's after multiplying each element of the second operand by a scalar value.\n *\n * @param {mat3} out the receiving vector\n * @param {ReadonlyMat3} a the first operand\n * @param {ReadonlyMat3} b the second operand\n * @param {Number} scale the amount to scale b's elements by before adding\n * @returns {mat3} out\n */\nexport function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n out[6] = a[6] + b[6] * scale;\n out[7] = a[7] + b[7] * scale;\n out[8] = a[8] + b[8] * scale;\n return out;\n}\n\n/**\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyMat3} a The first matrix.\n * @param {ReadonlyMat3} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\nexport function exactEquals(a, b) {\n return (\n 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 );\n}\n\n/**\n * Returns whether or not the matrices have approximately the same elements in the same position.\n *\n * @param {ReadonlyMat3} a The first matrix.\n * @param {ReadonlyMat3} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\nexport function equals(a, b) {\n const a0 = a[0];\n const a1 = a[1];\n const a2 = a[2];\n const a3 = a[3];\n const a4 = a[4];\n const a5 = a[5];\n const a6 = a[6];\n const a7 = a[7];\n const a8 = a[8];\n const b0 = b[0];\n const b1 = b[1];\n const b2 = b[2];\n const b3 = b[3];\n const b4 = b[4];\n const b5 = b[5];\n const b6 = b[6];\n const b7 = b[7];\n const b8 = b[8];\n return (\n Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) &&\n Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) &&\n Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) &&\n Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) &&\n Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) &&\n Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) &&\n Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) &&\n Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) &&\n Math.abs(a8 - b8) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8))\n );\n}\n\n/**\n * Alias for {@link mat3.multiply}\n * @function\n */\nexport const mul = multiply;\n\n/**\n * Alias for {@link mat3.subtract}\n * @function\n */\nexport const sub = subtract;\n", "// math.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n// Copyright (c) 2017 Uber Technologies, Inc.\n\nimport {NumericArray, NumericArray9} from '@math.gl/types';\nimport {Matrix} from './base/matrix';\nimport {checkVector} from '../lib/validators';\n\nimport {vec4_transformMat3} from '../lib/gl-matrix-extras';\n\nimport {\n fromQuat as mat3_fromQuat,\n determinant as mat3_determinant,\n transpose as mat3_transpose,\n invert as mat3_invert,\n multiply as mat3_multiply,\n rotate as mat3_rotate,\n scale as mat3_scale,\n translate as mat3_translate\n} from '../gl-matrix/mat3';\nimport {transformMat3 as vec2_transformMat3} from '../gl-matrix/vec2';\nimport {transformMat3 as vec3_transformMat3} from '../gl-matrix/vec3';\n\n// eslint-disable-next-line no-shadow\nenum INDICES {\n COL0ROW0 = 0,\n COL0ROW1 = 1,\n COL0ROW2 = 2,\n COL1ROW0 = 3,\n COL1ROW1 = 4,\n COL1ROW2 = 5,\n COL2ROW0 = 6,\n COL2ROW1 = 7,\n COL2ROW2 = 8\n}\n\nconst IDENTITY_MATRIX = Object.freeze([1, 0, 0, 0, 1, 0, 0, 0, 1]);\n\n/** Helper type that captures array length for a 3x3 matrix */\nexport type Matrix3Like = Matrix3 | NumericArray9;\n\n/**\n * A 3x3 matrix with common linear algebra operations\n * Subclass of Array meaning that it is highly compatible with other libraries\n */\nexport class Matrix3 extends Matrix {\n static get IDENTITY(): Readonly {\n return getIdentityMatrix();\n }\n\n static get ZERO(): Readonly {\n return getZeroMatrix();\n }\n\n get ELEMENTS(): number {\n return 9;\n }\n\n get RANK(): number {\n return 3;\n }\n\n get INDICES(): typeof INDICES {\n return INDICES;\n }\n\n constructor(array?: Readonly);\n /** @deprecated */\n constructor(...args: number[]);\n\n constructor(array?: number | Readonly, ...args: number[]) {\n // PERF NOTE: initialize elements as double precision numbers\n super(-0, -0, -0, -0, -0, -0, -0, -0, -0);\n if (arguments.length === 1 && Array.isArray(array)) {\n this.copy(array);\n } else if (args.length > 0) {\n this.copy([array as number, ...args]);\n } else {\n this.identity();\n }\n }\n\n copy(array: Readonly): this {\n // Element wise copy for performance\n this[0] = array[0];\n this[1] = array[1];\n this[2] = array[2];\n this[3] = array[3];\n this[4] = array[4];\n this[5] = array[5];\n this[6] = array[6];\n this[7] = array[7];\n this[8] = array[8];\n return this.check();\n }\n\n // Constructors\n\n identity(): this {\n return this.copy(IDENTITY_MATRIX);\n }\n\n /**\n *\n * @param object\n * @returns self\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n fromObject(object: {[key: string]: any}): this {\n return this.check();\n }\n\n /** Calculates a 3x3 matrix from the given quaternion\n * q quat Quaternion to create matrix from\n */\n fromQuaternion(q: Readonly): this {\n mat3_fromQuat(this, q);\n return this.check();\n }\n\n /**\n * accepts column major order, stores in column major order\n */\n // eslint-disable-next-line max-params\n set(\n m00: number,\n m10: number,\n m20: number,\n m01: number,\n m11: number,\n m21: number,\n m02: number,\n m12: number,\n m22: number\n ): this {\n this[0] = m00;\n this[1] = m10;\n this[2] = m20;\n this[3] = m01;\n this[4] = m11;\n this[5] = m21;\n this[6] = m02;\n this[7] = m12;\n this[8] = m22;\n return this.check();\n }\n\n /**\n * accepts row major order, stores as column major\n */\n // eslint-disable-next-line max-params\n setRowMajor(\n m00: number,\n m01: number,\n m02: number,\n m10: number,\n m11: number,\n m12: number,\n m20: number,\n m21: number,\n m22: number\n ): this {\n this[0] = m00;\n this[1] = m10;\n this[2] = m20;\n this[3] = m01;\n this[4] = m11;\n this[5] = m21;\n this[6] = m02;\n this[7] = m12;\n this[8] = m22;\n return this.check();\n }\n\n // Accessors\n\n determinant(): number {\n return mat3_determinant(this);\n }\n\n // Modifiers\n transpose(): this {\n mat3_transpose(this, this);\n return this.check();\n }\n\n /** Invert a matrix. Note that this can fail if the matrix is not invertible */\n invert(): this {\n mat3_invert(this, this);\n return this.check();\n }\n\n // Operations\n multiplyLeft(a: NumericArray): this {\n mat3_multiply(this, a, this);\n return this.check();\n }\n\n multiplyRight(a: NumericArray): this {\n mat3_multiply(this, this, a);\n return this.check();\n }\n\n rotate(radians: number): this {\n mat3_rotate(this, this, radians);\n return this.check();\n }\n\n override scale(factor: NumericArray | number): this {\n if (Array.isArray(factor)) {\n mat3_scale(this, this, factor);\n } else {\n mat3_scale(this, this, [factor as number, factor as number]);\n }\n return this.check();\n }\n\n translate(vec: NumericArray): this {\n mat3_translate(this, this, vec);\n return this.check();\n }\n\n // Transforms\n transform(vector: Readonly, result?: NumericArray): NumericArray {\n let out: NumericArray;\n switch (vector.length) {\n case 2:\n out = vec2_transformMat3(result || [-0, -0], vector, this) as NumericArray;\n break;\n case 3:\n out = vec3_transformMat3(result || [-0, -0, -0], vector, this) as NumericArray;\n break;\n case 4:\n out = vec4_transformMat3(result || [-0, -0, -0, -0], vector, this);\n break;\n default:\n throw new Error('Illegal vector');\n }\n checkVector(out, vector.length);\n return out;\n }\n\n /** @deprecated */\n transformVector(vector: Readonly, result?: NumericArray): NumericArray {\n return this.transform(vector, result);\n }\n\n /** @deprecated */\n transformVector2(vector: Readonly, result?: NumericArray): NumericArray {\n return this.transform(vector, result);\n }\n\n /** @deprecated */\n transformVector3(vector: Readonly, result?: NumericArray): NumericArray {\n return this.transform(vector, result);\n }\n}\n\nlet ZERO_MATRIX3: Matrix3 | null;\nlet IDENTITY_MATRIX3: Matrix3 | null = null;\n\nfunction getZeroMatrix(): Readonly {\n if (!ZERO_MATRIX3) {\n ZERO_MATRIX3 = new Matrix3([0, 0, 0, 0, 0, 0, 0, 0, 0]);\n Object.freeze(ZERO_MATRIX3);\n }\n return ZERO_MATRIX3;\n}\n\nfunction getIdentityMatrix(): Matrix3 {\n if (!IDENTITY_MATRIX3) {\n IDENTITY_MATRIX3 = new Matrix3();\n Object.freeze(IDENTITY_MATRIX3);\n }\n return IDENTITY_MATRIX3;\n}\n", "// @eslint-disable\n// @ts-nocheck\n\nimport * as glMatrix from './common.js';\n\n/**\n * 4x4 Matrix
Format: column-major, when typed out it looks like row-major
The matrices are being post multiplied.\n * @module mat4\n */\n\n/**\n * Creates a new identity mat4\n *\n * @returns a new 4x4 matrix\n */\nexport function create() {\n const out = new glMatrix.ARRAY_TYPE(16);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n }\n out[0] = 1;\n out[5] = 1;\n out[10] = 1;\n out[15] = 1;\n return out;\n}\n\n/**\n * Creates a new mat4 initialized with values from an existing matrix\n *\n * @param {ReadonlyMat4} a matrix to clone\n * @returns {mat4} a new 4x4 matrix\n */\nexport function clone(a) {\n const out = new glMatrix.ARRAY_TYPE(16);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n\n/**\n * Copy the values from one mat4 to another\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the source matrix\n * @returns {mat4} out\n */\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n\n/**\n * Create a new mat4 with the given values\n *\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\n * @returns {mat4} A new mat4\n */\nexport function fromValues(\n m00,\n m01,\n m02,\n m03,\n m10,\n m11,\n m12,\n m13,\n m20,\n m21,\n m22,\n m23,\n m30,\n m31,\n m32,\n m33\n) {\n const out = new glMatrix.ARRAY_TYPE(16);\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n}\n\n/**\n * Set the components of a mat4 to the given values\n *\n * @param {mat4} out the receiving matrix\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\n * @returns {mat4} out\n */\nexport function set(\n out,\n m00,\n m01,\n m02,\n m03,\n m10,\n m11,\n m12,\n m13,\n m20,\n m21,\n m22,\n m23,\n m30,\n m31,\n m32,\n m33\n) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n}\n\n/**\n * Set a mat4 to the identity matrix\n *\n * @param {mat4} out the receiving matrix\n * @returns {mat4} out\n */\nexport function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n\n/**\n * Transpose the values of a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the source matrix\n * @returns {mat4} out\n */\nexport function transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n const a01 = a[1];\n const a02 = a[2];\n const a03 = a[3];\n const a12 = a[6];\n const a13 = a[7];\n const a23 = a[11];\n\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a01;\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a02;\n out[9] = a12;\n out[11] = a[14];\n out[12] = a03;\n out[13] = a13;\n out[14] = a23;\n } else {\n out[0] = a[0];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a[1];\n out[5] = a[5];\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a[2];\n out[9] = a[6];\n out[10] = a[10];\n out[11] = a[14];\n out[12] = a[3];\n out[13] = a[7];\n out[14] = a[11];\n out[15] = a[15];\n }\n\n return out;\n}\n\n/**\n * Inverts a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the source matrix\n * @returns {mat4} out\n */\nexport function invert(out, a) {\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];\n const a11 = a[5];\n const a12 = a[6];\n const a13 = a[7];\n const a20 = a[8];\n const a21 = a[9];\n const a22 = a[10];\n const a23 = a[11];\n const a30 = a[12];\n const a31 = a[13];\n const a32 = a[14];\n const a33 = a[15];\n\n const b00 = a00 * a11 - a01 * a10;\n const b01 = a00 * a12 - a02 * a10;\n const b02 = a00 * a13 - a03 * a10;\n const b03 = a01 * a12 - a02 * a11;\n const b04 = a01 * a13 - a03 * a11;\n const b05 = a02 * a13 - a03 * a12;\n const b06 = a20 * a31 - a21 * a30;\n const b07 = a20 * a32 - a22 * a30;\n const b08 = a20 * a33 - a23 * a30;\n const b09 = a21 * a32 - a22 * a31;\n const b10 = a21 * a33 - a23 * a31;\n const b11 = a22 * a33 - a23 * a32;\n\n // Calculate the determinant\n let det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n\n return out;\n}\n\n/**\n * Calculates the adjugate of a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the source matrix\n * @returns {mat4} out\n */\nexport function adjoint(out, a) {\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];\n const a11 = a[5];\n const a12 = a[6];\n const a13 = a[7];\n const a20 = a[8];\n const a21 = a[9];\n const a22 = a[10];\n const a23 = a[11];\n const a30 = a[12];\n const a31 = a[13];\n const a32 = a[14];\n const a33 = a[15];\n\n const b00 = a00 * a11 - a01 * a10;\n const b01 = a00 * a12 - a02 * a10;\n const b02 = a00 * a13 - a03 * a10;\n const b03 = a01 * a12 - a02 * a11;\n const b04 = a01 * a13 - a03 * a11;\n const b05 = a02 * a13 - a03 * a12;\n const b06 = a20 * a31 - a21 * a30;\n const b07 = a20 * a32 - a22 * a30;\n const b08 = a20 * a33 - a23 * a30;\n const b09 = a21 * a32 - a22 * a31;\n const b10 = a21 * a33 - a23 * a31;\n const b11 = a22 * a33 - a23 * a32;\n\n out[0] = a11 * b11 - a12 * b10 + a13 * b09;\n out[1] = a02 * b10 - a01 * b11 - a03 * b09;\n out[2] = a31 * b05 - a32 * b04 + a33 * b03;\n out[3] = a22 * b04 - a21 * b05 - a23 * b03;\n out[4] = a12 * b08 - a10 * b11 - a13 * b07;\n out[5] = a00 * b11 - a02 * b08 + a03 * b07;\n out[6] = a32 * b02 - a30 * b05 - a33 * b01;\n out[7] = a20 * b05 - a22 * b02 + a23 * b01;\n out[8] = a10 * b10 - a11 * b08 + a13 * b06;\n out[9] = a01 * b08 - a00 * b10 - a03 * b06;\n out[10] = a30 * b04 - a31 * b02 + a33 * b00;\n out[11] = a21 * b02 - a20 * b04 - a23 * b00;\n out[12] = a11 * b07 - a10 * b09 - a12 * b06;\n out[13] = a00 * b09 - a01 * b07 + a02 * b06;\n out[14] = a31 * b01 - a30 * b03 - a32 * b00;\n out[15] = a20 * b03 - a21 * b01 + a22 * b00;\n return out;\n}\n\n/**\n * Calculates the determinant of a mat4\n *\n * @param {ReadonlyMat4} a the source matrix\n * @returns {Number} determinant of a\n */\nexport function determinant(a) {\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];\n const a11 = a[5];\n const a12 = a[6];\n const a13 = a[7];\n const a20 = a[8];\n const a21 = a[9];\n const a22 = a[10];\n const a23 = a[11];\n const a30 = a[12];\n const a31 = a[13];\n const a32 = a[14];\n const a33 = a[15];\n\n const b0 = a00 * a11 - a01 * a10;\n const b1 = a00 * a12 - a02 * a10;\n const b2 = a01 * a12 - a02 * a11;\n const b3 = a20 * a31 - a21 * a30;\n const b4 = a20 * a32 - a22 * a30;\n const b5 = a21 * a32 - a22 * a31;\n const b6 = a00 * b5 - a01 * b4 + a02 * b3;\n const b7 = a10 * b5 - a11 * b4 + a12 * b3;\n const b8 = a20 * b2 - a21 * b1 + a22 * b0;\n const b9 = a30 * b2 - a31 * b1 + a32 * b0;\n\n // Calculate the determinant\n return a13 * b6 - a03 * b7 + a33 * b8 - a23 * b9;\n}\n\n/**\n * Multiplies two mat4s\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the first operand\n * @param {ReadonlyMat4} b the second operand\n * @returns {mat4} out\n */\nexport function multiply(out, a, b) {\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];\n const a11 = a[5];\n const a12 = a[6];\n const a13 = a[7];\n const a20 = a[8];\n const a21 = a[9];\n const a22 = a[10];\n const a23 = a[11];\n const a30 = a[12];\n const a31 = a[13];\n const a32 = a[14];\n const a33 = a[15];\n\n // Cache only the current line of the second matrix\n let b0 = b[0];\n let b1 = b[1];\n let b2 = b[2];\n let b3 = b[3];\n out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n\n b0 = b[4];\n b1 = b[5];\n b2 = b[6];\n b3 = b[7];\n out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n\n b0 = b[8];\n b1 = b[9];\n b2 = b[10];\n b3 = b[11];\n out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n\n b0 = b[12];\n b1 = b[13];\n b2 = b[14];\n b3 = b[15];\n out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n return out;\n}\n\n/**\n * Translate a mat4 by the given vector\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to translate\n * @param {ReadonlyVec3} v vector to translate by\n * @returns {mat4} out\n */\nexport function translate(out, a, v) {\n const x = v[0];\n const y = v[1];\n const z = v[2];\n let a00;\n let a01;\n let a02;\n let a03;\n let a10;\n let a11;\n let a12;\n let a13;\n let a20;\n let a21;\n let a22;\n let a23;\n\n if (a === out) {\n out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n } else {\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11];\n\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n out[3] = a03;\n out[4] = a10;\n out[5] = a11;\n out[6] = a12;\n out[7] = a13;\n out[8] = a20;\n out[9] = a21;\n out[10] = a22;\n out[11] = a23;\n\n out[12] = a00 * x + a10 * y + a20 * z + a[12];\n out[13] = a01 * x + a11 * y + a21 * z + a[13];\n out[14] = a02 * x + a12 * y + a22 * z + a[14];\n out[15] = a03 * x + a13 * y + a23 * z + a[15];\n }\n\n return out;\n}\n\n/**\n * Scales the mat4 by the dimensions in the given vec3 not using vectorization\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to scale\n * @param {ReadonlyVec3} v the vec3 to scale the matrix by\n * @returns {mat4} out\n **/\nexport function scale(out, a, v) {\n const x = v[0];\n const y = v[1];\n const z = v[2];\n\n out[0] = a[0] * x;\n out[1] = a[1] * x;\n out[2] = a[2] * x;\n out[3] = a[3] * x;\n out[4] = a[4] * y;\n out[5] = a[5] * y;\n out[6] = a[6] * y;\n out[7] = a[7] * y;\n out[8] = a[8] * z;\n out[9] = a[9] * z;\n out[10] = a[10] * z;\n out[11] = a[11] * z;\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n\n/**\n * Rotates a mat4 by the given angle around the given axis\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @param {ReadonlyVec3} axis the axis to rotate around\n * @returns {mat4} out\n */\nexport function rotate(out, a, rad, axis) {\n let x = axis[0];\n let y = axis[1];\n let z = axis[2];\n let len = Math.sqrt(x * x + y * y + z * z);\n let c;\n let s;\n let t;\n let a00;\n let a01;\n let a02;\n let a03;\n let a10;\n let a11;\n let a12;\n let a13;\n let a20;\n let a21;\n let a22;\n let a23;\n let b00;\n let b01;\n let b02;\n let b10;\n let b11;\n let b12;\n let b20;\n let b21;\n let b22;\n\n if (len < glMatrix.EPSILON) {\n return null;\n }\n\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c;\n\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11];\n\n // Construct the elements of the rotation matrix\n b00 = x * x * t + c;\n b01 = y * x * t + z * s;\n b02 = z * x * t - y * s;\n b10 = x * y * t - z * s;\n b11 = y * y * t + c;\n b12 = z * y * t + x * s;\n b20 = x * z * t + y * s;\n b21 = y * z * t - x * s;\n b22 = z * z * t + c;\n\n // Perform rotation-specific matrix multiplication\n out[0] = a00 * b00 + a10 * b01 + a20 * b02;\n out[1] = a01 * b00 + a11 * b01 + a21 * b02;\n out[2] = a02 * b00 + a12 * b01 + a22 * b02;\n out[3] = a03 * b00 + a13 * b01 + a23 * b02;\n out[4] = a00 * b10 + a10 * b11 + a20 * b12;\n out[5] = a01 * b10 + a11 * b11 + a21 * b12;\n out[6] = a02 * b10 + a12 * b11 + a22 * b12;\n out[7] = a03 * b10 + a13 * b11 + a23 * b12;\n out[8] = a00 * b20 + a10 * b21 + a20 * b22;\n out[9] = a01 * b20 + a11 * b21 + a21 * b22;\n out[10] = a02 * b20 + a12 * b21 + a22 * b22;\n out[11] = a03 * b20 + a13 * b21 + a23 * b22;\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n return out;\n}\n\n/**\n * Rotates a matrix by the given angle around the X axis\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\nexport function rotateX(out, a, rad) {\n const s = Math.sin(rad);\n const c = Math.cos(rad);\n const a10 = a[4];\n const a11 = a[5];\n const a12 = a[6];\n const a13 = a[7];\n const a20 = a[8];\n const a21 = a[9];\n const a22 = a[10];\n const a23 = a[11];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n\n // Perform axis-specific matrix multiplication\n out[4] = a10 * c + a20 * s;\n out[5] = a11 * c + a21 * s;\n out[6] = a12 * c + a22 * s;\n out[7] = a13 * c + a23 * s;\n out[8] = a20 * c - a10 * s;\n out[9] = a21 * c - a11 * s;\n out[10] = a22 * c - a12 * s;\n out[11] = a23 * c - a13 * s;\n return out;\n}\n\n/**\n * Rotates a matrix by the given angle around the Y axis\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\nexport function rotateY(out, a, rad) {\n const s = Math.sin(rad);\n const c = Math.cos(rad);\n const a00 = a[0];\n const a01 = a[1];\n const a02 = a[2];\n const a03 = a[3];\n const a20 = a[8];\n const a21 = a[9];\n const a22 = a[10];\n const a23 = a[11];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n\n // Perform axis-specific matrix multiplication\n out[0] = a00 * c - a20 * s;\n out[1] = a01 * c - a21 * s;\n out[2] = a02 * c - a22 * s;\n out[3] = a03 * c - a23 * s;\n out[8] = a00 * s + a20 * c;\n out[9] = a01 * s + a21 * c;\n out[10] = a02 * s + a22 * c;\n out[11] = a03 * s + a23 * c;\n return out;\n}\n\n/**\n * Rotates a matrix by the given angle around the Z axis\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\nexport function rotateZ(out, a, rad) {\n const s = Math.sin(rad);\n const c = Math.cos(rad);\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];\n const a11 = a[5];\n const a12 = a[6];\n const a13 = a[7];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n\n // Perform axis-specific matrix multiplication\n out[0] = a00 * c + a10 * s;\n out[1] = a01 * c + a11 * s;\n out[2] = a02 * c + a12 * s;\n out[3] = a03 * c + a13 * s;\n out[4] = a10 * c - a00 * s;\n out[5] = a11 * c - a01 * s;\n out[6] = a12 * c - a02 * s;\n out[7] = a13 * c - a03 * s;\n return out;\n}\n\n/**\n * Creates a matrix from a vector translation\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, dest, vec);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {ReadonlyVec3} v Translation vector\n * @returns {mat4} out\n */\nexport function fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n\n/**\n * Creates a matrix from a vector scaling\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.scale(dest, dest, vec);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {ReadonlyVec3} v Scaling vector\n * @returns {mat4} out\n */\nexport function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = v[1];\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = v[2];\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n\n/**\n * Creates a matrix from a given angle around a given axis\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.rotate(dest, dest, rad, axis);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @param {ReadonlyVec3} axis the axis to rotate around\n * @returns {mat4} out\n */\nexport function fromRotation(out, rad, axis) {\n let x = axis[0];\n let y = axis[1];\n let z = axis[2];\n let len = Math.sqrt(x * x + y * y + z * z);\n let c;\n let s;\n let t;\n\n if (len < glMatrix.EPSILON) {\n return null;\n }\n\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c;\n\n // Perform rotation-specific matrix multiplication\n out[0] = x * x * t + c;\n out[1] = y * x * t + z * s;\n out[2] = z * x * t - y * s;\n out[3] = 0;\n out[4] = x * y * t - z * s;\n out[5] = y * y * t + c;\n out[6] = z * y * t + x * s;\n out[7] = 0;\n out[8] = x * z * t + y * s;\n out[9] = y * z * t - x * s;\n out[10] = z * z * t + c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n\n/**\n * Creates a matrix from the given angle around the X axis\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.rotateX(dest, dest, rad);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\nexport function fromXRotation(out, rad) {\n const s = Math.sin(rad);\n const c = Math.cos(rad);\n\n // Perform axis-specific matrix multiplication\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = c;\n out[6] = s;\n out[7] = 0;\n out[8] = 0;\n out[9] = -s;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n\n/**\n * Creates a matrix from the given angle around the Y axis\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.rotateY(dest, dest, rad);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\nexport function fromYRotation(out, rad) {\n const s = Math.sin(rad);\n const c = Math.cos(rad);\n\n // Perform axis-specific matrix multiplication\n out[0] = c;\n out[1] = 0;\n out[2] = -s;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = s;\n out[9] = 0;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n\n/**\n * Creates a matrix from the given angle around the Z axis\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.rotateZ(dest, dest, rad);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\nexport function fromZRotation(out, rad) {\n const s = Math.sin(rad);\n const c = Math.cos(rad);\n\n // Perform axis-specific matrix multiplication\n out[0] = c;\n out[1] = s;\n out[2] = 0;\n out[3] = 0;\n out[4] = -s;\n out[5] = c;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n\n/**\n * Creates a matrix from a quaternion rotation and vector translation\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, vec);\n * let quatMat = mat4.create();\n * quat4.toMat4(quat, quatMat);\n * mat4.multiply(dest, quatMat);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat4} q Rotation quaternion\n * @param {ReadonlyVec3} v Translation vector\n * @returns {mat4} out\n */\nexport function fromRotationTranslation(out, q, v) {\n // Quaternion math\n const x = q[0];\n const y = q[1];\n const z = q[2];\n const w = q[3];\n const x2 = x + x;\n const y2 = y + y;\n const z2 = z + z;\n\n const xx = x * x2;\n const xy = x * y2;\n const xz = x * z2;\n const yy = y * y2;\n const yz = y * z2;\n const zz = z * z2;\n const wx = w * x2;\n const wy = w * y2;\n const wz = w * z2;\n\n out[0] = 1 - (yy + zz);\n out[1] = xy + wz;\n out[2] = xz - wy;\n out[3] = 0;\n out[4] = xy - wz;\n out[5] = 1 - (xx + zz);\n out[6] = yz + wx;\n out[7] = 0;\n out[8] = xz + wy;\n out[9] = yz - wx;\n out[10] = 1 - (xx + yy);\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n\n return out;\n}\n\n/**\n * Creates a new mat4 from a dual quat.\n *\n * @param {mat4} out Matrix\n * @param {ReadonlyQuat2} a Dual Quaternion\n * @returns {mat4} mat4 receiving operation result\n */\nexport function fromQuat2(out, a) {\n const translation = new glMatrix.ARRAY_TYPE(3);\n const bx = -a[0];\n const by = -a[1];\n const bz = -a[2];\n const bw = a[3];\n const ax = a[4];\n const ay = a[5];\n const az = a[6];\n const aw = a[7];\n\n const magnitude = bx * bx + by * by + bz * bz + bw * bw;\n // Only scale if it makes sense\n if (magnitude > 0) {\n translation[0] = ((ax * bw + aw * bx + ay * bz - az * by) * 2) / magnitude;\n translation[1] = ((ay * bw + aw * by + az * bx - ax * bz) * 2) / magnitude;\n translation[2] = ((az * bw + aw * bz + ax * by - ay * bx) * 2) / magnitude;\n } else {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;\n }\n fromRotationTranslation(out, a, translation);\n return out;\n}\n\n/**\n * Returns the translation vector component of a transformation\n * matrix. If a matrix is built with fromRotationTranslation,\n * the returned vector will be the same as the translation vector\n * originally supplied.\n * @param {vec3} out Vector to receive translation component\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\n * @return {vec3} out\n */\nexport function getTranslation(out, mat) {\n out[0] = mat[12];\n out[1] = mat[13];\n out[2] = mat[14];\n\n return out;\n}\n\n/**\n * Returns the scaling factor component of a transformation\n * matrix. If a matrix is built with fromRotationTranslationScale\n * with a normalized Quaternion paramter, the returned vector will be\n * the same as the scaling vector\n * originally supplied.\n * @param {vec3} out Vector to receive scaling factor component\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\n * @return {vec3} out\n */\nexport function getScaling(out, mat) {\n const m11 = mat[0];\n const m12 = mat[1];\n const m13 = mat[2];\n const m21 = mat[4];\n const m22 = mat[5];\n const m23 = mat[6];\n const m31 = mat[8];\n const m32 = mat[9];\n const m33 = mat[10];\n\n out[0] = Math.sqrt(m11 * m11 + m12 * m12 + m13 * m13);\n out[1] = Math.sqrt(m21 * m21 + m22 * m22 + m23 * m23);\n out[2] = Math.sqrt(m31 * m31 + m32 * m32 + m33 * m33);\n\n return out;\n}\n\n/**\n * Returns a quaternion representing the rotational component\n * of a transformation matrix. If a matrix is built with\n * fromRotationTranslation, the returned quaternion will be the\n * same as the quaternion originally supplied.\n * @param {quat} out Quaternion to receive the rotation component\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\n * @return {quat} out\n */\nexport function getRotation(out, mat) {\n const scaling = new glMatrix.ARRAY_TYPE(3);\n getScaling(scaling, mat);\n\n const is1 = 1 / scaling[0];\n const is2 = 1 / scaling[1];\n const is3 = 1 / scaling[2];\n\n const sm11 = mat[0] * is1;\n const sm12 = mat[1] * is2;\n const sm13 = mat[2] * is3;\n const sm21 = mat[4] * is1;\n const sm22 = mat[5] * is2;\n const sm23 = mat[6] * is3;\n const sm31 = mat[8] * is1;\n const sm32 = mat[9] * is2;\n const sm33 = mat[10] * is3;\n\n const trace = sm11 + sm22 + sm33;\n let S = 0;\n\n if (trace > 0) {\n S = Math.sqrt(trace + 1.0) * 2;\n out[3] = 0.25 * S;\n out[0] = (sm23 - sm32) / S;\n out[1] = (sm31 - sm13) / S;\n out[2] = (sm12 - sm21) / S;\n } else if (sm11 > sm22 && sm11 > sm33) {\n S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2;\n out[3] = (sm23 - sm32) / S;\n out[0] = 0.25 * S;\n out[1] = (sm12 + sm21) / S;\n out[2] = (sm31 + sm13) / S;\n } else if (sm22 > sm33) {\n S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2;\n out[3] = (sm31 - sm13) / S;\n out[0] = (sm12 + sm21) / S;\n out[1] = 0.25 * S;\n out[2] = (sm23 + sm32) / S;\n } else {\n S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2;\n out[3] = (sm12 - sm21) / S;\n out[0] = (sm31 + sm13) / S;\n out[1] = (sm23 + sm32) / S;\n out[2] = 0.25 * S;\n }\n\n return out;\n}\n\n/**\n * Decomposes a transformation matrix into its rotation, translation\n * and scale components. Returns only the rotation component\n * @param {quat} out_r Quaternion to receive the rotation component\n * @param {vec3} out_t Vector to receive the translation vector\n * @param {vec3} out_s Vector to receive the scaling factor\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\n * @returns {quat} out_r\n */\nexport function decompose(out_r, out_t, out_s, mat) {\n out_t[0] = mat[12];\n out_t[1] = mat[13];\n out_t[2] = mat[14];\n\n const m11 = mat[0];\n const m12 = mat[1];\n const m13 = mat[2];\n const m21 = mat[4];\n const m22 = mat[5];\n const m23 = mat[6];\n const m31 = mat[8];\n const m32 = mat[9];\n const m33 = mat[10];\n\n out_s[0] = Math.sqrt(m11 * m11 + m12 * m12 + m13 * m13);\n out_s[1] = Math.sqrt(m21 * m21 + m22 * m22 + m23 * m23);\n out_s[2] = Math.sqrt(m31 * m31 + m32 * m32 + m33 * m33);\n\n const is1 = 1 / out_s[0];\n const is2 = 1 / out_s[1];\n const is3 = 1 / out_s[2];\n\n const sm11 = m11 * is1;\n const sm12 = m12 * is2;\n const sm13 = m13 * is3;\n const sm21 = m21 * is1;\n const sm22 = m22 * is2;\n const sm23 = m23 * is3;\n const sm31 = m31 * is1;\n const sm32 = m32 * is2;\n const sm33 = m33 * is3;\n\n const trace = sm11 + sm22 + sm33;\n let S = 0;\n\n if (trace > 0) {\n S = Math.sqrt(trace + 1.0) * 2;\n out_r[3] = 0.25 * S;\n out_r[0] = (sm23 - sm32) / S;\n out_r[1] = (sm31 - sm13) / S;\n out_r[2] = (sm12 - sm21) / S;\n } else if (sm11 > sm22 && sm11 > sm33) {\n S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2;\n out_r[3] = (sm23 - sm32) / S;\n out_r[0] = 0.25 * S;\n out_r[1] = (sm12 + sm21) / S;\n out_r[2] = (sm31 + sm13) / S;\n } else if (sm22 > sm33) {\n S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2;\n out_r[3] = (sm31 - sm13) / S;\n out_r[0] = (sm12 + sm21) / S;\n out_r[1] = 0.25 * S;\n out_r[2] = (sm23 + sm32) / S;\n } else {\n S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2;\n out_r[3] = (sm12 - sm21) / S;\n out_r[0] = (sm31 + sm13) / S;\n out_r[1] = (sm23 + sm32) / S;\n out_r[2] = 0.25 * S;\n }\n\n return out_r;\n}\n\n/**\n * Creates a matrix from a quaternion rotation, vector translation and vector scale\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, vec);\n * let quatMat = mat4.create();\n * quat4.toMat4(quat, quatMat);\n * mat4.multiply(dest, quatMat);\n * mat4.scale(dest, scale)\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat4} q Rotation quaternion\n * @param {ReadonlyVec3} v Translation vector\n * @param {ReadonlyVec3} s Scaling vector\n * @returns {mat4} out\n */\nexport function fromRotationTranslationScale(out, q, v, s) {\n // Quaternion math\n const x = q[0];\n const y = q[1];\n const z = q[2];\n const w = q[3];\n const x2 = x + x;\n const y2 = y + y;\n const z2 = z + z;\n\n const xx = x * x2;\n const xy = x * y2;\n const xz = x * z2;\n const yy = y * y2;\n const yz = y * z2;\n const zz = z * z2;\n const wx = w * x2;\n const wy = w * y2;\n const wz = w * z2;\n const sx = s[0];\n const sy = s[1];\n const sz = s[2];\n\n out[0] = (1 - (yy + zz)) * sx;\n out[1] = (xy + wz) * sx;\n out[2] = (xz - wy) * sx;\n out[3] = 0;\n out[4] = (xy - wz) * sy;\n out[5] = (1 - (xx + zz)) * sy;\n out[6] = (yz + wx) * sy;\n out[7] = 0;\n out[8] = (xz + wy) * sz;\n out[9] = (yz - wx) * sz;\n out[10] = (1 - (xx + yy)) * sz;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n\n return out;\n}\n\n/**\n * Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, vec);\n * mat4.translate(dest, origin);\n * let quatMat = mat4.create();\n * quat4.toMat4(quat, quatMat);\n * mat4.multiply(dest, quatMat);\n * mat4.scale(dest, scale)\n * mat4.translate(dest, negativeOrigin);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat4} q Rotation quaternion\n * @param {ReadonlyVec3} v Translation vector\n * @param {ReadonlyVec3} s Scaling vector\n * @param {ReadonlyVec3} o The origin vector around which to scale and rotate\n * @returns {mat4} out\n */\nexport function fromRotationTranslationScaleOrigin(out, q, v, s, o) {\n // Quaternion math\n const x = q[0];\n const y = q[1];\n const z = q[2];\n const w = q[3];\n const x2 = x + x;\n const y2 = y + y;\n const z2 = z + z;\n\n const xx = x * x2;\n const xy = x * y2;\n const xz = x * z2;\n const yy = y * y2;\n const yz = y * z2;\n const zz = z * z2;\n const wx = w * x2;\n const wy = w * y2;\n const wz = w * z2;\n\n const sx = s[0];\n const sy = s[1];\n const sz = s[2];\n\n const ox = o[0];\n const oy = o[1];\n const oz = o[2];\n\n const out0 = (1 - (yy + zz)) * sx;\n const out1 = (xy + wz) * sx;\n const out2 = (xz - wy) * sx;\n const out4 = (xy - wz) * sy;\n const out5 = (1 - (xx + zz)) * sy;\n const out6 = (yz + wx) * sy;\n const out8 = (xz + wy) * sz;\n const out9 = (yz - wx) * sz;\n const out10 = (1 - (xx + yy)) * sz;\n\n out[0] = out0;\n out[1] = out1;\n out[2] = out2;\n out[3] = 0;\n out[4] = out4;\n out[5] = out5;\n out[6] = out6;\n out[7] = 0;\n out[8] = out8;\n out[9] = out9;\n out[10] = out10;\n out[11] = 0;\n out[12] = v[0] + ox - (out0 * ox + out4 * oy + out8 * oz);\n out[13] = v[1] + oy - (out1 * ox + out5 * oy + out9 * oz);\n out[14] = v[2] + oz - (out2 * ox + out6 * oy + out10 * oz);\n out[15] = 1;\n\n return out;\n}\n\n/**\n * Calculates a 4x4 matrix from the given quaternion\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {ReadonlyQuat} q Quaternion to create matrix from\n *\n * @returns {mat4} out\n */\nexport function fromQuat(out, q) {\n const x = q[0];\n const y = q[1];\n const z = q[2];\n const w = q[3];\n const x2 = x + x;\n const y2 = y + y;\n 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 out[0] = 1 - yy - zz;\n out[1] = yx + wz;\n out[2] = zx - wy;\n out[3] = 0;\n\n out[4] = yx - wz;\n out[5] = 1 - xx - zz;\n out[6] = zy + wx;\n out[7] = 0;\n\n out[8] = zx + wy;\n out[9] = zy - wx;\n out[10] = 1 - xx - yy;\n out[11] = 0;\n\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n\n return out;\n}\n\n/**\n * Generates a frustum matrix with the given bounds\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {Number} left Left bound of the frustum\n * @param {Number} right Right bound of the frustum\n * @param {Number} bottom Bottom bound of the frustum\n * @param {Number} top Top bound of the frustum\n * @param {Number} near Near bound of the frustum\n * @param {Number} far Far bound of the frustum\n * @returns {mat4} out\n */\nexport function frustum(out, left, right, bottom, top, near, far) {\n const rl = 1 / (right - left);\n const tb = 1 / (top - bottom);\n const nf = 1 / (near - far);\n out[0] = near * 2 * rl;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = near * 2 * tb;\n out[6] = 0;\n out[7] = 0;\n out[8] = (right + left) * rl;\n out[9] = (top + bottom) * tb;\n out[10] = (far + near) * nf;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[14] = far * near * 2 * nf;\n out[15] = 0;\n return out;\n}\n\n/**\n * Generates a perspective projection matrix with the given bounds.\n * The near/far clip planes correspond to a normalized device coordinate Z range of [-1, 1],\n * which matches WebGL/OpenGL's clip volume.\n * Passing null/undefined/no value for far will generate infinite projection matrix.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} fovy Vertical field of view in radians\n * @param {number} aspect Aspect ratio. typically viewport width/height\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum, can be null or Infinity\n * @returns {mat4} out\n */\nexport function perspectiveNO(out, fovy, aspect, near, far) {\n const f = 1.0 / Math.tan(fovy / 2);\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[15] = 0;\n if (far != null && far !== Infinity) {\n const nf = 1 / (near - far);\n out[10] = (far + near) * nf;\n out[14] = 2 * far * near * nf;\n } else {\n out[10] = -1;\n out[14] = -2 * near;\n }\n return out;\n}\n\n/**\n * Alias for {@link mat4.perspectiveNO}\n * @function\n */\nexport const perspective = perspectiveNO;\n\n/**\n * Generates a perspective projection matrix suitable for WebGPU with the given bounds.\n * The near/far clip planes correspond to a normalized device coordinate Z range of [0, 1],\n * which matches WebGPU/Vulkan/DirectX/Metal's clip volume.\n * Passing null/undefined/no value for far will generate infinite projection matrix.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} fovy Vertical field of view in radians\n * @param {number} aspect Aspect ratio. typically viewport width/height\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum, can be null or Infinity\n * @returns {mat4} out\n */\nexport function perspectiveZO(out, fovy, aspect, near, far) {\n const f = 1.0 / Math.tan(fovy / 2);\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[15] = 0;\n if (far != null && far !== Infinity) {\n const nf = 1 / (near - far);\n out[10] = far * nf;\n out[14] = far * near * nf;\n } else {\n out[10] = -1;\n out[14] = -near;\n }\n return out;\n}\n\n/**\n * Generates a perspective projection matrix with the given field of view.\n * This is primarily useful for generating projection matrices to be used\n * with the still experiemental WebVR API.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {Object} fov Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\nexport function perspectiveFromFieldOfView(out, fov, near, far) {\n const upTan = Math.tan((fov.upDegrees * Math.PI) / 180.0);\n const downTan = Math.tan((fov.downDegrees * Math.PI) / 180.0);\n const leftTan = Math.tan((fov.leftDegrees * Math.PI) / 180.0);\n const rightTan = Math.tan((fov.rightDegrees * Math.PI) / 180.0);\n const xScale = 2.0 / (leftTan + rightTan);\n const yScale = 2.0 / (upTan + downTan);\n\n out[0] = xScale;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n out[4] = 0.0;\n out[5] = yScale;\n out[6] = 0.0;\n out[7] = 0.0;\n out[8] = -((leftTan - rightTan) * xScale * 0.5);\n out[9] = (upTan - downTan) * yScale * 0.5;\n out[10] = far / (near - far);\n out[11] = -1.0;\n out[12] = 0.0;\n out[13] = 0.0;\n out[14] = (far * near) / (near - far);\n out[15] = 0.0;\n return out;\n}\n\n/**\n * Generates a orthogonal projection matrix with the given bounds.\n * The near/far clip planes correspond to a normalized device coordinate Z range of [-1, 1],\n * which matches WebGL/OpenGL's clip volume.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} left Left bound of the frustum\n * @param {number} right Right bound of the frustum\n * @param {number} bottom Bottom bound of the frustum\n * @param {number} top Top bound of the frustum\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\nexport function orthoNO(out, left, right, bottom, top, near, far) {\n const lr = 1 / (left - right);\n const bt = 1 / (bottom - top);\n const nf = 1 / (near - far);\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 2 * nf;\n out[11] = 0;\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = (far + near) * nf;\n out[15] = 1;\n return out;\n}\n\n/**\n * Alias for {@link mat4.orthoNO}\n * @function\n */\nexport const ortho = orthoNO;\n\n/**\n * Generates a orthogonal projection matrix with the given bounds.\n * The near/far clip planes correspond to a normalized device coordinate Z range of [0, 1],\n * which matches WebGPU/Vulkan/DirectX/Metal's clip volume.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} left Left bound of the frustum\n * @param {number} right Right bound of the frustum\n * @param {number} bottom Bottom bound of the frustum\n * @param {number} top Top bound of the frustum\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\nexport function orthoZO(out, left, right, bottom, top, near, far) {\n const lr = 1 / (left - right);\n const bt = 1 / (bottom - top);\n const nf = 1 / (near - far);\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = nf;\n out[11] = 0;\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = near * nf;\n out[15] = 1;\n return out;\n}\n\n/**\n * Generates a look-at matrix with the given eye position, focal point, and up axis.\n * If you want a matrix that actually makes an object look at another object, you should use targetTo instead.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {ReadonlyVec3} eye Position of the viewer\n * @param {ReadonlyVec3} center Point the viewer is looking at\n * @param {ReadonlyVec3} up vec3 pointing up\n * @returns {mat4} out\n */\nexport function lookAt(out, eye, center, up) {\n let len;\n let x0;\n let x1;\n let x2;\n let y0;\n let y1;\n let y2;\n let z0;\n let z1;\n let z2;\n const eyex = eye[0];\n const eyey = eye[1];\n const eyez = eye[2];\n const upx = up[0];\n const upy = up[1];\n const upz = up[2];\n const centerx = center[0];\n const centery = center[1];\n const centerz = center[2];\n\n if (\n Math.abs(eyex - centerx) < glMatrix.EPSILON &&\n Math.abs(eyey - centery) < glMatrix.EPSILON &&\n Math.abs(eyez - centerz) < glMatrix.EPSILON\n ) {\n return identity(out);\n }\n\n z0 = eyex - centerx;\n z1 = eyey - centery;\n z2 = eyez - centerz;\n\n len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n\n x0 = upy * z2 - upz * z1;\n x1 = upz * z0 - upx * z2;\n x2 = upx * z1 - upy * z0;\n len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\n if (!len) {\n x0 = 0;\n x1 = 0;\n x2 = 0;\n } else {\n len = 1 / len;\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n y0 = z1 * x2 - z2 * x1;\n y1 = z2 * x0 - z0 * x2;\n y2 = z0 * x1 - z1 * x0;\n\n len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\n if (!len) {\n y0 = 0;\n y1 = 0;\n y2 = 0;\n } else {\n len = 1 / len;\n y0 *= len;\n y1 *= len;\n y2 *= len;\n }\n\n out[0] = x0;\n out[1] = y0;\n out[2] = z0;\n out[3] = 0;\n out[4] = x1;\n out[5] = y1;\n out[6] = z1;\n out[7] = 0;\n out[8] = x2;\n out[9] = y2;\n out[10] = z2;\n out[11] = 0;\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\n out[15] = 1;\n\n return out;\n}\n\n/**\n * Generates a matrix that makes something look at something else.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {ReadonlyVec3} eye Position of the viewer\n * @param {ReadonlyVec3} center Point the viewer is looking at\n * @param {ReadonlyVec3} up vec3 pointing up\n * @returns {mat4} out\n */\nexport function targetTo(out, eye, target, up) {\n const eyex = eye[0];\n const eyey = eye[1];\n const eyez = eye[2];\n const upx = up[0];\n const upy = up[1];\n const upz = up[2];\n\n let z0 = eyex - target[0];\n let z1 = eyey - target[1];\n let z2 = eyez - target[2];\n\n let len = z0 * z0 + z1 * z1 + z2 * z2;\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n }\n\n let x0 = upy * z2 - upz * z1;\n let x1 = upz * z0 - upx * z2;\n let x2 = upx * z1 - upy * z0;\n\n len = x0 * x0 + x1 * x1 + x2 * x2;\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n out[0] = x0;\n out[1] = x1;\n out[2] = x2;\n out[3] = 0;\n out[4] = z1 * x2 - z2 * x1;\n out[5] = z2 * x0 - z0 * x2;\n out[6] = z0 * x1 - z1 * x0;\n out[7] = 0;\n out[8] = z0;\n out[9] = z1;\n out[10] = z2;\n out[11] = 0;\n out[12] = eyex;\n out[13] = eyey;\n out[14] = eyez;\n out[15] = 1;\n return out;\n}\n\n/**\n * Returns a string representation of a mat4\n *\n * @param {ReadonlyMat4} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\nexport function str(a) {\n return `mat4(${a[0]}, ${a[1]}, ${a[2]}, ${a[3]}, ${a[4]}, ${a[5]}, ${a[6]}, ${a[7]}, ${a[8]}, ${a[9]}, ${a[10]}, ${a[11]}, ${a[12]}, ${a[13]}, ${a[14]}, ${a[15]})`;\n}\n\n/**\n * Returns Frobenius norm of a mat4\n *\n * @param {ReadonlyMat4} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\nexport function frob(a) {\n return Math.sqrt(\n a[0] * a[0] +\n a[1] * a[1] +\n a[2] * a[2] +\n a[3] * a[3] +\n a[4] * a[4] +\n a[5] * a[5] +\n a[6] * a[6] +\n a[7] * a[7] +\n a[8] * a[8] +\n a[9] * a[9] +\n a[10] * a[10] +\n a[11] * a[11] +\n a[12] * a[12] +\n a[13] * a[13] +\n a[14] * a[14] +\n a[15] * a[15]\n );\n}\n\n/**\n * Adds two mat4's\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the first operand\n * @param {ReadonlyMat4} b the second operand\n * @returns {mat4} out\n */\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n out[8] = a[8] + b[8];\n out[9] = a[9] + b[9];\n out[10] = a[10] + b[10];\n out[11] = a[11] + b[11];\n out[12] = a[12] + b[12];\n out[13] = a[13] + b[13];\n out[14] = a[14] + b[14];\n out[15] = a[15] + b[15];\n return out;\n}\n\n/**\n * Subtracts matrix b from matrix a\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the first operand\n * @param {ReadonlyMat4} b the second operand\n * @returns {mat4} out\n */\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n out[6] = a[6] - b[6];\n out[7] = a[7] - b[7];\n out[8] = a[8] - b[8];\n out[9] = a[9] - b[9];\n out[10] = a[10] - b[10];\n out[11] = a[11] - b[11];\n out[12] = a[12] - b[12];\n out[13] = a[13] - b[13];\n out[14] = a[14] - b[14];\n out[15] = a[15] - b[15];\n return out;\n}\n\n/**\n * Multiply each element of the matrix by a scalar.\n *\n * @param {mat4} out the receiving matrix\n * @param {ReadonlyMat4} a the matrix to scale\n * @param {Number} b amount to scale the matrix's elements by\n * @returns {mat4} out\n */\nexport function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n out[8] = a[8] * b;\n out[9] = a[9] * b;\n out[10] = a[10] * b;\n out[11] = a[11] * b;\n out[12] = a[12] * b;\n out[13] = a[13] * b;\n out[14] = a[14] * b;\n out[15] = a[15] * b;\n return out;\n}\n\n/**\n * Adds two mat4's after multiplying each element of the second operand by a scalar value.\n *\n * @param {mat4} out the receiving vector\n * @param {ReadonlyMat4} a the first operand\n * @param {ReadonlyMat4} b the second operand\n * @param {Number} scale the amount to scale b's elements by before adding\n * @returns {mat4} out\n */\nexport function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n out[6] = a[6] + b[6] * scale;\n out[7] = a[7] + b[7] * scale;\n out[8] = a[8] + b[8] * scale;\n out[9] = a[9] + b[9] * scale;\n out[10] = a[10] + b[10] * scale;\n out[11] = a[11] + b[11] * scale;\n out[12] = a[12] + b[12] * scale;\n out[13] = a[13] + b[13] * scale;\n out[14] = a[14] + b[14] * scale;\n out[15] = a[15] + b[15] * scale;\n return out;\n}\n\n/**\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyMat4} a The first matrix.\n * @param {ReadonlyMat4} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\nexport function exactEquals(a, b) {\n return (\n 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/**\n * Returns whether or not the matrices have approximately the same elements in the same position.\n *\n * @param {ReadonlyMat4} a The first matrix.\n * @param {ReadonlyMat4} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\nexport function equals(a, b) {\n const a0 = a[0];\n const a1 = a[1];\n const a2 = a[2];\n const a3 = a[3];\n const a4 = a[4];\n const a5 = a[5];\n const a6 = a[6];\n const a7 = a[7];\n const a8 = a[8];\n const a9 = a[9];\n const a10 = a[10];\n const a11 = a[11];\n const a12 = a[12];\n const a13 = a[13];\n const a14 = a[14];\n const a15 = a[15];\n\n const b0 = b[0];\n const b1 = b[1];\n const b2 = b[2];\n const b3 = b[3];\n const b4 = b[4];\n const b5 = b[5];\n const b6 = b[6];\n const b7 = b[7];\n const b8 = b[8];\n const b9 = b[9];\n const b10 = b[10];\n const b11 = b[11];\n const b12 = b[12];\n const b13 = b[13];\n const b14 = b[14];\n const b15 = b[15];\n\n return (\n Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) &&\n Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) &&\n Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) &&\n Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) &&\n Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) &&\n Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) &&\n Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) &&\n Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) &&\n Math.abs(a8 - b8) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8)) &&\n Math.abs(a9 - b9) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a9), Math.abs(b9)) &&\n Math.abs(a10 - b10) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a10), Math.abs(b10)) &&\n Math.abs(a11 - b11) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a11), Math.abs(b11)) &&\n Math.abs(a12 - b12) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a12), Math.abs(b12)) &&\n Math.abs(a13 - b13) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a13), Math.abs(b13)) &&\n Math.abs(a14 - b14) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a14), Math.abs(b14)) &&\n Math.abs(a15 - b15) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a15), Math.abs(b15))\n );\n}\n\n/**\n * Alias for {@link mat4.multiply}\n * @function\n */\nexport const mul = multiply;\n\n/**\n * Alias for {@link mat4.subtract}\n * @function\n */\nexport const sub = subtract;\n", "// @eslint-disable\n// @ts-nocheck\n\nimport * as glMatrix from './common.js';\n\n/**\n * 4 Dimensional Vector\n * @module vec4\n */\n\n/**\n * Creates a new, empty vec4\n *\n * @returns {vec4} a new 4D vector\n */\nexport function create() {\n const out = new glMatrix.ARRAY_TYPE(4);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n }\n return out;\n}\n\n/**\n * Creates a new vec4 initialized with values from an existing vector\n *\n * @param {ReadonlyVec4} a vector to clone\n * @returns {vec4} a new 4D vector\n */\nexport function clone(a) {\n const out = new glMatrix.ARRAY_TYPE(4);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n\n/**\n * Creates a new vec4 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {vec4} a new 4D vector\n */\nexport function fromValues(x, y, z, w) {\n const out = new glMatrix.ARRAY_TYPE(4);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n}\n\n/**\n * Copy the values from one vec4 to another\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the source vector\n * @returns {vec4} out\n */\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n\n/**\n * Set the components of a vec4 to the given values\n *\n * @param {vec4} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {vec4} out\n */\nexport function set(out, x, y, z, w) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n}\n\n/**\n * Adds two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n return out;\n}\n\n/**\n * Subtracts vector b from vector a\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n return out;\n}\n\n/**\n * Multiplies two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n out[3] = a[3] * b[3];\n return out;\n}\n\n/**\n * Divides two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n out[3] = a[3] / b[3];\n return out;\n}\n\n/**\n * Math.ceil the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to ceil\n * @returns {vec4} out\n */\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n out[2] = Math.ceil(a[2]);\n out[3] = Math.ceil(a[3]);\n return out;\n}\n\n/**\n * Math.floor the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to floor\n * @returns {vec4} out\n */\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n out[2] = Math.floor(a[2]);\n out[3] = Math.floor(a[3]);\n return out;\n}\n\n/**\n * Returns the minimum of two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n out[3] = Math.min(a[3], b[3]);\n return out;\n}\n\n/**\n * Returns the maximum of two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {vec4} out\n */\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n out[3] = Math.max(a[3], b[3]);\n return out;\n}\n\n/**\n * symmetric round the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to round\n * @returns {vec4} out\n */\nexport function round(out, a) {\n out[0] = glMatrix.round(a[0]);\n out[1] = glMatrix.round(a[1]);\n out[2] = glMatrix.round(a[2]);\n out[3] = glMatrix.round(a[3]);\n return out;\n}\n\n/**\n * Scales a vec4 by a scalar number\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec4} out\n */\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n return out;\n}\n\n/**\n * Adds two vec4's after scaling the second operand by a scalar value\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec4} out\n */\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n return out;\n}\n\n/**\n * Calculates the euclidian distance between two vec4's\n *\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {Number} distance between a and b\n */\nexport function distance(a, b) {\n const x = b[0] - a[0];\n const y = b[1] - a[1];\n const z = b[2] - a[2];\n const w = b[3] - a[3];\n return Math.sqrt(x * x + y * y + z * z + w * w);\n}\n\n/**\n * Calculates the squared euclidian distance between two vec4's\n *\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {Number} squared distance between a and b\n */\nexport function squaredDistance(a, b) {\n const x = b[0] - a[0];\n const y = b[1] - a[1];\n const z = b[2] - a[2];\n const w = b[3] - a[3];\n return x * x + y * y + z * z + w * w;\n}\n\n/**\n * Calculates the length of a vec4\n *\n * @param {ReadonlyVec4} a vector to calculate length of\n * @returns {Number} length of a\n */\nexport function length(a) {\n const x = a[0];\n const y = a[1];\n const z = a[2];\n const w = a[3];\n return Math.sqrt(x * x + y * y + z * z + w * w);\n}\n\n/**\n * Calculates the squared length of a vec4\n *\n * @param {ReadonlyVec4} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\nexport function squaredLength(a) {\n const x = a[0];\n const y = a[1];\n const z = a[2];\n const w = a[3];\n return x * x + y * y + z * z + w * w;\n}\n\n/**\n * Negates the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to negate\n * @returns {vec4} out\n */\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = -a[3];\n return out;\n}\n\n/**\n * Returns the inverse of the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to invert\n * @returns {vec4} out\n */\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n out[3] = 1.0 / a[3];\n return out;\n}\n\n/**\n * Normalize a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a vector to normalize\n * @returns {vec4} out\n */\nexport function normalize(out, a) {\n const x = a[0];\n const y = a[1];\n const z = a[2];\n const w = a[3];\n let len = x * x + y * y + z * z + w * w;\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n }\n out[0] = x * len;\n out[1] = y * len;\n out[2] = z * len;\n out[3] = w * len;\n return out;\n}\n\n/**\n * Calculates the dot product of two vec4's\n *\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @returns {Number} dot product of a and b\n */\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];\n}\n\n/**\n * Returns the cross-product of three vectors in a 4-dimensional space\n *\n * @param {ReadonlyVec4} result the receiving vector\n * @param {ReadonlyVec4} U the first vector\n * @param {ReadonlyVec4} V the second vector\n * @param {ReadonlyVec4} W the third vector\n * @returns {vec4} result\n */\nexport function cross(out, u, v, w) {\n const A = v[0] * w[1] - v[1] * w[0];\n const B = v[0] * w[2] - v[2] * w[0];\n const C = v[0] * w[3] - v[3] * w[0];\n const D = v[1] * w[2] - v[2] * w[1];\n const E = v[1] * w[3] - v[3] * w[1];\n const F = v[2] * w[3] - v[3] * w[2];\n const G = u[0];\n const H = u[1];\n const I = u[2];\n const J = u[3];\n\n out[0] = H * F - I * E + J * D;\n out[1] = -(G * F) + I * C - J * B;\n out[2] = G * E - H * C + J * A;\n out[3] = -(G * D) + H * B - I * A;\n\n return out;\n}\n\n/**\n * Performs a linear interpolation between two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the first operand\n * @param {ReadonlyVec4} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec4} out\n */\nexport function lerp(out, a, b, t) {\n const ax = a[0];\n const ay = a[1];\n const az = a[2];\n const aw = a[3];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n out[3] = aw + t * (b[3] - aw);\n return out;\n}\n\n/**\n * Generates a random vector with the given scale\n *\n * @param {vec4} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If omitted, a unit vector will be returned\n * @returns {vec4} out\n */\nexport function random(out, scale) {\n scale = scale === undefined ? 1.0 : scale;\n\n // Marsaglia, George. Choosing a Point from the Surface of a\n // Sphere. Ann. Math. Statist. 43 (1972), no. 2, 645--646.\n // http://projecteuclid.org/euclid.aoms/1177692644;\n let v1;\n let v2;\n let v3;\n let v4;\n let s1;\n let s2;\n do {\n v1 = glMatrix.RANDOM() * 2 - 1;\n v2 = glMatrix.RANDOM() * 2 - 1;\n s1 = v1 * v1 + v2 * v2;\n } while (s1 >= 1);\n do {\n v3 = glMatrix.RANDOM() * 2 - 1;\n v4 = glMatrix.RANDOM() * 2 - 1;\n s2 = v3 * v3 + v4 * v4;\n } while (s2 >= 1);\n\n const d = Math.sqrt((1 - s1) / s2);\n out[0] = scale * v1;\n out[1] = scale * v2;\n out[2] = scale * v3 * d;\n out[3] = scale * v4 * d;\n return out;\n}\n\n/**\n * Transforms the vec4 with a mat4.\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the vector to transform\n * @param {ReadonlyMat4} m matrix to transform with\n * @returns {vec4} out\n */\nexport function transformMat4(out, a, m) {\n const x = a[0];\n const y = a[1];\n const z = a[2];\n const w = a[3];\n out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\n out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\n out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\n out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\n return out;\n}\n\n/**\n * Transforms the vec4 with a quat\n *\n * @param {vec4} out the receiving vector\n * @param {ReadonlyVec4} a the vector to transform\n * @param {ReadonlyQuat} q quaternion to transform with\n * @returns {vec4} out\n */\nexport function transformQuat(out, a, q) {\n const x = a[0];\n const y = a[1];\n const z = a[2];\n const qx = q[0];\n const qy = q[1];\n const qz = q[2];\n const qw = q[3];\n\n // calculate quat * vec\n const ix = qw * x + qy * z - qz * y;\n const iy = qw * y + qz * x - qx * z;\n const iz = qw * z + qx * y - qy * x;\n const iw = -qx * x - qy * y - qz * z;\n\n // calculate result * inverse quat\n out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n out[3] = a[3];\n return out;\n}\n\n/**\n * Set the components of a vec4 to zero\n *\n * @param {vec4} out the receiving vector\n * @returns {vec4} out\n */\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n return out;\n}\n\n/**\n * Returns a string representation of a vector\n *\n * @param {ReadonlyVec4} a vector to represent as a string\n * @returns {String} string representation of the vector\n */\nexport function str(a) {\n return `vec4(${a[0]}, ${a[1]}, ${a[2]}, ${a[3]})`;\n}\n\n/**\n * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyVec4} a The first vector.\n * @param {ReadonlyVec4} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];\n}\n\n/**\n * Returns whether or not the vectors have approximately the same elements in the same position.\n *\n * @param {ReadonlyVec4} a The first vector.\n * @param {ReadonlyVec4} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\nexport function equals(a, b) {\n const a0 = a[0];\n const a1 = a[1];\n const a2 = a[2];\n const a3 = a[3];\n const b0 = b[0];\n const b1 = b[1];\n const b2 = b[2];\n const b3 = b[3];\n return (\n Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) &&\n Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) &&\n Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) &&\n Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3))\n );\n}\n\n/**\n * Alias for {@link vec4.subtract}\n * @function\n */\nexport const sub = subtract;\n\n/**\n * Alias for {@link vec4.multiply}\n * @function\n */\nexport const mul = multiply;\n\n/**\n * Alias for {@link vec4.divide}\n * @function\n */\nexport const div = divide;\n\n/**\n * Alias for {@link vec4.distance}\n * @function\n */\nexport const dist = distance;\n\n/**\n * Alias for {@link vec4.squaredDistance}\n * @function\n */\nexport const sqrDist = squaredDistance;\n\n/**\n * Alias for {@link vec4.length}\n * @function\n */\nexport const len = length;\n\n/**\n * Alias for {@link vec4.squaredLength}\n * @function\n */\nexport const sqrLen = squaredLength;\n\n/**\n * Perform some operation over an array of vec4s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\nexport const forEach = (function () {\n const vec = create();\n\n return function (a, stride, offset, count, fn, arg) {\n let i;\n let l;\n if (!stride) {\n stride = 4;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n vec[2] = a[i + 2];\n vec[3] = a[i + 3];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n a[i + 2] = vec[2];\n a[i + 3] = vec[3];\n }\n\n return a;\n };\n})();\n", "// math.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n// Copyright (c) 2017 Uber Technologies, Inc.\n\nimport {NumericArray, NumericArray16} from '@math.gl/types';\nimport {Matrix} from './base/matrix';\nimport {checkVector} from '../lib/validators';\n\n/* eslint-disable camelcase */\nimport {vec2_transformMat4AsVector, vec3_transformMat4AsVector} from '../lib/gl-matrix-extras';\n// @ts-ignore gl-matrix types...\nimport {\n fromQuat as mat4_fromQuat,\n frustum as mat4_frustum,\n lookAt as mat4_lookAt,\n ortho as mat4_ortho,\n perspective as mat4_perspective,\n determinant as mat4_determinant,\n transpose as mat4_transpose,\n invert as mat4_invert,\n multiply as mat4_multiply,\n rotateX as mat4_rotateX,\n rotateY as mat4_rotateY,\n rotateZ as mat4_rotateZ,\n rotate as mat4_rotate,\n scale as mat4_scale,\n translate as mat4_translate\n} from '../gl-matrix/mat4';\nimport {transformMat4 as vec2_transformMat4} from '../gl-matrix/vec2';\nimport {transformMat4 as vec3_transformMat4} from '../gl-matrix/vec3';\nimport {transformMat4 as vec4_transformMat4} from '../gl-matrix/vec4';\n\n// eslint-disable-next-line no-shadow\nenum INDICES {\n COL0ROW0 = 0,\n COL0ROW1 = 1,\n COL0ROW2 = 2,\n COL0ROW3 = 3,\n COL1ROW0 = 4,\n COL1ROW1 = 5,\n COL1ROW2 = 6,\n COL1ROW3 = 7,\n COL2ROW0 = 8,\n COL2ROW1 = 9,\n COL2ROW2 = 10,\n COL2ROW3 = 11,\n COL3ROW0 = 12,\n COL3ROW1 = 13,\n COL3ROW2 = 14,\n COL3ROW3 = 15\n}\n\nconst DEFAULT_FOVY = (45 * Math.PI) / 180;\nconst DEFAULT_ASPECT = 1;\nconst DEFAULT_NEAR = 0.1;\nconst DEFAULT_FAR = 500;\n\nconst IDENTITY_MATRIX = Object.freeze([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);\n\n/** Helper type that captures array length for a 4x4 matrix */\nexport type Matrix4Like = Matrix4 | NumericArray16;\n\n/**\n * A 4x4 matrix with common linear algebra operations\n * Subclass of Array meaning that it is highly compatible with other libraries\n */\nexport class Matrix4 extends Matrix {\n static get IDENTITY(): Readonly {\n return getIdentityMatrix();\n }\n\n static get ZERO(): Readonly {\n return getZeroMatrix();\n }\n\n get ELEMENTS(): number {\n return 16;\n }\n\n get RANK(): number {\n return 4;\n }\n\n get INDICES(): typeof INDICES {\n return INDICES;\n }\n\n constructor(array?: Readonly) {\n // PERF NOTE: initialize elements as double precision numbers\n super(-0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0);\n if (arguments.length === 1 && Array.isArray(array)) {\n this.copy(array);\n } else {\n this.identity();\n }\n }\n\n copy(array: Readonly): this {\n this[0] = array[0];\n this[1] = array[1];\n this[2] = array[2];\n this[3] = array[3];\n this[4] = array[4];\n this[5] = array[5];\n this[6] = array[6];\n this[7] = array[7];\n this[8] = array[8];\n this[9] = array[9];\n this[10] = array[10];\n this[11] = array[11];\n this[12] = array[12];\n this[13] = array[13];\n this[14] = array[14];\n this[15] = array[15];\n return this.check();\n }\n\n // eslint-disable-next-line max-params\n set(\n m00: number,\n m10: number,\n m20: number,\n m30: number,\n m01: number,\n m11: number,\n m21: number,\n m31: number,\n m02: number,\n m12: number,\n m22: number,\n m32: number,\n m03: number,\n m13: number,\n m23: number,\n m33: number\n ): this {\n this[0] = m00;\n this[1] = m10;\n this[2] = m20;\n this[3] = m30;\n this[4] = m01;\n this[5] = m11;\n this[6] = m21;\n this[7] = m31;\n this[8] = m02;\n this[9] = m12;\n this[10] = m22;\n this[11] = m32;\n this[12] = m03;\n this[13] = m13;\n this[14] = m23;\n this[15] = m33;\n return this.check();\n }\n\n // accepts row major order, stores as column major\n // eslint-disable-next-line max-params\n setRowMajor(\n m00: number,\n m01: number,\n m02: number,\n m03: number,\n m10: number,\n m11: number,\n m12: number,\n m13: number,\n m20: number,\n m21: number,\n m22: number,\n m23: number,\n m30: number,\n m31: number,\n m32: number,\n m33: number\n ): this {\n this[0] = m00;\n this[1] = m10;\n this[2] = m20;\n this[3] = m30;\n this[4] = m01;\n this[5] = m11;\n this[6] = m21;\n this[7] = m31;\n this[8] = m02;\n this[9] = m12;\n this[10] = m22;\n this[11] = m32;\n this[12] = m03;\n this[13] = m13;\n this[14] = m23;\n this[15] = m33;\n return this.check();\n }\n\n toRowMajor(result: NumericArray): NumericArray {\n result[0] = this[0];\n result[1] = this[4];\n result[2] = this[8];\n result[3] = this[12];\n result[4] = this[1];\n result[5] = this[5];\n result[6] = this[9];\n result[7] = this[13];\n result[8] = this[2];\n result[9] = this[6];\n result[10] = this[10];\n result[11] = this[14];\n result[12] = this[3];\n result[13] = this[7];\n result[14] = this[11];\n result[15] = this[15];\n return result;\n }\n\n // Constructors\n\n /** Set to identity matrix */\n identity(): this {\n return this.copy(IDENTITY_MATRIX);\n }\n\n /**\n *\n * @param object\n * @returns self\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n fromObject(object: {[key: string]: any}): this {\n return this.check();\n }\n\n /**\n * Calculates a 4x4 matrix from the given quaternion\n * @param quaternion Quaternion to create matrix from\n * @returns self\n */\n fromQuaternion(quaternion: Readonly): this {\n mat4_fromQuat(this, quaternion);\n return this.check();\n }\n\n /**\n * Generates a frustum matrix with the given bounds\n * @param view.left - Left bound of the frustum\n * @param view.right - Right bound of the frustum\n * @param view.bottom - Bottom bound of the frustum\n * @param view.top - Top bound of the frustum\n * @param view.near - Near bound of the frustum\n * @param view.far - Far bound of the frustum. Can be set to Infinity.\n * @returns self\n */\n frustum(view: {\n left: number;\n right: number;\n bottom: number;\n top: number;\n near: number;\n far?: number;\n }): this {\n const {left, right, bottom, top, near = DEFAULT_NEAR, far = DEFAULT_FAR} = view;\n if (far === Infinity) {\n computeInfinitePerspectiveOffCenter(this, left, right, bottom, top, near);\n } else {\n mat4_frustum(this, left, right, bottom, top, near, far);\n }\n return this.check();\n }\n\n /**\n * Generates a look-at matrix with the given eye position, focal point,\n * and up axis\n * @param view.eye - (vector) Position of the viewer\n * @param view.center - (vector) Point the viewer is looking at\n * @param view.up - (vector) Up axis\n * @returns self\n */\n lookAt(view: {\n eye: Readonly;\n center?: Readonly;\n up?: Readonly;\n }): this {\n const {eye, center = [0, 0, 0], up = [0, 1, 0]} = view;\n mat4_lookAt(this, eye, center, up);\n return this.check();\n }\n\n /**\n * Generates a orthogonal projection matrix with the given bounds\n * from \"traditional\" view space parameters\n * @param view.left - Left bound of the frustum\n * @param view.right number Right bound of the frustum\n * @param view.bottom - Bottom bound of the frustum\n * @param view.top number Top bound of the frustum\n * @param view.near - Near bound of the frustum\n * @param view.far number Far bound of the frustum\n * @returns self\n */\n ortho(view: {\n left: number;\n right: number;\n bottom: number;\n top: number;\n near?: number;\n far?: number;\n }): this {\n const {left, right, bottom, top, near = DEFAULT_NEAR, far = DEFAULT_FAR} = view;\n mat4_ortho(this, left, right, bottom, top, near, far);\n return this.check();\n }\n\n /**\n * Generates an orthogonal projection matrix with the same parameters\n * as a perspective matrix (plus focalDistance)\n * @param view.fovy Vertical field of view in radians\n * @param view.aspect Aspect ratio. Typically viewport width / viewport height\n * @param view.focalDistance Distance in the view frustum used for extent calculations\n * @param view.near Near bound of the frustum\n * @param view.far Far bound of the frustum\n * @returns self\n */\n orthographic(view: {\n fovy?: number;\n aspect?: number;\n focalDistance?: number;\n near?: number;\n far?: number;\n }): this {\n const {\n fovy = DEFAULT_FOVY,\n aspect = DEFAULT_ASPECT,\n focalDistance = 1,\n near = DEFAULT_NEAR,\n far = DEFAULT_FAR\n } = view;\n\n checkRadians(fovy);\n\n const halfY = fovy / 2;\n const top = focalDistance * Math.tan(halfY); // focus_plane is the distance from the camera\n const right = top * aspect;\n\n return this.ortho({\n left: -right,\n right,\n bottom: -top,\n top,\n near,\n far\n });\n }\n\n /**\n * Generates a perspective projection matrix with the given bounds\n * @param view.fovy Vertical field of view in radians\n * @param view.aspect Aspect ratio. typically viewport width/height\n * @param view.near Near bound of the frustum\n * @param view.far Far bound of the frustum\n * @returns self\n */\n perspective(view: {fovy: number; aspect?: number; near?: number; far?: number}): this {\n const {fovy = (45 * Math.PI) / 180, aspect = 1, near = 0.1, far = 500} = view;\n checkRadians(fovy);\n mat4_perspective(this, fovy, aspect, near, far);\n return this.check();\n }\n\n // Accessors\n\n determinant(): number {\n return mat4_determinant(this);\n }\n\n /**\n * Extracts the non-uniform scale assuming the matrix is an affine transformation.\n * The scales are the \"lengths\" of the column vectors in the upper-left 3x3 matrix.\n * @param result\n * @returns self\n */\n getScale(result: NumericArray = [-0, -0, -0]): NumericArray {\n // explicit is faster than hypot...\n result[0] = Math.sqrt(this[0] * this[0] + this[1] * this[1] + this[2] * this[2]);\n result[1] = Math.sqrt(this[4] * this[4] + this[5] * this[5] + this[6] * this[6]);\n result[2] = Math.sqrt(this[8] * this[8] + this[9] * this[9] + this[10] * this[10]);\n // result[0] = Math.hypot(this[0], this[1], this[2]);\n // result[1] = Math.hypot(this[4], this[5], this[6]);\n // result[2] = Math.hypot(this[8], this[9], this[10]);\n return result;\n }\n\n /**\n * Gets the translation portion, assuming the matrix is a affine transformation matrix.\n * @param result\n * @returns self\n */\n getTranslation(result: NumericArray = [-0, -0, -0]): NumericArray {\n result[0] = this[12];\n result[1] = this[13];\n result[2] = this[14];\n return result;\n }\n\n /**\n * Gets upper left 3x3 pure rotation matrix (non-scaling), assume affine transformation matrix\n * @param result\n * @param scaleResult\n * @returns self\n */\n getRotation(result?: NumericArray, scaleResult?: NumericArray): NumericArray {\n result = result || [-0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0];\n scaleResult = scaleResult || [-0, -0, -0];\n const scale = this.getScale(scaleResult);\n const inverseScale0 = 1 / scale[0];\n const inverseScale1 = 1 / scale[1];\n const inverseScale2 = 1 / scale[2];\n result[0] = this[0] * inverseScale0;\n result[1] = this[1] * inverseScale1;\n result[2] = this[2] * inverseScale2;\n result[3] = 0;\n result[4] = this[4] * inverseScale0;\n result[5] = this[5] * inverseScale1;\n result[6] = this[6] * inverseScale2;\n result[7] = 0;\n result[8] = this[8] * inverseScale0;\n result[9] = this[9] * inverseScale1;\n result[10] = this[10] * inverseScale2;\n result[11] = 0;\n result[12] = 0;\n result[13] = 0;\n result[14] = 0;\n result[15] = 1;\n return result;\n }\n\n /**\n *\n * @param result\n * @param scaleResult\n * @returns self\n */\n getRotationMatrix3(result?: NumericArray, scaleResult?: NumericArray): NumericArray {\n result = result || [-0, -0, -0, -0, -0, -0, -0, -0, -0];\n scaleResult = scaleResult || [-0, -0, -0];\n const scale = this.getScale(scaleResult);\n const inverseScale0 = 1 / scale[0];\n const inverseScale1 = 1 / scale[1];\n const inverseScale2 = 1 / scale[2];\n result[0] = this[0] * inverseScale0;\n result[1] = this[1] * inverseScale1;\n result[2] = this[2] * inverseScale2;\n result[3] = this[4] * inverseScale0;\n result[4] = this[5] * inverseScale1;\n result[5] = this[6] * inverseScale2;\n result[6] = this[8] * inverseScale0;\n result[7] = this[9] * inverseScale1;\n result[8] = this[10] * inverseScale2;\n return result;\n }\n\n // Modifiers\n\n transpose(): this {\n mat4_transpose(this, this);\n return this.check();\n }\n\n invert(): this {\n mat4_invert(this, this);\n return this.check();\n }\n\n // Operations\n\n multiplyLeft(a: Readonly): this {\n mat4_multiply(this, a, this);\n return this.check();\n }\n\n multiplyRight(a: Readonly): this {\n mat4_multiply(this, this, a);\n return this.check();\n }\n\n // Rotates a matrix by the given angle around the X axis\n rotateX(radians: number): this {\n mat4_rotateX(this, this, radians);\n // mat4_rotate(this, this, radians, [1, 0, 0]);\n return this.check();\n }\n\n // Rotates a matrix by the given angle around the Y axis.\n rotateY(radians: number): this {\n mat4_rotateY(this, this, radians);\n // mat4_rotate(this, this, radians, [0, 1, 0]);\n return this.check();\n }\n\n /**\n * Rotates a matrix by the given angle around the Z axis.\n * @param radians\n * @returns self\n */\n rotateZ(radians: number): this {\n mat4_rotateZ(this, this, radians);\n // mat4_rotate(this, this, radians, [0, 0, 1]);\n return this.check();\n }\n\n /**\n *\n * @param param0\n * @returns self\n */\n rotateXYZ(angleXYZ: Readonly): this {\n return this.rotateX(angleXYZ[0]).rotateY(angleXYZ[1]).rotateZ(angleXYZ[2]);\n }\n\n /**\n *\n * @param radians\n * @param axis\n * @returns self\n */\n rotateAxis(radians: number, axis: Readonly): this {\n mat4_rotate(this, this, radians, axis);\n return this.check();\n }\n\n /**\n *\n * @param factor\n * @returns self\n */\n override scale(factor: number | Readonly): this {\n mat4_scale(this, this, Array.isArray(factor) ? factor : [factor, factor, factor]);\n return this.check();\n }\n\n /**\n *\n * @param vec\n * @returns self\n */\n translate(vector: Readonly): this {\n mat4_translate(this, this, vector);\n return this.check();\n }\n\n // Transforms\n\n /**\n * Transforms any 2, 3 or 4 element vector. 2 and 3 elements are treated as points\n * @param vector\n * @param result\n * @returns self\n */\n transform(vector: Readonly, result?: NumericArray): NumericArray {\n if (vector.length === 4) {\n result = vec4_transformMat4(result || [-0, -0, -0, -0], vector, this) as NumericArray;\n checkVector(result, 4);\n return result;\n }\n return this.transformAsPoint(vector, result);\n }\n\n /**\n * Transforms any 2 or 3 element array as point (w implicitly 1)\n * @param vector\n * @param result\n * @returns self\n */\n transformAsPoint(vector: Readonly, result?: NumericArray): NumericArray {\n const {length} = vector;\n let out: NumericArray;\n switch (length) {\n case 2:\n out = vec2_transformMat4(result || [-0, -0], vector, this) as NumericArray;\n break;\n case 3:\n out = vec3_transformMat4(result || [-0, -0, -0], vector, this) as NumericArray;\n break;\n default:\n throw new Error('Illegal vector');\n }\n checkVector(out, vector.length);\n return out;\n }\n\n /**\n * Transforms any 2 or 3 element array as vector (w implicitly 0)\n * @param vector\n * @param result\n * @returns self\n */\n transformAsVector(vector: Readonly, result?: NumericArray): NumericArray {\n let out: NumericArray;\n switch (vector.length) {\n case 2:\n out = vec2_transformMat4AsVector(result || [-0, -0], vector, this);\n break;\n case 3:\n out = vec3_transformMat4AsVector(result || [-0, -0, -0], vector, this);\n break;\n default:\n throw new Error('Illegal vector');\n }\n checkVector(out, vector.length);\n return out;\n }\n\n /** @deprecated */\n transformPoint(vector: Readonly, result?: NumericArray): NumericArray {\n return this.transformAsPoint(vector, result);\n }\n\n /** @deprecated */\n transformVector(vector: Readonly, result?: NumericArray): NumericArray {\n return this.transformAsPoint(vector, result);\n }\n\n /** @deprecated */\n transformDirection(vector: Readonly, result?: NumericArray): NumericArray {\n return this.transformAsVector(vector, result);\n }\n\n // three.js math API compatibility\n\n makeRotationX(radians: number): this {\n return this.identity().rotateX(radians);\n }\n\n makeTranslation(x: number, y: number, z: number): this {\n return this.identity().translate([x, y, z]);\n }\n}\n\n// TODO initializing static members directly is an option, but make sure no tree-shaking issues\nlet ZERO: Matrix4;\nlet IDENTITY: Matrix4;\n\nfunction getZeroMatrix(): Readonly {\n if (!ZERO) {\n ZERO = new Matrix4([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);\n Object.freeze(ZERO);\n }\n return ZERO;\n}\n\nfunction getIdentityMatrix(): Matrix4 {\n if (!IDENTITY) {\n IDENTITY = new Matrix4();\n Object.freeze(IDENTITY);\n }\n return IDENTITY;\n}\n\n// HELPER FUNCTIONS\n\nfunction checkRadians(possiblyDegrees: number) {\n if (possiblyDegrees > Math.PI * 2) {\n throw Error('expected radians');\n }\n}\n\n// eslint-disable-next-line max-params\nfunction computeInfinitePerspectiveOffCenter(\n result: NumericArray,\n left: number,\n right: number,\n bottom: number,\n top: number,\n near: number\n): NumericArray {\n const column0Row0 = (2 * near) / (right - left);\n const column1Row1 = (2 * near) / (top - bottom);\n const column2Row0 = (right + left) / (right - left);\n const column2Row1 = (top + bottom) / (top - bottom);\n const column2Row2 = -1;\n const column2Row3 = -1;\n const column3Row2 = -2 * near;\n result[0] = column0Row0;\n result[1] = 0;\n result[2] = 0;\n result[3] = 0;\n result[4] = 0;\n result[5] = column1Row1;\n result[6] = 0;\n result[7] = 0;\n result[8] = column2Row0;\n result[9] = column2Row1;\n result[10] = column2Row2;\n result[11] = column2Row3;\n result[12] = 0;\n result[13] = 0;\n result[14] = column3Row2;\n result[15] = 0;\n return result;\n}\n", "// @eslint-disable\n// @ts-nocheck\n\nimport * as glMatrix from './common.js';\nimport * as mat3 from './mat3.js';\nimport * as vec3 from './vec3.js';\nimport * as vec4 from './vec4.js';\n\n// const glMatrix: {EPSILON = 0.000001};\n\n/**\n * Quaternion in the format XYZW\n * @module quat\n */\n\n/**\n * Creates a new identity quat\n *\n * @returns {quat} a new quaternion\n */\nexport function create() {\n const out = new glMatrix.ARRAY_TYPE(4);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n }\n out[3] = 1;\n return out;\n}\n\n/**\n * Set a quat to the identity quaternion\n *\n * @param {quat} out the receiving quaternion\n * @returns {quat} out\n */\nexport function identity(out) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n}\n\n/**\n * Sets a quat from the given angle and rotation axis,\n * then returns it.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyVec3} axis the axis around which to rotate\n * @param {Number} rad the angle in radians\n * @returns {quat} out\n **/\nexport function setAxisAngle(out, axis, rad) {\n rad = rad * 0.5;\n const s = Math.sin(rad);\n out[0] = s * axis[0];\n out[1] = s * axis[1];\n out[2] = s * axis[2];\n out[3] = Math.cos(rad);\n return out;\n}\n\n/**\n * Gets the rotation axis and angle for a given\n * quaternion. If a quaternion is created with\n * setAxisAngle, this method will return the same\n * values as providied in the original parameter list\n * OR functionally equivalent values.\n * Example: The quaternion formed by axis [0, 0, 1] and\n * angle -90 is the same as the quaternion formed by\n * [0, 0, 1] and 270. This method favors the latter.\n * @param {vec3} out_axis Vector receiving the axis of rotation\n * @param {ReadonlyQuat} q Quaternion to be decomposed\n * @return {Number} Angle, in radians, of the rotation\n */\nexport function getAxisAngle(out_axis, q) {\n const rad = Math.acos(q[3]) * 2.0;\n const s = Math.sin(rad / 2.0);\n if (s > glMatrix.EPSILON) {\n out_axis[0] = q[0] / s;\n out_axis[1] = q[1] / s;\n out_axis[2] = q[2] / s;\n } else {\n // If s is zero, return any axis (no rotation - axis does not matter)\n out_axis[0] = 1;\n out_axis[1] = 0;\n out_axis[2] = 0;\n }\n return rad;\n}\n\n/**\n * Gets the angular distance between two unit quaternions\n *\n * @param {ReadonlyQuat} a Origin unit quaternion\n * @param {ReadonlyQuat} b Destination unit quaternion\n * @return {Number} Angle, in radians, between the two quaternions\n */\nexport function getAngle(a, b) {\n const dotproduct = dot(a, b);\n\n return Math.acos(2 * dotproduct * dotproduct - 1);\n}\n\n/**\n * Multiplies two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @returns {quat} out\n */\nexport function multiply(out, a, b) {\n const ax = a[0];\n const ay = a[1];\n const az = a[2];\n const aw = a[3];\n const bx = b[0];\n const by = b[1];\n const bz = b[2];\n const bw = b[3];\n\n out[0] = ax * bw + aw * bx + ay * bz - az * by;\n out[1] = ay * bw + aw * by + az * bx - ax * bz;\n out[2] = az * bw + aw * bz + ax * by - ay * bx;\n out[3] = aw * bw - ax * bx - ay * by - az * bz;\n return out;\n}\n\n/**\n * Rotates a quaternion by the given angle about the X axis\n *\n * @param {quat} out quat receiving operation result\n * @param {ReadonlyQuat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\nexport function rotateX(out, a, rad) {\n rad *= 0.5;\n\n const ax = a[0];\n const ay = a[1];\n const az = a[2];\n const aw = a[3];\n const bx = Math.sin(rad);\n const bw = Math.cos(rad);\n\n out[0] = ax * bw + aw * bx;\n out[1] = ay * bw + az * bx;\n out[2] = az * bw - ay * bx;\n out[3] = aw * bw - ax * bx;\n return out;\n}\n\n/**\n * Rotates a quaternion by the given angle about the Y axis\n *\n * @param {quat} out quat receiving operation result\n * @param {ReadonlyQuat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\nexport function rotateY(out, a, rad) {\n rad *= 0.5;\n\n const ax = a[0];\n const ay = a[1];\n const az = a[2];\n const aw = a[3];\n const by = Math.sin(rad);\n const bw = Math.cos(rad);\n\n out[0] = ax * bw - az * by;\n out[1] = ay * bw + aw * by;\n out[2] = az * bw + ax * by;\n out[3] = aw * bw - ay * by;\n return out;\n}\n\n/**\n * Rotates a quaternion by the given angle about the Z axis\n *\n * @param {quat} out quat receiving operation result\n * @param {ReadonlyQuat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\nexport function rotateZ(out, a, rad) {\n rad *= 0.5;\n\n const ax = a[0];\n const ay = a[1];\n const az = a[2];\n const aw = a[3];\n const bz = Math.sin(rad);\n const bw = Math.cos(rad);\n\n out[0] = ax * bw + ay * bz;\n out[1] = ay * bw - ax * bz;\n out[2] = az * bw + aw * bz;\n out[3] = aw * bw - az * bz;\n return out;\n}\n\n/**\n * Calculates the W component of a quat from the X, Y, and Z components.\n * Assumes that quaternion is 1 unit in length.\n * Any existing W component will be ignored.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate W component of\n * @returns {quat} out\n */\nexport function calculateW(out, a) {\n const x = a[0];\n const y = a[1];\n const z = a[2];\n\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z));\n return out;\n}\n\n/**\n * Calculate the exponential of a unit quaternion.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate the exponential of\n * @returns {quat} out\n */\nexport function exp(out, a) {\n const x = a[0];\n const y = a[1];\n const z = a[2];\n const w = a[3];\n\n const r = Math.sqrt(x * x + y * y + z * z);\n const et = Math.exp(w);\n const s = r > 0 ? (et * Math.sin(r)) / r : 0;\n\n out[0] = x * s;\n out[1] = y * s;\n out[2] = z * s;\n out[3] = et * Math.cos(r);\n\n return out;\n}\n\n/**\n * Calculate the natural logarithm of a unit quaternion.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate the exponential of\n * @returns {quat} out\n */\nexport function ln(out, a) {\n const x = a[0];\n const y = a[1];\n const z = a[2];\n const w = a[3];\n\n const r = Math.sqrt(x * x + y * y + z * z);\n const t = r > 0 ? Math.atan2(r, w) / r : 0;\n\n out[0] = x * t;\n out[1] = y * t;\n out[2] = z * t;\n out[3] = 0.5 * Math.log(x * x + y * y + z * z + w * w);\n\n return out;\n}\n\n/**\n * Calculate the scalar power of a unit quaternion.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate the exponential of\n * @param {Number} b amount to scale the quaternion by\n * @returns {quat} out\n */\nexport function pow(out, a, b) {\n ln(out, a);\n scale(out, out, b);\n exp(out, out);\n return out;\n}\n\n/**\n * Performs a spherical linear interpolation between two quat\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {quat} out\n */\nexport function slerp(out, a, b, t) {\n // benchmarks:\n // http://jsperf.com/quaternion-slerp-implementations\n const ax = a[0];\n const ay = a[1];\n const az = a[2];\n const aw = a[3];\n let bx = b[0];\n let by = b[1];\n let bz = b[2];\n let bw = b[3];\n\n let cosom;\n let omega;\n let scale0;\n let scale1;\n let sinom;\n\n // calc cosine\n cosom = ax * bx + ay * by + az * bz + aw * bw;\n // adjust signs (if necessary)\n if (cosom < 0.0) {\n cosom = -cosom;\n bx = -bx;\n by = -by;\n bz = -bz;\n bw = -bw;\n }\n // calculate coefficients\n if (1.0 - cosom > glMatrix.EPSILON) {\n // standard case (slerp)\n omega = Math.acos(cosom);\n sinom = Math.sin(omega);\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\n scale1 = Math.sin(t * omega) / sinom;\n } else {\n // \"from\" and \"to\" quaternions are very close\n // ... so we can do a linear interpolation\n scale0 = 1.0 - t;\n scale1 = t;\n }\n // calculate final values\n out[0] = scale0 * ax + scale1 * bx;\n out[1] = scale0 * ay + scale1 * by;\n out[2] = scale0 * az + scale1 * bz;\n out[3] = scale0 * aw + scale1 * bw;\n\n return out;\n}\n\n/**\n * Generates a random unit quaternion\n *\n * @param {quat} out the receiving quaternion\n * @returns {quat} out\n */\n// export function random(out) {\n// // Implementation of http://planning.cs.uiuc.edu/node198.html\n// // TODO: Calling random 3 times is probably not the fastest solution\n// let u1 = glMatrix.RANDOM();\n// let u2 = glMatrix.RANDOM();\n// let u3 = glMatrix.RANDOM();\n\n// let sqrt1MinusU1 = Math.sqrt(1 - u1);\n// let sqrtU1 = Math.sqrt(u1);\n\n// out[0] = sqrt1MinusU1 * Math.sin(2.0 * Math.PI * u2);\n// out[1] = sqrt1MinusU1 * Math.cos(2.0 * Math.PI * u2);\n// out[2] = sqrtU1 * Math.sin(2.0 * Math.PI * u3);\n// out[3] = sqrtU1 * Math.cos(2.0 * Math.PI * u3);\n// return out;\n// }\n\n/**\n * Calculates the inverse of a quat\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate inverse of\n * @returns {quat} out\n */\nexport function invert(out, a) {\n const a0 = a[0];\n const a1 = a[1];\n const a2 = a[2];\n const a3 = a[3];\n const dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\n const invDot = dot ? 1.0 / dot : 0;\n\n // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\n\n out[0] = -a0 * invDot;\n out[1] = -a1 * invDot;\n out[2] = -a2 * invDot;\n out[3] = a3 * invDot;\n return out;\n}\n\n/**\n * Calculates the conjugate of a quat\n * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quat to calculate conjugate of\n * @returns {quat} out\n */\nexport function conjugate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a[3];\n return out;\n}\n\n/**\n * Creates a quaternion from the given 3x3 rotation matrix.\n *\n * NOTE: The resultant quaternion is not normalized, so you should be sure\n * to renormalize the quaternion yourself where necessary.\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyMat3} m rotation matrix\n * @returns {quat} out\n * @function\n */\nexport function fromMat3(out, m) {\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\n // article \"Quaternion Calculus and Fast Animation\".\n const fTrace = m[0] + m[4] + m[8];\n let fRoot;\n\n if (fTrace > 0.0) {\n // |w| > 1/2, may as well choose w > 1/2\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\n out[3] = 0.5 * fRoot;\n fRoot = 0.5 / fRoot; // 1/(4w)\n out[0] = (m[5] - m[7]) * fRoot;\n out[1] = (m[6] - m[2]) * fRoot;\n out[2] = (m[1] - m[3]) * fRoot;\n } else {\n // |w| <= 1/2\n let i = 0;\n if (m[4] > m[0]) i = 1;\n if (m[8] > m[i * 3 + i]) i = 2;\n const j = (i + 1) % 3;\n const k = (i + 2) % 3;\n\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1.0);\n out[i] = 0.5 * fRoot;\n fRoot = 0.5 / fRoot;\n out[3] = (m[j * 3 + k] - m[k * 3 + j]) * fRoot;\n out[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\n out[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\n }\n\n return out;\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 {quat} out the receiving quaternion\n * @param {Number} x Angle to rotate around X axis in degrees.\n * @param {Number} y Angle to rotate around Y axis in degrees.\n * @param {Number} z Angle to rotate around Z axis in degrees.\n * @param {'zyx'|'xyz'|'yxz'|'yzx'|'zxy'|'zyx'} order Intrinsic order for conversion, default is zyx.\n * @returns {quat} out\n * @function\n */\n// export function fromEuler(out, x, y, z, order = glMatrix.ANGLE_ORDER) {\n// let halfToRad = Math.PI / 360;\n// x *= halfToRad;\n// z *= halfToRad;\n// y *= halfToRad;\n\n// let sx = Math.sin(x);\n// let cx = Math.cos(x);\n// let sy = Math.sin(y);\n// let cy = Math.cos(y);\n// let sz = Math.sin(z);\n// let cz = Math.cos(z);\n\n// switch (order) {\n// case \"xyz\":\n// out[0] = sx * cy * cz + cx * sy * sz;\n// out[1] = cx * sy * cz - sx * cy * sz;\n// out[2] = cx * cy * sz + sx * sy * cz;\n// out[3] = cx * cy * cz - sx * sy * sz;\n// break;\n\n// case \"xzy\":\n// out[0] = sx * cy * cz - cx * sy * sz;\n// out[1] = cx * sy * cz - sx * cy * sz;\n// out[2] = cx * cy * sz + sx * sy * cz;\n// out[3] = cx * cy * cz + sx * sy * sz;\n// break;\n\n// case \"yxz\":\n// out[0] = sx * cy * cz + cx * sy * sz;\n// out[1] = cx * sy * cz - sx * cy * sz;\n// out[2] = cx * cy * sz - sx * sy * cz;\n// out[3] = cx * cy * cz + sx * sy * sz;\n// break;\n\n// case \"yzx\":\n// out[0] = sx * cy * cz + cx * sy * sz;\n// out[1] = cx * sy * cz + sx * cy * sz;\n// out[2] = cx * cy * sz - sx * sy * cz;\n// out[3] = cx * cy * cz - sx * sy * sz;\n// break;\n\n// case \"zxy\":\n// out[0] = sx * cy * cz - cx * sy * sz;\n// out[1] = cx * sy * cz + sx * cy * sz;\n// out[2] = cx * cy * sz + sx * sy * cz;\n// out[3] = cx * cy * cz - sx * sy * sz;\n// break;\n\n// case \"zyx\":\n// out[0] = sx * cy * cz - cx * sy * sz;\n// out[1] = cx * sy * cz + sx * cy * sz;\n// out[2] = cx * cy * sz - sx * sy * cz;\n// out[3] = cx * cy * cz + sx * sy * sz;\n// break;\n\n// default:\n// throw new Error('Unknown angle order ' + order);\n// }\n\n// return out;\n// }\n\n/**\n * Returns a string representation of a quaternion\n *\n * @param {ReadonlyQuat} a vector to represent as a string\n * @returns {String} string representation of the vector\n */\nexport function str(a) {\n return `quat(${a[0]}, ${a[1]}, ${a[2]}, ${a[3]})`;\n}\n\n/**\n * Creates a new quat initialized with values from an existing quaternion\n *\n * @param {ReadonlyQuat} a quaternion to clone\n * @returns {quat} a new quaternion\n * @function\n */\nexport const clone = vec4.clone;\n\n/**\n * Creates a new quat initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {quat} a new quaternion\n * @function\n */\nexport const fromValues = vec4.fromValues;\n\n/**\n * Copy the values from one quat to another\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the source quaternion\n * @returns {quat} out\n * @function\n */\nexport const copy = vec4.copy;\n\n/**\n * Set the components of a quat to the given values\n *\n * @param {quat} out the receiving quaternion\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {quat} out\n * @function\n */\nexport const set = vec4.set;\n\n/**\n * Adds two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @returns {quat} out\n * @function\n */\nexport const add = vec4.add;\n\n/**\n * Alias for {@link quat.multiply}\n * @function\n */\nexport const mul = multiply;\n\n/**\n * Scales a quat by a scalar number\n *\n * @param {quat} out the receiving vector\n * @param {ReadonlyQuat} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {quat} out\n * @function\n */\nexport const scale = vec4.scale;\n\n/**\n * Calculates the dot product of two quat's\n *\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @returns {Number} dot product of a and b\n * @function\n */\nexport const dot = vec4.dot;\n\n/**\n * Performs a linear interpolation between two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {quat} out\n * @function\n */\nexport const lerp = vec4.lerp;\n\n/**\n * Calculates the length of a quat\n *\n * @param {ReadonlyQuat} a vector to calculate length of\n * @returns {Number} length of a\n */\nexport const length = vec4.length;\n\n/**\n * Alias for {@link quat.length}\n * @function\n */\nexport const len = length;\n\n/**\n * Calculates the squared length of a quat\n *\n * @param {ReadonlyQuat} a vector to calculate squared length of\n * @returns {Number} squared length of a\n * @function\n */\nexport const squaredLength = vec4.squaredLength;\n\n/**\n * Alias for {@link quat.squaredLength}\n * @function\n */\nexport const sqrLen = squaredLength;\n\n/**\n * Normalize a quat\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a quaternion to normalize\n * @returns {quat} out\n * @function\n */\nexport const normalize = vec4.normalize;\n\n/**\n * Returns whether or not the quaternions have exactly the same elements in the same position (when compared with ===)\n *\n * @param {ReadonlyQuat} a The first quaternion.\n * @param {ReadonlyQuat} b The second quaternion.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\nexport const exactEquals = vec4.exactEquals;\n\n/**\n * Returns whether or not the quaternions point approximately to the same direction.\n *\n * Both quaternions are assumed to be unit length.\n *\n * @param {ReadonlyQuat} a The first unit quaternion.\n * @param {ReadonlyQuat} b The second unit quaternion.\n * @returns {Boolean} True if the quaternions are equal, false otherwise.\n */\nexport function equals(a, b) {\n return Math.abs(vec4.dot(a, b)) >= 1 - glMatrix.EPSILON;\n}\n\n/**\n * Sets a quaternion to represent the shortest rotation from one\n * vector to another.\n *\n * Both vectors are assumed to be unit length.\n *\n * @param {quat} out the receiving quaternion.\n * @param {ReadonlyVec3} a the initial vector\n * @param {ReadonlyVec3} b the destination vector\n * @returns {quat} out\n */\nexport const rotationTo = (function () {\n const tmpvec3 = vec3.create();\n const xUnitVec3 = vec3.fromValues(1, 0, 0);\n const yUnitVec3 = vec3.fromValues(0, 1, 0);\n\n return function (out, a, b) {\n const dot = vec3.dot(a, b);\n if (dot < -0.999999) {\n vec3.cross(tmpvec3, xUnitVec3, a);\n if (vec3.len(tmpvec3) < 0.000001) vec3.cross(tmpvec3, yUnitVec3, a);\n vec3.normalize(tmpvec3, tmpvec3);\n setAxisAngle(out, tmpvec3, Math.PI);\n return out;\n } else if (dot > 0.999999) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n }\n vec3.cross(tmpvec3, a, b);\n out[0] = tmpvec3[0];\n out[1] = tmpvec3[1];\n out[2] = tmpvec3[2];\n out[3] = 1 + dot;\n return normalize(out, out);\n };\n})();\n\n/**\n * Performs a spherical linear interpolation with two control points\n *\n * @param {quat} out the receiving quaternion\n * @param {ReadonlyQuat} a the first operand\n * @param {ReadonlyQuat} b the second operand\n * @param {ReadonlyQuat} c the third operand\n * @param {ReadonlyQuat} d the fourth operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {quat} out\n */\nexport const sqlerp = (function () {\n const temp1 = create();\n const temp2 = create();\n\n return function (out, a, b, c, d, t) {\n slerp(temp1, a, d, t);\n slerp(temp2, b, c, t);\n slerp(out, temp1, temp2, 2 * t * (1 - t));\n\n return out;\n };\n})();\n\n/**\n * Sets the specified quaternion with values corresponding to the given\n * axes. Each axis is a vec3 and is expected to be unit length and\n * perpendicular to all other specified axes.\n *\n * @param {ReadonlyVec3} view the vector representing the viewing direction\n * @param {ReadonlyVec3} right the vector representing the local \"right\" direction\n * @param {ReadonlyVec3} up the vector representing the local \"up\" direction\n * @returns {quat} out\n */\nexport const setAxes = (function () {\n const matr = mat3.create();\n\n return function (out, view, right, up) {\n matr[0] = right[0];\n matr[3] = right[1];\n matr[6] = right[2];\n\n matr[1] = up[0];\n matr[4] = up[1];\n matr[7] = up[2];\n\n matr[2] = -view[0];\n matr[5] = -view[1];\n matr[8] = -view[2];\n\n return normalize(out, fromMat3(out, matr));\n };\n})();\n", "// math.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n// Copyright (c) 2017 Uber Technologies, Inc.\n\nimport {NumericArray} from '@math.gl/types';\nimport {MathArray} from './base/math-array';\nimport {checkNumber, checkVector} from '../lib/validators';\nimport {Vector4} from './vector4';\n// @ts-ignore gl-matrix types...\nimport {\n fromMat3 as quat_fromMat3,\n setAxisAngle as quat_setAxisAngle,\n identity as quat_identity,\n length as quat_length,\n squaredLength as quat_squaredLength,\n dot as quat_dot,\n // getAxisAngle as quat_getAxisAngle,\n rotationTo as quat_rotationTo,\n add as quat_add,\n calculateW as quat_calculateW,\n conjugate as quat_conjugate,\n invert as quat_invert,\n lerp as quat_lerp,\n multiply as quat_multiply,\n rotateX as quat_rotateX,\n rotateY as quat_rotateY,\n rotateZ as quat_rotateZ,\n scale as quat_scale,\n slerp as quat_slerp\n} from '../gl-matrix/quat';\n// @ts-ignore gl-matrix types...\nimport {transformQuat as vec4_transformQuat} from '../gl-matrix/vec4';\n\nconst IDENTITY_QUATERNION = [0, 0, 0, 1] as const;\n\nexport class Quaternion extends MathArray {\n constructor(x: number | Readonly = 0, y = 0, z = 0, w = 1) {\n // PERF NOTE: initialize elements as double precision numbers\n super(-0, -0, -0, -0);\n // eslint-disable-next-line prefer-rest-params\n if (Array.isArray(x) && arguments.length === 1) {\n this.copy(x);\n } else {\n this.set(x as number, y, z, w);\n }\n }\n\n copy(array: Readonly): this {\n this[0] = array[0];\n this[1] = array[1];\n this[2] = array[2];\n this[3] = array[3];\n return this.check();\n }\n\n set(x: number, y: number, z: number, w: number): this {\n this[0] = x;\n this[1] = y;\n this[2] = z;\n this[3] = w;\n return this.check();\n }\n\n fromObject(object: {x: number; y: number; z: number; w: number}): this {\n this[0] = object.x;\n this[1] = object.y;\n this[2] = object.z;\n this[3] = object.w;\n return this.check();\n }\n\n /**\n * Creates a quaternion from the given 3x3 rotation matrix.\n * NOTE: The resultant quaternion is not normalized, so you should\n * be sure to renormalize the quaternion yourself where necessary.\n * @param m\n * @returns\n */\n fromMatrix3(m: Readonly): this {\n quat_fromMat3(this, m);\n return this.check();\n }\n\n fromAxisRotation(axis: Readonly, rad: number): this {\n quat_setAxisAngle(this, axis, rad);\n return this.check();\n }\n\n /** Set a quat to the identity quaternion */\n identity(): this {\n quat_identity(this);\n return this.check();\n }\n\n // Set the components of a quat to the given values\n // set(i, j, k, l) {\n // quat_set(this, i, j, k, l);\n // return this.check();\n // }\n\n // Sets a quat from the given angle and rotation axis, then returns it.\n setAxisAngle(axis: Readonly, rad: number): this {\n return this.fromAxisRotation(axis, rad);\n }\n\n // Getters/setters\n get ELEMENTS(): number {\n return 4;\n }\n\n get x(): number {\n return this[0];\n }\n set x(value: number) {\n this[0] = checkNumber(value);\n }\n\n get y(): number {\n return this[1];\n }\n set y(value: number) {\n this[1] = checkNumber(value);\n }\n\n get z(): number {\n return this[2];\n }\n set z(value: number) {\n this[2] = checkNumber(value);\n }\n\n get w(): number {\n return this[3];\n }\n set w(value: number) {\n this[3] = checkNumber(value);\n }\n\n // Calculates the length of a quat\n len(): number {\n return quat_length(this);\n }\n\n // Calculates the squared length of a quat\n lengthSquared(): number {\n return quat_squaredLength(this);\n }\n\n // Calculates the dot product of two quat's\n // @return {Number}\n dot(a: Readonly): number {\n return quat_dot(this, a);\n }\n\n // Gets the rotation axis and angle for a given quaternion.\n // If a quaternion is created with setAxisAngle, this method will\n // return the same values as providied in the original parameter\n // list OR functionally equivalent values.\n // Example: The quaternion formed by axis [0, 0, 1] and angle -90\n // is the same as the quaternion formed by [0, 0, 1] and 270.\n // This method favors the latter.\n // @return {{[x,y,z], Number}}\n // getAxisAngle() {\n // const axis = [];\n // // const angle = quat_getAxisAngle(axis, this);\n // return {axis, angle};\n // }\n // MODIFIERS\n // Sets a quaternion to represent the shortest rotation from one vector\n // to another. Both vectors are assumed to be unit length.\n rotationTo(vectorA: NumericArray, vectorB: NumericArray): this {\n quat_rotationTo(this, vectorA, vectorB);\n return this.check();\n }\n\n // Sets the specified quaternion with values corresponding to the given axes.\n // Each axis is a vec3 and is expected to be unit length and perpendicular\n // to all other specified axes.\n // setAxes() {\n // Number\n // }\n // Performs a spherical linear interpolation with two control points\n // sqlerp() {\n // Number;\n // }\n // Adds two quat's\n override add(a: Readonly): this {\n quat_add(this, this, a);\n return this.check();\n }\n\n // Calculates the W component of a quat from the X, Y, and Z components.\n // Any existing W component will be ignored.\n calculateW(): this {\n quat_calculateW(this, this);\n return this.check();\n }\n\n // Calculates the conjugate of a quat If the quaternion is normalized,\n // this function is faster than quat_invert and produces the same result.\n conjugate(): this {\n quat_conjugate(this, this);\n return this.check();\n }\n\n // Calculates the inverse of a quat\n invert(): this {\n quat_invert(this, this);\n return this.check();\n }\n\n // Performs a linear interpolation between two quat's\n override lerp(a: Readonly, b: Readonly | number, t?: number): this {\n if (t === undefined) {\n return this.lerp(this, a, b as number);\n }\n quat_lerp(this, a, b as NumericArray, t);\n return this.check();\n }\n\n // Multiplies two quat's\n multiplyRight(a: Readonly): this {\n quat_multiply(this, this, a);\n return this.check();\n }\n\n multiplyLeft(a: Readonly): this {\n quat_multiply(this, a, this);\n return this.check();\n }\n\n // Normalize a quat\n normalize(): this {\n // Handle 0 case\n const length = this.len();\n const l = length > 0 ? 1 / length : 0;\n this[0] = this[0] * l;\n this[1] = this[1] * l;\n this[2] = this[2] * l;\n this[3] = this[3] * l;\n // Set to [0, 0, 0, 1] if length is 0\n if (length === 0) {\n this[3] = 1;\n }\n return this.check();\n }\n\n // Rotates a quaternion by the given angle about the X axis\n rotateX(rad: number): this {\n quat_rotateX(this, this, rad);\n return this.check();\n }\n\n // Rotates a quaternion by the given angle about the Y axis\n rotateY(rad: number): this {\n quat_rotateY(this, this, rad);\n return this.check();\n }\n\n // Rotates a quaternion by the given angle about the Z axis\n rotateZ(rad: number): this {\n quat_rotateZ(this, this, rad);\n return this.check();\n }\n\n // Scales a quat by a scalar number\n override scale(b: number): this {\n quat_scale(this, this, b);\n return this.check();\n }\n\n slerp(target: Readonly, ratio: number): this;\n slerp(start: Readonly, target: Readonly, ratio: number): this;\n slerp(params: {\n start: Readonly;\n target: Readonly;\n ratio: number;\n }): this;\n\n // Performs a spherical linear interpolation between two quat\n slerp(\n arg0:\n | Readonly\n | {\n start: Readonly;\n target: Readonly;\n ratio: number;\n },\n arg1?: Readonly | number,\n arg2?: number\n ): this {\n let start: Readonly;\n let target: Readonly;\n let ratio: number;\n // eslint-disable-next-line prefer-rest-params\n switch (arguments.length) {\n case 1: // Deprecated signature ({start, target, ratio})\n // eslint-disable-next-line prefer-rest-params\n ({\n start = IDENTITY_QUATERNION,\n target,\n ratio\n } = arg0 as {\n start: Readonly;\n target: Readonly;\n ratio: number;\n });\n break;\n case 2: // THREE.js compatibility signature (target, ration)\n start = this; // eslint-disable-line\n target = arg0 as Readonly;\n ratio = arg1 as number;\n break;\n default:\n // Default signature: (start, target, ratio)\n start = arg0 as Readonly;\n target = arg1 as Readonly;\n ratio = arg2;\n }\n quat_slerp(this, start, target, ratio);\n return this.check();\n }\n\n transformVector4(\n vector: Readonly,\n result: NumericArray = new Vector4()\n ): NumericArray {\n vec4_transformQuat(result, vector, this);\n return checkVector(result, 4);\n }\n\n // THREE.js Math API compatibility\n lengthSq(): number {\n return this.lengthSquared();\n }\n\n setFromAxisAngle(axis: Readonly, rad: number): this {\n return this.setAxisAngle(axis, rad);\n }\n\n premultiply(a: Readonly): this {\n return this.multiplyLeft(a);\n }\n\n multiply(a: Readonly): this {\n return this.multiplyRight(a);\n }\n}\n", "// math.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n// Copyright (c) 2017 Uber Technologies, Inc.\n\n// Adaptation of THREE.js Spherical class, under MIT license\nimport {NumericArray} from '@math.gl/types';\nimport {Vector3} from './vector3';\nimport {formatValue, equals, config, degrees, radians, clamp} from '../lib/common';\n// @ts-ignore gl-matrix types...\nimport * as vec3 from '../gl-matrix/vec3';\n\ntype SphericalCoordinatesOptions = {\n phi?: number;\n theta?: number;\n radius?: number;\n bearing?: number;\n pitch?: number;\n altitude?: number;\n radiusScale?: number;\n};\n\ntype FormatOptions = {\n printTypes?: boolean;\n};\n\n// TODO - import epsilon\nconst EPSILON = 0.000001;\nconst EARTH_RADIUS_METERS = 6371000;\n\n/**\n * The poles (phi) are at the positive and negative y axis.\n * The equator starts at positive z.\n * @link https://en.wikipedia.org/wiki/Spherical_coordinate_system\n */\nexport class SphericalCoordinates {\n phi: number;\n theta: number;\n radius: number;\n radiusScale: number;\n // bearing: number;\n // pitch: number;\n // altitude: number;\n\n // lnglatZ coordinates\n // longitude: number;\n // latitude: number;\n // lng: number;\n // lat: number;\n // z: number;\n\n /**\n * Creates a new SphericalCoordinates object\n * @param options\n * @param [options.phi] =0 - rotation around X (latitude)\n * @param [options.theta] =0 - rotation around Y (longitude)\n * @param [options.radius] =1 - Distance from center\n * @param [options.bearing]\n * @param [options.pitch]\n * @param [options.altitude]\n * @param [options.radiusScale] =1\n */\n // eslint-disable-next-line complexity\n constructor({\n phi = 0,\n theta = 0,\n radius = 1,\n bearing,\n pitch,\n altitude,\n radiusScale = EARTH_RADIUS_METERS\n }: SphericalCoordinatesOptions = {}) {\n this.phi = phi;\n this.theta = theta;\n // TODO - silently accepts illegal 0\n this.radius = radius || altitude || 1; // radial distance from center\n this.radiusScale = radiusScale || 1; // Used by lngLatZ\n if (bearing !== undefined) {\n this.bearing = bearing; // up / down towards top and bottom pole\n }\n if (pitch !== undefined) {\n this.pitch = pitch; // around the equator of the sphere\n }\n this.check();\n }\n\n toString(): string {\n return this.formatString(config);\n }\n\n formatString({printTypes = false}: FormatOptions): string {\n const f = formatValue;\n return `${printTypes ? 'Spherical' : ''}\\\n[rho:${f(this.radius)},theta:${f(this.theta)},phi:${f(this.phi)}]`;\n }\n\n equals(other: SphericalCoordinates): boolean {\n return (\n equals(this.radius, other.radius) &&\n equals(this.theta, other.theta) &&\n equals(this.phi, other.phi)\n );\n }\n\n exactEquals(other: SphericalCoordinates): boolean {\n return this.radius === other.radius && this.theta === other.theta && this.phi === other.phi;\n }\n\n /* eslint-disable brace-style */\n // Cartographic (bearing 0 north, pitch 0 look from above)\n get bearing(): number {\n return 180 - degrees(this.phi);\n }\n\n set bearing(v: number) {\n this.phi = Math.PI - radians(v);\n }\n\n get pitch(): number {\n return degrees(this.theta);\n }\n\n set pitch(v: number) {\n this.theta = radians(v);\n }\n\n // get pitch() { return 90 - degrees(this.phi); }\n // set pitch(v) { this.phi = radians(v) + Math.PI / 2; }\n // get altitude() { return this.radius - 1; } // relative altitude\n // lnglatZ coordinates\n get longitude(): number {\n return degrees(this.phi);\n }\n\n get latitude(): number {\n return degrees(this.theta);\n }\n\n get lng(): number {\n return degrees(this.phi);\n }\n\n get lat(): number {\n return degrees(this.theta);\n }\n\n get z(): number {\n return (this.radius - 1) * this.radiusScale;\n }\n\n /* eslint-enable brace-style */\n set(radius: number, phi: number, theta: number): this {\n this.radius = radius;\n this.phi = phi;\n this.theta = theta;\n return this.check();\n }\n\n clone(): SphericalCoordinates {\n return new SphericalCoordinates().copy(this);\n }\n\n copy(other: SphericalCoordinates): this {\n this.radius = other.radius;\n this.phi = other.phi;\n this.theta = other.theta;\n return this.check();\n }\n\n fromLngLatZ([lng, lat, z]: [number, number, number]): this {\n this.radius = 1 + z / this.radiusScale;\n this.phi = radians(lat);\n this.theta = radians(lng);\n return this.check();\n }\n\n fromVector3(v: Readonly): this {\n this.radius = vec3.length(v);\n if (this.radius > 0) {\n this.theta = Math.atan2(v[0], v[1]); // equator angle around y-up axis\n this.phi = Math.acos(clamp(v[2] / this.radius, -1, 1)); // polar angle\n }\n return this.check();\n }\n\n toVector3(): Vector3 {\n return new Vector3(0, 0, this.radius)\n .rotateX({radians: this.theta})\n .rotateZ({radians: this.phi});\n }\n\n // restrict phi to be betwee EPS and PI-EPS\n makeSafe(): this {\n this.phi = Math.max(EPSILON, Math.min(Math.PI - EPSILON, this.phi));\n return this;\n }\n\n check(): this {\n // this.makeSafe();\n if (!Number.isFinite(this.phi) || !Number.isFinite(this.theta) || !(this.radius > 0)) {\n throw new Error('SphericalCoordinates: some fields set to invalid numbers');\n }\n return this;\n }\n}\n", "// math.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n// Copyright (c) 2017 Uber Technologies, Inc.\n\nimport {MathArray} from './base/math-array';\nimport {Quaternion} from './quaternion';\nimport {NumericArray} from '@math.gl/types';\n\nimport {clamp} from '../lib/common';\nimport {checkNumber} from '../lib/validators';\n\n// Internal constants\nconst ERR_UNKNOWN_ORDER = 'Unknown Euler angle order';\nconst ALMOST_ONE = 0.99999;\n\n// eslint-disable-next-line no-shadow\nenum RotationOrder {\n ZYX = 0,\n YXZ = 1,\n XZY = 2,\n ZXY = 3,\n YZX = 4,\n XYZ = 5\n}\n\nexport class Euler extends MathArray {\n // Constants\n static get ZYX(): RotationOrder {\n return RotationOrder.ZYX;\n }\n static get YXZ(): RotationOrder {\n return RotationOrder.YXZ;\n }\n static get XZY(): RotationOrder {\n return RotationOrder.XZY;\n }\n static get ZXY(): RotationOrder {\n return RotationOrder.ZXY;\n }\n static get YZX(): RotationOrder {\n return RotationOrder.YZX;\n }\n static get XYZ(): RotationOrder {\n return RotationOrder.XYZ;\n }\n static get RollPitchYaw(): RotationOrder {\n return RotationOrder.ZYX;\n }\n static get DefaultOrder(): RotationOrder {\n return RotationOrder.ZYX;\n }\n static get RotationOrders(): typeof RotationOrder {\n return RotationOrder;\n }\n static rotationOrder(order: RotationOrder): string {\n return RotationOrder[order];\n }\n get ELEMENTS(): number {\n return 4;\n }\n\n /**\n * @class\n * @param {Number | Number[]} x\n * @param {Number=} [y]\n * @param {Number=} [z]\n * @param {Number=} [order]\n */\n constructor(x = 0, y = 0, z = 0, order = Euler.DefaultOrder) {\n // PERF NOTE: initialize elements as double precision numbers\n super(-0, -0, -0, -0);\n // eslint-disable-next-line prefer-rest-params\n if (arguments.length > 0 && Array.isArray(arguments[0])) {\n // @ts-expect-error\n // eslint-disable-next-line prefer-rest-params\n this.fromVector3(...arguments);\n } else {\n this.set(x, y, z, order);\n }\n }\n\n fromQuaternion(quaternion: Readonly): this {\n const [x, y, z, w] = quaternion;\n const ysqr = y * y;\n const t0 = -2 * (ysqr + z * z) + 1;\n const t1 = +2 * (x * y + w * z);\n let t2 = -2 * (x * z - w * y);\n const t3 = +2 * (y * z + w * x);\n const t4 = -2 * (x * x + ysqr) + 1;\n t2 = t2 > 1 ? 1 : t2;\n t2 = t2 < -1 ? -1 : t2;\n const roll = Math.atan2(t3, t4);\n const pitch = Math.asin(t2);\n const yaw = Math.atan2(t1, t0);\n return this.set(roll, pitch, yaw, Euler.RollPitchYaw);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n fromObject(object: Record): this {\n throw new Error('not implemented');\n // return this.set(object.x, object.y, object.z, object.order);\n }\n\n // fromQuaternion(q, order) {\n // this._fromRotationMat[-0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0];\n // return this.check();\n // }\n // If copied array does contain fourth element, preserves currently set order\n copy(array: Readonly): this {\n this[0] = array[0];\n this[1] = array[1];\n this[2] = array[2];\n // @ts-expect-error\n this[3] = Number.isFinite(array[3]) || this.order;\n return this.check();\n }\n\n // Sets the three angles, and optionally sets the rotation order\n // If order is not specified, preserves currently set order\n set(x = 0, y = 0, z = 0, order: RotationOrder): this {\n this[0] = x;\n this[1] = y;\n this[2] = z;\n this[3] = Number.isFinite(order) ? order : this[3];\n return this.check();\n }\n\n override validate(): boolean {\n return (\n validateOrder(this[3]) &&\n Number.isFinite(this[0]) &&\n Number.isFinite(this[1]) &&\n Number.isFinite(this[2])\n );\n }\n\n // Does not copy the orientation element\n override toArray(array: NumericArray = [], offset: number = 0): NumericArray {\n array[offset] = this[0];\n array[offset + 1] = this[1];\n array[offset + 2] = this[2];\n return array;\n }\n\n // Copies the orientation element\n toArray4(array: NumericArray = [], offset: number = 0): NumericArray {\n array[offset] = this[0];\n array[offset + 1] = this[1];\n array[offset + 2] = this[2];\n array[offset + 3] = this[3];\n return array;\n }\n\n toVector3(result: NumericArray = [-0, -0, -0]): NumericArray {\n result[0] = this[0];\n result[1] = this[1];\n result[2] = this[2];\n return result;\n }\n /* eslint-disable no-multi-spaces, brace-style, no-return-assign */\n // x, y, z angle notation (note: only corresponds to axis in XYZ orientation)\n\n get x(): number {\n return this[0];\n }\n set x(value: number) {\n this[0] = checkNumber(value);\n }\n\n get y(): number {\n return this[1];\n }\n set y(value: number) {\n this[1] = checkNumber(value);\n }\n\n get z(): number {\n return this[2];\n }\n set z(value: number) {\n this[2] = checkNumber(value);\n }\n // alpha, beta, gamma angle notation\n get alpha(): number {\n return this[0];\n }\n set alpha(value: number) {\n this[0] = checkNumber(value);\n }\n\n get beta(): number {\n return this[1];\n }\n set beta(value: number) {\n this[1] = checkNumber(value);\n }\n\n get gamma(): number {\n return this[2];\n }\n set gamma(value: number) {\n this[2] = checkNumber(value);\n }\n\n // phi, theta, psi angle notation\n get phi(): number {\n return this[0];\n }\n set phi(value: number) {\n this[0] = checkNumber(value);\n }\n\n get theta(): number {\n return this[1];\n }\n set theta(value: number) {\n this[1] = checkNumber(value);\n }\n\n get psi(): number {\n return this[2];\n }\n set psi(value: number) {\n this[2] = checkNumber(value);\n }\n // roll, pitch, yaw angle notation\n\n get roll(): number {\n return this[0];\n }\n set roll(value: number) {\n this[0] = checkNumber(value);\n }\n\n get pitch(): number {\n return this[1];\n }\n set pitch(value: number) {\n this[1] = checkNumber(value);\n }\n\n get yaw(): number {\n return this[2];\n }\n set yaw(value: number) {\n this[2] = checkNumber(value);\n }\n\n // rotation order, in all three angle notations\n get order(): RotationOrder {\n return this[3];\n }\n set order(value: RotationOrder) {\n this[3] = checkOrder(value);\n }\n\n // Constructors\n fromVector3(v: Readonly, order: RotationOrder): this {\n return this.set(v[0], v[1], v[2], Number.isFinite(order) ? order : this[3]);\n }\n\n // TODO - with and without 4th element\n override fromArray(array: Readonly, offset: number = 0): this {\n this[0] = array[0 + offset];\n this[1] = array[1 + offset];\n this[2] = array[2 + offset];\n if (array[3] !== undefined) {\n this[3] = array[3];\n }\n return this.check();\n }\n\n // Common ZYX rotation order\n fromRollPitchYaw(roll: number, pitch: number, yaw: number): this {\n return this.set(roll, pitch, yaw, RotationOrder.ZYX);\n }\n\n fromRotationMatrix(m: Readonly, order: RotationOrder = Euler.DefaultOrder): this {\n this._fromRotationMatrix(m, order);\n return this.check();\n }\n\n // ACCESSORS\n\n getRotationMatrix(m: NumericArray): NumericArray {\n return this._getRotationMatrix(m);\n }\n\n // TODO - move to Quaternion\n getQuaternion(): Quaternion {\n const q = new Quaternion();\n switch (this[3]) {\n case RotationOrder.XYZ:\n return q.rotateX(this[0]).rotateY(this[1]).rotateZ(this[2]);\n case RotationOrder.YXZ:\n return q.rotateY(this[0]).rotateX(this[1]).rotateZ(this[2]);\n case RotationOrder.ZXY:\n return q.rotateZ(this[0]).rotateX(this[1]).rotateY(this[2]);\n case RotationOrder.ZYX:\n return q.rotateZ(this[0]).rotateY(this[1]).rotateX(this[2]);\n case RotationOrder.YZX:\n return q.rotateY(this[0]).rotateZ(this[1]).rotateX(this[2]);\n case RotationOrder.XZY:\n return q.rotateX(this[0]).rotateZ(this[1]).rotateY(this[2]);\n default:\n throw new Error(ERR_UNKNOWN_ORDER);\n }\n }\n\n // INTERNAL METHODS\n // Conversion from Euler to rotation matrix and from matrix to Euler\n // Adapted from three.js under MIT license\n // // WARNING: this discards revolution information -bhouston\n // reorder(newOrder) {\n // const q = new Quaternion().setFromEuler(this);\n // return this.setFromQuaternion(q, newOrder);\n /* eslint-disable complexity, max-statements, one-var */\n _fromRotationMatrix(m: Readonly, order = Euler.DefaultOrder): this {\n // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n const m11 = m[0],\n m12 = m[4],\n m13 = m[8];\n const m21 = m[1],\n m22 = m[5],\n m23 = m[9];\n const m31 = m[2],\n m32 = m[6],\n m33 = m[10];\n order = order || this[3];\n switch (order) {\n case Euler.XYZ:\n this[1] = Math.asin(clamp(m13, -1, 1));\n if (Math.abs(m13) < ALMOST_ONE) {\n this[0] = Math.atan2(-m23, m33);\n this[2] = Math.atan2(-m12, m11);\n } else {\n this[0] = Math.atan2(m32, m22);\n this[2] = 0;\n }\n break;\n case Euler.YXZ:\n this[0] = Math.asin(-clamp(m23, -1, 1));\n if (Math.abs(m23) < ALMOST_ONE) {\n this[1] = Math.atan2(m13, m33);\n this[2] = Math.atan2(m21, m22);\n } else {\n this[1] = Math.atan2(-m31, m11);\n this[2] = 0;\n }\n break;\n case Euler.ZXY:\n this[0] = Math.asin(clamp(m32, -1, 1));\n if (Math.abs(m32) < ALMOST_ONE) {\n this[1] = Math.atan2(-m31, m33);\n this[2] = Math.atan2(-m12, m22);\n } else {\n this[1] = 0;\n this[2] = Math.atan2(m21, m11);\n }\n break;\n case Euler.ZYX:\n this[1] = Math.asin(-clamp(m31, -1, 1));\n if (Math.abs(m31) < ALMOST_ONE) {\n this[0] = Math.atan2(m32, m33);\n this[2] = Math.atan2(m21, m11);\n } else {\n this[0] = 0;\n this[2] = Math.atan2(-m12, m22);\n }\n break;\n case Euler.YZX:\n this[2] = Math.asin(clamp(m21, -1, 1));\n if (Math.abs(m21) < ALMOST_ONE) {\n this[0] = Math.atan2(-m23, m22);\n this[1] = Math.atan2(-m31, m11);\n } else {\n this[0] = 0;\n this[1] = Math.atan2(m13, m33);\n }\n break;\n case Euler.XZY:\n this[2] = Math.asin(-clamp(m12, -1, 1));\n if (Math.abs(m12) < ALMOST_ONE) {\n this[0] = Math.atan2(m32, m22);\n this[1] = Math.atan2(m13, m11);\n } else {\n this[0] = Math.atan2(-m23, m33);\n this[1] = 0;\n }\n break;\n default:\n throw new Error(ERR_UNKNOWN_ORDER);\n }\n this[3] = order;\n return this;\n }\n\n _getRotationMatrix(result: NumericArray): NumericArray {\n const te = result || [-0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0];\n const x = this.x,\n y = this.y,\n z = this.z;\n const a = Math.cos(x);\n const c = Math.cos(y);\n const e = Math.cos(z);\n const b = Math.sin(x);\n const d = Math.sin(y);\n const f = Math.sin(z);\n switch (this[3]) {\n case Euler.XYZ: {\n const ae = a * e,\n af = a * f,\n be = b * e,\n bf = b * f;\n te[0] = c * e;\n te[4] = -c * f;\n te[8] = d;\n te[1] = af + be * d;\n te[5] = ae - bf * d;\n te[9] = -b * c;\n te[2] = bf - ae * d;\n te[6] = be + af * d;\n te[10] = a * c;\n break;\n }\n case Euler.YXZ: {\n const ce = c * e,\n cf = c * f,\n de = d * e,\n df = d * f;\n te[0] = ce + df * b;\n te[4] = de * b - cf;\n te[8] = a * d;\n te[1] = a * f;\n te[5] = a * e;\n te[9] = -b;\n te[2] = cf * b - de;\n te[6] = df + ce * b;\n te[10] = a * c;\n break;\n }\n case Euler.ZXY: {\n const ce = c * e,\n cf = c * f,\n de = d * e,\n df = d * f;\n te[0] = ce - df * b;\n te[4] = -a * f;\n te[8] = de + cf * b;\n te[1] = cf + de * b;\n te[5] = a * e;\n te[9] = df - ce * b;\n te[2] = -a * d;\n te[6] = b;\n te[10] = a * c;\n break;\n }\n case Euler.ZYX: {\n const ae = a * e,\n af = a * f,\n be = b * e,\n bf = b * f;\n te[0] = c * e;\n te[4] = be * d - af;\n te[8] = ae * d + bf;\n te[1] = c * f;\n te[5] = bf * d + ae;\n te[9] = af * d - be;\n te[2] = -d;\n te[6] = b * c;\n te[10] = a * c;\n break;\n }\n case Euler.YZX: {\n const ac = a * c,\n ad = a * d,\n bc = b * c,\n bd = b * d;\n te[0] = c * e;\n te[4] = bd - ac * f;\n te[8] = bc * f + ad;\n te[1] = f;\n te[5] = a * e;\n te[9] = -b * e;\n te[2] = -d * e;\n te[6] = ad * f + bc;\n te[10] = ac - bd * f;\n break;\n }\n case Euler.XZY: {\n const ac = a * c,\n ad = a * d,\n bc = b * c,\n bd = b * d;\n te[0] = c * e;\n te[4] = -f;\n te[8] = d * e;\n te[1] = ac * f + bd;\n te[5] = a * e;\n te[9] = ad * f - bc;\n te[2] = bc * f - ad;\n te[6] = b * e;\n te[10] = bd * f + ac;\n break;\n }\n default:\n throw new Error(ERR_UNKNOWN_ORDER);\n }\n // last column\n te[3] = 0;\n te[7] = 0;\n te[11] = 0;\n // bottom row\n te[12] = 0;\n te[13] = 0;\n te[14] = 0;\n te[15] = 1;\n return te;\n }\n\n toQuaternion(): Quaternion {\n // Abbreviations for the various angular functions\n const cy = Math.cos(this.yaw * 0.5);\n const sy = Math.sin(this.yaw * 0.5);\n const cr = Math.cos(this.roll * 0.5);\n const sr = Math.sin(this.roll * 0.5);\n const cp = Math.cos(this.pitch * 0.5);\n const sp = Math.sin(this.pitch * 0.5);\n const w = cy * cr * cp + sy * sr * sp;\n const x = cy * sr * cp - sy * cr * sp;\n const y = cy * cr * sp + sy * sr * cp;\n const z = sy * cr * cp - cy * sr * sp;\n return new Quaternion(x, y, z, w);\n }\n}\n\n// HELPER FUNCTIONS\n\nfunction validateOrder(value: number): boolean {\n return value >= 0 && value < 6;\n}\n\nfunction checkOrder(value: number) {\n if (value < 0 && value >= 6) {\n throw new Error(ERR_UNKNOWN_ORDER);\n }\n return value;\n}\n", "// math.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n// Copyright (c) 2017 Uber Technologies, Inc.\n\nimport {Matrix4} from './matrix4';\nimport {Vector3} from './vector3';\nimport {Euler} from './euler';\nimport {NumericArray} from '@math.gl/types';\n\ntype PoseOptions = {\n position?: Readonly;\n orientation?: Readonly;\n x?: number;\n y?: number;\n z?: number;\n roll?: number;\n pitch?: number;\n yaw?: number;\n};\n\nexport class Pose {\n readonly position: Vector3;\n readonly orientation: Euler;\n\n constructor({\n x = 0,\n y = 0,\n z = 0,\n roll = 0,\n pitch = 0,\n yaw = 0,\n position,\n orientation\n }: PoseOptions = {}) {\n if (Array.isArray(position) && position.length === 3) {\n this.position = new Vector3(position);\n } else {\n this.position = new Vector3(x, y, z);\n }\n if (Array.isArray(orientation) && orientation.length === 4) {\n // @ts-expect-error\n this.orientation = new Euler(orientation, orientation[3]);\n } else {\n this.orientation = new Euler(roll, pitch, yaw, Euler.RollPitchYaw);\n }\n }\n\n get x(): number {\n return this.position.x;\n }\n\n set x(value: number) {\n this.position.x = value;\n }\n\n get y(): number {\n return this.position.y;\n }\n\n set y(value: number) {\n this.position.y = value;\n }\n\n get z(): number {\n return this.position.z;\n }\n\n set z(value: number) {\n this.position.z = value;\n }\n\n get roll(): number {\n return this.orientation.roll;\n }\n\n set roll(value: number) {\n this.orientation.roll = value;\n }\n\n get pitch(): number {\n return this.orientation.pitch;\n }\n set pitch(value: number) {\n this.orientation.pitch = value;\n }\n\n get yaw(): number {\n return this.orientation.yaw;\n }\n\n set yaw(value: number) {\n this.orientation.yaw = value;\n }\n\n getPosition(): Vector3 {\n return this.position;\n }\n\n getOrientation(): Euler {\n return this.orientation;\n }\n\n equals(pose: Pose): boolean {\n if (!pose) {\n return false;\n }\n return this.position.equals(pose.position) && this.orientation.equals(pose.orientation);\n }\n\n exactEquals(pose: Pose): boolean {\n if (!pose) {\n return false;\n }\n return (\n this.position.exactEquals(pose.position) && this.orientation.exactEquals(pose.orientation)\n );\n }\n\n getTransformationMatrix(): Matrix4 {\n // setup pre computations for the sin/cos of the angles\n const sr = Math.sin(this.roll);\n const sp = Math.sin(this.pitch);\n const sw = Math.sin(this.yaw);\n const cr = Math.cos(this.roll);\n const cp = Math.cos(this.pitch);\n const cw = Math.cos(this.yaw);\n\n // Create matrix\n return new Matrix4().setRowMajor(\n cw * cp, // 0,0\n -sw * cr + cw * sp * sr, // 0,1\n sw * sr + cw * sp * cr, // 0,2\n this.x, // 0,3\n sw * cp, // 1,0\n cw * cr + sw * sp * sr, // 1,1\n -cw * sr + sw * sp * cr, // 1,2\n this.y, // 1,3\n -sp, // 2,0\n cp * sr, // 2,1\n cp * cr, // 2,2\n this.z, // 2,3\n 0,\n 0,\n 0,\n 1\n );\n }\n\n getTransformationMatrixFromPose(pose: Pose): Matrix4 {\n return new Matrix4()\n .multiplyRight(this.getTransformationMatrix())\n .multiplyRight(pose.getTransformationMatrix().invert());\n }\n\n getTransformationMatrixToPose(pose: Pose): Matrix4 {\n return new Matrix4()\n .multiplyRight(pose.getTransformationMatrix())\n .multiplyRight(this.getTransformationMatrix().invert());\n }\n}\n", "// math.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n// NOTE: Added to make Cesium-derived test cases work\n// TODO: Determine if/how to keep\nexport const EPSILON1 = 1e-1;\nexport const EPSILON2 = 1e-2;\nexport const EPSILON3 = 1e-3;\nexport const EPSILON4 = 1e-4;\nexport const EPSILON5 = 1e-5;\nexport const EPSILON6 = 1e-6;\nexport const EPSILON7 = 1e-7;\nexport const EPSILON8 = 1e-8;\nexport const EPSILON9 = 1e-9;\nexport const EPSILON10 = 1e-10;\nexport const EPSILON11 = 1e-11;\nexport const EPSILON12 = 1e-12;\nexport const EPSILON13 = 1e-13;\nexport const EPSILON14 = 1e-14;\nexport const EPSILON15 = 1e-15;\nexport const EPSILON16 = 1e-16;\nexport const EPSILON17 = 1e-17;\nexport const EPSILON18 = 1e-18;\nexport const EPSILON19 = 1e-19;\nexport const EPSILON20 = 1e-20;\n\nexport const PI_OVER_TWO = Math.PI / 2;\nexport const PI_OVER_FOUR = Math.PI / 4;\nexport const PI_OVER_SIX = Math.PI / 6;\n\nexport const TWO_PI = Math.PI * 2;\n"], "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACUA,IAAM,qBAAsB,IAAI,KAAK,KAAM;AAC3C,IAAM,qBAAsB,IAAI,MAAO,KAAK;AAY5C,IAAM,iBAAiD;EACrD,SAAS;EACT,OAAO;EACP,WAAW;EACX,YAAY;EACZ,cAAc;EACd,eAAe;EACf,sBAAsB;;AAaxB,WAAW,SAAS,WAAW,UAAU,EAAC,QAAQ,EAAC,GAAG,eAAc,EAAC;AAE9D,IAAM,SAAS,WAAW,OAAO;AAElC,SAAU,UAAU,SAAsC;AAE9D,SAAO,OAAO,QAAQ,OAAO;AAC7B,SAAO;AACT;AAQM,SAAU,YACd,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C9B,IAAM,eAAe,KAAK,KAAK;AAC/B,IAAM,cAAc,KAAK,KAAK;AAE9B,IAAM,SAAS,KAAK,KAAK;", "names": ["degrees", "radians", "angle", "min", "max", "value", "scale", "min", "max", "length", "length", "dist", "clone", "equals", "exactEquals", "lerp", "round", "round", "clone", "round", "scale", "len", "lerp", "exactEquals", "equals", "add", "angle", "ceil", "clone", "copy", "create", "cross", "dist", "distance", "div", "divide", "dot", "equals", "exactEquals", "floor", "forEach", "fromValues", "inverse", "len", "length", "lerp", "max", "min", "mul", "multiply", "negate", "normalize", "random", "round", "scale", "scaleAndAdd", "set", "sqrDist", "sqrLen", "squaredDistance", "squaredLength", "str", "sub", "subtract", "transformMat3", "transformMat4", "zero", "create", "clone", "length", "fromValues", "copy", "set", "add", "subtract", "multiply", "divide", "ceil", "floor", "min", "max", "round", "scale", "scaleAndAdd", "distance", "squaredDistance", "squaredLength", "negate", "inverse", "normalize", "len", "dot", "cross", "lerp", "angle", "random", "transformMat4", "transformMat3", "zero", "str", "exactEquals", "equals", "sub", "mul", "div", "dist", "sqrDist", "sqrLen", "forEach", "angle", "cross", "radians", "transformMat4", "transformMat3", "ZERO", "transformMat4", "add", "clone", "copy", "create", "equals", "exactEquals", "fromValues", "mul", "multiply", "rotate", "scale", "set", "str", "sub", "subtract", "create", "clone", "copy", "fromValues", "set", "multiply", "rotate", "scale", "str", "add", "subtract", "exactEquals", "equals", "mul", "sub", "INDICES", "multiply", "radians", "rotate", "scale", "transformMat3", "add", "adjoint", "clone", "copy", "create", "determinant", "equals", "exactEquals", "frob", "fromQuat", "fromRotation", "fromScaling", "fromTranslation", "fromValues", "identity", "invert", "mul", "multiply", "multiplyScalar", "multiplyScalarAndAdd", "rotate", "rotateX", "rotateY", "rotateZ", "scale", "set", "str", "sub", "subtract", "translate", "transpose", "create", "clone", "copy", "fromValues", "set", "identity", "transpose", "invert", "adjoint", "determinant", "multiply", "translate", "scale", "rotate", "len", "rotateX", "rotateY", "rotateZ", "fromTranslation", "fromScaling", "fromRotation", "fromQuat", "str", "frob", "add", "subtract", "multiplyScalar", "multiplyScalarAndAdd", "exactEquals", "equals", "mul", "sub", "add", "ceil", "clone", "copy", "create", "cross", "dist", "distance", "div", "divide", "dot", "equals", "exactEquals", "floor", "forEach", "fromValues", "inverse", "len", "length", "lerp", "max", "min", "mul", "multiply", "negate", "normalize", "random", "round", "scale", "scaleAndAdd", "set", "sqrDist", "sqrLen", "squaredDistance", "squaredLength", "str", "sub", "subtract", "transformMat4", "transformQuat", "zero", "create", "clone", "fromValues", "copy", "set", "add", "subtract", "multiply", "divide", "ceil", "floor", "min", "max", "round", "scale", "scaleAndAdd", "distance", "squaredDistance", "length", "squaredLength", "negate", "inverse", "normalize", "len", "dot", "cross", "lerp", "random", "transformMat4", "transformQuat", "zero", "str", "exactEquals", "equals", "sub", "mul", "div", "dist", "sqrDist", "sqrLen", "forEach", "INDICES", "IDENTITY_MATRIX", "getIdentityMatrix", "getZeroMatrix", "fromQuat", "determinant", "scale", "transpose", "invert", "multiply", "radians", "rotateX", "rotateY", "rotateZ", "rotate", "translate", "transformMat4", "length", "ZERO", "add", "clone", "copy", "create", "dot", "equals", "exactEquals", "fromValues", "identity", "invert", "len", "length", "lerp", "mul", "multiply", "normalize", "rotateX", "rotateY", "rotateZ", "scale", "set", "slerp", "sqrLen", "squaredLength", "str", "create", "identity", "dot", "multiply", "rotateX", "rotateY", "rotateZ", "scale", "slerp", "invert", "str", "clone", "fromValues", "copy", "set", "add", "mul", "lerp", "length", "len", "squaredLength", "sqrLen", "normalize", "exactEquals", "equals", "cross", "identity", "length", "squaredLength", "dot", "add", "invert", "lerp", "multiply", "rotateX", "rotateY", "rotateZ", "scale", "slerp", "transformQuat", "EPSILON", "length", "RotationOrder", "EPSILON2"] }