@woosh/meep-engine 2.46.16 → 2.46.17

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
@@ -4,7 +4,7 @@
4
4
  "productName": "Meep",
5
5
  "description": "production-ready JavaScript game engine based on Entity Component System Architecture",
6
6
  "author": "Alexander Goldring",
7
- "version": "2.46.16",
7
+ "version": "2.46.17",
8
8
  "main": "build/meep.module.js",
9
9
  "module": "build/meep.module.js",
10
10
  "scripts": {
@@ -131,8 +131,7 @@ export class NodeGraph {
131
131
  const previous_node_count = this.nodes.length;
132
132
  const previous_connection_count = this.connections.length;
133
133
 
134
- const other_nodes = nodes;
135
- const additional_node_count = other_nodes.length;
134
+ const additional_node_count = nodes.length;
136
135
 
137
136
  /**
138
137
  * Mapping from original IDs to IDs in this graph
@@ -141,26 +140,25 @@ export class NodeGraph {
141
140
  const this_nodes = {};
142
141
 
143
142
  for (let i = 0; i < additional_node_count; i++) {
144
- const other_node = other_nodes[i];
143
+ const other_node = nodes[i];
145
144
  this_nodes[other_node.id] = this.createNode(other_node.description);
146
145
  }
147
146
 
148
147
  // create connections
149
- const other_connections = connections;
150
- const additional_connection_count = other_connections.length;
148
+ const additional_connection_count = connections.length;
151
149
 
152
150
  for (let i = 0; i < additional_connection_count; i++) {
153
- const other_connection = other_connections[i];
151
+ const other_connection = connections[i];
154
152
 
155
153
  const other_source = other_connection.source;
156
154
 
157
155
  const this_source_node_id = this_nodes[other_source.instance.id];
158
- const this_source_port_id = this.getNode(this_source_node_id).getEndpoint(other_source.port.id).id;
156
+ const this_source_port_id = other_source.port.id;
159
157
 
160
158
  const other_target = other_connection.target;
161
159
 
162
160
  const this_target_node_id = this_nodes[other_target.instance.id];
163
- const this_target_port_id = this.getNode(this_target_node_id).getEndpoint(other_target.port.id).id;
161
+ const this_target_port_id = other_target.port.id;
164
162
 
165
163
  this.createConnection(
166
164
  this_source_node_id, this_source_port_id,
@@ -572,6 +570,11 @@ export class NodeGraph {
572
570
  * @returns {number} number of found connections
573
571
  */
574
572
  getConnectionsAttachedToNode(id, result) {
573
+ assert.isNonNegativeInteger(id, 'id');
574
+
575
+ assert.defined(result, 'result');
576
+ assert.isArray(result, 'result');
577
+
575
578
  let count = 0;
576
579
 
577
580
  const connections = this.connections;