@woosh/meep-engine 2.131.24 → 2.131.26

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": "Pure JavaScript game engine. Fully featured and production ready.",
6
6
  "type": "module",
7
7
  "author": "Alexander Goldring",
8
- "version": "2.131.24",
8
+ "version": "2.131.26",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Prints the whole hierarchy into the console.
3
+ *
4
+ * Utility tool, primarily intended for debugging.
5
+ *
6
+ * WARNING: can crash the browser as hierarchies can have thousands of nodes
7
+ * @param {BVH} bvh
8
+ * @param {number} [node] where to start, defaults to root
9
+ * @param {string} [prefix] Initial prefix for the node
10
+ */
11
+ export function ebvh_print_to_console(bvh: BVH, node?: number, prefix?: string): void;
12
+ //# sourceMappingURL=ebvh_print_to_console.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ebvh_print_to_console.d.ts","sourceRoot":"","sources":["../../../../../src/core/bvh2/bvh3/ebvh_print_to_console.js"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,uDAHW,MAAM,WACN,MAAM,QAuBhB"}
@@ -0,0 +1,34 @@
1
+ import { AABB3 } from "../../geom/3d/aabb/AABB3.js";
2
+
3
+ /**
4
+ * Prints the whole hierarchy into the console.
5
+ *
6
+ * Utility tool, primarily intended for debugging.
7
+ *
8
+ * WARNING: can crash the browser as hierarchies can have thousands of nodes
9
+ * @param {BVH} bvh
10
+ * @param {number} [node] where to start, defaults to root
11
+ * @param {string} [prefix] Initial prefix for the node
12
+ */
13
+ export function ebvh_print_to_console(bvh, node = bvh.root, prefix='') {
14
+
15
+ const is_leaf = bvh.node_is_leaf(node);
16
+
17
+ const aabb = new AABB3();
18
+
19
+ bvh.node_get_aabb(node,aabb);
20
+
21
+ let common = `Bounds: [ x0=${aabb.x0}, x1=${aabb.x1}, y0=${aabb.y0}, y1=${aabb.y1}, z0=${aabb.z0}, z1=${aabb.z1} ]`;
22
+
23
+
24
+ if (is_leaf) {
25
+ console.log(prefix + `LeafNode/${node} ${common}, UserData: ${bvh.node_get_user_data(node)}`)
26
+ } else {
27
+ console.groupCollapsed(prefix + `BinaryNode/${node} ${common}`);
28
+
29
+ ebvh_print_to_console(bvh, bvh.node_get_child1(node), 'child1 -> ');
30
+ ebvh_print_to_console(bvh, bvh.node_get_child2(node),'child2 -> ');
31
+
32
+ console.groupEnd();
33
+ }
34
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"PointerDevice.d.ts","sourceRoot":"","sources":["../../../../../src/engine/input/devices/PointerDevice.js"],"names":[],"mappings":"AA2LA;;;;;GAKG;AACH,mDAJW,OAAO,SACP,UAAU,GAAC,KAAK,WAChB,OAAO,QAejB;AAED;;;;;GAKG;AACH;IAiFI;;;;OAIG;IACH,wBAHW,WAAW,EAsBrB;IAvGD;;;;OAIG;IACH,mBAFU,OAAO,CAEQ;IAIzB;;OAEG;IACH;;;;QAII;;WAEG;aADO,OAAO,OAAO,EAAE,CAAC,UAAU,GAAC,UAAU,CAAC,CAAC;;;;;;;;MAUpD;IAeF;;;OAGG;IACH,kBAAkB;IAElB;;;;OAIG;IACH,kBAFU,iBAAiB,EAAE,CAEL;IAExB;;;OAGG;IACH,yCAEC;IAED;;;OAGG;IACH,0CAEC;IAED;;;OAGG;IACH,2CAEC;IAyGD;;;OAGG;IACH,oBAFY,OAAO,CAIlB;IAED;;;OAGG;IACH,6BAsBC;IAED,0BAEC;IAED;;;;OAIG;IACH,qCAHW,OAAO,SACP,UAAU,GAAC,KAAK,QAI1B;IAED,cA6BC;IAED,aAsBC;;CACJ;oBAnfmB,+BAA+B;mBADhC,uCAAuC;kCAOxB,wBAAwB"}
1
+ {"version":3,"file":"PointerDevice.d.ts","sourceRoot":"","sources":["../../../../../src/engine/input/devices/PointerDevice.js"],"names":[],"mappings":"AA2LA;;;;;GAKG;AACH,mDAJW,OAAO,SACP,UAAU,GAAC,KAAK,WAChB,OAAO,QAejB;AAED;;;;;GAKG;AACH;IAiFI;;;;OAIG;IACH,wBAHW,WAAW,EAsBrB;IAvGD;;;;OAIG;IACH,mBAFU,OAAO,CAEQ;IAIzB;;OAEG;IACH;;;;QAII;;WAEG;aADO,OAAO,OAAO,EAAE,CAAC,UAAU,GAAC,UAAU,CAAC,CAAC;;;;;;;;MAUpD;IAeF;;;OAGG;IACH,kBAAkB;IAElB;;;;OAIG;IACH,kBAFU,iBAAiB,EAAE,CAEL;IAExB;;;OAGG;IACH,yCAEC;IAED;;;OAGG;IACH,0CAEC;IAED;;;OAGG;IACH,2CAEC;IA2GD;;;OAGG;IACH,oBAFY,OAAO,CAIlB;IAED;;;OAGG;IACH,6BAsBC;IAED,0BAEC;IAED;;;;OAIG;IACH,qCAHW,OAAO,SACP,UAAU,GAAC,KAAK,QAI1B;IAED,cA6BC;IAED,aAsBC;;CACJ;oBArfmB,+BAA+B;mBADhC,uCAAuC;kCAOxB,wBAAwB"}
@@ -326,7 +326,6 @@ export class PointerDevice {
326
326
  */
327
327
  #eventHandlerPointerDown = (event) => {
328
328
  this.readPointerPositionFromEvent(this.position, event);
329
- this.on.down.send2(this.position, event);
330
329
 
331
330
  // update button state and dispatch specific signal
332
331
  const button_index = event.button;
@@ -334,6 +333,9 @@ export class PointerDevice {
334
333
  const button = this.buttons[button_index];
335
334
 
336
335
  button?.press();
336
+
337
+ this.on.down.send2(this.position, event);
338
+
337
339
  }
338
340
 
339
341
  /**