@woosh/meep-engine 2.111.8 → 2.111.9
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/package.json
CHANGED
|
@@ -124,6 +124,12 @@ export class RowFirstTable {
|
|
|
124
124
|
* @param {function(row_index:number, row:Array.<number>):*} valueSupplier supplier of row values, called with row index and an empty row to be filled
|
|
125
125
|
*/
|
|
126
126
|
addRows(count: number, valueSupplier: any): void;
|
|
127
|
+
/**
|
|
128
|
+
* Copy a single row, value in the source row is unaffected
|
|
129
|
+
* @param {number} source
|
|
130
|
+
* @param {number} target
|
|
131
|
+
*/
|
|
132
|
+
copyRow(source: number, target: number): void;
|
|
127
133
|
/**
|
|
128
134
|
* Copy data from another table. Specs must match.
|
|
129
135
|
* NOTE: does not send onAdded signal
|
|
@@ -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,EAuDjB;IA/CG;;;OAGG;IACH,wBAAgB;IAEhB;;;OAGG;IACH,gBAFU,qBAAsB,CAET;IAEvB;;;OAGG;IACH,MAFU,WAAW,CAEuB;IAE5C;;;OAGG;IACH,gBAFU,MAAM,CAEyB;IAEzC;;;OAGG;IACH,QAFU,MAAM,CAED;IAEf;;;OAGG;IACH,UAFU,MAAM,CAEC;IAEjB;;;OAGG;IACH,UAFU,QAAQ,CAEE;IAEpB;;MAEC;IAKL;;OAEG;IACH,mBAiBC;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;;;OAGG;IACH,eAFW,MAAO,MAAM,CAAC,QAexB;IAED;;;;OAIG;IACH,eAHW,MAAM,4BAoChB;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,wBAEC;IAED;;;OAGG;IACH,cAFa,MAAM,EAAE,EAAE,CAgBtB;IAED;;OAEG;IACH,uBAIC;CACJ;
|
|
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,EAuDjB;IA/CG;;;OAGG;IACH,wBAAgB;IAEhB;;;OAGG;IACH,gBAFU,qBAAsB,CAET;IAEvB;;;OAGG;IACH,MAFU,WAAW,CAEuB;IAE5C;;;OAGG;IACH,gBAFU,MAAM,CAEyB;IAEzC;;;OAGG;IACH,QAFU,MAAM,CAED;IAEf;;;OAGG;IACH,UAFU,MAAM,CAEC;IAEjB;;;OAGG;IACH,UAFU,QAAQ,CAEE;IAEpB;;MAEC;IAKL;;OAEG;IACH,mBAiBC;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;;;OAGG;IACH,eAFW,MAAO,MAAM,CAAC,QAexB;IAED;;;;OAIG;IACH,eAHW,MAAM,4BAoChB;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,wBAEC;IAED;;;OAGG;IACH,cAFa,MAAM,EAAE,EAAE,CAgBtB;IAED;;OAEG;IACH,uBAIC;CACJ;mBAxiBkB,+BAA+B"}
|
|
@@ -142,7 +142,7 @@ export class RowFirstTable {
|
|
|
142
142
|
setCapacity(rowCount) {
|
|
143
143
|
assert.isNonNegativeInteger(rowCount, 'rowCount');
|
|
144
144
|
|
|
145
|
-
if(this.capacity === rowCount){
|
|
145
|
+
if (this.capacity === rowCount) {
|
|
146
146
|
// already right size
|
|
147
147
|
return;
|
|
148
148
|
}
|
|
@@ -367,6 +367,35 @@ export class RowFirstTable {
|
|
|
367
367
|
|
|
368
368
|
}
|
|
369
369
|
|
|
370
|
+
/**
|
|
371
|
+
* Copy a single row, value in the source row is unaffected
|
|
372
|
+
* @param {number} source
|
|
373
|
+
* @param {number} target
|
|
374
|
+
*/
|
|
375
|
+
copyRow(source, target) {
|
|
376
|
+
assert.isNonNegativeInteger(source, 'source');
|
|
377
|
+
assert.isNonNegativeInteger(target, 'target');
|
|
378
|
+
|
|
379
|
+
if (source === target) {
|
|
380
|
+
// no operation
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
// figure out addresses
|
|
385
|
+
const bytes_per_record = this.bytesPerRecord;
|
|
386
|
+
|
|
387
|
+
const source_address = source * bytes_per_record;
|
|
388
|
+
const target_address = source * bytes_per_record;
|
|
389
|
+
|
|
390
|
+
const data_view = this.dataView;
|
|
391
|
+
|
|
392
|
+
for (let i = 0; i < bytes_per_record; i++) {
|
|
393
|
+
const v = data_view.getUint8(source_address + i);
|
|
394
|
+
|
|
395
|
+
data_view.setUint8(target_address + i, v);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
|
|
370
399
|
/**
|
|
371
400
|
* Copy data from another table. Specs must match.
|
|
372
401
|
* NOTE: does not send onAdded signal
|
|
@@ -429,7 +458,7 @@ export class RowFirstTable {
|
|
|
429
458
|
* @param {Array} result where row values are to be stored
|
|
430
459
|
*/
|
|
431
460
|
getRow(index, result) {
|
|
432
|
-
assert.isNonNegativeInteger(index,'index');
|
|
461
|
+
assert.isNonNegativeInteger(index, 'index');
|
|
433
462
|
|
|
434
463
|
this.readRowMethod(this.dataView, this.bytesPerRecord * index, result);
|
|
435
464
|
}
|
|
@@ -440,7 +469,7 @@ export class RowFirstTable {
|
|
|
440
469
|
* @param {number[]} record
|
|
441
470
|
*/
|
|
442
471
|
setRow(index, record) {
|
|
443
|
-
assert.isNonNegativeInteger(index,'index');
|
|
472
|
+
assert.isNonNegativeInteger(index, 'index');
|
|
444
473
|
|
|
445
474
|
this.writeRowMethod(this.dataView, this.bytesPerRecord * index, record);
|
|
446
475
|
}
|