Socket
Socket
Sign inDemoInstall

@math.gl/core

Package Overview
Dependencies
Maintainers
3
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@math.gl/core - npm Package Compare versions

Comparing version 4.0.0-alpha.4 to 4.0.0-beta.1

src/gl-matrix/mat3.ts

80

dist/gl-matrix/mat3.d.ts

@@ -10,3 +10,3 @@ /**

*/
export function create(): mat3;
export declare function create(): any[] | Float32Array;
/**

@@ -19,3 +19,3 @@ * Copies the upper-left 3x3 values into the given mat3.

*/
export function fromMat4(out: mat3, a: ReadonlyMat4): mat3;
export declare function fromMat4(out: any, a: any): any;
/**

@@ -27,3 +27,3 @@ * Creates a new mat3 initialized with values from an existing matrix

*/
export function clone(a: ReadonlyMat3): mat3;
export declare function clone(a: any): any[] | Float32Array;
/**

@@ -36,3 +36,3 @@ * Copy the values from one mat3 to another

*/
export function copy(out: mat3, a: ReadonlyMat3): mat3;
export declare function copy(out: any, a: any): any;
/**

@@ -52,3 +52,3 @@ * Create a new mat3 with the given values

*/
export function fromValues(m00: number, m01: number, m02: number, m10: number, m11: number, m12: number, m20: number, m21: number, m22: number): mat3;
export declare function fromValues(m00: any, m01: any, m02: any, m10: any, m11: any, m12: any, m20: any, m21: any, m22: any): any[] | Float32Array;
/**

@@ -69,3 +69,3 @@ * Set the components of a mat3 to the given values

*/
export function set(out: mat3, m00: number, m01: number, m02: number, m10: number, m11: number, m12: number, m20: number, m21: number, m22: number): mat3;
export declare function set(out: any, m00: any, m01: any, m02: any, m10: any, m11: any, m12: any, m20: any, m21: any, m22: any): any;
/**

@@ -77,3 +77,3 @@ * Set a mat3 to the identity matrix

*/
export function identity(out: mat3): mat3;
export declare function identity(out: any): any;
/**

@@ -86,3 +86,3 @@ * Transpose the values of a mat3

*/
export function transpose(out: mat3, a: ReadonlyMat3): mat3;
export declare function transpose(out: any, a: any): any;
/**

@@ -95,3 +95,3 @@ * Inverts a mat3

*/
export function invert(out: mat3, a: ReadonlyMat3): mat3;
export declare function invert(out: any, a: any): any;
/**

@@ -104,3 +104,3 @@ * Calculates the adjugate of a mat3

*/
export function adjoint(out: mat3, a: ReadonlyMat3): mat3;
export declare function adjoint(out: any, a: any): any;
/**

@@ -112,3 +112,3 @@ * Calculates the determinant of a mat3

*/
export function determinant(a: ReadonlyMat3): number;
export declare function determinant(a: any): number;
/**

@@ -122,3 +122,3 @@ * Multiplies two mat3's

*/
export function multiply(out: mat3, a: ReadonlyMat3, b: ReadonlyMat3): mat3;
export declare function multiply(out: any, a: any, b: any): any;
/**

@@ -132,3 +132,3 @@ * Translate a mat3 by the given vector

*/
export function translate(out: mat3, a: ReadonlyMat3, v: ReadonlyVec2): mat3;
export declare function translate(out: any, a: any, v: any): any;
/**

@@ -142,3 +142,3 @@ * Rotates a mat3 by the given angle

*/
export function rotate(out: mat3, a: ReadonlyMat3, rad: number): mat3;
export declare function rotate(out: any, a: any, rad: any): any;
/**

@@ -152,3 +152,3 @@ * Scales the mat3 by the dimensions in the given vec2

**/
export function scale(out: mat3, a: ReadonlyMat3, v: ReadonlyVec2): mat3;
export declare function scale(out: any, a: any, v: any): any;
/**

@@ -165,3 +165,3 @@ * Creates a matrix from a vector translation

*/
export function fromTranslation(out: mat3, v: ReadonlyVec2): mat3;
export declare function fromTranslation(out: any, v: any): any;
/**

@@ -178,3 +178,3 @@ * Creates a matrix from a given angle

*/
export function fromRotation(out: mat3, rad: number): mat3;
export declare function fromRotation(out: any, rad: any): any;
/**

@@ -191,3 +191,3 @@ * Creates a matrix from a vector scaling

*/
export function fromScaling(out: mat3, v: ReadonlyVec2): mat3;
export declare function fromScaling(out: any, v: any): any;
/**

@@ -200,3 +200,3 @@ * Copies the values from a mat2d into a mat3

**/
export function fromMat2d(out: mat3, a: ReadonlyMat2d): mat3;
export declare function fromMat2d(out: any, a: any): any;
/**

@@ -210,3 +210,3 @@ * Calculates a 3x3 matrix from the given quaternion

*/
export function fromQuat(out: mat3, q: ReadonlyQuat): mat3;
export declare function fromQuat(out: any, q: any): any;
/**

@@ -220,3 +220,3 @@ * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix

*/
export function normalFromMat4(out: mat3, a: ReadonlyMat4): mat3;
export declare function normalFromMat4(out: any, a: any): any;
/**

@@ -230,3 +230,3 @@ * Generates a 2D projection matrix with the given bounds

*/
export function projection(out: mat3, width: number, height: number): mat3;
export declare function projection(out: any, width: any, height: any): any;
/**

@@ -238,3 +238,3 @@ * Returns a string representation of a mat3

*/
export function str(a: ReadonlyMat3): string;
export declare function str(a: any): string;
/**

@@ -246,3 +246,3 @@ * Returns Frobenius norm of a mat3

*/
export function frob(a: ReadonlyMat3): number;
export declare function frob(a: any): number;
/**

@@ -256,3 +256,3 @@ * Adds two mat3's

*/
export function add(out: mat3, a: ReadonlyMat3, b: ReadonlyMat3): mat3;
export declare function add(out: any, a: any, b: any): any;
/**

@@ -266,3 +266,3 @@ * Subtracts matrix b from matrix a

*/
export function subtract(out: mat3, a: ReadonlyMat3, b: ReadonlyMat3): mat3;
export declare function subtract(out: any, a: any, b: any): any;
/**

@@ -276,3 +276,3 @@ * Multiply each element of the matrix by a scalar.

*/
export function multiplyScalar(out: mat3, a: ReadonlyMat3, b: number): mat3;
export declare function multiplyScalar(out: any, a: any, b: any): any;
/**

@@ -287,3 +287,3 @@ * Adds two mat3's after multiplying each element of the second operand by a scalar value.

*/
export function multiplyScalarAndAdd(out: mat3, a: ReadonlyMat3, b: ReadonlyMat3, scale: number): mat3;
export declare function multiplyScalarAndAdd(out: any, a: any, b: any, scale: any): any;
/**

@@ -296,3 +296,3 @@ * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)

*/
export function exactEquals(a: ReadonlyMat3, b: ReadonlyMat3): boolean;
export declare function exactEquals(a: any, b: any): boolean;
/**

@@ -305,21 +305,13 @@ * Returns whether or not the matrices have approximately the same elements in the same position.

*/
export function equals(a: ReadonlyMat3, b: ReadonlyMat3): boolean;
export declare function equals(a: any, b: any): boolean;
/**
* Multiplies two mat3's
*
* @param {mat3} out the receiving matrix
* @param {ReadonlyMat3} a the first operand
* @param {ReadonlyMat3} b the second operand
* @returns {mat3} out
* Alias for {@link mat3.multiply}
* @function
*/
export function mul(out: mat3, a: ReadonlyMat3, b: ReadonlyMat3): mat3;
export declare const mul: typeof multiply;
/**
* Subtracts matrix b from matrix a
*
* @param {mat3} out the receiving matrix
* @param {ReadonlyMat3} a the first operand
* @param {ReadonlyMat3} b the second operand
* @returns {mat3} out
* Alias for {@link mat3.subtract}
* @function
*/
export function sub(out: mat3, a: ReadonlyMat3, b: ReadonlyMat3): mat3;
export declare const sub: typeof subtract;
//# sourceMappingURL=mat3.d.ts.map

@@ -10,3 +10,3 @@ /**

*/
export function create(): any[] | Float32Array;
export declare function create(): any[] | Float32Array;
/**

@@ -18,3 +18,3 @@ * Creates a new mat4 initialized with values from an existing matrix

*/
export function clone(a: ReadonlyMat4): mat4;
export declare function clone(a: any): any[] | Float32Array;
/**

@@ -27,3 +27,3 @@ * Copy the values from one mat4 to another

*/
export function copy(out: mat4, a: ReadonlyMat4): mat4;
export declare function copy(out: any, a: any): any;
/**

@@ -50,3 +50,3 @@ * Create a new mat4 with the given values

*/
export function fromValues(m00: number, m01: number, m02: number, m03: number, m10: number, m11: number, m12: number, m13: number, m20: number, m21: number, m22: number, m23: number, m30: number, m31: number, m32: number, m33: number): mat4;
export declare function fromValues(m00: any, m01: any, m02: any, m03: any, m10: any, m11: any, m12: any, m13: any, m20: any, m21: any, m22: any, m23: any, m30: any, m31: any, m32: any, m33: any): any[] | Float32Array;
/**

@@ -74,3 +74,3 @@ * Set the components of a mat4 to the given values

*/
export function set(out: mat4, m00: number, m01: number, m02: number, m03: number, m10: number, m11: number, m12: number, m13: number, m20: number, m21: number, m22: number, m23: number, m30: number, m31: number, m32: number, m33: number): mat4;
export declare function set(out: any, m00: any, m01: any, m02: any, m03: any, m10: any, m11: any, m12: any, m13: any, m20: any, m21: any, m22: any, m23: any, m30: any, m31: any, m32: any, m33: any): any;
/**

@@ -82,3 +82,3 @@ * Set a mat4 to the identity matrix

*/
export function identity(out: mat4): mat4;
export declare function identity(out: any): any;
/**

@@ -91,3 +91,3 @@ * Transpose the values of a mat4

*/
export function transpose(out: mat4, a: ReadonlyMat4): mat4;
export declare function transpose(out: any, a: any): any;
/**

@@ -100,3 +100,3 @@ * Inverts a mat4

*/
export function invert(out: mat4, a: ReadonlyMat4): mat4;
export declare function invert(out: any, a: any): any;
/**

@@ -109,3 +109,3 @@ * Calculates the adjugate of a mat4

*/
export function adjoint(out: mat4, a: ReadonlyMat4): mat4;
export declare function adjoint(out: any, a: any): any;
/**

@@ -117,3 +117,3 @@ * Calculates the determinant of a mat4

*/
export function determinant(a: ReadonlyMat4): number;
export declare function determinant(a: any): number;
/**

@@ -127,3 +127,3 @@ * Multiplies two mat4s

*/
export function multiply(out: mat4, a: ReadonlyMat4, b: ReadonlyMat4): mat4;
export declare function multiply(out: any, a: any, b: any): any;
/**

@@ -137,3 +137,3 @@ * Translate a mat4 by the given vector

*/
export function translate(out: mat4, a: ReadonlyMat4, v: ReadonlyVec3): mat4;
export declare function translate(out: any, a: any, v: any): any;
/**

@@ -147,3 +147,3 @@ * Scales the mat4 by the dimensions in the given vec3 not using vectorization

**/
export function scale(out: mat4, a: ReadonlyMat4, v: ReadonlyVec3): mat4;
export declare function scale(out: any, a: any, v: any): any;
/**

@@ -158,3 +158,3 @@ * Rotates a mat4 by the given angle around the given axis

*/
export function rotate(out: mat4, a: ReadonlyMat4, rad: number, axis: ReadonlyVec3): mat4;
export declare function rotate(out: any, a: any, rad: any, axis: any): any;
/**

@@ -168,3 +168,3 @@ * Rotates a matrix by the given angle around the X axis

*/
export function rotateX(out: mat4, a: ReadonlyMat4, rad: number): mat4;
export declare function rotateX(out: any, a: any, rad: any): any;
/**

@@ -178,3 +178,3 @@ * Rotates a matrix by the given angle around the Y axis

*/
export function rotateY(out: mat4, a: ReadonlyMat4, rad: number): mat4;
export declare function rotateY(out: any, a: any, rad: any): any;
/**

@@ -188,3 +188,3 @@ * Rotates a matrix by the given angle around the Z axis

*/
export function rotateZ(out: mat4, a: ReadonlyMat4, rad: number): mat4;
export declare function rotateZ(out: any, a: any, rad: any): any;
/**

@@ -201,3 +201,3 @@ * Creates a matrix from a vector translation

*/
export function fromTranslation(out: mat4, v: ReadonlyVec3): mat4;
export declare function fromTranslation(out: any, v: any): any;
/**

@@ -214,3 +214,3 @@ * Creates a matrix from a vector scaling

*/
export function fromScaling(out: mat4, v: ReadonlyVec3): mat4;
export declare function fromScaling(out: any, v: any): any;
/**

@@ -228,3 +228,3 @@ * Creates a matrix from a given angle around a given axis

*/
export function fromRotation(out: mat4, rad: number, axis: ReadonlyVec3): mat4;
export declare function fromRotation(out: any, rad: any, axis: any): any;
/**

@@ -241,3 +241,3 @@ * Creates a matrix from the given angle around the X axis

*/
export function fromXRotation(out: mat4, rad: number): mat4;
export declare function fromXRotation(out: any, rad: any): any;
/**

@@ -254,3 +254,3 @@ * Creates a matrix from the given angle around the Y axis

*/
export function fromYRotation(out: mat4, rad: number): mat4;
export declare function fromYRotation(out: any, rad: any): any;
/**

@@ -267,3 +267,3 @@ * Creates a matrix from the given angle around the Z axis

*/
export function fromZRotation(out: mat4, rad: number): mat4;
export declare function fromZRotation(out: any, rad: any): any;
/**

@@ -284,3 +284,3 @@ * Creates a matrix from a quaternion rotation and vector translation

*/
export function fromRotationTranslation(out: mat4, q: quat4, v: ReadonlyVec3): mat4;
export declare function fromRotationTranslation(out: any, q: any, v: any): any;
/**

@@ -293,3 +293,3 @@ * Creates a new mat4 from a dual quat.

*/
export function fromQuat2(out: mat4, a: ReadonlyQuat2): mat4;
export declare function fromQuat2(out: any, a: any): any;
/**

@@ -304,3 +304,3 @@ * Returns the translation vector component of a transformation

*/
export function getTranslation(out: vec3, mat: ReadonlyMat4): vec3;
export declare function getTranslation(out: any, mat: any): any;
/**

@@ -316,3 +316,3 @@ * Returns the scaling factor component of a transformation

*/
export function getScaling(out: vec3, mat: ReadonlyMat4): vec3;
export declare function getScaling(out: any, mat: any): any;
/**

@@ -327,3 +327,3 @@ * Returns a quaternion representing the rotational component

*/
export function getRotation(out: quat, mat: ReadonlyMat4): quat;
export declare function getRotation(out: any, mat: any): any;
/**

@@ -338,3 +338,3 @@ * Decomposes a transformation matrix into its rotation, translation

*/
export function decompose(out_r: quat, out_t: vec3, out_s: vec3, mat: ReadonlyMat4): quat;
export declare function decompose(out_r: any, out_t: any, out_s: any, mat: any): any;
/**

@@ -357,3 +357,3 @@ * Creates a matrix from a quaternion rotation, vector translation and vector scale

*/
export function fromRotationTranslationScale(out: mat4, q: quat4, v: ReadonlyVec3, s: ReadonlyVec3): mat4;
export declare function fromRotationTranslationScale(out: any, q: any, v: any, s: any): any;
/**

@@ -379,3 +379,3 @@ * Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin

*/
export function fromRotationTranslationScaleOrigin(out: mat4, q: quat4, v: ReadonlyVec3, s: ReadonlyVec3, o: ReadonlyVec3): mat4;
export declare function fromRotationTranslationScaleOrigin(out: any, q: any, v: any, s: any, o: any): any;
/**

@@ -389,3 +389,3 @@ * Calculates a 4x4 matrix from the given quaternion

*/
export function fromQuat(out: mat4, q: ReadonlyQuat): mat4;
export declare function fromQuat(out: any, q: any): any;
/**

@@ -403,3 +403,3 @@ * Generates a frustum matrix with the given bounds

*/
export function frustum(out: mat4, left: number, right: number, bottom: number, top: number, near: number, far: number): mat4;
export declare function frustum(out: any, left: any, right: any, bottom: any, top: any, near: any, far: any): any;
/**

@@ -418,4 +418,9 @@ * Generates a perspective projection matrix with the given bounds.

*/
export function perspectiveNO(out: mat4, fovy: number, aspect: number, near: number, far: number): mat4;
export declare function perspectiveNO(out: any, fovy: any, aspect: any, near: any, far: any): any;
/**
* Alias for {@link mat4.perspectiveNO}
* @function
*/
export declare const perspective: typeof perspectiveNO;
/**
* Generates a perspective projection matrix suitable for WebGPU with the given bounds.

@@ -433,3 +438,3 @@ * The near/far clip planes correspond to a normalized device coordinate Z range of [0, 1],

*/
export function perspectiveZO(out: mat4, fovy: number, aspect: number, near: number, far: number): mat4;
export declare function perspectiveZO(out: any, fovy: any, aspect: any, near: any, far: any): any;
/**

@@ -446,3 +451,3 @@ * Generates a perspective projection matrix with the given field of view.

*/
export function perspectiveFromFieldOfView(out: mat4, fov: any, near: number, far: number): mat4;
export declare function perspectiveFromFieldOfView(out: any, fov: any, near: any, far: any): any;
/**

@@ -462,4 +467,9 @@ * Generates a orthogonal projection matrix with the given bounds.

*/
export function orthoNO(out: mat4, left: number, right: number, bottom: number, top: number, near: number, far: number): mat4;
export declare function orthoNO(out: any, left: any, right: any, bottom: any, top: any, near: any, far: any): any;
/**
* Alias for {@link mat4.orthoNO}
* @function
*/
export declare const ortho: typeof orthoNO;
/**
* Generates a orthogonal projection matrix with the given bounds.

@@ -478,3 +488,3 @@ * The near/far clip planes correspond to a normalized device coordinate Z range of [0, 1],

*/
export function orthoZO(out: mat4, left: number, right: number, bottom: number, top: number, near: number, far: number): mat4;
export declare function orthoZO(out: any, left: any, right: any, bottom: any, top: any, near: any, far: any): any;
/**

@@ -490,3 +500,3 @@ * Generates a look-at matrix with the given eye position, focal point, and up axis.

*/
export function lookAt(out: mat4, eye: ReadonlyVec3, center: ReadonlyVec3, up: ReadonlyVec3): mat4;
export declare function lookAt(out: any, eye: any, center: any, up: any): any;
/**

@@ -501,3 +511,3 @@ * Generates a matrix that makes something look at something else.

*/
export function targetTo(out: mat4, eye: ReadonlyVec3, target: any, up: ReadonlyVec3): mat4;
export declare function targetTo(out: any, eye: any, target: any, up: any): any;
/**

@@ -509,3 +519,3 @@ * Returns a string representation of a mat4

*/
export function str(a: ReadonlyMat4): string;
export declare function str(a: any): string;
/**

@@ -517,3 +527,3 @@ * Returns Frobenius norm of a mat4

*/
export function frob(a: ReadonlyMat4): number;
export declare function frob(a: any): number;
/**

@@ -527,3 +537,3 @@ * Adds two mat4's

*/
export function add(out: mat4, a: ReadonlyMat4, b: ReadonlyMat4): mat4;
export declare function add(out: any, a: any, b: any): any;
/**

@@ -537,3 +547,3 @@ * Subtracts matrix b from matrix a

*/
export function subtract(out: mat4, a: ReadonlyMat4, b: ReadonlyMat4): mat4;
export declare function subtract(out: any, a: any, b: any): any;
/**

@@ -547,3 +557,3 @@ * Multiply each element of the matrix by a scalar.

*/
export function multiplyScalar(out: mat4, a: ReadonlyMat4, b: number): mat4;
export declare function multiplyScalar(out: any, a: any, b: any): any;
/**

@@ -558,3 +568,3 @@ * Adds two mat4's after multiplying each element of the second operand by a scalar value.

*/
export function multiplyScalarAndAdd(out: mat4, a: ReadonlyMat4, b: ReadonlyMat4, scale: number): mat4;
export declare function multiplyScalarAndAdd(out: any, a: any, b: any, scale: any): any;
/**

@@ -567,3 +577,3 @@ * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)

*/
export function exactEquals(a: ReadonlyMat4, b: ReadonlyMat4): boolean;
export declare function exactEquals(a: any, b: any): boolean;
/**

@@ -576,50 +586,13 @@ * Returns whether or not the matrices have approximately the same elements in the same position.

*/
export function equals(a: ReadonlyMat4, b: ReadonlyMat4): boolean;
export declare function equals(a: any, b: any): boolean;
/**
* Generates a perspective projection matrix with the given bounds.
* The near/far clip planes correspond to a normalized device coordinate Z range of [-1, 1],
* which matches WebGL/OpenGL's clip volume.
* Passing null/undefined/no value for far will generate infinite projection matrix.
*
* @param {mat4} out mat4 frustum matrix will be written into
* @param {number} fovy Vertical field of view in radians
* @param {number} aspect Aspect ratio. typically viewport width/height
* @param {number} near Near bound of the frustum
* @param {number} far Far bound of the frustum, can be null or Infinity
* @returns {mat4} out
* Alias for {@link mat4.multiply}
* @function
*/
export function perspective(out: mat4, fovy: number, aspect: number, near: number, far: number): mat4;
export declare const mul: typeof multiply;
/**
* Generates a orthogonal projection matrix with the given bounds.
* The near/far clip planes correspond to a normalized device coordinate Z range of [-1, 1],
* which matches WebGL/OpenGL's clip volume.
*
* @param {mat4} out mat4 frustum matrix will be written into
* @param {number} left Left bound of the frustum
* @param {number} right Right bound of the frustum
* @param {number} bottom Bottom bound of the frustum
* @param {number} top Top bound of the frustum
* @param {number} near Near bound of the frustum
* @param {number} far Far bound of the frustum
* @returns {mat4} out
* Alias for {@link mat4.subtract}
* @function
*/
export function ortho(out: mat4, left: number, right: number, bottom: number, top: number, near: number, far: number): mat4;
/**
* Multiplies two mat4s
*
* @param {mat4} out the receiving matrix
* @param {ReadonlyMat4} a the first operand
* @param {ReadonlyMat4} b the second operand
* @returns {mat4} out
*/
export function mul(out: mat4, a: ReadonlyMat4, b: ReadonlyMat4): mat4;
/**
* Subtracts matrix b from matrix a
*
* @param {mat4} out the receiving matrix
* @param {ReadonlyMat4} a the first operand
* @param {ReadonlyMat4} b the second operand
* @returns {mat4} out
*/
export function sub(out: mat4, a: ReadonlyMat4, b: ReadonlyMat4): mat4;
export declare const sub: typeof subtract;
//# sourceMappingURL=mat4.d.ts.map

@@ -356,3 +356,3 @@ import * as vec4 from './vec4.js';

*/
export declare const setAxes: (out: any, view: any, right: any, up: any) => vec4;
export declare const setAxes: (out: any, view: any, right: any, up: any) => any;
//# sourceMappingURL=quat.d.ts.map

@@ -8,12 +8,12 @@ /**

*
* @returns {vec2} a new 2D vector
* @returns {NumericArray} a new 2D vector
*/
export function create(): vec2;
export declare function create(): any[] | Float32Array;
/**
* Creates a new vec2 initialized with values from an existing vector
*
* @param {ReadonlyVec2} a vector to clone
* @returns {vec2} a new 2D vector
* @param {Readonly<NumericArray>} a vector to clone
* @returns {NumericArray} a new 2D vector
*/
export function clone(a: ReadonlyVec2): vec2;
export declare function clone(a: any): any[] | Float32Array;
/**

@@ -24,181 +24,181 @@ * Creates a new vec2 initialized with the given values

* @param {Number} y Y component
* @returns {vec2} a new 2D vector
* @returns {NumericArray} a new 2D vector
*/
export function fromValues(x: number, y: number): vec2;
export declare function fromValues(x: any, y: any): any[] | Float32Array;
/**
* Copy the values from one vec2 to another
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the source vector
* @returns {vec2} out
* @param {NumericArray} out the receiving vector
* @param {Readonly<NumericArray>} a the source vector
* @returns {NumericArray} out
*/
export function copy(out: vec2, a: ReadonlyVec2): vec2;
export declare function copy(out: any, a: any): any;
/**
* Set the components of a vec2 to the given values
*
* @param {vec2} out the receiving vector
* @param {NumericArray} out the receiving vector
* @param {Number} x X component
* @param {Number} y Y component
* @returns {vec2} out
* @returns {NumericArray} out
*/
export function set(out: vec2, x: number, y: number): vec2;
export declare function set(out: any, x: any, y: any): any;
/**
* Adds two vec2's
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @returns {vec2} out
* @param {NumericArray} out the receiving vector
* @param {Readonly<NumericArray>} a the first operand
* @param {Readonly<NumericArray>} b the second operand
* @returns {NumericArray} out
*/
export function add(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2;
export declare function add(out: any, a: any, b: any): any;
/**
* Subtracts vector b from vector a
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @returns {vec2} out
* @param {NumericArray} out the receiving vector
* @param {Readonly<NumericArray>} a the first operand
* @param {Readonly<NumericArray>} b the second operand
* @returns {NumericArray} out
*/
export function subtract(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2;
export declare function subtract(out: any, a: any, b: any): any;
/**
* Multiplies two vec2's
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @returns {vec2} out
* @param {NumericArray} out the receiving vector
* @param {Readonly<NumericArray>} a the first operand
* @param {Readonly<NumericArray>} b the second operand
* @returns {NumericArray} out
*/
export function multiply(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2;
export declare function multiply(out: any, a: any, b: any): any;
/**
* Divides two vec2's
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @returns {vec2} out
* @param {NumericArray} out the receiving vector
* @param {Readonly<NumericArray>} a the first operand
* @param {Readonly<NumericArray>} b the second operand
* @returns {NumericArray} out
*/
export function divide(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2;
export declare function divide(out: any, a: any, b: any): any;
/**
* Math.ceil the components of a vec2
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a vector to ceil
* @returns {vec2} out
* @param {NumericArray} out the receiving vector
* @param {Readonly<NumericArray>} a vector to ceil
* @returns {NumericArray} out
*/
export function ceil(out: vec2, a: ReadonlyVec2): vec2;
export declare function ceil(out: any, a: any): any;
/**
* Math.floor the components of a vec2
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a vector to floor
* @returns {vec2} out
* @param {NumericArray} out the receiving vector
* @param {Readonly<NumericArray>} a vector to floor
* @returns {NumericArray} out
*/
export function floor(out: vec2, a: ReadonlyVec2): vec2;
export declare function floor(out: any, a: any): any;
/**
* Returns the minimum of two vec2's
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @returns {vec2} out
* @param {NumericArray} out the receiving vector
* @param {Readonly<NumericArray>} a the first operand
* @param {Readonly<NumericArray>} b the second operand
* @returns {NumericArray} out
*/
export function min(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2;
export declare function min(out: any, a: any, b: any): any;
/**
* Returns the maximum of two vec2's
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @returns {vec2} out
* @param {NumericArray} out the receiving vector
* @param {Readonly<NumericArray>} a the first operand
* @param {Readonly<NumericArray>} b the second operand
* @returns {NumericArray} out
*/
export function max(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2;
export declare function max(out: any, a: any, b: any): any;
/**
* symmetric round the components of a vec2
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a vector to round
* @returns {vec2} out
* @param {NumericArray} out the receiving vector
* @param {Readonly<NumericArray>} a vector to round
* @returns {NumericArray} out
*/
export function round(out: vec2, a: ReadonlyVec2): vec2;
export declare function round(out: any, a: any): any;
/**
* Scales a vec2 by a scalar number
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the vector to scale
* @param {NumericArray} out the receiving vector
* @param {Readonly<NumericArray>} a the vector to scale
* @param {Number} b amount to scale the vector by
* @returns {vec2} out
* @returns {NumericArray} out
*/
export function scale(out: vec2, a: ReadonlyVec2, b: number): vec2;
export declare function scale(out: any, a: any, b: any): any;
/**
* Adds two vec2's after scaling the second operand by a scalar value
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @param {NumericArray} out the receiving vector
* @param {Readonly<NumericArray>} a the first operand
* @param {Readonly<NumericArray>} b the second operand
* @param {Number} scale the amount to scale b by before adding
* @returns {vec2} out
* @returns {NumericArray} out
*/
export function scaleAndAdd(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2, scale: number): vec2;
export declare function scaleAndAdd(out: any, a: any, b: any, scale: any): any;
/**
* Calculates the euclidian distance between two vec2's
*
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @param {Readonly<NumericArray>} a the first operand
* @param {Readonly<NumericArray>} b the second operand
* @returns {Number} distance between a and b
*/
export function distance(a: ReadonlyVec2, b: ReadonlyVec2): number;
export declare function distance(a: any, b: any): number;
/**
* Calculates the squared euclidian distance between two vec2's
*
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @param {Readonly<NumericArray>} a the first operand
* @param {Readonly<NumericArray>} b the second operand
* @returns {Number} squared distance between a and b
*/
export function squaredDistance(a: ReadonlyVec2, b: ReadonlyVec2): number;
export declare function squaredDistance(a: any, b: any): number;
/**
* Calculates the length of a vec2
*
* @param {ReadonlyVec2} a vector to calculate length of
* @param {Readonly<NumericArray>} a vector to calculate length of
* @returns {Number} length of a
*/
export function length(a: ReadonlyVec2): number;
export declare function length(a: any): number;
/**
* Calculates the squared length of a vec2
*
* @param {ReadonlyVec2} a vector to calculate squared length of
* @param {Readonly<NumericArray>} a vector to calculate squared length of
* @returns {Number} squared length of a
*/
export function squaredLength(a: ReadonlyVec2): number;
export declare function squaredLength(a: any): number;
/**
* Negates the components of a vec2
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a vector to negate
* @returns {vec2} out
* @param {NumericArray} out the receiving vector
* @param {Readonly<NumericArray>} a vector to negate
* @returns {NumericArray} out
*/
export function negate(out: vec2, a: ReadonlyVec2): vec2;
export declare function negate(out: any, a: any): any;
/**
* Returns the inverse of the components of a vec2
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a vector to invert
* @returns {vec2} out
* @param {NumericArray} out the receiving vector
* @param {Readonly<NumericArray>} a vector to invert
* @returns {NumericArray} out
*/
export function inverse(out: vec2, a: ReadonlyVec2): vec2;
export declare function inverse(out: any, a: any): any;
/**
* Normalize a vec2
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a vector to normalize
* @returns {vec2} out
* @param {NumericArray} out the receiving vector
* @param {Readonly<NumericArray>} a vector to normalize
* @returns {NumericArray} out
*/
export function normalize(out: vec2, a: ReadonlyVec2): vec2;
export declare function normalize(out: any, a: any): any;
/**
* Calculates the dot product of two vec2's
*
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @param {Readonly<NumericArray>} a the first operand
* @param {Readonly<NumericArray>} b the second operand
* @returns {Number} dot product of a and b
*/
export function dot(a: ReadonlyVec2, b: ReadonlyVec2): number;
export declare function dot(a: any, b: any): number;
/**

@@ -209,43 +209,43 @@ * Computes the cross product of two vec2's

* @param {vec3} out the receiving vector
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @param {Readonly<NumericArray>} a the first operand
* @param {Readonly<NumericArray>} b the second operand
* @returns {vec3} out
*/
export function cross(out: vec3, a: ReadonlyVec2, b: ReadonlyVec2): vec3;
export declare function cross(out: any, a: any, b: any): any;
/**
* Performs a linear interpolation between two vec2's
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @param {NumericArray} out the receiving vector
* @param {Readonly<NumericArray>} a the first operand
* @param {Readonly<NumericArray>} b the second operand
* @param {Number} t interpolation amount, in the range [0-1], between the two inputs
* @returns {vec2} out
* @returns {NumericArray} out
*/
export function lerp(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2, t: number): vec2;
export declare function lerp(out: any, a: any, b: any, t: any): any;
/**
* Generates a random vector with the given scale
*
* @param {vec2} out the receiving vector
* @param {NumericArray} out the receiving vector
* @param {Number} [scale] Length of the resulting vector. If omitted, a unit vector will be returned
* @returns {vec2} out
* @returns {NumericArray} out
*/
export function random(out: vec2, scale?: number): vec2;
export declare function random(out: any, scale: any): any;
/**
* Transforms the vec2 with a mat2
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the vector to transform
* @param {NumericArray} out the receiving vector
* @param {Readonly<NumericArray>} a the vector to transform
* @param {ReadonlyMat2} m matrix to transform with
* @returns {vec2} out
* @returns {NumericArray} out
*/
export function transformMat2(out: vec2, a: ReadonlyVec2, m: ReadonlyMat2): vec2;
export declare function transformMat2(out: any, a: any, m: any): any;
/**
* Transforms the vec2 with a mat2d
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the vector to transform
* @param {NumericArray} out the receiving vector
* @param {Readonly<NumericArray>} a the vector to transform
* @param {ReadonlyMat2d} m matrix to transform with
* @returns {vec2} out
* @returns {NumericArray} out
*/
export function transformMat2d(out: vec2, a: ReadonlyVec2, m: ReadonlyMat2d): vec2;
export declare function transformMat2d(out: any, a: any, m: any): any;
/**

@@ -255,8 +255,8 @@ * Transforms the vec2 with a mat3

*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the vector to transform
* @param {NumericArray} out the receiving vector
* @param {Readonly<NumericArray>} a the vector to transform
* @param {ReadonlyMat3} m matrix to transform with
* @returns {vec2} out
* @returns {NumericArray} out
*/
export function transformMat3(out: vec2, a: ReadonlyVec2, m: ReadonlyMat3): vec2;
export declare function transformMat3(out: any, a: any, m: any): any;
/**

@@ -267,112 +267,102 @@ * Transforms the vec2 with a mat4

*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the vector to transform
* @param {NumericArray} out the receiving vector
* @param {Readonly<NumericArray>} a the vector to transform
* @param {ReadonlyMat4} m matrix to transform with
* @returns {vec2} out
* @returns {NumericArray} out
*/
export function transformMat4(out: vec2, a: ReadonlyVec2, m: ReadonlyMat4): vec2;
export declare function transformMat4(out: any, a: any, m: any): any;
/**
* Rotate a 2D vector
* @param {vec2} out The receiving vec2
* @param {ReadonlyVec2} a The vec2 point to rotate
* @param {ReadonlyVec2} b The origin of the rotation
* @param {NumericArray} out The receiving vec2
* @param {Readonly<NumericArray>} a The vec2 point to rotate
* @param {Readonly<NumericArray>} b The origin of the rotation
* @param {Number} rad The angle of rotation in radians
* @returns {vec2} out
* @returns {NumericArray} out
*/
export function rotate(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2, rad: number): vec2;
export declare function rotate(out: any, a: any, b: any, rad: any): any;
/**
* Get the angle between two 2D vectors
* @param {ReadonlyVec2} a The first operand
* @param {ReadonlyVec2} b The second operand
* @param {Readonly<NumericArray>} a The first operand
* @param {Readonly<NumericArray>} b The second operand
* @returns {Number} The angle in radians
*/
export function angle(a: ReadonlyVec2, b: ReadonlyVec2): number;
export declare function angle(a: any, b: any): number;
/**
* Set the components of a vec2 to zero
*
* @param {vec2} out the receiving vector
* @returns {vec2} out
* @param {NumericArray} out the receiving vector
* @returns {NumericArray} out
*/
export function zero(out: vec2): vec2;
export declare function zero(out: any): any;
/**
* Returns a string representation of a vector
*
* @param {ReadonlyVec2} a vector to represent as a string
* @param {Readonly<NumericArray>} a vector to represent as a string
* @returns {String} string representation of the vector
*/
export function str(a: ReadonlyVec2): string;
export declare function str(a: any): string;
/**
* Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===)
*
* @param {ReadonlyVec2} a The first vector.
* @param {ReadonlyVec2} b The second vector.
* @param {Readonly<NumericArray>} a The first vector.
* @param {Readonly<NumericArray>} b The second vector.
* @returns {Boolean} True if the vectors are equal, false otherwise.
*/
export function exactEquals(a: ReadonlyVec2, b: ReadonlyVec2): boolean;
export declare function exactEquals(a: any, b: any): boolean;
/**
* Returns whether or not the vectors have approximately the same elements in the same position.
*
* @param {ReadonlyVec2} a The first vector.
* @param {ReadonlyVec2} b The second vector.
* @param {Readonly<NumericArray>} a The first vector.
* @param {Readonly<NumericArray>} b The second vector.
* @returns {Boolean} True if the vectors are equal, false otherwise.
*/
export function equals(a: ReadonlyVec2, b: ReadonlyVec2): boolean;
export declare function equals(a: any, b: any): boolean;
/**
* Calculates the length of a vec2
*
* @param {ReadonlyVec2} a vector to calculate length of
* @returns {Number} length of a
* Alias for {@link vec2.length}
* @function
*/
export function len(a: ReadonlyVec2): number;
export declare const len: typeof length;
/**
* Subtracts vector b from vector a
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @returns {vec2} out
* Alias for {@link vec2.subtract}
* @function
*/
export function sub(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2;
export declare const sub: typeof subtract;
/**
* Multiplies two vec2's
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @returns {vec2} out
* Alias for {@link vec2.multiply}
* @function
*/
export function mul(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2;
export declare const mul: typeof multiply;
/**
* Divides two vec2's
*
* @param {vec2} out the receiving vector
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @returns {vec2} out
* Alias for {@link vec2.divide}
* @function
*/
export function div(out: vec2, a: ReadonlyVec2, b: ReadonlyVec2): vec2;
export declare const div: typeof divide;
/**
* Calculates the euclidian distance between two vec2's
*
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @returns {Number} distance between a and b
* Alias for {@link vec2.distance}
* @function
*/
export function dist(a: ReadonlyVec2, b: ReadonlyVec2): number;
export declare const dist: typeof distance;
/**
* Calculates the squared euclidian distance between two vec2's
*
* @param {ReadonlyVec2} a the first operand
* @param {ReadonlyVec2} b the second operand
* @returns {Number} squared distance between a and b
* Alias for {@link vec2.squaredDistance}
* @function
*/
export function sqrDist(a: ReadonlyVec2, b: ReadonlyVec2): number;
export declare const sqrDist: typeof squaredDistance;
/**
* Calculates the squared length of a vec2
* Alias for {@link vec2.squaredLength}
* @function
*/
export declare const sqrLen: typeof squaredLength;
/**
* Perform some operation over an array of vec2s.
*
* @param {ReadonlyVec2} a vector to calculate squared length of
* @returns {Number} squared length of a
* @param {Array} a the array of vectors to iterate over
* @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed
* @param {Number} offset Number of elements to skip at the beginning of the array
* @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array
* @param {Function} fn Function to call for each vector in the array
* @param {Object} [arg] additional argument to pass to fn
* @returns {Array} a
* @function
*/
export function sqrLen(a: ReadonlyVec2): number;
export function forEach(a: any, stride: any, offset: any, count: any, fn: any, arg: any): any;
export declare const forEach: (a: any, stride: any, offset: any, count: any, fn: any, arg: any) => any;
//# sourceMappingURL=vec2.d.ts.map

@@ -10,3 +10,3 @@ /**

*/
export function create(): vec3;
export declare function create(): any[] | Float32Array;
/**

@@ -18,3 +18,3 @@ * Creates a new vec3 initialized with values from an existing vector

*/
export function clone(a: ReadonlyVec3): vec3;
export declare function clone(a: any): any[] | Float32Array;
/**

@@ -26,3 +26,3 @@ * Calculates the length of a vec3

*/
export function length(a: ReadonlyVec3): number;
export declare function length(a: any): number;
/**

@@ -36,3 +36,3 @@ * Creates a new vec3 initialized with the given values

*/
export function fromValues(x: number, y: number, z: number): vec3;
export declare function fromValues(x: any, y: any, z: any): any[] | Float32Array;
/**

@@ -45,3 +45,3 @@ * Copy the values from one vec3 to another

*/
export function copy(out: vec3, a: ReadonlyVec3): vec3;
export declare function copy(out: any, a: any): any;
/**

@@ -56,3 +56,3 @@ * Set the components of a vec3 to the given values

*/
export function set(out: vec3, x: number, y: number, z: number): vec3;
export declare function set(out: any, x: any, y: any, z: any): any;
/**

@@ -66,3 +66,3 @@ * Adds two vec3's

*/
export function add(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3;
export declare function add(out: any, a: any, b: any): any;
/**

@@ -76,3 +76,3 @@ * Subtracts vector b from vector a

*/
export function subtract(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3;
export declare function subtract(out: any, a: any, b: any): any;
/**

@@ -86,3 +86,3 @@ * Multiplies two vec3's

*/
export function multiply(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3;
export declare function multiply(out: any, a: any, b: any): any;
/**

@@ -96,3 +96,3 @@ * Divides two vec3's

*/
export function divide(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3;
export declare function divide(out: any, a: any, b: any): any;
/**

@@ -105,3 +105,3 @@ * Math.ceil the components of a vec3

*/
export function ceil(out: vec3, a: ReadonlyVec3): vec3;
export declare function ceil(out: any, a: any): any;
/**

@@ -114,3 +114,3 @@ * Math.floor the components of a vec3

*/
export function floor(out: vec3, a: ReadonlyVec3): vec3;
export declare function floor(out: any, a: any): any;
/**

@@ -124,3 +124,3 @@ * Returns the minimum of two vec3's

*/
export function min(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3;
export declare function min(out: any, a: any, b: any): any;
/**

@@ -134,3 +134,3 @@ * Returns the maximum of two vec3's

*/
export function max(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3;
export declare function max(out: any, a: any, b: any): any;
/**

@@ -143,3 +143,3 @@ * symmetric round the components of a vec3

*/
export function round(out: vec3, a: ReadonlyVec3): vec3;
export declare function round(out: any, a: any): any;
/**

@@ -153,3 +153,3 @@ * Scales a vec3 by a scalar number

*/
export function scale(out: vec3, a: ReadonlyVec3, b: number): vec3;
export declare function scale(out: any, a: any, b: any): any;
/**

@@ -164,3 +164,3 @@ * Adds two vec3's after scaling the second operand by a scalar value

*/
export function scaleAndAdd(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, scale: number): vec3;
export declare function scaleAndAdd(out: any, a: any, b: any, scale: any): any;
/**

@@ -173,3 +173,3 @@ * Calculates the euclidian distance between two vec3's

*/
export function distance(a: ReadonlyVec3, b: ReadonlyVec3): number;
export declare function distance(a: any, b: any): number;
/**

@@ -182,3 +182,3 @@ * Calculates the squared euclidian distance between two vec3's

*/
export function squaredDistance(a: ReadonlyVec3, b: ReadonlyVec3): number;
export declare function squaredDistance(a: any, b: any): number;
/**

@@ -190,3 +190,3 @@ * Calculates the squared length of a vec3

*/
export function squaredLength(a: ReadonlyVec3): number;
export declare function squaredLength(a: any): number;
/**

@@ -199,3 +199,3 @@ * Negates the components of a vec3

*/
export function negate(out: vec3, a: ReadonlyVec3): vec3;
export declare function negate(out: any, a: any): any;
/**

@@ -208,3 +208,3 @@ * Returns the inverse of the components of a vec3

*/
export function inverse(out: vec3, a: ReadonlyVec3): vec3;
export declare function inverse(out: any, a: any): any;
/**

@@ -217,3 +217,3 @@ * Normalize a vec3

*/
export function normalize(out: vec3, a: ReadonlyVec3): vec3;
export declare function normalize(out: any, a: any): any;
/**

@@ -226,3 +226,3 @@ * Calculates the dot product of two vec3's

*/
export function dot(a: ReadonlyVec3, b: ReadonlyVec3): number;
export declare function dot(a: any, b: any): number;
/**

@@ -236,3 +236,3 @@ * Computes the cross product of two vec3's

*/
export function cross(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3;
export declare function cross(out: any, a: any, b: any): any;
/**

@@ -247,3 +247,3 @@ * Performs a linear interpolation between two vec3's

*/
export function lerp(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, t: number): vec3;
export declare function lerp(out: any, a: any, b: any, t: any): any;
/**

@@ -258,3 +258,3 @@ * Performs a spherical linear interpolation between two vec3's

*/
export function slerp(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, t: number): vec3;
export declare function slerp(out: any, a: any, b: any, t: any): any;
/**

@@ -271,3 +271,3 @@ * Performs a hermite interpolation with two control points

*/
export function hermite(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, c: ReadonlyVec3, d: ReadonlyVec3, t: number): vec3;
export declare function hermite(out: any, a: any, b: any, c: any, d: any, t: any): any;
/**

@@ -284,3 +284,3 @@ * Performs a bezier interpolation with two control points

*/
export function bezier(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, c: ReadonlyVec3, d: ReadonlyVec3, t: number): vec3;
export declare function bezier(out: any, a: any, b: any, c: any, d: any, t: any): any;
/**

@@ -293,3 +293,3 @@ * Generates a random vector with the given scale

*/
export function random(out: vec3, scale?: number): vec3;
export declare function random(out: any, scale: any): any;
/**

@@ -304,3 +304,3 @@ * Transforms the vec3 with a mat4.

*/
export function transformMat4(out: vec3, a: ReadonlyVec3, m: ReadonlyMat4): vec3;
export declare function transformMat4(out: any, a: any, m: any): any;
/**

@@ -314,3 +314,3 @@ * Transforms the vec3 with a mat3.

*/
export function transformMat3(out: vec3, a: ReadonlyVec3, m: ReadonlyMat3): vec3;
export declare function transformMat3(out: any, a: any, m: any): any;
/**

@@ -325,3 +325,3 @@ * Transforms the vec3 with a quat

*/
export function transformQuat(out: vec3, a: ReadonlyVec3, q: ReadonlyQuat): vec3;
export declare function transformQuat(out: any, a: any, q: any): any;
/**

@@ -335,3 +335,3 @@ * Rotate a 3D vector around the x-axis

*/
export function rotateX(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, rad: number): vec3;
export declare function rotateX(out: any, a: any, b: any, rad: any): any;
/**

@@ -345,3 +345,3 @@ * Rotate a 3D vector around the y-axis

*/
export function rotateY(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, rad: number): vec3;
export declare function rotateY(out: any, a: any, b: any, rad: any): any;
/**

@@ -355,3 +355,3 @@ * Rotate a 3D vector around the z-axis

*/
export function rotateZ(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3, rad: number): vec3;
export declare function rotateZ(out: any, a: any, b: any, rad: any): any;
/**

@@ -363,3 +363,3 @@ * Get the angle between two 3D vectors

*/
export function angle(a: ReadonlyVec3, b: ReadonlyVec3): number;
export declare function angle(a: any, b: any): number;
/**

@@ -371,3 +371,3 @@ * Set the components of a vec3 to zero

*/
export function zero(out: vec3): vec3;
export declare function zero(out: any): any;
/**

@@ -379,3 +379,3 @@ * Returns a string representation of a vector

*/
export function str(a: ReadonlyVec3): string;
export declare function str(a: any): string;
/**

@@ -388,3 +388,3 @@ * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)

*/
export function exactEquals(a: ReadonlyVec3, b: ReadonlyVec3): boolean;
export declare function exactEquals(a: any, b: any): boolean;
/**

@@ -397,61 +397,51 @@ * Returns whether or not the vectors have approximately the same elements in the same position.

*/
export function equals(a: ReadonlyVec3, b: ReadonlyVec3): boolean;
export declare function equals(a: any, b: any): boolean;
/**
* Subtracts vector b from vector a
*
* @param {vec3} out the receiving vector
* @param {ReadonlyVec3} a the first operand
* @param {ReadonlyVec3} b the second operand
* @returns {vec3} out
* Alias for {@link vec3.subtract}
* @function
*/
export function sub(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3;
export declare const sub: typeof subtract;
/**
* Multiplies two vec3's
*
* @param {vec3} out the receiving vector
* @param {ReadonlyVec3} a the first operand
* @param {ReadonlyVec3} b the second operand
* @returns {vec3} out
* Alias for {@link vec3.multiply}
* @function
*/
export function mul(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3;
export declare const mul: typeof multiply;
/**
* Divides two vec3's
*
* @param {vec3} out the receiving vector
* @param {ReadonlyVec3} a the first operand
* @param {ReadonlyVec3} b the second operand
* @returns {vec3} out
* Alias for {@link vec3.divide}
* @function
*/
export function div(out: vec3, a: ReadonlyVec3, b: ReadonlyVec3): vec3;
export declare const div: typeof divide;
/**
* Calculates the euclidian distance between two vec3's
*
* @param {ReadonlyVec3} a the first operand
* @param {ReadonlyVec3} b the second operand
* @returns {Number} distance between a and b
* Alias for {@link vec3.distance}
* @function
*/
export function dist(a: ReadonlyVec3, b: ReadonlyVec3): number;
export declare const dist: typeof distance;
/**
* Calculates the squared euclidian distance between two vec3's
*
* @param {ReadonlyVec3} a the first operand
* @param {ReadonlyVec3} b the second operand
* @returns {Number} squared distance between a and b
* Alias for {@link vec3.squaredDistance}
* @function
*/
export function sqrDist(a: ReadonlyVec3, b: ReadonlyVec3): number;
export declare const sqrDist: typeof squaredDistance;
/**
* Calculates the length of a vec3
*
* @param {ReadonlyVec3} a vector to calculate length of
* @returns {Number} length of a
* Alias for {@link vec3.length}
* @function
*/
export function len(a: ReadonlyVec3): number;
export declare const len: typeof length;
/**
* Calculates the squared length of a vec3
* Alias for {@link vec3.squaredLength}
* @function
*/
export declare const sqrLen: typeof squaredLength;
/**
* Perform some operation over an array of vec3s.
*
* @param {ReadonlyVec3} a vector to calculate squared length of
* @returns {Number} squared length of a
* @param {Array} a the array of vectors to iterate over
* @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed
* @param {Number} offset Number of elements to skip at the beginning of the array
* @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array
* @param {Function} fn Function to call for each vector in the array
* @param {Object} [arg] additional argument to pass to fn
* @returns {Array} a
* @function
*/
export function sqrLen(a: ReadonlyVec3): number;
export function forEach(a: any, stride: any, offset: any, count: any, fn: any, arg: any): any;
export declare const forEach: (a: any, stride: any, offset: any, count: any, fn: any, arg: any) => any;
//# sourceMappingURL=vec3.d.ts.map

@@ -10,3 +10,3 @@ /**

*/
export function create(): vec4;
export declare function create(): any[] | Float32Array;
/**

@@ -18,3 +18,3 @@ * Creates a new vec4 initialized with values from an existing vector

*/
export function clone(a: ReadonlyVec4): vec4;
export declare function clone(a: any): any[] | Float32Array;
/**

@@ -29,3 +29,3 @@ * Creates a new vec4 initialized with the given values

*/
export function fromValues(x: number, y: number, z: number, w: number): vec4;
export declare function fromValues(x: any, y: any, z: any, w: any): any[] | Float32Array;
/**

@@ -38,3 +38,3 @@ * Copy the values from one vec4 to another

*/
export function copy(out: vec4, a: ReadonlyVec4): vec4;
export declare function copy(out: any, a: any): any;
/**

@@ -50,3 +50,3 @@ * Set the components of a vec4 to the given values

*/
export function set(out: vec4, x: number, y: number, z: number, w: number): vec4;
export declare function set(out: any, x: any, y: any, z: any, w: any): any;
/**

@@ -60,3 +60,3 @@ * Adds two vec4's

*/
export function add(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4;
export declare function add(out: any, a: any, b: any): any;
/**

@@ -70,3 +70,3 @@ * Subtracts vector b from vector a

*/
export function subtract(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4;
export declare function subtract(out: any, a: any, b: any): any;
/**

@@ -80,3 +80,3 @@ * Multiplies two vec4's

*/
export function multiply(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4;
export declare function multiply(out: any, a: any, b: any): any;
/**

@@ -90,3 +90,3 @@ * Divides two vec4's

*/
export function divide(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4;
export declare function divide(out: any, a: any, b: any): any;
/**

@@ -99,3 +99,3 @@ * Math.ceil the components of a vec4

*/
export function ceil(out: vec4, a: ReadonlyVec4): vec4;
export declare function ceil(out: any, a: any): any;
/**

@@ -108,3 +108,3 @@ * Math.floor the components of a vec4

*/
export function floor(out: vec4, a: ReadonlyVec4): vec4;
export declare function floor(out: any, a: any): any;
/**

@@ -118,3 +118,3 @@ * Returns the minimum of two vec4's

*/
export function min(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4;
export declare function min(out: any, a: any, b: any): any;
/**

@@ -128,3 +128,3 @@ * Returns the maximum of two vec4's

*/
export function max(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4;
export declare function max(out: any, a: any, b: any): any;
/**

@@ -137,3 +137,3 @@ * symmetric round the components of a vec4

*/
export function round(out: vec4, a: ReadonlyVec4): vec4;
export declare function round(out: any, a: any): any;
/**

@@ -147,3 +147,3 @@ * Scales a vec4 by a scalar number

*/
export function scale(out: vec4, a: ReadonlyVec4, b: number): vec4;
export declare function scale(out: any, a: any, b: any): any;
/**

@@ -158,3 +158,3 @@ * Adds two vec4's after scaling the second operand by a scalar value

*/
export function scaleAndAdd(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4, scale: number): vec4;
export declare function scaleAndAdd(out: any, a: any, b: any, scale: any): any;
/**

@@ -167,3 +167,3 @@ * Calculates the euclidian distance between two vec4's

*/
export function distance(a: ReadonlyVec4, b: ReadonlyVec4): number;
export declare function distance(a: any, b: any): number;
/**

@@ -176,3 +176,3 @@ * Calculates the squared euclidian distance between two vec4's

*/
export function squaredDistance(a: ReadonlyVec4, b: ReadonlyVec4): number;
export declare function squaredDistance(a: any, b: any): number;
/**

@@ -184,3 +184,3 @@ * Calculates the length of a vec4

*/
export function length(a: ReadonlyVec4): number;
export declare function length(a: any): number;
/**

@@ -192,3 +192,3 @@ * Calculates the squared length of a vec4

*/
export function squaredLength(a: ReadonlyVec4): number;
export declare function squaredLength(a: any): number;
/**

@@ -201,3 +201,3 @@ * Negates the components of a vec4

*/
export function negate(out: vec4, a: ReadonlyVec4): vec4;
export declare function negate(out: any, a: any): any;
/**

@@ -210,3 +210,3 @@ * Returns the inverse of the components of a vec4

*/
export function inverse(out: vec4, a: ReadonlyVec4): vec4;
export declare function inverse(out: any, a: any): any;
/**

@@ -219,3 +219,3 @@ * Normalize a vec4

*/
export function normalize(out: vec4, a: ReadonlyVec4): vec4;
export declare function normalize(out: any, a: any): any;
/**

@@ -228,3 +228,3 @@ * Calculates the dot product of two vec4's

*/
export function dot(a: ReadonlyVec4, b: ReadonlyVec4): number;
export declare function dot(a: any, b: any): number;
/**

@@ -239,3 +239,3 @@ * Returns the cross-product of three vectors in a 4-dimensional space

*/
export function cross(out: any, u: any, v: any, w: any): vec4;
export declare function cross(out: any, u: any, v: any, w: any): any;
/**

@@ -250,3 +250,3 @@ * Performs a linear interpolation between two vec4's

*/
export function lerp(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4, t: number): vec4;
export declare function lerp(out: any, a: any, b: any, t: any): any;
/**

@@ -259,3 +259,3 @@ * Generates a random vector with the given scale

*/
export function random(out: vec4, scale?: number): vec4;
export declare function random(out: any, scale: any): any;
/**

@@ -269,3 +269,3 @@ * Transforms the vec4 with a mat4.

*/
export function transformMat4(out: vec4, a: ReadonlyVec4, m: ReadonlyMat4): vec4;
export declare function transformMat4(out: any, a: any, m: any): any;
/**

@@ -279,3 +279,3 @@ * Transforms the vec4 with a quat

*/
export function transformQuat(out: vec4, a: ReadonlyVec4, q: ReadonlyQuat): vec4;
export declare function transformQuat(out: any, a: any, q: any): any;
/**

@@ -287,3 +287,3 @@ * Set the components of a vec4 to zero

*/
export function zero(out: vec4): vec4;
export declare function zero(out: any): any;
/**

@@ -295,3 +295,3 @@ * Returns a string representation of a vector

*/
export function str(a: ReadonlyVec4): string;
export declare function str(a: any): string;
/**

@@ -304,3 +304,3 @@ * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)

*/
export function exactEquals(a: ReadonlyVec4, b: ReadonlyVec4): boolean;
export declare function exactEquals(a: any, b: any): boolean;
/**

@@ -313,61 +313,51 @@ * Returns whether or not the vectors have approximately the same elements in the same position.

*/
export function equals(a: ReadonlyVec4, b: ReadonlyVec4): boolean;
export declare function equals(a: any, b: any): boolean;
/**
* Subtracts vector b from vector a
*
* @param {vec4} out the receiving vector
* @param {ReadonlyVec4} a the first operand
* @param {ReadonlyVec4} b the second operand
* @returns {vec4} out
* Alias for {@link vec4.subtract}
* @function
*/
export function sub(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4;
export declare const sub: typeof subtract;
/**
* Multiplies two vec4's
*
* @param {vec4} out the receiving vector
* @param {ReadonlyVec4} a the first operand
* @param {ReadonlyVec4} b the second operand
* @returns {vec4} out
* Alias for {@link vec4.multiply}
* @function
*/
export function mul(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4;
export declare const mul: typeof multiply;
/**
* Divides two vec4's
*
* @param {vec4} out the receiving vector
* @param {ReadonlyVec4} a the first operand
* @param {ReadonlyVec4} b the second operand
* @returns {vec4} out
* Alias for {@link vec4.divide}
* @function
*/
export function div(out: vec4, a: ReadonlyVec4, b: ReadonlyVec4): vec4;
export declare const div: typeof divide;
/**
* Calculates the euclidian distance between two vec4's
*
* @param {ReadonlyVec4} a the first operand
* @param {ReadonlyVec4} b the second operand
* @returns {Number} distance between a and b
* Alias for {@link vec4.distance}
* @function
*/
export function dist(a: ReadonlyVec4, b: ReadonlyVec4): number;
export declare const dist: typeof distance;
/**
* Calculates the squared euclidian distance between two vec4's
*
* @param {ReadonlyVec4} a the first operand
* @param {ReadonlyVec4} b the second operand
* @returns {Number} squared distance between a and b
* Alias for {@link vec4.squaredDistance}
* @function
*/
export function sqrDist(a: ReadonlyVec4, b: ReadonlyVec4): number;
export declare const sqrDist: typeof squaredDistance;
/**
* Calculates the length of a vec4
*
* @param {ReadonlyVec4} a vector to calculate length of
* @returns {Number} length of a
* Alias for {@link vec4.length}
* @function
*/
export function len(a: ReadonlyVec4): number;
export declare const len: typeof length;
/**
* Calculates the squared length of a vec4
* Alias for {@link vec4.squaredLength}
* @function
*/
export declare const sqrLen: typeof squaredLength;
/**
* Perform some operation over an array of vec4s.
*
* @param {ReadonlyVec4} a vector to calculate squared length of
* @returns {Number} squared length of a
* @param {Array} a the array of vectors to iterate over
* @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed
* @param {Number} offset Number of elements to skip at the beginning of the array
* @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array
* @param {Function} fn Function to call for each vector in the array
* @param {Object} [arg] additional argument to pass to fn
* @returns {Array} a
* @function
*/
export function sqrLen(a: ReadonlyVec4): number;
export function forEach(a: any, stride: any, offset: any, count: any, fn: any, arg: any): any;
export declare const forEach: (a: any, stride: any, offset: any, count: any, fn: any, arg: any) => any;
//# sourceMappingURL=vec4.d.ts.map

@@ -18,2 +18,14 @@ export type { TypedArray, NumericArray } from '@math.gl/types';

export { Euler as _Euler } from './classes/euler';
/** @deprecated Use Matrix3 */
export * as mat3 from './gl-matrix/mat3';
/** @deprecated Use Matrix4 */
export * as mat4 from './gl-matrix/mat4';
/** @deprecated Use Quaterinion */
export * as quat from './gl-matrix/quat';
/** @deprecated UseVector */
export * as vec2 from './gl-matrix/vec2';
/** @deprecated Use Vector3 */
export * as vec3 from './gl-matrix/vec3';
/** @deprecated Use Vector4 */
export * as vec4 from './gl-matrix/vec4';
//# sourceMappingURL=index.d.ts.map

@@ -17,2 +17,14 @@ export { Vector2 } from "./classes/vector2.js";

export { Euler as _Euler } from "./classes/euler.js";
import * as _mat from "./gl-matrix/mat3.js";
export { _mat as mat3 };
import * as _mat2 from "./gl-matrix/mat4.js";
export { _mat2 as mat4 };
import * as _quat from "./gl-matrix/quat.js";
export { _quat as quat };
import * as _vec from "./gl-matrix/vec2.js";
export { _vec as vec2 };
import * as _vec2 from "./gl-matrix/vec3.js";
export { _vec2 as vec3 };
import * as _vec3 from "./gl-matrix/vec4.js";
export { _vec3 as vec4 };
//# sourceMappingURL=index.js.map

@@ -9,3 +9,3 @@ {

},
"version": "4.0.0-alpha.4",
"version": "4.0.0-beta.1",
"keywords": [

@@ -50,5 +50,5 @@ "webgl",

"@babel/runtime": "^7.12.0",
"@math.gl/types": "4.0.0-alpha.4"
"@math.gl/types": "4.0.0-beta.1"
},
"gitHead": "c58e63bfb9c25cd5a4fb2599b2b52c272ed55c67"
"gitHead": "5a2364216b6aadbece690e05b9b5b71753aee472"
}

@@ -55,1 +55,14 @@ // luma.gl, MIT license

export {Euler as _Euler} from './classes/euler';
/** @deprecated Use Matrix3 */
export * as mat3 from './gl-matrix/mat3';
/** @deprecated Use Matrix4 */
export * as mat4 from './gl-matrix/mat4';
/** @deprecated Use Quaterinion */
export * as quat from './gl-matrix/quat';
/** @deprecated UseVector */
export * as vec2 from './gl-matrix/vec2';
/** @deprecated Use Vector3 */
export * as vec3 from './gl-matrix/vec3';
/** @deprecated Use Vector4 */
export * as vec4 from './gl-matrix/vec4';

@@ -13,2 +13,3 @@ type NumericArray =

/*
declare module 'gl-matrix/vec2' {

@@ -268,1 +269,2 @@ function length(a: Readonly<NumericArray>): number;

}
*/

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc