@math.gl/core 4.1.0-alpha.1 → 4.1.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/classes/euler.js +2 -1
- package/dist/classes/matrix3.js +1 -0
- package/dist/classes/matrix4.js +1 -0
- package/dist/classes/spherical-coordinates.js +1 -2
- package/dist/gl-matrix/vec2.d.ts +10 -9
- package/dist/gl-matrix/vec2.js +6 -6
- package/dist/index.cjs.map +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/lib/validators.d.ts +3 -3
- package/package.json +3 -3
- package/src/classes/base/math-array.ts +1 -1
- package/src/classes/euler.ts +2 -1
- package/src/classes/matrix3.ts +1 -0
- package/src/classes/matrix4.ts +1 -0
- package/src/classes/spherical-coordinates.ts +1 -2
- package/src/gl-matrix/vec2.ts +9 -9
- package/src/index.ts +15 -2
- package/src/lib/common.ts +3 -1
- package/src/lib/validators.ts +3 -3
package/dist/classes/euler.js
CHANGED
|
@@ -9,6 +9,7 @@ import { checkNumber } from "../lib/validators.js";
|
|
|
9
9
|
// Internal constants
|
|
10
10
|
const ERR_UNKNOWN_ORDER = 'Unknown Euler angle order';
|
|
11
11
|
const ALMOST_ONE = 0.99999;
|
|
12
|
+
// eslint-disable-next-line no-shadow
|
|
12
13
|
var RotationOrder;
|
|
13
14
|
(function (RotationOrder) {
|
|
14
15
|
RotationOrder[RotationOrder["ZYX"] = 0] = "ZYX";
|
|
@@ -65,8 +66,8 @@ export class Euler extends MathArray {
|
|
|
65
66
|
super(-0, -0, -0, -0);
|
|
66
67
|
// eslint-disable-next-line prefer-rest-params
|
|
67
68
|
if (arguments.length > 0 && Array.isArray(arguments[0])) {
|
|
68
|
-
// eslint-disable-next-line prefer-rest-params
|
|
69
69
|
// @ts-expect-error
|
|
70
|
+
// eslint-disable-next-line prefer-rest-params
|
|
70
71
|
this.fromVector3(...arguments);
|
|
71
72
|
}
|
|
72
73
|
else {
|
package/dist/classes/matrix3.js
CHANGED
|
@@ -8,6 +8,7 @@ import { vec4_transformMat3 } from "../lib/gl-matrix-extras.js";
|
|
|
8
8
|
import { fromQuat as mat3_fromQuat, determinant as mat3_determinant, transpose as mat3_transpose, invert as mat3_invert, multiply as mat3_multiply, rotate as mat3_rotate, scale as mat3_scale, translate as mat3_translate } from "../gl-matrix/mat3.js";
|
|
9
9
|
import { transformMat3 as vec2_transformMat3 } from "../gl-matrix/vec2.js";
|
|
10
10
|
import { transformMat3 as vec3_transformMat3 } from "../gl-matrix/vec3.js";
|
|
11
|
+
// eslint-disable-next-line no-shadow
|
|
11
12
|
var INDICES;
|
|
12
13
|
(function (INDICES) {
|
|
13
14
|
INDICES[INDICES["COL0ROW0"] = 0] = "COL0ROW0";
|
package/dist/classes/matrix4.js
CHANGED
|
@@ -11,6 +11,7 @@ import { fromQuat as mat4_fromQuat, frustum as mat4_frustum, lookAt as mat4_look
|
|
|
11
11
|
import { transformMat4 as vec2_transformMat4 } from "../gl-matrix/vec2.js";
|
|
12
12
|
import { transformMat4 as vec3_transformMat4 } from "../gl-matrix/vec3.js";
|
|
13
13
|
import { transformMat4 as vec4_transformMat4 } from "../gl-matrix/vec4.js";
|
|
14
|
+
// eslint-disable-next-line no-shadow
|
|
14
15
|
var INDICES;
|
|
15
16
|
(function (INDICES) {
|
|
16
17
|
INDICES[INDICES["COL0ROW0"] = 0] = "COL0ROW0";
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
// Copyright (c) vis.gl contributors
|
|
4
4
|
// Copyright (c) 2017 Uber Technologies, Inc.
|
|
5
5
|
import { Vector3 } from "./vector3.js";
|
|
6
|
-
import { formatValue, equals, config } from "../lib/common.js";
|
|
7
|
-
import { degrees, radians, clamp } from "../lib/common.js";
|
|
6
|
+
import { formatValue, equals, config, degrees, radians, clamp } from "../lib/common.js";
|
|
8
7
|
// @ts-ignore gl-matrix types...
|
|
9
8
|
import * as vec3 from "../gl-matrix/vec3.js";
|
|
10
9
|
// TODO - import epsilon
|
package/dist/gl-matrix/vec2.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { NumericArray } from '@math.gl/types';
|
|
1
2
|
/**
|
|
2
3
|
* 2 Dimensional Vector
|
|
3
4
|
* @module vec2
|
|
@@ -5,24 +6,24 @@
|
|
|
5
6
|
/**
|
|
6
7
|
* Creates a new, empty vec2
|
|
7
8
|
*
|
|
8
|
-
* @returns
|
|
9
|
+
* @returns a new 2D vector
|
|
9
10
|
*/
|
|
10
|
-
export declare function create():
|
|
11
|
+
export declare function create(): NumericArray;
|
|
11
12
|
/**
|
|
12
13
|
* Creates a new vec2 initialized with values from an existing vector
|
|
13
14
|
*
|
|
14
|
-
* @param
|
|
15
|
-
* @returns
|
|
15
|
+
* @param a vector to clone
|
|
16
|
+
* @returns a new 2D vector
|
|
16
17
|
*/
|
|
17
|
-
export declare function clone(a:
|
|
18
|
+
export declare function clone(a: Readonly<NumericArray>): NumericArray;
|
|
18
19
|
/**
|
|
19
20
|
* Creates a new vec2 initialized with the given values
|
|
20
21
|
*
|
|
21
|
-
* @param
|
|
22
|
-
* @param
|
|
23
|
-
* @returns
|
|
22
|
+
* @param x X component
|
|
23
|
+
* @param y Y component
|
|
24
|
+
* @returns a new 2D vector
|
|
24
25
|
*/
|
|
25
|
-
export declare function fromValues(x:
|
|
26
|
+
export declare function fromValues(x: number, y: number): NumericArray;
|
|
26
27
|
/**
|
|
27
28
|
* Copy the values from one vec2 to another
|
|
28
29
|
*
|
package/dist/gl-matrix/vec2.js
CHANGED
|
@@ -8,7 +8,7 @@ import * as glMatrix from './common.js';
|
|
|
8
8
|
/**
|
|
9
9
|
* Creates a new, empty vec2
|
|
10
10
|
*
|
|
11
|
-
* @returns
|
|
11
|
+
* @returns a new 2D vector
|
|
12
12
|
*/
|
|
13
13
|
export function create() {
|
|
14
14
|
const out = new glMatrix.ARRAY_TYPE(2);
|
|
@@ -21,8 +21,8 @@ export function create() {
|
|
|
21
21
|
/**
|
|
22
22
|
* Creates a new vec2 initialized with values from an existing vector
|
|
23
23
|
*
|
|
24
|
-
* @param
|
|
25
|
-
* @returns
|
|
24
|
+
* @param a vector to clone
|
|
25
|
+
* @returns a new 2D vector
|
|
26
26
|
*/
|
|
27
27
|
export function clone(a) {
|
|
28
28
|
const out = new glMatrix.ARRAY_TYPE(2);
|
|
@@ -33,9 +33,9 @@ export function clone(a) {
|
|
|
33
33
|
/**
|
|
34
34
|
* Creates a new vec2 initialized with the given values
|
|
35
35
|
*
|
|
36
|
-
* @param
|
|
37
|
-
* @param
|
|
38
|
-
* @returns
|
|
36
|
+
* @param x X component
|
|
37
|
+
* @param y Y component
|
|
38
|
+
* @returns a new 2D vector
|
|
39
39
|
*/
|
|
40
40
|
export function fromValues(x, y) {
|
|
41
41
|
const out = new glMatrix.ARRAY_TYPE(2);
|