@woosh/meep-engine 2.48.4 → 2.48.5

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.48.4",
8
+ "version": "2.48.5",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -0,0 +1,15 @@
1
+ import { array_copy } from "../../../collection/array/copyArray.js";
2
+ import { MATRIX_4_IDENTITY } from "./MATRIX_4_IDENTITY.js";
3
+
4
+ /**
5
+ * Create a 4x4 matrix that corresponds to translation transform
6
+ * @param {ArrayLike<number>} output
7
+ * @param {ArrayLike<number>} translation 3d vector
8
+ */
9
+ export function m4_make_translation(output, translation) {
10
+ array_copy(MATRIX_4_IDENTITY, 0, output, 0, 16);
11
+
12
+ output[12] = translation[0];
13
+ output[13] = translation[1];
14
+ output[14] = translation[2];
15
+ }