@woosh/meep-engine 2.113.4 → 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 +179 -94
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +179 -94
- 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/bitset_find_clear_gap.d.ts +10 -0
- package/src/core/binary/bitset_find_clear_gap.d.ts.map +1 -0
- package/src/core/binary/bitset_find_clear_gap.js +30 -0
- 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/array/typed/uint_array_for_count.d.ts +2 -2
- package/src/core/collection/array/typed/uint_array_for_count.d.ts.map +1 -1
- package/src/core/collection/array/typed/uint_array_for_count.js +5 -2
- package/src/core/collection/list/List.d.ts.map +1 -1
- package/src/core/collection/list/List.js +7 -2
- package/src/core/collection/map/HashMap.js +1 -1
- 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/{isPowerOrTwo.d.ts → isPowerOfTwo.d.ts} +2 -2
- package/src/core/math/isPowerOfTwo.d.ts.map +1 -0
- package/src/core/math/{isPowerOrTwo.js → 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 +10 -1
- package/src/core/model/node-graph/NodeGraph.d.ts.map +1 -1
- package/src/core/model/node-graph/NodeGraph.js +30 -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/src/core/primitives/strings/computeStringHash.d.ts.map +1 -1
- package/src/core/primitives/strings/computeStringHash.js +13 -4
- package/src/engine/animation/curve/compression/downsample_float_array_curve_by_error.js +4 -4
- package/src/engine/graphics/impostors/octahedral/ImpostorBaker.js +1 -1
- package/src/core/math/isPowerOrTwo.d.ts.map +0 -1
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('');
|
|
@@ -50929,16 +50971,21 @@ function computeStringHash(string) {
|
|
|
50929
50971
|
|
|
50930
50972
|
const length = string.length;
|
|
50931
50973
|
|
|
50932
|
-
let hash =
|
|
50974
|
+
let hash = length;
|
|
50933
50975
|
|
|
50934
50976
|
for (let i = 0; i < length; i++) {
|
|
50935
|
-
const
|
|
50977
|
+
const code_point = string.charCodeAt(i);
|
|
50936
50978
|
|
|
50937
|
-
|
|
50979
|
+
/*
|
|
50980
|
+
* Avoiding potentially expensive multiplication operation by using 2 cheaper operation instead
|
|
50981
|
+
* (h<<5) - h === h*31
|
|
50982
|
+
*/
|
|
50983
|
+
hash = ((hash << 5) - hash) + code_point;
|
|
50938
50984
|
|
|
50939
50985
|
}
|
|
50940
50986
|
|
|
50941
|
-
|
|
50987
|
+
// force uint32
|
|
50988
|
+
return hash >>> 0;
|
|
50942
50989
|
}
|
|
50943
50990
|
|
|
50944
50991
|
/**
|
|
@@ -53281,11 +53328,12 @@ function min3(a, b, c) {
|
|
|
53281
53328
|
|
|
53282
53329
|
/**
|
|
53283
53330
|
* Convert a decimal value to hex
|
|
53284
|
-
* @param {number}
|
|
53331
|
+
* @param {number} x generally expects b byte value, 0-255
|
|
53285
53332
|
* @returns {string} zero-padded value, for example instead of "0", will return "00" and instead of "F" will return "0F"
|
|
53286
53333
|
*/
|
|
53287
|
-
function dec2hex(
|
|
53288
|
-
|
|
53334
|
+
function dec2hex(x) {
|
|
53335
|
+
|
|
53336
|
+
const hex = Math.round(x).toString(16);
|
|
53289
53337
|
return hex.length === 1 ? "0" + hex : hex;
|
|
53290
53338
|
}
|
|
53291
53339
|
|
|
@@ -59812,9 +59860,9 @@ function array_swap_one(array, index0, index1) {
|
|
|
59812
59860
|
}
|
|
59813
59861
|
|
|
59814
59862
|
/**
|
|
59815
|
-
*
|
|
59863
|
+
* @example `const my_array = new ( UintArrayForCount(x) )(length);`
|
|
59816
59864
|
* @param {number} max_value maximum value to be contained in the array
|
|
59817
|
-
* @returns {function} constructor
|
|
59865
|
+
* @returns {function} TypedArray constructor
|
|
59818
59866
|
*/
|
|
59819
59867
|
function UintArrayForCount(max_value) {
|
|
59820
59868
|
|
|
@@ -61310,7 +61358,7 @@ function objectsEqual(a, b) {
|
|
|
61310
61358
|
* @param {T[]} array
|
|
61311
61359
|
* @param {T} element
|
|
61312
61360
|
* @param {function(a:T,b:T):boolean} equals
|
|
61313
|
-
* @returns {number}
|
|
61361
|
+
* @returns {number} index of first match or -1 if no matches found
|
|
61314
61362
|
*/
|
|
61315
61363
|
function arrayIndexByEquality(array, element, equals) {
|
|
61316
61364
|
const n = array.length;
|
|
@@ -61388,17 +61436,19 @@ class List {
|
|
|
61388
61436
|
*/
|
|
61389
61437
|
on = {
|
|
61390
61438
|
/**
|
|
61439
|
+
* @readonly
|
|
61391
61440
|
* @type {Signal<T,number>}
|
|
61392
61441
|
*/
|
|
61393
61442
|
added: new Signal(),
|
|
61394
61443
|
/**
|
|
61444
|
+
* @readonly
|
|
61395
61445
|
* @type {Signal<T,number>}
|
|
61396
61446
|
*/
|
|
61397
61447
|
removed: new Signal()
|
|
61398
61448
|
};
|
|
61399
61449
|
|
|
61400
61450
|
/**
|
|
61401
|
-
*
|
|
61451
|
+
* @readonly
|
|
61402
61452
|
* @type {T[]}
|
|
61403
61453
|
*/
|
|
61404
61454
|
data = []
|
|
@@ -61465,6 +61515,7 @@ class List {
|
|
|
61465
61515
|
/**
|
|
61466
61516
|
*
|
|
61467
61517
|
* @param {T} el
|
|
61518
|
+
* @returns {this}
|
|
61468
61519
|
*/
|
|
61469
61520
|
add(el) {
|
|
61470
61521
|
this.data.push(el);
|
|
@@ -61482,7 +61533,7 @@ class List {
|
|
|
61482
61533
|
* Note that this operation is rather slow as it triggers a linear scan
|
|
61483
61534
|
* If the list gets large - consider using a {@link Set} class instead
|
|
61484
61535
|
* @param {T} el
|
|
61485
|
-
* @return {boolean}
|
|
61536
|
+
* @return {boolean} true if element was added, false if element already existed in the list
|
|
61486
61537
|
*/
|
|
61487
61538
|
addUnique(el) {
|
|
61488
61539
|
if (this.contains(el)) {
|
|
@@ -62249,7 +62300,9 @@ class List {
|
|
|
62249
62300
|
|
|
62250
62301
|
for (let i = 0; i < length; i++) {
|
|
62251
62302
|
const datum = this.data[i];
|
|
62303
|
+
|
|
62252
62304
|
const singleValue = datum.hash();
|
|
62305
|
+
|
|
62253
62306
|
hash = ((hash << 5) - hash) + singleValue;
|
|
62254
62307
|
hash |= 0; // Convert to 32bit integer
|
|
62255
62308
|
}
|
|
@@ -63180,12 +63233,24 @@ class Line {
|
|
|
63180
63233
|
*
|
|
63181
63234
|
* @param {string} text
|
|
63182
63235
|
* @param {number} indent
|
|
63183
|
-
* @constructor
|
|
63184
63236
|
*/
|
|
63185
63237
|
constructor(text, indent) {
|
|
63238
|
+
|
|
63239
|
+
/**
|
|
63240
|
+
*
|
|
63241
|
+
* @type {string}
|
|
63242
|
+
*/
|
|
63186
63243
|
this.text = text;
|
|
63244
|
+
/**
|
|
63245
|
+
*
|
|
63246
|
+
* @type {number}
|
|
63247
|
+
*/
|
|
63187
63248
|
this.indentation = indent;
|
|
63188
63249
|
}
|
|
63250
|
+
|
|
63251
|
+
toString() {
|
|
63252
|
+
return `Line{ indentation=${this.indentation}, text="${this.text}" }`
|
|
63253
|
+
}
|
|
63189
63254
|
}
|
|
63190
63255
|
|
|
63191
63256
|
const DEFAULT_INDENT_SPACES = 4;
|
|
@@ -63202,13 +63267,13 @@ class LineBuilder {
|
|
|
63202
63267
|
#lines = [];
|
|
63203
63268
|
|
|
63204
63269
|
/**
|
|
63205
|
-
*
|
|
63270
|
+
* Current indent level
|
|
63206
63271
|
* @type {number}
|
|
63207
63272
|
*/
|
|
63208
63273
|
#indentation = 0;
|
|
63209
63274
|
|
|
63210
63275
|
/**
|
|
63211
|
-
*
|
|
63276
|
+
* TODO replace with indent string, that is tab, space or any combination or something else entirely
|
|
63212
63277
|
* @type {number}
|
|
63213
63278
|
*/
|
|
63214
63279
|
indentSpaces = DEFAULT_INDENT_SPACES;
|
|
@@ -63227,8 +63292,10 @@ class LineBuilder {
|
|
|
63227
63292
|
* @param {string} term
|
|
63228
63293
|
*/
|
|
63229
63294
|
containsSubstring(term) {
|
|
63295
|
+
|
|
63230
63296
|
const lines = this.#lines;
|
|
63231
63297
|
const n = lines.length;
|
|
63298
|
+
|
|
63232
63299
|
for (let i = 0; i < n; i++) {
|
|
63233
63300
|
const line = lines[i];
|
|
63234
63301
|
|
|
@@ -63256,6 +63323,7 @@ class LineBuilder {
|
|
|
63256
63323
|
* @returns {LineBuilder}
|
|
63257
63324
|
*/
|
|
63258
63325
|
dedent() {
|
|
63326
|
+
|
|
63259
63327
|
this.#indentation--;
|
|
63260
63328
|
return this;
|
|
63261
63329
|
}
|
|
@@ -63326,14 +63394,15 @@ class LineBuilder {
|
|
|
63326
63394
|
}
|
|
63327
63395
|
|
|
63328
63396
|
/**
|
|
63329
|
-
*
|
|
63330
63397
|
* @param {string} text
|
|
63398
|
+
* @param {string} [line_separator] defaults to new-line character
|
|
63331
63399
|
* @returns {LineBuilder}
|
|
63332
63400
|
*/
|
|
63333
|
-
static fromText(text) {
|
|
63401
|
+
static fromText(text, line_separator = '\n') {
|
|
63402
|
+
|
|
63334
63403
|
const r = new LineBuilder();
|
|
63335
63404
|
|
|
63336
|
-
const lines = text.split(
|
|
63405
|
+
const lines = text.split(line_separator);
|
|
63337
63406
|
|
|
63338
63407
|
const n = lines.length;
|
|
63339
63408
|
|
|
@@ -63349,6 +63418,10 @@ class LineBuilder {
|
|
|
63349
63418
|
|
|
63350
63419
|
return r;
|
|
63351
63420
|
}
|
|
63421
|
+
|
|
63422
|
+
toString() {
|
|
63423
|
+
return this.build();
|
|
63424
|
+
}
|
|
63352
63425
|
}
|
|
63353
63426
|
|
|
63354
63427
|
/**
|
|
@@ -63909,6 +63982,7 @@ class OffsetScaleTransform2D {
|
|
|
63909
63982
|
* @return {boolean}
|
|
63910
63983
|
*/
|
|
63911
63984
|
function array_push_if_unique(array, element) {
|
|
63985
|
+
|
|
63912
63986
|
const i = array.indexOf(element);
|
|
63913
63987
|
|
|
63914
63988
|
if (i === -1) {
|
|
@@ -69154,7 +69228,8 @@ class ResourceAccessSpecification {
|
|
|
69154
69228
|
* @param {number|ResourceAccessKind} access
|
|
69155
69229
|
* @returns {ResourceAccessSpecification<R>}
|
|
69156
69230
|
*/
|
|
69157
|
-
static from(resource, access = DEFAULT_ACCESS){
|
|
69231
|
+
static from(resource, access = DEFAULT_ACCESS) {
|
|
69232
|
+
|
|
69158
69233
|
const r = new ResourceAccessSpecification();
|
|
69159
69234
|
|
|
69160
69235
|
r.access = access;
|
|
@@ -70806,11 +70881,12 @@ const EntityFlags = {
|
|
|
70806
70881
|
|
|
70807
70882
|
/**
|
|
70808
70883
|
* Align to the nearest number divisible by 32, rounding up
|
|
70809
|
-
* @param {number}
|
|
70884
|
+
* @param {number} x must be a non-negative integer
|
|
70810
70885
|
* @returns {number}
|
|
70811
70886
|
*/
|
|
70812
|
-
function align_32(
|
|
70813
|
-
|
|
70887
|
+
function align_32(x) {
|
|
70888
|
+
|
|
70889
|
+
return ((x + 31) >>> 5) << 5
|
|
70814
70890
|
}
|
|
70815
70891
|
|
|
70816
70892
|
/**
|
|
@@ -71165,22 +71241,20 @@ class BitSet {
|
|
|
71165
71241
|
|
|
71166
71242
|
/**
|
|
71167
71243
|
*
|
|
71168
|
-
* @param {int}
|
|
71244
|
+
* @param {int} bit_index
|
|
71169
71245
|
* @param {boolean} value
|
|
71170
71246
|
*/
|
|
71171
|
-
set(
|
|
71172
|
-
//assert.ok(typeof bitIndex, 'number', `bitIndex must be a number, instead was '${typeof bitIndex}'`);
|
|
71173
|
-
//assert.ok(typeof value, 'boolean', `value must be a boolean, instead was '${typeof bitIndex}'`);
|
|
71247
|
+
set(bit_index, value) {
|
|
71174
71248
|
|
|
71175
|
-
const word_offset =
|
|
71176
|
-
const bit_offset =
|
|
71249
|
+
const word_offset = bit_index >> 5;
|
|
71250
|
+
const bit_offset = bit_index & 31;
|
|
71177
71251
|
|
|
71178
71252
|
//const oldLength = this.__length;
|
|
71179
71253
|
|
|
71180
71254
|
const word_mask = 1 << bit_offset;
|
|
71181
71255
|
|
|
71182
71256
|
if (value) {
|
|
71183
|
-
const bitIndexInc =
|
|
71257
|
+
const bitIndexInc = bit_index + 1;
|
|
71184
71258
|
|
|
71185
71259
|
if (bitIndexInc > this.__length) {
|
|
71186
71260
|
// ensure capacity
|
|
@@ -71191,7 +71265,7 @@ class BitSet {
|
|
|
71191
71265
|
this.__data_uint32[word_offset] |= word_mask;
|
|
71192
71266
|
|
|
71193
71267
|
|
|
71194
|
-
} else if (
|
|
71268
|
+
} else if (bit_index < this.__length) {
|
|
71195
71269
|
//clear
|
|
71196
71270
|
this.__data_uint32[word_offset] &= ~word_mask;
|
|
71197
71271
|
|
|
@@ -83654,44 +83728,48 @@ class Localization {
|
|
|
83654
83728
|
}
|
|
83655
83729
|
}
|
|
83656
83730
|
|
|
83731
|
+
/**
|
|
83732
|
+
* @template T
|
|
83733
|
+
*/
|
|
83657
83734
|
class ModuleRegistry {
|
|
83658
83735
|
|
|
83659
83736
|
/**
|
|
83660
83737
|
*
|
|
83661
|
-
* @type {Map<string,
|
|
83738
|
+
* @type {Map<string, T>}
|
|
83662
83739
|
*/
|
|
83663
83740
|
#modules = new Map();
|
|
83664
83741
|
/**
|
|
83665
83742
|
*
|
|
83666
|
-
* @type {Map
|
|
83743
|
+
* @type {Map<T,Array<string>>}
|
|
83667
83744
|
*/
|
|
83668
83745
|
#reverse_lookup = new Map();
|
|
83669
83746
|
|
|
83670
|
-
|
|
83671
|
-
|
|
83672
|
-
|
|
83673
|
-
|
|
83674
|
-
|
|
83675
|
-
|
|
83676
|
-
|
|
83677
|
-
|
|
83678
|
-
|
|
83679
|
-
|
|
83680
|
-
|
|
83681
|
-
|
|
83682
|
-
|
|
83683
|
-
|
|
83684
|
-
throw new Error(`Module '${p}' not found in the registry`);
|
|
83685
|
-
}
|
|
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);
|
|
83686
83761
|
|
|
83687
|
-
|
|
83762
|
+
if (module === undefined) {
|
|
83763
|
+
throw new Error(`Module '${p}' not found in the registry`);
|
|
83688
83764
|
}
|
|
83689
|
-
|
|
83690
|
-
|
|
83765
|
+
|
|
83766
|
+
return module;
|
|
83767
|
+
}
|
|
83768
|
+
});
|
|
83691
83769
|
|
|
83692
83770
|
/**
|
|
83693
83771
|
*
|
|
83694
|
-
* @param {function(name:string,module
|
|
83772
|
+
* @param {function(name:string,module:T):void} visitor
|
|
83695
83773
|
*/
|
|
83696
83774
|
traverse(visitor) {
|
|
83697
83775
|
this.#modules.forEach((klass, name) => visitor(name, klass));
|
|
@@ -83699,9 +83777,9 @@ class ModuleRegistry {
|
|
|
83699
83777
|
|
|
83700
83778
|
|
|
83701
83779
|
/**
|
|
83702
|
-
* @template T
|
|
83780
|
+
* @template {T} M
|
|
83703
83781
|
* @param {String} name
|
|
83704
|
-
* @returns {
|
|
83782
|
+
* @returns {M}
|
|
83705
83783
|
*/
|
|
83706
83784
|
get(name) {
|
|
83707
83785
|
return this.#modules.get(name);
|
|
@@ -83717,9 +83795,9 @@ class ModuleRegistry {
|
|
|
83717
83795
|
}
|
|
83718
83796
|
|
|
83719
83797
|
/**
|
|
83720
|
-
* @template T
|
|
83798
|
+
* @template {T} M
|
|
83721
83799
|
* @param {string} name
|
|
83722
|
-
* @param {
|
|
83800
|
+
* @param {M} module
|
|
83723
83801
|
* @returns {boolean}
|
|
83724
83802
|
*/
|
|
83725
83803
|
add(name, module) {
|
|
@@ -83747,8 +83825,8 @@ class ModuleRegistry {
|
|
|
83747
83825
|
|
|
83748
83826
|
/**
|
|
83749
83827
|
* Find all names associated with the given module
|
|
83750
|
-
* @template T
|
|
83751
|
-
* @param {
|
|
83828
|
+
* @template {T} M
|
|
83829
|
+
* @param {M} module
|
|
83752
83830
|
* @returns {string[]}
|
|
83753
83831
|
* @throws if module is not registered
|
|
83754
83832
|
*/
|
|
@@ -97456,6 +97534,13 @@ class SimpleLifecycle {
|
|
|
97456
97534
|
}
|
|
97457
97535
|
|
|
97458
97536
|
class LinearValue {
|
|
97537
|
+
|
|
97538
|
+
/**
|
|
97539
|
+
* @readonly
|
|
97540
|
+
* @type {Signal}
|
|
97541
|
+
*/
|
|
97542
|
+
onChanged = new Signal();
|
|
97543
|
+
|
|
97459
97544
|
/**
|
|
97460
97545
|
*
|
|
97461
97546
|
* @param {number} [x = 0]
|
|
@@ -97463,24 +97548,24 @@ class LinearValue {
|
|
|
97463
97548
|
* @param {number} [b = 1]
|
|
97464
97549
|
* @constructor
|
|
97465
97550
|
*/
|
|
97466
|
-
constructor(x, a, b) {
|
|
97551
|
+
constructor(x = 0, a = 0, b = 1) {
|
|
97552
|
+
|
|
97467
97553
|
/**
|
|
97468
97554
|
*
|
|
97469
97555
|
* @type {number}
|
|
97470
97556
|
*/
|
|
97471
|
-
this.x = x
|
|
97557
|
+
this.x = x;
|
|
97472
97558
|
/**
|
|
97473
97559
|
*
|
|
97474
97560
|
* @type {number}
|
|
97475
97561
|
*/
|
|
97476
|
-
this.a = a
|
|
97562
|
+
this.a = a;
|
|
97477
97563
|
/**
|
|
97478
97564
|
*
|
|
97479
97565
|
* @type {number}
|
|
97480
97566
|
*/
|
|
97481
|
-
this.b = b
|
|
97567
|
+
this.b = b;
|
|
97482
97568
|
|
|
97483
|
-
this.onChanged = new Signal();
|
|
97484
97569
|
}
|
|
97485
97570
|
|
|
97486
97571
|
/**
|