@woosh/meep-engine 2.113.6 → 2.113.7
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/bundle-worker-terrain.js +1 -1
- package/build/meep.cjs +168 -88
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +168 -88
- package/package.json +1 -1
- package/src/core/binary/Base64.d.ts.map +1 -1
- package/src/core/binary/Base64.js +73 -31
- package/src/core/binary/BitSet.d.ts +2 -2
- package/src/core/binary/BitSet.d.ts.map +1 -1
- package/src/core/binary/BitSet.js +8 -8
- package/src/core/binary/align_32.d.ts +2 -2
- package/src/core/binary/align_32.d.ts.map +1 -1
- package/src/core/binary/align_32.js +7 -3
- package/src/core/binary/dec2hex.d.ts +2 -2
- package/src/core/binary/dec2hex.d.ts.map +1 -1
- package/src/core/binary/dec2hex.js +7 -3
- package/src/core/binary/downloadAsFile.d.ts +7 -1
- package/src/core/binary/downloadAsFile.d.ts.map +1 -1
- package/src/core/binary/downloadAsFile.js +10 -7
- package/src/core/binary/downloadUrlAsFile.d.ts +1 -1
- package/src/core/binary/downloadUrlAsFile.d.ts.map +1 -1
- package/src/core/binary/downloadUrlAsFile.js +6 -1
- package/src/core/binary/int32_to_binary_string.d.ts +1 -2
- package/src/core/binary/int32_to_binary_string.d.ts.map +1 -1
- package/src/core/binary/int32_to_binary_string.js +4 -2
- package/src/core/binary/url_to_data_url.d.ts +2 -1
- package/src/core/binary/url_to_data_url.d.ts.map +1 -1
- package/src/core/binary/url_to_data_url.js +2 -1
- package/src/core/codegen/LineBuilder.d.ts +4 -3
- package/src/core/codegen/LineBuilder.d.ts.map +1 -1
- package/src/core/codegen/LineBuilder.js +35 -6
- package/src/core/collection/array/arrayIndexByEquality.d.ts +1 -1
- package/src/core/collection/array/arrayIndexByEquality.js +1 -1
- package/src/core/collection/array/array_push_if_unique.d.ts.map +1 -1
- package/src/core/collection/array/array_push_if_unique.js +4 -0
- package/src/core/collection/list/List.d.ts.map +1 -1
- package/src/core/collection/list/List.js +7 -2
- package/src/core/collection/table/RowFirstTable.d.ts +12 -12
- package/src/core/collection/table/RowFirstTable.d.ts.map +1 -1
- package/src/core/collection/table/RowFirstTable.js +39 -36
- package/src/core/collection/table/RowFirstTableSpec.d.ts +1 -0
- package/src/core/collection/table/RowFirstTableSpec.d.ts.map +1 -1
- package/src/core/collection/table/RowFirstTableSpec.js +1 -0
- package/src/core/collection/table/serializeRowFirstTable.d.ts.map +1 -1
- package/src/core/collection/table/serializeRowFirstTable.js +6 -4
- package/src/core/math/isPowerOfTwo.d.ts +1 -1
- package/src/core/math/isPowerOfTwo.d.ts.map +1 -1
- package/src/core/math/isPowerOfTwo.js +2 -4
- package/src/core/model/LinearValue.d.ts +5 -1
- package/src/core/model/LinearValue.d.ts.map +1 -1
- package/src/core/model/LinearValue.js +16 -5
- package/src/core/model/ModuleRegistry.d.ts.map +1 -1
- package/src/core/model/ModuleRegistry.js +33 -29
- package/src/core/model/ResourceAccessSpecification.d.ts.map +1 -1
- package/src/core/model/ResourceAccessSpecification.js +7 -1
- package/src/core/model/node-graph/Connection.d.ts.map +1 -1
- package/src/core/model/node-graph/Connection.js +13 -7
- package/src/core/model/node-graph/NodeGraph.d.ts +2 -1
- package/src/core/model/node-graph/NodeGraph.d.ts.map +1 -1
- package/src/core/model/node-graph/NodeGraph.js +1 -1
- package/src/core/model/node-graph/node/NodeDescription.d.ts.map +1 -1
- package/src/core/model/node-graph/node/NodeDescription.js +8 -0
- package/src/core/model/node-graph/node/NodeInstance.d.ts.map +1 -1
- package/src/core/model/node-graph/node/NodeInstance.js +4 -0
- package/src/core/model/node-graph/node/NodeInstancePortReference.d.ts.map +1 -1
- package/src/core/model/node-graph/node/NodeInstancePortReference.js +6 -10
package/build/meep.cjs
CHANGED
|
@@ -48669,6 +48669,7 @@ function SplatMaterial(
|
|
|
48669
48669
|
/**
|
|
48670
48670
|
* Adapted from https://github.com/beatgammit/base64-js
|
|
48671
48671
|
* @author Jameson Little
|
|
48672
|
+
* @author Alex Goldring
|
|
48672
48673
|
*/
|
|
48673
48674
|
|
|
48674
48675
|
/**
|
|
@@ -48676,12 +48677,12 @@ function SplatMaterial(
|
|
|
48676
48677
|
* @type {string[]}
|
|
48677
48678
|
*/
|
|
48678
48679
|
const lookup = [];
|
|
48680
|
+
|
|
48679
48681
|
/**
|
|
48680
48682
|
*
|
|
48681
48683
|
* @type {number[]}
|
|
48682
48684
|
*/
|
|
48683
48685
|
const revLookup = [];
|
|
48684
|
-
const Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;
|
|
48685
48686
|
|
|
48686
48687
|
const code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
48687
48688
|
|
|
@@ -48701,7 +48702,7 @@ revLookup['_'.charCodeAt(0)] = 63;
|
|
|
48701
48702
|
* @return {number[]}
|
|
48702
48703
|
*/
|
|
48703
48704
|
function getLens(b64) {
|
|
48704
|
-
|
|
48705
|
+
const len = b64.length;
|
|
48705
48706
|
|
|
48706
48707
|
if (len % 4 > 0) {
|
|
48707
48708
|
throw new Error('Invalid string. Length must be a multiple of 4');
|
|
@@ -48709,63 +48710,88 @@ function getLens(b64) {
|
|
|
48709
48710
|
|
|
48710
48711
|
// Trim off extra bytes after placeholder bytes are found
|
|
48711
48712
|
// See: https://github.com/beatgammit/base64-js/issues/42
|
|
48712
|
-
|
|
48713
|
+
let validLen = b64.indexOf('=');
|
|
48714
|
+
|
|
48713
48715
|
if (validLen === -1) {
|
|
48714
48716
|
validLen = len;
|
|
48715
48717
|
}
|
|
48716
48718
|
|
|
48717
|
-
|
|
48719
|
+
const placeHoldersLen = validLen === len
|
|
48718
48720
|
? 0
|
|
48719
48721
|
: 4 - (validLen % 4);
|
|
48720
48722
|
|
|
48721
48723
|
return [validLen, placeHoldersLen];
|
|
48722
48724
|
}
|
|
48723
48725
|
|
|
48724
|
-
|
|
48725
|
-
|
|
48726
|
-
|
|
48726
|
+
/**
|
|
48727
|
+
* base64 is 4/3 + up to two characters of the original data
|
|
48728
|
+
* @param {number} validLen
|
|
48729
|
+
* @param {number} placeHoldersLen
|
|
48730
|
+
*/
|
|
48731
|
+
function _byteLength(validLen, placeHoldersLen) {
|
|
48727
48732
|
return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen;
|
|
48728
48733
|
}
|
|
48729
48734
|
|
|
48735
|
+
/**
|
|
48736
|
+
*
|
|
48737
|
+
* @param {string} b64
|
|
48738
|
+
* @return {Uint8Array}
|
|
48739
|
+
*/
|
|
48730
48740
|
function toByteArray(b64) {
|
|
48731
|
-
|
|
48732
|
-
|
|
48733
|
-
|
|
48734
|
-
|
|
48741
|
+
let tmp;
|
|
48742
|
+
const lens = getLens(b64);
|
|
48743
|
+
const validLen = lens[0];
|
|
48744
|
+
const placeHoldersLen = lens[1];
|
|
48735
48745
|
|
|
48736
|
-
|
|
48746
|
+
const arr = new Uint8Array(_byteLength(validLen, placeHoldersLen));
|
|
48737
48747
|
|
|
48738
|
-
|
|
48748
|
+
let curByte = 0;
|
|
48739
48749
|
|
|
48740
48750
|
// if there are placeholders, only get up to the last complete 4 chars
|
|
48741
|
-
|
|
48751
|
+
const len = placeHoldersLen > 0
|
|
48742
48752
|
? validLen - 4
|
|
48743
48753
|
: validLen;
|
|
48744
48754
|
|
|
48745
|
-
|
|
48746
|
-
|
|
48755
|
+
let i = 0;
|
|
48756
|
+
|
|
48757
|
+
for (; i < len; i += 4) {
|
|
48758
|
+
const char_0 = b64.charCodeAt(i);
|
|
48759
|
+
const char_1 = b64.charCodeAt(i + 1);
|
|
48760
|
+
const char_2 = b64.charCodeAt(i + 2);
|
|
48761
|
+
const char_3 = b64.charCodeAt(i + 3);
|
|
48762
|
+
|
|
48747
48763
|
tmp =
|
|
48748
|
-
(revLookup[
|
|
48749
|
-
(revLookup[
|
|
48750
|
-
(revLookup[
|
|
48751
|
-
revLookup[
|
|
48764
|
+
(revLookup[char_0] << 18) |
|
|
48765
|
+
(revLookup[char_1] << 12) |
|
|
48766
|
+
(revLookup[char_2] << 6) |
|
|
48767
|
+
revLookup[char_3];
|
|
48768
|
+
|
|
48752
48769
|
arr[curByte++] = (tmp >> 16) & 0xFF;
|
|
48753
48770
|
arr[curByte++] = (tmp >> 8) & 0xFF;
|
|
48754
48771
|
arr[curByte++] = tmp & 0xFF;
|
|
48755
48772
|
}
|
|
48756
48773
|
|
|
48757
48774
|
if (placeHoldersLen === 2) {
|
|
48775
|
+
const char_0 = b64.charCodeAt(i);
|
|
48776
|
+
const char_1 = b64.charCodeAt(i + 1);
|
|
48777
|
+
|
|
48758
48778
|
tmp =
|
|
48759
|
-
(revLookup[
|
|
48760
|
-
(revLookup[
|
|
48779
|
+
(revLookup[char_0] << 2) |
|
|
48780
|
+
(revLookup[char_1] >> 4);
|
|
48781
|
+
|
|
48761
48782
|
arr[curByte++] = tmp & 0xFF;
|
|
48762
48783
|
}
|
|
48763
48784
|
|
|
48764
48785
|
if (placeHoldersLen === 1) {
|
|
48786
|
+
const char_0 = b64.charCodeAt(i);
|
|
48787
|
+
const char_1 = b64.charCodeAt(i + 1);
|
|
48788
|
+
const char_2 = b64.charCodeAt(i + 2);
|
|
48789
|
+
|
|
48765
48790
|
tmp =
|
|
48766
|
-
(revLookup[
|
|
48767
|
-
(revLookup[
|
|
48768
|
-
(revLookup[
|
|
48791
|
+
(revLookup[char_0] << 10) |
|
|
48792
|
+
(revLookup[char_1] << 4) |
|
|
48793
|
+
(revLookup[char_2] >> 2);
|
|
48794
|
+
|
|
48769
48795
|
arr[curByte++] = (tmp >> 8) & 0xFF;
|
|
48770
48796
|
arr[curByte++] = tmp & 0xFF;
|
|
48771
48797
|
}
|
|
@@ -48773,6 +48799,11 @@ function toByteArray(b64) {
|
|
|
48773
48799
|
return arr;
|
|
48774
48800
|
}
|
|
48775
48801
|
|
|
48802
|
+
/**
|
|
48803
|
+
*
|
|
48804
|
+
* @param {number} num
|
|
48805
|
+
* @return {string}
|
|
48806
|
+
*/
|
|
48776
48807
|
function tripletToBase64(num) {
|
|
48777
48808
|
return lookup[num >> 18 & 0x3F]
|
|
48778
48809
|
+ lookup[num >> 12 & 0x3F]
|
|
@@ -48803,24 +48834,29 @@ function encodeChunk(uint8, start, end) {
|
|
|
48803
48834
|
return output.join('');
|
|
48804
48835
|
}
|
|
48805
48836
|
|
|
48837
|
+
/**
|
|
48838
|
+
* must be multiple of 3
|
|
48839
|
+
*/
|
|
48840
|
+
const MAX_CHUNK_LENGTH = 16383;
|
|
48841
|
+
|
|
48806
48842
|
/**
|
|
48807
48843
|
*
|
|
48808
48844
|
* @param {Uint8Array} uint8
|
|
48809
48845
|
* @return {string}
|
|
48810
48846
|
*/
|
|
48811
48847
|
function fromByteArray(uint8) {
|
|
48812
|
-
let tmp;
|
|
48813
48848
|
|
|
48814
48849
|
const len = uint8.length;
|
|
48850
|
+
|
|
48815
48851
|
const extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes
|
|
48852
|
+
|
|
48816
48853
|
const parts = [];
|
|
48817
|
-
const maxChunkLength = 16383; // must be multiple of 3
|
|
48818
48854
|
|
|
48819
48855
|
// go through the array every three bytes, we'll deal with trailing stuff later
|
|
48820
48856
|
const len2 = len - extraBytes;
|
|
48821
48857
|
|
|
48822
|
-
for (let i = 0; i < len2; i +=
|
|
48823
|
-
const end = (i +
|
|
48858
|
+
for (let i = 0; i < len2; i += MAX_CHUNK_LENGTH) {
|
|
48859
|
+
const end = (i + MAX_CHUNK_LENGTH) > len2 ? len2 : (i + MAX_CHUNK_LENGTH);
|
|
48824
48860
|
|
|
48825
48861
|
const chunk = encodeChunk(uint8, i, end);
|
|
48826
48862
|
|
|
@@ -48829,20 +48865,26 @@ function fromByteArray(uint8) {
|
|
|
48829
48865
|
|
|
48830
48866
|
// pad the end with zeros, but make sure to not forget the extra bytes
|
|
48831
48867
|
if (extraBytes === 1) {
|
|
48832
|
-
|
|
48868
|
+
|
|
48869
|
+
const tmp = uint8[len - 1];
|
|
48870
|
+
|
|
48833
48871
|
parts.push(
|
|
48834
48872
|
lookup[tmp >> 2] +
|
|
48835
48873
|
lookup[(tmp << 4) & 0x3F] +
|
|
48836
48874
|
'=='
|
|
48837
48875
|
);
|
|
48876
|
+
|
|
48838
48877
|
} else if (extraBytes === 2) {
|
|
48839
|
-
|
|
48878
|
+
|
|
48879
|
+
const tmp = (uint8[len - 2] << 8) + uint8[len - 1];
|
|
48880
|
+
|
|
48840
48881
|
parts.push(
|
|
48841
48882
|
lookup[tmp >> 10] +
|
|
48842
48883
|
lookup[(tmp >> 4) & 0x3F] +
|
|
48843
48884
|
lookup[(tmp << 2) & 0x3F] +
|
|
48844
48885
|
'='
|
|
48845
48886
|
);
|
|
48887
|
+
|
|
48846
48888
|
}
|
|
48847
48889
|
|
|
48848
48890
|
return parts.join('');
|
|
@@ -53286,11 +53328,12 @@ function min3(a, b, c) {
|
|
|
53286
53328
|
|
|
53287
53329
|
/**
|
|
53288
53330
|
* Convert a decimal value to hex
|
|
53289
|
-
* @param {number}
|
|
53331
|
+
* @param {number} x generally expects b byte value, 0-255
|
|
53290
53332
|
* @returns {string} zero-padded value, for example instead of "0", will return "00" and instead of "F" will return "0F"
|
|
53291
53333
|
*/
|
|
53292
|
-
function dec2hex(
|
|
53293
|
-
|
|
53334
|
+
function dec2hex(x) {
|
|
53335
|
+
|
|
53336
|
+
const hex = Math.round(x).toString(16);
|
|
53294
53337
|
return hex.length === 1 ? "0" + hex : hex;
|
|
53295
53338
|
}
|
|
53296
53339
|
|
|
@@ -61315,7 +61358,7 @@ function objectsEqual(a, b) {
|
|
|
61315
61358
|
* @param {T[]} array
|
|
61316
61359
|
* @param {T} element
|
|
61317
61360
|
* @param {function(a:T,b:T):boolean} equals
|
|
61318
|
-
* @returns {number}
|
|
61361
|
+
* @returns {number} index of first match or -1 if no matches found
|
|
61319
61362
|
*/
|
|
61320
61363
|
function arrayIndexByEquality(array, element, equals) {
|
|
61321
61364
|
const n = array.length;
|
|
@@ -61393,17 +61436,19 @@ class List {
|
|
|
61393
61436
|
*/
|
|
61394
61437
|
on = {
|
|
61395
61438
|
/**
|
|
61439
|
+
* @readonly
|
|
61396
61440
|
* @type {Signal<T,number>}
|
|
61397
61441
|
*/
|
|
61398
61442
|
added: new Signal(),
|
|
61399
61443
|
/**
|
|
61444
|
+
* @readonly
|
|
61400
61445
|
* @type {Signal<T,number>}
|
|
61401
61446
|
*/
|
|
61402
61447
|
removed: new Signal()
|
|
61403
61448
|
};
|
|
61404
61449
|
|
|
61405
61450
|
/**
|
|
61406
|
-
*
|
|
61451
|
+
* @readonly
|
|
61407
61452
|
* @type {T[]}
|
|
61408
61453
|
*/
|
|
61409
61454
|
data = []
|
|
@@ -61470,6 +61515,7 @@ class List {
|
|
|
61470
61515
|
/**
|
|
61471
61516
|
*
|
|
61472
61517
|
* @param {T} el
|
|
61518
|
+
* @returns {this}
|
|
61473
61519
|
*/
|
|
61474
61520
|
add(el) {
|
|
61475
61521
|
this.data.push(el);
|
|
@@ -61487,7 +61533,7 @@ class List {
|
|
|
61487
61533
|
* Note that this operation is rather slow as it triggers a linear scan
|
|
61488
61534
|
* If the list gets large - consider using a {@link Set} class instead
|
|
61489
61535
|
* @param {T} el
|
|
61490
|
-
* @return {boolean}
|
|
61536
|
+
* @return {boolean} true if element was added, false if element already existed in the list
|
|
61491
61537
|
*/
|
|
61492
61538
|
addUnique(el) {
|
|
61493
61539
|
if (this.contains(el)) {
|
|
@@ -62254,7 +62300,9 @@ class List {
|
|
|
62254
62300
|
|
|
62255
62301
|
for (let i = 0; i < length; i++) {
|
|
62256
62302
|
const datum = this.data[i];
|
|
62303
|
+
|
|
62257
62304
|
const singleValue = datum.hash();
|
|
62305
|
+
|
|
62258
62306
|
hash = ((hash << 5) - hash) + singleValue;
|
|
62259
62307
|
hash |= 0; // Convert to 32bit integer
|
|
62260
62308
|
}
|
|
@@ -63185,12 +63233,24 @@ class Line {
|
|
|
63185
63233
|
*
|
|
63186
63234
|
* @param {string} text
|
|
63187
63235
|
* @param {number} indent
|
|
63188
|
-
* @constructor
|
|
63189
63236
|
*/
|
|
63190
63237
|
constructor(text, indent) {
|
|
63238
|
+
|
|
63239
|
+
/**
|
|
63240
|
+
*
|
|
63241
|
+
* @type {string}
|
|
63242
|
+
*/
|
|
63191
63243
|
this.text = text;
|
|
63244
|
+
/**
|
|
63245
|
+
*
|
|
63246
|
+
* @type {number}
|
|
63247
|
+
*/
|
|
63192
63248
|
this.indentation = indent;
|
|
63193
63249
|
}
|
|
63250
|
+
|
|
63251
|
+
toString() {
|
|
63252
|
+
return `Line{ indentation=${this.indentation}, text="${this.text}" }`
|
|
63253
|
+
}
|
|
63194
63254
|
}
|
|
63195
63255
|
|
|
63196
63256
|
const DEFAULT_INDENT_SPACES = 4;
|
|
@@ -63207,13 +63267,13 @@ class LineBuilder {
|
|
|
63207
63267
|
#lines = [];
|
|
63208
63268
|
|
|
63209
63269
|
/**
|
|
63210
|
-
*
|
|
63270
|
+
* Current indent level
|
|
63211
63271
|
* @type {number}
|
|
63212
63272
|
*/
|
|
63213
63273
|
#indentation = 0;
|
|
63214
63274
|
|
|
63215
63275
|
/**
|
|
63216
|
-
*
|
|
63276
|
+
* TODO replace with indent string, that is tab, space or any combination or something else entirely
|
|
63217
63277
|
* @type {number}
|
|
63218
63278
|
*/
|
|
63219
63279
|
indentSpaces = DEFAULT_INDENT_SPACES;
|
|
@@ -63232,8 +63292,10 @@ class LineBuilder {
|
|
|
63232
63292
|
* @param {string} term
|
|
63233
63293
|
*/
|
|
63234
63294
|
containsSubstring(term) {
|
|
63295
|
+
|
|
63235
63296
|
const lines = this.#lines;
|
|
63236
63297
|
const n = lines.length;
|
|
63298
|
+
|
|
63237
63299
|
for (let i = 0; i < n; i++) {
|
|
63238
63300
|
const line = lines[i];
|
|
63239
63301
|
|
|
@@ -63261,6 +63323,7 @@ class LineBuilder {
|
|
|
63261
63323
|
* @returns {LineBuilder}
|
|
63262
63324
|
*/
|
|
63263
63325
|
dedent() {
|
|
63326
|
+
|
|
63264
63327
|
this.#indentation--;
|
|
63265
63328
|
return this;
|
|
63266
63329
|
}
|
|
@@ -63331,14 +63394,15 @@ class LineBuilder {
|
|
|
63331
63394
|
}
|
|
63332
63395
|
|
|
63333
63396
|
/**
|
|
63334
|
-
*
|
|
63335
63397
|
* @param {string} text
|
|
63398
|
+
* @param {string} [line_separator] defaults to new-line character
|
|
63336
63399
|
* @returns {LineBuilder}
|
|
63337
63400
|
*/
|
|
63338
|
-
static fromText(text) {
|
|
63401
|
+
static fromText(text, line_separator = '\n') {
|
|
63402
|
+
|
|
63339
63403
|
const r = new LineBuilder();
|
|
63340
63404
|
|
|
63341
|
-
const lines = text.split(
|
|
63405
|
+
const lines = text.split(line_separator);
|
|
63342
63406
|
|
|
63343
63407
|
const n = lines.length;
|
|
63344
63408
|
|
|
@@ -63354,6 +63418,10 @@ class LineBuilder {
|
|
|
63354
63418
|
|
|
63355
63419
|
return r;
|
|
63356
63420
|
}
|
|
63421
|
+
|
|
63422
|
+
toString() {
|
|
63423
|
+
return this.build();
|
|
63424
|
+
}
|
|
63357
63425
|
}
|
|
63358
63426
|
|
|
63359
63427
|
/**
|
|
@@ -63914,6 +63982,7 @@ class OffsetScaleTransform2D {
|
|
|
63914
63982
|
* @return {boolean}
|
|
63915
63983
|
*/
|
|
63916
63984
|
function array_push_if_unique(array, element) {
|
|
63985
|
+
|
|
63917
63986
|
const i = array.indexOf(element);
|
|
63918
63987
|
|
|
63919
63988
|
if (i === -1) {
|
|
@@ -69159,7 +69228,8 @@ class ResourceAccessSpecification {
|
|
|
69159
69228
|
* @param {number|ResourceAccessKind} access
|
|
69160
69229
|
* @returns {ResourceAccessSpecification<R>}
|
|
69161
69230
|
*/
|
|
69162
|
-
static from(resource, access = DEFAULT_ACCESS){
|
|
69231
|
+
static from(resource, access = DEFAULT_ACCESS) {
|
|
69232
|
+
|
|
69163
69233
|
const r = new ResourceAccessSpecification();
|
|
69164
69234
|
|
|
69165
69235
|
r.access = access;
|
|
@@ -70811,11 +70881,12 @@ const EntityFlags = {
|
|
|
70811
70881
|
|
|
70812
70882
|
/**
|
|
70813
70883
|
* Align to the nearest number divisible by 32, rounding up
|
|
70814
|
-
* @param {number}
|
|
70884
|
+
* @param {number} x must be a non-negative integer
|
|
70815
70885
|
* @returns {number}
|
|
70816
70886
|
*/
|
|
70817
|
-
function align_32(
|
|
70818
|
-
|
|
70887
|
+
function align_32(x) {
|
|
70888
|
+
|
|
70889
|
+
return ((x + 31) >>> 5) << 5
|
|
70819
70890
|
}
|
|
70820
70891
|
|
|
70821
70892
|
/**
|
|
@@ -71170,22 +71241,20 @@ class BitSet {
|
|
|
71170
71241
|
|
|
71171
71242
|
/**
|
|
71172
71243
|
*
|
|
71173
|
-
* @param {int}
|
|
71244
|
+
* @param {int} bit_index
|
|
71174
71245
|
* @param {boolean} value
|
|
71175
71246
|
*/
|
|
71176
|
-
set(
|
|
71177
|
-
//assert.ok(typeof bitIndex, 'number', `bitIndex must be a number, instead was '${typeof bitIndex}'`);
|
|
71178
|
-
//assert.ok(typeof value, 'boolean', `value must be a boolean, instead was '${typeof bitIndex}'`);
|
|
71247
|
+
set(bit_index, value) {
|
|
71179
71248
|
|
|
71180
|
-
const word_offset =
|
|
71181
|
-
const bit_offset =
|
|
71249
|
+
const word_offset = bit_index >> 5;
|
|
71250
|
+
const bit_offset = bit_index & 31;
|
|
71182
71251
|
|
|
71183
71252
|
//const oldLength = this.__length;
|
|
71184
71253
|
|
|
71185
71254
|
const word_mask = 1 << bit_offset;
|
|
71186
71255
|
|
|
71187
71256
|
if (value) {
|
|
71188
|
-
const bitIndexInc =
|
|
71257
|
+
const bitIndexInc = bit_index + 1;
|
|
71189
71258
|
|
|
71190
71259
|
if (bitIndexInc > this.__length) {
|
|
71191
71260
|
// ensure capacity
|
|
@@ -71196,7 +71265,7 @@ class BitSet {
|
|
|
71196
71265
|
this.__data_uint32[word_offset] |= word_mask;
|
|
71197
71266
|
|
|
71198
71267
|
|
|
71199
|
-
} else if (
|
|
71268
|
+
} else if (bit_index < this.__length) {
|
|
71200
71269
|
//clear
|
|
71201
71270
|
this.__data_uint32[word_offset] &= ~word_mask;
|
|
71202
71271
|
|
|
@@ -83659,44 +83728,48 @@ class Localization {
|
|
|
83659
83728
|
}
|
|
83660
83729
|
}
|
|
83661
83730
|
|
|
83731
|
+
/**
|
|
83732
|
+
* @template T
|
|
83733
|
+
*/
|
|
83662
83734
|
class ModuleRegistry {
|
|
83663
83735
|
|
|
83664
83736
|
/**
|
|
83665
83737
|
*
|
|
83666
|
-
* @type {Map<string,
|
|
83738
|
+
* @type {Map<string, T>}
|
|
83667
83739
|
*/
|
|
83668
83740
|
#modules = new Map();
|
|
83669
83741
|
/**
|
|
83670
83742
|
*
|
|
83671
|
-
* @type {Map
|
|
83743
|
+
* @type {Map<T,Array<string>>}
|
|
83672
83744
|
*/
|
|
83673
83745
|
#reverse_lookup = new Map();
|
|
83674
83746
|
|
|
83675
|
-
|
|
83676
|
-
|
|
83677
|
-
|
|
83678
|
-
|
|
83679
|
-
|
|
83680
|
-
|
|
83681
|
-
|
|
83682
|
-
|
|
83683
|
-
|
|
83684
|
-
|
|
83685
|
-
|
|
83686
|
-
|
|
83687
|
-
|
|
83688
|
-
|
|
83689
|
-
throw new Error(`Module '${p}' not found in the registry`);
|
|
83690
|
-
}
|
|
83747
|
+
/**
|
|
83748
|
+
* @readonly
|
|
83749
|
+
* @type {ModuleRegistry}
|
|
83750
|
+
*/
|
|
83751
|
+
proxy = new Proxy(this, {
|
|
83752
|
+
/**
|
|
83753
|
+
*
|
|
83754
|
+
* @param target
|
|
83755
|
+
* @param {string} p
|
|
83756
|
+
* @param receiver
|
|
83757
|
+
* @returns {Class}
|
|
83758
|
+
*/
|
|
83759
|
+
get(target, p, receiver) {
|
|
83760
|
+
const module = target.get(p);
|
|
83691
83761
|
|
|
83692
|
-
|
|
83762
|
+
if (module === undefined) {
|
|
83763
|
+
throw new Error(`Module '${p}' not found in the registry`);
|
|
83693
83764
|
}
|
|
83694
|
-
|
|
83695
|
-
|
|
83765
|
+
|
|
83766
|
+
return module;
|
|
83767
|
+
}
|
|
83768
|
+
});
|
|
83696
83769
|
|
|
83697
83770
|
/**
|
|
83698
83771
|
*
|
|
83699
|
-
* @param {function(name:string,module
|
|
83772
|
+
* @param {function(name:string,module:T):void} visitor
|
|
83700
83773
|
*/
|
|
83701
83774
|
traverse(visitor) {
|
|
83702
83775
|
this.#modules.forEach((klass, name) => visitor(name, klass));
|
|
@@ -83704,9 +83777,9 @@ class ModuleRegistry {
|
|
|
83704
83777
|
|
|
83705
83778
|
|
|
83706
83779
|
/**
|
|
83707
|
-
* @template T
|
|
83780
|
+
* @template {T} M
|
|
83708
83781
|
* @param {String} name
|
|
83709
|
-
* @returns {
|
|
83782
|
+
* @returns {M}
|
|
83710
83783
|
*/
|
|
83711
83784
|
get(name) {
|
|
83712
83785
|
return this.#modules.get(name);
|
|
@@ -83722,9 +83795,9 @@ class ModuleRegistry {
|
|
|
83722
83795
|
}
|
|
83723
83796
|
|
|
83724
83797
|
/**
|
|
83725
|
-
* @template T
|
|
83798
|
+
* @template {T} M
|
|
83726
83799
|
* @param {string} name
|
|
83727
|
-
* @param {
|
|
83800
|
+
* @param {M} module
|
|
83728
83801
|
* @returns {boolean}
|
|
83729
83802
|
*/
|
|
83730
83803
|
add(name, module) {
|
|
@@ -83752,8 +83825,8 @@ class ModuleRegistry {
|
|
|
83752
83825
|
|
|
83753
83826
|
/**
|
|
83754
83827
|
* Find all names associated with the given module
|
|
83755
|
-
* @template T
|
|
83756
|
-
* @param {
|
|
83828
|
+
* @template {T} M
|
|
83829
|
+
* @param {M} module
|
|
83757
83830
|
* @returns {string[]}
|
|
83758
83831
|
* @throws if module is not registered
|
|
83759
83832
|
*/
|
|
@@ -97461,6 +97534,13 @@ class SimpleLifecycle {
|
|
|
97461
97534
|
}
|
|
97462
97535
|
|
|
97463
97536
|
class LinearValue {
|
|
97537
|
+
|
|
97538
|
+
/**
|
|
97539
|
+
* @readonly
|
|
97540
|
+
* @type {Signal}
|
|
97541
|
+
*/
|
|
97542
|
+
onChanged = new Signal();
|
|
97543
|
+
|
|
97464
97544
|
/**
|
|
97465
97545
|
*
|
|
97466
97546
|
* @param {number} [x = 0]
|
|
@@ -97468,24 +97548,24 @@ class LinearValue {
|
|
|
97468
97548
|
* @param {number} [b = 1]
|
|
97469
97549
|
* @constructor
|
|
97470
97550
|
*/
|
|
97471
|
-
constructor(x, a, b) {
|
|
97551
|
+
constructor(x = 0, a = 0, b = 1) {
|
|
97552
|
+
|
|
97472
97553
|
/**
|
|
97473
97554
|
*
|
|
97474
97555
|
* @type {number}
|
|
97475
97556
|
*/
|
|
97476
|
-
this.x = x
|
|
97557
|
+
this.x = x;
|
|
97477
97558
|
/**
|
|
97478
97559
|
*
|
|
97479
97560
|
* @type {number}
|
|
97480
97561
|
*/
|
|
97481
|
-
this.a = a
|
|
97562
|
+
this.a = a;
|
|
97482
97563
|
/**
|
|
97483
97564
|
*
|
|
97484
97565
|
* @type {number}
|
|
97485
97566
|
*/
|
|
97486
|
-
this.b = b
|
|
97567
|
+
this.b = b;
|
|
97487
97568
|
|
|
97488
|
-
this.onChanged = new Signal();
|
|
97489
97569
|
}
|
|
97490
97570
|
|
|
97491
97571
|
/**
|