@woosh/meep-engine 2.47.12 → 2.47.14

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/build/meep.cjs CHANGED
@@ -73249,6 +73249,14 @@ BitSet.prototype.__resize = function (bitCapacity) {
73249
73249
  this.__capacity = uint32_capacity * 32;
73250
73250
  };
73251
73251
 
73252
+ BitSet.prototype.__updateLength = function () {
73253
+ const found_length = this.previousSetBit(this.__length) + 1;
73254
+
73255
+ if (found_length < this.__length) {
73256
+ this.__setLength(found_length);
73257
+ }
73258
+ };
73259
+
73252
73260
  /**
73253
73261
  *
73254
73262
  * @param {int} new_length
@@ -73472,12 +73480,8 @@ BitSet.prototype.set = function (bitIndex, value) {
73472
73480
  //clear
73473
73481
  this.__data_uint32[word_offset] &= ~word_mask;
73474
73482
 
73475
- if (bitIndex === this.__length - 1) {
73476
- // trim down set size potentially
73477
- // const newLastSetBit = this.previousSetBit(bitIndex);
73478
-
73479
- this.__setLength(bitIndex );
73480
- }
73483
+ // trim down set size potentially
73484
+ this.__updateLength();
73481
73485
  }
73482
73486
 
73483
73487
  //DEBUG validate firstClearBit value
@@ -82233,11 +82237,11 @@ function isGroup(t) {
82233
82237
  class ConcurrentExecutor {
82234
82238
  /**
82235
82239
  *
82236
- * @param {number} quietTime in milliseconds
82237
- * @param {number} workTime in milliseconds
82240
+ * @param {number} [quietTime] in milliseconds
82241
+ * @param {number} [workTime] in milliseconds
82238
82242
  * @constructor
82239
82243
  */
82240
- constructor(quietTime, workTime) {
82244
+ constructor(quietTime=1, workTime=15) {
82241
82245
  /**
82242
82246
  *
82243
82247
  * @type {number}