@woosh/meep-engine 2.119.33 → 2.119.34

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/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "description": "Fully featured ECS game engine written in JavaScript",
6
6
  "type": "module",
7
7
  "author": "Alexander Goldring",
8
- "version": "2.119.33",
8
+ "version": "2.119.34",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -0,0 +1,8 @@
1
+ /**
2
+ *
3
+ * @param {number[]|Float32Array} out
4
+ * @param {number} out_offset
5
+ * @param {number[]|Float32Array} mat4
6
+ */
7
+ export function m4_extract_scale(out: number[] | Float32Array, out_offset: number, mat4: number[] | Float32Array): void;
8
+ //# sourceMappingURL=m4_extract_scale.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"m4_extract_scale.d.ts","sourceRoot":"","sources":["../../../../../src/core/geom/3d/m4_extract_scale.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,sCAJW,MAAM,EAAE,GAAC,YAAY,cACrB,MAAM,QACN,MAAM,EAAE,GAAC,YAAY,QA6B/B"}
@@ -0,0 +1,36 @@
1
+ import { v3_length } from "../vec3/v3_length.js";
2
+
3
+ /**
4
+ *
5
+ * @param {number[]|Float32Array} out
6
+ * @param {number} out_offset
7
+ * @param {number[]|Float32Array} mat4
8
+ */
9
+ export function m4_extract_scale(
10
+ out, out_offset,
11
+ mat4
12
+ ){
13
+
14
+ const m11 = mat4[0];
15
+ const m12 = mat4[1];
16
+ const m13 = mat4[2];
17
+
18
+ const scale_x = v3_length(m11, m12, m13);
19
+
20
+ const m21 = mat4[4];
21
+ const m22 = mat4[5];
22
+ const m23 = mat4[6];
23
+
24
+ const scale_y = v3_length(m21, m22, m23);
25
+
26
+ const m31 = mat4[8];
27
+ const m32 = mat4[9];
28
+ const m33 = mat4[10];
29
+
30
+ const scale_z = v3_length(m31, m32, m33);
31
+
32
+ out[out_offset] = scale_x;
33
+ out[out_offset+1] = scale_y;
34
+ out[out_offset+2] = scale_z;
35
+
36
+ }