@woosh/meep-engine 2.131.7 → 2.131.8
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.131.
|
|
8
|
+
"version": "2.131.8",
|
|
9
9
|
"main": "build/meep.module.js",
|
|
10
10
|
"module": "build/meep.module.js",
|
|
11
11
|
"exports": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Signal.d.ts","sourceRoot":"","sources":["../../../../../src/core/events/signal/Signal.js"],"names":[],"mappings":"AAMA;;;;;;;GAOG;AACH;IACI;;;;OAIG;IACH,iBAAqB;IAErB;;;;OAIG;IACH,cAAU;IAEV;;;OAGG;IACH,YAFU,MAAM,CAED;IAWf;;;OAGG;IACH,yBAEC;IAfD;;;OAGG;IACH,sBAEC;IAYD;;;;OAIG;IACH,cAHW,MAAM;;KAAY,GAChB,IAAI,CAIhB;IAED;;;;OAIG;IACH,gBAHW,MAAM;;KAAY,GAChB,IAAI,CAIhB;IAED;;;;OAIG;IACH,gBAHW,MAAM;;KAAY,SAClB,OAAO,QAQjB;IAED;;;;OAIG;IACH,cAHW,MAAM;;KAAY,GAChB,OAAO,CAInB;IAGD;;;;;OAKG;IACH,4CAFa,OAAO,CAcnB;IAED,aAEC;IAED,eAEC;IAED;;;OAGG;IACH,eAFa,OAAO,CAInB;IAED;;;;OAIG;IACH,yCAQC;IAED;;;;OAIG;IACH,sCAOC;IA8BD;;;;;OAKG;IACH,oCAFa,OAAO,CA2CnB;IAED
|
|
1
|
+
{"version":3,"file":"Signal.d.ts","sourceRoot":"","sources":["../../../../../src/core/events/signal/Signal.js"],"names":[],"mappings":"AAMA;;;;;;;GAOG;AACH;IACI;;;;OAIG;IACH,iBAAqB;IAErB;;;;OAIG;IACH,cAAU;IAEV;;;OAGG;IACH,YAFU,MAAM,CAED;IAWf;;;OAGG;IACH,yBAEC;IAfD;;;OAGG;IACH,sBAEC;IAYD;;;;OAIG;IACH,cAHW,MAAM;;KAAY,GAChB,IAAI,CAIhB;IAED;;;;OAIG;IACH,gBAHW,MAAM;;KAAY,GAChB,IAAI,CAIhB;IAED;;;;OAIG;IACH,gBAHW,MAAM;;KAAY,SAClB,OAAO,QAQjB;IAED;;;;OAIG;IACH,cAHW,MAAM;;KAAY,GAChB,OAAO,CAInB;IAGD;;;;;OAKG;IACH,4CAFa,OAAO,CAcnB;IAED,aAEC;IAED,eAEC;IAED;;;OAGG;IACH,eAFa,OAAO,CAInB;IAED;;;;OAIG;IACH,yCAQC;IAED;;;;OAIG;IACH,sCAOC;IA8BD;;;;;OAKG;IACH,oCAFa,OAAO,CA2CnB;IAED;;;;;;;;OAQG;IACH,kBAEC;IAqDD;;;;;;;;;;;;;;OAcG;IACH,WAZY,QAAQ,EAAE,CAAC,CAkBtB;IAED;;;OAGG;IACH,+BA2CC;IAGD;;;OAGG;IACH,4BA6CC;IAED;;;;OAIG;IACH,sCA4CC;IAED;;;;OAIG;IACH,4CA2CC;IAED;;;;;OAKG;IACH,oDA2CC;IAED;;;;;;OAMG;IACH,4DA2CC;IAED;;;;;;;;OAQG;IACH,4EA2CC;IAED;;;;;;;;;;OAUG;IACH,4FA2CC;IAED;;;;OAIG;IACH,aAHW,MAAM,GACJ,MAAM,CAalB;IAIL;;;OAGG;IACH,mBAFU,OAAO,CAEQ;;CAPxB"}
|
|
@@ -235,6 +235,8 @@ export class Signal {
|
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
/**
|
|
238
|
+
* **UNSAFE**
|
|
239
|
+
*
|
|
238
240
|
* Remove all handlers.
|
|
239
241
|
* Please note that this will remove even all handlers, irrespective of where they were added from. If another script is attaching to the same signal, using this method will potentially break that code.
|
|
240
242
|
* For most use cases, prefer to use {@link remove} method instead, or make use of {@link SignalBinding} if you need to keep track of multiple handlers
|
|
@@ -296,6 +298,29 @@ export class Signal {
|
|
|
296
298
|
return false;
|
|
297
299
|
}
|
|
298
300
|
|
|
301
|
+
/**
|
|
302
|
+
* Utility method, useful in asynchronous programming.
|
|
303
|
+
* Will resolve at the next {@link dispatch}/{@link send0}/etc.
|
|
304
|
+
* @return {Promise<[]>}
|
|
305
|
+
* @see addOne
|
|
306
|
+
*
|
|
307
|
+
* @example
|
|
308
|
+
* const s = new Signal<number,number>();
|
|
309
|
+
*
|
|
310
|
+
* // ...
|
|
311
|
+
* const [x,y] = await s.promise(); // will trigger at the next dispatch
|
|
312
|
+
*
|
|
313
|
+
* // ... then somewhere else
|
|
314
|
+
* s.send2(7,-3);
|
|
315
|
+
*/
|
|
316
|
+
promise(){
|
|
317
|
+
return new Promise((resolve, reject)=>{
|
|
318
|
+
this.addOne((...args)=>{
|
|
319
|
+
resolve(args);
|
|
320
|
+
})
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
|
|
299
324
|
/**
|
|
300
325
|
* NOTE: because of polymorphic call-site nature of this method, it's always better for performance to use monomorphic methods like `send0`, `send1` etc.
|
|
301
326
|
* @param {...*} args
|