@woosh/meep-engine 2.126.34 → 2.126.35
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/README.md +1 -1
- package/package.json +1 -1
- package/src/core/geom/3d/frustum/frustum_compute_center.d.ts.map +1 -1
- package/src/core/geom/3d/frustum/frustum_compute_center.js +5 -0
- package/src/core/geom/3d/frustum/frustum_compute_corners.d.ts.map +1 -1
- package/src/core/geom/3d/frustum/frustum_compute_corners.js +11 -1
- package/src/core/geom/3d/mat4/MATRIX_4_IDENTITY.d.ts +1 -1
- package/src/core/geom/3d/mat4/MATRIX_4_IDENTITY.js +1 -1
- package/src/core/geom/3d/mat4/eulerAnglesFromMatrix.d.ts +4 -4
- package/src/core/geom/3d/mat4/eulerAnglesFromMatrix.d.ts.map +1 -1
- package/src/core/geom/3d/mat4/eulerAnglesFromMatrix.js +27 -27
- package/src/core/geom/3d/mat4/m4_inverse_rotation_translation.d.ts +9 -0
- package/src/core/geom/3d/mat4/m4_inverse_rotation_translation.d.ts.map +1 -0
- package/src/core/geom/3d/mat4/m4_inverse_rotation_translation.js +40 -0
- package/src/core/geom/3d/mat4/m4_multiply.d.ts +0 -1
- package/src/core/geom/3d/mat4/m4_multiply.d.ts.map +1 -1
- package/src/core/geom/3d/mat4/m4_multiply.js +2 -1
- package/src/core/geom/3d/mat4/m4_rotation_translation.d.ts +9 -0
- package/src/core/geom/3d/mat4/m4_rotation_translation.d.ts.map +1 -0
- package/src/core/geom/3d/mat4/m4_rotation_translation.js +32 -0
- package/src/core/geom/mat3/m3_make_rotation.d.ts +9 -0
- package/src/core/geom/mat3/m3_make_rotation.d.ts.map +1 -0
- package/src/core/geom/mat3/m3_make_rotation.js +31 -0
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ To help get you started, various samples are provided under `/samples` folder. F
|
|
|
13
13
|
|
|
14
14
|
## Quality
|
|
15
15
|
|
|
16
|
-
Meep is covered by 2,
|
|
16
|
+
Meep is covered by 2,720 handwritten unit tests
|
|
17
17
|
|
|
18
18
|
The aim is to [ensure quality](https://about.codecov.io/blog/the-case-against-100-code-coverage/). As a result, the tests are written to cover complex code first and to exhaustively validate critical algorithms.
|
|
19
19
|
Most of the test code is significantly larger than the code that is being tested.
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"description": "Pure JavaScript game engine. Fully featured and production ready.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"author": "Alexander Goldring",
|
|
8
|
-
"version": "2.126.
|
|
8
|
+
"version": "2.126.35",
|
|
9
9
|
"main": "build/meep.module.js",
|
|
10
10
|
"module": "build/meep.module.js",
|
|
11
11
|
"exports": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frustum_compute_center.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/frustum/frustum_compute_center.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"frustum_compute_center.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/frustum/frustum_compute_center.js"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,+CALW,MAAM,EAAE,iBACR,MAAM,WACN,MAAM,EAAE,kBACR,MAAM,QA8BhB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { assert } from "../../../assert.js";
|
|
1
2
|
import { frustum_compute_corners } from "./frustum_compute_corners.js";
|
|
2
3
|
|
|
3
4
|
const scratch_corners = new Float32Array(24);
|
|
@@ -15,6 +16,10 @@ export function frustum_compute_center(
|
|
|
15
16
|
frustum,
|
|
16
17
|
frustum_offset
|
|
17
18
|
) {
|
|
19
|
+
assert.defined(output,'output');
|
|
20
|
+
assert.isNonNegativeInteger(output_offset,'output_offset');
|
|
21
|
+
assert.defined(frustum,'frustum');
|
|
22
|
+
assert.isNonNegativeInteger(frustum_offset,'frustum_offset');
|
|
18
23
|
|
|
19
24
|
frustum_compute_corners(scratch_corners, 0, frustum, frustum_offset);
|
|
20
25
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frustum_compute_corners.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/frustum/frustum_compute_corners.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"frustum_compute_corners.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/frustum/frustum_compute_corners.js"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,gDALW,MAAM,EAAE,GAAC,YAAY,iBACrB,MAAM,WACN,MAAM,EAAE,GAAC,YAAY,kBACrB,MAAM,QAgFhB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { assert } from "../../../assert.js";
|
|
1
2
|
import { plane3_compute_convex_3_plane_intersection } from "../plane/plane3_compute_convex_3_plane_intersection.js";
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -9,7 +10,16 @@ import { plane3_compute_convex_3_plane_intersection } from "../plane/plane3_comp
|
|
|
9
10
|
* @param {number[]|Float32Array} frustum defined as [plane_normal_x, plane_normal_y, plane_normal_z, plane_offset], planes should be in the following order [x0, x1, y0, y1, z0, z1]
|
|
10
11
|
* @param {number} frustum_offset where to start reading from
|
|
11
12
|
*/
|
|
12
|
-
export function frustum_compute_corners(
|
|
13
|
+
export function frustum_compute_corners(
|
|
14
|
+
output,
|
|
15
|
+
output_offset,
|
|
16
|
+
frustum,
|
|
17
|
+
frustum_offset
|
|
18
|
+
) {
|
|
19
|
+
assert.defined(output,'output');
|
|
20
|
+
assert.isNonNegativeInteger(output_offset,'output_offset');
|
|
21
|
+
assert.defined(frustum,'frustum');
|
|
22
|
+
assert.isNonNegativeInteger(frustum_offset,'frustum_offset');
|
|
13
23
|
|
|
14
24
|
const f = frustum;
|
|
15
25
|
const o = frustum_offset;
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
* NOTE: ported from Eigen C++ library
|
|
19
19
|
* @see https://gitlab.com/libeigen/eigen/-/blob/master/Eigen/src/Geometry/EulerAngles.h
|
|
20
20
|
* @see https://stackoverflow.com/questions/11514063/extract-yaw-pitch-and-roll-from-a-rotationmatrix
|
|
21
|
-
* @param {number[]}
|
|
22
|
-
* @param {number[]|Float32Array|mat4} m4
|
|
23
|
-
* @param {number} a0 axis index
|
|
21
|
+
* @param {number[]} output
|
|
22
|
+
* @param {number[]|Float32Array|mat4} m4 source matrix to extract rotation from
|
|
23
|
+
* @param {number} a0 axis index (0 = X, 1 = Y, 2 = Z)
|
|
24
24
|
* @param {number} a1 axis index
|
|
25
25
|
* @param {number} a2 axis index
|
|
26
26
|
*/
|
|
27
|
-
export function eulerAnglesFromMatrix(
|
|
27
|
+
export function eulerAnglesFromMatrix(output: number[], m4: number[] | Float32Array | mat4, a0: number, a1: number, a2: number): void;
|
|
28
28
|
//# sourceMappingURL=eulerAnglesFromMatrix.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eulerAnglesFromMatrix.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/mat4/eulerAnglesFromMatrix.js"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,
|
|
1
|
+
{"version":3,"file":"eulerAnglesFromMatrix.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/mat4/eulerAnglesFromMatrix.js"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,8CANW,MAAM,EAAE,MACR,MAAM,EAAE,GAAC,YAAY,GAAC,IAAI,MAC1B,MAAM,MACN,MAAM,MACN,MAAM,QA2EhB"}
|
|
@@ -36,14 +36,14 @@ const atan2 = Math.atan2;
|
|
|
36
36
|
* NOTE: ported from Eigen C++ library
|
|
37
37
|
* @see https://gitlab.com/libeigen/eigen/-/blob/master/Eigen/src/Geometry/EulerAngles.h
|
|
38
38
|
* @see https://stackoverflow.com/questions/11514063/extract-yaw-pitch-and-roll-from-a-rotationmatrix
|
|
39
|
-
* @param {number[]}
|
|
40
|
-
* @param {number[]|Float32Array|mat4} m4
|
|
41
|
-
* @param {number} a0 axis index
|
|
39
|
+
* @param {number[]} output
|
|
40
|
+
* @param {number[]|Float32Array|mat4} m4 source matrix to extract rotation from
|
|
41
|
+
* @param {number} a0 axis index (0 = X, 1 = Y, 2 = Z)
|
|
42
42
|
* @param {number} a1 axis index
|
|
43
43
|
* @param {number} a2 axis index
|
|
44
44
|
*/
|
|
45
45
|
export function eulerAnglesFromMatrix(
|
|
46
|
-
|
|
46
|
+
output, m4,
|
|
47
47
|
a0, a1, a2
|
|
48
48
|
) {
|
|
49
49
|
|
|
@@ -54,19 +54,19 @@ export function eulerAnglesFromMatrix(
|
|
|
54
54
|
const k = (a0 + 2 - odd) % 3;
|
|
55
55
|
|
|
56
56
|
if (a0 === a2) {
|
|
57
|
-
|
|
57
|
+
output[0] = atan2(coeff(m4, j, i), coeff(m4, k, i));
|
|
58
58
|
|
|
59
|
-
if ((odd &&
|
|
60
|
-
if (
|
|
61
|
-
|
|
59
|
+
if ((odd && output[0] < 0) || ((~odd) && output[0] > 0)) {
|
|
60
|
+
if (output[0] > 0) {
|
|
61
|
+
output[0] -= Math.PI;
|
|
62
62
|
} else {
|
|
63
|
-
|
|
63
|
+
output[0] += Math.PI;
|
|
64
64
|
}
|
|
65
65
|
const s2 = v2_length(coeff(m4, j, i), coeff(m4, k, i));
|
|
66
|
-
|
|
66
|
+
output[1] = -atan2(s2, coeff(m4, i, i));
|
|
67
67
|
} else {
|
|
68
68
|
const s2 = v2_length(coeff(m4, j, i), coeff(m4, k, i));
|
|
69
|
-
|
|
69
|
+
output[1] = atan2(s2, coeff(m4, i, i));
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
// With a=(0,1,0), we have i=0; j=1; k=2, and after computing the first two angles,
|
|
@@ -79,40 +79,40 @@ export function eulerAnglesFromMatrix(
|
|
|
79
79
|
//
|
|
80
80
|
// Thus: m11.c1 - m21.s1 = c3 & m12.c1 - m22.s1 = s3
|
|
81
81
|
|
|
82
|
-
const s1 = sin(
|
|
83
|
-
const c1 = cos(
|
|
82
|
+
const s1 = sin(output[0]);
|
|
83
|
+
const c1 = cos(output[0]);
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
output[2] = atan2(c1 * coeff(m4, j, k) - s1 * coeff(m4, k, k), c1 * coeff(m4, j, j) - s1 * coeff(m4, k, j));
|
|
86
86
|
|
|
87
87
|
} else {
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
output[0] = atan2(coeff(m4, j, k), coeff(m4, k, k));
|
|
90
90
|
|
|
91
91
|
const c2 = v2_length(coeff(m4, i, i), coeff(m4, i, j));
|
|
92
92
|
|
|
93
|
-
if ((odd &&
|
|
94
|
-
if (
|
|
95
|
-
|
|
93
|
+
if ((odd && output[0] < 0) || ((~odd) && output[0] > 0)) {
|
|
94
|
+
if (output[0] > 0) {
|
|
95
|
+
output[0] -= Math.PI;
|
|
96
96
|
} else {
|
|
97
|
-
|
|
97
|
+
output[0] += Math.PI;
|
|
98
98
|
}
|
|
99
|
-
|
|
99
|
+
output[1] = atan2(-coeff(m4, i, k), -c2);
|
|
100
100
|
} else {
|
|
101
|
-
|
|
101
|
+
output[1] = atan2(-coeff(m4, i, k), c2);
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
const s1 = sin(
|
|
105
|
-
const c1 = cos(
|
|
104
|
+
const s1 = sin(output[0]);
|
|
105
|
+
const c1 = cos(output[0]);
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
output[2] = atan2(s1 * coeff(m4, k, i) - c1 * coeff(m4, j, i), c1 * coeff(m4, j, j) - s1 * coeff(m4, k, j));
|
|
108
108
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
if (odd === 0) {
|
|
112
112
|
// invert result
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
output[0] = -output[0];
|
|
114
|
+
output[1] = -output[1];
|
|
115
|
+
output[2] = -output[2];
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compose an inverse 4x4 transformation matrix from 3x3 rotation matrix and a translation vector
|
|
3
|
+
* @param {number[]} output 4x4 matrix
|
|
4
|
+
* @param {number[]} rotation_matrix 3x3 mat
|
|
5
|
+
* @param {number[]} translation 3d vector
|
|
6
|
+
* @see m4_rotation_translation
|
|
7
|
+
*/
|
|
8
|
+
export function m4_inverse_rotation_translation(output: number[], rotation_matrix: number[], translation: number[]): void;
|
|
9
|
+
//# sourceMappingURL=m4_inverse_rotation_translation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"m4_inverse_rotation_translation.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/mat4/m4_inverse_rotation_translation.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wDALW,MAAM,EAAE,mBACR,MAAM,EAAE,eACR,MAAM,EAAE,QAiClB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { v3_dot } from "../../vec3/v3_dot.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Compose an inverse 4x4 transformation matrix from 3x3 rotation matrix and a translation vector
|
|
5
|
+
* @param {number[]} output 4x4 matrix
|
|
6
|
+
* @param {number[]} rotation_matrix 3x3 mat
|
|
7
|
+
* @param {number[]} translation 3d vector
|
|
8
|
+
* @see m4_rotation_translation
|
|
9
|
+
*/
|
|
10
|
+
export function m4_inverse_rotation_translation(
|
|
11
|
+
output,
|
|
12
|
+
rotation_matrix,
|
|
13
|
+
translation
|
|
14
|
+
) {
|
|
15
|
+
|
|
16
|
+
const r = rotation_matrix;
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
output[0] = r[0];
|
|
20
|
+
output[1] = r[3];
|
|
21
|
+
output[2] = r[6];
|
|
22
|
+
output[3] = 0;
|
|
23
|
+
|
|
24
|
+
output[4] = r[1];
|
|
25
|
+
output[5] = r[4];
|
|
26
|
+
output[6] = r[7];
|
|
27
|
+
output[7] = 0;
|
|
28
|
+
|
|
29
|
+
output[8] = r[2];
|
|
30
|
+
output[9] = r[5];
|
|
31
|
+
output[10] = r[8];
|
|
32
|
+
output[11] = 0;
|
|
33
|
+
|
|
34
|
+
const t = translation;
|
|
35
|
+
|
|
36
|
+
output[12] = -v3_dot(t[0], t[1], t[2], r[0], r[1], r[2]);
|
|
37
|
+
output[13] = -v3_dot(t[0], t[1], t[2], r[3], r[4], r[5]);
|
|
38
|
+
output[14] = -v3_dot(t[0], t[1], t[2], r[6], r[7], r[8]);
|
|
39
|
+
output[15] = 1;
|
|
40
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"m4_multiply.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/mat4/m4_multiply.js"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"m4_multiply.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/mat4/m4_multiply.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,iCAJW,MAAM,EAAE,GAAC,SAAS,CAAC,MAAM,CAAC,GAAC,YAAY,KACvC,MAAM,EAAE,GAAC,SAAS,CAAC,MAAM,CAAC,GAAC,YAAY,KACvC,MAAM,EAAE,GAAC,SAAS,CAAC,MAAM,CAAC,GAAC,YAAY,QA8DjD"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Multiplies two 4x4 matrices
|
|
3
|
-
* Adapted from gl-matrix
|
|
4
3
|
*
|
|
5
4
|
* @param {number[]|ArrayLike<number>|Float32Array} out the receiving matrix
|
|
6
5
|
* @param {number[]|ArrayLike<number>|Float32Array} a the first operand
|
|
7
6
|
* @param {number[]|ArrayLike<number>|Float32Array} b the second operand
|
|
8
7
|
*/
|
|
9
8
|
export function m4_multiply(out, a, b) {
|
|
9
|
+
// Adapted from gl-matrix
|
|
10
|
+
|
|
10
11
|
const a00 = a[0],
|
|
11
12
|
a01 = a[1],
|
|
12
13
|
a02 = a[2],
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compose a 4x4 transformation matrix from 3x3 rotation matrix and a translation vector
|
|
3
|
+
* @param {number[]} output 4x4 matrix
|
|
4
|
+
* @param {number[]} rotation_matrix 3x3 mat
|
|
5
|
+
* @param {number[]} translation 3d vector
|
|
6
|
+
* @see m4_inverse_rotation_translation
|
|
7
|
+
*/
|
|
8
|
+
export function m4_rotation_translation(output: number[], rotation_matrix: number[], translation: number[]): void;
|
|
9
|
+
//# sourceMappingURL=m4_rotation_translation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"m4_rotation_translation.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/mat4/m4_rotation_translation.js"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,gDALW,MAAM,EAAE,mBACR,MAAM,EAAE,eACR,MAAM,EAAE,QA2BlB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compose a 4x4 transformation matrix from 3x3 rotation matrix and a translation vector
|
|
3
|
+
* @param {number[]} output 4x4 matrix
|
|
4
|
+
* @param {number[]} rotation_matrix 3x3 mat
|
|
5
|
+
* @param {number[]} translation 3d vector
|
|
6
|
+
* @see m4_inverse_rotation_translation
|
|
7
|
+
*/
|
|
8
|
+
export function m4_rotation_translation(output, rotation_matrix, translation) {
|
|
9
|
+
const r = rotation_matrix;
|
|
10
|
+
|
|
11
|
+
output[0] = r[0];
|
|
12
|
+
output[1] = r[1];
|
|
13
|
+
output[2] = r[2];
|
|
14
|
+
output[3] = 0;
|
|
15
|
+
|
|
16
|
+
output[4] = r[3];
|
|
17
|
+
output[5] = r[4];
|
|
18
|
+
output[6] = r[5];
|
|
19
|
+
output[7] = 0;
|
|
20
|
+
|
|
21
|
+
output[8] = r[6];
|
|
22
|
+
output[9] = r[7];
|
|
23
|
+
output[10] = r[8];
|
|
24
|
+
output[11] = 0;
|
|
25
|
+
|
|
26
|
+
const t = translation;
|
|
27
|
+
|
|
28
|
+
output[12] = t[0];
|
|
29
|
+
output[13] = t[1];
|
|
30
|
+
output[14] = t[2];
|
|
31
|
+
output[15] = 1;
|
|
32
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param {number[]} output 3x3 rotation matrix
|
|
4
|
+
* @param {Vector3} forward
|
|
5
|
+
* @param {Vector3} up_dir
|
|
6
|
+
*/
|
|
7
|
+
export function m3_make_rotation_TBN(output: number[], forward: Vector3, up_dir: Vector3): void;
|
|
8
|
+
import Vector3 from "../Vector3.js";
|
|
9
|
+
//# sourceMappingURL=m3_make_rotation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"m3_make_rotation.d.ts","sourceRoot":"","sources":["../../../../../src/core/geom/mat3/m3_make_rotation.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,6CAJW,MAAM,EAAE,WACR,OAAO,UACP,OAAO,QAqBjB;oBA9BmB,eAAe"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import Vector3 from "../Vector3.js";
|
|
2
|
+
|
|
3
|
+
const v3_scratch_1 = new Vector3();
|
|
4
|
+
const v3_scratch_2 = new Vector3();
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* @param {number[]} output 3x3 rotation matrix
|
|
9
|
+
* @param {Vector3} forward
|
|
10
|
+
* @param {Vector3} up_dir
|
|
11
|
+
*/
|
|
12
|
+
export function m3_make_rotation_TBN(output, forward, up_dir) {
|
|
13
|
+
output[6] = forward.x;
|
|
14
|
+
output[7] = forward.y;
|
|
15
|
+
output[8] = forward.z;
|
|
16
|
+
|
|
17
|
+
v3_scratch_2.set(output[6], output[7], output[8]);
|
|
18
|
+
v3_scratch_1.crossVectors(up_dir, v3_scratch_2);
|
|
19
|
+
v3_scratch_1.normalize();
|
|
20
|
+
|
|
21
|
+
output[0] = v3_scratch_1.x;
|
|
22
|
+
output[1] = v3_scratch_1.y;
|
|
23
|
+
output[2] = v3_scratch_1.z;
|
|
24
|
+
|
|
25
|
+
v3_scratch_1.crossVectors(v3_scratch_2, v3_scratch_1);
|
|
26
|
+
v3_scratch_1.normalize();
|
|
27
|
+
|
|
28
|
+
output[3] = v3_scratch_1.x;
|
|
29
|
+
output[4] = v3_scratch_1.y;
|
|
30
|
+
output[5] = v3_scratch_1.z;
|
|
31
|
+
}
|