@woosh/meep-engine 2.126.1 → 2.126.2
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 +1 -1
- package/src/core/binary/allocator/OffsetAllocator.d.ts +3 -0
- package/src/core/binary/allocator/OffsetAllocator.d.ts.map +1 -1
- package/src/core/binary/allocator/OffsetAllocator.js +3 -0
- package/src/core/geom/3d/triangle/compute_triangle_area_3d.d.ts.map +1 -1
- package/src/core/geom/3d/triangle/compute_triangle_area_3d.js +13 -0
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.2",
|
|
9
9
|
"main": "build/meep.module.js",
|
|
10
10
|
"module": "build/meep.module.js",
|
|
11
11
|
"exports": {
|
|
@@ -85,6 +85,9 @@ export class OffsetAllocator {
|
|
|
85
85
|
* @param {Allocation} allocation
|
|
86
86
|
*/
|
|
87
87
|
free(allocation: Allocation): void;
|
|
88
|
+
/**
|
|
89
|
+
* Drop all allocations, effectively deallocating everything and restoring allocator into initial state
|
|
90
|
+
*/
|
|
88
91
|
reset(): void;
|
|
89
92
|
/**
|
|
90
93
|
* Useful for debug and UI
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OffsetAllocator.d.ts","sourceRoot":"","sources":["../../../../../src/core/binary/allocator/OffsetAllocator.js"],"names":[],"mappings":"AAaA,iCAAkC,UAAU,CAAC;AAmF7C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH;IAwDI;;;;OAIG;IACH,kBAHW,MAAM,cACN,MAAM,EAYhB;IAtED;;;;OAIG;IACH,MAFU,MAAM,CAEP;IAET;;;;OAIG;IACH,WAFU,MAAM,CAEF;IAEd;;;OAGG;IACH,aAFU,MAAM,CAEA;IAEhB;;;OAGG;IACH,aAFU,MAAM,CAEA;IAEhB;;;OAGG;IACH,UAFU,UAAU,CAEoB;IAExC;;;OAGG;IACH,YAFU,WAAW,CAEuB;IAE5C;;;OAGG;IACH,OAFU,aAAa,CAEmB;IAE1C;;OAEG;IACH,WAFU,WAAW,CAEX;IAEV;;;OAGG;IACH,YAFU,MAAM,CAED;IAmBf;;;;OAIG;IACH,eAHW,MAAM,GACJ,UAAU,CAkGtB;IAED;;;OAGG;IACH,iBAFW,UAAU,QAsFpB;IAqID,cA4BC;IAED;;;OAGG;IACH,iBAFY,aAAa,CA2BxB;;CACJ;
|
|
1
|
+
{"version":3,"file":"OffsetAllocator.d.ts","sourceRoot":"","sources":["../../../../../src/core/binary/allocator/OffsetAllocator.js"],"names":[],"mappings":"AAaA,iCAAkC,UAAU,CAAC;AAmF7C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH;IAwDI;;;;OAIG;IACH,kBAHW,MAAM,cACN,MAAM,EAYhB;IAtED;;;;OAIG;IACH,MAFU,MAAM,CAEP;IAET;;;;OAIG;IACH,WAFU,MAAM,CAEF;IAEd;;;OAGG;IACH,aAFU,MAAM,CAEA;IAEhB;;;OAGG;IACH,aAFU,MAAM,CAEA;IAEhB;;;OAGG;IACH,UAFU,UAAU,CAEoB;IAExC;;;OAGG;IACH,YAFU,WAAW,CAEuB;IAE5C;;;OAGG;IACH,OAFU,aAAa,CAEmB;IAE1C;;OAEG;IACH,WAFU,WAAW,CAEX;IAEV;;;OAGG;IACH,YAFU,MAAM,CAED;IAmBf;;;;OAIG;IACH,eAHW,MAAM,GACJ,UAAU,CAkGtB;IAED;;;OAGG;IACH,iBAFW,UAAU,QAsFpB;IAqID;;OAEG;IACH,cA4BC;IAED;;;OAGG;IACH,iBAFY,aAAa,CA2BxB;;CACJ;8BAjkB6B,yCAAyC;AAgDvE;IAII;;;;;OAKG;IACH,oBAJW,MAAM,YACN,MAAM,GACL,UAAU,CASrB;IAhBD,eAA4B;IAC5B,iBAA8B;CAgBjC;AAoBD;IACI,uBAAkB;IAClB,0BAAqB;CACxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compute_triangle_area_3d.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/triangle/compute_triangle_area_3d.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compute_triangle_area_3d.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/3d/triangle/compute_triangle_area_3d.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,6CAXW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,GACJ,MAAM,CAoClB"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { assert } from "../../../assert.js";
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Based on: https://gamedev.stackexchange.com/questions/165643/how-to-calculate-the-surface-area-of-a-mesh
|
|
3
5
|
* @param {number} x0
|
|
@@ -16,6 +18,17 @@ export function compute_triangle_area_3d(
|
|
|
16
18
|
x1, y1, z1,
|
|
17
19
|
x2, y2, z2
|
|
18
20
|
) {
|
|
21
|
+
assert.isNumber(x0,'x0');
|
|
22
|
+
assert.isNumber(y0, 'y0');
|
|
23
|
+
assert.isNumber(z0, 'z0');
|
|
24
|
+
|
|
25
|
+
assert.isNumber(x1, 'x1');
|
|
26
|
+
assert.isNumber(y1, 'y1');
|
|
27
|
+
assert.isNumber(z1, 'z1');
|
|
28
|
+
|
|
29
|
+
assert.isNumber(x2, 'x2');
|
|
30
|
+
assert.isNumber(y2, 'y2');
|
|
31
|
+
assert.isNumber(z2, 'z2');
|
|
19
32
|
|
|
20
33
|
const ax = x1 - x0;
|
|
21
34
|
const ay = y1 - y0;
|