@woosh/meep-engine 2.75.5 → 2.75.6

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.
@@ -58131,6 +58131,19 @@ class AABB3 {
58131
58131
  this.setBounds(Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY, Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY);
58132
58132
  }
58133
58133
 
58134
+ /**
58135
+ *
58136
+ * @param {number} x
58137
+ * @param {number} y
58138
+ * @param {number} z
58139
+ */
58140
+ _translate(x,y,z){
58141
+ this.setBounds(
58142
+ this.x0 + x, this.y0 + y, this.z0 + z,
58143
+ this.x1 + x, this.y1 + y, this.z1 + z
58144
+ );
58145
+ }
58146
+
58134
58147
  /**
58135
58148
  *
58136
58149
  * @param {number} x
@@ -61433,41 +61446,6 @@ const GridTransformKind = {
61433
61446
  Direct: 1
61434
61447
  };
61435
61448
 
61436
- /**
61437
- * Performs equality check via {@link #equals} method on first object
61438
- * @template T
61439
- * @param {T} a
61440
- * @param {T} b
61441
- * @return {boolean}
61442
- */
61443
- function invokeObjectEquals(a, b) {
61444
- return a.equals(b);
61445
- }
61446
-
61447
- /**
61448
- * @template T
61449
- * @param {T} object
61450
- * @return {number}
61451
- */
61452
- function invokeObjectHash(object) {
61453
- return object.hash();
61454
- }
61455
-
61456
- /**
61457
- * Is the number a power of two?
61458
- * e.g. 2,4,8,16 etc.
61459
- * NOTE: only valid for non-negative integers
61460
- * @param {number} value
61461
- * @returns {boolean}
61462
- */
61463
- function isPowerOfTwo(value) {
61464
- assert.isNonNegativeInteger(value, 'value');
61465
-
61466
-
61467
- return (value & (value - 1)) === 0 && value !== 0;
61468
-
61469
- }
61470
-
61471
61449
  /**
61472
61450
  * Count trailing zeroes
61473
61451
  * adapted from https://github.com/git/git/blob/bcd6bc478adc4951d57ec597c44b12ee74bc88fb/ewah/ewok.h#L44
@@ -61510,21 +61488,38 @@ function ctz32(x) {
61510
61488
  }
61511
61489
 
61512
61490
  /**
61513
- *
61514
- * @param {number} count
61515
- * @returns {function}
61491
+ * Is the number a power of two?
61492
+ * e.g. 2,4,8,16 etc.
61493
+ * NOTE: only valid for non-negative integers
61494
+ * @param {number} value
61495
+ * @returns {boolean}
61516
61496
  */
61517
- function UintArrayForCount(count) {
61497
+ function isPowerOfTwo(value) {
61498
+ assert.isNonNegativeInteger(value, 'value');
61518
61499
 
61519
- if (count <= 256) {
61520
- return Uint8Array;
61521
- } else if (count <= 65536) {
61522
- return Uint16Array;
61523
- } else if (count <= 4294967295) {
61524
- return Uint32Array;
61525
- } else {
61526
- throw new Error(`Unsupported size ${count}`)
61527
- }
61500
+
61501
+ return (value & (value - 1)) === 0 && value !== 0;
61502
+
61503
+ }
61504
+
61505
+ /**
61506
+ * Performs equality check via {@link #equals} method on first object
61507
+ * @template T
61508
+ * @param {T} a
61509
+ * @param {T} b
61510
+ * @return {boolean}
61511
+ */
61512
+ function invokeObjectEquals(a, b) {
61513
+ return a.equals(b);
61514
+ }
61515
+
61516
+ /**
61517
+ * @template T
61518
+ * @param {T} object
61519
+ * @return {number}
61520
+ */
61521
+ function invokeObjectHash(object) {
61522
+ return object.hash();
61528
61523
  }
61529
61524
 
61530
61525
  /**
@@ -61540,6 +61535,24 @@ function arraySwapElements(array, index0, index1) {
61540
61535
  array[index1] = t;
61541
61536
  }
61542
61537
 
61538
+ /**
61539
+ *
61540
+ * @param {number} count
61541
+ * @returns {function}
61542
+ */
61543
+ function UintArrayForCount(count) {
61544
+
61545
+ if (count <= 256) {
61546
+ return Uint8Array;
61547
+ } else if (count <= 65536) {
61548
+ return Uint16Array;
61549
+ } else if (count <= 4294967295) {
61550
+ return Uint32Array;
61551
+ } else {
61552
+ throw new Error(`Unsupported size ${count}`)
61553
+ }
61554
+ }
61555
+
61543
61556
  /*
61544
61557
  * Heavily inspired by ruby's "new" (circa 2016) hash table implementation
61545
61558
  * @see https://github.com/ruby/ruby/blob/82995d4615e993f1d13f3e826b93fbd65c47e19e/st.c
@@ -61909,15 +61922,17 @@ class HashMap {
61909
61922
  }
61910
61923
 
61911
61924
  #rebuild_if_necessary() {
61912
- if (this.#entries_bound === this.#entries_allocated_count) {
61913
- if (this.#size === this.#entries_allocated_count) {
61914
- // used up all allocated entries
61915
- // bin count must always be larger than end of the entries table
61916
- this.#grow();
61917
- } else {
61918
- // exhausted entries array, perform compaction
61919
- this.rebuild();
61920
- }
61925
+ if (this.#entries_bound !== this.#entries_allocated_count) {
61926
+ return;
61927
+ }
61928
+
61929
+ if (this.#size === this.#entries_allocated_count) {
61930
+ // used up all allocated entries
61931
+ // bin count must always be larger than end of the entries table
61932
+ this.#grow();
61933
+ } else {
61934
+ // exhausted entries array, perform compaction
61935
+ this.rebuild();
61921
61936
  }
61922
61937
  }
61923
61938
 
@@ -65389,22 +65404,6 @@ class OffsetScaleTransform2D {
65389
65404
  }
65390
65405
  }
65391
65406
 
65392
- /**
65393
- * Created by Alex on 25/08/2016.
65394
- */
65395
-
65396
-
65397
- /**
65398
- * @readonly
65399
- * @enum {number}
65400
- */
65401
- const TaskSignal = {
65402
- EndSuccess: 0,
65403
- EndFailure: 1,
65404
- Continue: 2,
65405
- Yield: 3
65406
- };
65407
-
65408
65407
  /**
65409
65408
  * @template T
65410
65409
  * @param {T[]} array
@@ -65422,6 +65421,22 @@ function array_push_if_unique(array, element) {
65422
65421
  return false;
65423
65422
  }
65424
65423
 
65424
+ /**
65425
+ * Created by Alex on 25/08/2016.
65426
+ */
65427
+
65428
+
65429
+ /**
65430
+ * @readonly
65431
+ * @enum {number}
65432
+ */
65433
+ const TaskSignal = {
65434
+ EndSuccess: 0,
65435
+ EndFailure: 1,
65436
+ Continue: 2,
65437
+ Yield: 3
65438
+ };
65439
+
65425
65440
  /**
65426
65441
  * Created by Alex on 22/05/2016.
65427
65442
  */
@@ -65784,7 +65799,6 @@ function countTask(initial, limit, callback) {
65784
65799
  }
65785
65800
 
65786
65801
  i = initialValue;
65787
-
65788
65802
  },
65789
65803
  cycleFunction: cycle,
65790
65804
  computeProgress: function () {
@@ -92881,6 +92895,9 @@ class PointerDevice {
92881
92895
  down: new Signal(),
92882
92896
  up: new Signal(),
92883
92897
  move: new Signal(),
92898
+ /**
92899
+ * @type {Signal<Vector2, (MouseEvent|TouchEvent)>}
92900
+ */
92884
92901
  tap: new Signal(),
92885
92902
  drag: new Signal(),
92886
92903
  dragStart: new Signal(),
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.75.5",
8
+ "version": "2.75.6",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {