@woosh/meep-engine 2.48.5 → 2.48.6

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": "Fully featured ECS game engine written in JavaScript",
6
6
  "type": "module",
7
7
  "author": "Alexander Goldring",
8
- "version": "2.48.5",
8
+ "version": "2.48.6",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -319,6 +319,30 @@ export class NodeDescription {
319
319
  return result;
320
320
  }
321
321
 
322
+ /**
323
+ *
324
+ * @param {string} name
325
+ * @param {PortDirection} direction
326
+ * @return {Port|undefined}
327
+ */
328
+ findPortByNameAndDirection(name, direction) {
329
+ assert.isString(name, 'name');
330
+ assert.enum(direction, PortDirection, 'direction');
331
+
332
+ const ports = this.ports;
333
+ const port_count = ports.length;
334
+
335
+ for (let i = 0; i < port_count; i++) {
336
+ const port = ports[i];
337
+
338
+ if (port.name === name && port.direction === direction) {
339
+ return port;
340
+ }
341
+ }
342
+
343
+ return undefined;
344
+ }
345
+
322
346
  /**
323
347
  *
324
348
  * @returns {Port[]}
@@ -35,6 +35,12 @@ export class Port {
35
35
  * @type {DataType}
36
36
  */
37
37
  this.dataType = null;
38
+
39
+ /**
40
+ * Unspecified user data
41
+ * @type {*}
42
+ */
43
+ this.metadata = {};
38
44
  }
39
45
 
40
46
  hash() {