@woosh/meep-engine 2.46.17 → 2.46.18
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.
|
|
7
|
+
"version": "2.46.18",
|
|
8
8
|
"main": "build/meep.module.js",
|
|
9
9
|
"module": "build/meep.module.js",
|
|
10
10
|
"scripts": {
|
|
@@ -51,6 +51,29 @@ test("createConnection populates NodeInstance.connections", () => {
|
|
|
51
51
|
expect(g.getNode(i1).connections.length).toBe(1);
|
|
52
52
|
});
|
|
53
53
|
|
|
54
|
+
test("getConnection", () => {
|
|
55
|
+
|
|
56
|
+
const g = new NodeGraph();
|
|
57
|
+
|
|
58
|
+
const node = new NodeDescription();
|
|
59
|
+
|
|
60
|
+
const dt = new DataType();
|
|
61
|
+
|
|
62
|
+
const pInt = node.createPort(dt, "in", PortDirection.In);
|
|
63
|
+
const pOut = node.createPort(dt, "out", PortDirection.Out);
|
|
64
|
+
|
|
65
|
+
const i0 = g.createNode(node);
|
|
66
|
+
const i1 = g.createNode(node);
|
|
67
|
+
|
|
68
|
+
const connectionId = g.createConnection(i0, pOut, i1, pInt);
|
|
69
|
+
|
|
70
|
+
const connection = g.getConnection(connectionId);
|
|
71
|
+
|
|
72
|
+
expect(connection).toBeDefined();
|
|
73
|
+
expect(connection.id).toBe(connectionId);
|
|
74
|
+
|
|
75
|
+
});
|
|
76
|
+
|
|
54
77
|
test('getNode produces correct result', () => {
|
|
55
78
|
const graph = new NodeGraph();
|
|
56
79
|
|