@predy-js/math 0.3.4-beta.27 → 0.3.4-beta.30
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/index.js +0 -25
- package/dist/index.mjs +1 -24
- package/dist/quat.d.ts +0 -1
- package/dist/vec.d.ts +0 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
@@ -814,16 +814,6 @@ function vec2MulMat3(out, a, m) {
|
|
814
814
|
|
815
815
|
const cos$1 = Math.cos;
|
816
816
|
const sin$1 = Math.sin;
|
817
|
-
function vecClone(out, a) {
|
818
|
-
if (arguments.length === 1) {
|
819
|
-
a = out;
|
820
|
-
out = [];
|
821
|
-
}
|
822
|
-
for (let i = 0; i < a.length; i++) {
|
823
|
-
out[i] = a[i];
|
824
|
-
}
|
825
|
-
return out;
|
826
|
-
}
|
827
817
|
function vecAdd(out, a, b) {
|
828
818
|
for (let i = 0, len = a.length; i < len; i++) {
|
829
819
|
out[i] = a[i] + b[i];
|
@@ -1139,19 +1129,6 @@ function quatFromRotationXYZ(out, x, y, z) {
|
|
1139
1129
|
out[3] = c1 * c2 * c3 - s1 * s2 * s3;
|
1140
1130
|
return out;
|
1141
1131
|
}
|
1142
|
-
function quatFromRotationZXY(out, x, y, z) {
|
1143
|
-
const c1 = Math.cos(x * d2r * 0.5);
|
1144
|
-
const c2 = Math.cos(y * d2r * 0.5);
|
1145
|
-
const c3 = Math.cos(z * d2r * 0.5);
|
1146
|
-
const s1 = Math.sin(x * d2r * 0.5);
|
1147
|
-
const s2 = Math.sin(y * d2r * 0.5);
|
1148
|
-
const s3 = Math.sin(z * d2r * 0.5);
|
1149
|
-
out[0] = s1 * c2 * c3 - c1 * s2 * s3;
|
1150
|
-
out[1] = c1 * s2 * c3 + s1 * c2 * s3;
|
1151
|
-
out[2] = c1 * c2 * s3 + s1 * s2 * c3;
|
1152
|
-
out[3] = c1 * c2 * c3 - s1 * s2 * s3;
|
1153
|
-
return out;
|
1154
|
-
}
|
1155
1132
|
function quatStar(out, quat) {
|
1156
1133
|
const x = quat[0], y = quat[1], z = quat[2], w = quat[3];
|
1157
1134
|
out[0] = -x;
|
@@ -1222,7 +1199,6 @@ exports.quatCreate = quatCreate;
|
|
1222
1199
|
exports.quatEquals = quatEquals;
|
1223
1200
|
exports.quatFromRotation = quatFromRotation;
|
1224
1201
|
exports.quatFromRotationXYZ = quatFromRotationXYZ;
|
1225
|
-
exports.quatFromRotationZXY = quatFromRotationZXY;
|
1226
1202
|
exports.quatFromVec3s = quatFromVec3s;
|
1227
1203
|
exports.quatMultiply = quatMultiply;
|
1228
1204
|
exports.quatStar = quatStar;
|
@@ -1250,7 +1226,6 @@ exports.vec4Create = vec4Create;
|
|
1250
1226
|
exports.vecAdd = vecAdd;
|
1251
1227
|
exports.vecAddCombine = vecAddCombine;
|
1252
1228
|
exports.vecAssign = vecAssign;
|
1253
|
-
exports.vecClone = vecClone;
|
1254
1229
|
exports.vecDot = vecDot;
|
1255
1230
|
exports.vecFill = vecFill;
|
1256
1231
|
exports.vecMinus = vecMinus;
|
package/dist/index.mjs
CHANGED
@@ -810,16 +810,6 @@ function vec2MulMat3(out, a, m) {
|
|
810
810
|
|
811
811
|
const cos$1 = Math.cos;
|
812
812
|
const sin$1 = Math.sin;
|
813
|
-
function vecClone(out, a) {
|
814
|
-
if (arguments.length === 1) {
|
815
|
-
a = out;
|
816
|
-
out = [];
|
817
|
-
}
|
818
|
-
for (let i = 0; i < a.length; i++) {
|
819
|
-
out[i] = a[i];
|
820
|
-
}
|
821
|
-
return out;
|
822
|
-
}
|
823
813
|
function vecAdd(out, a, b) {
|
824
814
|
for (let i = 0, len = a.length; i < len; i++) {
|
825
815
|
out[i] = a[i] + b[i];
|
@@ -1135,19 +1125,6 @@ function quatFromRotationXYZ(out, x, y, z) {
|
|
1135
1125
|
out[3] = c1 * c2 * c3 - s1 * s2 * s3;
|
1136
1126
|
return out;
|
1137
1127
|
}
|
1138
|
-
function quatFromRotationZXY(out, x, y, z) {
|
1139
|
-
const c1 = Math.cos(x * d2r * 0.5);
|
1140
|
-
const c2 = Math.cos(y * d2r * 0.5);
|
1141
|
-
const c3 = Math.cos(z * d2r * 0.5);
|
1142
|
-
const s1 = Math.sin(x * d2r * 0.5);
|
1143
|
-
const s2 = Math.sin(y * d2r * 0.5);
|
1144
|
-
const s3 = Math.sin(z * d2r * 0.5);
|
1145
|
-
out[0] = s1 * c2 * c3 - c1 * s2 * s3;
|
1146
|
-
out[1] = c1 * s2 * c3 + s1 * c2 * s3;
|
1147
|
-
out[2] = c1 * c2 * s3 + s1 * s2 * c3;
|
1148
|
-
out[3] = c1 * c2 * c3 - s1 * s2 * s3;
|
1149
|
-
return out;
|
1150
|
-
}
|
1151
1128
|
function quatStar(out, quat) {
|
1152
1129
|
const x = quat[0], y = quat[1], z = quat[2], w = quat[3];
|
1153
1130
|
out[0] = -x;
|
@@ -1184,4 +1161,4 @@ function quatFromVec3s(v1, v2) {
|
|
1184
1161
|
return vecNormalize([cross[0], cross[1], cross[2], w]);
|
1185
1162
|
}
|
1186
1163
|
|
1187
|
-
export { NumberEpsilon, clamp, ensureVec3, getMat4TR, getMat4TRS, getMat4Transform, invertMat4, isZeroVec, mat3FromQuat, mat3FromRotation, mat3FromRotationZ, mat3MulMat3, mat3NormalFromMat4, mat3Rotate, mat3Scale, mat3Translate, mat3create, mat4Clone, mat4Determinate, mat4FromArray, mat4create, mat4fromRotationTranslationScale, mat4identity, mat4invert, mat4multiply, mat4perspective, mat4rotate, mat4scale, mat4translate, mat4transpose, quatCreate, quatEquals, quatFromRotation, quatFromRotationXYZ,
|
1164
|
+
export { NumberEpsilon, clamp, ensureVec3, getMat4TR, getMat4TRS, getMat4Transform, invertMat4, isZeroVec, mat3FromQuat, mat3FromRotation, mat3FromRotationZ, mat3MulMat3, mat3NormalFromMat4, mat3Rotate, mat3Scale, mat3Translate, mat3create, mat4Clone, mat4Determinate, mat4FromArray, mat4create, mat4fromRotationTranslationScale, mat4identity, mat4invert, mat4multiply, mat4perspective, mat4rotate, mat4scale, mat4translate, mat4transpose, quatCreate, quatEquals, quatFromRotation, quatFromRotationXYZ, quatFromVec3s, quatMultiply, quatStar, rotateVec2, rotationFromMat3, transposeMat3, transposeMat4, vec2AddVec2, vec2Create, vec2MulMat3, vec2MulVec2, vec2SubVec2, vec2TransformByMat3, vec3AddVec3, vec3Create, vec3Cross, vec3MulMat3, vec3MulMat4, vec3MulNum, vec3MulVec3, vec3RotateByMat4, vec3RotateByQuat, vec3TranslateByMat4, vec4Create, vecAdd, vecAddCombine, vecAssign, vecDot, vecFill, vecMinus, vecMulCombine, vecMulScalar, vecNormalize, vecSquareDistance, vecSub };
|
package/dist/quat.d.ts
CHANGED
@@ -5,7 +5,6 @@ export declare function mat3FromQuat(out: mat3 | number[], quat: vec4): mat3;
|
|
5
5
|
export declare function quatEquals(q1: vec4, q2: vec4): boolean;
|
6
6
|
export declare function quatFromRotation(out: vec4, x: number, y: number, z: number): vec4;
|
7
7
|
export declare function quatFromRotationXYZ(out: vec4, x: number, y: number, z: number): vec4;
|
8
|
-
export declare function quatFromRotationZXY(out: vec4, x: number, y: number, z: number): vec4;
|
9
8
|
export declare function quatStar(out: vec4, quat: vec4): vec4;
|
10
9
|
/**
|
11
10
|
* @param {vec3} vstart
|
package/dist/vec.d.ts
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
import type { vec3, vec4, vec2, mat4, mat2, mat3 } from '@predy-js/render-interface';
|
2
2
|
export type vec = number[];
|
3
3
|
export { vec2, vec4, vec3, mat2, mat3, mat4 };
|
4
|
-
export declare function vecClone<T extends vec | vec2 | vec3 | vec4>(out: T | number[], a?: T | number[]): T;
|
5
4
|
export declare function vecAdd<T extends vec | vec3 | vec4 | vec2>(out: T | number[], a: T, b: T): T;
|
6
5
|
export declare function vecSub<T extends vec | vec3 | vec4 | vec2>(out: T | number[], a: T, b: T): T;
|
7
6
|
export declare function vecFill<T extends vec | vec3 | vec4 | vec2>(out: T | number[], number: number): T;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@predy-js/math",
|
3
|
-
"version": "0.3.4-beta.
|
3
|
+
"version": "0.3.4-beta.30",
|
4
4
|
"description": "Mars JSON Specification",
|
5
5
|
"module": "./dist/index.mjs",
|
6
6
|
"main": "./dist/index.js",
|
@@ -28,7 +28,7 @@
|
|
28
28
|
"prepublishOnly": "npm run build"
|
29
29
|
},
|
30
30
|
"devDependencies": {
|
31
|
-
"@predy-js/render-interface": "0.3.4-beta.
|
31
|
+
"@predy-js/render-interface": "0.3.4-beta.30",
|
32
32
|
"@commitlint/cli": "^13.2.1",
|
33
33
|
"@commitlint/config-conventional": "^13.2.0",
|
34
34
|
"@rollup/plugin-commonjs": "^21.0.3",
|