@woosh/meep-engine 2.47.13 → 2.47.15

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
@@ -117654,12 +117654,21 @@ function IdPool() {
117654
117654
  this.bitSet = new BitSet();
117655
117655
  }
117656
117656
 
117657
+ /**
117658
+ * Looks up next available ID without reserving it
117659
+ * If you want to also reserve the ID - use {@link get} instead
117660
+ * @returns {number}
117661
+ */
117662
+ IdPool.prototype.peek = function () {
117663
+ return this.bitSet.nextClearBit(0);
117664
+ };
117665
+
117657
117666
  /**
117658
117667
  *
117659
117668
  * @returns {number}
117660
117669
  */
117661
117670
  IdPool.prototype.get = function () {
117662
- const bitIndex = this.bitSet.nextClearBit(0);
117671
+ const bitIndex = this.peek();
117663
117672
 
117664
117673
  this.bitSet.set(bitIndex, true);
117665
117674