@woosh/meep-engine 2.126.69 → 2.126.71
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
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"description": "Pure JavaScript game engine. Fully featured and production ready.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"author": "Alexander Goldring",
|
|
8
|
-
"version": "2.126.
|
|
8
|
+
"version": "2.126.71",
|
|
9
9
|
"main": "build/meep.module.js",
|
|
10
10
|
"module": "build/meep.module.js",
|
|
11
11
|
"exports": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssetManager.d.ts","sourceRoot":"","sources":["../../../../src/engine/asset/AssetManager.js"],"names":[],"mappings":"AA8CA;;;;GAIG;AACH;IAgII;;;;;OAKG;IACH,oCAJW,GAAG,EAYb;IA7ID;;;;OAIG;IACH,eAEG;IAEH;;;OAGG;IACH,aAFU,YAAY,gBAAgB,EAAE,YAAY,CAAC,CAER;IAe7C;;;;;;OAMG;IACH,kBAFU,MAAM,CAEY;IAyB5B;;;;OAIG;IACH,iBAAc;IAEd;;;OAGG;IACH,mBAFU,iBAAiB,CAEiB;IAwE5C,gBAQC;IAED;;;;OAIG;IACH,qBAHW,MAAM,GACL,QAAQ,IAAI,CAAC,CAexB;IAED;;;;;OAKG;IACH,oCAFa,OAAO,CAOnB;IAED;;OAEG;IACH,cAEC;IAED,8BAEC;IAED;;;;;;OAMG;IACH,4DAJW,iBAAiB,GAEf,cAAc,CAY1B;IAED;;;;;;;;;OASG;IACH,qFAsCC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,uBAZW,MAAM,QACN,MAAM,gBAEJ,mBAAiB,CA4D7B;IAED;;;;;;;;OAQG;IACH,kBAJW,MAAM,QACN,MAAM,2BAiChB;IA2QD;;;;;OAKG;IACH,sBA2BC;IAGD;;;;OAIG;IACH,uBAHW,MAAM,GACL,OAAO,CAIlB;IAED;;;;OAIG;IACH,sBAHW,MAAM,GACJ,wBAAY,SAAS,CAMjC;IAaD;;;;OAIG;IACH,+BAHW,MAAM,4CAqBhB;IAED;;;;OAIG;IACH,iCAHW,MAAM,+CAyBhB;IAED;;;;;;OAMG;IACH,6BAJW,MAAM,kCAEJ,QAAQ,OAAO,CAAC,CAU5B;IAED;;;;;OAKG;IACH,0BAJW,MAAM,iEAwChB;IAED;;;OAGG;IACH,uBAFW,MAAM,iBAkBhB;IAED;;;;;;OAMG;IACH,yCAFa,aAAS,IAAI,CAYzB;IAED;;;;;OAKG;IACH,eAJW,MAAM,QACN,MAAM,GACJ,OAAO,CAMnB;IAED;;;;OAIG;IACH,2BAHW,MAAM,GACL,mBAAiB,CAa5B;IAED;;;;OAIG;IACH,oBAHW,MAAM,GACL,gBAAgB,GAAC,SAAS,CAQrC;IAED;;;;;OAKG;IACH,mBAJW,MAAM,QACN,MAAM,QACN,MAAM,QAUhB;IAGL;;;OAGG;IACH,yBAFU,OAAO,CAEoB;;CANpC;
|
|
1
|
+
{"version":3,"file":"AssetManager.d.ts","sourceRoot":"","sources":["../../../../src/engine/asset/AssetManager.js"],"names":[],"mappings":"AA8CA;;;;GAIG;AACH;IAgII;;;;;OAKG;IACH,oCAJW,GAAG,EAYb;IA7ID;;;;OAIG;IACH,eAEG;IAEH;;;OAGG;IACH,aAFU,YAAY,gBAAgB,EAAE,YAAY,CAAC,CAER;IAe7C;;;;;;OAMG;IACH,kBAFU,MAAM,CAEY;IAyB5B;;;;OAIG;IACH,iBAAc;IAEd;;;OAGG;IACH,mBAFU,iBAAiB,CAEiB;IAwE5C,gBAQC;IAED;;;;OAIG;IACH,qBAHW,MAAM,GACL,QAAQ,IAAI,CAAC,CAexB;IAED;;;;;OAKG;IACH,oCAFa,OAAO,CAOnB;IAED;;OAEG;IACH,cAEC;IAED,8BAEC;IAED;;;;;;OAMG;IACH,4DAJW,iBAAiB,GAEf,cAAc,CAY1B;IAED;;;;;;;;;OASG;IACH,qFAsCC;IAED;;;;;;;OAOG;IACH,gBAJW,MAAM,QACN,MAAM,GACL,OAAO,CAKlB;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,uBAZW,MAAM,QACN,MAAM,gBAEJ,mBAAiB,CA4D7B;IAED;;;;;;;;OAQG;IACH,kBAJW,MAAM,QACN,MAAM,2BAiChB;IA2QD;;;;;OAKG;IACH,sBA2BC;IAGD;;;;OAIG;IACH,uBAHW,MAAM,GACL,OAAO,CAIlB;IAED;;;;OAIG;IACH,sBAHW,MAAM,GACJ,wBAAY,SAAS,CAMjC;IAaD;;;;OAIG;IACH,+BAHW,MAAM,4CAqBhB;IAED;;;;OAIG;IACH,iCAHW,MAAM,+CAyBhB;IAED;;;;;;OAMG;IACH,6BAJW,MAAM,kCAEJ,QAAQ,OAAO,CAAC,CAU5B;IAED;;;;;OAKG;IACH,0BAJW,MAAM,iEAwChB;IAED;;;OAGG;IACH,uBAFW,MAAM,iBAkBhB;IAED;;;;;;OAMG;IACH,yCAFa,aAAS,IAAI,CAYzB;IAED;;;;;OAKG;IACH,eAJW,MAAM,QACN,MAAM,GACJ,OAAO,CAMnB;IAED;;;;OAIG;IACH,2BAHW,MAAM,GACL,mBAAiB,CAa5B;IAED;;;;OAIG;IACH,oBAHW,MAAM,GACL,gBAAgB,GAAC,SAAS,CAQrC;IAED;;;;;OAKG;IACH,mBAJW,MAAM,QACN,MAAM,QACN,MAAM,QAUhB;IAGL;;;OAGG;IACH,yBAFU,OAAO,CAEoB;;CANpC;4BA19B2B,0CAA0C;iCAOrC,uBAAuB;6BAM3B,mBAAmB;kCAFd,6BAA6B;kCAD7B,wBAAwB;4BAE9B,0BAA0B"}
|
|
@@ -316,6 +316,19 @@ export class AssetManager {
|
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
|
|
319
|
+
/**
|
|
320
|
+
* Checks if an asset is currently being loaded.
|
|
321
|
+
* Useful for avoiding redundant requests.
|
|
322
|
+
*
|
|
323
|
+
* @param {string} path
|
|
324
|
+
* @param {string} type
|
|
325
|
+
* @return {boolean}
|
|
326
|
+
*/
|
|
327
|
+
isPending(path, type) {
|
|
328
|
+
const assetDescription = new AssetDescription(path, type);
|
|
329
|
+
return this.request_map.has(assetDescription);
|
|
330
|
+
}
|
|
331
|
+
|
|
319
332
|
/**
|
|
320
333
|
* Same as {@link insert}, but will register the asset as pending until loader function resolves.
|
|
321
334
|
*
|
|
@@ -341,7 +354,7 @@ export class AssetManager {
|
|
|
341
354
|
const asset_descriptor = new AssetDescription(path, type);
|
|
342
355
|
|
|
343
356
|
if (this.request_map.get(asset_descriptor)) {
|
|
344
|
-
throw new Error(`Asset with path ${path} and type ${type} is already pending`);
|
|
357
|
+
throw new Error(`Asset with path '${path}' and type '${type}' is already pending`);
|
|
345
358
|
}
|
|
346
359
|
|
|
347
360
|
const pending = new PendingAsset(asset_descriptor);
|
|
@@ -379,7 +392,7 @@ export class AssetManager {
|
|
|
379
392
|
|
|
380
393
|
return asset;
|
|
381
394
|
} else {
|
|
382
|
-
throw new Error(`Race condition. Asset with path ${path} and type ${type} was already resolved somewhere else.`);
|
|
395
|
+
throw new Error(`Race condition. Asset with path '${path}' and type '${type}' was already resolved somewhere else.`);
|
|
383
396
|
}
|
|
384
397
|
}, error => {
|
|
385
398
|
cleanup();
|
|
@@ -414,7 +427,7 @@ export class AssetManager {
|
|
|
414
427
|
// check for assets in-flight
|
|
415
428
|
const pending = this.request_map.get(asset_descritptor);
|
|
416
429
|
if (pending !== undefined) {
|
|
417
|
-
console.warn(`Asset with path ${path} and type ${type} is already pending, this operation will squash the asset in-flight`);
|
|
430
|
+
console.warn(`Asset with path '${path}' and type '${type}' is already pending, this operation will squash the asset in-flight`);
|
|
418
431
|
|
|
419
432
|
this.request_map.delete(asset_descritptor);
|
|
420
433
|
|