@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.module.js
CHANGED
|
@@ -48667,6 +48667,7 @@ function SplatMaterial(
|
|
|
48667
48667
|
/**
|
|
48668
48668
|
* Adapted from https://github.com/beatgammit/base64-js
|
|
48669
48669
|
* @author Jameson Little
|
|
48670
|
+
* @author Alex Goldring
|
|
48670
48671
|
*/
|
|
48671
48672
|
|
|
48672
48673
|
/**
|
|
@@ -48674,12 +48675,12 @@ function SplatMaterial(
|
|
|
48674
48675
|
* @type {string[]}
|
|
48675
48676
|
*/
|
|
48676
48677
|
const lookup = [];
|
|
48678
|
+
|
|
48677
48679
|
/**
|
|
48678
48680
|
*
|
|
48679
48681
|
* @type {number[]}
|
|
48680
48682
|
*/
|
|
48681
48683
|
const revLookup = [];
|
|
48682
|
-
const Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;
|
|
48683
48684
|
|
|
48684
48685
|
const code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
48685
48686
|
|
|
@@ -48699,7 +48700,7 @@ revLookup['_'.charCodeAt(0)] = 63;
|
|
|
48699
48700
|
* @return {number[]}
|
|
48700
48701
|
*/
|
|
48701
48702
|
function getLens(b64) {
|
|
48702
|
-
|
|
48703
|
+
const len = b64.length;
|
|
48703
48704
|
|
|
48704
48705
|
if (len % 4 > 0) {
|
|
48705
48706
|
throw new Error('Invalid string. Length must be a multiple of 4');
|
|
@@ -48707,63 +48708,88 @@ function getLens(b64) {
|
|
|
48707
48708
|
|
|
48708
48709
|
// Trim off extra bytes after placeholder bytes are found
|
|
48709
48710
|
// See: https://github.com/beatgammit/base64-js/issues/42
|
|
48710
|
-
|
|
48711
|
+
let validLen = b64.indexOf('=');
|
|
48712
|
+
|
|
48711
48713
|
if (validLen === -1) {
|
|
48712
48714
|
validLen = len;
|
|
48713
48715
|
}
|
|
48714
48716
|
|
|
48715
|
-
|
|
48717
|
+
const placeHoldersLen = validLen === len
|
|
48716
48718
|
? 0
|
|
48717
48719
|
: 4 - (validLen % 4);
|
|
48718
48720
|
|
|
48719
48721
|
return [validLen, placeHoldersLen];
|
|
48720
48722
|
}
|
|
48721
48723
|
|
|
48722
|
-
|
|
48723
|
-
|
|
48724
|
-
|
|
48724
|
+
/**
|
|
48725
|
+
* base64 is 4/3 + up to two characters of the original data
|
|
48726
|
+
* @param {number} validLen
|
|
48727
|
+
* @param {number} placeHoldersLen
|
|
48728
|
+
*/
|
|
48729
|
+
function _byteLength(validLen, placeHoldersLen) {
|
|
48725
48730
|
return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen;
|
|
48726
48731
|
}
|
|
48727
48732
|
|
|
48733
|
+
/**
|
|
48734
|
+
*
|
|
48735
|
+
* @param {string} b64
|
|
48736
|
+
* @return {Uint8Array}
|
|
48737
|
+
*/
|
|
48728
48738
|
function toByteArray(b64) {
|
|
48729
|
-
|
|
48730
|
-
|
|
48731
|
-
|
|
48732
|
-
|
|
48739
|
+
let tmp;
|
|
48740
|
+
const lens = getLens(b64);
|
|
48741
|
+
const validLen = lens[0];
|
|
48742
|
+
const placeHoldersLen = lens[1];
|
|
48733
48743
|
|
|
48734
|
-
|
|
48744
|
+
const arr = new Uint8Array(_byteLength(validLen, placeHoldersLen));
|
|
48735
48745
|
|
|
48736
|
-
|
|
48746
|
+
let curByte = 0;
|
|
48737
48747
|
|
|
48738
48748
|
// if there are placeholders, only get up to the last complete 4 chars
|
|
48739
|
-
|
|
48749
|
+
const len = placeHoldersLen > 0
|
|
48740
48750
|
? validLen - 4
|
|
48741
48751
|
: validLen;
|
|
48742
48752
|
|
|
48743
|
-
|
|
48744
|
-
|
|
48753
|
+
let i = 0;
|
|
48754
|
+
|
|
48755
|
+
for (; i < len; i += 4) {
|
|
48756
|
+
const char_0 = b64.charCodeAt(i);
|
|
48757
|
+
const char_1 = b64.charCodeAt(i + 1);
|
|
48758
|
+
const char_2 = b64.charCodeAt(i + 2);
|
|
48759
|
+
const char_3 = b64.charCodeAt(i + 3);
|
|
48760
|
+
|
|
48745
48761
|
tmp =
|
|
48746
|
-
(revLookup[
|
|
48747
|
-
(revLookup[
|
|
48748
|
-
(revLookup[
|
|
48749
|
-
revLookup[
|
|
48762
|
+
(revLookup[char_0] << 18) |
|
|
48763
|
+
(revLookup[char_1] << 12) |
|
|
48764
|
+
(revLookup[char_2] << 6) |
|
|
48765
|
+
revLookup[char_3];
|
|
48766
|
+
|
|
48750
48767
|
arr[curByte++] = (tmp >> 16) & 0xFF;
|
|
48751
48768
|
arr[curByte++] = (tmp >> 8) & 0xFF;
|
|
48752
48769
|
arr[curByte++] = tmp & 0xFF;
|
|
48753
48770
|
}
|
|
48754
48771
|
|
|
48755
48772
|
if (placeHoldersLen === 2) {
|
|
48773
|
+
const char_0 = b64.charCodeAt(i);
|
|
48774
|
+
const char_1 = b64.charCodeAt(i + 1);
|
|
48775
|
+
|
|
48756
48776
|
tmp =
|
|
48757
|
-
(revLookup[
|
|
48758
|
-
(revLookup[
|
|
48777
|
+
(revLookup[char_0] << 2) |
|
|
48778
|
+
(revLookup[char_1] >> 4);
|
|
48779
|
+
|
|
48759
48780
|
arr[curByte++] = tmp & 0xFF;
|
|
48760
48781
|
}
|
|
48761
48782
|
|
|
48762
48783
|
if (placeHoldersLen === 1) {
|
|
48784
|
+
const char_0 = b64.charCodeAt(i);
|
|
48785
|
+
const char_1 = b64.charCodeAt(i + 1);
|
|
48786
|
+
const char_2 = b64.charCodeAt(i + 2);
|
|
48787
|
+
|
|
48763
48788
|
tmp =
|
|
48764
|
-
(revLookup[
|
|
48765
|
-
(revLookup[
|
|
48766
|
-
(revLookup[
|
|
48789
|
+
(revLookup[char_0] << 10) |
|
|
48790
|
+
(revLookup[char_1] << 4) |
|
|
48791
|
+
(revLookup[char_2] >> 2);
|
|
48792
|
+
|
|
48767
48793
|
arr[curByte++] = (tmp >> 8) & 0xFF;
|
|
48768
48794
|
arr[curByte++] = tmp & 0xFF;
|
|
48769
48795
|
}
|
|
@@ -48771,6 +48797,11 @@ function toByteArray(b64) {
|
|
|
48771
48797
|
return arr;
|
|
48772
48798
|
}
|
|
48773
48799
|
|
|
48800
|
+
/**
|
|
48801
|
+
*
|
|
48802
|
+
* @param {number} num
|
|
48803
|
+
* @return {string}
|
|
48804
|
+
*/
|
|
48774
48805
|
function tripletToBase64(num) {
|
|
48775
48806
|
return lookup[num >> 18 & 0x3F]
|
|
48776
48807
|
+ lookup[num >> 12 & 0x3F]
|
|
@@ -48801,24 +48832,29 @@ function encodeChunk(uint8, start, end) {
|
|
|
48801
48832
|
return output.join('');
|
|
48802
48833
|
}
|
|
48803
48834
|
|
|
48835
|
+
/**
|
|
48836
|
+
* must be multiple of 3
|
|
48837
|
+
*/
|
|
48838
|
+
const MAX_CHUNK_LENGTH = 16383;
|
|
48839
|
+
|
|
48804
48840
|
/**
|
|
48805
48841
|
*
|
|
48806
48842
|
* @param {Uint8Array} uint8
|
|
48807
48843
|
* @return {string}
|
|
48808
48844
|
*/
|
|
48809
48845
|
function fromByteArray(uint8) {
|
|
48810
|
-
let tmp;
|
|
48811
48846
|
|
|
48812
48847
|
const len = uint8.length;
|
|
48848
|
+
|
|
48813
48849
|
const extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes
|
|
48850
|
+
|
|
48814
48851
|
const parts = [];
|
|
48815
|
-
const maxChunkLength = 16383; // must be multiple of 3
|
|
48816
48852
|
|
|
48817
48853
|
// go through the array every three bytes, we'll deal with trailing stuff later
|
|
48818
48854
|
const len2 = len - extraBytes;
|
|
48819
48855
|
|
|
48820
|
-
for (let i = 0; i < len2; i +=
|
|
48821
|
-
const end = (i +
|
|
48856
|
+
for (let i = 0; i < len2; i += MAX_CHUNK_LENGTH) {
|
|
48857
|
+
const end = (i + MAX_CHUNK_LENGTH) > len2 ? len2 : (i + MAX_CHUNK_LENGTH);
|
|
48822
48858
|
|
|
48823
48859
|
const chunk = encodeChunk(uint8, i, end);
|
|
48824
48860
|
|
|
@@ -48827,20 +48863,26 @@ function fromByteArray(uint8) {
|
|
|
48827
48863
|
|
|
48828
48864
|
// pad the end with zeros, but make sure to not forget the extra bytes
|
|
48829
48865
|
if (extraBytes === 1) {
|
|
48830
|
-
|
|
48866
|
+
|
|
48867
|
+
const tmp = uint8[len - 1];
|
|
48868
|
+
|
|
48831
48869
|
parts.push(
|
|
48832
48870
|
lookup[tmp >> 2] +
|
|
48833
48871
|
lookup[(tmp << 4) & 0x3F] +
|
|
48834
48872
|
'=='
|
|
48835
48873
|
);
|
|
48874
|
+
|
|
48836
48875
|
} else if (extraBytes === 2) {
|
|
48837
|
-
|
|
48876
|
+
|
|
48877
|
+
const tmp = (uint8[len - 2] << 8) + uint8[len - 1];
|
|
48878
|
+
|
|
48838
48879
|
parts.push(
|
|
48839
48880
|
lookup[tmp >> 10] +
|
|
48840
48881
|
lookup[(tmp >> 4) & 0x3F] +
|
|
48841
48882
|
lookup[(tmp << 2) & 0x3F] +
|
|
48842
48883
|
'='
|
|
48843
48884
|
);
|
|
48885
|
+
|
|
48844
48886
|
}
|
|
48845
48887
|
|
|
48846
48888
|
return parts.join('');
|
|
@@ -50927,16 +50969,21 @@ function computeStringHash(string) {
|
|
|
50927
50969
|
|
|
50928
50970
|
const length = string.length;
|
|
50929
50971
|
|
|
50930
|
-
let hash =
|
|
50972
|
+
let hash = length;
|
|
50931
50973
|
|
|
50932
50974
|
for (let i = 0; i < length; i++) {
|
|
50933
|
-
const
|
|
50975
|
+
const code_point = string.charCodeAt(i);
|
|
50934
50976
|
|
|
50935
|
-
|
|
50977
|
+
/*
|
|
50978
|
+
* Avoiding potentially expensive multiplication operation by using 2 cheaper operation instead
|
|
50979
|
+
* (h<<5) - h === h*31
|
|
50980
|
+
*/
|
|
50981
|
+
hash = ((hash << 5) - hash) + code_point;
|
|
50936
50982
|
|
|
50937
50983
|
}
|
|
50938
50984
|
|
|
50939
|
-
|
|
50985
|
+
// force uint32
|
|
50986
|
+
return hash >>> 0;
|
|
50940
50987
|
}
|
|
50941
50988
|
|
|
50942
50989
|
/**
|
|
@@ -53279,11 +53326,12 @@ function min3(a, b, c) {
|
|
|
53279
53326
|
|
|
53280
53327
|
/**
|
|
53281
53328
|
* Convert a decimal value to hex
|
|
53282
|
-
* @param {number}
|
|
53329
|
+
* @param {number} x generally expects b byte value, 0-255
|
|
53283
53330
|
* @returns {string} zero-padded value, for example instead of "0", will return "00" and instead of "F" will return "0F"
|
|
53284
53331
|
*/
|
|
53285
|
-
function dec2hex(
|
|
53286
|
-
|
|
53332
|
+
function dec2hex(x) {
|
|
53333
|
+
|
|
53334
|
+
const hex = Math.round(x).toString(16);
|
|
53287
53335
|
return hex.length === 1 ? "0" + hex : hex;
|
|
53288
53336
|
}
|
|
53289
53337
|
|
|
@@ -59810,9 +59858,9 @@ function array_swap_one(array, index0, index1) {
|
|
|
59810
59858
|
}
|
|
59811
59859
|
|
|
59812
59860
|
/**
|
|
59813
|
-
*
|
|
59861
|
+
* @example `const my_array = new ( UintArrayForCount(x) )(length);`
|
|
59814
59862
|
* @param {number} max_value maximum value to be contained in the array
|
|
59815
|
-
* @returns {function} constructor
|
|
59863
|
+
* @returns {function} TypedArray constructor
|
|
59816
59864
|
*/
|
|
59817
59865
|
function UintArrayForCount(max_value) {
|
|
59818
59866
|
|
|
@@ -61308,7 +61356,7 @@ function objectsEqual(a, b) {
|
|
|
61308
61356
|
* @param {T[]} array
|
|
61309
61357
|
* @param {T} element
|
|
61310
61358
|
* @param {function(a:T,b:T):boolean} equals
|
|
61311
|
-
* @returns {number}
|
|
61359
|
+
* @returns {number} index of first match or -1 if no matches found
|
|
61312
61360
|
*/
|
|
61313
61361
|
function arrayIndexByEquality(array, element, equals) {
|
|
61314
61362
|
const n = array.length;
|
|
@@ -61386,17 +61434,19 @@ class List {
|
|
|
61386
61434
|
*/
|
|
61387
61435
|
on = {
|
|
61388
61436
|
/**
|
|
61437
|
+
* @readonly
|
|
61389
61438
|
* @type {Signal<T,number>}
|
|
61390
61439
|
*/
|
|
61391
61440
|
added: new Signal(),
|
|
61392
61441
|
/**
|
|
61442
|
+
* @readonly
|
|
61393
61443
|
* @type {Signal<T,number>}
|
|
61394
61444
|
*/
|
|
61395
61445
|
removed: new Signal()
|
|
61396
61446
|
};
|
|
61397
61447
|
|
|
61398
61448
|
/**
|
|
61399
|
-
*
|
|
61449
|
+
* @readonly
|
|
61400
61450
|
* @type {T[]}
|
|
61401
61451
|
*/
|
|
61402
61452
|
data = []
|
|
@@ -61463,6 +61513,7 @@ class List {
|
|
|
61463
61513
|
/**
|
|
61464
61514
|
*
|
|
61465
61515
|
* @param {T} el
|
|
61516
|
+
* @returns {this}
|
|
61466
61517
|
*/
|
|
61467
61518
|
add(el) {
|
|
61468
61519
|
this.data.push(el);
|
|
@@ -61480,7 +61531,7 @@ class List {
|
|
|
61480
61531
|
* Note that this operation is rather slow as it triggers a linear scan
|
|
61481
61532
|
* If the list gets large - consider using a {@link Set} class instead
|
|
61482
61533
|
* @param {T} el
|
|
61483
|
-
* @return {boolean}
|
|
61534
|
+
* @return {boolean} true if element was added, false if element already existed in the list
|
|
61484
61535
|
*/
|
|
61485
61536
|
addUnique(el) {
|
|
61486
61537
|
if (this.contains(el)) {
|
|
@@ -62247,7 +62298,9 @@ class List {
|
|
|
62247
62298
|
|
|
62248
62299
|
for (let i = 0; i < length; i++) {
|
|
62249
62300
|
const datum = this.data[i];
|
|
62301
|
+
|
|
62250
62302
|
const singleValue = datum.hash();
|
|
62303
|
+
|
|
62251
62304
|
hash = ((hash << 5) - hash) + singleValue;
|
|
62252
62305
|
hash |= 0; // Convert to 32bit integer
|
|
62253
62306
|
}
|
|
@@ -63178,12 +63231,24 @@ class Line {
|
|
|
63178
63231
|
*
|
|
63179
63232
|
* @param {string} text
|
|
63180
63233
|
* @param {number} indent
|
|
63181
|
-
* @constructor
|
|
63182
63234
|
*/
|
|
63183
63235
|
constructor(text, indent) {
|
|
63236
|
+
|
|
63237
|
+
/**
|
|
63238
|
+
*
|
|
63239
|
+
* @type {string}
|
|
63240
|
+
*/
|
|
63184
63241
|
this.text = text;
|
|
63242
|
+
/**
|
|
63243
|
+
*
|
|
63244
|
+
* @type {number}
|
|
63245
|
+
*/
|
|
63185
63246
|
this.indentation = indent;
|
|
63186
63247
|
}
|
|
63248
|
+
|
|
63249
|
+
toString() {
|
|
63250
|
+
return `Line{ indentation=${this.indentation}, text="${this.text}" }`
|
|
63251
|
+
}
|
|
63187
63252
|
}
|
|
63188
63253
|
|
|
63189
63254
|
const DEFAULT_INDENT_SPACES = 4;
|
|
@@ -63200,13 +63265,13 @@ class LineBuilder {
|
|
|
63200
63265
|
#lines = [];
|
|
63201
63266
|
|
|
63202
63267
|
/**
|
|
63203
|
-
*
|
|
63268
|
+
* Current indent level
|
|
63204
63269
|
* @type {number}
|
|
63205
63270
|
*/
|
|
63206
63271
|
#indentation = 0;
|
|
63207
63272
|
|
|
63208
63273
|
/**
|
|
63209
|
-
*
|
|
63274
|
+
* TODO replace with indent string, that is tab, space or any combination or something else entirely
|
|
63210
63275
|
* @type {number}
|
|
63211
63276
|
*/
|
|
63212
63277
|
indentSpaces = DEFAULT_INDENT_SPACES;
|
|
@@ -63225,8 +63290,10 @@ class LineBuilder {
|
|
|
63225
63290
|
* @param {string} term
|
|
63226
63291
|
*/
|
|
63227
63292
|
containsSubstring(term) {
|
|
63293
|
+
|
|
63228
63294
|
const lines = this.#lines;
|
|
63229
63295
|
const n = lines.length;
|
|
63296
|
+
|
|
63230
63297
|
for (let i = 0; i < n; i++) {
|
|
63231
63298
|
const line = lines[i];
|
|
63232
63299
|
|
|
@@ -63254,6 +63321,7 @@ class LineBuilder {
|
|
|
63254
63321
|
* @returns {LineBuilder}
|
|
63255
63322
|
*/
|
|
63256
63323
|
dedent() {
|
|
63324
|
+
|
|
63257
63325
|
this.#indentation--;
|
|
63258
63326
|
return this;
|
|
63259
63327
|
}
|
|
@@ -63324,14 +63392,15 @@ class LineBuilder {
|
|
|
63324
63392
|
}
|
|
63325
63393
|
|
|
63326
63394
|
/**
|
|
63327
|
-
*
|
|
63328
63395
|
* @param {string} text
|
|
63396
|
+
* @param {string} [line_separator] defaults to new-line character
|
|
63329
63397
|
* @returns {LineBuilder}
|
|
63330
63398
|
*/
|
|
63331
|
-
static fromText(text) {
|
|
63399
|
+
static fromText(text, line_separator = '\n') {
|
|
63400
|
+
|
|
63332
63401
|
const r = new LineBuilder();
|
|
63333
63402
|
|
|
63334
|
-
const lines = text.split(
|
|
63403
|
+
const lines = text.split(line_separator);
|
|
63335
63404
|
|
|
63336
63405
|
const n = lines.length;
|
|
63337
63406
|
|
|
@@ -63347,6 +63416,10 @@ class LineBuilder {
|
|
|
63347
63416
|
|
|
63348
63417
|
return r;
|
|
63349
63418
|
}
|
|
63419
|
+
|
|
63420
|
+
toString() {
|
|
63421
|
+
return this.build();
|
|
63422
|
+
}
|
|
63350
63423
|
}
|
|
63351
63424
|
|
|
63352
63425
|
/**
|
|
@@ -63907,6 +63980,7 @@ class OffsetScaleTransform2D {
|
|
|
63907
63980
|
* @return {boolean}
|
|
63908
63981
|
*/
|
|
63909
63982
|
function array_push_if_unique(array, element) {
|
|
63983
|
+
|
|
63910
63984
|
const i = array.indexOf(element);
|
|
63911
63985
|
|
|
63912
63986
|
if (i === -1) {
|
|
@@ -69152,7 +69226,8 @@ class ResourceAccessSpecification {
|
|
|
69152
69226
|
* @param {number|ResourceAccessKind} access
|
|
69153
69227
|
* @returns {ResourceAccessSpecification<R>}
|
|
69154
69228
|
*/
|
|
69155
|
-
static from(resource, access = DEFAULT_ACCESS){
|
|
69229
|
+
static from(resource, access = DEFAULT_ACCESS) {
|
|
69230
|
+
|
|
69156
69231
|
const r = new ResourceAccessSpecification();
|
|
69157
69232
|
|
|
69158
69233
|
r.access = access;
|
|
@@ -70804,11 +70879,12 @@ const EntityFlags = {
|
|
|
70804
70879
|
|
|
70805
70880
|
/**
|
|
70806
70881
|
* Align to the nearest number divisible by 32, rounding up
|
|
70807
|
-
* @param {number}
|
|
70882
|
+
* @param {number} x must be a non-negative integer
|
|
70808
70883
|
* @returns {number}
|
|
70809
70884
|
*/
|
|
70810
|
-
function align_32(
|
|
70811
|
-
|
|
70885
|
+
function align_32(x) {
|
|
70886
|
+
|
|
70887
|
+
return ((x + 31) >>> 5) << 5
|
|
70812
70888
|
}
|
|
70813
70889
|
|
|
70814
70890
|
/**
|
|
@@ -71163,22 +71239,20 @@ class BitSet {
|
|
|
71163
71239
|
|
|
71164
71240
|
/**
|
|
71165
71241
|
*
|
|
71166
|
-
* @param {int}
|
|
71242
|
+
* @param {int} bit_index
|
|
71167
71243
|
* @param {boolean} value
|
|
71168
71244
|
*/
|
|
71169
|
-
set(
|
|
71170
|
-
//assert.ok(typeof bitIndex, 'number', `bitIndex must be a number, instead was '${typeof bitIndex}'`);
|
|
71171
|
-
//assert.ok(typeof value, 'boolean', `value must be a boolean, instead was '${typeof bitIndex}'`);
|
|
71245
|
+
set(bit_index, value) {
|
|
71172
71246
|
|
|
71173
|
-
const word_offset =
|
|
71174
|
-
const bit_offset =
|
|
71247
|
+
const word_offset = bit_index >> 5;
|
|
71248
|
+
const bit_offset = bit_index & 31;
|
|
71175
71249
|
|
|
71176
71250
|
//const oldLength = this.__length;
|
|
71177
71251
|
|
|
71178
71252
|
const word_mask = 1 << bit_offset;
|
|
71179
71253
|
|
|
71180
71254
|
if (value) {
|
|
71181
|
-
const bitIndexInc =
|
|
71255
|
+
const bitIndexInc = bit_index + 1;
|
|
71182
71256
|
|
|
71183
71257
|
if (bitIndexInc > this.__length) {
|
|
71184
71258
|
// ensure capacity
|
|
@@ -71189,7 +71263,7 @@ class BitSet {
|
|
|
71189
71263
|
this.__data_uint32[word_offset] |= word_mask;
|
|
71190
71264
|
|
|
71191
71265
|
|
|
71192
|
-
} else if (
|
|
71266
|
+
} else if (bit_index < this.__length) {
|
|
71193
71267
|
//clear
|
|
71194
71268
|
this.__data_uint32[word_offset] &= ~word_mask;
|
|
71195
71269
|
|
|
@@ -83652,44 +83726,48 @@ class Localization {
|
|
|
83652
83726
|
}
|
|
83653
83727
|
}
|
|
83654
83728
|
|
|
83729
|
+
/**
|
|
83730
|
+
* @template T
|
|
83731
|
+
*/
|
|
83655
83732
|
class ModuleRegistry {
|
|
83656
83733
|
|
|
83657
83734
|
/**
|
|
83658
83735
|
*
|
|
83659
|
-
* @type {Map<string,
|
|
83736
|
+
* @type {Map<string, T>}
|
|
83660
83737
|
*/
|
|
83661
83738
|
#modules = new Map();
|
|
83662
83739
|
/**
|
|
83663
83740
|
*
|
|
83664
|
-
* @type {Map
|
|
83741
|
+
* @type {Map<T,Array<string>>}
|
|
83665
83742
|
*/
|
|
83666
83743
|
#reverse_lookup = new Map();
|
|
83667
83744
|
|
|
83668
|
-
|
|
83669
|
-
|
|
83670
|
-
|
|
83671
|
-
|
|
83672
|
-
|
|
83673
|
-
|
|
83674
|
-
|
|
83675
|
-
|
|
83676
|
-
|
|
83677
|
-
|
|
83678
|
-
|
|
83679
|
-
|
|
83680
|
-
|
|
83681
|
-
|
|
83682
|
-
throw new Error(`Module '${p}' not found in the registry`);
|
|
83683
|
-
}
|
|
83745
|
+
/**
|
|
83746
|
+
* @readonly
|
|
83747
|
+
* @type {ModuleRegistry}
|
|
83748
|
+
*/
|
|
83749
|
+
proxy = new Proxy(this, {
|
|
83750
|
+
/**
|
|
83751
|
+
*
|
|
83752
|
+
* @param target
|
|
83753
|
+
* @param {string} p
|
|
83754
|
+
* @param receiver
|
|
83755
|
+
* @returns {Class}
|
|
83756
|
+
*/
|
|
83757
|
+
get(target, p, receiver) {
|
|
83758
|
+
const module = target.get(p);
|
|
83684
83759
|
|
|
83685
|
-
|
|
83760
|
+
if (module === undefined) {
|
|
83761
|
+
throw new Error(`Module '${p}' not found in the registry`);
|
|
83686
83762
|
}
|
|
83687
|
-
|
|
83688
|
-
|
|
83763
|
+
|
|
83764
|
+
return module;
|
|
83765
|
+
}
|
|
83766
|
+
});
|
|
83689
83767
|
|
|
83690
83768
|
/**
|
|
83691
83769
|
*
|
|
83692
|
-
* @param {function(name:string,module
|
|
83770
|
+
* @param {function(name:string,module:T):void} visitor
|
|
83693
83771
|
*/
|
|
83694
83772
|
traverse(visitor) {
|
|
83695
83773
|
this.#modules.forEach((klass, name) => visitor(name, klass));
|
|
@@ -83697,9 +83775,9 @@ class ModuleRegistry {
|
|
|
83697
83775
|
|
|
83698
83776
|
|
|
83699
83777
|
/**
|
|
83700
|
-
* @template T
|
|
83778
|
+
* @template {T} M
|
|
83701
83779
|
* @param {String} name
|
|
83702
|
-
* @returns {
|
|
83780
|
+
* @returns {M}
|
|
83703
83781
|
*/
|
|
83704
83782
|
get(name) {
|
|
83705
83783
|
return this.#modules.get(name);
|
|
@@ -83715,9 +83793,9 @@ class ModuleRegistry {
|
|
|
83715
83793
|
}
|
|
83716
83794
|
|
|
83717
83795
|
/**
|
|
83718
|
-
* @template T
|
|
83796
|
+
* @template {T} M
|
|
83719
83797
|
* @param {string} name
|
|
83720
|
-
* @param {
|
|
83798
|
+
* @param {M} module
|
|
83721
83799
|
* @returns {boolean}
|
|
83722
83800
|
*/
|
|
83723
83801
|
add(name, module) {
|
|
@@ -83745,8 +83823,8 @@ class ModuleRegistry {
|
|
|
83745
83823
|
|
|
83746
83824
|
/**
|
|
83747
83825
|
* Find all names associated with the given module
|
|
83748
|
-
* @template T
|
|
83749
|
-
* @param {
|
|
83826
|
+
* @template {T} M
|
|
83827
|
+
* @param {M} module
|
|
83750
83828
|
* @returns {string[]}
|
|
83751
83829
|
* @throws if module is not registered
|
|
83752
83830
|
*/
|
|
@@ -97454,6 +97532,13 @@ class SimpleLifecycle {
|
|
|
97454
97532
|
}
|
|
97455
97533
|
|
|
97456
97534
|
class LinearValue {
|
|
97535
|
+
|
|
97536
|
+
/**
|
|
97537
|
+
* @readonly
|
|
97538
|
+
* @type {Signal}
|
|
97539
|
+
*/
|
|
97540
|
+
onChanged = new Signal();
|
|
97541
|
+
|
|
97457
97542
|
/**
|
|
97458
97543
|
*
|
|
97459
97544
|
* @param {number} [x = 0]
|
|
@@ -97461,24 +97546,24 @@ class LinearValue {
|
|
|
97461
97546
|
* @param {number} [b = 1]
|
|
97462
97547
|
* @constructor
|
|
97463
97548
|
*/
|
|
97464
|
-
constructor(x, a, b) {
|
|
97549
|
+
constructor(x = 0, a = 0, b = 1) {
|
|
97550
|
+
|
|
97465
97551
|
/**
|
|
97466
97552
|
*
|
|
97467
97553
|
* @type {number}
|
|
97468
97554
|
*/
|
|
97469
|
-
this.x = x
|
|
97555
|
+
this.x = x;
|
|
97470
97556
|
/**
|
|
97471
97557
|
*
|
|
97472
97558
|
* @type {number}
|
|
97473
97559
|
*/
|
|
97474
|
-
this.a = a
|
|
97560
|
+
this.a = a;
|
|
97475
97561
|
/**
|
|
97476
97562
|
*
|
|
97477
97563
|
* @type {number}
|
|
97478
97564
|
*/
|
|
97479
|
-
this.b = b
|
|
97565
|
+
this.b = b;
|
|
97480
97566
|
|
|
97481
|
-
this.onChanged = new Signal();
|
|
97482
97567
|
}
|
|
97483
97568
|
|
|
97484
97569
|
/**
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Base64.d.ts","sourceRoot":"","sources":["../../../../src/core/binary/Base64.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Base64.d.ts","sourceRoot":"","sources":["../../../../src/core/binary/Base64.js"],"names":[],"mappings":"AAgOA;IACI;;;;OAIG;IACH,qBAHW,WAAW,GACT,MAAM,CAOlB;IAED;;;;OAIG;IACH,qBAHW,MAAM,GACJ,WAAW,CAUvB;CACJ"}
|