@woosh/meep-engine 2.98.2 → 2.98.3
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/meep.cjs +19 -1
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +19 -1
- package/package.json +1 -1
- package/src/core/events/signal/Signal.d.ts.map +1 -1
- package/src/core/events/signal/Signal.js +2 -2
- package/src/core/events/signal/SignalBinding.d.ts +8 -0
- package/src/core/events/signal/SignalBinding.d.ts.map +1 -1
- package/src/core/events/signal/SignalBinding.js +17 -0
- package/src/core/model/node-graph/node/NodeDescription.d.ts.map +1 -1
- package/src/core/model/node-graph/node/NodeDescription.js +2 -0
package/build/meep.module.js
CHANGED
|
@@ -1145,8 +1145,9 @@ class Signal {
|
|
|
1145
1145
|
|
|
1146
1146
|
/**
|
|
1147
1147
|
* Remove all handlers.
|
|
1148
|
-
* Please note that this will remove even all handlers, irrespective of where they were added from.
|
|
1148
|
+
* 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.
|
|
1149
1149
|
* 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
|
|
1150
|
+
* NOTE: Consider this method to be unsafe, only use it when you understand the implications
|
|
1150
1151
|
*/
|
|
1151
1152
|
removeAll() {
|
|
1152
1153
|
const handlers = this.handlers;
|
|
@@ -68238,6 +68239,23 @@ class SignalBinding {
|
|
|
68238
68239
|
this.#linked = false;
|
|
68239
68240
|
this.signal.remove(this.handler, this.context);
|
|
68240
68241
|
}
|
|
68242
|
+
|
|
68243
|
+
/**
|
|
68244
|
+
* Creates a {@link SignalBinding} and links it immediately. Utility method
|
|
68245
|
+
* @param {Signal} signal
|
|
68246
|
+
* @param {function} handler
|
|
68247
|
+
* @param {*} [context]
|
|
68248
|
+
* @return {SignalBinding}
|
|
68249
|
+
*/
|
|
68250
|
+
static bind(
|
|
68251
|
+
signal, handler, context
|
|
68252
|
+
) {
|
|
68253
|
+
const r = new SignalBinding(signal, handler, context);
|
|
68254
|
+
|
|
68255
|
+
r.link();
|
|
68256
|
+
|
|
68257
|
+
return r;
|
|
68258
|
+
}
|
|
68241
68259
|
}
|
|
68242
68260
|
|
|
68243
68261
|
/**
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Signal.d.ts","sourceRoot":"","sources":["../../../../../src/core/events/signal/Signal.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Signal.d.ts","sourceRoot":"","sources":["../../../../../src/core/events/signal/Signal.js"],"names":[],"mappings":"AAslBA;;;;;;GAMG;AACH,yDALW,aAAa,EAAE,+BAGb,MAAM,CAoBlB;AAED;;;;;;GAMG;AACH,mEALW,aAAa,EAAE,0BAGb,MAAM,CAclB;AAiDD;;;;GAIG;AACH,2CAHW,aAAa,EAAE,sBA8BzB;AAlsBD;;;;GAIG;AACH;IACI;;;OAGG;IACH,iBAAc;IAEd;;;;OAIG;IACH,cAAU;IAWV;;;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,CAQnB;IAED,aAEC;IAED,eAEC;IAED;;;OAGG;IACH,eAFa,OAAO,CAInB;IAED;;;;OAIG;IACH,yCAQC;IAED;;;;OAIG;IACH,sCAYC;IAED;;;;;OAKG;IACH,oCAFa,OAAO,CAUnB;IAED;;;;;OAKG;IACH,kBAGC;IAED;;;OAGG;IACH,+BAQC;IAED;;;OAGG;IACH,cA4CC;IAED;;;;OAIG;IACH,sBA6CC;IAED;;;;OAIG;IACH,4BA4CC;IAED;;;;;OAKG;IACH,oCA4CC;IAED;;;;;;OAMG;IACH,4CA4CC;IAED;;;;;;;;OAQG;IACH,4DA4CC;IAED;;;;;;;;;;OAUG;IACH,4EA4CC;IAED;;;;OAIG;IACH,aAHW,MAAM,GACJ,MAAM,CAalB;IAIL;;;OAGG;IACH,mBAFU,OAAO,CAEQ;CAPxB;;8BApkBiD,oBAAoB"}
|
|
@@ -177,9 +177,9 @@ export class Signal {
|
|
|
177
177
|
|
|
178
178
|
/**
|
|
179
179
|
* Remove all handlers.
|
|
180
|
-
* Please note that this will remove even all handlers, irrespective of where they were added from.
|
|
180
|
+
* 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.
|
|
181
181
|
* 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
|
|
182
|
-
* NOTE: Consider
|
|
182
|
+
* NOTE: Consider this method to be unsafe, only use it when you understand the implications
|
|
183
183
|
*/
|
|
184
184
|
removeAll() {
|
|
185
185
|
const handlers = this.handlers;
|
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
* Utility class for managing connection between listeners to signals
|
|
3
3
|
*/
|
|
4
4
|
export class SignalBinding {
|
|
5
|
+
/**
|
|
6
|
+
* Creates a {@link SignalBinding} and links it immediately. Utility method
|
|
7
|
+
* @param {Signal} signal
|
|
8
|
+
* @param {function} handler
|
|
9
|
+
* @param {*} [context]
|
|
10
|
+
* @return {SignalBinding}
|
|
11
|
+
*/
|
|
12
|
+
static bind(signal: Signal, handler: Function, context?: any): SignalBinding;
|
|
5
13
|
/**
|
|
6
14
|
*
|
|
7
15
|
* @param {Signal} signal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignalBinding.d.ts","sourceRoot":"","sources":["../../../../../src/core/events/signal/SignalBinding.js"],"names":[],"mappings":"AAAA;;GAEG;AACH;
|
|
1
|
+
{"version":3,"file":"SignalBinding.d.ts","sourceRoot":"","sources":["../../../../../src/core/events/signal/SignalBinding.js"],"names":[],"mappings":"AAAA;;GAEG;AACH;IA6EI;;;;;;OAMG;IACH,+DAFY,aAAa,CAUxB;IAjFD;;;;;;OAMG;IACH,8DA+BC;IA1CD,sBAEC;IAsBG;;;OAGG;IACH,eAAoB;IAEpB;;;OAGG;IACH,kBAAsB;IAEtB;;;OAGG;IACH,aAAsB;IAI1B;;;OAGG;IACH,aAOC;IAED;;;OAGG;IACH,eAOC;;CAkBJ"}
|
|
@@ -77,4 +77,21 @@ export class SignalBinding {
|
|
|
77
77
|
this.#linked = false;
|
|
78
78
|
this.signal.remove(this.handler, this.context);
|
|
79
79
|
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Creates a {@link SignalBinding} and links it immediately. Utility method
|
|
83
|
+
* @param {Signal} signal
|
|
84
|
+
* @param {function} handler
|
|
85
|
+
* @param {*} [context]
|
|
86
|
+
* @return {SignalBinding}
|
|
87
|
+
*/
|
|
88
|
+
static bind(
|
|
89
|
+
signal, handler, context
|
|
90
|
+
) {
|
|
91
|
+
const r = new SignalBinding(signal, handler, context);
|
|
92
|
+
|
|
93
|
+
r.link();
|
|
94
|
+
|
|
95
|
+
return r;
|
|
96
|
+
}
|
|
80
97
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeDescription.d.ts","sourceRoot":"","sources":["../../../../../../src/core/model/node-graph/node/NodeDescription.js"],"names":[],"mappings":"AAyCA;IACI;;;OAGG;IACH,MAFU,MAAM,CAEN;IAEV;;;;;;OAMG;IACH,IAFU,MAAM,CAEO;IAEvB;;;OAGG;IACH,iBAFU,IAAI,EAAE,CAEL;IAEX;;;OAGG;IACH,YAFU,wBAAwB,EAAE,CAEpB;IAEhB;;OAEG;IACH;QACI;;;WAGG;4BADO,OAAO,IAAI,CAAC;QAGtB;;;WAGG;8BADO,OAAO,IAAI,CAAC;MAGxB;IAEF;;;;OAIG;IACH,4CAEC;IAED;;;OAGG;IACH,uBAEC;IAED;;;OAGG;IACH,sBAEC;IAED;;;;;;OAMG;IACH,sBALW,MAAM,QACN,qBAAqB,iBACrB,MAAM,GAAC,OAAO,GAAC,MAAM,GACnB,MAAM,CA0ClB;IAED;;;;OAIG;IACH,iBAHW,MAAM,GACJ,wBAAwB,CAiBpC;IAGD
|
|
1
|
+
{"version":3,"file":"NodeDescription.d.ts","sourceRoot":"","sources":["../../../../../../src/core/model/node-graph/node/NodeDescription.js"],"names":[],"mappings":"AAyCA;IACI;;;OAGG;IACH,MAFU,MAAM,CAEN;IAEV;;;;;;OAMG;IACH,IAFU,MAAM,CAEO;IAEvB;;;OAGG;IACH,iBAFU,IAAI,EAAE,CAEL;IAEX;;;OAGG;IACH,YAFU,wBAAwB,EAAE,CAEpB;IAEhB;;OAEG;IACH;QACI;;;WAGG;4BADO,OAAO,IAAI,CAAC;QAGtB;;;WAGG;8BADO,OAAO,IAAI,CAAC;MAGxB;IAEF;;;;OAIG;IACH,4CAEC;IAED;;;OAGG;IACH,uBAEC;IAED;;;OAGG;IACH,sBAEC;IAED;;;;;;OAMG;IACH,sBALW,MAAM,QACN,qBAAqB,iBACrB,MAAM,GAAC,OAAO,GAAC,MAAM,GACnB,MAAM,CA0ClB;IAED;;;;OAIG;IACH,iBAHW,MAAM,GACJ,wBAAwB,CAiBpC;IAGD;;;;;;OAMG;IACH,oDAHW,aAAa,GACX,MAAM,CA2BlB;IAED;;;;OAIG;IACH,eAHW,MAAM,GACJ,OAAO,CAuBnB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GACJ,IAAI,GAAC,IAAI,CAgBrB;IAED;;;;OAIG;IACH,qBAHW,MAAM,GACL,IAAI,EAAE,CAwBjB;IAED;;;;OAIG;IACH,+BAHW,aAAa,GACZ,IAAI,EAAE,CAuBjB;IAED;;;;;OAKG;IACH,iCAJW,MAAM,aACN,aAAa,GACZ,IAAI,GAAC,SAAS,CAmBzB;IAED;;;OAGG;IACH,YAFa,IAAI,EAAE,CAIlB;IAED;;;;OAIG;IACH,cAHW,eAAe,GACb,OAAO,CAOnB;IAED,mBAEC;IAED;;;;MAMC;IAED;;;;;;OAMG;IACH;;;;qCAIC;IAKL;;;OAGG;IACH,4BAFU,OAAO,CAE0B;CAR1C;;;;qBAjYoB,WAAW;yCADS,yCAAyC;mBAH/D,kCAAkC;sCAEf,sCAAsC;8BAG9C,oBAAoB"}
|
|
@@ -185,6 +185,7 @@ export class NodeDescription {
|
|
|
185
185
|
* @param {DataType} type
|
|
186
186
|
* @param {String} name
|
|
187
187
|
* @param {PortDirection} direction
|
|
188
|
+
* @returns {number} ID of the newly created port
|
|
188
189
|
*/
|
|
189
190
|
createPort(type, name, direction) {
|
|
190
191
|
assert.defined(type, 'type');
|
|
@@ -237,6 +238,7 @@ export class NodeDescription {
|
|
|
237
238
|
}
|
|
238
239
|
}
|
|
239
240
|
|
|
241
|
+
// port not found
|
|
240
242
|
return false;
|
|
241
243
|
}
|
|
242
244
|
|