@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/list/List.js"],"names":[],"mappings":";AAaA;;;;GAIG;AACH;
|
|
1
|
+
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/list/List.js"],"names":[],"mappings":"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"}
|
|
@@ -22,17 +22,19 @@ class List {
|
|
|
22
22
|
*/
|
|
23
23
|
on = {
|
|
24
24
|
/**
|
|
25
|
+
* @readonly
|
|
25
26
|
* @type {Signal<T,number>}
|
|
26
27
|
*/
|
|
27
28
|
added: new Signal(),
|
|
28
29
|
/**
|
|
30
|
+
* @readonly
|
|
29
31
|
* @type {Signal<T,number>}
|
|
30
32
|
*/
|
|
31
33
|
removed: new Signal()
|
|
32
34
|
};
|
|
33
35
|
|
|
34
36
|
/**
|
|
35
|
-
*
|
|
37
|
+
* @readonly
|
|
36
38
|
* @type {T[]}
|
|
37
39
|
*/
|
|
38
40
|
data = []
|
|
@@ -106,6 +108,7 @@ class List {
|
|
|
106
108
|
/**
|
|
107
109
|
*
|
|
108
110
|
* @param {T} el
|
|
111
|
+
* @returns {this}
|
|
109
112
|
*/
|
|
110
113
|
add(el) {
|
|
111
114
|
this.data.push(el);
|
|
@@ -123,7 +126,7 @@ class List {
|
|
|
123
126
|
* Note that this operation is rather slow as it triggers a linear scan
|
|
124
127
|
* If the list gets large - consider using a {@link Set} class instead
|
|
125
128
|
* @param {T} el
|
|
126
|
-
* @return {boolean}
|
|
129
|
+
* @return {boolean} true if element was added, false if element already existed in the list
|
|
127
130
|
*/
|
|
128
131
|
addUnique(el) {
|
|
129
132
|
if (this.contains(el)) {
|
|
@@ -904,7 +907,9 @@ class List {
|
|
|
904
907
|
|
|
905
908
|
for (let i = 0; i < length; i++) {
|
|
906
909
|
const datum = this.data[i];
|
|
910
|
+
|
|
907
911
|
const singleValue = datum.hash();
|
|
912
|
+
|
|
908
913
|
hash = ((hash << 5) - hash) + singleValue;
|
|
909
914
|
hash |= 0; // Convert to 32bit integer
|
|
910
915
|
}
|
|
@@ -14,21 +14,11 @@ export class RowFirstTable {
|
|
|
14
14
|
* @type {RowFirstTableSpec}
|
|
15
15
|
*/
|
|
16
16
|
spec: RowFirstTableSpec;
|
|
17
|
-
/**
|
|
18
|
-
* @readonly
|
|
19
|
-
* @type {Array.<BinaryDataType>}
|
|
20
|
-
*/
|
|
21
|
-
readonly types: Array<BinaryDataType>;
|
|
22
17
|
/**
|
|
23
18
|
*
|
|
24
19
|
* @type {ArrayBuffer}
|
|
25
20
|
*/
|
|
26
21
|
data: ArrayBuffer;
|
|
27
|
-
/**
|
|
28
|
-
*
|
|
29
|
-
* @type {number}
|
|
30
|
-
*/
|
|
31
|
-
bytesPerRecord: number;
|
|
32
22
|
/**
|
|
33
23
|
* number of records
|
|
34
24
|
* @type {number}
|
|
@@ -47,6 +37,16 @@ export class RowFirstTable {
|
|
|
47
37
|
on: {
|
|
48
38
|
added: Signal<any, any, any, any, any, any, any, any>;
|
|
49
39
|
};
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated access directly via spec instead
|
|
42
|
+
* @return {BinaryDataType[]}
|
|
43
|
+
*/
|
|
44
|
+
get types(): BinaryDataType[];
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated access {@link RowFirstTableSpec#bytesPerRecord} directly instead
|
|
47
|
+
* @return {number}
|
|
48
|
+
*/
|
|
49
|
+
get bytesPerRecord(): number;
|
|
50
50
|
/**
|
|
51
51
|
* @private
|
|
52
52
|
*/
|
|
@@ -163,8 +163,8 @@ export class RowFirstTable {
|
|
|
163
163
|
*/
|
|
164
164
|
clear(): void;
|
|
165
165
|
/**
|
|
166
|
-
*
|
|
167
|
-
* @returns {
|
|
166
|
+
* @deprecated access {@link RowFirstTableSpec#getColumnCount} from spec instead
|
|
167
|
+
* @returns {number}
|
|
168
168
|
*/
|
|
169
169
|
getNumColumns(): number;
|
|
170
170
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RowFirstTable.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/table/RowFirstTable.js"],"names":[],"mappings":"AAMA;;GAEG;AACH;IACI;;;;;OAKG;IACH,oDAHW,OAAO,
|
|
1
|
+
{"version":3,"file":"RowFirstTable.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/table/RowFirstTable.js"],"names":[],"mappings":"AAMA;;GAEG;AACH;IACI;;;;;OAKG;IACH,oDAHW,OAAO,EA2CjB;IAnCG;;;OAGG;IACH,wBAAgB;IAEhB;;;OAGG;IACH,MAFU,WAAW,CAEuB;IAE5C;;;OAGG;IACH,QAFU,MAAM,CAED;IAEf;;;OAGG;IACH,UAFU,MAAM,CAEC;IAEjB;;;OAGG;IACH,UAFU,QAAQ,CAEE;IAEpB;;MAEC;IAKL;;;OAGG;IACH,8BAEC;IAED;;;OAGG;IACH,6BAEC;IAED;;OAEG;IACH,mBAcC;IAXG;;;OAGG;IACH,sBAFmB,QAAQ,QAAE,MAAM,QAAE,MAAM,EAAE,KAAG,IAAI,CAEb;IAEvC;;;OAGG;IACH,uBAFmB,QAAQ,QAAE,MAAM,QAAE,MAAM,EAAE,KAAG,IAAI,CAEX;IAG7C;;;;OAIG;IACH,uDAMC;IAED;;;OAGG;IACH,QAFa,MAAM,CA4BlB;IAED;;;OAGG;IACH,sBAFW,MAAM,QA+ChB;IAED;;OAEG;IACH,aAEC;IAED;;;OAGG;IACH,iBAFW,MAAM,QAchB;IAED;;;;;OAKG;IACH,yBAJW,MAAM,eACN,MAAM,SACN,MAAM,QAchB;IAED;;;;;OAKG;IACH,wBAJW,MAAM,eACN,MAAM,GACJ,MAAM,CAclB;IAED;;;;OAIG;IACH,kBAHW,MAAM,YACN,MAAM,QAyBhB;IAED;;;;;OAKG;IACH,kBAHW,MAAM,YACN,MAAM,QAqBhB;IAED;;;;OAIG;IACH,eAHW,MAAO,MAAM,CAAC,GACZ,MAAM,CAiBlB;IAED;;;;OAIG;IACH,eAHW,MAAM,4BAsChB;IAED;;;;OAIG;IACH,gBAHW,MAAM,UACN,MAAM,QAwBhB;IAED;;;;OAIG;IACH,YAFW,aAAa,QAsBvB;IAED;;;OAGG;IACH,cAHW,aAAa,GACX,OAAO,CAyBnB;IAED;;;;OAIG;IACH,wCAIC;IAED;;;;OAIG;IACH,cAHW,MAAM,UACN,MAAM,EAAE,QAMlB;IAED;;OAEG;IACH,qBA4BC;IAED;;OAEG;IACH,cAIC;IAED;;;OAGG;IACH,iBAFa,MAAM,CAIlB;IAED;;;OAGG;IACH,cAFa,MAAM,EAAE,EAAE,CAgBtB;IAED;;OAEG;IACH,uBAIC;CACJ;mBA9iBkB,+BAA+B"}
|
|
@@ -25,24 +25,12 @@ export class RowFirstTable {
|
|
|
25
25
|
*/
|
|
26
26
|
this.spec = spec;
|
|
27
27
|
|
|
28
|
-
/**
|
|
29
|
-
* @readonly
|
|
30
|
-
* @type {Array.<BinaryDataType>}
|
|
31
|
-
*/
|
|
32
|
-
this.types = spec.types;
|
|
33
|
-
|
|
34
28
|
/**
|
|
35
29
|
*
|
|
36
30
|
* @type {ArrayBuffer}
|
|
37
31
|
*/
|
|
38
32
|
this.data = makeArrayBuffer(0, shared_array);
|
|
39
33
|
|
|
40
|
-
/**
|
|
41
|
-
*
|
|
42
|
-
* @type {number}
|
|
43
|
-
*/
|
|
44
|
-
this.bytesPerRecord = spec.bytesPerRecord;
|
|
45
|
-
|
|
46
34
|
/**
|
|
47
35
|
* number of records
|
|
48
36
|
* @type {number}
|
|
@@ -68,15 +56,28 @@ export class RowFirstTable {
|
|
|
68
56
|
this.initialize();
|
|
69
57
|
}
|
|
70
58
|
|
|
59
|
+
/**
|
|
60
|
+
* @deprecated access directly via spec instead
|
|
61
|
+
* @return {BinaryDataType[]}
|
|
62
|
+
*/
|
|
63
|
+
get types() {
|
|
64
|
+
return this.spec.types;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @deprecated access {@link RowFirstTableSpec#bytesPerRecord} directly instead
|
|
69
|
+
* @return {number}
|
|
70
|
+
*/
|
|
71
|
+
get bytesPerRecord() {
|
|
72
|
+
return this.spec.bytesPerRecord;
|
|
73
|
+
}
|
|
74
|
+
|
|
71
75
|
/**
|
|
72
76
|
* @private
|
|
73
77
|
*/
|
|
74
78
|
initialize() {
|
|
75
79
|
const spec = this.spec;
|
|
76
80
|
|
|
77
|
-
this.types = spec.types;
|
|
78
|
-
this.bytesPerRecord = spec.bytesPerRecord;
|
|
79
|
-
|
|
80
81
|
/**
|
|
81
82
|
*
|
|
82
83
|
* @type {function(DataView, number, number[]): void}
|
|
@@ -150,7 +151,7 @@ export class RowFirstTable {
|
|
|
150
151
|
|
|
151
152
|
const oldData = this.data;
|
|
152
153
|
|
|
153
|
-
const bytesPerRecord = this.bytesPerRecord;
|
|
154
|
+
const bytesPerRecord = this.spec.bytesPerRecord;
|
|
154
155
|
const byteSize = rowCount * bytesPerRecord;
|
|
155
156
|
|
|
156
157
|
try {
|
|
@@ -218,11 +219,11 @@ export class RowFirstTable {
|
|
|
218
219
|
* @param {number} value
|
|
219
220
|
*/
|
|
220
221
|
writeCellValue(rowIndex, columnIndex, value) {
|
|
221
|
-
const
|
|
222
|
+
const spec = this.spec;
|
|
222
223
|
|
|
223
|
-
const
|
|
224
|
+
const bytesPerRecord = spec.bytesPerRecord;
|
|
224
225
|
|
|
225
|
-
const
|
|
226
|
+
const rowAddress = rowIndex * bytesPerRecord;
|
|
226
227
|
|
|
227
228
|
const cellWriters = spec.cellWriters;
|
|
228
229
|
|
|
@@ -238,11 +239,11 @@ export class RowFirstTable {
|
|
|
238
239
|
* @returns {number}
|
|
239
240
|
*/
|
|
240
241
|
readCellValue(rowIndex, columnIndex) {
|
|
241
|
-
const
|
|
242
|
+
const spec = this.spec;
|
|
242
243
|
|
|
243
|
-
const
|
|
244
|
+
const bytesPerRecord = spec.bytesPerRecord;
|
|
244
245
|
|
|
245
|
-
const
|
|
246
|
+
const rowAddress = rowIndex * bytesPerRecord;
|
|
246
247
|
|
|
247
248
|
const cellReaders = spec.cellReaders;
|
|
248
249
|
|
|
@@ -265,7 +266,7 @@ export class RowFirstTable {
|
|
|
265
266
|
|
|
266
267
|
const array = new Uint8Array(data);
|
|
267
268
|
|
|
268
|
-
const bytesPerRecord = this.bytesPerRecord;
|
|
269
|
+
const bytesPerRecord = this.spec.bytesPerRecord;
|
|
269
270
|
|
|
270
271
|
//shift tail of the table forward
|
|
271
272
|
const target = index * bytesPerRecord;
|
|
@@ -294,7 +295,7 @@ export class RowFirstTable {
|
|
|
294
295
|
|
|
295
296
|
const data = this.data;
|
|
296
297
|
|
|
297
|
-
const bytesPerRecord = this.bytesPerRecord;
|
|
298
|
+
const bytesPerRecord = this.spec.bytesPerRecord;
|
|
298
299
|
|
|
299
300
|
const array = new Uint8Array(data);
|
|
300
301
|
|
|
@@ -323,7 +324,7 @@ export class RowFirstTable {
|
|
|
323
324
|
|
|
324
325
|
this.length = newRowCount;
|
|
325
326
|
|
|
326
|
-
this.writeRowMethod(this.dataView, this.bytesPerRecord * rowIndex, values);
|
|
327
|
+
this.writeRowMethod(this.dataView, this.spec.bytesPerRecord * rowIndex, values);
|
|
327
328
|
|
|
328
329
|
this.on.added.send2(rowIndex, values);
|
|
329
330
|
|
|
@@ -343,9 +344,11 @@ export class RowFirstTable {
|
|
|
343
344
|
let i = this.length;
|
|
344
345
|
this.length = newRowCount;
|
|
345
346
|
|
|
346
|
-
const
|
|
347
|
+
const spec = this.spec;
|
|
347
348
|
|
|
348
|
-
const
|
|
349
|
+
const row = new Array(spec.getColumnCount());
|
|
350
|
+
|
|
351
|
+
const bytesPerRecord = spec.bytesPerRecord;
|
|
349
352
|
const dataView = this.dataView;
|
|
350
353
|
const writeRowMethod = this.writeRowMethod;
|
|
351
354
|
|
|
@@ -385,7 +388,7 @@ export class RowFirstTable {
|
|
|
385
388
|
}
|
|
386
389
|
|
|
387
390
|
// figure out addresses
|
|
388
|
-
const bytes_per_record = this.bytesPerRecord;
|
|
391
|
+
const bytes_per_record = this.spec.bytesPerRecord;
|
|
389
392
|
|
|
390
393
|
const source_address = source * bytes_per_record;
|
|
391
394
|
const target_address = target * bytes_per_record;
|
|
@@ -420,7 +423,7 @@ export class RowFirstTable {
|
|
|
420
423
|
const source = new Uint8Array(other.data);
|
|
421
424
|
|
|
422
425
|
// copy data
|
|
423
|
-
const data_byte_count = other.bytesPerRecord * record_count;
|
|
426
|
+
const data_byte_count = other.spec.bytesPerRecord * record_count;
|
|
424
427
|
target.set(source.slice(0, data_byte_count));
|
|
425
428
|
|
|
426
429
|
// TODO consider if we should invoke onAdded signal
|
|
@@ -441,7 +444,7 @@ export class RowFirstTable {
|
|
|
441
444
|
return false;
|
|
442
445
|
}
|
|
443
446
|
|
|
444
|
-
const total_bytes = this_length * this.bytesPerRecord;
|
|
447
|
+
const total_bytes = this_length * this.spec.bytesPerRecord;
|
|
445
448
|
|
|
446
449
|
for (let i = 0; i < total_bytes; i++) {
|
|
447
450
|
const a = this.dataView.getUint8(i);
|
|
@@ -463,7 +466,7 @@ export class RowFirstTable {
|
|
|
463
466
|
getRow(index, result) {
|
|
464
467
|
assert.isNonNegativeInteger(index, 'index');
|
|
465
468
|
|
|
466
|
-
this.readRowMethod(this.dataView, this.bytesPerRecord * index, result);
|
|
469
|
+
this.readRowMethod(this.dataView, this.spec.bytesPerRecord * index, result);
|
|
467
470
|
}
|
|
468
471
|
|
|
469
472
|
/**
|
|
@@ -474,14 +477,14 @@ export class RowFirstTable {
|
|
|
474
477
|
setRow(index, record) {
|
|
475
478
|
assert.isNonNegativeInteger(index, 'index');
|
|
476
479
|
|
|
477
|
-
this.writeRowMethod(this.dataView, this.bytesPerRecord * index, record);
|
|
480
|
+
this.writeRowMethod(this.dataView, this.spec.bytesPerRecord * index, record);
|
|
478
481
|
}
|
|
479
482
|
|
|
480
483
|
/**
|
|
481
484
|
* Reverse order of rows, row-0 will end up at and previously last row will become the first row etc.
|
|
482
485
|
*/
|
|
483
486
|
reverse_rows() {
|
|
484
|
-
const bpr = this.bytesPerRecord;
|
|
487
|
+
const bpr = this.spec.bytesPerRecord;
|
|
485
488
|
const copy_buffer = new Uint8Array(bpr);
|
|
486
489
|
|
|
487
490
|
const buffer = this.data;
|
|
@@ -520,11 +523,11 @@ export class RowFirstTable {
|
|
|
520
523
|
}
|
|
521
524
|
|
|
522
525
|
/**
|
|
523
|
-
*
|
|
524
|
-
* @returns {
|
|
526
|
+
* @deprecated access {@link RowFirstTableSpec#getColumnCount} from spec instead
|
|
527
|
+
* @returns {number}
|
|
525
528
|
*/
|
|
526
529
|
getNumColumns() {
|
|
527
|
-
return this.
|
|
530
|
+
return this.spec.getColumnCount();
|
|
528
531
|
}
|
|
529
532
|
|
|
530
533
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RowFirstTableSpec.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/table/RowFirstTableSpec.js"],"names":[],"mappings":"AA+HA;;;GAGG;AACH;
|
|
1
|
+
{"version":3,"file":"RowFirstTableSpec.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/table/RowFirstTableSpec.js"],"names":[],"mappings":"AA+HA;;;GAGG;AACH;IA6GI;;;;;OAKG;IACH,kBAJW,cAAc,EAAE,eAChB,UAAU,GACR,iBAAiB,CAmB7B;IAnID;;;;;OAKG;IACH,mBAJW,cAAc,EAAE,eAChB,UAAU,EAsEpB;IA7DG;;;OAGG;IACH,gBAFU,cAAc,EAAE,CAER;IAElB;;;OAGG;IACH,qBAFU,UAAU,CAEQ;IAE5B;;;OAGG;IACH,wBAFU,WAAW,CAEyB;IAiB9C;;;;OAIG;IACH,yBAFU,MAAM,CAEgB;IAEhC;;;OAGG;IACH,+BAFmB,QAAQ,QAAE,MAAM,QAAE,MAAM,EAAE,KAAG,IAAI,CAEA;IAEpD;;;OAGG;IACH,gCAFmB,QAAQ,QAAE,MAAM,QAAE,MAAM,EAAE,KAAG,IAAI,CAEC;IAIrD,mBAAsC;IACtC,mBAAsC;IAQ1C;;;OAGG;IACH,kBAFY,MAAM,CAIjB;IAED;;;OAGG;IACH,QAFY,MAAM,CAQjB;IAED;;;;OAIG;IACH,cAHW,iBAAiB,GACf,OAAO,CAQnB;IA4BL;;;OAGG;IACH,8BAFU,OAAO,CAE8B;CAN9C;+BAhQ8B,qCAAqC;2BADzC,4BAA4B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serializeRowFirstTable.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/table/serializeRowFirstTable.js"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,
|
|
1
|
+
{"version":3,"file":"serializeRowFirstTable.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/table/serializeRowFirstTable.js"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,yFAmBC"}
|
|
@@ -6,21 +6,23 @@ import { DataTypeIndices } from "../../binary/type/DataTypeIndices.js";
|
|
|
6
6
|
* @param {RowFirstTable} table
|
|
7
7
|
*/
|
|
8
8
|
function serializeRowFirstTable(buffer, table) {
|
|
9
|
+
const spec = table.spec;
|
|
10
|
+
|
|
9
11
|
//write types
|
|
10
|
-
buffer.writeUint16(
|
|
11
|
-
|
|
12
|
+
buffer.writeUint16(spec.types.length);
|
|
13
|
+
spec.types.forEach(function (type) {
|
|
12
14
|
const typeIndex = DataTypeIndices[type];
|
|
13
15
|
buffer.writeUint8(typeIndex);
|
|
14
16
|
});
|
|
15
17
|
|
|
16
18
|
//write record length
|
|
17
|
-
buffer.writeUint32(
|
|
19
|
+
buffer.writeUint32(spec.bytesPerRecord);
|
|
18
20
|
|
|
19
21
|
//write number of records
|
|
20
22
|
buffer.writeUint32(table.length);
|
|
21
23
|
|
|
22
24
|
//write data
|
|
23
|
-
const numDataBytes = table.length *
|
|
25
|
+
const numDataBytes = table.length * spec.bytesPerRecord;
|
|
24
26
|
buffer.writeBytes(new Uint8Array(table.data), 0, numDataBytes);
|
|
25
27
|
}
|
|
26
28
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isPowerOfTwo.d.ts","sourceRoot":"","sources":["../../../../src/core/math/isPowerOfTwo.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,oCAHW,MAAM,GACJ,OAAO,
|
|
1
|
+
{"version":3,"file":"isPowerOfTwo.d.ts","sourceRoot":"","sources":["../../../../src/core/math/isPowerOfTwo.js"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,oCAHW,MAAM,GACJ,OAAO,CAMnB"}
|
|
@@ -3,14 +3,12 @@ import { assert } from "../assert.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* Is the number a power of two?
|
|
5
5
|
* e.g. 2,4,8,16 etc.
|
|
6
|
-
* NOTE: only valid for non-negative integers
|
|
6
|
+
* NOTE: only valid for non-negative integers, includes 0
|
|
7
7
|
* @param {number} value
|
|
8
8
|
* @returns {boolean}
|
|
9
9
|
*/
|
|
10
10
|
export function isPowerOfTwo(value) {
|
|
11
11
|
assert.isNonNegativeInteger(value, 'value');
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
return (value & (value - 1)) === 0 && value !== 0;
|
|
15
|
-
|
|
13
|
+
return (value & (value - 1)) === 0;
|
|
16
14
|
}
|
|
@@ -8,6 +8,11 @@ declare class LinearValue {
|
|
|
8
8
|
* @constructor
|
|
9
9
|
*/
|
|
10
10
|
constructor(x?: number, a?: number, b?: number);
|
|
11
|
+
/**
|
|
12
|
+
* @readonly
|
|
13
|
+
* @type {Signal}
|
|
14
|
+
*/
|
|
15
|
+
readonly onChanged: Signal;
|
|
11
16
|
/**
|
|
12
17
|
*
|
|
13
18
|
* @type {number}
|
|
@@ -23,7 +28,6 @@ declare class LinearValue {
|
|
|
23
28
|
* @type {number}
|
|
24
29
|
*/
|
|
25
30
|
b: number;
|
|
26
|
-
onChanged: Signal<any, any, any, any, any, any, any, any>;
|
|
27
31
|
/**
|
|
28
32
|
*
|
|
29
33
|
* @param {LinearValue} other
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinearValue.d.ts","sourceRoot":"","sources":["../../../../src/core/model/LinearValue.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"LinearValue.d.ts","sourceRoot":"","sources":["../../../../src/core/model/LinearValue.js"],"names":[],"mappings":";AAGA;IAQI;;;;;;OAMG;IACH,gBALW,MAAM,MACN,MAAM,MACN,MAAM,EAwBhB;IAlCD;;;OAGG;IACH,oBAFU,MAAM,CAES;IAcrB;;;OAGG;IACH,GAFU,MAAM,CAEN;IACV;;;OAGG;IACH,GAFU,MAAM,CAEN;IACV;;;OAGG;IACH,GAFU,MAAM,CAEN;IAId;;;;OAIG;IACH,YAHW,WAAW,GACT,WAAW,CAIvB;IAED;;;;;;OAMG;IACH,OALW,MAAM,KACN,MAAM,KACN,MAAM,GACJ,WAAW,CASvB;IAED;;;;OAIG;IACH,uBAFa,WAAW,CAOvB;IAED;;;;OAIG;IACH,uBAFa,WAAW,CAIvB;IAED;;;;OAIG;IACH,qBAFa,WAAW,CAOvB;IAED;;;;OAIG;IACH,qBAFa,WAAW,CAIvB;IAED;;;OAGG;IACH,YAFa,MAAM,CAKlB;IAED;;;;OAIG;IACH,cAHW,WAAW,GACT,OAAO,CAInB;IAED;;;;MAMC;IAED,0BAEC;CACJ;mBAxIkB,4BAA4B"}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
+
import { assert } from "../assert.js";
|
|
1
2
|
import Signal from "../events/signal/Signal.js";
|
|
2
3
|
|
|
3
4
|
class LinearValue {
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @readonly
|
|
8
|
+
* @type {Signal}
|
|
9
|
+
*/
|
|
10
|
+
onChanged = new Signal();
|
|
11
|
+
|
|
4
12
|
/**
|
|
5
13
|
*
|
|
6
14
|
* @param {number} [x = 0]
|
|
@@ -8,24 +16,27 @@ class LinearValue {
|
|
|
8
16
|
* @param {number} [b = 1]
|
|
9
17
|
* @constructor
|
|
10
18
|
*/
|
|
11
|
-
constructor(x, a, b) {
|
|
19
|
+
constructor(x = 0, a = 0, b = 1) {
|
|
20
|
+
assert.isNumber(x, 'x');
|
|
21
|
+
assert.isNumber(a, 'a');
|
|
22
|
+
assert.isNumber(b, 'b');
|
|
23
|
+
|
|
12
24
|
/**
|
|
13
25
|
*
|
|
14
26
|
* @type {number}
|
|
15
27
|
*/
|
|
16
|
-
this.x = x
|
|
28
|
+
this.x = x;
|
|
17
29
|
/**
|
|
18
30
|
*
|
|
19
31
|
* @type {number}
|
|
20
32
|
*/
|
|
21
|
-
this.a = a
|
|
33
|
+
this.a = a;
|
|
22
34
|
/**
|
|
23
35
|
*
|
|
24
36
|
* @type {number}
|
|
25
37
|
*/
|
|
26
|
-
this.b = b
|
|
38
|
+
this.b = b;
|
|
27
39
|
|
|
28
|
-
this.onChanged = new Signal();
|
|
29
40
|
}
|
|
30
41
|
|
|
31
42
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModuleRegistry.d.ts","sourceRoot":"","sources":["../../../../src/core/model/ModuleRegistry.js"],"names":[],"mappings":"AAEA;
|
|
1
|
+
{"version":3,"file":"ModuleRegistry.d.ts","sourceRoot":"","sources":["../../../../src/core/model/ModuleRegistry.js"],"names":[],"mappings":"AAEA;;GAEG;AACH;IAaI;;;OAGG;IACH,oCAiBG;IAEH;;;OAGG;IACH,6BAEC;IAGD;;;;OAIG;IACH,kCAEC;IAED;;;;OAIG;IACH,UAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;;;OAKG;IACH,yBAJW,MAAM,gBAEJ,OAAO,CA0BnB;IAED;;;;;;OAMG;IACH,+CAHa,MAAM,EAAE,CAYpB;IAED,mBAEC;;CACJ"}
|
|
@@ -1,43 +1,47 @@
|
|
|
1
1
|
import { assert } from "../assert.js";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @template T
|
|
5
|
+
*/
|
|
3
6
|
export class ModuleRegistry {
|
|
4
7
|
|
|
5
8
|
/**
|
|
6
9
|
*
|
|
7
|
-
* @type {Map<string,
|
|
10
|
+
* @type {Map<string, T>}
|
|
8
11
|
*/
|
|
9
12
|
#modules = new Map();
|
|
10
13
|
/**
|
|
11
14
|
*
|
|
12
|
-
* @type {Map
|
|
15
|
+
* @type {Map<T,Array<string>>}
|
|
13
16
|
*/
|
|
14
17
|
#reverse_lookup = new Map();
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return module;
|
|
19
|
+
/**
|
|
20
|
+
* @readonly
|
|
21
|
+
* @type {ModuleRegistry}
|
|
22
|
+
*/
|
|
23
|
+
proxy = new Proxy(this, {
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @param target
|
|
27
|
+
* @param {string} p
|
|
28
|
+
* @param receiver
|
|
29
|
+
* @returns {Class}
|
|
30
|
+
*/
|
|
31
|
+
get(target, p, receiver) {
|
|
32
|
+
const module = target.get(p);
|
|
33
|
+
|
|
34
|
+
if (module === undefined) {
|
|
35
|
+
throw new Error(`Module '${p}' not found in the registry`);
|
|
34
36
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
|
|
38
|
+
return module;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
37
41
|
|
|
38
42
|
/**
|
|
39
43
|
*
|
|
40
|
-
* @param {function(name:string,module
|
|
44
|
+
* @param {function(name:string,module:T):void} visitor
|
|
41
45
|
*/
|
|
42
46
|
traverse(visitor) {
|
|
43
47
|
this.#modules.forEach((klass, name) => visitor(name, klass));
|
|
@@ -45,9 +49,9 @@ export class ModuleRegistry {
|
|
|
45
49
|
|
|
46
50
|
|
|
47
51
|
/**
|
|
48
|
-
* @template T
|
|
52
|
+
* @template {T} M
|
|
49
53
|
* @param {String} name
|
|
50
|
-
* @returns {
|
|
54
|
+
* @returns {M}
|
|
51
55
|
*/
|
|
52
56
|
get(name) {
|
|
53
57
|
return this.#modules.get(name);
|
|
@@ -63,9 +67,9 @@ export class ModuleRegistry {
|
|
|
63
67
|
}
|
|
64
68
|
|
|
65
69
|
/**
|
|
66
|
-
* @template T
|
|
70
|
+
* @template {T} M
|
|
67
71
|
* @param {string} name
|
|
68
|
-
* @param {
|
|
72
|
+
* @param {M} module
|
|
69
73
|
* @returns {boolean}
|
|
70
74
|
*/
|
|
71
75
|
add(name, module) {
|
|
@@ -96,8 +100,8 @@ export class ModuleRegistry {
|
|
|
96
100
|
|
|
97
101
|
/**
|
|
98
102
|
* Find all names associated with the given module
|
|
99
|
-
* @template T
|
|
100
|
-
* @param {
|
|
103
|
+
* @template {T} M
|
|
104
|
+
* @param {M} module
|
|
101
105
|
* @returns {string[]}
|
|
102
106
|
* @throws if module is not registered
|
|
103
107
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceAccessSpecification.d.ts","sourceRoot":"","sources":["../../../../src/core/model/ResourceAccessSpecification.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ResourceAccessSpecification.d.ts","sourceRoot":"","sources":["../../../../src/core/model/ResourceAccessSpecification.js"],"names":[],"mappings":"AAKA;;GAEG;AACH;IAaI;;;;;OAKG;IACH,yCAHW,MAAM,GAAC,kBAAkB,oCAenC;IA9BD;;;OAGG;IACH,QAFU,MAAM,GAAC,kBAAkB,CAEZ;IAEvB;;;OAGG;IACH,UAFU,CAAC,GAAC,IAAI,CAED;IAuBnB;;;OAGG;IACH,wCAFU,OAAO,CAEkD;CANlE;mCAvCkC,yBAAyB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { assert } from "../assert.js";
|
|
1
2
|
import { ResourceAccessKind } from "./ResourceAccessKind.js";
|
|
2
3
|
|
|
3
4
|
const DEFAULT_ACCESS = ResourceAccessKind.Read | ResourceAccessKind.Write;
|
|
@@ -24,7 +25,12 @@ export class ResourceAccessSpecification {
|
|
|
24
25
|
* @param {number|ResourceAccessKind} access
|
|
25
26
|
* @returns {ResourceAccessSpecification<R>}
|
|
26
27
|
*/
|
|
27
|
-
static from(resource, access = DEFAULT_ACCESS){
|
|
28
|
+
static from(resource, access = DEFAULT_ACCESS) {
|
|
29
|
+
assert.defined(resource, 'resource');
|
|
30
|
+
assert.notNull(resource, 'resource');
|
|
31
|
+
|
|
32
|
+
assert.isNonNegativeInteger(access, 'access');
|
|
33
|
+
|
|
28
34
|
const r = new ResourceAccessSpecification();
|
|
29
35
|
|
|
30
36
|
r.access = access;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Connection.d.ts","sourceRoot":"","sources":["../../../../../src/core/model/node-graph/Connection.js"],"names":[],"mappings":"AAYA;IACI;;;OAGG;IACH,aAFU,MAAM,CAEE;IAElB;;;OAGG;IACH,kCAAc;IAEd;;;OAGG;IACH,kCAAc;IAEd;;;;OAIG;IACH,
|
|
1
|
+
{"version":3,"file":"Connection.d.ts","sourceRoot":"","sources":["../../../../../src/core/model/node-graph/Connection.js"],"names":[],"mappings":"AAYA;IACI;;;OAGG;IACH,aAFU,MAAM,CAEE;IAElB;;;OAGG;IACH,kCAAc;IAEd;;;OAGG;IACH,kCAAc;IAEd;;;;OAIG;IACH,mCAHoB,MAAM,WACb,OAAO,CAwCnB;IAED;;;OAGG;IACH,qDAKC;IAED;;;OAGG;IACH,qDAKC;IAED;;;;OAIG;IACH,qBAHW,MAAM,GACJ,OAAO,CAQnB;IAED;;;;OAIG;IACH,cAHW,UAAU,GACR,OAAO,CAMnB;IAED;;;OAGG;IACH,QAFY,MAAM,CAUjB;IAED,mBAEC;IAIL;;;OAGG;IACH,uBAFU,OAAO,CAEgB;CAPhC"}
|