From 901552ce3b543157a5555ac7ade53e42a97aa935 Mon Sep 17 00:00:00 2001 From: Eric Hebert Date: Sat, 7 Apr 2018 15:39:36 -0400 Subject: [PATCH 1/2] Entities are now stored in a Map This is because entity IDs are numeric, so they should be stored numerically instead of being converted to strings --- docs/ast/source/component_index.js.json | 4614 ++++---- docs/ast/source/entity.js.json | 1077 +- docs/ast/source/utilities.js.json | 938 +- docs/ast/source/world.js.json | 12195 ++++++++++------------ docs/class/src/world.js~World.html | 22 +- docs/coverage.json | 18 +- docs/file/src/component_index.js.html | 8 +- docs/file/src/entity.js.html | 6 +- docs/file/src/utilities.js.html | 10 + docs/file/src/world.js.html | 36 +- docs/index.json | 122 +- docs/source.html | 28 +- src/component_index.js | 8 +- src/entity.js | 6 +- src/utilities.js | 10 + src/world.js | 36 +- test/tests.js | 12 +- 17 files changed, 9441 insertions(+), 9705 deletions(-) diff --git a/docs/ast/source/component_index.js.json b/docs/ast/source/component_index.js.json index 6aac14a..a934996 100644 --- a/docs/ast/source/component_index.js.json +++ b/docs/ast/source/component_index.js.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 2479, + "end": 2452, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 93, + "line": 91, "column": 0 } }, "program": { "type": "Program", "start": 0, - "end": 2479, + "end": 2452, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 93, + "line": 91, "column": 0 } }, @@ -31,14 +31,14 @@ { "type": "ClassDeclaration", "start": 15, - "end": 2437, + "end": 2410, "loc": { "start": { "line": 2, "column": 0 }, "end": { - "line": 90, + "line": 88, "column": 1 } }, @@ -64,14 +64,14 @@ "body": { "type": "ClassBody", "start": 36, - "end": 2437, + "end": 2410, "loc": { "start": { "line": 2, "column": 21 }, "end": { - "line": 90, + "line": 88, "column": 1 } }, @@ -1557,14 +1557,14 @@ { "type": "ClassMethod", "start": 770, - "end": 1200, + "end": 1177, "loc": { "start": { "line": 31, "column": 1 }, "end": { - "line": 48, + "line": 46, "column": 2 } }, @@ -1632,14 +1632,14 @@ "body": { "type": "BlockStatement", "start": 798, - "end": 1200, + "end": 1177, "loc": { "start": { "line": 31, "column": 29 }, "end": { - "line": 48, + "line": 46, "column": 2 } }, @@ -1728,23 +1728,23 @@ "kind": "let" }, { - "type": "ForInStatement", + "type": "ForOfStatement", "start": 838, - "end": 1092, + "end": 1069, "loc": { "start": { "line": 34, "column": 2 }, "end": { - "line": 42, + "line": 40, "column": 3 } }, "left": { "type": "VariableDeclaration", "start": 843, - "end": 852, + "end": 867, "loc": { "start": { "line": 34, @@ -1752,87 +1752,121 @@ }, "end": { "line": 34, - "column": 16 + "column": 31 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 847, - "end": 852, + "start": 849, + "end": 867, "loc": { "start": { "line": 34, - "column": 11 + "column": 13 }, "end": { "line": 34, - "column": 16 + "column": 31 } }, "id": { - "type": "Identifier", - "start": 847, - "end": 852, + "type": "ArrayPattern", + "start": 849, + "end": 867, "loc": { "start": { "line": 34, - "column": 11 + "column": 13 }, "end": { "line": 34, - "column": 16 - }, - "identifierName": "entId" + "column": 31 + } }, - "name": "entId" + "elements": [ + { + "type": "Identifier", + "start": 850, + "end": 858, + "loc": { + "start": { + "line": 34, + "column": 14 + }, + "end": { + "line": 34, + "column": 22 + }, + "identifierName": "entityId" + }, + "name": "entityId" + }, + { + "type": "Identifier", + "start": 860, + "end": 866, + "loc": { + "start": { + "line": 34, + "column": 24 + }, + "end": { + "line": 34, + "column": 30 + }, + "identifierName": "entity" + }, + "name": "entity" + } + ] }, "init": null } ], - "kind": "let" + "kind": "const" }, "right": { "type": "MemberExpression", - "start": 856, - "end": 869, + "start": 871, + "end": 884, "loc": { "start": { "line": 34, - "column": 20 + "column": 35 }, "end": { "line": 34, - "column": 33 + "column": 48 } }, "object": { "type": "ThisExpression", - "start": 856, - "end": 860, + "start": 871, + "end": 875, "loc": { "start": { "line": 34, - "column": 20 + "column": 35 }, "end": { "line": 34, - "column": 24 + "column": 39 } } }, "property": { "type": "Identifier", - "start": 861, - "end": 869, + "start": 876, + "end": 884, "loc": { "start": { "line": 34, - "column": 25 + "column": 40 }, "end": { "line": 34, - "column": 33 + "column": 48 }, "identifierName": "entities" }, @@ -1842,223 +1876,72 @@ }, "body": { "type": "BlockStatement", - "start": 871, - "end": 1092, + "start": 886, + "end": 1069, "loc": { "start": { "line": 34, - "column": 35 + "column": 50 }, "end": { - "line": 42, + "line": 40, "column": 3 } }, "body": [ - { - "type": "VariableDeclaration", - "start": 876, - "end": 909, - "loc": { - "start": { - "line": 35, - "column": 3 - }, - "end": { - "line": 35, - "column": 36 - } - }, - "declarations": [ - { - "type": "VariableDeclarator", - "start": 880, - "end": 909, - "loc": { - "start": { - "line": 35, - "column": 7 - }, - "end": { - "line": 35, - "column": 36 - } - }, - "id": { - "type": "Identifier", - "start": 880, - "end": 886, - "loc": { - "start": { - "line": 35, - "column": 7 - }, - "end": { - "line": 35, - "column": 13 - }, - "identifierName": "entity" - }, - "name": "entity" - }, - "init": { - "type": "MemberExpression", - "start": 889, - "end": 909, - "loc": { - "start": { - "line": 35, - "column": 16 - }, - "end": { - "line": 35, - "column": 36 - } - }, - "object": { - "type": "MemberExpression", - "start": 889, - "end": 902, - "loc": { - "start": { - "line": 35, - "column": 16 - }, - "end": { - "line": 35, - "column": 29 - } - }, - "object": { - "type": "ThisExpression", - "start": 889, - "end": 893, - "loc": { - "start": { - "line": 35, - "column": 16 - }, - "end": { - "line": 35, - "column": 20 - } - } - }, - "property": { - "type": "Identifier", - "start": 894, - "end": 902, - "loc": { - "start": { - "line": 35, - "column": 21 - }, - "end": { - "line": 35, - "column": 29 - }, - "identifierName": "entities" - }, - "name": "entities" - }, - "computed": false - }, - "property": { - "type": "Identifier", - "start": 903, - "end": 908, - "loc": { - "start": { - "line": 35, - "column": 30 - }, - "end": { - "line": 35, - "column": 35 - }, - "identifierName": "entId" - }, - "name": "entId" - }, - "computed": true, - "trailingComments": null - }, - "trailingComments": null - } - ], - "kind": "let", - "trailingComments": [ - { - "type": "CommentLine", - "value": " Ensure entity contains all specified components", - "start": 914, - "end": 964, - "loc": { - "start": { - "line": 37, - "column": 3 - }, - "end": { - "line": 37, - "column": 53 - } - } - } - ] - }, { "type": "IfStatement", - "start": 968, - "end": 1088, + "start": 945, + "end": 1065, "loc": { "start": { - "line": 38, + "line": 36, "column": 3 }, "end": { - "line": 41, + "line": 39, "column": 4 } }, "test": { "type": "CallExpression", - "start": 972, - "end": 1001, + "start": 949, + "end": 978, "loc": { "start": { - "line": 38, + "line": 36, "column": 7 }, "end": { - "line": 38, + "line": 36, "column": 36 } }, "callee": { "type": "MemberExpression", - "start": 972, - "end": 982, + "start": 949, + "end": 959, "loc": { "start": { - "line": 38, + "line": 36, "column": 7 }, "end": { - "line": 38, + "line": 36, "column": 17 } }, "object": { "type": "Identifier", - "start": 972, - "end": 978, + "start": 949, + "end": 955, "loc": { "start": { - "line": 38, + "line": 36, "column": 7 }, "end": { - "line": 38, + "line": 36, "column": 13 }, "identifierName": "entity" @@ -2068,15 +1951,15 @@ }, "property": { "type": "Identifier", - "start": 979, - "end": 982, + "start": 956, + "end": 959, "loc": { "start": { - "line": 38, + "line": 36, "column": 14 }, "end": { - "line": 38, + "line": 36, "column": 17 }, "identifierName": "has" @@ -2089,29 +1972,29 @@ "arguments": [ { "type": "SpreadElement", - "start": 983, - "end": 1000, + "start": 960, + "end": 977, "loc": { "start": { - "line": 38, + "line": 36, "column": 18 }, "end": { - "line": 38, + "line": 36, "column": 35 } }, "argument": { "type": "Identifier", - "start": 986, - "end": 1000, + "start": 963, + "end": 977, "loc": { "start": { - "line": 38, + "line": 36, "column": 21 }, "end": { - "line": 38, + "line": 36, "column": 35 }, "identifierName": "componentNames" @@ -2124,72 +2007,72 @@ }, "consequent": { "type": "BlockStatement", - "start": 1003, - "end": 1088, + "start": 980, + "end": 1065, "loc": { "start": { - "line": 38, + "line": 36, "column": 38 }, "end": { - "line": 41, + "line": 39, "column": 4 } }, "body": [ { "type": "ExpressionStatement", - "start": 1036, - "end": 1083, + "start": 1013, + "end": 1060, "loc": { "start": { - "line": 40, + "line": 38, "column": 4 }, "end": { - "line": 40, + "line": 38, "column": 51 } }, "expression": { "type": "CallExpression", - "start": 1036, - "end": 1083, + "start": 1013, + "end": 1060, "loc": { "start": { - "line": 40, + "line": 38, "column": 4 }, "end": { - "line": 40, + "line": 38, "column": 51 } }, "callee": { "type": "MemberExpression", - "start": 1036, - "end": 1056, + "start": 1013, + "end": 1033, "loc": { "start": { - "line": 40, + "line": 38, "column": 4 }, "end": { - "line": 40, + "line": 38, "column": 24 } }, "object": { "type": "Identifier", - "start": 1036, - "end": 1052, + "start": 1013, + "end": 1029, "loc": { "start": { - "line": 40, + "line": 38, "column": 4 }, "end": { - "line": 40, + "line": 38, "column": 20 }, "identifierName": "matchingEntities" @@ -2199,15 +2082,15 @@ }, "property": { "type": "Identifier", - "start": 1053, - "end": 1056, + "start": 1030, + "end": 1033, "loc": { "start": { - "line": 40, + "line": 38, "column": 21 }, "end": { - "line": 40, + "line": 38, "column": 24 }, "identifierName": "set" @@ -2220,43 +2103,43 @@ "arguments": [ { "type": "CallExpression", - "start": 1057, - "end": 1074, + "start": 1034, + "end": 1051, "loc": { "start": { - "line": 40, + "line": 38, "column": 25 }, "end": { - "line": 40, + "line": 38, "column": 42 } }, "callee": { "type": "MemberExpression", - "start": 1057, - "end": 1072, + "start": 1034, + "end": 1049, "loc": { "start": { - "line": 40, + "line": 38, "column": 25 }, "end": { - "line": 40, + "line": 38, "column": 40 } }, "object": { "type": "Identifier", - "start": 1057, - "end": 1063, + "start": 1034, + "end": 1040, "loc": { "start": { - "line": 40, + "line": 38, "column": 25 }, "end": { - "line": 40, + "line": 38, "column": 31 }, "identifierName": "entity" @@ -2265,15 +2148,15 @@ }, "property": { "type": "Identifier", - "start": 1064, - "end": 1072, + "start": 1041, + "end": 1049, "loc": { "start": { - "line": 40, + "line": 38, "column": 32 }, "end": { - "line": 40, + "line": 38, "column": 40 }, "identifierName": "toString" @@ -2286,15 +2169,15 @@ }, { "type": "Identifier", - "start": 1076, - "end": 1082, + "start": 1053, + "end": 1059, "loc": { "start": { - "line": 40, + "line": 38, "column": 44 }, "end": { - "line": 40, + "line": 38, "column": 50 }, "identifierName": "entity" @@ -2308,15 +2191,15 @@ { "type": "CommentLine", "value": " Add entity to index", - "start": 1009, - "end": 1031, + "start": 986, + "end": 1008, "loc": { "start": { - "line": 39, + "line": 37, "column": 4 }, "end": { - "line": 39, + "line": 37, "column": 26 } } @@ -2331,15 +2214,15 @@ { "type": "CommentLine", "value": " Ensure entity contains all specified components", - "start": 914, - "end": 964, + "start": 891, + "end": 941, "loc": { "start": { - "line": 37, + "line": 35, "column": 3 }, "end": { - "line": 37, + "line": 35, "column": 53 } } @@ -2352,87 +2235,87 @@ }, { "type": "ReturnStatement", - "start": 1096, - "end": 1197, + "start": 1073, + "end": 1174, "loc": { "start": { - "line": 44, + "line": 42, "column": 2 }, "end": { - "line": 47, + "line": 45, "column": 3 } }, "argument": { "type": "AssignmentExpression", - "start": 1103, - "end": 1197, + "start": 1080, + "end": 1174, "loc": { "start": { - "line": 44, + "line": 42, "column": 9 }, "end": { - "line": 47, + "line": 45, "column": 3 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 1103, - "end": 1119, + "start": 1080, + "end": 1096, "loc": { "start": { - "line": 44, + "line": 42, "column": 9 }, "end": { - "line": 44, + "line": 42, "column": 25 } }, "object": { "type": "MemberExpression", - "start": 1103, - "end": 1113, + "start": 1080, + "end": 1090, "loc": { "start": { - "line": 44, + "line": 42, "column": 9 }, "end": { - "line": 44, + "line": 42, "column": 19 } }, "object": { "type": "ThisExpression", - "start": 1103, - "end": 1107, + "start": 1080, + "end": 1084, "loc": { "start": { - "line": 44, + "line": 42, "column": 9 }, "end": { - "line": 44, + "line": 42, "column": 13 } } }, "property": { "type": "Identifier", - "start": 1108, - "end": 1113, + "start": 1085, + "end": 1090, "loc": { "start": { - "line": 44, + "line": 42, "column": 14 }, "end": { - "line": 44, + "line": 42, "column": 19 }, "identifierName": "index" @@ -2443,15 +2326,15 @@ }, "property": { "type": "Identifier", - "start": 1114, - "end": 1118, + "start": 1091, + "end": 1095, "loc": { "start": { - "line": 44, + "line": 42, "column": 20 }, "end": { - "line": 44, + "line": 42, "column": 24 }, "identifierName": "hash" @@ -2462,30 +2345,30 @@ }, "right": { "type": "ObjectExpression", - "start": 1122, - "end": 1197, + "start": 1099, + "end": 1174, "loc": { "start": { - "line": 44, + "line": 42, "column": 28 }, "end": { - "line": 47, + "line": 45, "column": 3 } }, "properties": [ { "type": "ObjectProperty", - "start": 1127, - "end": 1162, + "start": 1104, + "end": 1139, "loc": { "start": { - "line": 45, + "line": 43, "column": 3 }, "end": { - "line": 45, + "line": 43, "column": 38 } }, @@ -2494,15 +2377,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 1127, - "end": 1137, + "start": 1104, + "end": 1114, "loc": { "start": { - "line": 45, + "line": 43, "column": 3 }, "end": { - "line": 45, + "line": 43, "column": 13 }, "identifierName": "components" @@ -2511,29 +2394,29 @@ }, "value": { "type": "NewExpression", - "start": 1139, - "end": 1162, + "start": 1116, + "end": 1139, "loc": { "start": { - "line": 45, + "line": 43, "column": 15 }, "end": { - "line": 45, + "line": 43, "column": 38 } }, "callee": { "type": "Identifier", - "start": 1143, - "end": 1146, + "start": 1120, + "end": 1123, "loc": { "start": { - "line": 45, + "line": 43, "column": 19 }, "end": { - "line": 45, + "line": 43, "column": 22 }, "identifierName": "Set" @@ -2543,15 +2426,15 @@ "arguments": [ { "type": "Identifier", - "start": 1147, - "end": 1161, + "start": 1124, + "end": 1138, "loc": { "start": { - "line": 45, + "line": 43, "column": 23 }, "end": { - "line": 45, + "line": 43, "column": 37 }, "identifierName": "componentNames" @@ -2563,15 +2446,15 @@ }, { "type": "ObjectProperty", - "start": 1167, - "end": 1193, + "start": 1144, + "end": 1170, "loc": { "start": { - "line": 46, + "line": 44, "column": 3 }, "end": { - "line": 46, + "line": 44, "column": 29 } }, @@ -2580,15 +2463,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 1167, - "end": 1175, + "start": 1144, + "end": 1152, "loc": { "start": { - "line": 46, + "line": 44, "column": 3 }, "end": { - "line": 46, + "line": 44, "column": 11 }, "identifierName": "entities" @@ -2597,15 +2480,15 @@ }, "value": { "type": "Identifier", - "start": 1177, - "end": 1193, + "start": 1154, + "end": 1170, "loc": { "start": { - "line": 46, + "line": 44, "column": 13 }, "end": { - "line": 46, + "line": 44, "column": 29 }, "identifierName": "matchingEntities" @@ -2659,15 +2542,15 @@ { "type": "CommentLine", "value": " Generic way to apply an operation to matching component groups", - "start": 1203, - "end": 1268, + "start": 1180, + "end": 1245, "loc": { "start": { - "line": 50, + "line": 48, "column": 1 }, "end": { - "line": 50, + "line": 48, "column": 66 } } @@ -2676,15 +2559,15 @@ }, { "type": "ClassMethod", - "start": 1270, - "end": 1784, + "start": 1247, + "end": 1761, "loc": { "start": { - "line": 51, + "line": 49, "column": 1 }, "end": { - "line": 65, + "line": 63, "column": 2 } }, @@ -2692,15 +2575,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 1270, - "end": 1275, + "start": 1247, + "end": 1252, "loc": { "start": { - "line": 51, + "line": 49, "column": 1 }, "end": { - "line": 51, + "line": 49, "column": 6 }, "identifierName": "apply" @@ -2716,15 +2599,15 @@ "params": [ { "type": "Identifier", - "start": 1276, - "end": 1290, + "start": 1253, + "end": 1267, "loc": { "start": { - "line": 51, + "line": 49, "column": 7 }, "end": { - "line": 51, + "line": 49, "column": 21 }, "identifierName": "componentNames" @@ -2733,15 +2616,15 @@ }, { "type": "Identifier", - "start": 1292, - "end": 1300, + "start": 1269, + "end": 1277, "loc": { "start": { - "line": 51, + "line": 49, "column": 23 }, "end": { - "line": 51, + "line": 49, "column": 31 }, "identifierName": "callback" @@ -2751,73 +2634,73 @@ ], "body": { "type": "BlockStatement", - "start": 1302, - "end": 1784, + "start": 1279, + "end": 1761, "loc": { "start": { - "line": 51, + "line": 49, "column": 33 }, "end": { - "line": 65, + "line": 63, "column": 2 } }, "body": [ { "type": "ForInStatement", - "start": 1306, - "end": 1781, + "start": 1283, + "end": 1758, "loc": { "start": { - "line": 52, + "line": 50, "column": 2 }, "end": { - "line": 64, + "line": 62, "column": 3 } }, "left": { "type": "VariableDeclaration", - "start": 1311, - "end": 1319, + "start": 1288, + "end": 1296, "loc": { "start": { - "line": 52, + "line": 50, "column": 7 }, "end": { - "line": 52, + "line": 50, "column": 15 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 1315, - "end": 1319, + "start": 1292, + "end": 1296, "loc": { "start": { - "line": 52, + "line": 50, "column": 11 }, "end": { - "line": 52, + "line": 50, "column": 15 } }, "id": { "type": "Identifier", - "start": 1315, - "end": 1319, + "start": 1292, + "end": 1296, "loc": { "start": { - "line": 52, + "line": 50, "column": 11 }, "end": { - "line": 52, + "line": 50, "column": 15 }, "identifierName": "hash" @@ -2831,44 +2714,44 @@ }, "right": { "type": "MemberExpression", - "start": 1323, - "end": 1333, + "start": 1300, + "end": 1310, "loc": { "start": { - "line": 52, + "line": 50, "column": 19 }, "end": { - "line": 52, + "line": 50, "column": 29 } }, "object": { "type": "ThisExpression", - "start": 1323, - "end": 1327, + "start": 1300, + "end": 1304, "loc": { "start": { - "line": 52, + "line": 50, "column": 19 }, "end": { - "line": 52, + "line": 50, "column": 23 } } }, "property": { "type": "Identifier", - "start": 1328, - "end": 1333, + "start": 1305, + "end": 1310, "loc": { "start": { - "line": 52, + "line": 50, "column": 24 }, "end": { - "line": 52, + "line": 50, "column": 29 }, "identifierName": "index" @@ -2879,59 +2762,59 @@ }, "body": { "type": "BlockStatement", - "start": 1335, - "end": 1781, + "start": 1312, + "end": 1758, "loc": { "start": { - "line": 52, + "line": 50, "column": 31 }, "end": { - "line": 64, + "line": 62, "column": 3 } }, "body": [ { "type": "VariableDeclaration", - "start": 1340, - "end": 1368, + "start": 1317, + "end": 1345, "loc": { "start": { - "line": 53, + "line": 51, "column": 3 }, "end": { - "line": 53, + "line": 51, "column": 31 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 1344, - "end": 1368, + "start": 1321, + "end": 1345, "loc": { "start": { - "line": 53, + "line": 51, "column": 7 }, "end": { - "line": 53, + "line": 51, "column": 31 } }, "id": { "type": "Identifier", - "start": 1344, - "end": 1349, + "start": 1321, + "end": 1326, "loc": { "start": { - "line": 53, + "line": 51, "column": 7 }, "end": { - "line": 53, + "line": 51, "column": 12 }, "identifierName": "group" @@ -2940,58 +2823,58 @@ }, "init": { "type": "MemberExpression", - "start": 1352, - "end": 1368, + "start": 1329, + "end": 1345, "loc": { "start": { - "line": 53, + "line": 51, "column": 15 }, "end": { - "line": 53, + "line": 51, "column": 31 } }, "object": { "type": "MemberExpression", - "start": 1352, - "end": 1362, + "start": 1329, + "end": 1339, "loc": { "start": { - "line": 53, + "line": 51, "column": 15 }, "end": { - "line": 53, + "line": 51, "column": 25 } }, "object": { "type": "ThisExpression", - "start": 1352, - "end": 1356, + "start": 1329, + "end": 1333, "loc": { "start": { - "line": 53, + "line": 51, "column": 15 }, "end": { - "line": 53, + "line": 51, "column": 19 } } }, "property": { "type": "Identifier", - "start": 1357, - "end": 1362, + "start": 1334, + "end": 1339, "loc": { "start": { - "line": 53, + "line": 51, "column": 20 }, "end": { - "line": 53, + "line": 51, "column": 25 }, "identifierName": "index" @@ -3002,15 +2885,15 @@ }, "property": { "type": "Identifier", - "start": 1363, - "end": 1367, + "start": 1340, + "end": 1344, "loc": { "start": { - "line": 53, + "line": 51, "column": 26 }, "end": { - "line": 53, + "line": 51, "column": 30 }, "identifierName": "hash" @@ -3028,15 +2911,15 @@ { "type": "CommentLine", "value": " Check if index group has any of the components that the entity has", - "start": 1373, - "end": 1442, + "start": 1350, + "end": 1419, "loc": { "start": { - "line": 55, + "line": 53, "column": 3 }, "end": { - "line": 55, + "line": 53, "column": 72 } } @@ -3045,44 +2928,44 @@ }, { "type": "VariableDeclaration", - "start": 1446, - "end": 1514, + "start": 1423, + "end": 1491, "loc": { "start": { - "line": 56, + "line": 54, "column": 3 }, "end": { - "line": 56, + "line": 54, "column": 71 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 1450, - "end": 1514, + "start": 1427, + "end": 1491, "loc": { "start": { - "line": 56, + "line": 54, "column": 7 }, "end": { - "line": 56, + "line": 54, "column": 71 } }, "id": { "type": "Identifier", - "start": 1450, - "end": 1456, + "start": 1427, + "end": 1433, "loc": { "start": { - "line": 56, + "line": 54, "column": 7 }, "end": { - "line": 56, + "line": 54, "column": 13 }, "identifierName": "hasAny" @@ -3092,43 +2975,43 @@ }, "init": { "type": "CallExpression", - "start": 1459, - "end": 1514, + "start": 1436, + "end": 1491, "loc": { "start": { - "line": 56, + "line": 54, "column": 16 }, "end": { - "line": 56, + "line": 54, "column": 71 } }, "callee": { "type": "MemberExpression", - "start": 1459, - "end": 1478, + "start": 1436, + "end": 1455, "loc": { "start": { - "line": 56, + "line": 54, "column": 16 }, "end": { - "line": 56, + "line": 54, "column": 35 } }, "object": { "type": "Identifier", - "start": 1459, - "end": 1473, + "start": 1436, + "end": 1450, "loc": { "start": { - "line": 56, + "line": 54, "column": 16 }, "end": { - "line": 56, + "line": 54, "column": 30 }, "identifierName": "componentNames" @@ -3137,15 +3020,15 @@ }, "property": { "type": "Identifier", - "start": 1474, - "end": 1478, + "start": 1451, + "end": 1455, "loc": { "start": { - "line": 56, + "line": 54, "column": 31 }, "end": { - "line": 56, + "line": 54, "column": 35 }, "identifierName": "some" @@ -3157,15 +3040,15 @@ "arguments": [ { "type": "ArrowFunctionExpression", - "start": 1479, - "end": 1513, + "start": 1456, + "end": 1490, "loc": { "start": { - "line": 56, + "line": 54, "column": 36 }, "end": { - "line": 56, + "line": 54, "column": 70 } }, @@ -3176,15 +3059,15 @@ "params": [ { "type": "Identifier", - "start": 1479, - "end": 1483, + "start": 1456, + "end": 1460, "loc": { "start": { - "line": 56, + "line": 54, "column": 36 }, "end": { - "line": 56, + "line": 54, "column": 40 }, "identifierName": "name" @@ -3194,57 +3077,57 @@ ], "body": { "type": "CallExpression", - "start": 1487, - "end": 1513, + "start": 1464, + "end": 1490, "loc": { "start": { - "line": 56, + "line": 54, "column": 44 }, "end": { - "line": 56, + "line": 54, "column": 70 } }, "callee": { "type": "MemberExpression", - "start": 1487, - "end": 1507, + "start": 1464, + "end": 1484, "loc": { "start": { - "line": 56, + "line": 54, "column": 44 }, "end": { - "line": 56, + "line": 54, "column": 64 } }, "object": { "type": "MemberExpression", - "start": 1487, - "end": 1503, + "start": 1464, + "end": 1480, "loc": { "start": { - "line": 56, + "line": 54, "column": 44 }, "end": { - "line": 56, + "line": 54, "column": 60 } }, "object": { "type": "Identifier", - "start": 1487, - "end": 1492, + "start": 1464, + "end": 1469, "loc": { "start": { - "line": 56, + "line": 54, "column": 44 }, "end": { - "line": 56, + "line": 54, "column": 49 }, "identifierName": "group" @@ -3253,15 +3136,15 @@ }, "property": { "type": "Identifier", - "start": 1493, - "end": 1503, + "start": 1470, + "end": 1480, "loc": { "start": { - "line": 56, + "line": 54, "column": 50 }, "end": { - "line": 56, + "line": 54, "column": 60 }, "identifierName": "components" @@ -3272,15 +3155,15 @@ }, "property": { "type": "Identifier", - "start": 1504, - "end": 1507, + "start": 1481, + "end": 1484, "loc": { "start": { - "line": 56, + "line": 54, "column": 61 }, "end": { - "line": 56, + "line": 54, "column": 64 }, "identifierName": "has" @@ -3292,15 +3175,15 @@ "arguments": [ { "type": "Identifier", - "start": 1508, - "end": 1512, + "start": 1485, + "end": 1489, "loc": { "start": { - "line": 56, + "line": 54, "column": 65 }, "end": { - "line": 56, + "line": 54, "column": 69 }, "identifierName": "name" @@ -3322,15 +3205,15 @@ { "type": "CommentLine", "value": " Check if index group has any of the components that the entity has", - "start": 1373, - "end": 1442, + "start": 1350, + "end": 1419, "loc": { "start": { - "line": 55, + "line": 53, "column": 3 }, "end": { - "line": 55, + "line": 53, "column": 72 } } @@ -3340,15 +3223,15 @@ { "type": "CommentLine", "value": " Check if the current index group is supposed to match all entities", - "start": 1519, - "end": 1588, + "start": 1496, + "end": 1565, "loc": { "start": { - "line": 58, + "line": 56, "column": 3 }, "end": { - "line": 58, + "line": 56, "column": 72 } } @@ -3357,44 +3240,44 @@ }, { "type": "VariableDeclaration", - "start": 1592, - "end": 1706, + "start": 1569, + "end": 1683, "loc": { "start": { - "line": 59, + "line": 57, "column": 3 }, "end": { - "line": 59, + "line": 57, "column": 117 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 1596, - "end": 1706, + "start": 1573, + "end": 1683, "loc": { "start": { - "line": 59, + "line": 57, "column": 7 }, "end": { - "line": 59, + "line": 57, "column": 117 } }, "id": { "type": "Identifier", - "start": 1596, - "end": 1611, + "start": 1573, + "end": 1588, "loc": { "start": { - "line": 59, + "line": 57, "column": 7 }, "end": { - "line": 59, + "line": 57, "column": 22 }, "identifierName": "isMatchAllGroup" @@ -3404,57 +3287,57 @@ }, "init": { "type": "LogicalExpression", - "start": 1615, - "end": 1705, + "start": 1592, + "end": 1682, "loc": { "start": { - "line": 59, + "line": 57, "column": 26 }, "end": { - "line": 59, + "line": 57, "column": 116 } }, "left": { "type": "LogicalExpression", - "start": 1616, - "end": 1674, + "start": 1593, + "end": 1651, "loc": { "start": { - "line": 59, + "line": 57, "column": 27 }, "end": { - "line": 59, + "line": 57, "column": 85 } }, "left": { "type": "BinaryExpression", - "start": 1616, - "end": 1643, + "start": 1593, + "end": 1620, "loc": { "start": { - "line": 59, + "line": 57, "column": 27 }, "end": { - "line": 59, + "line": 57, "column": 54 } }, "left": { "type": "Identifier", - "start": 1616, - "end": 1630, + "start": 1593, + "end": 1607, "loc": { "start": { - "line": 59, + "line": 57, "column": 27 }, "end": { - "line": 59, + "line": 57, "column": 41 }, "identifierName": "componentNames" @@ -3464,15 +3347,15 @@ "operator": "==", "right": { "type": "Identifier", - "start": 1634, - "end": 1643, + "start": 1611, + "end": 1620, "loc": { "start": { - "line": 59, + "line": 57, "column": 45 }, "end": { - "line": 59, + "line": 57, "column": 54 }, "identifierName": "undefined" @@ -3483,43 +3366,43 @@ "operator": "||", "right": { "type": "BinaryExpression", - "start": 1647, - "end": 1674, + "start": 1624, + "end": 1651, "loc": { "start": { - "line": 59, + "line": 57, "column": 58 }, "end": { - "line": 59, + "line": 57, "column": 85 } }, "left": { "type": "MemberExpression", - "start": 1647, - "end": 1668, + "start": 1624, + "end": 1645, "loc": { "start": { - "line": 59, + "line": 57, "column": 58 }, "end": { - "line": 59, + "line": 57, "column": 79 } }, "object": { "type": "Identifier", - "start": 1647, - "end": 1661, + "start": 1624, + "end": 1638, "loc": { "start": { - "line": 59, + "line": 57, "column": 58 }, "end": { - "line": 59, + "line": 57, "column": 72 }, "identifierName": "componentNames" @@ -3528,15 +3411,15 @@ }, "property": { "type": "Identifier", - "start": 1662, - "end": 1668, + "start": 1639, + "end": 1645, "loc": { "start": { - "line": 59, + "line": 57, "column": 73 }, "end": { - "line": 59, + "line": 57, "column": 79 }, "identifierName": "length" @@ -3548,15 +3431,15 @@ "operator": "===", "right": { "type": "NumericLiteral", - "start": 1673, - "end": 1674, + "start": 1650, + "end": 1651, "loc": { "start": { - "line": 59, + "line": 57, "column": 84 }, "end": { - "line": 59, + "line": 57, "column": 85 } }, @@ -3569,63 +3452,63 @@ }, "extra": { "parenthesized": true, - "parenStart": 1615 + "parenStart": 1592 } }, "operator": "&&", "right": { "type": "BinaryExpression", - "start": 1679, - "end": 1705, + "start": 1656, + "end": 1682, "loc": { "start": { - "line": 59, + "line": 57, "column": 90 }, "end": { - "line": 59, + "line": 57, "column": 116 } }, "left": { "type": "MemberExpression", - "start": 1679, - "end": 1700, + "start": 1656, + "end": 1677, "loc": { "start": { - "line": 59, + "line": 57, "column": 90 }, "end": { - "line": 59, + "line": 57, "column": 111 } }, "object": { "type": "MemberExpression", - "start": 1679, - "end": 1695, + "start": 1656, + "end": 1672, "loc": { "start": { - "line": 59, + "line": 57, "column": 90 }, "end": { - "line": 59, + "line": 57, "column": 106 } }, "object": { "type": "Identifier", - "start": 1679, - "end": 1684, + "start": 1656, + "end": 1661, "loc": { "start": { - "line": 59, + "line": 57, "column": 90 }, "end": { - "line": 59, + "line": 57, "column": 95 }, "identifierName": "group" @@ -3634,15 +3517,15 @@ }, "property": { "type": "Identifier", - "start": 1685, - "end": 1695, + "start": 1662, + "end": 1672, "loc": { "start": { - "line": 59, + "line": 57, "column": 96 }, "end": { - "line": 59, + "line": 57, "column": 106 }, "identifierName": "components" @@ -3653,15 +3536,15 @@ }, "property": { "type": "Identifier", - "start": 1696, - "end": 1700, + "start": 1673, + "end": 1677, "loc": { "start": { - "line": 59, + "line": 57, "column": 107 }, "end": { - "line": 59, + "line": 57, "column": 111 }, "identifierName": "size" @@ -3673,15 +3556,15 @@ "operator": "==", "right": { "type": "NumericLiteral", - "start": 1704, - "end": 1705, + "start": 1681, + "end": 1682, "loc": { "start": { - "line": 59, + "line": 57, "column": 115 }, "end": { - "line": 59, + "line": 57, "column": 116 } }, @@ -3694,7 +3577,7 @@ }, "extra": { "parenthesized": true, - "parenStart": 1614 + "parenStart": 1591 } }, "leadingComments": null @@ -3705,15 +3588,15 @@ { "type": "CommentLine", "value": " Check if the current index group is supposed to match all entities", - "start": 1519, - "end": 1588, + "start": 1496, + "end": 1565, "loc": { "start": { - "line": 58, + "line": 56, "column": 3 }, "end": { - "line": 58, + "line": 56, "column": 72 } } @@ -3722,43 +3605,43 @@ }, { "type": "IfStatement", - "start": 1711, - "end": 1777, + "start": 1688, + "end": 1754, "loc": { "start": { - "line": 61, + "line": 59, "column": 3 }, "end": { - "line": 63, + "line": 61, "column": 4 } }, "test": { "type": "LogicalExpression", - "start": 1715, - "end": 1740, + "start": 1692, + "end": 1717, "loc": { "start": { - "line": 61, + "line": 59, "column": 7 }, "end": { - "line": 61, + "line": 59, "column": 32 } }, "left": { "type": "Identifier", - "start": 1715, - "end": 1721, + "start": 1692, + "end": 1698, "loc": { "start": { - "line": 61, + "line": 59, "column": 7 }, "end": { - "line": 61, + "line": 59, "column": 13 }, "identifierName": "hasAny" @@ -3768,15 +3651,15 @@ "operator": "||", "right": { "type": "Identifier", - "start": 1725, - "end": 1740, + "start": 1702, + "end": 1717, "loc": { "start": { - "line": 61, + "line": 59, "column": 17 }, "end": { - "line": 61, + "line": 59, "column": 32 }, "identifierName": "isMatchAllGroup" @@ -3786,58 +3669,58 @@ }, "consequent": { "type": "BlockStatement", - "start": 1742, - "end": 1777, + "start": 1719, + "end": 1754, "loc": { "start": { - "line": 61, + "line": 59, "column": 34 }, "end": { - "line": 63, + "line": 61, "column": 4 } }, "body": [ { "type": "ExpressionStatement", - "start": 1748, - "end": 1772, + "start": 1725, + "end": 1749, "loc": { "start": { - "line": 62, + "line": 60, "column": 4 }, "end": { - "line": 62, + "line": 60, "column": 28 } }, "expression": { "type": "CallExpression", - "start": 1748, - "end": 1772, + "start": 1725, + "end": 1749, "loc": { "start": { - "line": 62, + "line": 60, "column": 4 }, "end": { - "line": 62, + "line": 60, "column": 28 } }, "callee": { "type": "Identifier", - "start": 1748, - "end": 1756, + "start": 1725, + "end": 1733, "loc": { "start": { - "line": 62, + "line": 60, "column": 4 }, "end": { - "line": 62, + "line": 60, "column": 12 }, "identifierName": "callback" @@ -3847,29 +3730,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 1757, - "end": 1771, + "start": 1734, + "end": 1748, "loc": { "start": { - "line": 62, + "line": 60, "column": 13 }, "end": { - "line": 62, + "line": 60, "column": 27 } }, "object": { "type": "Identifier", - "start": 1757, - "end": 1762, + "start": 1734, + "end": 1739, "loc": { "start": { - "line": 62, + "line": 60, "column": 13 }, "end": { - "line": 62, + "line": 60, "column": 18 }, "identifierName": "group" @@ -3878,15 +3761,15 @@ }, "property": { "type": "Identifier", - "start": 1763, - "end": 1771, + "start": 1740, + "end": 1748, "loc": { "start": { - "line": 62, + "line": 60, "column": 19 }, "end": { - "line": 62, + "line": 60, "column": 27 }, "identifierName": "entities" @@ -3915,15 +3798,15 @@ { "type": "CommentLine", "value": " Generic way to apply an operation to matching component groups", - "start": 1203, - "end": 1268, + "start": 1180, + "end": 1245, "loc": { "start": { - "line": 50, + "line": 48, "column": 1 }, "end": { - "line": 50, + "line": 48, "column": 66 } } @@ -3933,15 +3816,15 @@ { "type": "CommentLine", "value": " Update an entity in the index (for creating components)", - "start": 1787, - "end": 1845, + "start": 1764, + "end": 1822, "loc": { "start": { - "line": 67, + "line": 65, "column": 1 }, "end": { - "line": 67, + "line": 65, "column": 59 } } @@ -3950,15 +3833,15 @@ }, { "type": "ClassMethod", - "start": 1847, - "end": 1975, + "start": 1824, + "end": 1950, "loc": { "start": { - "line": 68, + "line": 66, "column": 1 }, "end": { - "line": 72, + "line": 70, "column": 2 } }, @@ -3966,15 +3849,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 1847, - "end": 1850, + "start": 1824, + "end": 1827, "loc": { "start": { - "line": 68, + "line": 66, "column": 1 }, "end": { - "line": 68, + "line": 66, "column": 4 }, "identifierName": "add" @@ -3990,15 +3873,15 @@ "params": [ { "type": "Identifier", - "start": 1851, - "end": 1857, + "start": 1828, + "end": 1834, "loc": { "start": { - "line": 68, + "line": 66, "column": 5 }, "end": { - "line": 68, + "line": 66, "column": 11 }, "identifierName": "entity" @@ -4007,29 +3890,29 @@ }, { "type": "RestElement", - "start": 1859, - "end": 1876, + "start": 1836, + "end": 1853, "loc": { "start": { - "line": 68, + "line": 66, "column": 13 }, "end": { - "line": 68, + "line": 66, "column": 30 } }, "argument": { "type": "Identifier", - "start": 1862, - "end": 1876, + "start": 1839, + "end": 1853, "loc": { "start": { - "line": 68, + "line": 66, "column": 16 }, "end": { - "line": 68, + "line": 66, "column": 30 }, "identifierName": "componentNames" @@ -4040,87 +3923,87 @@ ], "body": { "type": "BlockStatement", - "start": 1878, - "end": 1975, + "start": 1855, + "end": 1950, "loc": { "start": { - "line": 68, + "line": 66, "column": 32 }, "end": { - "line": 72, + "line": 70, "column": 2 } }, "body": [ { "type": "ExpressionStatement", - "start": 1882, - "end": 1972, + "start": 1859, + "end": 1947, "loc": { "start": { - "line": 69, + "line": 67, "column": 2 }, "end": { - "line": 71, + "line": 69, "column": 4 } }, "expression": { "type": "CallExpression", - "start": 1882, - "end": 1972, + "start": 1859, + "end": 1947, "loc": { "start": { - "line": 69, + "line": 67, "column": 2 }, "end": { - "line": 71, + "line": 69, "column": 4 } }, "callee": { "type": "MemberExpression", - "start": 1882, - "end": 1892, + "start": 1859, + "end": 1869, "loc": { "start": { - "line": 69, + "line": 67, "column": 2 }, "end": { - "line": 69, + "line": 67, "column": 12 } }, "object": { "type": "ThisExpression", - "start": 1882, - "end": 1886, + "start": 1859, + "end": 1863, "loc": { "start": { - "line": 69, + "line": 67, "column": 2 }, "end": { - "line": 69, + "line": 67, "column": 6 } } }, "property": { "type": "Identifier", - "start": 1887, - "end": 1892, + "start": 1864, + "end": 1869, "loc": { "start": { - "line": 69, + "line": 67, "column": 7 }, "end": { - "line": 69, + "line": 67, "column": 12 }, "identifierName": "apply" @@ -4132,15 +4015,15 @@ "arguments": [ { "type": "Identifier", - "start": 1893, - "end": 1907, + "start": 1870, + "end": 1884, "loc": { "start": { - "line": 69, + "line": 67, "column": 13 }, "end": { - "line": 69, + "line": 67, "column": 27 }, "identifierName": "componentNames" @@ -4149,15 +4032,15 @@ }, { "type": "ArrowFunctionExpression", - "start": 1909, - "end": 1971, + "start": 1886, + "end": 1946, "loc": { "start": { - "line": 69, + "line": 67, "column": 29 }, "end": { - "line": 71, + "line": 69, "column": 3 } }, @@ -4168,16 +4051,16 @@ "params": [ { "type": "Identifier", - "start": 1910, - "end": 1918, + "start": 1886, + "end": 1894, "loc": { "start": { - "line": 69, - "column": 30 + "line": 67, + "column": 29 }, "end": { - "line": 69, - "column": 38 + "line": 67, + "column": 37 }, "identifierName": "entities" }, @@ -4186,72 +4069,72 @@ ], "body": { "type": "BlockStatement", - "start": 1923, - "end": 1971, + "start": 1898, + "end": 1946, "loc": { "start": { - "line": 69, - "column": 43 + "line": 67, + "column": 41 }, "end": { - "line": 71, + "line": 69, "column": 3 } }, "body": [ { "type": "ExpressionStatement", - "start": 1928, - "end": 1967, + "start": 1903, + "end": 1942, "loc": { "start": { - "line": 70, + "line": 68, "column": 3 }, "end": { - "line": 70, + "line": 68, "column": 42 } }, "expression": { "type": "CallExpression", - "start": 1928, - "end": 1967, + "start": 1903, + "end": 1942, "loc": { "start": { - "line": 70, + "line": 68, "column": 3 }, "end": { - "line": 70, + "line": 68, "column": 42 } }, "callee": { "type": "MemberExpression", - "start": 1928, - "end": 1940, + "start": 1903, + "end": 1915, "loc": { "start": { - "line": 70, + "line": 68, "column": 3 }, "end": { - "line": 70, + "line": 68, "column": 15 } }, "object": { "type": "Identifier", - "start": 1928, - "end": 1936, + "start": 1903, + "end": 1911, "loc": { "start": { - "line": 70, + "line": 68, "column": 3 }, "end": { - "line": 70, + "line": 68, "column": 11 }, "identifierName": "entities" @@ -4260,15 +4143,15 @@ }, "property": { "type": "Identifier", - "start": 1937, - "end": 1940, + "start": 1912, + "end": 1915, "loc": { "start": { - "line": 70, + "line": 68, "column": 12 }, "end": { - "line": 70, + "line": 68, "column": 15 }, "identifierName": "set" @@ -4280,43 +4163,43 @@ "arguments": [ { "type": "CallExpression", - "start": 1941, - "end": 1958, + "start": 1916, + "end": 1933, "loc": { "start": { - "line": 70, + "line": 68, "column": 16 }, "end": { - "line": 70, + "line": 68, "column": 33 } }, "callee": { "type": "MemberExpression", - "start": 1941, - "end": 1956, + "start": 1916, + "end": 1931, "loc": { "start": { - "line": 70, + "line": 68, "column": 16 }, "end": { - "line": 70, + "line": 68, "column": 31 } }, "object": { "type": "Identifier", - "start": 1941, - "end": 1947, + "start": 1916, + "end": 1922, "loc": { "start": { - "line": 70, + "line": 68, "column": 16 }, "end": { - "line": 70, + "line": 68, "column": 22 }, "identifierName": "entity" @@ -4325,15 +4208,15 @@ }, "property": { "type": "Identifier", - "start": 1948, - "end": 1956, + "start": 1923, + "end": 1931, "loc": { "start": { - "line": 70, + "line": 68, "column": 23 }, "end": { - "line": 70, + "line": 68, "column": 31 }, "identifierName": "toString" @@ -4346,15 +4229,15 @@ }, { "type": "Identifier", - "start": 1960, - "end": 1966, + "start": 1935, + "end": 1941, "loc": { "start": { - "line": 70, + "line": 68, "column": 35 }, "end": { - "line": 70, + "line": 68, "column": 41 }, "identifierName": "entity" @@ -4379,15 +4262,15 @@ { "type": "CommentLine", "value": " Update an entity in the index (for creating components)", - "start": 1787, - "end": 1845, + "start": 1764, + "end": 1822, "loc": { "start": { - "line": 67, + "line": 65, "column": 1 }, "end": { - "line": 67, + "line": 65, "column": 59 } } @@ -4397,15 +4280,15 @@ { "type": "CommentLine", "value": " Update an entity in the index (for removing components)", - "start": 1978, - "end": 2036, + "start": 1953, + "end": 2011, "loc": { "start": { - "line": 74, + "line": 72, "column": 1 }, "end": { - "line": 74, + "line": 72, "column": 59 } } @@ -4414,15 +4297,15 @@ }, { "type": "ClassMethod", - "start": 2038, - "end": 2164, + "start": 2013, + "end": 2137, "loc": { "start": { - "line": 75, + "line": 73, "column": 1 }, "end": { - "line": 79, + "line": 77, "column": 2 } }, @@ -4430,15 +4313,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 2038, - "end": 2044, + "start": 2013, + "end": 2019, "loc": { "start": { - "line": 75, + "line": 73, "column": 1 }, "end": { - "line": 75, + "line": 73, "column": 7 }, "identifierName": "remove" @@ -4454,15 +4337,15 @@ "params": [ { "type": "Identifier", - "start": 2045, - "end": 2051, + "start": 2020, + "end": 2026, "loc": { "start": { - "line": 75, + "line": 73, "column": 8 }, "end": { - "line": 75, + "line": 73, "column": 14 }, "identifierName": "entity" @@ -4471,29 +4354,29 @@ }, { "type": "RestElement", - "start": 2053, - "end": 2070, + "start": 2028, + "end": 2045, "loc": { "start": { - "line": 75, + "line": 73, "column": 16 }, "end": { - "line": 75, + "line": 73, "column": 33 } }, "argument": { "type": "Identifier", - "start": 2056, - "end": 2070, + "start": 2031, + "end": 2045, "loc": { "start": { - "line": 75, + "line": 73, "column": 19 }, "end": { - "line": 75, + "line": 73, "column": 33 }, "identifierName": "componentNames" @@ -4504,87 +4387,87 @@ ], "body": { "type": "BlockStatement", - "start": 2072, - "end": 2164, + "start": 2047, + "end": 2137, "loc": { "start": { - "line": 75, + "line": 73, "column": 35 }, "end": { - "line": 79, + "line": 77, "column": 2 } }, "body": [ { "type": "ExpressionStatement", - "start": 2076, - "end": 2161, + "start": 2051, + "end": 2134, "loc": { "start": { - "line": 76, + "line": 74, "column": 2 }, "end": { - "line": 78, + "line": 76, "column": 4 } }, "expression": { "type": "CallExpression", - "start": 2076, - "end": 2161, + "start": 2051, + "end": 2134, "loc": { "start": { - "line": 76, + "line": 74, "column": 2 }, "end": { - "line": 78, + "line": 76, "column": 4 } }, "callee": { "type": "MemberExpression", - "start": 2076, - "end": 2086, + "start": 2051, + "end": 2061, "loc": { "start": { - "line": 76, + "line": 74, "column": 2 }, "end": { - "line": 76, + "line": 74, "column": 12 } }, "object": { "type": "ThisExpression", - "start": 2076, - "end": 2080, + "start": 2051, + "end": 2055, "loc": { "start": { - "line": 76, + "line": 74, "column": 2 }, "end": { - "line": 76, + "line": 74, "column": 6 } } }, "property": { "type": "Identifier", - "start": 2081, - "end": 2086, + "start": 2056, + "end": 2061, "loc": { "start": { - "line": 76, + "line": 74, "column": 7 }, "end": { - "line": 76, + "line": 74, "column": 12 }, "identifierName": "apply" @@ -4596,15 +4479,15 @@ "arguments": [ { "type": "Identifier", - "start": 2087, - "end": 2101, + "start": 2062, + "end": 2076, "loc": { "start": { - "line": 76, + "line": 74, "column": 13 }, "end": { - "line": 76, + "line": 74, "column": 27 }, "identifierName": "componentNames" @@ -4613,15 +4496,15 @@ }, { "type": "ArrowFunctionExpression", - "start": 2103, - "end": 2160, + "start": 2078, + "end": 2133, "loc": { "start": { - "line": 76, + "line": 74, "column": 29 }, "end": { - "line": 78, + "line": 76, "column": 3 } }, @@ -4632,16 +4515,16 @@ "params": [ { "type": "Identifier", - "start": 2104, - "end": 2112, + "start": 2078, + "end": 2086, "loc": { "start": { - "line": 76, - "column": 30 + "line": 74, + "column": 29 }, "end": { - "line": 76, - "column": 38 + "line": 74, + "column": 37 }, "identifierName": "entities" }, @@ -4650,72 +4533,72 @@ ], "body": { "type": "BlockStatement", - "start": 2117, - "end": 2160, + "start": 2090, + "end": 2133, "loc": { "start": { - "line": 76, - "column": 43 + "line": 74, + "column": 41 }, "end": { - "line": 78, + "line": 76, "column": 3 } }, "body": [ { "type": "ExpressionStatement", - "start": 2122, - "end": 2156, + "start": 2095, + "end": 2129, "loc": { "start": { - "line": 77, + "line": 75, "column": 3 }, "end": { - "line": 77, + "line": 75, "column": 37 } }, "expression": { "type": "CallExpression", - "start": 2122, - "end": 2156, + "start": 2095, + "end": 2129, "loc": { "start": { - "line": 77, + "line": 75, "column": 3 }, "end": { - "line": 77, + "line": 75, "column": 37 } }, "callee": { "type": "MemberExpression", - "start": 2122, - "end": 2137, + "start": 2095, + "end": 2110, "loc": { "start": { - "line": 77, + "line": 75, "column": 3 }, "end": { - "line": 77, + "line": 75, "column": 18 } }, "object": { "type": "Identifier", - "start": 2122, - "end": 2130, + "start": 2095, + "end": 2103, "loc": { "start": { - "line": 77, + "line": 75, "column": 3 }, "end": { - "line": 77, + "line": 75, "column": 11 }, "identifierName": "entities" @@ -4724,15 +4607,15 @@ }, "property": { "type": "Identifier", - "start": 2131, - "end": 2137, + "start": 2104, + "end": 2110, "loc": { "start": { - "line": 77, + "line": 75, "column": 12 }, "end": { - "line": 77, + "line": 75, "column": 18 }, "identifierName": "delete" @@ -4744,43 +4627,43 @@ "arguments": [ { "type": "CallExpression", - "start": 2138, - "end": 2155, + "start": 2111, + "end": 2128, "loc": { "start": { - "line": 77, + "line": 75, "column": 19 }, "end": { - "line": 77, + "line": 75, "column": 36 } }, "callee": { "type": "MemberExpression", - "start": 2138, - "end": 2153, + "start": 2111, + "end": 2126, "loc": { "start": { - "line": 77, + "line": 75, "column": 19 }, "end": { - "line": 77, + "line": 75, "column": 34 } }, "object": { "type": "Identifier", - "start": 2138, - "end": 2144, + "start": 2111, + "end": 2117, "loc": { "start": { - "line": 77, + "line": 75, "column": 19 }, "end": { - "line": 77, + "line": 75, "column": 25 }, "identifierName": "entity" @@ -4789,15 +4672,15 @@ }, "property": { "type": "Identifier", - "start": 2145, - "end": 2153, + "start": 2118, + "end": 2126, "loc": { "start": { - "line": 77, + "line": 75, "column": 26 }, "end": { - "line": 77, + "line": 75, "column": 34 }, "identifierName": "toString" @@ -4826,15 +4709,15 @@ { "type": "CommentLine", "value": " Update an entity in the index (for removing components)", - "start": 1978, - "end": 2036, + "start": 1953, + "end": 2011, "loc": { "start": { - "line": 74, + "line": 72, "column": 1 }, "end": { - "line": 74, + "line": 72, "column": 59 } } @@ -4844,15 +4727,15 @@ { "type": "CommentLine", "value": " Add an entity and all of its components to the index", - "start": 2167, - "end": 2222, + "start": 2140, + "end": 2195, "loc": { "start": { - "line": 81, + "line": 79, "column": 1 }, "end": { - "line": 81, + "line": 79, "column": 56 } } @@ -4861,15 +4744,15 @@ }, { "type": "ClassMethod", - "start": 2224, - "end": 2294, + "start": 2197, + "end": 2267, "loc": { "start": { - "line": 82, + "line": 80, "column": 1 }, "end": { - "line": 84, + "line": 82, "column": 2 } }, @@ -4877,15 +4760,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 2224, - "end": 2233, + "start": 2197, + "end": 2206, "loc": { "start": { - "line": 82, + "line": 80, "column": 1 }, "end": { - "line": 82, + "line": 80, "column": 10 }, "identifierName": "addEntity" @@ -4901,15 +4784,15 @@ "params": [ { "type": "Identifier", - "start": 2234, - "end": 2240, + "start": 2207, + "end": 2213, "loc": { "start": { - "line": 82, + "line": 80, "column": 11 }, "end": { - "line": 82, + "line": 80, "column": 17 }, "identifierName": "entity" @@ -4919,87 +4802,87 @@ ], "body": { "type": "BlockStatement", - "start": 2242, - "end": 2294, + "start": 2215, + "end": 2267, "loc": { "start": { - "line": 82, + "line": 80, "column": 19 }, "end": { - "line": 84, + "line": 82, "column": 2 } }, "body": [ { "type": "ExpressionStatement", - "start": 2246, - "end": 2291, + "start": 2219, + "end": 2264, "loc": { "start": { - "line": 83, + "line": 81, "column": 2 }, "end": { - "line": 83, + "line": 81, "column": 47 } }, "expression": { "type": "CallExpression", - "start": 2246, - "end": 2291, + "start": 2219, + "end": 2264, "loc": { "start": { - "line": 83, + "line": 81, "column": 2 }, "end": { - "line": 83, + "line": 81, "column": 47 } }, "callee": { "type": "MemberExpression", - "start": 2246, - "end": 2254, + "start": 2219, + "end": 2227, "loc": { "start": { - "line": 83, + "line": 81, "column": 2 }, "end": { - "line": 83, + "line": 81, "column": 10 } }, "object": { "type": "ThisExpression", - "start": 2246, - "end": 2250, + "start": 2219, + "end": 2223, "loc": { "start": { - "line": 83, + "line": 81, "column": 2 }, "end": { - "line": 83, + "line": 81, "column": 6 } } }, "property": { "type": "Identifier", - "start": 2251, - "end": 2254, + "start": 2224, + "end": 2227, "loc": { "start": { - "line": 83, + "line": 81, "column": 7 }, "end": { - "line": 83, + "line": 81, "column": 10 }, "identifierName": "add" @@ -5011,15 +4894,15 @@ "arguments": [ { "type": "Identifier", - "start": 2255, - "end": 2261, + "start": 2228, + "end": 2234, "loc": { "start": { - "line": 83, + "line": 81, "column": 11 }, "end": { - "line": 83, + "line": 81, "column": 17 }, "identifierName": "entity" @@ -5028,57 +4911,57 @@ }, { "type": "SpreadElement", - "start": 2263, - "end": 2290, + "start": 2236, + "end": 2263, "loc": { "start": { - "line": 83, + "line": 81, "column": 19 }, "end": { - "line": 83, + "line": 81, "column": 46 } }, "argument": { "type": "CallExpression", - "start": 2266, - "end": 2290, + "start": 2239, + "end": 2263, "loc": { "start": { - "line": 83, + "line": 81, "column": 22 }, "end": { - "line": 83, + "line": 81, "column": 46 } }, "callee": { "type": "MemberExpression", - "start": 2266, - "end": 2277, + "start": 2239, + "end": 2250, "loc": { "start": { - "line": 83, + "line": 81, "column": 22 }, "end": { - "line": 83, + "line": 81, "column": 33 } }, "object": { "type": "Identifier", - "start": 2266, - "end": 2272, + "start": 2239, + "end": 2245, "loc": { "start": { - "line": 83, + "line": 81, "column": 22 }, "end": { - "line": 83, + "line": 81, "column": 28 }, "identifierName": "Object" @@ -5087,15 +4970,15 @@ }, "property": { "type": "Identifier", - "start": 2273, - "end": 2277, + "start": 2246, + "end": 2250, "loc": { "start": { - "line": 83, + "line": 81, "column": 29 }, "end": { - "line": 83, + "line": 81, "column": 33 }, "identifierName": "keys" @@ -5107,29 +4990,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 2278, - "end": 2289, + "start": 2251, + "end": 2262, "loc": { "start": { - "line": 83, + "line": 81, "column": 34 }, "end": { - "line": 83, + "line": 81, "column": 45 } }, "object": { "type": "Identifier", - "start": 2278, - "end": 2284, + "start": 2251, + "end": 2257, "loc": { "start": { - "line": 83, + "line": 81, "column": 34 }, "end": { - "line": 83, + "line": 81, "column": 40 }, "identifierName": "entity" @@ -5138,15 +5021,15 @@ }, "property": { "type": "Identifier", - "start": 2285, - "end": 2289, + "start": 2258, + "end": 2262, "loc": { "start": { - "line": 83, + "line": 81, "column": 41 }, "end": { - "line": 83, + "line": 81, "column": 45 }, "identifierName": "data" @@ -5169,15 +5052,15 @@ { "type": "CommentLine", "value": " Add an entity and all of its components to the index", - "start": 2167, - "end": 2222, + "start": 2140, + "end": 2195, "loc": { "start": { - "line": 81, + "line": 79, "column": 1 }, "end": { - "line": 81, + "line": 79, "column": 56 } } @@ -5187,15 +5070,15 @@ { "type": "CommentLine", "value": " Remove an entity and all of its components from the index", - "start": 2297, - "end": 2357, + "start": 2270, + "end": 2330, "loc": { "start": { - "line": 86, + "line": 84, "column": 1 }, "end": { - "line": 86, + "line": 84, "column": 61 } } @@ -5204,15 +5087,15 @@ }, { "type": "ClassMethod", - "start": 2359, - "end": 2435, + "start": 2332, + "end": 2408, "loc": { "start": { - "line": 87, + "line": 85, "column": 1 }, "end": { - "line": 89, + "line": 87, "column": 2 } }, @@ -5220,15 +5103,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 2359, - "end": 2371, + "start": 2332, + "end": 2344, "loc": { "start": { - "line": 87, + "line": 85, "column": 1 }, "end": { - "line": 87, + "line": 85, "column": 13 }, "identifierName": "removeEntity" @@ -5244,15 +5127,15 @@ "params": [ { "type": "Identifier", - "start": 2372, - "end": 2378, + "start": 2345, + "end": 2351, "loc": { "start": { - "line": 87, + "line": 85, "column": 14 }, "end": { - "line": 87, + "line": 85, "column": 20 }, "identifierName": "entity" @@ -5262,87 +5145,87 @@ ], "body": { "type": "BlockStatement", - "start": 2380, - "end": 2435, + "start": 2353, + "end": 2408, "loc": { "start": { - "line": 87, + "line": 85, "column": 22 }, "end": { - "line": 89, + "line": 87, "column": 2 } }, "body": [ { "type": "ExpressionStatement", - "start": 2384, - "end": 2432, + "start": 2357, + "end": 2405, "loc": { "start": { - "line": 88, + "line": 86, "column": 2 }, "end": { - "line": 88, + "line": 86, "column": 50 } }, "expression": { "type": "CallExpression", - "start": 2384, - "end": 2432, + "start": 2357, + "end": 2405, "loc": { "start": { - "line": 88, + "line": 86, "column": 2 }, "end": { - "line": 88, + "line": 86, "column": 50 } }, "callee": { "type": "MemberExpression", - "start": 2384, - "end": 2395, + "start": 2357, + "end": 2368, "loc": { "start": { - "line": 88, + "line": 86, "column": 2 }, "end": { - "line": 88, + "line": 86, "column": 13 } }, "object": { "type": "ThisExpression", - "start": 2384, - "end": 2388, + "start": 2357, + "end": 2361, "loc": { "start": { - "line": 88, + "line": 86, "column": 2 }, "end": { - "line": 88, + "line": 86, "column": 6 } } }, "property": { "type": "Identifier", - "start": 2389, - "end": 2395, + "start": 2362, + "end": 2368, "loc": { "start": { - "line": 88, + "line": 86, "column": 7 }, "end": { - "line": 88, + "line": 86, "column": 13 }, "identifierName": "remove" @@ -5354,15 +5237,15 @@ "arguments": [ { "type": "Identifier", - "start": 2396, - "end": 2402, + "start": 2369, + "end": 2375, "loc": { "start": { - "line": 88, + "line": 86, "column": 14 }, "end": { - "line": 88, + "line": 86, "column": 20 }, "identifierName": "entity" @@ -5371,57 +5254,57 @@ }, { "type": "SpreadElement", - "start": 2404, - "end": 2431, + "start": 2377, + "end": 2404, "loc": { "start": { - "line": 88, + "line": 86, "column": 22 }, "end": { - "line": 88, + "line": 86, "column": 49 } }, "argument": { "type": "CallExpression", - "start": 2407, - "end": 2431, + "start": 2380, + "end": 2404, "loc": { "start": { - "line": 88, + "line": 86, "column": 25 }, "end": { - "line": 88, + "line": 86, "column": 49 } }, "callee": { "type": "MemberExpression", - "start": 2407, - "end": 2418, + "start": 2380, + "end": 2391, "loc": { "start": { - "line": 88, + "line": 86, "column": 25 }, "end": { - "line": 88, + "line": 86, "column": 36 } }, "object": { "type": "Identifier", - "start": 2407, - "end": 2413, + "start": 2380, + "end": 2386, "loc": { "start": { - "line": 88, + "line": 86, "column": 25 }, "end": { - "line": 88, + "line": 86, "column": 31 }, "identifierName": "Object" @@ -5430,15 +5313,15 @@ }, "property": { "type": "Identifier", - "start": 2414, - "end": 2418, + "start": 2387, + "end": 2391, "loc": { "start": { - "line": 88, + "line": 86, "column": 32 }, "end": { - "line": 88, + "line": 86, "column": 36 }, "identifierName": "keys" @@ -5450,29 +5333,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 2419, - "end": 2430, + "start": 2392, + "end": 2403, "loc": { "start": { - "line": 88, + "line": 86, "column": 37 }, "end": { - "line": 88, + "line": 86, "column": 48 } }, "object": { "type": "Identifier", - "start": 2419, - "end": 2425, + "start": 2392, + "end": 2398, "loc": { "start": { - "line": 88, + "line": 86, "column": 37 }, "end": { - "line": 88, + "line": 86, "column": 43 }, "identifierName": "entity" @@ -5481,15 +5364,15 @@ }, "property": { "type": "Identifier", - "start": 2426, - "end": 2430, + "start": 2399, + "end": 2403, "loc": { "start": { - "line": 88, + "line": 86, "column": 44 }, "end": { - "line": 88, + "line": 86, "column": 48 }, "identifierName": "data" @@ -5511,15 +5394,15 @@ { "type": "CommentLine", "value": " Remove an entity and all of its components from the index", - "start": 2297, - "end": 2357, + "start": 2270, + "end": 2330, "loc": { "start": { - "line": 86, + "line": 84, "column": 1 }, "end": { - "line": 86, + "line": 84, "column": 61 } } @@ -5549,58 +5432,58 @@ }, { "type": "ExpressionStatement", - "start": 2439, - "end": 2478, + "start": 2412, + "end": 2451, "loc": { "start": { - "line": 92, + "line": 90, "column": 0 }, "end": { - "line": 92, + "line": 90, "column": 39 } }, "expression": { "type": "AssignmentExpression", - "start": 2439, - "end": 2478, + "start": 2412, + "end": 2451, "loc": { "start": { - "line": 92, + "line": 90, "column": 0 }, "end": { - "line": 92, + "line": 90, "column": 39 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 2439, - "end": 2461, + "start": 2412, + "end": 2434, "loc": { "start": { - "line": 92, + "line": 90, "column": 0 }, "end": { - "line": 92, + "line": 90, "column": 22 } }, "object": { "type": "Identifier", - "start": 2439, - "end": 2446, + "start": 2412, + "end": 2419, "loc": { "start": { - "line": 92, + "line": 90, "column": 0 }, "end": { - "line": 92, + "line": 90, "column": 7 }, "identifierName": "exports" @@ -5609,15 +5492,15 @@ }, "property": { "type": "Identifier", - "start": 2447, - "end": 2461, + "start": 2420, + "end": 2434, "loc": { "start": { - "line": 92, + "line": 90, "column": 8 }, "end": { - "line": 92, + "line": 90, "column": 22 }, "identifierName": "ComponentIndex" @@ -5628,15 +5511,15 @@ }, "right": { "type": "Identifier", - "start": 2464, - "end": 2478, + "start": 2437, + "end": 2451, "loc": { "start": { - "line": 92, + "line": 90, "column": 25 }, "end": { - "line": 92, + "line": 90, "column": 39 }, "identifierName": "ComponentIndex" @@ -5748,15 +5631,15 @@ { "type": "CommentLine", "value": " Ensure entity contains all specified components", - "start": 914, - "end": 964, + "start": 891, + "end": 941, "loc": { "start": { - "line": 37, + "line": 35, "column": 3 }, "end": { - "line": 37, + "line": 35, "column": 53 } } @@ -5764,15 +5647,15 @@ { "type": "CommentLine", "value": " Add entity to index", - "start": 1009, - "end": 1031, + "start": 986, + "end": 1008, "loc": { "start": { - "line": 39, + "line": 37, "column": 4 }, "end": { - "line": 39, + "line": 37, "column": 26 } } @@ -5780,15 +5663,15 @@ { "type": "CommentLine", "value": " Generic way to apply an operation to matching component groups", - "start": 1203, - "end": 1268, + "start": 1180, + "end": 1245, "loc": { "start": { - "line": 50, + "line": 48, "column": 1 }, "end": { - "line": 50, + "line": 48, "column": 66 } } @@ -5796,15 +5679,15 @@ { "type": "CommentLine", "value": " Check if index group has any of the components that the entity has", - "start": 1373, - "end": 1442, + "start": 1350, + "end": 1419, "loc": { "start": { - "line": 55, + "line": 53, "column": 3 }, "end": { - "line": 55, + "line": 53, "column": 72 } } @@ -5812,15 +5695,15 @@ { "type": "CommentLine", "value": " Check if the current index group is supposed to match all entities", - "start": 1519, - "end": 1588, + "start": 1496, + "end": 1565, "loc": { "start": { - "line": 58, + "line": 56, "column": 3 }, "end": { - "line": 58, + "line": 56, "column": 72 } } @@ -5828,15 +5711,15 @@ { "type": "CommentLine", "value": " Update an entity in the index (for creating components)", - "start": 1787, - "end": 1845, + "start": 1764, + "end": 1822, "loc": { "start": { - "line": 67, + "line": 65, "column": 1 }, "end": { - "line": 67, + "line": 65, "column": 59 } } @@ -5844,15 +5727,15 @@ { "type": "CommentLine", "value": " Update an entity in the index (for removing components)", - "start": 1978, - "end": 2036, + "start": 1953, + "end": 2011, "loc": { "start": { - "line": 74, + "line": 72, "column": 1 }, "end": { - "line": 74, + "line": 72, "column": 59 } } @@ -5860,15 +5743,15 @@ { "type": "CommentLine", "value": " Add an entity and all of its components to the index", - "start": 2167, - "end": 2222, + "start": 2140, + "end": 2195, "loc": { "start": { - "line": 81, + "line": 79, "column": 1 }, "end": { - "line": 81, + "line": 79, "column": 56 } } @@ -5876,15 +5759,15 @@ { "type": "CommentLine", "value": " Remove an entity and all of its components from the index", - "start": 2297, - "end": 2357, + "start": 2270, + "end": 2330, "loc": { "start": { - "line": 86, + "line": 84, "column": 1 }, "end": { - "line": 86, + "line": 84, "column": 61 } } @@ -9028,8 +8911,8 @@ }, { "type": { - "label": "let", - "keyword": "let", + "label": "const", + "keyword": "const", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, @@ -9040,9 +8923,9 @@ "binop": null, "updateContext": null }, - "value": "let", + "value": "const", "start": 843, - "end": 846, + "end": 848, "loc": { "start": { "line": 34, @@ -9050,70 +8933,67 @@ }, "end": { "line": 34, - "column": 10 + "column": 12 } } }, { "type": { - "label": "name", - "beforeExpr": false, + "label": "[", + "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "entId", - "start": 847, - "end": 852, + "start": 849, + "end": 850, "loc": { "start": { "line": 34, - "column": 11 + "column": 13 }, "end": { "line": 34, - "column": 16 + "column": 14 } } }, { "type": { - "label": "in", - "keyword": "in", - "beforeExpr": true, - "startsExpr": false, + "label": "name", + "beforeExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": 7, - "updateContext": null + "binop": null }, - "value": "in", - "start": 853, - "end": 855, + "value": "entityId", + "start": 850, + "end": 858, "loc": { "start": { "line": 34, - "column": 17 + "column": 14 }, "end": { "line": 34, - "column": 19 + "column": 22 } } }, { "type": { - "label": "this", - "keyword": "this", - "beforeExpr": false, - "startsExpr": true, + "label": ",", + "beforeExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -9122,35 +9002,34 @@ "binop": null, "updateContext": null }, - "value": "this", - "start": 856, - "end": 860, + "start": 858, + "end": 859, "loc": { "start": { "line": 34, - "column": 20 + "column": 22 }, "end": { "line": 34, - "column": 24 + "column": 23 } } }, { "type": { - "label": ".", + "label": "name", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, + "value": "entity", "start": 860, - "end": 861, + "end": 866, "loc": { "start": { "line": 34, @@ -9158,41 +9037,41 @@ }, "end": { "line": 34, - "column": 25 + "column": 30 } } }, { "type": { - "label": "name", + "label": "]", "beforeExpr": false, - "startsExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "entities", - "start": 861, - "end": 869, + "start": 866, + "end": 867, "loc": { "start": { "line": 34, - "column": 25 + "column": 30 }, "end": { "line": 34, - "column": 33 + "column": 31 } } }, { "type": { - "label": ")", + "label": "name", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -9200,12 +9079,13 @@ "postfix": false, "binop": null }, - "start": 869, + "value": "of", + "start": 868, "end": 870, "loc": { "start": { "line": 34, - "column": 33 + "column": 32 }, "end": { "line": 34, @@ -9215,18 +9095,21 @@ }, { "type": { - "label": "{", - "beforeExpr": true, + "label": "this", + "keyword": "this", + "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, + "value": "this", "start": 871, - "end": 872, + "end": 875, "loc": { "start": { "line": 34, @@ -9234,14 +9117,13 @@ }, "end": { "line": 34, - "column": 36 + "column": 39 } } }, { "type": { - "label": "let", - "keyword": "let", + "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, @@ -9252,17 +9134,16 @@ "binop": null, "updateContext": null }, - "value": "let", - "start": 876, - "end": 879, + "start": 875, + "end": 876, "loc": { "start": { - "line": 35, - "column": 3 + "line": 34, + "column": 39 }, "end": { - "line": 35, - "column": 6 + "line": 34, + "column": 40 } } }, @@ -9278,78 +9159,90 @@ "postfix": false, "binop": null }, - "value": "entity", - "start": 880, - "end": 886, + "value": "entities", + "start": 876, + "end": 884, "loc": { "start": { - "line": 35, - "column": 7 + "line": 34, + "column": 40 }, "end": { - "line": 35, - "column": 13 + "line": 34, + "column": 48 } } }, { "type": { - "label": "=", - "beforeExpr": true, + "label": ")", + "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, - "isAssign": true, + "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "=", - "start": 887, - "end": 888, + "start": 884, + "end": 885, "loc": { "start": { - "line": 35, - "column": 14 + "line": 34, + "column": 48 }, "end": { - "line": 35, - "column": 15 + "line": 34, + "column": 49 } } }, { "type": { - "label": "this", - "keyword": "this", - "beforeExpr": false, + "label": "{", + "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "this", - "start": 889, - "end": 893, + "start": 886, + "end": 887, + "loc": { + "start": { + "line": 34, + "column": 50 + }, + "end": { + "line": 34, + "column": 51 + } + } + }, + { + "type": "CommentLine", + "value": " Ensure entity contains all specified components", + "start": 891, + "end": 941, "loc": { "start": { "line": 35, - "column": 16 + "column": 3 }, "end": { "line": 35, - "column": 20 + "column": 53 } } }, { "type": { - "label": ".", + "label": "if", + "keyword": "if", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, @@ -9360,23 +9253,24 @@ "binop": null, "updateContext": null }, - "start": 893, - "end": 894, + "value": "if", + "start": 945, + "end": 947, "loc": { "start": { - "line": 35, - "column": 20 + "line": 36, + "column": 3 }, "end": { - "line": 35, - "column": 21 + "line": 36, + "column": 5 } } }, { "type": { - "label": "name", - "beforeExpr": false, + "label": "(", + "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, @@ -9385,241 +9279,93 @@ "postfix": false, "binop": null }, - "value": "entities", - "start": 894, - "end": 902, + "start": 948, + "end": 949, "loc": { "start": { - "line": 35, - "column": 21 + "line": 36, + "column": 6 }, "end": { - "line": 35, - "column": 29 + "line": 36, + "column": 7 } } }, { "type": { - "label": "[", - "beforeExpr": true, + "label": "name", + "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "start": 902, - "end": 903, + "value": "entity", + "start": 949, + "end": 955, "loc": { "start": { - "line": 35, - "column": 29 + "line": 36, + "column": 7 }, "end": { - "line": 35, - "column": 30 + "line": 36, + "column": 13 } } }, { "type": { - "label": "name", + "label": ".", "beforeExpr": false, - "startsExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "entId", - "start": 903, - "end": 908, + "start": 955, + "end": 956, "loc": { "start": { - "line": 35, - "column": 30 + "line": 36, + "column": 13 }, "end": { - "line": 35, - "column": 35 + "line": 36, + "column": 14 } } }, { "type": { - "label": "]", + "label": "name", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "start": 908, - "end": 909, + "value": "has", + "start": 956, + "end": 959, "loc": { "start": { - "line": 35, - "column": 35 + "line": 36, + "column": 14 }, "end": { - "line": 35, - "column": 36 - } - } - }, - { - "type": "CommentLine", - "value": " Ensure entity contains all specified components", - "start": 914, - "end": 964, - "loc": { - "start": { - "line": 37, - "column": 3 - }, - "end": { - "line": 37, - "column": 53 - } - } - }, - { - "type": { - "label": "if", - "keyword": "if", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "if", - "start": 968, - "end": 970, - "loc": { - "start": { - "line": 38, - "column": 3 - }, - "end": { - "line": 38, - "column": 5 - } - } - }, - { - "type": { - "label": "(", - "beforeExpr": true, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 971, - "end": 972, - "loc": { - "start": { - "line": 38, - "column": 6 - }, - "end": { - "line": 38, - "column": 7 - } - } - }, - { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "entity", - "start": 972, - "end": 978, - "loc": { - "start": { - "line": 38, - "column": 7 - }, - "end": { - "line": 38, - "column": 13 - } - } - }, - { - "type": { - "label": ".", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "start": 978, - "end": 979, - "loc": { - "start": { - "line": 38, - "column": 13 - }, - "end": { - "line": 38, - "column": 14 - } - } - }, - { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "has", - "start": 979, - "end": 982, - "loc": { - "start": { - "line": 38, - "column": 14 - }, - "end": { - "line": 38, + "line": 36, "column": 17 } } @@ -9636,15 +9382,15 @@ "postfix": false, "binop": null }, - "start": 982, - "end": 983, + "start": 959, + "end": 960, "loc": { "start": { - "line": 38, + "line": 36, "column": 17 }, "end": { - "line": 38, + "line": 36, "column": 18 } } @@ -9662,15 +9408,15 @@ "binop": null, "updateContext": null }, - "start": 983, - "end": 986, + "start": 960, + "end": 963, "loc": { "start": { - "line": 38, + "line": 36, "column": 18 }, "end": { - "line": 38, + "line": 36, "column": 21 } } @@ -9688,15 +9434,15 @@ "binop": null }, "value": "componentNames", - "start": 986, - "end": 1000, + "start": 963, + "end": 977, "loc": { "start": { - "line": 38, + "line": 36, "column": 21 }, "end": { - "line": 38, + "line": 36, "column": 35 } } @@ -9713,15 +9459,15 @@ "postfix": false, "binop": null }, - "start": 1000, - "end": 1001, + "start": 977, + "end": 978, "loc": { "start": { - "line": 38, + "line": 36, "column": 35 }, "end": { - "line": 38, + "line": 36, "column": 36 } } @@ -9738,15 +9484,15 @@ "postfix": false, "binop": null }, - "start": 1001, - "end": 1002, + "start": 978, + "end": 979, "loc": { "start": { - "line": 38, + "line": 36, "column": 36 }, "end": { - "line": 38, + "line": 36, "column": 37 } } @@ -9763,15 +9509,15 @@ "postfix": false, "binop": null }, - "start": 1003, - "end": 1004, + "start": 980, + "end": 981, "loc": { "start": { - "line": 38, + "line": 36, "column": 38 }, "end": { - "line": 38, + "line": 36, "column": 39 } } @@ -9779,15 +9525,15 @@ { "type": "CommentLine", "value": " Add entity to index", - "start": 1009, - "end": 1031, + "start": 986, + "end": 1008, "loc": { "start": { - "line": 39, + "line": 37, "column": 4 }, "end": { - "line": 39, + "line": 37, "column": 26 } } @@ -9805,15 +9551,15 @@ "binop": null }, "value": "matchingEntities", - "start": 1036, - "end": 1052, + "start": 1013, + "end": 1029, "loc": { "start": { - "line": 40, + "line": 38, "column": 4 }, "end": { - "line": 40, + "line": 38, "column": 20 } } @@ -9831,15 +9577,15 @@ "binop": null, "updateContext": null }, - "start": 1052, - "end": 1053, + "start": 1029, + "end": 1030, "loc": { "start": { - "line": 40, + "line": 38, "column": 20 }, "end": { - "line": 40, + "line": 38, "column": 21 } } @@ -9857,15 +9603,15 @@ "binop": null }, "value": "set", - "start": 1053, - "end": 1056, + "start": 1030, + "end": 1033, "loc": { "start": { - "line": 40, + "line": 38, "column": 21 }, "end": { - "line": 40, + "line": 38, "column": 24 } } @@ -9882,15 +9628,15 @@ "postfix": false, "binop": null }, - "start": 1056, - "end": 1057, + "start": 1033, + "end": 1034, "loc": { "start": { - "line": 40, + "line": 38, "column": 24 }, "end": { - "line": 40, + "line": 38, "column": 25 } } @@ -9908,15 +9654,15 @@ "binop": null }, "value": "entity", - "start": 1057, - "end": 1063, + "start": 1034, + "end": 1040, "loc": { "start": { - "line": 40, + "line": 38, "column": 25 }, "end": { - "line": 40, + "line": 38, "column": 31 } } @@ -9934,15 +9680,15 @@ "binop": null, "updateContext": null }, - "start": 1063, - "end": 1064, + "start": 1040, + "end": 1041, "loc": { "start": { - "line": 40, + "line": 38, "column": 31 }, "end": { - "line": 40, + "line": 38, "column": 32 } } @@ -9960,15 +9706,15 @@ "binop": null }, "value": "toString", - "start": 1064, - "end": 1072, + "start": 1041, + "end": 1049, "loc": { "start": { - "line": 40, + "line": 38, "column": 32 }, "end": { - "line": 40, + "line": 38, "column": 40 } } @@ -9985,15 +9731,15 @@ "postfix": false, "binop": null }, - "start": 1072, - "end": 1073, + "start": 1049, + "end": 1050, "loc": { "start": { - "line": 40, + "line": 38, "column": 40 }, "end": { - "line": 40, + "line": 38, "column": 41 } } @@ -10010,15 +9756,15 @@ "postfix": false, "binop": null }, - "start": 1073, - "end": 1074, + "start": 1050, + "end": 1051, "loc": { "start": { - "line": 40, + "line": 38, "column": 41 }, "end": { - "line": 40, + "line": 38, "column": 42 } } @@ -10036,15 +9782,15 @@ "binop": null, "updateContext": null }, - "start": 1074, - "end": 1075, + "start": 1051, + "end": 1052, "loc": { "start": { - "line": 40, + "line": 38, "column": 42 }, "end": { - "line": 40, + "line": 38, "column": 43 } } @@ -10062,15 +9808,15 @@ "binop": null }, "value": "entity", - "start": 1076, - "end": 1082, + "start": 1053, + "end": 1059, "loc": { "start": { - "line": 40, + "line": 38, "column": 44 }, "end": { - "line": 40, + "line": 38, "column": 50 } } @@ -10087,15 +9833,15 @@ "postfix": false, "binop": null }, - "start": 1082, - "end": 1083, + "start": 1059, + "end": 1060, "loc": { "start": { - "line": 40, + "line": 38, "column": 50 }, "end": { - "line": 40, + "line": 38, "column": 51 } } @@ -10112,15 +9858,15 @@ "postfix": false, "binop": null }, - "start": 1087, - "end": 1088, + "start": 1064, + "end": 1065, "loc": { "start": { - "line": 41, + "line": 39, "column": 3 }, "end": { - "line": 41, + "line": 39, "column": 4 } } @@ -10137,15 +9883,15 @@ "postfix": false, "binop": null }, - "start": 1091, - "end": 1092, + "start": 1068, + "end": 1069, "loc": { "start": { - "line": 42, + "line": 40, "column": 2 }, "end": { - "line": 42, + "line": 40, "column": 3 } } @@ -10165,15 +9911,15 @@ "updateContext": null }, "value": "return", - "start": 1096, - "end": 1102, + "start": 1073, + "end": 1079, "loc": { "start": { - "line": 44, + "line": 42, "column": 2 }, "end": { - "line": 44, + "line": 42, "column": 8 } } @@ -10193,15 +9939,15 @@ "updateContext": null }, "value": "this", - "start": 1103, - "end": 1107, + "start": 1080, + "end": 1084, "loc": { "start": { - "line": 44, + "line": 42, "column": 9 }, "end": { - "line": 44, + "line": 42, "column": 13 } } @@ -10219,15 +9965,15 @@ "binop": null, "updateContext": null }, - "start": 1107, - "end": 1108, + "start": 1084, + "end": 1085, "loc": { "start": { - "line": 44, + "line": 42, "column": 13 }, "end": { - "line": 44, + "line": 42, "column": 14 } } @@ -10245,15 +9991,15 @@ "binop": null }, "value": "index", - "start": 1108, - "end": 1113, + "start": 1085, + "end": 1090, "loc": { "start": { - "line": 44, + "line": 42, "column": 14 }, "end": { - "line": 44, + "line": 42, "column": 19 } } @@ -10271,15 +10017,15 @@ "binop": null, "updateContext": null }, - "start": 1113, - "end": 1114, + "start": 1090, + "end": 1091, "loc": { "start": { - "line": 44, + "line": 42, "column": 19 }, "end": { - "line": 44, + "line": 42, "column": 20 } } @@ -10297,15 +10043,15 @@ "binop": null }, "value": "hash", - "start": 1114, - "end": 1118, + "start": 1091, + "end": 1095, "loc": { "start": { - "line": 44, + "line": 42, "column": 20 }, "end": { - "line": 44, + "line": 42, "column": 24 } } @@ -10323,15 +10069,15 @@ "binop": null, "updateContext": null }, - "start": 1118, - "end": 1119, + "start": 1095, + "end": 1096, "loc": { "start": { - "line": 44, + "line": 42, "column": 24 }, "end": { - "line": 44, + "line": 42, "column": 25 } } @@ -10350,15 +10096,15 @@ "updateContext": null }, "value": "=", - "start": 1120, - "end": 1121, + "start": 1097, + "end": 1098, "loc": { "start": { - "line": 44, + "line": 42, "column": 26 }, "end": { - "line": 44, + "line": 42, "column": 27 } } @@ -10375,15 +10121,15 @@ "postfix": false, "binop": null }, - "start": 1122, - "end": 1123, + "start": 1099, + "end": 1100, "loc": { "start": { - "line": 44, + "line": 42, "column": 28 }, "end": { - "line": 44, + "line": 42, "column": 29 } } @@ -10401,15 +10147,15 @@ "binop": null }, "value": "components", - "start": 1127, - "end": 1137, + "start": 1104, + "end": 1114, "loc": { "start": { - "line": 45, + "line": 43, "column": 3 }, "end": { - "line": 45, + "line": 43, "column": 13 } } @@ -10427,15 +10173,15 @@ "binop": null, "updateContext": null }, - "start": 1137, - "end": 1138, + "start": 1114, + "end": 1115, "loc": { "start": { - "line": 45, + "line": 43, "column": 13 }, "end": { - "line": 45, + "line": 43, "column": 14 } } @@ -10455,15 +10201,15 @@ "updateContext": null }, "value": "new", - "start": 1139, - "end": 1142, + "start": 1116, + "end": 1119, "loc": { "start": { - "line": 45, + "line": 43, "column": 15 }, "end": { - "line": 45, + "line": 43, "column": 18 } } @@ -10481,15 +10227,15 @@ "binop": null }, "value": "Set", - "start": 1143, - "end": 1146, + "start": 1120, + "end": 1123, "loc": { "start": { - "line": 45, + "line": 43, "column": 19 }, "end": { - "line": 45, + "line": 43, "column": 22 } } @@ -10506,15 +10252,15 @@ "postfix": false, "binop": null }, - "start": 1146, - "end": 1147, + "start": 1123, + "end": 1124, "loc": { "start": { - "line": 45, + "line": 43, "column": 22 }, "end": { - "line": 45, + "line": 43, "column": 23 } } @@ -10532,15 +10278,15 @@ "binop": null }, "value": "componentNames", - "start": 1147, - "end": 1161, + "start": 1124, + "end": 1138, "loc": { "start": { - "line": 45, + "line": 43, "column": 23 }, "end": { - "line": 45, + "line": 43, "column": 37 } } @@ -10557,15 +10303,15 @@ "postfix": false, "binop": null }, - "start": 1161, - "end": 1162, + "start": 1138, + "end": 1139, "loc": { "start": { - "line": 45, + "line": 43, "column": 37 }, "end": { - "line": 45, + "line": 43, "column": 38 } } @@ -10583,15 +10329,15 @@ "binop": null, "updateContext": null }, - "start": 1162, - "end": 1163, + "start": 1139, + "end": 1140, "loc": { "start": { - "line": 45, + "line": 43, "column": 38 }, "end": { - "line": 45, + "line": 43, "column": 39 } } @@ -10609,15 +10355,15 @@ "binop": null }, "value": "entities", - "start": 1167, - "end": 1175, + "start": 1144, + "end": 1152, "loc": { "start": { - "line": 46, + "line": 44, "column": 3 }, "end": { - "line": 46, + "line": 44, "column": 11 } } @@ -10635,15 +10381,15 @@ "binop": null, "updateContext": null }, - "start": 1175, - "end": 1176, + "start": 1152, + "end": 1153, "loc": { "start": { - "line": 46, + "line": 44, "column": 11 }, "end": { - "line": 46, + "line": 44, "column": 12 } } @@ -10661,15 +10407,15 @@ "binop": null }, "value": "matchingEntities", - "start": 1177, - "end": 1193, + "start": 1154, + "end": 1170, "loc": { "start": { - "line": 46, + "line": 44, "column": 13 }, "end": { - "line": 46, + "line": 44, "column": 29 } } @@ -10686,15 +10432,15 @@ "postfix": false, "binop": null }, - "start": 1196, - "end": 1197, + "start": 1173, + "end": 1174, "loc": { "start": { - "line": 47, + "line": 45, "column": 2 }, "end": { - "line": 47, + "line": 45, "column": 3 } } @@ -10711,15 +10457,15 @@ "postfix": false, "binop": null }, - "start": 1199, - "end": 1200, + "start": 1176, + "end": 1177, "loc": { "start": { - "line": 48, + "line": 46, "column": 1 }, "end": { - "line": 48, + "line": 46, "column": 2 } } @@ -10727,15 +10473,15 @@ { "type": "CommentLine", "value": " Generic way to apply an operation to matching component groups", - "start": 1203, - "end": 1268, + "start": 1180, + "end": 1245, "loc": { "start": { - "line": 50, + "line": 48, "column": 1 }, "end": { - "line": 50, + "line": 48, "column": 66 } } @@ -10753,15 +10499,15 @@ "binop": null }, "value": "apply", - "start": 1270, - "end": 1275, + "start": 1247, + "end": 1252, "loc": { "start": { - "line": 51, + "line": 49, "column": 1 }, "end": { - "line": 51, + "line": 49, "column": 6 } } @@ -10778,15 +10524,15 @@ "postfix": false, "binop": null }, - "start": 1275, - "end": 1276, + "start": 1252, + "end": 1253, "loc": { "start": { - "line": 51, + "line": 49, "column": 6 }, "end": { - "line": 51, + "line": 49, "column": 7 } } @@ -10804,15 +10550,15 @@ "binop": null }, "value": "componentNames", - "start": 1276, - "end": 1290, + "start": 1253, + "end": 1267, "loc": { "start": { - "line": 51, + "line": 49, "column": 7 }, "end": { - "line": 51, + "line": 49, "column": 21 } } @@ -10830,15 +10576,15 @@ "binop": null, "updateContext": null }, - "start": 1290, - "end": 1291, + "start": 1267, + "end": 1268, "loc": { "start": { - "line": 51, + "line": 49, "column": 21 }, "end": { - "line": 51, + "line": 49, "column": 22 } } @@ -10856,15 +10602,15 @@ "binop": null }, "value": "callback", - "start": 1292, - "end": 1300, + "start": 1269, + "end": 1277, "loc": { "start": { - "line": 51, + "line": 49, "column": 23 }, "end": { - "line": 51, + "line": 49, "column": 31 } } @@ -10881,15 +10627,15 @@ "postfix": false, "binop": null }, - "start": 1300, - "end": 1301, + "start": 1277, + "end": 1278, "loc": { "start": { - "line": 51, + "line": 49, "column": 31 }, "end": { - "line": 51, + "line": 49, "column": 32 } } @@ -10906,15 +10652,15 @@ "postfix": false, "binop": null }, - "start": 1302, - "end": 1303, + "start": 1279, + "end": 1280, "loc": { "start": { - "line": 51, + "line": 49, "column": 33 }, "end": { - "line": 51, + "line": 49, "column": 34 } } @@ -10934,15 +10680,15 @@ "updateContext": null }, "value": "for", - "start": 1306, - "end": 1309, + "start": 1283, + "end": 1286, "loc": { "start": { - "line": 52, + "line": 50, "column": 2 }, "end": { - "line": 52, + "line": 50, "column": 5 } } @@ -10959,15 +10705,15 @@ "postfix": false, "binop": null }, - "start": 1310, - "end": 1311, + "start": 1287, + "end": 1288, "loc": { "start": { - "line": 52, + "line": 50, "column": 6 }, "end": { - "line": 52, + "line": 50, "column": 7 } } @@ -10987,15 +10733,15 @@ "updateContext": null }, "value": "let", - "start": 1311, - "end": 1314, + "start": 1288, + "end": 1291, "loc": { "start": { - "line": 52, + "line": 50, "column": 7 }, "end": { - "line": 52, + "line": 50, "column": 10 } } @@ -11013,15 +10759,15 @@ "binop": null }, "value": "hash", - "start": 1315, - "end": 1319, + "start": 1292, + "end": 1296, "loc": { "start": { - "line": 52, + "line": 50, "column": 11 }, "end": { - "line": 52, + "line": 50, "column": 15 } } @@ -11041,15 +10787,15 @@ "updateContext": null }, "value": "in", - "start": 1320, - "end": 1322, + "start": 1297, + "end": 1299, "loc": { "start": { - "line": 52, + "line": 50, "column": 16 }, "end": { - "line": 52, + "line": 50, "column": 18 } } @@ -11069,15 +10815,15 @@ "updateContext": null }, "value": "this", - "start": 1323, - "end": 1327, + "start": 1300, + "end": 1304, "loc": { "start": { - "line": 52, + "line": 50, "column": 19 }, "end": { - "line": 52, + "line": 50, "column": 23 } } @@ -11095,15 +10841,15 @@ "binop": null, "updateContext": null }, - "start": 1327, - "end": 1328, + "start": 1304, + "end": 1305, "loc": { "start": { - "line": 52, + "line": 50, "column": 23 }, "end": { - "line": 52, + "line": 50, "column": 24 } } @@ -11121,15 +10867,15 @@ "binop": null }, "value": "index", - "start": 1328, - "end": 1333, + "start": 1305, + "end": 1310, "loc": { "start": { - "line": 52, + "line": 50, "column": 24 }, "end": { - "line": 52, + "line": 50, "column": 29 } } @@ -11146,15 +10892,15 @@ "postfix": false, "binop": null }, - "start": 1333, - "end": 1334, + "start": 1310, + "end": 1311, "loc": { "start": { - "line": 52, + "line": 50, "column": 29 }, "end": { - "line": 52, + "line": 50, "column": 30 } } @@ -11171,15 +10917,15 @@ "postfix": false, "binop": null }, - "start": 1335, - "end": 1336, + "start": 1312, + "end": 1313, "loc": { "start": { - "line": 52, + "line": 50, "column": 31 }, "end": { - "line": 52, + "line": 50, "column": 32 } } @@ -11199,15 +10945,15 @@ "updateContext": null }, "value": "let", - "start": 1340, - "end": 1343, + "start": 1317, + "end": 1320, "loc": { "start": { - "line": 53, + "line": 51, "column": 3 }, "end": { - "line": 53, + "line": 51, "column": 6 } } @@ -11225,15 +10971,15 @@ "binop": null }, "value": "group", - "start": 1344, - "end": 1349, + "start": 1321, + "end": 1326, "loc": { "start": { - "line": 53, + "line": 51, "column": 7 }, "end": { - "line": 53, + "line": 51, "column": 12 } } @@ -11252,15 +10998,15 @@ "updateContext": null }, "value": "=", - "start": 1350, - "end": 1351, + "start": 1327, + "end": 1328, "loc": { "start": { - "line": 53, + "line": 51, "column": 13 }, "end": { - "line": 53, + "line": 51, "column": 14 } } @@ -11280,15 +11026,15 @@ "updateContext": null }, "value": "this", - "start": 1352, - "end": 1356, + "start": 1329, + "end": 1333, "loc": { "start": { - "line": 53, + "line": 51, "column": 15 }, "end": { - "line": 53, + "line": 51, "column": 19 } } @@ -11306,15 +11052,15 @@ "binop": null, "updateContext": null }, - "start": 1356, - "end": 1357, + "start": 1333, + "end": 1334, "loc": { "start": { - "line": 53, + "line": 51, "column": 19 }, "end": { - "line": 53, + "line": 51, "column": 20 } } @@ -11332,15 +11078,15 @@ "binop": null }, "value": "index", - "start": 1357, - "end": 1362, + "start": 1334, + "end": 1339, "loc": { "start": { - "line": 53, + "line": 51, "column": 20 }, "end": { - "line": 53, + "line": 51, "column": 25 } } @@ -11358,15 +11104,15 @@ "binop": null, "updateContext": null }, - "start": 1362, - "end": 1363, + "start": 1339, + "end": 1340, "loc": { "start": { - "line": 53, + "line": 51, "column": 25 }, "end": { - "line": 53, + "line": 51, "column": 26 } } @@ -11384,15 +11130,15 @@ "binop": null }, "value": "hash", - "start": 1363, - "end": 1367, + "start": 1340, + "end": 1344, "loc": { "start": { - "line": 53, + "line": 51, "column": 26 }, "end": { - "line": 53, + "line": 51, "column": 30 } } @@ -11410,15 +11156,15 @@ "binop": null, "updateContext": null }, - "start": 1367, - "end": 1368, + "start": 1344, + "end": 1345, "loc": { "start": { - "line": 53, + "line": 51, "column": 30 }, "end": { - "line": 53, + "line": 51, "column": 31 } } @@ -11426,15 +11172,15 @@ { "type": "CommentLine", "value": " Check if index group has any of the components that the entity has", - "start": 1373, - "end": 1442, + "start": 1350, + "end": 1419, "loc": { "start": { - "line": 55, + "line": 53, "column": 3 }, "end": { - "line": 55, + "line": 53, "column": 72 } } @@ -11454,15 +11200,15 @@ "updateContext": null }, "value": "let", - "start": 1446, - "end": 1449, + "start": 1423, + "end": 1426, "loc": { "start": { - "line": 56, + "line": 54, "column": 3 }, "end": { - "line": 56, + "line": 54, "column": 6 } } @@ -11480,15 +11226,15 @@ "binop": null }, "value": "hasAny", - "start": 1450, - "end": 1456, + "start": 1427, + "end": 1433, "loc": { "start": { - "line": 56, + "line": 54, "column": 7 }, "end": { - "line": 56, + "line": 54, "column": 13 } } @@ -11507,15 +11253,15 @@ "updateContext": null }, "value": "=", - "start": 1457, - "end": 1458, + "start": 1434, + "end": 1435, "loc": { "start": { - "line": 56, + "line": 54, "column": 14 }, "end": { - "line": 56, + "line": 54, "column": 15 } } @@ -11533,15 +11279,15 @@ "binop": null }, "value": "componentNames", - "start": 1459, - "end": 1473, + "start": 1436, + "end": 1450, "loc": { "start": { - "line": 56, + "line": 54, "column": 16 }, "end": { - "line": 56, + "line": 54, "column": 30 } } @@ -11559,15 +11305,15 @@ "binop": null, "updateContext": null }, - "start": 1473, - "end": 1474, + "start": 1450, + "end": 1451, "loc": { "start": { - "line": 56, + "line": 54, "column": 30 }, "end": { - "line": 56, + "line": 54, "column": 31 } } @@ -11585,15 +11331,15 @@ "binop": null }, "value": "some", - "start": 1474, - "end": 1478, + "start": 1451, + "end": 1455, "loc": { "start": { - "line": 56, + "line": 54, "column": 31 }, "end": { - "line": 56, + "line": 54, "column": 35 } } @@ -11610,15 +11356,15 @@ "postfix": false, "binop": null }, - "start": 1478, - "end": 1479, + "start": 1455, + "end": 1456, "loc": { "start": { - "line": 56, + "line": 54, "column": 35 }, "end": { - "line": 56, + "line": 54, "column": 36 } } @@ -11636,15 +11382,15 @@ "binop": null }, "value": "name", - "start": 1479, - "end": 1483, + "start": 1456, + "end": 1460, "loc": { "start": { - "line": 56, + "line": 54, "column": 36 }, "end": { - "line": 56, + "line": 54, "column": 40 } } @@ -11662,15 +11408,15 @@ "binop": null, "updateContext": null }, - "start": 1484, - "end": 1486, + "start": 1461, + "end": 1463, "loc": { "start": { - "line": 56, + "line": 54, "column": 41 }, "end": { - "line": 56, + "line": 54, "column": 43 } } @@ -11688,15 +11434,15 @@ "binop": null }, "value": "group", - "start": 1487, - "end": 1492, + "start": 1464, + "end": 1469, "loc": { "start": { - "line": 56, + "line": 54, "column": 44 }, "end": { - "line": 56, + "line": 54, "column": 49 } } @@ -11714,15 +11460,15 @@ "binop": null, "updateContext": null }, - "start": 1492, - "end": 1493, + "start": 1469, + "end": 1470, "loc": { "start": { - "line": 56, + "line": 54, "column": 49 }, "end": { - "line": 56, + "line": 54, "column": 50 } } @@ -11740,15 +11486,15 @@ "binop": null }, "value": "components", - "start": 1493, - "end": 1503, + "start": 1470, + "end": 1480, "loc": { "start": { - "line": 56, + "line": 54, "column": 50 }, "end": { - "line": 56, + "line": 54, "column": 60 } } @@ -11766,15 +11512,15 @@ "binop": null, "updateContext": null }, - "start": 1503, - "end": 1504, + "start": 1480, + "end": 1481, "loc": { "start": { - "line": 56, + "line": 54, "column": 60 }, "end": { - "line": 56, + "line": 54, "column": 61 } } @@ -11792,15 +11538,15 @@ "binop": null }, "value": "has", - "start": 1504, - "end": 1507, + "start": 1481, + "end": 1484, "loc": { "start": { - "line": 56, + "line": 54, "column": 61 }, "end": { - "line": 56, + "line": 54, "column": 64 } } @@ -11817,15 +11563,15 @@ "postfix": false, "binop": null }, - "start": 1507, - "end": 1508, + "start": 1484, + "end": 1485, "loc": { "start": { - "line": 56, + "line": 54, "column": 64 }, "end": { - "line": 56, + "line": 54, "column": 65 } } @@ -11843,15 +11589,15 @@ "binop": null }, "value": "name", - "start": 1508, - "end": 1512, + "start": 1485, + "end": 1489, "loc": { "start": { - "line": 56, + "line": 54, "column": 65 }, "end": { - "line": 56, + "line": 54, "column": 69 } } @@ -11868,15 +11614,15 @@ "postfix": false, "binop": null }, - "start": 1512, - "end": 1513, + "start": 1489, + "end": 1490, "loc": { "start": { - "line": 56, + "line": 54, "column": 69 }, "end": { - "line": 56, + "line": 54, "column": 70 } } @@ -11893,15 +11639,15 @@ "postfix": false, "binop": null }, - "start": 1513, - "end": 1514, + "start": 1490, + "end": 1491, "loc": { "start": { - "line": 56, + "line": 54, "column": 70 }, "end": { - "line": 56, + "line": 54, "column": 71 } } @@ -11909,15 +11655,15 @@ { "type": "CommentLine", "value": " Check if the current index group is supposed to match all entities", - "start": 1519, - "end": 1588, + "start": 1496, + "end": 1565, "loc": { "start": { - "line": 58, + "line": 56, "column": 3 }, "end": { - "line": 58, + "line": 56, "column": 72 } } @@ -11937,15 +11683,15 @@ "updateContext": null }, "value": "let", - "start": 1592, - "end": 1595, + "start": 1569, + "end": 1572, "loc": { "start": { - "line": 59, + "line": 57, "column": 3 }, "end": { - "line": 59, + "line": 57, "column": 6 } } @@ -11963,15 +11709,15 @@ "binop": null }, "value": "isMatchAllGroup", - "start": 1596, - "end": 1611, + "start": 1573, + "end": 1588, "loc": { "start": { - "line": 59, + "line": 57, "column": 7 }, "end": { - "line": 59, + "line": 57, "column": 22 } } @@ -11990,15 +11736,15 @@ "updateContext": null }, "value": "=", - "start": 1612, - "end": 1613, + "start": 1589, + "end": 1590, "loc": { "start": { - "line": 59, + "line": 57, "column": 23 }, "end": { - "line": 59, + "line": 57, "column": 24 } } @@ -12015,15 +11761,15 @@ "postfix": false, "binop": null }, - "start": 1614, - "end": 1615, + "start": 1591, + "end": 1592, "loc": { "start": { - "line": 59, + "line": 57, "column": 25 }, "end": { - "line": 59, + "line": 57, "column": 26 } } @@ -12040,15 +11786,15 @@ "postfix": false, "binop": null }, - "start": 1615, - "end": 1616, + "start": 1592, + "end": 1593, "loc": { "start": { - "line": 59, + "line": 57, "column": 26 }, "end": { - "line": 59, + "line": 57, "column": 27 } } @@ -12066,15 +11812,15 @@ "binop": null }, "value": "componentNames", - "start": 1616, - "end": 1630, + "start": 1593, + "end": 1607, "loc": { "start": { - "line": 59, + "line": 57, "column": 27 }, "end": { - "line": 59, + "line": 57, "column": 41 } } @@ -12093,15 +11839,15 @@ "updateContext": null }, "value": "==", - "start": 1631, - "end": 1633, + "start": 1608, + "end": 1610, "loc": { "start": { - "line": 59, + "line": 57, "column": 42 }, "end": { - "line": 59, + "line": 57, "column": 44 } } @@ -12119,15 +11865,15 @@ "binop": null }, "value": "undefined", - "start": 1634, - "end": 1643, + "start": 1611, + "end": 1620, "loc": { "start": { - "line": 59, + "line": 57, "column": 45 }, "end": { - "line": 59, + "line": 57, "column": 54 } } @@ -12146,15 +11892,15 @@ "updateContext": null }, "value": "||", - "start": 1644, - "end": 1646, + "start": 1621, + "end": 1623, "loc": { "start": { - "line": 59, + "line": 57, "column": 55 }, "end": { - "line": 59, + "line": 57, "column": 57 } } @@ -12172,15 +11918,15 @@ "binop": null }, "value": "componentNames", - "start": 1647, - "end": 1661, + "start": 1624, + "end": 1638, "loc": { "start": { - "line": 59, + "line": 57, "column": 58 }, "end": { - "line": 59, + "line": 57, "column": 72 } } @@ -12198,15 +11944,15 @@ "binop": null, "updateContext": null }, - "start": 1661, - "end": 1662, + "start": 1638, + "end": 1639, "loc": { "start": { - "line": 59, + "line": 57, "column": 72 }, "end": { - "line": 59, + "line": 57, "column": 73 } } @@ -12224,15 +11970,15 @@ "binop": null }, "value": "length", - "start": 1662, - "end": 1668, + "start": 1639, + "end": 1645, "loc": { "start": { - "line": 59, + "line": 57, "column": 73 }, "end": { - "line": 59, + "line": 57, "column": 79 } } @@ -12251,15 +11997,15 @@ "updateContext": null }, "value": "===", - "start": 1669, - "end": 1672, + "start": 1646, + "end": 1649, "loc": { "start": { - "line": 59, + "line": 57, "column": 80 }, "end": { - "line": 59, + "line": 57, "column": 83 } } @@ -12278,15 +12024,15 @@ "updateContext": null }, "value": 0, - "start": 1673, - "end": 1674, + "start": 1650, + "end": 1651, "loc": { "start": { - "line": 59, + "line": 57, "column": 84 }, "end": { - "line": 59, + "line": 57, "column": 85 } } @@ -12303,15 +12049,15 @@ "postfix": false, "binop": null }, - "start": 1674, - "end": 1675, + "start": 1651, + "end": 1652, "loc": { "start": { - "line": 59, + "line": 57, "column": 85 }, "end": { - "line": 59, + "line": 57, "column": 86 } } @@ -12330,15 +12076,15 @@ "updateContext": null }, "value": "&&", - "start": 1676, - "end": 1678, + "start": 1653, + "end": 1655, "loc": { "start": { - "line": 59, + "line": 57, "column": 87 }, "end": { - "line": 59, + "line": 57, "column": 89 } } @@ -12356,15 +12102,15 @@ "binop": null }, "value": "group", - "start": 1679, - "end": 1684, + "start": 1656, + "end": 1661, "loc": { "start": { - "line": 59, + "line": 57, "column": 90 }, "end": { - "line": 59, + "line": 57, "column": 95 } } @@ -12382,15 +12128,15 @@ "binop": null, "updateContext": null }, - "start": 1684, - "end": 1685, + "start": 1661, + "end": 1662, "loc": { "start": { - "line": 59, + "line": 57, "column": 95 }, "end": { - "line": 59, + "line": 57, "column": 96 } } @@ -12408,15 +12154,15 @@ "binop": null }, "value": "components", - "start": 1685, - "end": 1695, + "start": 1662, + "end": 1672, "loc": { "start": { - "line": 59, + "line": 57, "column": 96 }, "end": { - "line": 59, + "line": 57, "column": 106 } } @@ -12434,15 +12180,15 @@ "binop": null, "updateContext": null }, - "start": 1695, - "end": 1696, + "start": 1672, + "end": 1673, "loc": { "start": { - "line": 59, + "line": 57, "column": 106 }, "end": { - "line": 59, + "line": 57, "column": 107 } } @@ -12460,15 +12206,15 @@ "binop": null }, "value": "size", - "start": 1696, - "end": 1700, + "start": 1673, + "end": 1677, "loc": { "start": { - "line": 59, + "line": 57, "column": 107 }, "end": { - "line": 59, + "line": 57, "column": 111 } } @@ -12487,15 +12233,15 @@ "updateContext": null }, "value": "==", - "start": 1701, - "end": 1703, + "start": 1678, + "end": 1680, "loc": { "start": { - "line": 59, + "line": 57, "column": 112 }, "end": { - "line": 59, + "line": 57, "column": 114 } } @@ -12514,15 +12260,15 @@ "updateContext": null }, "value": 0, - "start": 1704, - "end": 1705, + "start": 1681, + "end": 1682, "loc": { "start": { - "line": 59, + "line": 57, "column": 115 }, "end": { - "line": 59, + "line": 57, "column": 116 } } @@ -12539,15 +12285,15 @@ "postfix": false, "binop": null }, - "start": 1705, - "end": 1706, + "start": 1682, + "end": 1683, "loc": { "start": { - "line": 59, + "line": 57, "column": 116 }, "end": { - "line": 59, + "line": 57, "column": 117 } } @@ -12567,15 +12313,15 @@ "updateContext": null }, "value": "if", - "start": 1711, - "end": 1713, + "start": 1688, + "end": 1690, "loc": { "start": { - "line": 61, + "line": 59, "column": 3 }, "end": { - "line": 61, + "line": 59, "column": 5 } } @@ -12592,15 +12338,15 @@ "postfix": false, "binop": null }, - "start": 1714, - "end": 1715, + "start": 1691, + "end": 1692, "loc": { "start": { - "line": 61, + "line": 59, "column": 6 }, "end": { - "line": 61, + "line": 59, "column": 7 } } @@ -12618,15 +12364,15 @@ "binop": null }, "value": "hasAny", - "start": 1715, - "end": 1721, + "start": 1692, + "end": 1698, "loc": { "start": { - "line": 61, + "line": 59, "column": 7 }, "end": { - "line": 61, + "line": 59, "column": 13 } } @@ -12645,15 +12391,15 @@ "updateContext": null }, "value": "||", - "start": 1722, - "end": 1724, + "start": 1699, + "end": 1701, "loc": { "start": { - "line": 61, + "line": 59, "column": 14 }, "end": { - "line": 61, + "line": 59, "column": 16 } } @@ -12671,15 +12417,15 @@ "binop": null }, "value": "isMatchAllGroup", - "start": 1725, - "end": 1740, + "start": 1702, + "end": 1717, "loc": { "start": { - "line": 61, + "line": 59, "column": 17 }, "end": { - "line": 61, + "line": 59, "column": 32 } } @@ -12696,15 +12442,15 @@ "postfix": false, "binop": null }, - "start": 1740, - "end": 1741, + "start": 1717, + "end": 1718, "loc": { "start": { - "line": 61, + "line": 59, "column": 32 }, "end": { - "line": 61, + "line": 59, "column": 33 } } @@ -12721,15 +12467,15 @@ "postfix": false, "binop": null }, - "start": 1742, - "end": 1743, + "start": 1719, + "end": 1720, "loc": { "start": { - "line": 61, + "line": 59, "column": 34 }, "end": { - "line": 61, + "line": 59, "column": 35 } } @@ -12747,15 +12493,15 @@ "binop": null }, "value": "callback", - "start": 1748, - "end": 1756, + "start": 1725, + "end": 1733, "loc": { "start": { - "line": 62, + "line": 60, "column": 4 }, "end": { - "line": 62, + "line": 60, "column": 12 } } @@ -12772,15 +12518,15 @@ "postfix": false, "binop": null }, - "start": 1756, - "end": 1757, + "start": 1733, + "end": 1734, "loc": { "start": { - "line": 62, + "line": 60, "column": 12 }, "end": { - "line": 62, + "line": 60, "column": 13 } } @@ -12798,15 +12544,15 @@ "binop": null }, "value": "group", - "start": 1757, - "end": 1762, + "start": 1734, + "end": 1739, "loc": { "start": { - "line": 62, + "line": 60, "column": 13 }, "end": { - "line": 62, + "line": 60, "column": 18 } } @@ -12824,15 +12570,15 @@ "binop": null, "updateContext": null }, - "start": 1762, - "end": 1763, + "start": 1739, + "end": 1740, "loc": { "start": { - "line": 62, + "line": 60, "column": 18 }, "end": { - "line": 62, + "line": 60, "column": 19 } } @@ -12850,15 +12596,15 @@ "binop": null }, "value": "entities", - "start": 1763, - "end": 1771, + "start": 1740, + "end": 1748, "loc": { "start": { - "line": 62, + "line": 60, "column": 19 }, "end": { - "line": 62, + "line": 60, "column": 27 } } @@ -12875,15 +12621,15 @@ "postfix": false, "binop": null }, - "start": 1771, - "end": 1772, + "start": 1748, + "end": 1749, "loc": { "start": { - "line": 62, + "line": 60, "column": 27 }, "end": { - "line": 62, + "line": 60, "column": 28 } } @@ -12900,15 +12646,15 @@ "postfix": false, "binop": null }, - "start": 1776, - "end": 1777, + "start": 1753, + "end": 1754, "loc": { "start": { - "line": 63, + "line": 61, "column": 3 }, "end": { - "line": 63, + "line": 61, "column": 4 } } @@ -12925,15 +12671,15 @@ "postfix": false, "binop": null }, - "start": 1780, - "end": 1781, + "start": 1757, + "end": 1758, "loc": { "start": { - "line": 64, + "line": 62, "column": 2 }, "end": { - "line": 64, + "line": 62, "column": 3 } } @@ -12950,15 +12696,15 @@ "postfix": false, "binop": null }, - "start": 1783, - "end": 1784, + "start": 1760, + "end": 1761, "loc": { "start": { - "line": 65, + "line": 63, "column": 1 }, "end": { - "line": 65, + "line": 63, "column": 2 } } @@ -12966,15 +12712,15 @@ { "type": "CommentLine", "value": " Update an entity in the index (for creating components)", - "start": 1787, - "end": 1845, + "start": 1764, + "end": 1822, "loc": { "start": { - "line": 67, + "line": 65, "column": 1 }, "end": { - "line": 67, + "line": 65, "column": 59 } } @@ -12992,15 +12738,15 @@ "binop": null }, "value": "add", - "start": 1847, - "end": 1850, + "start": 1824, + "end": 1827, "loc": { "start": { - "line": 68, + "line": 66, "column": 1 }, "end": { - "line": 68, + "line": 66, "column": 4 } } @@ -13017,15 +12763,15 @@ "postfix": false, "binop": null }, - "start": 1850, - "end": 1851, + "start": 1827, + "end": 1828, "loc": { "start": { - "line": 68, + "line": 66, "column": 4 }, "end": { - "line": 68, + "line": 66, "column": 5 } } @@ -13043,15 +12789,15 @@ "binop": null }, "value": "entity", - "start": 1851, - "end": 1857, + "start": 1828, + "end": 1834, "loc": { "start": { - "line": 68, + "line": 66, "column": 5 }, "end": { - "line": 68, + "line": 66, "column": 11 } } @@ -13069,15 +12815,15 @@ "binop": null, "updateContext": null }, - "start": 1857, - "end": 1858, + "start": 1834, + "end": 1835, "loc": { "start": { - "line": 68, + "line": 66, "column": 11 }, "end": { - "line": 68, + "line": 66, "column": 12 } } @@ -13095,15 +12841,15 @@ "binop": null, "updateContext": null }, - "start": 1859, - "end": 1862, + "start": 1836, + "end": 1839, "loc": { "start": { - "line": 68, + "line": 66, "column": 13 }, "end": { - "line": 68, + "line": 66, "column": 16 } } @@ -13121,15 +12867,15 @@ "binop": null }, "value": "componentNames", - "start": 1862, - "end": 1876, + "start": 1839, + "end": 1853, "loc": { "start": { - "line": 68, + "line": 66, "column": 16 }, "end": { - "line": 68, + "line": 66, "column": 30 } } @@ -13146,15 +12892,15 @@ "postfix": false, "binop": null }, - "start": 1876, - "end": 1877, + "start": 1853, + "end": 1854, "loc": { "start": { - "line": 68, + "line": 66, "column": 30 }, "end": { - "line": 68, + "line": 66, "column": 31 } } @@ -13171,15 +12917,15 @@ "postfix": false, "binop": null }, - "start": 1878, - "end": 1879, + "start": 1855, + "end": 1856, "loc": { "start": { - "line": 68, + "line": 66, "column": 32 }, "end": { - "line": 68, + "line": 66, "column": 33 } } @@ -13199,15 +12945,15 @@ "updateContext": null }, "value": "this", - "start": 1882, - "end": 1886, + "start": 1859, + "end": 1863, "loc": { "start": { - "line": 69, + "line": 67, "column": 2 }, "end": { - "line": 69, + "line": 67, "column": 6 } } @@ -13225,15 +12971,15 @@ "binop": null, "updateContext": null }, - "start": 1886, - "end": 1887, + "start": 1863, + "end": 1864, "loc": { "start": { - "line": 69, + "line": 67, "column": 6 }, "end": { - "line": 69, + "line": 67, "column": 7 } } @@ -13251,100 +12997,48 @@ "binop": null }, "value": "apply", - "start": 1887, - "end": 1892, + "start": 1864, + "end": 1869, "loc": { "start": { - "line": 69, + "line": 67, "column": 7 }, "end": { - "line": 69, - "column": 12 - } - } - }, - { - "type": { - "label": "(", - "beforeExpr": true, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 1892, - "end": 1893, - "loc": { - "start": { - "line": 69, - "column": 12 - }, - "end": { - "line": 69, - "column": 13 - } - } - }, - { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "componentNames", - "start": 1893, - "end": 1907, - "loc": { - "start": { - "line": 69, - "column": 13 - }, - "end": { - "line": 69, - "column": 27 + "line": 67, + "column": 12 } } }, { "type": { - "label": ",", + "label": "(", "beforeExpr": true, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "start": 1907, - "end": 1908, + "start": 1869, + "end": 1870, "loc": { "start": { - "line": 69, - "column": 27 + "line": 67, + "column": 12 }, "end": { - "line": 69, - "column": 28 + "line": 67, + "column": 13 } } }, { "type": { - "label": "(", - "beforeExpr": true, + "label": "name", + "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, @@ -13353,50 +13047,51 @@ "postfix": false, "binop": null }, - "start": 1909, - "end": 1910, + "value": "componentNames", + "start": 1870, + "end": 1884, "loc": { "start": { - "line": 69, - "column": 29 + "line": 67, + "column": 13 }, "end": { - "line": 69, - "column": 30 + "line": 67, + "column": 27 } } }, { "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, + "label": ",", + "beforeExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "entities", - "start": 1910, - "end": 1918, + "start": 1884, + "end": 1885, "loc": { "start": { - "line": 69, - "column": 30 + "line": 67, + "column": 27 }, "end": { - "line": 69, - "column": 38 + "line": 67, + "column": 28 } } }, { "type": { - "label": ")", + "label": "name", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -13404,16 +13099,17 @@ "postfix": false, "binop": null }, - "start": 1918, - "end": 1919, + "value": "entities", + "start": 1886, + "end": 1894, "loc": { "start": { - "line": 69, - "column": 38 + "line": 67, + "column": 29 }, "end": { - "line": 69, - "column": 39 + "line": 67, + "column": 37 } } }, @@ -13430,16 +13126,16 @@ "binop": null, "updateContext": null }, - "start": 1920, - "end": 1922, + "start": 1895, + "end": 1897, "loc": { "start": { - "line": 69, - "column": 40 + "line": 67, + "column": 38 }, "end": { - "line": 69, - "column": 42 + "line": 67, + "column": 40 } } }, @@ -13455,16 +13151,16 @@ "postfix": false, "binop": null }, - "start": 1923, - "end": 1924, + "start": 1898, + "end": 1899, "loc": { "start": { - "line": 69, - "column": 43 + "line": 67, + "column": 41 }, "end": { - "line": 69, - "column": 44 + "line": 67, + "column": 42 } } }, @@ -13481,15 +13177,15 @@ "binop": null }, "value": "entities", - "start": 1928, - "end": 1936, + "start": 1903, + "end": 1911, "loc": { "start": { - "line": 70, + "line": 68, "column": 3 }, "end": { - "line": 70, + "line": 68, "column": 11 } } @@ -13507,15 +13203,15 @@ "binop": null, "updateContext": null }, - "start": 1936, - "end": 1937, + "start": 1911, + "end": 1912, "loc": { "start": { - "line": 70, + "line": 68, "column": 11 }, "end": { - "line": 70, + "line": 68, "column": 12 } } @@ -13533,15 +13229,15 @@ "binop": null }, "value": "set", - "start": 1937, - "end": 1940, + "start": 1912, + "end": 1915, "loc": { "start": { - "line": 70, + "line": 68, "column": 12 }, "end": { - "line": 70, + "line": 68, "column": 15 } } @@ -13558,15 +13254,15 @@ "postfix": false, "binop": null }, - "start": 1940, - "end": 1941, + "start": 1915, + "end": 1916, "loc": { "start": { - "line": 70, + "line": 68, "column": 15 }, "end": { - "line": 70, + "line": 68, "column": 16 } } @@ -13584,15 +13280,15 @@ "binop": null }, "value": "entity", - "start": 1941, - "end": 1947, + "start": 1916, + "end": 1922, "loc": { "start": { - "line": 70, + "line": 68, "column": 16 }, "end": { - "line": 70, + "line": 68, "column": 22 } } @@ -13610,15 +13306,15 @@ "binop": null, "updateContext": null }, - "start": 1947, - "end": 1948, + "start": 1922, + "end": 1923, "loc": { "start": { - "line": 70, + "line": 68, "column": 22 }, "end": { - "line": 70, + "line": 68, "column": 23 } } @@ -13636,15 +13332,15 @@ "binop": null }, "value": "toString", - "start": 1948, - "end": 1956, + "start": 1923, + "end": 1931, "loc": { "start": { - "line": 70, + "line": 68, "column": 23 }, "end": { - "line": 70, + "line": 68, "column": 31 } } @@ -13661,15 +13357,15 @@ "postfix": false, "binop": null }, - "start": 1956, - "end": 1957, + "start": 1931, + "end": 1932, "loc": { "start": { - "line": 70, + "line": 68, "column": 31 }, "end": { - "line": 70, + "line": 68, "column": 32 } } @@ -13686,15 +13382,15 @@ "postfix": false, "binop": null }, - "start": 1957, - "end": 1958, + "start": 1932, + "end": 1933, "loc": { "start": { - "line": 70, + "line": 68, "column": 32 }, "end": { - "line": 70, + "line": 68, "column": 33 } } @@ -13712,15 +13408,15 @@ "binop": null, "updateContext": null }, - "start": 1958, - "end": 1959, + "start": 1933, + "end": 1934, "loc": { "start": { - "line": 70, + "line": 68, "column": 33 }, "end": { - "line": 70, + "line": 68, "column": 34 } } @@ -13738,15 +13434,15 @@ "binop": null }, "value": "entity", - "start": 1960, - "end": 1966, + "start": 1935, + "end": 1941, "loc": { "start": { - "line": 70, + "line": 68, "column": 35 }, "end": { - "line": 70, + "line": 68, "column": 41 } } @@ -13763,15 +13459,15 @@ "postfix": false, "binop": null }, - "start": 1966, - "end": 1967, + "start": 1941, + "end": 1942, "loc": { "start": { - "line": 70, + "line": 68, "column": 41 }, "end": { - "line": 70, + "line": 68, "column": 42 } } @@ -13788,15 +13484,15 @@ "postfix": false, "binop": null }, - "start": 1970, - "end": 1971, + "start": 1945, + "end": 1946, "loc": { "start": { - "line": 71, + "line": 69, "column": 2 }, "end": { - "line": 71, + "line": 69, "column": 3 } } @@ -13813,15 +13509,15 @@ "postfix": false, "binop": null }, - "start": 1971, - "end": 1972, + "start": 1946, + "end": 1947, "loc": { "start": { - "line": 71, + "line": 69, "column": 3 }, "end": { - "line": 71, + "line": 69, "column": 4 } } @@ -13838,15 +13534,15 @@ "postfix": false, "binop": null }, - "start": 1974, - "end": 1975, + "start": 1949, + "end": 1950, "loc": { "start": { - "line": 72, + "line": 70, "column": 1 }, "end": { - "line": 72, + "line": 70, "column": 2 } } @@ -13854,15 +13550,15 @@ { "type": "CommentLine", "value": " Update an entity in the index (for removing components)", - "start": 1978, - "end": 2036, + "start": 1953, + "end": 2011, "loc": { "start": { - "line": 74, + "line": 72, "column": 1 }, "end": { - "line": 74, + "line": 72, "column": 59 } } @@ -13880,15 +13576,15 @@ "binop": null }, "value": "remove", - "start": 2038, - "end": 2044, + "start": 2013, + "end": 2019, "loc": { "start": { - "line": 75, + "line": 73, "column": 1 }, "end": { - "line": 75, + "line": 73, "column": 7 } } @@ -13905,15 +13601,15 @@ "postfix": false, "binop": null }, - "start": 2044, - "end": 2045, + "start": 2019, + "end": 2020, "loc": { "start": { - "line": 75, + "line": 73, "column": 7 }, "end": { - "line": 75, + "line": 73, "column": 8 } } @@ -13931,15 +13627,15 @@ "binop": null }, "value": "entity", - "start": 2045, - "end": 2051, + "start": 2020, + "end": 2026, "loc": { "start": { - "line": 75, + "line": 73, "column": 8 }, "end": { - "line": 75, + "line": 73, "column": 14 } } @@ -13957,15 +13653,15 @@ "binop": null, "updateContext": null }, - "start": 2051, - "end": 2052, + "start": 2026, + "end": 2027, "loc": { "start": { - "line": 75, + "line": 73, "column": 14 }, "end": { - "line": 75, + "line": 73, "column": 15 } } @@ -13983,15 +13679,15 @@ "binop": null, "updateContext": null }, - "start": 2053, - "end": 2056, + "start": 2028, + "end": 2031, "loc": { "start": { - "line": 75, + "line": 73, "column": 16 }, "end": { - "line": 75, + "line": 73, "column": 19 } } @@ -14009,15 +13705,15 @@ "binop": null }, "value": "componentNames", - "start": 2056, - "end": 2070, + "start": 2031, + "end": 2045, "loc": { "start": { - "line": 75, + "line": 73, "column": 19 }, "end": { - "line": 75, + "line": 73, "column": 33 } } @@ -14034,15 +13730,15 @@ "postfix": false, "binop": null }, - "start": 2070, - "end": 2071, + "start": 2045, + "end": 2046, "loc": { "start": { - "line": 75, + "line": 73, "column": 33 }, "end": { - "line": 75, + "line": 73, "column": 34 } } @@ -14059,15 +13755,15 @@ "postfix": false, "binop": null }, - "start": 2072, - "end": 2073, + "start": 2047, + "end": 2048, "loc": { "start": { - "line": 75, + "line": 73, "column": 35 }, "end": { - "line": 75, + "line": 73, "column": 36 } } @@ -14087,15 +13783,15 @@ "updateContext": null }, "value": "this", - "start": 2076, - "end": 2080, + "start": 2051, + "end": 2055, "loc": { "start": { - "line": 76, + "line": 74, "column": 2 }, "end": { - "line": 76, + "line": 74, "column": 6 } } @@ -14113,15 +13809,15 @@ "binop": null, "updateContext": null }, - "start": 2080, - "end": 2081, + "start": 2055, + "end": 2056, "loc": { "start": { - "line": 76, + "line": 74, "column": 6 }, "end": { - "line": 76, + "line": 74, "column": 7 } } @@ -14139,15 +13835,15 @@ "binop": null }, "value": "apply", - "start": 2081, - "end": 2086, + "start": 2056, + "end": 2061, "loc": { "start": { - "line": 76, + "line": 74, "column": 7 }, "end": { - "line": 76, + "line": 74, "column": 12 } } @@ -14164,15 +13860,15 @@ "postfix": false, "binop": null }, - "start": 2086, - "end": 2087, + "start": 2061, + "end": 2062, "loc": { "start": { - "line": 76, + "line": 74, "column": 12 }, "end": { - "line": 76, + "line": 74, "column": 13 } } @@ -14190,15 +13886,15 @@ "binop": null }, "value": "componentNames", - "start": 2087, - "end": 2101, + "start": 2062, + "end": 2076, "loc": { "start": { - "line": 76, + "line": 74, "column": 13 }, "end": { - "line": 76, + "line": 74, "column": 27 } } @@ -14216,44 +13912,19 @@ "binop": null, "updateContext": null }, - "start": 2101, - "end": 2102, + "start": 2076, + "end": 2077, "loc": { "start": { - "line": 76, + "line": 74, "column": 27 }, "end": { - "line": 76, + "line": 74, "column": 28 } } }, - { - "type": { - "label": "(", - "beforeExpr": true, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 2103, - "end": 2104, - "loc": { - "start": { - "line": 76, - "column": 29 - }, - "end": { - "line": 76, - "column": 30 - } - } - }, { "type": { "label": "name", @@ -14267,41 +13938,16 @@ "binop": null }, "value": "entities", - "start": 2104, - "end": 2112, - "loc": { - "start": { - "line": 76, - "column": 30 - }, - "end": { - "line": 76, - "column": 38 - } - } - }, - { - "type": { - "label": ")", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 2112, - "end": 2113, + "start": 2078, + "end": 2086, "loc": { "start": { - "line": 76, - "column": 38 + "line": 74, + "column": 29 }, "end": { - "line": 76, - "column": 39 + "line": 74, + "column": 37 } } }, @@ -14318,16 +13964,16 @@ "binop": null, "updateContext": null }, - "start": 2114, - "end": 2116, + "start": 2087, + "end": 2089, "loc": { "start": { - "line": 76, - "column": 40 + "line": 74, + "column": 38 }, "end": { - "line": 76, - "column": 42 + "line": 74, + "column": 40 } } }, @@ -14343,16 +13989,16 @@ "postfix": false, "binop": null }, - "start": 2117, - "end": 2118, + "start": 2090, + "end": 2091, "loc": { "start": { - "line": 76, - "column": 43 + "line": 74, + "column": 41 }, "end": { - "line": 76, - "column": 44 + "line": 74, + "column": 42 } } }, @@ -14369,15 +14015,15 @@ "binop": null }, "value": "entities", - "start": 2122, - "end": 2130, + "start": 2095, + "end": 2103, "loc": { "start": { - "line": 77, + "line": 75, "column": 3 }, "end": { - "line": 77, + "line": 75, "column": 11 } } @@ -14395,15 +14041,15 @@ "binop": null, "updateContext": null }, - "start": 2130, - "end": 2131, + "start": 2103, + "end": 2104, "loc": { "start": { - "line": 77, + "line": 75, "column": 11 }, "end": { - "line": 77, + "line": 75, "column": 12 } } @@ -14423,15 +14069,15 @@ "updateContext": null }, "value": "delete", - "start": 2131, - "end": 2137, + "start": 2104, + "end": 2110, "loc": { "start": { - "line": 77, + "line": 75, "column": 12 }, "end": { - "line": 77, + "line": 75, "column": 18 } } @@ -14448,15 +14094,15 @@ "postfix": false, "binop": null }, - "start": 2137, - "end": 2138, + "start": 2110, + "end": 2111, "loc": { "start": { - "line": 77, + "line": 75, "column": 18 }, "end": { - "line": 77, + "line": 75, "column": 19 } } @@ -14474,15 +14120,15 @@ "binop": null }, "value": "entity", - "start": 2138, - "end": 2144, + "start": 2111, + "end": 2117, "loc": { "start": { - "line": 77, + "line": 75, "column": 19 }, "end": { - "line": 77, + "line": 75, "column": 25 } } @@ -14500,15 +14146,15 @@ "binop": null, "updateContext": null }, - "start": 2144, - "end": 2145, + "start": 2117, + "end": 2118, "loc": { "start": { - "line": 77, + "line": 75, "column": 25 }, "end": { - "line": 77, + "line": 75, "column": 26 } } @@ -14526,15 +14172,15 @@ "binop": null }, "value": "toString", - "start": 2145, - "end": 2153, + "start": 2118, + "end": 2126, "loc": { "start": { - "line": 77, + "line": 75, "column": 26 }, "end": { - "line": 77, + "line": 75, "column": 34 } } @@ -14551,15 +14197,15 @@ "postfix": false, "binop": null }, - "start": 2153, - "end": 2154, + "start": 2126, + "end": 2127, "loc": { "start": { - "line": 77, + "line": 75, "column": 34 }, "end": { - "line": 77, + "line": 75, "column": 35 } } @@ -14576,15 +14222,15 @@ "postfix": false, "binop": null }, - "start": 2154, - "end": 2155, + "start": 2127, + "end": 2128, "loc": { "start": { - "line": 77, + "line": 75, "column": 35 }, "end": { - "line": 77, + "line": 75, "column": 36 } } @@ -14601,15 +14247,15 @@ "postfix": false, "binop": null }, - "start": 2155, - "end": 2156, + "start": 2128, + "end": 2129, "loc": { "start": { - "line": 77, + "line": 75, "column": 36 }, "end": { - "line": 77, + "line": 75, "column": 37 } } @@ -14626,15 +14272,15 @@ "postfix": false, "binop": null }, - "start": 2159, - "end": 2160, + "start": 2132, + "end": 2133, "loc": { "start": { - "line": 78, + "line": 76, "column": 2 }, "end": { - "line": 78, + "line": 76, "column": 3 } } @@ -14651,15 +14297,15 @@ "postfix": false, "binop": null }, - "start": 2160, - "end": 2161, + "start": 2133, + "end": 2134, "loc": { "start": { - "line": 78, + "line": 76, "column": 3 }, "end": { - "line": 78, + "line": 76, "column": 4 } } @@ -14676,15 +14322,15 @@ "postfix": false, "binop": null }, - "start": 2163, - "end": 2164, + "start": 2136, + "end": 2137, "loc": { "start": { - "line": 79, + "line": 77, "column": 1 }, "end": { - "line": 79, + "line": 77, "column": 2 } } @@ -14692,15 +14338,15 @@ { "type": "CommentLine", "value": " Add an entity and all of its components to the index", - "start": 2167, - "end": 2222, + "start": 2140, + "end": 2195, "loc": { "start": { - "line": 81, + "line": 79, "column": 1 }, "end": { - "line": 81, + "line": 79, "column": 56 } } @@ -14718,15 +14364,15 @@ "binop": null }, "value": "addEntity", - "start": 2224, - "end": 2233, + "start": 2197, + "end": 2206, "loc": { "start": { - "line": 82, + "line": 80, "column": 1 }, "end": { - "line": 82, + "line": 80, "column": 10 } } @@ -14743,15 +14389,15 @@ "postfix": false, "binop": null }, - "start": 2233, - "end": 2234, + "start": 2206, + "end": 2207, "loc": { "start": { - "line": 82, + "line": 80, "column": 10 }, "end": { - "line": 82, + "line": 80, "column": 11 } } @@ -14769,15 +14415,15 @@ "binop": null }, "value": "entity", - "start": 2234, - "end": 2240, + "start": 2207, + "end": 2213, "loc": { "start": { - "line": 82, + "line": 80, "column": 11 }, "end": { - "line": 82, + "line": 80, "column": 17 } } @@ -14794,15 +14440,15 @@ "postfix": false, "binop": null }, - "start": 2240, - "end": 2241, + "start": 2213, + "end": 2214, "loc": { "start": { - "line": 82, + "line": 80, "column": 17 }, "end": { - "line": 82, + "line": 80, "column": 18 } } @@ -14819,15 +14465,15 @@ "postfix": false, "binop": null }, - "start": 2242, - "end": 2243, + "start": 2215, + "end": 2216, "loc": { "start": { - "line": 82, + "line": 80, "column": 19 }, "end": { - "line": 82, + "line": 80, "column": 20 } } @@ -14847,15 +14493,15 @@ "updateContext": null }, "value": "this", - "start": 2246, - "end": 2250, + "start": 2219, + "end": 2223, "loc": { "start": { - "line": 83, + "line": 81, "column": 2 }, "end": { - "line": 83, + "line": 81, "column": 6 } } @@ -14873,15 +14519,15 @@ "binop": null, "updateContext": null }, - "start": 2250, - "end": 2251, + "start": 2223, + "end": 2224, "loc": { "start": { - "line": 83, + "line": 81, "column": 6 }, "end": { - "line": 83, + "line": 81, "column": 7 } } @@ -14899,15 +14545,15 @@ "binop": null }, "value": "add", - "start": 2251, - "end": 2254, + "start": 2224, + "end": 2227, "loc": { "start": { - "line": 83, + "line": 81, "column": 7 }, "end": { - "line": 83, + "line": 81, "column": 10 } } @@ -14924,15 +14570,15 @@ "postfix": false, "binop": null }, - "start": 2254, - "end": 2255, + "start": 2227, + "end": 2228, "loc": { "start": { - "line": 83, + "line": 81, "column": 10 }, "end": { - "line": 83, + "line": 81, "column": 11 } } @@ -14950,15 +14596,15 @@ "binop": null }, "value": "entity", - "start": 2255, - "end": 2261, + "start": 2228, + "end": 2234, "loc": { "start": { - "line": 83, + "line": 81, "column": 11 }, "end": { - "line": 83, + "line": 81, "column": 17 } } @@ -14976,15 +14622,15 @@ "binop": null, "updateContext": null }, - "start": 2261, - "end": 2262, + "start": 2234, + "end": 2235, "loc": { "start": { - "line": 83, + "line": 81, "column": 17 }, "end": { - "line": 83, + "line": 81, "column": 18 } } @@ -15002,15 +14648,15 @@ "binop": null, "updateContext": null }, - "start": 2263, - "end": 2266, + "start": 2236, + "end": 2239, "loc": { "start": { - "line": 83, + "line": 81, "column": 19 }, "end": { - "line": 83, + "line": 81, "column": 22 } } @@ -15028,15 +14674,15 @@ "binop": null }, "value": "Object", - "start": 2266, - "end": 2272, + "start": 2239, + "end": 2245, "loc": { "start": { - "line": 83, + "line": 81, "column": 22 }, "end": { - "line": 83, + "line": 81, "column": 28 } } @@ -15054,15 +14700,15 @@ "binop": null, "updateContext": null }, - "start": 2272, - "end": 2273, + "start": 2245, + "end": 2246, "loc": { "start": { - "line": 83, + "line": 81, "column": 28 }, "end": { - "line": 83, + "line": 81, "column": 29 } } @@ -15080,15 +14726,15 @@ "binop": null }, "value": "keys", - "start": 2273, - "end": 2277, + "start": 2246, + "end": 2250, "loc": { "start": { - "line": 83, + "line": 81, "column": 29 }, "end": { - "line": 83, + "line": 81, "column": 33 } } @@ -15105,15 +14751,15 @@ "postfix": false, "binop": null }, - "start": 2277, - "end": 2278, + "start": 2250, + "end": 2251, "loc": { "start": { - "line": 83, + "line": 81, "column": 33 }, "end": { - "line": 83, + "line": 81, "column": 34 } } @@ -15131,15 +14777,15 @@ "binop": null }, "value": "entity", - "start": 2278, - "end": 2284, + "start": 2251, + "end": 2257, "loc": { "start": { - "line": 83, + "line": 81, "column": 34 }, "end": { - "line": 83, + "line": 81, "column": 40 } } @@ -15157,15 +14803,15 @@ "binop": null, "updateContext": null }, - "start": 2284, - "end": 2285, + "start": 2257, + "end": 2258, "loc": { "start": { - "line": 83, + "line": 81, "column": 40 }, "end": { - "line": 83, + "line": 81, "column": 41 } } @@ -15183,15 +14829,15 @@ "binop": null }, "value": "data", - "start": 2285, - "end": 2289, + "start": 2258, + "end": 2262, "loc": { "start": { - "line": 83, + "line": 81, "column": 41 }, "end": { - "line": 83, + "line": 81, "column": 45 } } @@ -15208,15 +14854,15 @@ "postfix": false, "binop": null }, - "start": 2289, - "end": 2290, + "start": 2262, + "end": 2263, "loc": { "start": { - "line": 83, + "line": 81, "column": 45 }, "end": { - "line": 83, + "line": 81, "column": 46 } } @@ -15233,15 +14879,15 @@ "postfix": false, "binop": null }, - "start": 2290, - "end": 2291, + "start": 2263, + "end": 2264, "loc": { "start": { - "line": 83, + "line": 81, "column": 46 }, "end": { - "line": 83, + "line": 81, "column": 47 } } @@ -15258,15 +14904,15 @@ "postfix": false, "binop": null }, - "start": 2293, - "end": 2294, + "start": 2266, + "end": 2267, "loc": { "start": { - "line": 84, + "line": 82, "column": 1 }, "end": { - "line": 84, + "line": 82, "column": 2 } } @@ -15274,15 +14920,15 @@ { "type": "CommentLine", "value": " Remove an entity and all of its components from the index", - "start": 2297, - "end": 2357, + "start": 2270, + "end": 2330, "loc": { "start": { - "line": 86, + "line": 84, "column": 1 }, "end": { - "line": 86, + "line": 84, "column": 61 } } @@ -15300,15 +14946,15 @@ "binop": null }, "value": "removeEntity", - "start": 2359, - "end": 2371, + "start": 2332, + "end": 2344, "loc": { "start": { - "line": 87, + "line": 85, "column": 1 }, "end": { - "line": 87, + "line": 85, "column": 13 } } @@ -15325,15 +14971,15 @@ "postfix": false, "binop": null }, - "start": 2371, - "end": 2372, + "start": 2344, + "end": 2345, "loc": { "start": { - "line": 87, + "line": 85, "column": 13 }, "end": { - "line": 87, + "line": 85, "column": 14 } } @@ -15351,15 +14997,15 @@ "binop": null }, "value": "entity", - "start": 2372, - "end": 2378, + "start": 2345, + "end": 2351, "loc": { "start": { - "line": 87, + "line": 85, "column": 14 }, "end": { - "line": 87, + "line": 85, "column": 20 } } @@ -15376,15 +15022,15 @@ "postfix": false, "binop": null }, - "start": 2378, - "end": 2379, + "start": 2351, + "end": 2352, "loc": { "start": { - "line": 87, + "line": 85, "column": 20 }, "end": { - "line": 87, + "line": 85, "column": 21 } } @@ -15401,15 +15047,15 @@ "postfix": false, "binop": null }, - "start": 2380, - "end": 2381, + "start": 2353, + "end": 2354, "loc": { "start": { - "line": 87, + "line": 85, "column": 22 }, "end": { - "line": 87, + "line": 85, "column": 23 } } @@ -15429,15 +15075,15 @@ "updateContext": null }, "value": "this", - "start": 2384, - "end": 2388, + "start": 2357, + "end": 2361, "loc": { "start": { - "line": 88, + "line": 86, "column": 2 }, "end": { - "line": 88, + "line": 86, "column": 6 } } @@ -15455,15 +15101,15 @@ "binop": null, "updateContext": null }, - "start": 2388, - "end": 2389, + "start": 2361, + "end": 2362, "loc": { "start": { - "line": 88, + "line": 86, "column": 6 }, "end": { - "line": 88, + "line": 86, "column": 7 } } @@ -15481,15 +15127,15 @@ "binop": null }, "value": "remove", - "start": 2389, - "end": 2395, + "start": 2362, + "end": 2368, "loc": { "start": { - "line": 88, + "line": 86, "column": 7 }, "end": { - "line": 88, + "line": 86, "column": 13 } } @@ -15506,15 +15152,15 @@ "postfix": false, "binop": null }, - "start": 2395, - "end": 2396, + "start": 2368, + "end": 2369, "loc": { "start": { - "line": 88, + "line": 86, "column": 13 }, "end": { - "line": 88, + "line": 86, "column": 14 } } @@ -15532,15 +15178,15 @@ "binop": null }, "value": "entity", - "start": 2396, - "end": 2402, + "start": 2369, + "end": 2375, "loc": { "start": { - "line": 88, + "line": 86, "column": 14 }, "end": { - "line": 88, + "line": 86, "column": 20 } } @@ -15558,15 +15204,15 @@ "binop": null, "updateContext": null }, - "start": 2402, - "end": 2403, + "start": 2375, + "end": 2376, "loc": { "start": { - "line": 88, + "line": 86, "column": 20 }, "end": { - "line": 88, + "line": 86, "column": 21 } } @@ -15584,15 +15230,15 @@ "binop": null, "updateContext": null }, - "start": 2404, - "end": 2407, + "start": 2377, + "end": 2380, "loc": { "start": { - "line": 88, + "line": 86, "column": 22 }, "end": { - "line": 88, + "line": 86, "column": 25 } } @@ -15610,15 +15256,15 @@ "binop": null }, "value": "Object", - "start": 2407, - "end": 2413, + "start": 2380, + "end": 2386, "loc": { "start": { - "line": 88, + "line": 86, "column": 25 }, "end": { - "line": 88, + "line": 86, "column": 31 } } @@ -15636,15 +15282,15 @@ "binop": null, "updateContext": null }, - "start": 2413, - "end": 2414, + "start": 2386, + "end": 2387, "loc": { "start": { - "line": 88, + "line": 86, "column": 31 }, "end": { - "line": 88, + "line": 86, "column": 32 } } @@ -15662,15 +15308,15 @@ "binop": null }, "value": "keys", - "start": 2414, - "end": 2418, + "start": 2387, + "end": 2391, "loc": { "start": { - "line": 88, + "line": 86, "column": 32 }, "end": { - "line": 88, + "line": 86, "column": 36 } } @@ -15687,15 +15333,15 @@ "postfix": false, "binop": null }, - "start": 2418, - "end": 2419, + "start": 2391, + "end": 2392, "loc": { "start": { - "line": 88, + "line": 86, "column": 36 }, "end": { - "line": 88, + "line": 86, "column": 37 } } @@ -15713,15 +15359,15 @@ "binop": null }, "value": "entity", - "start": 2419, - "end": 2425, + "start": 2392, + "end": 2398, "loc": { "start": { - "line": 88, + "line": 86, "column": 37 }, "end": { - "line": 88, + "line": 86, "column": 43 } } @@ -15739,15 +15385,15 @@ "binop": null, "updateContext": null }, - "start": 2425, - "end": 2426, + "start": 2398, + "end": 2399, "loc": { "start": { - "line": 88, + "line": 86, "column": 43 }, "end": { - "line": 88, + "line": 86, "column": 44 } } @@ -15765,15 +15411,15 @@ "binop": null }, "value": "data", - "start": 2426, - "end": 2430, + "start": 2399, + "end": 2403, "loc": { "start": { - "line": 88, + "line": 86, "column": 44 }, "end": { - "line": 88, + "line": 86, "column": 48 } } @@ -15790,15 +15436,15 @@ "postfix": false, "binop": null }, - "start": 2430, - "end": 2431, + "start": 2403, + "end": 2404, "loc": { "start": { - "line": 88, + "line": 86, "column": 48 }, "end": { - "line": 88, + "line": 86, "column": 49 } } @@ -15815,15 +15461,15 @@ "postfix": false, "binop": null }, - "start": 2431, - "end": 2432, + "start": 2404, + "end": 2405, "loc": { "start": { - "line": 88, + "line": 86, "column": 49 }, "end": { - "line": 88, + "line": 86, "column": 50 } } @@ -15840,15 +15486,15 @@ "postfix": false, "binop": null }, - "start": 2434, - "end": 2435, + "start": 2407, + "end": 2408, "loc": { "start": { - "line": 89, + "line": 87, "column": 1 }, "end": { - "line": 89, + "line": 87, "column": 2 } } @@ -15865,15 +15511,15 @@ "postfix": false, "binop": null }, - "start": 2436, - "end": 2437, + "start": 2409, + "end": 2410, "loc": { "start": { - "line": 90, + "line": 88, "column": 0 }, "end": { - "line": 90, + "line": 88, "column": 1 } } @@ -15891,15 +15537,15 @@ "binop": null }, "value": "exports", - "start": 2439, - "end": 2446, + "start": 2412, + "end": 2419, "loc": { "start": { - "line": 92, + "line": 90, "column": 0 }, "end": { - "line": 92, + "line": 90, "column": 7 } } @@ -15917,15 +15563,15 @@ "binop": null, "updateContext": null }, - "start": 2446, - "end": 2447, + "start": 2419, + "end": 2420, "loc": { "start": { - "line": 92, + "line": 90, "column": 7 }, "end": { - "line": 92, + "line": 90, "column": 8 } } @@ -15943,15 +15589,15 @@ "binop": null }, "value": "ComponentIndex", - "start": 2447, - "end": 2461, + "start": 2420, + "end": 2434, "loc": { "start": { - "line": 92, + "line": 90, "column": 8 }, "end": { - "line": 92, + "line": 90, "column": 22 } } @@ -15970,15 +15616,15 @@ "updateContext": null }, "value": "=", - "start": 2462, - "end": 2463, + "start": 2435, + "end": 2436, "loc": { "start": { - "line": 92, + "line": 90, "column": 23 }, "end": { - "line": 92, + "line": 90, "column": 24 } } @@ -15996,15 +15642,15 @@ "binop": null }, "value": "ComponentIndex", - "start": 2464, - "end": 2478, + "start": 2437, + "end": 2451, "loc": { "start": { - "line": 92, + "line": 90, "column": 25 }, "end": { - "line": 92, + "line": 90, "column": 39 } } @@ -16022,15 +15668,15 @@ "binop": null, "updateContext": null }, - "start": 2479, - "end": 2479, + "start": 2452, + "end": 2452, "loc": { "start": { - "line": 93, + "line": 91, "column": 0 }, "end": { - "line": 93, + "line": 91, "column": 0 } } diff --git a/docs/ast/source/entity.js.json b/docs/ast/source/entity.js.json index 111b01a..43a84db 100644 --- a/docs/ast/source/entity.js.json +++ b/docs/ast/source/entity.js.json @@ -1,7 +1,7 @@ { "type": "File", "start": 0, - "end": 8963, + "end": 8966, "loc": { "start": { "line": 1, @@ -15,7 +15,7 @@ "program": { "type": "Program", "start": 0, - "end": 8963, + "end": 8966, "loc": { "start": { "line": 1, @@ -232,7 +232,7 @@ { "type": "ClassDeclaration", "start": 146, - "end": 8937, + "end": 8940, "loc": { "start": { "line": 9, @@ -265,7 +265,7 @@ "body": { "type": "ClassBody", "start": 159, - "end": 8937, + "end": 8940, "loc": { "start": { "line": 9, @@ -6445,7 +6445,7 @@ } }, "expression": { - "type": "UnaryExpression", + "type": "CallExpression", "start": 5946, "end": 5982, "loc": { @@ -6458,78 +6458,76 @@ "column": 39 } }, - "operator": "delete", - "prefix": true, - "argument": { + "callee": { "type": "MemberExpression", - "start": 5953, - "end": 5982, + "start": 5946, + "end": 5972, "loc": { "start": { "line": 223, - "column": 10 + "column": 3 }, "end": { "line": 223, - "column": 39 + "column": 29 } }, "object": { "type": "MemberExpression", - "start": 5953, - "end": 5972, + "start": 5946, + "end": 5965, "loc": { "start": { "line": 223, - "column": 10 + "column": 3 }, "end": { "line": 223, - "column": 29 + "column": 22 } }, "object": { "type": "MemberExpression", - "start": 5953, - "end": 5963, + "start": 5946, + "end": 5956, "loc": { "start": { "line": 223, - "column": 10 + "column": 3 }, "end": { "line": 223, - "column": 20 + "column": 13 } }, "object": { "type": "ThisExpression", - "start": 5953, - "end": 5957, + "start": 5946, + "end": 5950, "loc": { "start": { "line": 223, - "column": 10 + "column": 3 }, "end": { "line": 223, - "column": 14 + "column": 7 } }, "leadingComments": null }, "property": { "type": "Identifier", - "start": 5958, - "end": 5963, + "start": 5951, + "end": 5956, "loc": { "start": { "line": 223, - "column": 15 + "column": 8 }, "end": { "line": 223, - "column": 20 + "column": 13 }, "identifierName": "world" }, @@ -6540,16 +6538,16 @@ }, "property": { "type": "Identifier", - "start": 5964, - "end": 5972, + "start": 5957, + "end": 5965, "loc": { "start": { "line": 223, - "column": 21 + "column": 14 }, "end": { "line": 223, - "column": 29 + "column": 22 }, "identifierName": "entities" }, @@ -6559,6 +6557,27 @@ "leadingComments": null }, "property": { + "type": "Identifier", + "start": 5966, + "end": 5972, + "loc": { + "start": { + "line": 223, + "column": 23 + }, + "end": { + "line": 223, + "column": 29 + }, + "identifierName": "delete" + }, + "name": "delete" + }, + "computed": false, + "leadingComments": null + }, + "arguments": [ + { "type": "MemberExpression", "start": 5973, "end": 5981, @@ -6605,13 +6624,8 @@ "name": "_id" }, "computed": false - }, - "computed": true, - "leadingComments": null - }, - "extra": { - "parenthesizedArgument": false - }, + } + ], "leadingComments": null }, "leadingComments": [ @@ -8479,7 +8493,7 @@ { "type": "ClassMethod", "start": 8122, - "end": 8354, + "end": 8357, "loc": { "start": { "line": 303, @@ -8537,7 +8551,7 @@ "body": { "type": "BlockStatement", "start": 8136, - "end": 8354, + "end": 8357, "loc": { "start": { "line": 303, @@ -8552,7 +8566,7 @@ { "type": "IfStatement", "start": 8140, - "end": 8351, + "end": 8354, "loc": { "start": { "line": 304, @@ -8683,7 +8697,7 @@ "consequent": { "type": "BlockStatement", "start": 8168, - "end": 8351, + "end": 8354, "loc": { "start": { "line": 304, @@ -8992,7 +9006,7 @@ { "type": "ExpressionStatement", "start": 8275, - "end": 8311, + "end": 8314, "loc": { "start": { "line": 308, @@ -9000,13 +9014,13 @@ }, "end": { "line": 308, - "column": 39 + "column": 42 } }, "expression": { - "type": "AssignmentExpression", + "type": "CallExpression", "start": 8275, - "end": 8311, + "end": 8314, "loc": { "start": { "line": 308, @@ -9014,14 +9028,13 @@ }, "end": { "line": 308, - "column": 39 + "column": 42 } }, - "operator": "=", - "left": { + "callee": { "type": "MemberExpression", "start": 8275, - "end": 8304, + "end": 8298, "loc": { "start": { "line": 308, @@ -9029,7 +9042,7 @@ }, "end": { "line": 308, - "column": 32 + "column": 26 } }, "object": { @@ -9114,9 +9127,9 @@ "computed": false }, "property": { - "type": "MemberExpression", + "type": "Identifier", "start": 8295, - "end": 8303, + "end": 8298, "loc": { "start": { "line": 308, @@ -9124,36 +9137,56 @@ }, "end": { "line": 308, - "column": 31 + "column": 26 + }, + "identifierName": "set" + }, + "name": "set" + }, + "computed": false + }, + "arguments": [ + { + "type": "MemberExpression", + "start": 8299, + "end": 8307, + "loc": { + "start": { + "line": 308, + "column": 27 + }, + "end": { + "line": 308, + "column": 35 } }, "object": { "type": "ThisExpression", - "start": 8295, - "end": 8299, + "start": 8299, + "end": 8303, "loc": { "start": { "line": 308, - "column": 23 + "column": 27 }, "end": { "line": 308, - "column": 27 + "column": 31 } } }, "property": { "type": "Identifier", - "start": 8300, - "end": 8303, + "start": 8304, + "end": 8307, "loc": { "start": { "line": 308, - "column": 28 + "column": 32 }, "end": { "line": 308, - "column": 31 + "column": 35 }, "identifierName": "_id" }, @@ -9161,29 +9194,28 @@ }, "computed": false }, - "computed": true - }, - "right": { - "type": "ThisExpression", - "start": 8307, - "end": 8311, - "loc": { - "start": { - "line": 308, - "column": 35 - }, - "end": { - "line": 308, - "column": 39 + { + "type": "ThisExpression", + "start": 8309, + "end": 8313, + "loc": { + "start": { + "line": 308, + "column": 37 + }, + "end": { + "line": 308, + "column": 41 + } } } - } + ] } }, { "type": "ExpressionStatement", - "start": 8315, - "end": 8347, + "start": 8318, + "end": 8350, "loc": { "start": { "line": 309, @@ -9196,8 +9228,8 @@ }, "expression": { "type": "CallExpression", - "start": 8315, - "end": 8347, + "start": 8318, + "end": 8350, "loc": { "start": { "line": 309, @@ -9210,8 +9242,8 @@ }, "callee": { "type": "MemberExpression", - "start": 8315, - "end": 8341, + "start": 8318, + "end": 8344, "loc": { "start": { "line": 309, @@ -9224,8 +9256,8 @@ }, "object": { "type": "MemberExpression", - "start": 8315, - "end": 8331, + "start": 8318, + "end": 8334, "loc": { "start": { "line": 309, @@ -9238,8 +9270,8 @@ }, "object": { "type": "MemberExpression", - "start": 8315, - "end": 8325, + "start": 8318, + "end": 8328, "loc": { "start": { "line": 309, @@ -9252,8 +9284,8 @@ }, "object": { "type": "ThisExpression", - "start": 8315, - "end": 8319, + "start": 8318, + "end": 8322, "loc": { "start": { "line": 309, @@ -9267,8 +9299,8 @@ }, "property": { "type": "Identifier", - "start": 8320, - "end": 8325, + "start": 8323, + "end": 8328, "loc": { "start": { "line": 309, @@ -9286,8 +9318,8 @@ }, "property": { "type": "Identifier", - "start": 8326, - "end": 8331, + "start": 8329, + "end": 8334, "loc": { "start": { "line": 309, @@ -9305,8 +9337,8 @@ }, "property": { "type": "Identifier", - "start": 8332, - "end": 8341, + "start": 8335, + "end": 8344, "loc": { "start": { "line": 309, @@ -9325,8 +9357,8 @@ "arguments": [ { "type": "ThisExpression", - "start": 8342, - "end": 8346, + "start": 8345, + "end": 8349, "loc": { "start": { "line": 309, @@ -9372,8 +9404,8 @@ { "type": "CommentBlock", "value": "*\n\t * Removes this entity from the current world, without removing any components or data.\n\t * It can be re-attached to another world (or the same world), using the attach() method.\n\t * Note: Do not use detached entities, get() may be safe, but avoid calling other methods\n\t * Note: The ID will be reassigned, so do not rely on this\n\t *\n\t * @example\n\t * entity.detach()\n\t ", - "start": 8357, - "end": 8733, + "start": 8360, + "end": 8736, "loc": { "start": { "line": 313, @@ -9389,8 +9421,8 @@ }, { "type": "ClassMethod", - "start": 8735, - "end": 8935, + "start": 8738, + "end": 8938, "loc": { "start": { "line": 322, @@ -9405,8 +9437,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 8735, - "end": 8741, + "start": 8738, + "end": 8744, "loc": { "start": { "line": 322, @@ -9429,8 +9461,8 @@ "params": [], "body": { "type": "BlockStatement", - "start": 8744, - "end": 8935, + "start": 8747, + "end": 8938, "loc": { "start": { "line": 322, @@ -9444,8 +9476,8 @@ "body": [ { "type": "IfStatement", - "start": 8748, - "end": 8932, + "start": 8751, + "end": 8935, "loc": { "start": { "line": 323, @@ -9458,8 +9490,8 @@ }, "test": { "type": "CallExpression", - "start": 8752, - "end": 8764, + "start": 8755, + "end": 8767, "loc": { "start": { "line": 323, @@ -9472,8 +9504,8 @@ }, "callee": { "type": "MemberExpression", - "start": 8752, - "end": 8762, + "start": 8755, + "end": 8765, "loc": { "start": { "line": 323, @@ -9486,8 +9518,8 @@ }, "object": { "type": "ThisExpression", - "start": 8752, - "end": 8756, + "start": 8755, + "end": 8759, "loc": { "start": { "line": 323, @@ -9501,8 +9533,8 @@ }, "property": { "type": "Identifier", - "start": 8757, - "end": 8762, + "start": 8760, + "end": 8765, "loc": { "start": { "line": 323, @@ -9522,8 +9554,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 8766, - "end": 8932, + "start": 8769, + "end": 8935, "loc": { "start": { "line": 323, @@ -9537,8 +9569,8 @@ "body": [ { "type": "ExpressionStatement", - "start": 8803, - "end": 8838, + "start": 8806, + "end": 8841, "loc": { "start": { "line": 325, @@ -9551,8 +9583,8 @@ }, "expression": { "type": "CallExpression", - "start": 8803, - "end": 8838, + "start": 8806, + "end": 8841, "loc": { "start": { "line": 325, @@ -9565,8 +9597,8 @@ }, "callee": { "type": "MemberExpression", - "start": 8803, - "end": 8832, + "start": 8806, + "end": 8835, "loc": { "start": { "line": 325, @@ -9579,8 +9611,8 @@ }, "object": { "type": "MemberExpression", - "start": 8803, - "end": 8819, + "start": 8806, + "end": 8822, "loc": { "start": { "line": 325, @@ -9593,8 +9625,8 @@ }, "object": { "type": "MemberExpression", - "start": 8803, - "end": 8813, + "start": 8806, + "end": 8816, "loc": { "start": { "line": 325, @@ -9607,8 +9639,8 @@ }, "object": { "type": "ThisExpression", - "start": 8803, - "end": 8807, + "start": 8806, + "end": 8810, "loc": { "start": { "line": 325, @@ -9623,8 +9655,8 @@ }, "property": { "type": "Identifier", - "start": 8808, - "end": 8813, + "start": 8811, + "end": 8816, "loc": { "start": { "line": 325, @@ -9643,8 +9675,8 @@ }, "property": { "type": "Identifier", - "start": 8814, - "end": 8819, + "start": 8817, + "end": 8822, "loc": { "start": { "line": 325, @@ -9663,8 +9695,8 @@ }, "property": { "type": "Identifier", - "start": 8820, - "end": 8832, + "start": 8823, + "end": 8835, "loc": { "start": { "line": 325, @@ -9684,8 +9716,8 @@ "arguments": [ { "type": "ThisExpression", - "start": 8833, - "end": 8837, + "start": 8836, + "end": 8840, "loc": { "start": { "line": 325, @@ -9704,8 +9736,8 @@ { "type": "CommentLine", "value": " Remove from current world", - "start": 8771, - "end": 8799, + "start": 8774, + "end": 8802, "loc": { "start": { "line": 324, @@ -9721,8 +9753,8 @@ }, { "type": "ExpressionStatement", - "start": 8842, - "end": 8878, + "start": 8845, + "end": 8881, "loc": { "start": { "line": 326, @@ -9734,9 +9766,9 @@ } }, "expression": { - "type": "UnaryExpression", - "start": 8842, - "end": 8878, + "type": "CallExpression", + "start": 8845, + "end": 8881, "loc": { "start": { "line": 326, @@ -9747,77 +9779,75 @@ "column": 39 } }, - "operator": "delete", - "prefix": true, - "argument": { + "callee": { "type": "MemberExpression", - "start": 8849, - "end": 8878, + "start": 8845, + "end": 8871, "loc": { "start": { "line": 326, - "column": 10 + "column": 3 }, "end": { "line": 326, - "column": 39 + "column": 29 } }, "object": { "type": "MemberExpression", - "start": 8849, - "end": 8868, + "start": 8845, + "end": 8864, "loc": { "start": { "line": 326, - "column": 10 + "column": 3 }, "end": { "line": 326, - "column": 29 + "column": 22 } }, "object": { "type": "MemberExpression", - "start": 8849, - "end": 8859, + "start": 8845, + "end": 8855, "loc": { "start": { "line": 326, - "column": 10 + "column": 3 }, "end": { "line": 326, - "column": 20 + "column": 13 } }, "object": { "type": "ThisExpression", - "start": 8849, - "end": 8853, + "start": 8845, + "end": 8849, "loc": { "start": { "line": 326, - "column": 10 + "column": 3 }, "end": { "line": 326, - "column": 14 + "column": 7 } } }, "property": { "type": "Identifier", - "start": 8854, - "end": 8859, + "start": 8850, + "end": 8855, "loc": { "start": { "line": 326, - "column": 15 + "column": 8 }, "end": { "line": 326, - "column": 20 + "column": 13 }, "identifierName": "world" }, @@ -9827,16 +9857,16 @@ }, "property": { "type": "Identifier", - "start": 8860, - "end": 8868, + "start": 8856, + "end": 8864, "loc": { "start": { "line": 326, - "column": 21 + "column": 14 }, "end": { "line": 326, - "column": 29 + "column": 22 }, "identifierName": "entities" }, @@ -9845,9 +9875,29 @@ "computed": false }, "property": { + "type": "Identifier", + "start": 8865, + "end": 8871, + "loc": { + "start": { + "line": 326, + "column": 23 + }, + "end": { + "line": 326, + "column": 29 + }, + "identifierName": "delete" + }, + "name": "delete" + }, + "computed": false + }, + "arguments": [ + { "type": "MemberExpression", - "start": 8869, - "end": 8877, + "start": 8872, + "end": 8880, "loc": { "start": { "line": 326, @@ -9860,8 +9910,8 @@ }, "object": { "type": "ThisExpression", - "start": 8869, - "end": 8873, + "start": 8872, + "end": 8876, "loc": { "start": { "line": 326, @@ -9875,8 +9925,8 @@ }, "property": { "type": "Identifier", - "start": 8874, - "end": 8877, + "start": 8877, + "end": 8880, "loc": { "start": { "line": 326, @@ -9891,18 +9941,14 @@ "name": "_id" }, "computed": false - }, - "computed": true - }, - "extra": { - "parenthesizedArgument": false - } + } + ] } }, { "type": "ExpressionStatement", - "start": 8882, - "end": 8902, + "start": 8885, + "end": 8905, "loc": { "start": { "line": 327, @@ -9915,8 +9961,8 @@ }, "expression": { "type": "AssignmentExpression", - "start": 8882, - "end": 8902, + "start": 8885, + "end": 8905, "loc": { "start": { "line": 327, @@ -9930,8 +9976,8 @@ "operator": "=", "left": { "type": "MemberExpression", - "start": 8882, - "end": 8890, + "start": 8885, + "end": 8893, "loc": { "start": { "line": 327, @@ -9944,8 +9990,8 @@ }, "object": { "type": "ThisExpression", - "start": 8882, - "end": 8886, + "start": 8885, + "end": 8889, "loc": { "start": { "line": 327, @@ -9959,8 +10005,8 @@ }, "property": { "type": "Identifier", - "start": 8887, - "end": 8890, + "start": 8890, + "end": 8893, "loc": { "start": { "line": 327, @@ -9978,8 +10024,8 @@ }, "right": { "type": "Identifier", - "start": 8893, - "end": 8902, + "start": 8896, + "end": 8905, "loc": { "start": { "line": 327, @@ -9997,8 +10043,8 @@ }, { "type": "ExpressionStatement", - "start": 8906, - "end": 8928, + "start": 8909, + "end": 8931, "loc": { "start": { "line": 328, @@ -10011,8 +10057,8 @@ }, "expression": { "type": "AssignmentExpression", - "start": 8906, - "end": 8928, + "start": 8909, + "end": 8931, "loc": { "start": { "line": 328, @@ -10026,8 +10072,8 @@ "operator": "=", "left": { "type": "MemberExpression", - "start": 8906, - "end": 8916, + "start": 8909, + "end": 8919, "loc": { "start": { "line": 328, @@ -10040,8 +10086,8 @@ }, "object": { "type": "ThisExpression", - "start": 8906, - "end": 8910, + "start": 8909, + "end": 8913, "loc": { "start": { "line": 328, @@ -10055,8 +10101,8 @@ }, "property": { "type": "Identifier", - "start": 8911, - "end": 8916, + "start": 8914, + "end": 8919, "loc": { "start": { "line": 328, @@ -10074,8 +10120,8 @@ }, "right": { "type": "Identifier", - "start": 8919, - "end": 8928, + "start": 8922, + "end": 8931, "loc": { "start": { "line": 328, @@ -10103,8 +10149,8 @@ { "type": "CommentBlock", "value": "*\n\t * Removes this entity from the current world, without removing any components or data.\n\t * It can be re-attached to another world (or the same world), using the attach() method.\n\t * Note: Do not use detached entities, get() may be safe, but avoid calling other methods\n\t * Note: The ID will be reassigned, so do not rely on this\n\t *\n\t * @example\n\t * entity.detach()\n\t ", - "start": 8357, - "end": 8733, + "start": 8360, + "end": 8736, "loc": { "start": { "line": 313, @@ -10141,8 +10187,8 @@ }, { "type": "ExpressionStatement", - "start": 8939, - "end": 8962, + "start": 8942, + "end": 8965, "loc": { "start": { "line": 333, @@ -10155,8 +10201,8 @@ }, "expression": { "type": "AssignmentExpression", - "start": 8939, - "end": 8962, + "start": 8942, + "end": 8965, "loc": { "start": { "line": 333, @@ -10170,8 +10216,8 @@ "operator": "=", "left": { "type": "MemberExpression", - "start": 8939, - "end": 8953, + "start": 8942, + "end": 8956, "loc": { "start": { "line": 333, @@ -10184,8 +10230,8 @@ }, "object": { "type": "Identifier", - "start": 8939, - "end": 8946, + "start": 8942, + "end": 8949, "loc": { "start": { "line": 333, @@ -10201,8 +10247,8 @@ }, "property": { "type": "Identifier", - "start": 8947, - "end": 8953, + "start": 8950, + "end": 8956, "loc": { "start": { "line": 333, @@ -10220,8 +10266,8 @@ }, "right": { "type": "Identifier", - "start": 8956, - "end": 8962, + "start": 8959, + "end": 8965, "loc": { "start": { "line": 333, @@ -10820,8 +10866,8 @@ { "type": "CommentBlock", "value": "*\n\t * Removes this entity from the current world, without removing any components or data.\n\t * It can be re-attached to another world (or the same world), using the attach() method.\n\t * Note: Do not use detached entities, get() may be safe, but avoid calling other methods\n\t * Note: The ID will be reassigned, so do not rely on this\n\t *\n\t * @example\n\t * entity.detach()\n\t ", - "start": 8357, - "end": 8733, + "start": 8360, + "end": 8736, "loc": { "start": { "line": 313, @@ -10836,8 +10882,8 @@ { "type": "CommentLine", "value": " Remove from current world", - "start": 8771, - "end": 8799, + "start": 8774, + "end": 8802, "loc": { "start": { "line": 324, @@ -22132,21 +22178,21 @@ }, { "type": { - "label": "delete", - "keyword": "delete", - "beforeExpr": true, + "label": "this", + "keyword": "this", + "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, - "prefix": true, + "prefix": false, "postfix": false, "binop": null, "updateContext": null }, - "value": "delete", + "value": "this", "start": 5946, - "end": 5952, + "end": 5950, "loc": { "start": { "line": 223, @@ -22154,16 +22200,15 @@ }, "end": { "line": 223, - "column": 9 + "column": 7 } } }, { "type": { - "label": "this", - "keyword": "this", + "label": ".", "beforeExpr": false, - "startsExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -22172,17 +22217,42 @@ "binop": null, "updateContext": null }, - "value": "this", - "start": 5953, - "end": 5957, + "start": 5950, + "end": 5951, "loc": { "start": { "line": 223, - "column": 10 + "column": 7 }, "end": { "line": 223, - "column": 14 + "column": 8 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "world", + "start": 5951, + "end": 5956, + "loc": { + "start": { + "line": 223, + "column": 8 + }, + "end": { + "line": 223, + "column": 13 } } }, @@ -22199,16 +22269,16 @@ "binop": null, "updateContext": null }, - "start": 5957, - "end": 5958, + "start": 5956, + "end": 5957, "loc": { "start": { "line": 223, - "column": 14 + "column": 13 }, "end": { "line": 223, - "column": 15 + "column": 14 } } }, @@ -22224,17 +22294,17 @@ "postfix": false, "binop": null }, - "value": "world", - "start": 5958, - "end": 5963, + "value": "entities", + "start": 5957, + "end": 5965, "loc": { "start": { "line": 223, - "column": 15 + "column": 14 }, "end": { "line": 223, - "column": 20 + "column": 22 } } }, @@ -22251,38 +22321,40 @@ "binop": null, "updateContext": null }, - "start": 5963, - "end": 5964, + "start": 5965, + "end": 5966, "loc": { "start": { "line": 223, - "column": 20 + "column": 22 }, "end": { "line": 223, - "column": 21 + "column": 23 } } }, { "type": { - "label": "name", - "beforeExpr": false, + "label": "delete", + "keyword": "delete", + "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, - "prefix": false, + "prefix": true, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "entities", - "start": 5964, + "value": "delete", + "start": 5966, "end": 5972, "loc": { "start": { "line": 223, - "column": 21 + "column": 23 }, "end": { "line": 223, @@ -22292,7 +22364,7 @@ }, { "type": { - "label": "[", + "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, @@ -22300,8 +22372,7 @@ "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, "start": 5972, "end": 5973, @@ -22398,7 +22469,7 @@ }, { "type": { - "label": "]", + "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, @@ -22406,8 +22477,7 @@ "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, "start": 5981, "end": 5982, @@ -26587,9 +26657,9 @@ }, { "type": { - "label": "[", - "beforeExpr": true, - "startsExpr": true, + "label": ".", + "beforeExpr": false, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -26613,8 +26683,7 @@ }, { "type": { - "label": "this", - "keyword": "this", + "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, @@ -26622,12 +26691,11 @@ "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "this", + "value": "set", "start": 8295, - "end": 8299, + "end": 8298, "loc": { "start": { "line": 308, @@ -26635,39 +26703,39 @@ }, "end": { "line": 308, - "column": 27 + "column": 26 } } }, { "type": { - "label": ".", - "beforeExpr": false, - "startsExpr": false, + "label": "(", + "beforeExpr": true, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "start": 8299, - "end": 8300, + "start": 8298, + "end": 8299, "loc": { "start": { "line": 308, - "column": 27 + "column": 26 }, "end": { "line": 308, - "column": 28 + "column": 27 } } }, { "type": { - "label": "name", + "label": "this", + "keyword": "this", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, @@ -26675,15 +26743,16 @@ "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "_id", - "start": 8300, + "value": "this", + "start": 8299, "end": 8303, "loc": { "start": { "line": 308, - "column": 28 + "column": 27 }, "end": { "line": 308, @@ -26693,7 +26762,7 @@ }, { "type": { - "label": "]", + "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, @@ -26719,28 +26788,53 @@ }, { "type": { - "label": "=", + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "_id", + "start": 8304, + "end": 8307, + "loc": { + "start": { + "line": 308, + "column": 32 + }, + "end": { + "line": 308, + "column": 35 + } + } + }, + { + "type": { + "label": ",", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, - "isAssign": true, + "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, - "value": "=", - "start": 8305, - "end": 8306, + "start": 8307, + "end": 8308, "loc": { "start": { "line": 308, - "column": 33 + "column": 35 }, "end": { "line": 308, - "column": 34 + "column": 36 } } }, @@ -26759,16 +26853,41 @@ "updateContext": null }, "value": "this", - "start": 8307, - "end": 8311, + "start": 8309, + "end": 8313, "loc": { "start": { "line": 308, - "column": 35 + "column": 37 }, "end": { "line": 308, - "column": 39 + "column": 41 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 8313, + "end": 8314, + "loc": { + "start": { + "line": 308, + "column": 41 + }, + "end": { + "line": 308, + "column": 42 } } }, @@ -26787,8 +26906,8 @@ "updateContext": null }, "value": "this", - "start": 8315, - "end": 8319, + "start": 8318, + "end": 8322, "loc": { "start": { "line": 309, @@ -26813,8 +26932,8 @@ "binop": null, "updateContext": null }, - "start": 8319, - "end": 8320, + "start": 8322, + "end": 8323, "loc": { "start": { "line": 309, @@ -26839,8 +26958,8 @@ "binop": null }, "value": "world", - "start": 8320, - "end": 8325, + "start": 8323, + "end": 8328, "loc": { "start": { "line": 309, @@ -26865,8 +26984,8 @@ "binop": null, "updateContext": null }, - "start": 8325, - "end": 8326, + "start": 8328, + "end": 8329, "loc": { "start": { "line": 309, @@ -26891,8 +27010,8 @@ "binop": null }, "value": "index", - "start": 8326, - "end": 8331, + "start": 8329, + "end": 8334, "loc": { "start": { "line": 309, @@ -26917,8 +27036,8 @@ "binop": null, "updateContext": null }, - "start": 8331, - "end": 8332, + "start": 8334, + "end": 8335, "loc": { "start": { "line": 309, @@ -26943,8 +27062,8 @@ "binop": null }, "value": "addEntity", - "start": 8332, - "end": 8341, + "start": 8335, + "end": 8344, "loc": { "start": { "line": 309, @@ -26968,8 +27087,8 @@ "postfix": false, "binop": null }, - "start": 8341, - "end": 8342, + "start": 8344, + "end": 8345, "loc": { "start": { "line": 309, @@ -26996,8 +27115,8 @@ "updateContext": null }, "value": "this", - "start": 8342, - "end": 8346, + "start": 8345, + "end": 8349, "loc": { "start": { "line": 309, @@ -27021,8 +27140,8 @@ "postfix": false, "binop": null }, - "start": 8346, - "end": 8347, + "start": 8349, + "end": 8350, "loc": { "start": { "line": 309, @@ -27046,8 +27165,8 @@ "postfix": false, "binop": null }, - "start": 8350, - "end": 8351, + "start": 8353, + "end": 8354, "loc": { "start": { "line": 310, @@ -27071,8 +27190,8 @@ "postfix": false, "binop": null }, - "start": 8353, - "end": 8354, + "start": 8356, + "end": 8357, "loc": { "start": { "line": 311, @@ -27087,8 +27206,8 @@ { "type": "CommentBlock", "value": "*\n\t * Removes this entity from the current world, without removing any components or data.\n\t * It can be re-attached to another world (or the same world), using the attach() method.\n\t * Note: Do not use detached entities, get() may be safe, but avoid calling other methods\n\t * Note: The ID will be reassigned, so do not rely on this\n\t *\n\t * @example\n\t * entity.detach()\n\t ", - "start": 8357, - "end": 8733, + "start": 8360, + "end": 8736, "loc": { "start": { "line": 313, @@ -27113,8 +27232,8 @@ "binop": null }, "value": "detach", - "start": 8735, - "end": 8741, + "start": 8738, + "end": 8744, "loc": { "start": { "line": 322, @@ -27138,8 +27257,8 @@ "postfix": false, "binop": null }, - "start": 8741, - "end": 8742, + "start": 8744, + "end": 8745, "loc": { "start": { "line": 322, @@ -27163,8 +27282,8 @@ "postfix": false, "binop": null }, - "start": 8742, - "end": 8743, + "start": 8745, + "end": 8746, "loc": { "start": { "line": 322, @@ -27188,8 +27307,8 @@ "postfix": false, "binop": null }, - "start": 8744, - "end": 8745, + "start": 8747, + "end": 8748, "loc": { "start": { "line": 322, @@ -27216,8 +27335,8 @@ "updateContext": null }, "value": "if", - "start": 8748, - "end": 8750, + "start": 8751, + "end": 8753, "loc": { "start": { "line": 323, @@ -27241,8 +27360,8 @@ "postfix": false, "binop": null }, - "start": 8751, - "end": 8752, + "start": 8754, + "end": 8755, "loc": { "start": { "line": 323, @@ -27269,8 +27388,8 @@ "updateContext": null }, "value": "this", - "start": 8752, - "end": 8756, + "start": 8755, + "end": 8759, "loc": { "start": { "line": 323, @@ -27295,8 +27414,8 @@ "binop": null, "updateContext": null }, - "start": 8756, - "end": 8757, + "start": 8759, + "end": 8760, "loc": { "start": { "line": 323, @@ -27321,8 +27440,8 @@ "binop": null }, "value": "valid", - "start": 8757, - "end": 8762, + "start": 8760, + "end": 8765, "loc": { "start": { "line": 323, @@ -27346,8 +27465,8 @@ "postfix": false, "binop": null }, - "start": 8762, - "end": 8763, + "start": 8765, + "end": 8766, "loc": { "start": { "line": 323, @@ -27371,8 +27490,8 @@ "postfix": false, "binop": null }, - "start": 8763, - "end": 8764, + "start": 8766, + "end": 8767, "loc": { "start": { "line": 323, @@ -27396,8 +27515,8 @@ "postfix": false, "binop": null }, - "start": 8764, - "end": 8765, + "start": 8767, + "end": 8768, "loc": { "start": { "line": 323, @@ -27421,8 +27540,8 @@ "postfix": false, "binop": null }, - "start": 8766, - "end": 8767, + "start": 8769, + "end": 8770, "loc": { "start": { "line": 323, @@ -27437,8 +27556,8 @@ { "type": "CommentLine", "value": " Remove from current world", - "start": 8771, - "end": 8799, + "start": 8774, + "end": 8802, "loc": { "start": { "line": 324, @@ -27465,8 +27584,8 @@ "updateContext": null }, "value": "this", - "start": 8803, - "end": 8807, + "start": 8806, + "end": 8810, "loc": { "start": { "line": 325, @@ -27491,8 +27610,8 @@ "binop": null, "updateContext": null }, - "start": 8807, - "end": 8808, + "start": 8810, + "end": 8811, "loc": { "start": { "line": 325, @@ -27517,8 +27636,8 @@ "binop": null }, "value": "world", - "start": 8808, - "end": 8813, + "start": 8811, + "end": 8816, "loc": { "start": { "line": 325, @@ -27543,8 +27662,8 @@ "binop": null, "updateContext": null }, - "start": 8813, - "end": 8814, + "start": 8816, + "end": 8817, "loc": { "start": { "line": 325, @@ -27569,8 +27688,8 @@ "binop": null }, "value": "index", - "start": 8814, - "end": 8819, + "start": 8817, + "end": 8822, "loc": { "start": { "line": 325, @@ -27595,8 +27714,8 @@ "binop": null, "updateContext": null }, - "start": 8819, - "end": 8820, + "start": 8822, + "end": 8823, "loc": { "start": { "line": 325, @@ -27621,8 +27740,8 @@ "binop": null }, "value": "removeEntity", - "start": 8820, - "end": 8832, + "start": 8823, + "end": 8835, "loc": { "start": { "line": 325, @@ -27646,8 +27765,8 @@ "postfix": false, "binop": null }, - "start": 8832, - "end": 8833, + "start": 8835, + "end": 8836, "loc": { "start": { "line": 325, @@ -27674,8 +27793,8 @@ "updateContext": null }, "value": "this", - "start": 8833, - "end": 8837, + "start": 8836, + "end": 8840, "loc": { "start": { "line": 325, @@ -27699,8 +27818,8 @@ "postfix": false, "binop": null }, - "start": 8837, - "end": 8838, + "start": 8840, + "end": 8841, "loc": { "start": { "line": 325, @@ -27714,21 +27833,21 @@ }, { "type": { - "label": "delete", - "keyword": "delete", - "beforeExpr": true, + "label": "this", + "keyword": "this", + "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, - "prefix": true, + "prefix": false, "postfix": false, "binop": null, "updateContext": null }, - "value": "delete", - "start": 8842, - "end": 8848, + "value": "this", + "start": 8845, + "end": 8849, "loc": { "start": { "line": 326, @@ -27736,16 +27855,15 @@ }, "end": { "line": 326, - "column": 9 + "column": 7 } } }, { "type": { - "label": "this", - "keyword": "this", + "label": ".", "beforeExpr": false, - "startsExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -27754,17 +27872,42 @@ "binop": null, "updateContext": null }, - "value": "this", "start": 8849, - "end": 8853, + "end": 8850, "loc": { "start": { "line": 326, - "column": 10 + "column": 7 }, "end": { "line": 326, - "column": 14 + "column": 8 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "world", + "start": 8850, + "end": 8855, + "loc": { + "start": { + "line": 326, + "column": 8 + }, + "end": { + "line": 326, + "column": 13 } } }, @@ -27781,16 +27924,16 @@ "binop": null, "updateContext": null }, - "start": 8853, - "end": 8854, + "start": 8855, + "end": 8856, "loc": { "start": { "line": 326, - "column": 14 + "column": 13 }, "end": { "line": 326, - "column": 15 + "column": 14 } } }, @@ -27806,17 +27949,17 @@ "postfix": false, "binop": null }, - "value": "world", - "start": 8854, - "end": 8859, + "value": "entities", + "start": 8856, + "end": 8864, "loc": { "start": { "line": 326, - "column": 15 + "column": 14 }, "end": { "line": 326, - "column": 20 + "column": 22 } } }, @@ -27833,38 +27976,40 @@ "binop": null, "updateContext": null }, - "start": 8859, - "end": 8860, + "start": 8864, + "end": 8865, "loc": { "start": { "line": 326, - "column": 20 + "column": 22 }, "end": { "line": 326, - "column": 21 + "column": 23 } } }, { "type": { - "label": "name", - "beforeExpr": false, + "label": "delete", + "keyword": "delete", + "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, - "prefix": false, + "prefix": true, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "entities", - "start": 8860, - "end": 8868, + "value": "delete", + "start": 8865, + "end": 8871, "loc": { "start": { "line": 326, - "column": 21 + "column": 23 }, "end": { "line": 326, @@ -27874,7 +28019,7 @@ }, { "type": { - "label": "[", + "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, @@ -27882,11 +28027,10 @@ "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "start": 8868, - "end": 8869, + "start": 8871, + "end": 8872, "loc": { "start": { "line": 326, @@ -27913,8 +28057,8 @@ "updateContext": null }, "value": "this", - "start": 8869, - "end": 8873, + "start": 8872, + "end": 8876, "loc": { "start": { "line": 326, @@ -27939,8 +28083,8 @@ "binop": null, "updateContext": null }, - "start": 8873, - "end": 8874, + "start": 8876, + "end": 8877, "loc": { "start": { "line": 326, @@ -27965,8 +28109,8 @@ "binop": null }, "value": "_id", - "start": 8874, - "end": 8877, + "start": 8877, + "end": 8880, "loc": { "start": { "line": 326, @@ -27980,7 +28124,7 @@ }, { "type": { - "label": "]", + "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, @@ -27988,11 +28132,10 @@ "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "start": 8877, - "end": 8878, + "start": 8880, + "end": 8881, "loc": { "start": { "line": 326, @@ -28019,8 +28162,8 @@ "updateContext": null }, "value": "this", - "start": 8882, - "end": 8886, + "start": 8885, + "end": 8889, "loc": { "start": { "line": 327, @@ -28045,8 +28188,8 @@ "binop": null, "updateContext": null }, - "start": 8886, - "end": 8887, + "start": 8889, + "end": 8890, "loc": { "start": { "line": 327, @@ -28071,8 +28214,8 @@ "binop": null }, "value": "_id", - "start": 8887, - "end": 8890, + "start": 8890, + "end": 8893, "loc": { "start": { "line": 327, @@ -28098,8 +28241,8 @@ "updateContext": null }, "value": "=", - "start": 8891, - "end": 8892, + "start": 8894, + "end": 8895, "loc": { "start": { "line": 327, @@ -28124,8 +28267,8 @@ "binop": null }, "value": "undefined", - "start": 8893, - "end": 8902, + "start": 8896, + "end": 8905, "loc": { "start": { "line": 327, @@ -28152,8 +28295,8 @@ "updateContext": null }, "value": "this", - "start": 8906, - "end": 8910, + "start": 8909, + "end": 8913, "loc": { "start": { "line": 328, @@ -28178,8 +28321,8 @@ "binop": null, "updateContext": null }, - "start": 8910, - "end": 8911, + "start": 8913, + "end": 8914, "loc": { "start": { "line": 328, @@ -28204,8 +28347,8 @@ "binop": null }, "value": "world", - "start": 8911, - "end": 8916, + "start": 8914, + "end": 8919, "loc": { "start": { "line": 328, @@ -28231,8 +28374,8 @@ "updateContext": null }, "value": "=", - "start": 8917, - "end": 8918, + "start": 8920, + "end": 8921, "loc": { "start": { "line": 328, @@ -28257,8 +28400,8 @@ "binop": null }, "value": "undefined", - "start": 8919, - "end": 8928, + "start": 8922, + "end": 8931, "loc": { "start": { "line": 328, @@ -28282,8 +28425,8 @@ "postfix": false, "binop": null }, - "start": 8931, - "end": 8932, + "start": 8934, + "end": 8935, "loc": { "start": { "line": 329, @@ -28307,8 +28450,8 @@ "postfix": false, "binop": null }, - "start": 8934, - "end": 8935, + "start": 8937, + "end": 8938, "loc": { "start": { "line": 330, @@ -28332,8 +28475,8 @@ "postfix": false, "binop": null }, - "start": 8936, - "end": 8937, + "start": 8939, + "end": 8940, "loc": { "start": { "line": 331, @@ -28358,8 +28501,8 @@ "binop": null }, "value": "exports", - "start": 8939, - "end": 8946, + "start": 8942, + "end": 8949, "loc": { "start": { "line": 333, @@ -28384,8 +28527,8 @@ "binop": null, "updateContext": null }, - "start": 8946, - "end": 8947, + "start": 8949, + "end": 8950, "loc": { "start": { "line": 333, @@ -28410,8 +28553,8 @@ "binop": null }, "value": "Entity", - "start": 8947, - "end": 8953, + "start": 8950, + "end": 8956, "loc": { "start": { "line": 333, @@ -28437,8 +28580,8 @@ "updateContext": null }, "value": "=", - "start": 8954, - "end": 8955, + "start": 8957, + "end": 8958, "loc": { "start": { "line": 333, @@ -28463,8 +28606,8 @@ "binop": null }, "value": "Entity", - "start": 8956, - "end": 8962, + "start": 8959, + "end": 8965, "loc": { "start": { "line": 333, @@ -28489,8 +28632,8 @@ "binop": null, "updateContext": null }, - "start": 8963, - "end": 8963, + "start": 8966, + "end": 8966, "loc": { "start": { "line": 334, diff --git a/docs/ast/source/utilities.js.json b/docs/ast/source/utilities.js.json index 92f8222..aedfcf8 100644 --- a/docs/ast/source/utilities.js.json +++ b/docs/ast/source/utilities.js.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 474, + "end": 619, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 19, + "line": 29, "column": 0 } }, "program": { "type": "Program", "start": 0, - "end": 474, + "end": 619, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 19, + "line": 29, "column": 0 } }, @@ -484,7 +484,8 @@ "alternate": null } ], - "directives": [] + "directives": [], + "trailingComments": null }, "leadingComments": [ { @@ -503,62 +504,259 @@ } } } + ], + "trailingComments": [ + { + "type": "CommentBlock", + "value": "*\n * Determines if function.\n *\n * @ignore\n ", + "start": 450, + "end": 498, + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 22, + "column": 3 + } + } + } + ] + }, + { + "type": "FunctionDeclaration", + "start": 499, + "end": 561, + "loc": { + "start": { + "line": 23, + "column": 0 + }, + "end": { + "line": 25, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 508, + "end": 518, + "loc": { + "start": { + "line": 23, + "column": 9 + }, + "end": { + "line": 23, + "column": 19 + }, + "identifierName": "isFunction" + }, + "name": "isFunction", + "leadingComments": null + }, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 519, + "end": 522, + "loc": { + "start": { + "line": 23, + "column": 20 + }, + "end": { + "line": 23, + "column": 23 + }, + "identifierName": "obj" + }, + "name": "obj" + } + ], + "body": { + "type": "BlockStatement", + "start": 524, + "end": 561, + "loc": { + "start": { + "line": 23, + "column": 25 + }, + "end": { + "line": 25, + "column": 1 + } + }, + "body": [ + { + "type": "ReturnStatement", + "start": 527, + "end": 559, + "loc": { + "start": { + "line": 24, + "column": 1 + }, + "end": { + "line": 24, + "column": 33 + } + }, + "argument": { + "type": "BinaryExpression", + "start": 534, + "end": 559, + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 33 + } + }, + "left": { + "type": "UnaryExpression", + "start": 534, + "end": 544, + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 18 + } + }, + "operator": "typeof", + "prefix": true, + "argument": { + "type": "Identifier", + "start": 541, + "end": 544, + "loc": { + "start": { + "line": 24, + "column": 15 + }, + "end": { + "line": 24, + "column": 18 + }, + "identifierName": "obj" + }, + "name": "obj" + }, + "extra": { + "parenthesizedArgument": false + } + }, + "operator": "===", + "right": { + "type": "StringLiteral", + "start": 549, + "end": 559, + "loc": { + "start": { + "line": 24, + "column": 23 + }, + "end": { + "line": 24, + "column": 33 + } + }, + "extra": { + "rawValue": "function", + "raw": "'function'" + }, + "value": "function" + } + } + } + ], + "directives": [] + }, + "leadingComments": [ + { + "type": "CommentBlock", + "value": "*\n * Determines if function.\n *\n * @ignore\n ", + "start": 450, + "end": 498, + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 22, + "column": 3 + } + } + } ] }, { "type": "ExpressionStatement", - "start": 450, - "end": 473, + "start": 563, + "end": 586, "loc": { "start": { - "line": 18, + "line": 27, "column": 0 }, "end": { - "line": 18, + "line": 27, "column": 23 } }, "expression": { "type": "AssignmentExpression", - "start": 450, - "end": 473, + "start": 563, + "end": 586, "loc": { "start": { - "line": 18, + "line": 27, "column": 0 }, "end": { - "line": 18, + "line": 27, "column": 23 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 450, - "end": 464, + "start": 563, + "end": 577, "loc": { "start": { - "line": 18, + "line": 27, "column": 0 }, "end": { - "line": 18, + "line": 27, "column": 14 } }, "object": { "type": "Identifier", - "start": 450, - "end": 457, + "start": 563, + "end": 570, "loc": { "start": { - "line": 18, + "line": 27, "column": 0 }, "end": { - "line": 18, + "line": 27, "column": 7 }, "identifierName": "exports" @@ -567,15 +765,15 @@ }, "property": { "type": "Identifier", - "start": 458, - "end": 464, + "start": 571, + "end": 577, "loc": { "start": { - "line": 18, + "line": 27, "column": 8 }, "end": { - "line": 18, + "line": 27, "column": 14 }, "identifierName": "invoke" @@ -586,15 +784,15 @@ }, "right": { "type": "Identifier", - "start": 467, - "end": 473, + "start": 580, + "end": 586, "loc": { "start": { - "line": 18, + "line": 27, "column": 17 }, "end": { - "line": 18, + "line": 27, "column": 23 }, "identifierName": "invoke" @@ -602,6 +800,104 @@ "name": "invoke" } } + }, + { + "type": "ExpressionStatement", + "start": 587, + "end": 618, + "loc": { + "start": { + "line": 28, + "column": 0 + }, + "end": { + "line": 28, + "column": 31 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 587, + "end": 618, + "loc": { + "start": { + "line": 28, + "column": 0 + }, + "end": { + "line": 28, + "column": 31 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 587, + "end": 605, + "loc": { + "start": { + "line": 28, + "column": 0 + }, + "end": { + "line": 28, + "column": 18 + } + }, + "object": { + "type": "Identifier", + "start": 587, + "end": 594, + "loc": { + "start": { + "line": 28, + "column": 0 + }, + "end": { + "line": 28, + "column": 7 + }, + "identifierName": "exports" + }, + "name": "exports" + }, + "property": { + "type": "Identifier", + "start": 595, + "end": 605, + "loc": { + "start": { + "line": 28, + "column": 8 + }, + "end": { + "line": 28, + "column": 18 + }, + "identifierName": "isFunction" + }, + "name": "isFunction" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "start": 608, + "end": 618, + "loc": { + "start": { + "line": 28, + "column": 21 + }, + "end": { + "line": 28, + "column": 31 + }, + "identifierName": "isFunction" + }, + "name": "isFunction" + } + } } ], "directives": [] @@ -622,6 +918,22 @@ "column": 3 } } + }, + { + "type": "CommentBlock", + "value": "*\n * Determines if function.\n *\n * @ignore\n ", + "start": 450, + "end": 498, + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 22, + "column": 3 + } + } } ], "tokens": [ @@ -1656,53 +1968,44 @@ } }, { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "exports", + "type": "CommentBlock", + "value": "*\n * Determines if function.\n *\n * @ignore\n ", "start": 450, - "end": 457, + "end": 498, "loc": { "start": { "line": 18, "column": 0 }, "end": { - "line": 18, - "column": 7 + "line": 22, + "column": 3 } } }, { "type": { - "label": ".", + "label": "function", + "keyword": "function", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "start": 457, - "end": 458, + "value": "function", + "start": 499, + "end": 507, "loc": { "start": { - "line": 18, - "column": 7 + "line": 23, + "column": 0 }, "end": { - "line": 18, + "line": 23, "column": 8 } } @@ -1719,44 +2022,42 @@ "postfix": false, "binop": null }, - "value": "invoke", - "start": 458, - "end": 464, + "value": "isFunction", + "start": 508, + "end": 518, "loc": { "start": { - "line": 18, - "column": 8 + "line": 23, + "column": 9 }, "end": { - "line": 18, - "column": 14 + "line": 23, + "column": 19 } } }, { "type": { - "label": "=", + "label": "(", "beforeExpr": true, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, - "isAssign": true, + "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "=", - "start": 465, - "end": 466, + "start": 518, + "end": 519, "loc": { "start": { - "line": 18, - "column": 15 + "line": 23, + "column": 19 }, "end": { - "line": 18, - "column": 16 + "line": 23, + "column": 20 } } }, @@ -1772,17 +2073,490 @@ "postfix": false, "binop": null }, - "value": "invoke", - "start": 467, - "end": 473, + "value": "obj", + "start": 519, + "end": 522, "loc": { "start": { - "line": 18, - "column": 17 + "line": 23, + "column": 20 }, "end": { - "line": 18, + "line": 23, + "column": 23 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 522, + "end": 523, + "loc": { + "start": { + "line": 23, + "column": 23 + }, + "end": { + "line": 23, + "column": 24 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 524, + "end": 525, + "loc": { + "start": { + "line": 23, + "column": 25 + }, + "end": { + "line": 23, + "column": 26 + } + } + }, + { + "type": { + "label": "return", + "keyword": "return", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "return", + "start": 527, + "end": 533, + "loc": { + "start": { + "line": 24, + "column": 1 + }, + "end": { + "line": 24, + "column": 7 + } + } + }, + { + "type": { + "label": "typeof", + "keyword": "typeof", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": true, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "typeof", + "start": 534, + "end": 540, + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 14 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "obj", + "start": 541, + "end": 544, + "loc": { + "start": { + "line": 24, + "column": 15 + }, + "end": { + "line": 24, + "column": 18 + } + } + }, + { + "type": { + "label": "==/!=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": 6, + "updateContext": null + }, + "value": "===", + "start": 545, + "end": 548, + "loc": { + "start": { + "line": 24, + "column": 19 + }, + "end": { + "line": 24, + "column": 22 + } + } + }, + { + "type": { + "label": "string", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "function", + "start": 549, + "end": 559, + "loc": { + "start": { + "line": 24, "column": 23 + }, + "end": { + "line": 24, + "column": 33 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 560, + "end": 561, + "loc": { + "start": { + "line": 25, + "column": 0 + }, + "end": { + "line": 25, + "column": 1 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "exports", + "start": 563, + "end": 570, + "loc": { + "start": { + "line": 27, + "column": 0 + }, + "end": { + "line": 27, + "column": 7 + } + } + }, + { + "type": { + "label": ".", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 570, + "end": 571, + "loc": { + "start": { + "line": 27, + "column": 7 + }, + "end": { + "line": 27, + "column": 8 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "invoke", + "start": 571, + "end": 577, + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 14 + } + } + }, + { + "type": { + "label": "=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": true, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "=", + "start": 578, + "end": 579, + "loc": { + "start": { + "line": 27, + "column": 15 + }, + "end": { + "line": 27, + "column": 16 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "invoke", + "start": 580, + "end": 586, + "loc": { + "start": { + "line": 27, + "column": 17 + }, + "end": { + "line": 27, + "column": 23 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "exports", + "start": 587, + "end": 594, + "loc": { + "start": { + "line": 28, + "column": 0 + }, + "end": { + "line": 28, + "column": 7 + } + } + }, + { + "type": { + "label": ".", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 594, + "end": 595, + "loc": { + "start": { + "line": 28, + "column": 7 + }, + "end": { + "line": 28, + "column": 8 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "isFunction", + "start": 595, + "end": 605, + "loc": { + "start": { + "line": 28, + "column": 8 + }, + "end": { + "line": 28, + "column": 18 + } + } + }, + { + "type": { + "label": "=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": true, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "=", + "start": 606, + "end": 607, + "loc": { + "start": { + "line": 28, + "column": 19 + }, + "end": { + "line": 28, + "column": 20 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "isFunction", + "start": 608, + "end": 618, + "loc": { + "start": { + "line": 28, + "column": 21 + }, + "end": { + "line": 28, + "column": 31 } } }, @@ -1799,15 +2573,15 @@ "binop": null, "updateContext": null }, - "start": 474, - "end": 474, + "start": 619, + "end": 619, "loc": { "start": { - "line": 19, + "line": 29, "column": 0 }, "end": { - "line": 19, + "line": 29, "column": 0 } } diff --git a/docs/ast/source/world.js.json b/docs/ast/source/world.js.json index c3c11f6..bd26954 100644 --- a/docs/ast/source/world.js.json +++ b/docs/ast/source/world.js.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 8915, + "end": 8816, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 322, + "line": 316, "column": 0 } }, "program": { "type": "Program", "start": 0, - "end": 8915, + "end": 8816, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 322, + "line": 316, "column": 0 } }, @@ -31,7 +31,7 @@ { "type": "VariableDeclaration", "start": 15, - "end": 59, + "end": 71, "loc": { "start": { "line": 2, @@ -39,14 +39,14 @@ }, "end": { "line": 2, - "column": 44 + "column": 56 } }, "declarations": [ { "type": "VariableDeclarator", "start": 21, - "end": 59, + "end": 71, "loc": { "start": { "line": 2, @@ -54,13 +54,13 @@ }, "end": { "line": 2, - "column": 44 + "column": 56 } }, "id": { "type": "ObjectPattern", "start": 21, - "end": 31, + "end": 43, "loc": { "start": { "line": 2, @@ -68,7 +68,7 @@ }, "end": { "line": 2, - "column": 16 + "column": 28 } }, "properties": [ @@ -128,36 +128,91 @@ "extra": { "shorthand": true } + }, + { + "type": "ObjectProperty", + "start": 31, + "end": 41, + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 26 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 31, + "end": 41, + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 26 + }, + "identifierName": "isFunction" + }, + "name": "isFunction" + }, + "value": { + "type": "Identifier", + "start": 31, + "end": 41, + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 26 + }, + "identifierName": "isFunction" + }, + "name": "isFunction" + }, + "extra": { + "shorthand": true + } } ], "leadingComments": null }, "init": { "type": "CallExpression", - "start": 34, - "end": 59, + "start": 46, + "end": 71, "loc": { "start": { "line": 2, - "column": 19 + "column": 31 }, "end": { "line": 2, - "column": 44 + "column": 56 } }, "callee": { "type": "Identifier", - "start": 34, - "end": 41, + "start": 46, + "end": 53, "loc": { "start": { "line": 2, - "column": 19 + "column": 31 }, "end": { "line": 2, - "column": 26 + "column": 38 }, "identifierName": "require" }, @@ -166,16 +221,16 @@ "arguments": [ { "type": "StringLiteral", - "start": 42, - "end": 58, + "start": 54, + "end": 70, "loc": { "start": { "line": 2, - "column": 27 + "column": 39 }, "end": { "line": 2, - "column": 43 + "column": 55 } }, "extra": { @@ -214,8 +269,8 @@ { "type": "CommentBlock", "value": "* @ignore ", - "start": 61, - "end": 75, + "start": 73, + "end": 87, "loc": { "start": { "line": 4, @@ -231,8 +286,8 @@ }, { "type": "VariableDeclaration", - "start": 76, - "end": 117, + "start": 88, + "end": 129, "loc": { "start": { "line": 5, @@ -246,8 +301,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 82, - "end": 117, + "start": 94, + "end": 129, "loc": { "start": { "line": 5, @@ -260,8 +315,8 @@ }, "id": { "type": "ObjectPattern", - "start": 82, - "end": 92, + "start": 94, + "end": 104, "loc": { "start": { "line": 5, @@ -275,8 +330,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 84, - "end": 90, + "start": 96, + "end": 102, "loc": { "start": { "line": 5, @@ -292,8 +347,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 84, - "end": 90, + "start": 96, + "end": 102, "loc": { "start": { "line": 5, @@ -310,8 +365,8 @@ }, "value": { "type": "Identifier", - "start": 84, - "end": 90, + "start": 96, + "end": 102, "loc": { "start": { "line": 5, @@ -335,8 +390,8 @@ }, "init": { "type": "CallExpression", - "start": 95, - "end": 117, + "start": 107, + "end": 129, "loc": { "start": { "line": 5, @@ -349,8 +404,8 @@ }, "callee": { "type": "Identifier", - "start": 95, - "end": 102, + "start": 107, + "end": 114, "loc": { "start": { "line": 5, @@ -367,8 +422,8 @@ "arguments": [ { "type": "StringLiteral", - "start": 103, - "end": 116, + "start": 115, + "end": 128, "loc": { "start": { "line": 5, @@ -397,8 +452,8 @@ { "type": "CommentBlock", "value": "* @ignore ", - "start": 61, - "end": 75, + "start": 73, + "end": 87, "loc": { "start": { "line": 4, @@ -415,8 +470,8 @@ { "type": "CommentBlock", "value": "* @ignore ", - "start": 119, - "end": 133, + "start": 131, + "end": 145, "loc": { "start": { "line": 7, @@ -432,8 +487,8 @@ }, { "type": "VariableDeclaration", - "start": 134, - "end": 192, + "start": 146, + "end": 204, "loc": { "start": { "line": 8, @@ -447,8 +502,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 140, - "end": 192, + "start": 152, + "end": 204, "loc": { "start": { "line": 8, @@ -461,8 +516,8 @@ }, "id": { "type": "ObjectPattern", - "start": 140, - "end": 158, + "start": 152, + "end": 170, "loc": { "start": { "line": 8, @@ -476,8 +531,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 142, - "end": 156, + "start": 154, + "end": 168, "loc": { "start": { "line": 8, @@ -493,8 +548,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 142, - "end": 156, + "start": 154, + "end": 168, "loc": { "start": { "line": 8, @@ -511,8 +566,8 @@ }, "value": { "type": "Identifier", - "start": 142, - "end": 156, + "start": 154, + "end": 168, "loc": { "start": { "line": 8, @@ -536,8 +591,8 @@ }, "init": { "type": "CallExpression", - "start": 161, - "end": 192, + "start": 173, + "end": 204, "loc": { "start": { "line": 8, @@ -550,8 +605,8 @@ }, "callee": { "type": "Identifier", - "start": 161, - "end": 168, + "start": 173, + "end": 180, "loc": { "start": { "line": 8, @@ -568,8 +623,8 @@ "arguments": [ { "type": "StringLiteral", - "start": 169, - "end": 191, + "start": 181, + "end": 203, "loc": { "start": { "line": 8, @@ -598,8 +653,8 @@ { "type": "CommentBlock", "value": "* @ignore ", - "start": 119, - "end": 133, + "start": 131, + "end": 145, "loc": { "start": { "line": 7, @@ -615,9 +670,9 @@ "trailingComments": [ { "type": "CommentBlock", - "value": "*\n * Determines if function.\n *\n * @ignore\n ", - "start": 194, - "end": 242, + "value": "*\n * Class for world.\n *\n * @class World (name)\n ", + "start": 206, + "end": 264, "loc": { "start": { "line": 10, @@ -632,228 +687,30 @@ ] }, { - "type": "FunctionDeclaration", - "start": 243, - "end": 305, + "type": "ClassDeclaration", + "start": 265, + "end": 8792, "loc": { "start": { "line": 15, "column": 0 }, "end": { - "line": 17, + "line": 313, "column": 1 } }, "id": { "type": "Identifier", - "start": 252, - "end": 262, - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 19 - }, - "identifierName": "isFunction" - }, - "name": "isFunction", - "leadingComments": null - }, - "generator": false, - "expression": false, - "async": false, - "params": [ - { - "type": "Identifier", - "start": 263, - "end": 266, - "loc": { - "start": { - "line": 15, - "column": 20 - }, - "end": { - "line": 15, - "column": 23 - }, - "identifierName": "obj" - }, - "name": "obj" - } - ], - "body": { - "type": "BlockStatement", - "start": 268, - "end": 305, + "start": 271, + "end": 276, "loc": { "start": { "line": 15, - "column": 25 - }, - "end": { - "line": 17, - "column": 1 - } - }, - "body": [ - { - "type": "ReturnStatement", - "start": 271, - "end": 303, - "loc": { - "start": { - "line": 16, - "column": 1 - }, - "end": { - "line": 16, - "column": 33 - } - }, - "argument": { - "type": "BinaryExpression", - "start": 278, - "end": 303, - "loc": { - "start": { - "line": 16, - "column": 8 - }, - "end": { - "line": 16, - "column": 33 - } - }, - "left": { - "type": "UnaryExpression", - "start": 278, - "end": 288, - "loc": { - "start": { - "line": 16, - "column": 8 - }, - "end": { - "line": 16, - "column": 18 - } - }, - "operator": "typeof", - "prefix": true, - "argument": { - "type": "Identifier", - "start": 285, - "end": 288, - "loc": { - "start": { - "line": 16, - "column": 15 - }, - "end": { - "line": 16, - "column": 18 - }, - "identifierName": "obj" - }, - "name": "obj" - }, - "extra": { - "parenthesizedArgument": false - } - }, - "operator": "===", - "right": { - "type": "StringLiteral", - "start": 293, - "end": 303, - "loc": { - "start": { - "line": 16, - "column": 23 - }, - "end": { - "line": 16, - "column": 33 - } - }, - "extra": { - "rawValue": "function", - "raw": "'function'" - }, - "value": "function" - } - } - } - ], - "directives": [], - "trailingComments": null - }, - "leadingComments": [ - { - "type": "CommentBlock", - "value": "*\n * Determines if function.\n *\n * @ignore\n ", - "start": 194, - "end": 242, - "loc": { - "start": { - "line": 10, - "column": 0 - }, - "end": { - "line": 14, - "column": 3 - } - } - } - ], - "trailingComments": [ - { - "type": "CommentBlock", - "value": "*\n * Class for world.\n *\n * @class World (name)\n ", - "start": 307, - "end": 365, - "loc": { - "start": { - "line": 19, - "column": 0 - }, - "end": { - "line": 23, - "column": 3 - } - } - } - ] - }, - { - "type": "ClassDeclaration", - "start": 366, - "end": 8891, - "loc": { - "start": { - "line": 24, - "column": 0 - }, - "end": { - "line": 319, - "column": 1 - } - }, - "id": { - "type": "Identifier", - "start": 372, - "end": 377, - "loc": { - "start": { - "line": 24, "column": 6 }, "end": { - "line": 24, + "line": 15, "column": 11 }, "identifierName": "World" @@ -864,30 +721,30 @@ "superClass": null, "body": { "type": "ClassBody", - "start": 378, - "end": 8891, + "start": 277, + "end": 8792, "loc": { "start": { - "line": 24, + "line": 15, "column": 12 }, "end": { - "line": 319, + "line": 313, "column": 1 } }, "body": [ { "type": "ClassMethod", - "start": 432, - "end": 771, + "start": 331, + "end": 721, "loc": { "start": { - "line": 28, + "line": 19, "column": 1 }, "end": { - "line": 46, + "line": 43, "column": 2 } }, @@ -895,15 +752,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 432, - "end": 443, + "start": 331, + "end": 342, "loc": { "start": { - "line": 28, + "line": 19, "column": 1 }, "end": { - "line": 28, + "line": 19, "column": 12 }, "identifierName": "constructor" @@ -919,73 +776,73 @@ "params": [], "body": { "type": "BlockStatement", - "start": 446, - "end": 771, + "start": 345, + "end": 721, "loc": { "start": { - "line": 28, + "line": 19, "column": 15 }, "end": { - "line": 46, + "line": 43, "column": 2 } }, "body": [ { "type": "ExpressionStatement", - "start": 467, - "end": 484, + "start": 366, + "end": 383, "loc": { "start": { - "line": 30, + "line": 21, "column": 2 }, "end": { - "line": 30, + "line": 21, "column": 19 } }, "expression": { "type": "AssignmentExpression", - "start": 467, - "end": 484, + "start": 366, + "end": 383, "loc": { "start": { - "line": 30, + "line": 21, "column": 2 }, "end": { - "line": 30, + "line": 21, "column": 19 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 467, - "end": 479, + "start": 366, + "end": 378, "loc": { "start": { - "line": 30, + "line": 21, "column": 2 }, "end": { - "line": 30, + "line": 21, "column": 14 } }, "object": { "type": "ThisExpression", - "start": 467, - "end": 471, + "start": 366, + "end": 370, "loc": { "start": { - "line": 30, + "line": 21, "column": 2 }, "end": { - "line": 30, + "line": 21, "column": 6 } }, @@ -993,15 +850,15 @@ }, "property": { "type": "Identifier", - "start": 472, - "end": 479, + "start": 371, + "end": 378, "loc": { "start": { - "line": 30, + "line": 21, "column": 7 }, "end": { - "line": 30, + "line": 21, "column": 14 }, "identifierName": "systems" @@ -1013,15 +870,15 @@ }, "right": { "type": "ArrayExpression", - "start": 482, - "end": 484, + "start": 381, + "end": 383, "loc": { "start": { - "line": 30, + "line": 21, "column": 17 }, "end": { - "line": 30, + "line": 21, "column": 19 } }, @@ -1036,15 +893,15 @@ { "type": "CommentBlock", "value": "* @ignore ", - "start": 450, - "end": 464, + "start": 349, + "end": 363, "loc": { "start": { - "line": 29, + "line": 20, "column": 2 }, "end": { - "line": 29, + "line": 20, "column": 16 } } @@ -1053,17 +910,17 @@ "trailingComments": [ { "type": "CommentBlock", - "value": "* @ignore ", - "start": 487, - "end": 501, + "value": "*\n\t\t * Maps entity IDs to entities\n\t\t * @ignore\n\t\t ", + "start": 387, + "end": 442, "loc": { "start": { - "line": 31, + "line": 23, "column": 2 }, "end": { - "line": 31, - "column": 16 + "line": 26, + "column": 5 } } } @@ -1071,58 +928,58 @@ }, { "type": "ExpressionStatement", - "start": 504, - "end": 522, + "start": 445, + "end": 470, "loc": { "start": { - "line": 32, + "line": 27, "column": 2 }, "end": { - "line": 32, - "column": 20 + "line": 27, + "column": 27 } }, "expression": { "type": "AssignmentExpression", - "start": 504, - "end": 522, + "start": 445, + "end": 470, "loc": { "start": { - "line": 32, + "line": 27, "column": 2 }, "end": { - "line": 32, - "column": 20 + "line": 27, + "column": 27 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 504, - "end": 517, + "start": 445, + "end": 458, "loc": { "start": { - "line": 32, + "line": 27, "column": 2 }, "end": { - "line": 32, + "line": 27, "column": 15 } }, "object": { "type": "ThisExpression", - "start": 504, - "end": 508, + "start": 445, + "end": 449, "loc": { "start": { - "line": 32, + "line": 27, "column": 2 }, "end": { - "line": 32, + "line": 27, "column": 6 } }, @@ -1130,15 +987,15 @@ }, "property": { "type": "Identifier", - "start": 509, - "end": 517, + "start": 450, + "end": 458, "loc": { "start": { - "line": 32, + "line": 27, "column": 7 }, "end": { - "line": 32, + "line": 27, "column": 15 }, "identifierName": "entities" @@ -1149,21 +1006,37 @@ "leadingComments": null }, "right": { - "type": "ObjectExpression", - "start": 520, - "end": 522, + "type": "NewExpression", + "start": 461, + "end": 470, "loc": { "start": { - "line": 32, + "line": 27, "column": 18 }, "end": { - "line": 32, - "column": 20 + "line": 27, + "column": 27 } }, - "properties": [], - "leadingComments": null, + "callee": { + "type": "Identifier", + "start": 465, + "end": 468, + "loc": { + "start": { + "line": 27, + "column": 22 + }, + "end": { + "line": 27, + "column": 25 + }, + "identifierName": "Map" + }, + "name": "Map" + }, + "arguments": [], "trailingComments": null }, "leadingComments": null, @@ -1172,17 +1045,17 @@ "leadingComments": [ { "type": "CommentBlock", - "value": "* @ignore ", - "start": 487, - "end": 501, + "value": "*\n\t\t * Maps entity IDs to entities\n\t\t * @ignore\n\t\t ", + "start": 387, + "end": 442, "loc": { "start": { - "line": 31, + "line": 23, "column": 2 }, "end": { - "line": 31, - "column": 16 + "line": 26, + "column": 5 } } } @@ -1191,15 +1064,15 @@ { "type": "CommentBlock", "value": "* @ignore ", - "start": 525, - "end": 539, + "start": 474, + "end": 488, "loc": { "start": { - "line": 33, + "line": 29, "column": 2 }, "end": { - "line": 33, + "line": 29, "column": 16 } } @@ -1208,58 +1081,58 @@ }, { "type": "ExpressionStatement", - "start": 542, - "end": 562, + "start": 491, + "end": 511, "loc": { "start": { - "line": 34, + "line": 30, "column": 2 }, "end": { - "line": 34, + "line": 30, "column": 22 } }, "expression": { "type": "AssignmentExpression", - "start": 542, - "end": 562, + "start": 491, + "end": 511, "loc": { "start": { - "line": 34, + "line": 30, "column": 2 }, "end": { - "line": 34, + "line": 30, "column": 22 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 542, - "end": 557, + "start": 491, + "end": 506, "loc": { "start": { - "line": 34, + "line": 30, "column": 2 }, "end": { - "line": 34, + "line": 30, "column": 17 } }, "object": { "type": "ThisExpression", - "start": 542, - "end": 546, + "start": 491, + "end": 495, "loc": { "start": { - "line": 34, + "line": 30, "column": 2 }, "end": { - "line": 34, + "line": 30, "column": 6 } }, @@ -1267,15 +1140,15 @@ }, "property": { "type": "Identifier", - "start": 547, - "end": 557, + "start": 496, + "end": 506, "loc": { "start": { - "line": 34, + "line": 30, "column": 7 }, "end": { - "line": 34, + "line": 30, "column": 17 }, "identifierName": "components" @@ -1287,15 +1160,15 @@ }, "right": { "type": "ObjectExpression", - "start": 560, - "end": 562, + "start": 509, + "end": 511, "loc": { "start": { - "line": 34, + "line": 30, "column": 20 }, "end": { - "line": 34, + "line": 30, "column": 22 } }, @@ -1310,15 +1183,15 @@ { "type": "CommentBlock", "value": "* @ignore ", - "start": 525, - "end": 539, + "start": 474, + "end": 488, "loc": { "start": { - "line": 33, + "line": 29, "column": 2 }, "end": { - "line": 33, + "line": 29, "column": 16 } } @@ -1328,15 +1201,15 @@ { "type": "CommentBlock", "value": "* @ignore ", - "start": 565, - "end": 579, + "start": 515, + "end": 529, "loc": { "start": { - "line": 35, + "line": 32, "column": 2 }, "end": { - "line": 35, + "line": 32, "column": 16 } } @@ -1345,58 +1218,58 @@ }, { "type": "ExpressionStatement", - "start": 582, - "end": 607, + "start": 532, + "end": 557, "loc": { "start": { - "line": 36, + "line": 33, "column": 2 }, "end": { - "line": 36, + "line": 33, "column": 27 } }, "expression": { "type": "AssignmentExpression", - "start": 582, - "end": 607, + "start": 532, + "end": 557, "loc": { "start": { - "line": 36, + "line": 33, "column": 2 }, "end": { - "line": 36, + "line": 33, "column": 27 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 582, - "end": 602, + "start": 532, + "end": 552, "loc": { "start": { - "line": 36, + "line": 33, "column": 2 }, "end": { - "line": 36, + "line": 33, "column": 22 } }, "object": { "type": "ThisExpression", - "start": 582, - "end": 586, + "start": 532, + "end": 536, "loc": { "start": { - "line": 36, + "line": 33, "column": 2 }, "end": { - "line": 36, + "line": 33, "column": 6 } }, @@ -1404,15 +1277,15 @@ }, "property": { "type": "Identifier", - "start": 587, - "end": 602, + "start": 537, + "end": 552, "loc": { "start": { - "line": 36, + "line": 33, "column": 7 }, "end": { - "line": 36, + "line": 33, "column": 22 }, "identifierName": "entityTemplates" @@ -1424,15 +1297,15 @@ }, "right": { "type": "ObjectExpression", - "start": 605, - "end": 607, + "start": 555, + "end": 557, "loc": { "start": { - "line": 36, + "line": 33, "column": 25 }, "end": { - "line": 36, + "line": 33, "column": 27 } }, @@ -1447,15 +1320,15 @@ { "type": "CommentBlock", "value": "* @ignore ", - "start": 565, - "end": 579, + "start": 515, + "end": 529, "loc": { "start": { - "line": 35, + "line": 32, "column": 2 }, "end": { - "line": 35, + "line": 32, "column": 16 } } @@ -1465,15 +1338,15 @@ { "type": "CommentBlock", "value": "* @ignore ", - "start": 611, - "end": 625, + "start": 561, + "end": 575, "loc": { "start": { - "line": 38, + "line": 35, "column": 2 }, "end": { - "line": 38, + "line": 35, "column": 16 } } @@ -1482,58 +1355,58 @@ }, { "type": "ExpressionStatement", - "start": 628, - "end": 646, + "start": 578, + "end": 596, "loc": { "start": { - "line": 39, + "line": 36, "column": 2 }, "end": { - "line": 39, + "line": 36, "column": 20 } }, "expression": { "type": "AssignmentExpression", - "start": 628, - "end": 646, + "start": 578, + "end": 596, "loc": { "start": { - "line": 39, + "line": 36, "column": 2 }, "end": { - "line": 39, + "line": 36, "column": 20 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 628, - "end": 642, + "start": 578, + "end": 592, "loc": { "start": { - "line": 39, + "line": 36, "column": 2 }, "end": { - "line": 39, + "line": 36, "column": 16 } }, "object": { "type": "ThisExpression", - "start": 628, - "end": 632, + "start": 578, + "end": 582, "loc": { "start": { - "line": 39, + "line": 36, "column": 2 }, "end": { - "line": 39, + "line": 36, "column": 6 } }, @@ -1541,15 +1414,15 @@ }, "property": { "type": "Identifier", - "start": 633, - "end": 642, + "start": 583, + "end": 592, "loc": { "start": { - "line": 39, + "line": 36, "column": 7 }, "end": { - "line": 39, + "line": 36, "column": 16 }, "identifierName": "idCounter" @@ -1561,15 +1434,15 @@ }, "right": { "type": "NumericLiteral", - "start": 645, - "end": 646, + "start": 595, + "end": 596, "loc": { "start": { - "line": 39, + "line": 36, "column": 19 }, "end": { - "line": 39, + "line": 36, "column": 20 } }, @@ -1588,15 +1461,15 @@ { "type": "CommentBlock", "value": "* @ignore ", - "start": 611, - "end": 625, + "start": 561, + "end": 575, "loc": { "start": { - "line": 38, + "line": 35, "column": 2 }, "end": { - "line": 38, + "line": 35, "column": 16 } } @@ -1606,15 +1479,15 @@ { "type": "CommentBlock", "value": "*\n\t\t * Maps entire queries to arrays of entities\n\t\t * @ignore\n\t\t ", - "start": 650, - "end": 719, + "start": 600, + "end": 669, "loc": { "start": { - "line": 41, + "line": 38, "column": 2 }, "end": { - "line": 44, + "line": 41, "column": 5 } } @@ -1623,58 +1496,58 @@ }, { "type": "ExpressionStatement", - "start": 722, - "end": 768, + "start": 672, + "end": 718, "loc": { "start": { - "line": 45, + "line": 42, "column": 2 }, "end": { - "line": 45, + "line": 42, "column": 48 } }, "expression": { "type": "AssignmentExpression", - "start": 722, - "end": 768, + "start": 672, + "end": 718, "loc": { "start": { - "line": 45, + "line": 42, "column": 2 }, "end": { - "line": 45, + "line": 42, "column": 48 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 722, - "end": 732, + "start": 672, + "end": 682, "loc": { "start": { - "line": 45, + "line": 42, "column": 2 }, "end": { - "line": 45, + "line": 42, "column": 12 } }, "object": { "type": "ThisExpression", - "start": 722, - "end": 726, + "start": 672, + "end": 676, "loc": { "start": { - "line": 45, + "line": 42, "column": 2 }, "end": { - "line": 45, + "line": 42, "column": 6 } }, @@ -1682,15 +1555,15 @@ }, "property": { "type": "Identifier", - "start": 727, - "end": 732, + "start": 677, + "end": 682, "loc": { "start": { - "line": 45, + "line": 42, "column": 7 }, "end": { - "line": 45, + "line": 42, "column": 12 }, "identifierName": "index" @@ -1702,29 +1575,29 @@ }, "right": { "type": "NewExpression", - "start": 735, - "end": 768, + "start": 685, + "end": 718, "loc": { "start": { - "line": 45, + "line": 42, "column": 15 }, "end": { - "line": 45, + "line": 42, "column": 48 } }, "callee": { "type": "Identifier", - "start": 739, - "end": 753, + "start": 689, + "end": 703, "loc": { "start": { - "line": 45, + "line": 42, "column": 19 }, "end": { - "line": 45, + "line": 42, "column": 33 }, "identifierName": "ComponentIndex" @@ -1734,44 +1607,44 @@ "arguments": [ { "type": "MemberExpression", - "start": 754, - "end": 767, + "start": 704, + "end": 717, "loc": { "start": { - "line": 45, + "line": 42, "column": 34 }, "end": { - "line": 45, + "line": 42, "column": 47 } }, "object": { "type": "ThisExpression", - "start": 754, - "end": 758, + "start": 704, + "end": 708, "loc": { "start": { - "line": 45, + "line": 42, "column": 34 }, "end": { - "line": 45, + "line": 42, "column": 38 } } }, "property": { "type": "Identifier", - "start": 759, - "end": 767, + "start": 709, + "end": 717, "loc": { "start": { - "line": 45, + "line": 42, "column": 39 }, "end": { - "line": 45, + "line": 42, "column": 47 }, "identifierName": "entities" @@ -1788,15 +1661,15 @@ { "type": "CommentBlock", "value": "*\n\t\t * Maps entire queries to arrays of entities\n\t\t * @ignore\n\t\t ", - "start": 650, - "end": 719, + "start": 600, + "end": 669, "loc": { "start": { - "line": 41, + "line": 38, "column": 2 }, "end": { - "line": 44, + "line": 41, "column": 5 } } @@ -1811,15 +1684,15 @@ { "type": "CommentBlock", "value": "*\n\t * Constructs an instance of the world.\n\t ", - "start": 381, - "end": 430, + "start": 280, + "end": 329, "loc": { "start": { - "line": 25, + "line": 16, "column": 1 }, "end": { - "line": 27, + "line": 18, "column": 4 } } @@ -1829,15 +1702,15 @@ { "type": "CommentBlock", "value": "*\n\t * Removes all entities from the world.\n\t * Does not affect registered systems, components, or prototypes.\n\t *\n\t * @example\n\t * world.clear()\n\t ", - "start": 774, - "end": 925, + "start": 724, + "end": 875, "loc": { "start": { - "line": 48, + "line": 45, "column": 1 }, "end": { - "line": 54, + "line": 51, "column": 4 } } @@ -1846,15 +1719,15 @@ }, { "type": "ClassMethod", - "start": 927, - "end": 1389, + "start": 877, + "end": 1278, "loc": { "start": { - "line": 55, + "line": 52, "column": 1 }, "end": { - "line": 71, + "line": 65, "column": 2 } }, @@ -1862,15 +1735,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 927, - "end": 932, + "start": 877, + "end": 882, "loc": { "start": { - "line": 55, + "line": 52, "column": 1 }, "end": { - "line": 55, + "line": 52, "column": 6 }, "identifierName": "clear" @@ -1886,128 +1759,163 @@ "params": [], "body": { "type": "BlockStatement", - "start": 935, - "end": 1389, + "start": 885, + "end": 1278, "loc": { "start": { - "line": 55, + "line": 52, "column": 9 }, "end": { - "line": 71, + "line": 65, "column": 2 } }, "body": [ { - "type": "ForInStatement", - "start": 992, - "end": 1310, + "type": "ForOfStatement", + "start": 942, + "end": 1192, "loc": { "start": { - "line": 57, + "line": 54, "column": 2 }, "end": { - "line": 66, + "line": 60, "column": 3 } }, "left": { "type": "VariableDeclaration", - "start": 997, - "end": 1009, + "start": 947, + "end": 971, "loc": { "start": { - "line": 57, + "line": 54, "column": 7 }, "end": { - "line": 57, - "column": 19 + "line": 54, + "column": 31 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 1001, - "end": 1009, + "start": 953, + "end": 971, "loc": { "start": { - "line": 57, - "column": 11 + "line": 54, + "column": 13 }, "end": { - "line": 57, - "column": 19 + "line": 54, + "column": 31 } }, "id": { - "type": "Identifier", - "start": 1001, - "end": 1009, + "type": "ArrayPattern", + "start": 953, + "end": 971, "loc": { "start": { - "line": 57, - "column": 11 + "line": 54, + "column": 13 }, "end": { - "line": 57, - "column": 19 - }, - "identifierName": "entityId" + "line": 54, + "column": 31 + } }, - "name": "entityId", + "elements": [ + { + "type": "Identifier", + "start": 954, + "end": 962, + "loc": { + "start": { + "line": 54, + "column": 14 + }, + "end": { + "line": 54, + "column": 22 + }, + "identifierName": "entityId" + }, + "name": "entityId", + "leadingComments": null + }, + { + "type": "Identifier", + "start": 964, + "end": 970, + "loc": { + "start": { + "line": 54, + "column": 24 + }, + "end": { + "line": 54, + "column": 30 + }, + "identifierName": "entity" + }, + "name": "entity" + } + ], "leadingComments": null }, "init": null, "leadingComments": null } ], - "kind": "let", + "kind": "const", "leadingComments": null }, "right": { "type": "MemberExpression", - "start": 1013, - "end": 1026, + "start": 975, + "end": 988, "loc": { "start": { - "line": 57, - "column": 23 + "line": 54, + "column": 35 }, "end": { - "line": 57, - "column": 36 + "line": 54, + "column": 48 } }, "object": { "type": "ThisExpression", - "start": 1013, - "end": 1017, + "start": 975, + "end": 979, "loc": { "start": { - "line": 57, - "column": 23 + "line": 54, + "column": 35 }, "end": { - "line": 57, - "column": 27 + "line": 54, + "column": 39 } } }, "property": { "type": "Identifier", - "start": 1018, - "end": 1026, + "start": 980, + "end": 988, "loc": { "start": { - "line": 57, - "column": 28 + "line": 54, + "column": 40 }, "end": { - "line": 57, - "column": 36 + "line": 54, + "column": 48 }, "identifierName": "entities" }, @@ -2017,204 +1925,73 @@ }, "body": { "type": "BlockStatement", - "start": 1028, - "end": 1310, + "start": 990, + "end": 1192, "loc": { "start": { - "line": 57, - "column": 38 + "line": 54, + "column": 50 }, "end": { - "line": 66, + "line": 60, "column": 3 } }, "body": [ - { - "type": "VariableDeclaration", - "start": 1033, - "end": 1069, - "loc": { - "start": { - "line": 58, - "column": 3 - }, - "end": { - "line": 58, - "column": 39 - } - }, - "declarations": [ - { - "type": "VariableDeclarator", - "start": 1037, - "end": 1069, - "loc": { - "start": { - "line": 58, - "column": 7 - }, - "end": { - "line": 58, - "column": 39 - } - }, - "id": { - "type": "Identifier", - "start": 1037, - "end": 1043, - "loc": { - "start": { - "line": 58, - "column": 7 - }, - "end": { - "line": 58, - "column": 13 - }, - "identifierName": "entity" - }, - "name": "entity" - }, - "init": { - "type": "MemberExpression", - "start": 1046, - "end": 1069, - "loc": { - "start": { - "line": 58, - "column": 16 - }, - "end": { - "line": 58, - "column": 39 - } - }, - "object": { - "type": "MemberExpression", - "start": 1046, - "end": 1059, - "loc": { - "start": { - "line": 58, - "column": 16 - }, - "end": { - "line": 58, - "column": 29 - } - }, - "object": { - "type": "ThisExpression", - "start": 1046, - "end": 1050, - "loc": { - "start": { - "line": 58, - "column": 16 - }, - "end": { - "line": 58, - "column": 20 - } - } - }, - "property": { - "type": "Identifier", - "start": 1051, - "end": 1059, - "loc": { - "start": { - "line": 58, - "column": 21 - }, - "end": { - "line": 58, - "column": 29 - }, - "identifierName": "entities" - }, - "name": "entities" - }, - "computed": false - }, - "property": { - "type": "Identifier", - "start": 1060, - "end": 1068, - "loc": { - "start": { - "line": 58, - "column": 30 - }, - "end": { - "line": 58, - "column": 38 - }, - "identifierName": "entityId" - }, - "name": "entityId" - }, - "computed": true - } - } - ], - "kind": "let" - }, { "type": "ForInStatement", - "start": 1073, - "end": 1306, + "start": 995, + "end": 1188, "loc": { "start": { - "line": 59, + "line": 55, "column": 3 }, "end": { - "line": 65, + "line": 59, "column": 4 } }, "left": { "type": "VariableDeclaration", - "start": 1078, - "end": 1095, + "start": 1000, + "end": 1017, "loc": { "start": { - "line": 59, + "line": 55, "column": 8 }, "end": { - "line": 59, + "line": 55, "column": 25 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 1082, - "end": 1095, + "start": 1004, + "end": 1017, "loc": { "start": { - "line": 59, + "line": 55, "column": 12 }, "end": { - "line": 59, + "line": 55, "column": 25 } }, "id": { "type": "Identifier", - "start": 1082, - "end": 1095, + "start": 1004, + "end": 1017, "loc": { "start": { - "line": 59, + "line": 55, "column": 12 }, "end": { - "line": 59, + "line": 55, "column": 25 }, "identifierName": "componentName" @@ -2228,29 +2005,29 @@ }, "right": { "type": "MemberExpression", - "start": 1099, - "end": 1110, + "start": 1021, + "end": 1032, "loc": { "start": { - "line": 59, + "line": 55, "column": 29 }, "end": { - "line": 59, + "line": 55, "column": 40 } }, "object": { "type": "Identifier", - "start": 1099, - "end": 1105, + "start": 1021, + "end": 1027, "loc": { "start": { - "line": 59, + "line": 55, "column": 29 }, "end": { - "line": 59, + "line": 55, "column": 35 }, "identifierName": "entity" @@ -2259,15 +2036,15 @@ }, "property": { "type": "Identifier", - "start": 1106, - "end": 1110, + "start": 1028, + "end": 1032, "loc": { "start": { - "line": 59, + "line": 55, "column": 36 }, "end": { - "line": 59, + "line": 55, "column": 40 }, "identifierName": "data" @@ -2278,59 +2055,59 @@ }, "body": { "type": "BlockStatement", - "start": 1112, - "end": 1306, + "start": 1034, + "end": 1188, "loc": { "start": { - "line": 59, + "line": 55, "column": 42 }, "end": { - "line": 65, + "line": 59, "column": 4 } }, "body": [ { "type": "VariableDeclaration", - "start": 1185, - "end": 1227, + "start": 1107, + "end": 1149, "loc": { "start": { - "line": 61, + "line": 57, "column": 4 }, "end": { - "line": 61, + "line": 57, "column": 46 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 1189, - "end": 1227, + "start": 1111, + "end": 1149, "loc": { "start": { - "line": 61, + "line": 57, "column": 8 }, "end": { - "line": 61, + "line": 57, "column": 46 } }, "id": { "type": "Identifier", - "start": 1189, - "end": 1198, + "start": 1111, + "end": 1120, "loc": { "start": { - "line": 61, + "line": 57, "column": 8 }, "end": { - "line": 61, + "line": 57, "column": 17 }, "identifierName": "component" @@ -2340,43 +2117,43 @@ }, "init": { "type": "MemberExpression", - "start": 1201, - "end": 1227, + "start": 1123, + "end": 1149, "loc": { "start": { - "line": 61, + "line": 57, "column": 20 }, "end": { - "line": 61, + "line": 57, "column": 46 } }, "object": { "type": "MemberExpression", - "start": 1201, - "end": 1212, + "start": 1123, + "end": 1134, "loc": { "start": { - "line": 61, + "line": 57, "column": 20 }, "end": { - "line": 61, + "line": 57, "column": 31 } }, "object": { "type": "Identifier", - "start": 1201, - "end": 1207, + "start": 1123, + "end": 1129, "loc": { "start": { - "line": 61, + "line": 57, "column": 20 }, "end": { - "line": 61, + "line": 57, "column": 26 }, "identifierName": "entity" @@ -2385,15 +2162,15 @@ }, "property": { "type": "Identifier", - "start": 1208, - "end": 1212, + "start": 1130, + "end": 1134, "loc": { "start": { - "line": 61, + "line": 57, "column": 27 }, "end": { - "line": 61, + "line": 57, "column": 31 }, "identifierName": "data" @@ -2404,15 +2181,15 @@ }, "property": { "type": "Identifier", - "start": 1213, - "end": 1226, + "start": 1135, + "end": 1148, "loc": { "start": { - "line": 61, + "line": 57, "column": 32 }, "end": { - "line": 61, + "line": 57, "column": 45 }, "identifierName": "componentName" @@ -2429,15 +2206,15 @@ { "type": "CommentLine", "value": " Get component, and call onRemove if it exists as a function", - "start": 1118, - "end": 1180, + "start": 1040, + "end": 1102, "loc": { "start": { - "line": 60, + "line": 56, "column": 4 }, "end": { - "line": 60, + "line": 56, "column": 66 } } @@ -2445,203 +2222,90 @@ ] }, { - "type": "IfStatement", - "start": 1232, - "end": 1301, + "type": "ExpressionStatement", + "start": 1154, + "end": 1183, "loc": { "start": { - "line": 62, + "line": 58, "column": 4 }, "end": { - "line": 64, - "column": 5 + "line": 58, + "column": 33 } }, - "test": { + "expression": { "type": "CallExpression", - "start": 1236, - "end": 1266, + "start": 1154, + "end": 1183, "loc": { "start": { - "line": 62, - "column": 8 + "line": 58, + "column": 4 }, "end": { - "line": 62, - "column": 38 + "line": 58, + "column": 33 } }, "callee": { "type": "Identifier", - "start": 1236, - "end": 1246, + "start": 1154, + "end": 1160, "loc": { "start": { - "line": 62, - "column": 8 + "line": 58, + "column": 4 }, "end": { - "line": 62, - "column": 18 + "line": 58, + "column": 10 }, - "identifierName": "isFunction" + "identifierName": "invoke" }, - "name": "isFunction" + "name": "invoke" }, "arguments": [ { - "type": "MemberExpression", - "start": 1247, - "end": 1265, + "type": "Identifier", + "start": 1161, + "end": 1170, "loc": { "start": { - "line": 62, - "column": 19 + "line": 58, + "column": 11 }, "end": { - "line": 62, - "column": 37 - } - }, - "object": { - "type": "Identifier", - "start": 1247, - "end": 1256, - "loc": { - "start": { - "line": 62, - "column": 19 - }, - "end": { - "line": 62, - "column": 28 - }, - "identifierName": "component" - }, - "name": "component" - }, - "property": { - "type": "Identifier", - "start": 1257, - "end": 1265, - "loc": { - "start": { - "line": 62, - "column": 29 - }, - "end": { - "line": 62, - "column": 37 - }, - "identifierName": "onRemove" + "line": 58, + "column": 20 }, - "name": "onRemove" + "identifierName": "component" }, - "computed": false - } - ] - }, - "consequent": { - "type": "BlockStatement", - "start": 1268, - "end": 1301, - "loc": { - "start": { - "line": 62, - "column": 40 + "name": "component" }, - "end": { - "line": 64, - "column": 5 - } - }, - "body": [ { - "type": "ExpressionStatement", - "start": 1275, - "end": 1295, + "type": "StringLiteral", + "start": 1172, + "end": 1182, "loc": { "start": { - "line": 63, - "column": 5 + "line": 58, + "column": 22 }, "end": { - "line": 63, - "column": 25 + "line": 58, + "column": 32 } }, - "expression": { - "type": "CallExpression", - "start": 1275, - "end": 1295, - "loc": { - "start": { - "line": 63, - "column": 5 - }, - "end": { - "line": 63, - "column": 25 - } - }, - "callee": { - "type": "MemberExpression", - "start": 1275, - "end": 1293, - "loc": { - "start": { - "line": 63, - "column": 5 - }, - "end": { - "line": 63, - "column": 23 - } - }, - "object": { - "type": "Identifier", - "start": 1275, - "end": 1284, - "loc": { - "start": { - "line": 63, - "column": 5 - }, - "end": { - "line": 63, - "column": 14 - }, - "identifierName": "component" - }, - "name": "component" - }, - "property": { - "type": "Identifier", - "start": 1285, - "end": 1293, - "loc": { - "start": { - "line": 63, - "column": 15 - }, - "end": { - "line": 63, - "column": 23 - }, - "identifierName": "onRemove" - }, - "name": "onRemove" - }, - "computed": false - }, - "arguments": [] - } + "extra": { + "rawValue": "onRemove", + "raw": "'onRemove'" + }, + "value": "onRemove" } - ], - "directives": [] - }, - "alternate": null + ] + } } ], "directives": [] @@ -2655,15 +2319,15 @@ { "type": "CommentLine", "value": " Call onRemove on all components of all entities", - "start": 939, - "end": 989, + "start": 889, + "end": 939, "loc": { "start": { - "line": 56, + "line": 53, "column": 2 }, "end": { - "line": 56, + "line": 53, "column": 52 } } @@ -2673,15 +2337,15 @@ { "type": "CommentLine", "value": " Clear entities", - "start": 1314, - "end": 1331, + "start": 1196, + "end": 1213, "loc": { "start": { - "line": 68, + "line": 62, "column": 2 }, "end": { - "line": 68, + "line": 62, "column": 19 } } @@ -2690,58 +2354,58 @@ }, { "type": "ExpressionStatement", - "start": 1334, - "end": 1352, + "start": 1216, + "end": 1241, "loc": { "start": { - "line": 69, + "line": 63, "column": 2 }, "end": { - "line": 69, - "column": 20 + "line": 63, + "column": 27 } }, "expression": { "type": "AssignmentExpression", - "start": 1334, - "end": 1352, + "start": 1216, + "end": 1241, "loc": { "start": { - "line": 69, + "line": 63, "column": 2 }, "end": { - "line": 69, - "column": 20 + "line": 63, + "column": 27 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 1334, - "end": 1347, + "start": 1216, + "end": 1229, "loc": { "start": { - "line": 69, + "line": 63, "column": 2 }, "end": { - "line": 69, + "line": 63, "column": 15 } }, "object": { "type": "ThisExpression", - "start": 1334, - "end": 1338, + "start": 1216, + "end": 1220, "loc": { "start": { - "line": 69, + "line": 63, "column": 2 }, "end": { - "line": 69, + "line": 63, "column": 6 } }, @@ -2749,15 +2413,15 @@ }, "property": { "type": "Identifier", - "start": 1339, - "end": 1347, + "start": 1221, + "end": 1229, "loc": { "start": { - "line": 69, + "line": 63, "column": 7 }, "end": { - "line": 69, + "line": 63, "column": 15 }, "identifierName": "entities" @@ -2768,20 +2432,37 @@ "leadingComments": null }, "right": { - "type": "ObjectExpression", - "start": 1350, - "end": 1352, + "type": "NewExpression", + "start": 1232, + "end": 1241, "loc": { "start": { - "line": 69, + "line": 63, "column": 18 }, "end": { - "line": 69, - "column": 20 + "line": 63, + "column": 27 } }, - "properties": [] + "callee": { + "type": "Identifier", + "start": 1236, + "end": 1239, + "loc": { + "start": { + "line": 63, + "column": 22 + }, + "end": { + "line": 63, + "column": 25 + }, + "identifierName": "Map" + }, + "name": "Map" + }, + "arguments": [] }, "leadingComments": null }, @@ -2789,15 +2470,15 @@ { "type": "CommentLine", "value": " Clear entities", - "start": 1314, - "end": 1331, + "start": 1196, + "end": 1213, "loc": { "start": { - "line": 68, + "line": 62, "column": 2 }, "end": { - "line": 68, + "line": 62, "column": 19 } } @@ -2806,86 +2487,86 @@ }, { "type": "ExpressionStatement", - "start": 1355, - "end": 1386, + "start": 1244, + "end": 1275, "loc": { "start": { - "line": 70, + "line": 64, "column": 2 }, "end": { - "line": 70, + "line": 64, "column": 33 } }, "expression": { "type": "CallExpression", - "start": 1355, - "end": 1386, + "start": 1244, + "end": 1275, "loc": { "start": { - "line": 70, + "line": 64, "column": 2 }, "end": { - "line": 70, + "line": 64, "column": 33 } }, "callee": { "type": "MemberExpression", - "start": 1355, - "end": 1371, + "start": 1244, + "end": 1260, "loc": { "start": { - "line": 70, + "line": 64, "column": 2 }, "end": { - "line": 70, + "line": 64, "column": 18 } }, "object": { "type": "MemberExpression", - "start": 1355, - "end": 1365, + "start": 1244, + "end": 1254, "loc": { "start": { - "line": 70, + "line": 64, "column": 2 }, "end": { - "line": 70, + "line": 64, "column": 12 } }, "object": { "type": "ThisExpression", - "start": 1355, - "end": 1359, + "start": 1244, + "end": 1248, "loc": { "start": { - "line": 70, + "line": 64, "column": 2 }, "end": { - "line": 70, + "line": 64, "column": 6 } } }, "property": { "type": "Identifier", - "start": 1360, - "end": 1365, + "start": 1249, + "end": 1254, "loc": { "start": { - "line": 70, + "line": 64, "column": 7 }, "end": { - "line": 70, + "line": 64, "column": 12 }, "identifierName": "index" @@ -2896,15 +2577,15 @@ }, "property": { "type": "Identifier", - "start": 1366, - "end": 1371, + "start": 1255, + "end": 1260, "loc": { "start": { - "line": 70, + "line": 64, "column": 13 }, "end": { - "line": 70, + "line": 64, "column": 18 }, "identifierName": "clear" @@ -2916,44 +2597,44 @@ "arguments": [ { "type": "MemberExpression", - "start": 1372, - "end": 1385, + "start": 1261, + "end": 1274, "loc": { "start": { - "line": 70, + "line": 64, "column": 19 }, "end": { - "line": 70, + "line": 64, "column": 32 } }, "object": { "type": "ThisExpression", - "start": 1372, - "end": 1376, + "start": 1261, + "end": 1265, "loc": { "start": { - "line": 70, + "line": 64, "column": 19 }, "end": { - "line": 70, + "line": 64, "column": 23 } } }, "property": { "type": "Identifier", - "start": 1377, - "end": 1385, + "start": 1266, + "end": 1274, "loc": { "start": { - "line": 70, + "line": 64, "column": 24 }, "end": { - "line": 70, + "line": 64, "column": 32 }, "identifierName": "entities" @@ -2973,15 +2654,15 @@ { "type": "CommentBlock", "value": "*\n\t * Removes all entities from the world.\n\t * Does not affect registered systems, components, or prototypes.\n\t *\n\t * @example\n\t * world.clear()\n\t ", - "start": 774, - "end": 925, + "start": 724, + "end": 875, "loc": { "start": { - "line": 48, + "line": 45, "column": 1 }, "end": { - "line": 54, + "line": 51, "column": 4 } } @@ -2991,15 +2672,15 @@ { "type": "CommentBlock", "value": "*\n\t * Registers a component type to the world. Components must be constructable. They are passed the entity first,\n\t * then the rest of the arguments from methods like entity.set(). Components also can have an onRemove() method.\n\t *\n\t * @param {string} name - The name\n\t * @param {function} componentClass - The component class, must be a constructable class or function\n\t *\n\t * @example\n\t * world.component('myComponent', class {\n\t * constructor(entity, some, args) {\n\t * this.entity = entity\n\t * this.some = some\n\t * this.args = args\n\t * }\n\t * })\n\t * // entity === the new entity object\n\t * // some === 10\n\t * // args === 500\n\t * world.entity().set('myComponent', 10, 500)\n\t *\n\t * @return {string} Registered component name on success, undefined on failure\n\t ", - "start": 1392, - "end": 2201, + "start": 1281, + "end": 2090, "loc": { "start": { - "line": 73, + "line": 67, "column": 1 }, "end": { - "line": 94, + "line": 88, "column": 4 } } @@ -3008,15 +2689,15 @@ }, { "type": "ClassMethod", - "start": 2203, - "end": 2391, + "start": 2092, + "end": 2280, "loc": { "start": { - "line": 95, + "line": 89, "column": 1 }, "end": { - "line": 101, + "line": 95, "column": 2 } }, @@ -3024,15 +2705,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 2203, - "end": 2212, + "start": 2092, + "end": 2101, "loc": { "start": { - "line": 95, + "line": 89, "column": 1 }, "end": { - "line": 95, + "line": 89, "column": 10 }, "identifierName": "component" @@ -3048,15 +2729,15 @@ "params": [ { "type": "Identifier", - "start": 2213, - "end": 2217, + "start": 2102, + "end": 2106, "loc": { "start": { - "line": 95, + "line": 89, "column": 11 }, "end": { - "line": 95, + "line": 89, "column": 15 }, "identifierName": "name" @@ -3065,15 +2746,15 @@ }, { "type": "Identifier", - "start": 2219, - "end": 2233, + "start": 2108, + "end": 2122, "loc": { "start": { - "line": 95, + "line": 89, "column": 17 }, "end": { - "line": 95, + "line": 89, "column": 31 }, "identifierName": "componentClass" @@ -3083,58 +2764,58 @@ ], "body": { "type": "BlockStatement", - "start": 2235, - "end": 2391, + "start": 2124, + "end": 2280, "loc": { "start": { - "line": 95, + "line": 89, "column": 33 }, "end": { - "line": 101, + "line": 95, "column": 2 } }, "body": [ { "type": "IfStatement", - "start": 2294, - "end": 2388, + "start": 2183, + "end": 2277, "loc": { "start": { - "line": 97, + "line": 91, "column": 2 }, "end": { - "line": 100, + "line": 94, "column": 3 } }, "test": { "type": "CallExpression", - "start": 2298, - "end": 2324, + "start": 2187, + "end": 2213, "loc": { "start": { - "line": 97, + "line": 91, "column": 6 }, "end": { - "line": 97, + "line": 91, "column": 32 } }, "callee": { "type": "Identifier", - "start": 2298, - "end": 2308, + "start": 2187, + "end": 2197, "loc": { "start": { - "line": 97, + "line": 91, "column": 6 }, "end": { - "line": 97, + "line": 91, "column": 16 }, "identifierName": "isFunction" @@ -3145,15 +2826,15 @@ "arguments": [ { "type": "Identifier", - "start": 2309, - "end": 2323, + "start": 2198, + "end": 2212, "loc": { "start": { - "line": 97, + "line": 91, "column": 17 }, "end": { - "line": 97, + "line": 91, "column": 31 }, "identifierName": "componentClass" @@ -3165,102 +2846,102 @@ }, "consequent": { "type": "BlockStatement", - "start": 2326, - "end": 2388, + "start": 2215, + "end": 2277, "loc": { "start": { - "line": 97, + "line": 91, "column": 34 }, "end": { - "line": 100, + "line": 94, "column": 3 } }, "body": [ { "type": "ExpressionStatement", - "start": 2331, - "end": 2369, + "start": 2220, + "end": 2258, "loc": { "start": { - "line": 98, + "line": 92, "column": 3 }, "end": { - "line": 98, + "line": 92, "column": 41 } }, "expression": { "type": "AssignmentExpression", - "start": 2331, - "end": 2369, + "start": 2220, + "end": 2258, "loc": { "start": { - "line": 98, + "line": 92, "column": 3 }, "end": { - "line": 98, + "line": 92, "column": 41 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 2331, - "end": 2352, + "start": 2220, + "end": 2241, "loc": { "start": { - "line": 98, + "line": 92, "column": 3 }, "end": { - "line": 98, + "line": 92, "column": 24 } }, "object": { "type": "MemberExpression", - "start": 2331, - "end": 2346, + "start": 2220, + "end": 2235, "loc": { "start": { - "line": 98, + "line": 92, "column": 3 }, "end": { - "line": 98, + "line": 92, "column": 18 } }, "object": { "type": "ThisExpression", - "start": 2331, - "end": 2335, + "start": 2220, + "end": 2224, "loc": { "start": { - "line": 98, + "line": 92, "column": 3 }, "end": { - "line": 98, + "line": 92, "column": 7 } } }, "property": { "type": "Identifier", - "start": 2336, - "end": 2346, + "start": 2225, + "end": 2235, "loc": { "start": { - "line": 98, + "line": 92, "column": 8 }, "end": { - "line": 98, + "line": 92, "column": 18 }, "identifierName": "components" @@ -3271,15 +2952,15 @@ }, "property": { "type": "Identifier", - "start": 2347, - "end": 2351, + "start": 2236, + "end": 2240, "loc": { "start": { - "line": 98, + "line": 92, "column": 19 }, "end": { - "line": 98, + "line": 92, "column": 23 }, "identifierName": "name" @@ -3290,15 +2971,15 @@ }, "right": { "type": "Identifier", - "start": 2355, - "end": 2369, + "start": 2244, + "end": 2258, "loc": { "start": { - "line": 98, + "line": 92, "column": 27 }, "end": { - "line": 98, + "line": 92, "column": 41 }, "identifierName": "componentClass" @@ -3309,29 +2990,29 @@ }, { "type": "ReturnStatement", - "start": 2373, - "end": 2384, + "start": 2262, + "end": 2273, "loc": { "start": { - "line": 99, + "line": 93, "column": 3 }, "end": { - "line": 99, + "line": 93, "column": 14 } }, "argument": { "type": "Identifier", - "start": 2380, - "end": 2384, + "start": 2269, + "end": 2273, "loc": { "start": { - "line": 99, + "line": 93, "column": 10 }, "end": { - "line": 99, + "line": 93, "column": 14 }, "identifierName": "name" @@ -3347,15 +3028,15 @@ { "type": "CommentLine", "value": " Only allow functions and classes to be components", - "start": 2239, - "end": 2291, + "start": 2128, + "end": 2180, "loc": { "start": { - "line": 96, + "line": 90, "column": 2 }, "end": { - "line": 96, + "line": 90, "column": 54 } } @@ -3370,15 +3051,15 @@ { "type": "CommentBlock", "value": "*\n\t * Registers a component type to the world. Components must be constructable. They are passed the entity first,\n\t * then the rest of the arguments from methods like entity.set(). Components also can have an onRemove() method.\n\t *\n\t * @param {string} name - The name\n\t * @param {function} componentClass - The component class, must be a constructable class or function\n\t *\n\t * @example\n\t * world.component('myComponent', class {\n\t * constructor(entity, some, args) {\n\t * this.entity = entity\n\t * this.some = some\n\t * this.args = args\n\t * }\n\t * })\n\t * // entity === the new entity object\n\t * // some === 10\n\t * // args === 500\n\t * world.entity().set('myComponent', 10, 500)\n\t *\n\t * @return {string} Registered component name on success, undefined on failure\n\t ", - "start": 1392, - "end": 2201, + "start": 1281, + "end": 2090, "loc": { "start": { - "line": 73, + "line": 67, "column": 1 }, "end": { - "line": 94, + "line": 88, "column": 4 } } @@ -3388,15 +3069,15 @@ { "type": "CommentBlock", "value": "*\n\t * Creates a new entity in the world\n\t *\n\t * @param {string} [name] - The prototype name to use\n\t *\n\t * @example\n\t * world.entity()\n\t *\n\t * @example\n\t * world.entity('Player')\n\t *\n\t * @return {Entity} The new entity created\n\t ", - "start": 2394, - "end": 2627, + "start": 2283, + "end": 2516, "loc": { "start": { - "line": 103, + "line": 97, "column": 1 }, "end": { - "line": 115, + "line": 109, "column": 4 } } @@ -3405,15 +3086,15 @@ }, { "type": "ClassMethod", - "start": 2629, - "end": 3162, + "start": 2518, + "end": 3063, "loc": { "start": { - "line": 116, + "line": 110, "column": 1 }, "end": { - "line": 133, + "line": 127, "column": 2 } }, @@ -3421,15 +3102,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 2629, - "end": 2635, + "start": 2518, + "end": 2524, "loc": { "start": { - "line": 116, + "line": 110, "column": 1 }, "end": { - "line": 116, + "line": 110, "column": 7 }, "identifierName": "entity" @@ -3445,15 +3126,15 @@ "params": [ { "type": "Identifier", - "start": 2636, - "end": 2640, + "start": 2525, + "end": 2529, "loc": { "start": { - "line": 116, + "line": 110, "column": 8 }, "end": { - "line": 116, + "line": 110, "column": 12 }, "identifierName": "name" @@ -3463,122 +3144,122 @@ ], "body": { "type": "BlockStatement", - "start": 2642, - "end": 3162, + "start": 2531, + "end": 3063, "loc": { "start": { - "line": 116, + "line": 110, "column": 14 }, "end": { - "line": 133, + "line": 127, "column": 2 } }, "body": [ { "type": "VariableDeclaration", - "start": 2646, - "end": 2674, + "start": 2535, + "end": 2566, "loc": { "start": { - "line": 117, + "line": 111, "column": 2 }, "end": { - "line": 117, - "column": 30 + "line": 111, + "column": 33 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 2650, - "end": 2674, + "start": 2539, + "end": 2566, "loc": { "start": { - "line": 117, + "line": 111, "column": 6 }, "end": { - "line": 117, - "column": 30 + "line": 111, + "column": 33 } }, "id": { "type": "Identifier", - "start": 2650, - "end": 2655, + "start": 2539, + "end": 2547, "loc": { "start": { - "line": 117, + "line": 111, "column": 6 }, "end": { - "line": 117, - "column": 11 + "line": 111, + "column": 14 }, - "identifierName": "entId" + "identifierName": "entityId" }, - "name": "entId" + "name": "entityId" }, "init": { "type": "UpdateExpression", - "start": 2658, - "end": 2674, + "start": 2550, + "end": 2566, "loc": { "start": { - "line": 117, - "column": 14 + "line": 111, + "column": 17 }, "end": { - "line": 117, - "column": 30 + "line": 111, + "column": 33 } }, "operator": "++", "prefix": false, "argument": { "type": "MemberExpression", - "start": 2658, - "end": 2672, + "start": 2550, + "end": 2564, "loc": { "start": { - "line": 117, - "column": 14 + "line": 111, + "column": 17 }, "end": { - "line": 117, - "column": 28 + "line": 111, + "column": 31 } }, "object": { "type": "ThisExpression", - "start": 2658, - "end": 2662, + "start": 2550, + "end": 2554, "loc": { "start": { - "line": 117, - "column": 14 + "line": 111, + "column": 17 }, "end": { - "line": 117, - "column": 18 + "line": 111, + "column": 21 } } }, "property": { "type": "Identifier", - "start": 2663, - "end": 2672, + "start": 2555, + "end": 2564, "loc": { "start": { - "line": 117, - "column": 19 + "line": 111, + "column": 22 }, "end": { - "line": 117, - "column": 28 + "line": 111, + "column": 31 }, "identifierName": "idCounter" }, @@ -3593,44 +3274,44 @@ }, { "type": "VariableDeclaration", - "start": 2677, - "end": 2713, + "start": 2569, + "end": 2608, "loc": { "start": { - "line": 118, + "line": 112, "column": 2 }, "end": { - "line": 118, - "column": 38 + "line": 112, + "column": 41 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 2681, - "end": 2713, + "start": 2573, + "end": 2608, "loc": { "start": { - "line": 118, + "line": 112, "column": 6 }, "end": { - "line": 118, - "column": 38 + "line": 112, + "column": 41 } }, "id": { "type": "Identifier", - "start": 2681, - "end": 2687, + "start": 2573, + "end": 2579, "loc": { "start": { - "line": 118, + "line": 112, "column": 6 }, "end": { - "line": 118, + "line": 112, "column": 12 }, "identifierName": "entity" @@ -3639,29 +3320,29 @@ }, "init": { "type": "NewExpression", - "start": 2690, - "end": 2713, + "start": 2582, + "end": 2608, "loc": { "start": { - "line": 118, + "line": 112, "column": 15 }, "end": { - "line": 118, - "column": 38 + "line": 112, + "column": 41 } }, "callee": { "type": "Identifier", - "start": 2694, - "end": 2700, + "start": 2586, + "end": 2592, "loc": { "start": { - "line": 118, + "line": 112, "column": 19 }, "end": { - "line": 118, + "line": 112, "column": 25 }, "identifierName": "Entity" @@ -3671,35 +3352,35 @@ "arguments": [ { "type": "ThisExpression", - "start": 2701, - "end": 2705, + "start": 2593, + "end": 2597, "loc": { "start": { - "line": 118, + "line": 112, "column": 26 }, "end": { - "line": 118, + "line": 112, "column": 30 } } }, { "type": "Identifier", - "start": 2707, - "end": 2712, + "start": 2599, + "end": 2607, "loc": { "start": { - "line": 118, + "line": 112, "column": 32 }, "end": { - "line": 118, - "column": 37 + "line": 112, + "column": 40 }, - "identifierName": "entId" + "identifierName": "entityId" }, - "name": "entId" + "name": "entityId" } ], "trailingComments": null @@ -3712,15 +3393,15 @@ { "type": "CommentLine", "value": " Use 'name' to get prototype data (if specified)", - "start": 2717, - "end": 2767, + "start": 2612, + "end": 2662, "loc": { "start": { - "line": 120, + "line": 114, "column": 2 }, "end": { - "line": 120, + "line": 114, "column": 52 } } @@ -3729,43 +3410,43 @@ }, { "type": "IfStatement", - "start": 2770, - "end": 3110, + "start": 2665, + "end": 3005, "loc": { "start": { - "line": 121, + "line": 115, "column": 2 }, "end": { - "line": 129, + "line": 123, "column": 3 } }, "test": { "type": "LogicalExpression", - "start": 2774, - "end": 2810, + "start": 2669, + "end": 2705, "loc": { "start": { - "line": 121, + "line": 115, "column": 6 }, "end": { - "line": 121, + "line": 115, "column": 42 } }, "left": { "type": "Identifier", - "start": 2774, - "end": 2778, + "start": 2669, + "end": 2673, "loc": { "start": { - "line": 121, + "line": 115, "column": 6 }, "end": { - "line": 121, + "line": 115, "column": 10 }, "identifierName": "name" @@ -3776,29 +3457,29 @@ "operator": "&&", "right": { "type": "BinaryExpression", - "start": 2782, - "end": 2810, + "start": 2677, + "end": 2705, "loc": { "start": { - "line": 121, + "line": 115, "column": 14 }, "end": { - "line": 121, + "line": 115, "column": 42 } }, "left": { "type": "Identifier", - "start": 2782, - "end": 2786, + "start": 2677, + "end": 2681, "loc": { "start": { - "line": 121, + "line": 115, "column": 14 }, "end": { - "line": 121, + "line": 115, "column": 18 }, "identifierName": "name" @@ -3808,44 +3489,44 @@ "operator": "in", "right": { "type": "MemberExpression", - "start": 2790, - "end": 2810, + "start": 2685, + "end": 2705, "loc": { "start": { - "line": 121, + "line": 115, "column": 22 }, "end": { - "line": 121, + "line": 115, "column": 42 } }, "object": { "type": "ThisExpression", - "start": 2790, - "end": 2794, + "start": 2685, + "end": 2689, "loc": { "start": { - "line": 121, + "line": 115, "column": 22 }, "end": { - "line": 121, + "line": 115, "column": 26 } } }, "property": { "type": "Identifier", - "start": 2795, - "end": 2810, + "start": 2690, + "end": 2705, "loc": { "start": { - "line": 121, + "line": 115, "column": 27 }, "end": { - "line": 121, + "line": 115, "column": 42 }, "identifierName": "entityTemplates" @@ -3859,59 +3540,59 @@ }, "consequent": { "type": "BlockStatement", - "start": 2812, - "end": 3110, + "start": 2707, + "end": 3005, "loc": { "start": { - "line": 121, + "line": 115, "column": 44 }, "end": { - "line": 129, + "line": 123, "column": 3 } }, "body": [ { "type": "VariableDeclaration", - "start": 2857, - "end": 2898, + "start": 2752, + "end": 2793, "loc": { "start": { - "line": 123, + "line": 117, "column": 3 }, "end": { - "line": 123, + "line": 117, "column": 44 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 2861, - "end": 2898, + "start": 2756, + "end": 2793, "loc": { "start": { - "line": 123, + "line": 117, "column": 7 }, "end": { - "line": 123, + "line": 117, "column": 44 } }, "id": { "type": "Identifier", - "start": 2861, - "end": 2869, + "start": 2756, + "end": 2764, "loc": { "start": { - "line": 123, + "line": 117, "column": 7 }, "end": { - "line": 123, + "line": 117, "column": 15 }, "identifierName": "template" @@ -3921,58 +3602,58 @@ }, "init": { "type": "MemberExpression", - "start": 2872, - "end": 2898, + "start": 2767, + "end": 2793, "loc": { "start": { - "line": 123, + "line": 117, "column": 18 }, "end": { - "line": 123, + "line": 117, "column": 44 } }, "object": { "type": "MemberExpression", - "start": 2872, - "end": 2892, + "start": 2767, + "end": 2787, "loc": { "start": { - "line": 123, + "line": 117, "column": 18 }, "end": { - "line": 123, + "line": 117, "column": 38 } }, "object": { "type": "ThisExpression", - "start": 2872, - "end": 2876, + "start": 2767, + "end": 2771, "loc": { "start": { - "line": 123, + "line": 117, "column": 18 }, "end": { - "line": 123, + "line": 117, "column": 22 } } }, "property": { "type": "Identifier", - "start": 2877, - "end": 2892, + "start": 2772, + "end": 2787, "loc": { "start": { - "line": 123, + "line": 117, "column": 23 }, "end": { - "line": 123, + "line": 117, "column": 38 }, "identifierName": "entityTemplates" @@ -3983,15 +3664,15 @@ }, "property": { "type": "Identifier", - "start": 2893, - "end": 2897, + "start": 2788, + "end": 2792, "loc": { "start": { - "line": 123, + "line": 117, "column": 39 }, "end": { - "line": 123, + "line": 117, "column": 43 }, "identifierName": "name" @@ -4008,15 +3689,15 @@ { "type": "CommentLine", "value": " Add all components from prototype", - "start": 2817, - "end": 2853, + "start": 2712, + "end": 2748, "loc": { "start": { - "line": 122, + "line": 116, "column": 3 }, "end": { - "line": 122, + "line": 116, "column": 39 } } @@ -4025,58 +3706,58 @@ }, { "type": "ForInStatement", - "start": 2902, - "end": 3106, + "start": 2797, + "end": 3001, "loc": { "start": { - "line": 124, + "line": 118, "column": 3 }, "end": { - "line": 128, + "line": 122, "column": 4 } }, "left": { "type": "VariableDeclaration", - "start": 2907, - "end": 2924, + "start": 2802, + "end": 2819, "loc": { "start": { - "line": 124, + "line": 118, "column": 8 }, "end": { - "line": 124, + "line": 118, "column": 25 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 2911, - "end": 2924, + "start": 2806, + "end": 2819, "loc": { "start": { - "line": 124, + "line": 118, "column": 12 }, "end": { - "line": 124, + "line": 118, "column": 25 } }, "id": { "type": "Identifier", - "start": 2911, - "end": 2924, + "start": 2806, + "end": 2819, "loc": { "start": { - "line": 124, + "line": 118, "column": 12 }, "end": { - "line": 124, + "line": 118, "column": 25 }, "identifierName": "componentName" @@ -4090,15 +3771,15 @@ }, "right": { "type": "Identifier", - "start": 2928, - "end": 2936, + "start": 2823, + "end": 2831, "loc": { "start": { - "line": 124, + "line": 118, "column": 29 }, "end": { - "line": 124, + "line": 118, "column": 37 }, "identifierName": "template" @@ -4107,59 +3788,59 @@ }, "body": { "type": "BlockStatement", - "start": 2938, - "end": 3106, + "start": 2833, + "end": 3001, "loc": { "start": { - "line": 124, + "line": 118, "column": 39 }, "end": { - "line": 128, + "line": 122, "column": 4 } }, "body": [ { "type": "VariableDeclaration", - "start": 2992, - "end": 3050, + "start": 2887, + "end": 2945, "loc": { "start": { - "line": 126, + "line": 120, "column": 4 }, "end": { - "line": 126, + "line": 120, "column": 62 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 2996, - "end": 3050, + "start": 2891, + "end": 2945, "loc": { "start": { - "line": 126, + "line": 120, "column": 8 }, "end": { - "line": 126, + "line": 120, "column": 62 } }, "id": { "type": "Identifier", - "start": 2996, - "end": 3012, + "start": 2891, + "end": 2907, "loc": { "start": { - "line": 126, + "line": 120, "column": 8 }, "end": { - "line": 126, + "line": 120, "column": 24 }, "identifierName": "newComponentData" @@ -4169,43 +3850,43 @@ }, "init": { "type": "CallExpression", - "start": 3015, - "end": 3050, + "start": 2910, + "end": 2945, "loc": { "start": { - "line": 126, + "line": 120, "column": 27 }, "end": { - "line": 126, + "line": 120, "column": 62 } }, "callee": { "type": "MemberExpression", - "start": 3015, - "end": 3025, + "start": 2910, + "end": 2920, "loc": { "start": { - "line": 126, + "line": 120, "column": 27 }, "end": { - "line": 126, + "line": 120, "column": 37 } }, "object": { "type": "Identifier", - "start": 3015, - "end": 3019, + "start": 2910, + "end": 2914, "loc": { "start": { - "line": 126, + "line": 120, "column": 27 }, "end": { - "line": 126, + "line": 120, "column": 31 }, "identifierName": "JSON" @@ -4214,15 +3895,15 @@ }, "property": { "type": "Identifier", - "start": 3020, - "end": 3025, + "start": 2915, + "end": 2920, "loc": { "start": { - "line": 126, + "line": 120, "column": 32 }, "end": { - "line": 126, + "line": 120, "column": 37 }, "identifierName": "parse" @@ -4234,29 +3915,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 3026, - "end": 3049, + "start": 2921, + "end": 2944, "loc": { "start": { - "line": 126, + "line": 120, "column": 38 }, "end": { - "line": 126, + "line": 120, "column": 61 } }, "object": { "type": "Identifier", - "start": 3026, - "end": 3034, + "start": 2921, + "end": 2929, "loc": { "start": { - "line": 126, + "line": 120, "column": 38 }, "end": { - "line": 126, + "line": 120, "column": 46 }, "identifierName": "template" @@ -4265,15 +3946,15 @@ }, "property": { "type": "Identifier", - "start": 3035, - "end": 3048, + "start": 2930, + "end": 2943, "loc": { "start": { - "line": 126, + "line": 120, "column": 47 }, "end": { - "line": 126, + "line": 120, "column": 60 }, "identifierName": "componentName" @@ -4292,15 +3973,15 @@ { "type": "CommentLine", "value": " Update component with data from template", - "start": 2944, - "end": 2987, + "start": 2839, + "end": 2882, "loc": { "start": { - "line": 125, + "line": 119, "column": 4 }, "end": { - "line": 125, + "line": 119, "column": 47 } } @@ -4309,57 +3990,57 @@ }, { "type": "ExpressionStatement", - "start": 3055, - "end": 3101, + "start": 2950, + "end": 2996, "loc": { "start": { - "line": 127, + "line": 121, "column": 4 }, "end": { - "line": 127, + "line": 121, "column": 50 } }, "expression": { "type": "CallExpression", - "start": 3055, - "end": 3101, + "start": 2950, + "end": 2996, "loc": { "start": { - "line": 127, + "line": 121, "column": 4 }, "end": { - "line": 127, + "line": 121, "column": 50 } }, "callee": { "type": "MemberExpression", - "start": 3055, - "end": 3068, + "start": 2950, + "end": 2963, "loc": { "start": { - "line": 127, + "line": 121, "column": 4 }, "end": { - "line": 127, + "line": 121, "column": 17 } }, "object": { "type": "Identifier", - "start": 3055, - "end": 3061, + "start": 2950, + "end": 2956, "loc": { "start": { - "line": 127, + "line": 121, "column": 4 }, "end": { - "line": 127, + "line": 121, "column": 10 }, "identifierName": "entity" @@ -4368,15 +4049,15 @@ }, "property": { "type": "Identifier", - "start": 3062, - "end": 3068, + "start": 2957, + "end": 2963, "loc": { "start": { - "line": 127, + "line": 121, "column": 11 }, "end": { - "line": 127, + "line": 121, "column": 17 }, "identifierName": "update" @@ -4388,15 +4069,15 @@ "arguments": [ { "type": "Identifier", - "start": 3069, - "end": 3082, + "start": 2964, + "end": 2977, "loc": { "start": { - "line": 127, + "line": 121, "column": 18 }, "end": { - "line": 127, + "line": 121, "column": 31 }, "identifierName": "componentName" @@ -4405,15 +4086,15 @@ }, { "type": "Identifier", - "start": 3084, - "end": 3100, + "start": 2979, + "end": 2995, "loc": { "start": { - "line": 127, + "line": 121, "column": 33 }, "end": { - "line": 127, + "line": 121, "column": 49 }, "identifierName": "newComponentData" @@ -4435,15 +4116,15 @@ { "type": "CommentLine", "value": " Use 'name' to get prototype data (if specified)", - "start": 2717, - "end": 2767, + "start": 2612, + "end": 2662, "loc": { "start": { - "line": 120, + "line": 114, "column": 2 }, "end": { - "line": 120, + "line": 114, "column": 52 } } @@ -4452,87 +4133,86 @@ }, { "type": "ExpressionStatement", - "start": 3114, - "end": 3143, + "start": 3009, + "end": 3044, "loc": { "start": { - "line": 131, + "line": 125, "column": 2 }, "end": { - "line": 131, - "column": 31 + "line": 125, + "column": 37 } }, "expression": { - "type": "AssignmentExpression", - "start": 3114, - "end": 3143, + "type": "CallExpression", + "start": 3009, + "end": 3044, "loc": { "start": { - "line": 131, + "line": 125, "column": 2 }, "end": { - "line": 131, - "column": 31 + "line": 125, + "column": 37 } }, - "operator": "=", - "left": { + "callee": { "type": "MemberExpression", - "start": 3114, - "end": 3134, + "start": 3009, + "end": 3026, "loc": { "start": { - "line": 131, + "line": 125, "column": 2 }, "end": { - "line": 131, - "column": 22 + "line": 125, + "column": 19 } }, "object": { "type": "MemberExpression", - "start": 3114, - "end": 3127, + "start": 3009, + "end": 3022, "loc": { "start": { - "line": 131, + "line": 125, "column": 2 }, "end": { - "line": 131, + "line": 125, "column": 15 } }, "object": { "type": "ThisExpression", - "start": 3114, - "end": 3118, + "start": 3009, + "end": 3013, "loc": { "start": { - "line": 131, + "line": 125, "column": 2 }, "end": { - "line": 131, + "line": 125, "column": 6 } } }, "property": { "type": "Identifier", - "start": 3119, - "end": 3127, + "start": 3014, + "end": 3022, "loc": { "start": { - "line": 131, + "line": 125, "column": 7 }, "end": { - "line": 131, + "line": 125, "column": 15 }, "identifierName": "entities" @@ -4543,67 +4223,86 @@ }, "property": { "type": "Identifier", - "start": 3128, - "end": 3133, + "start": 3023, + "end": 3026, "loc": { "start": { - "line": 131, + "line": 125, "column": 16 }, "end": { - "line": 131, - "column": 21 + "line": 125, + "column": 19 }, - "identifierName": "entId" + "identifierName": "set" }, - "name": "entId" + "name": "set" }, - "computed": true + "computed": false }, - "right": { - "type": "Identifier", - "start": 3137, - "end": 3143, - "loc": { - "start": { - "line": 131, - "column": 25 - }, - "end": { - "line": 131, - "column": 31 + "arguments": [ + { + "type": "Identifier", + "start": 3027, + "end": 3035, + "loc": { + "start": { + "line": 125, + "column": 20 + }, + "end": { + "line": 125, + "column": 28 + }, + "identifierName": "entityId" }, - "identifierName": "entity" + "name": "entityId" }, - "name": "entity" - } + { + "type": "Identifier", + "start": 3037, + "end": 3043, + "loc": { + "start": { + "line": 125, + "column": 30 + }, + "end": { + "line": 125, + "column": 36 + }, + "identifierName": "entity" + }, + "name": "entity" + } + ] } }, { "type": "ReturnStatement", - "start": 3146, - "end": 3159, + "start": 3047, + "end": 3060, "loc": { "start": { - "line": 132, + "line": 126, "column": 2 }, "end": { - "line": 132, + "line": 126, "column": 15 } }, "argument": { "type": "Identifier", - "start": 3153, - "end": 3159, + "start": 3054, + "end": 3060, "loc": { "start": { - "line": 132, + "line": 126, "column": 9 }, "end": { - "line": 132, + "line": 126, "column": 15 }, "identifierName": "entity" @@ -4619,15 +4318,15 @@ { "type": "CommentBlock", "value": "*\n\t * Creates a new entity in the world\n\t *\n\t * @param {string} [name] - The prototype name to use\n\t *\n\t * @example\n\t * world.entity()\n\t *\n\t * @example\n\t * world.entity('Player')\n\t *\n\t * @return {Entity} The new entity created\n\t ", - "start": 2394, - "end": 2627, + "start": 2283, + "end": 2516, "loc": { "start": { - "line": 103, + "line": 97, "column": 1 }, "end": { - "line": 115, + "line": 109, "column": 4 } } @@ -4637,15 +4336,15 @@ { "type": "CommentBlock", "value": "*\n\t * Registers a system to the world.\n\t * The order the systems get registered, is the order then run in.\n\t *\n\t * @example\n\t * // Movement system\n\t * world.system(['position', 'velocity'], class {\n\t * every(position, velocity, entity) {\n\t * position.x += velocity.x\n\t * position.y += velocity.y\n\t * }\n\t * })\n\t *\n\t * @param {Array} components - The list of components the system will process in every(). This follows the same logic as entity.has() and world.every().\n\t * @param {Function} systemClass - The system class to instantiate. Can contain the following methods: constructor, initialize,\n\t * pre, every, post. Pre() and post() get called before and after every(), for each of the independent systems. See world.run()\n\t * for an example of the call order.\n\t * @param {...Object} [args] - The arguments to forward to the system's constructors\n\t *\n\t * @return {number} Unique ID of the system on success or undefined on failure\n\t ", - "start": 3165, - "end": 4144, + "start": 3066, + "end": 4045, "loc": { "start": { - "line": 135, + "line": 129, "column": 1 }, "end": { - "line": 155, + "line": 149, "column": 4 } } @@ -4654,15 +4353,15 @@ }, { "type": "ClassMethod", - "start": 4146, - "end": 4554, + "start": 4047, + "end": 4455, "loc": { "start": { - "line": 156, + "line": 150, "column": 1 }, "end": { - "line": 167, + "line": 161, "column": 2 } }, @@ -4670,15 +4369,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 4146, - "end": 4152, + "start": 4047, + "end": 4053, "loc": { "start": { - "line": 156, + "line": 150, "column": 1 }, "end": { - "line": 156, + "line": 150, "column": 7 }, "identifierName": "system" @@ -4694,15 +4393,15 @@ "params": [ { "type": "Identifier", - "start": 4153, - "end": 4163, + "start": 4054, + "end": 4064, "loc": { "start": { - "line": 156, + "line": 150, "column": 8 }, "end": { - "line": 156, + "line": 150, "column": 18 }, "identifierName": "components" @@ -4711,15 +4410,15 @@ }, { "type": "Identifier", - "start": 4165, - "end": 4176, + "start": 4066, + "end": 4077, "loc": { "start": { - "line": 156, + "line": 150, "column": 20 }, "end": { - "line": 156, + "line": 150, "column": 31 }, "identifierName": "systemClass" @@ -4728,29 +4427,29 @@ }, { "type": "RestElement", - "start": 4178, - "end": 4185, + "start": 4079, + "end": 4086, "loc": { "start": { - "line": 156, + "line": 150, "column": 33 }, "end": { - "line": 156, + "line": 150, "column": 40 } }, "argument": { "type": "Identifier", - "start": 4181, - "end": 4185, + "start": 4082, + "end": 4086, "loc": { "start": { - "line": 156, + "line": 150, "column": 36 }, "end": { - "line": 156, + "line": 150, "column": 40 }, "identifierName": "args" @@ -4761,58 +4460,58 @@ ], "body": { "type": "BlockStatement", - "start": 4187, - "end": 4554, + "start": 4088, + "end": 4455, "loc": { "start": { - "line": 156, + "line": 150, "column": 42 }, "end": { - "line": 167, + "line": 161, "column": 2 } }, "body": [ { "type": "IfStatement", - "start": 4278, - "end": 4532, + "start": 4179, + "end": 4433, "loc": { "start": { - "line": 158, + "line": 152, "column": 2 }, "end": { - "line": 165, + "line": 159, "column": 3 } }, "test": { "type": "CallExpression", - "start": 4282, - "end": 4305, + "start": 4183, + "end": 4206, "loc": { "start": { - "line": 158, + "line": 152, "column": 6 }, "end": { - "line": 158, + "line": 152, "column": 29 } }, "callee": { "type": "Identifier", - "start": 4282, - "end": 4292, + "start": 4183, + "end": 4193, "loc": { "start": { - "line": 158, + "line": 152, "column": 6 }, "end": { - "line": 158, + "line": 152, "column": 16 }, "identifierName": "isFunction" @@ -4823,15 +4522,15 @@ "arguments": [ { "type": "Identifier", - "start": 4293, - "end": 4304, + "start": 4194, + "end": 4205, "loc": { "start": { - "line": 158, + "line": 152, "column": 17 }, "end": { - "line": 158, + "line": 152, "column": 28 }, "identifierName": "systemClass" @@ -4843,59 +4542,59 @@ }, "consequent": { "type": "BlockStatement", - "start": 4307, - "end": 4532, + "start": 4208, + "end": 4433, "loc": { "start": { - "line": 158, + "line": 152, "column": 31 }, "end": { - "line": 165, + "line": 159, "column": 3 } }, "body": [ { "type": "VariableDeclaration", - "start": 4371, - "end": 4411, + "start": 4272, + "end": 4312, "loc": { "start": { - "line": 160, + "line": 154, "column": 3 }, "end": { - "line": 160, + "line": 154, "column": 43 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 4375, - "end": 4411, + "start": 4276, + "end": 4312, "loc": { "start": { - "line": 160, + "line": 154, "column": 7 }, "end": { - "line": 160, + "line": 154, "column": 43 } }, "id": { "type": "Identifier", - "start": 4375, - "end": 4384, + "start": 4276, + "end": 4285, "loc": { "start": { - "line": 160, + "line": 154, "column": 7 }, "end": { - "line": 160, + "line": 154, "column": 16 }, "identifierName": "newSystem" @@ -4905,29 +4604,29 @@ }, "init": { "type": "NewExpression", - "start": 4387, - "end": 4411, + "start": 4288, + "end": 4312, "loc": { "start": { - "line": 160, + "line": 154, "column": 19 }, "end": { - "line": 160, + "line": 154, "column": 43 } }, "callee": { "type": "Identifier", - "start": 4391, - "end": 4402, + "start": 4292, + "end": 4303, "loc": { "start": { - "line": 160, + "line": 154, "column": 23 }, "end": { - "line": 160, + "line": 154, "column": 34 }, "identifierName": "systemClass" @@ -4937,29 +4636,29 @@ "arguments": [ { "type": "SpreadElement", - "start": 4403, - "end": 4410, + "start": 4304, + "end": 4311, "loc": { "start": { - "line": 160, + "line": 154, "column": 35 }, "end": { - "line": 160, + "line": 154, "column": 42 } }, "argument": { "type": "Identifier", - "start": 4406, - "end": 4410, + "start": 4307, + "end": 4311, "loc": { "start": { - "line": 160, + "line": 154, "column": 38 }, "end": { - "line": 160, + "line": 154, "column": 42 }, "identifierName": "args" @@ -4977,15 +4676,15 @@ { "type": "CommentLine", "value": " Create the system, and set the component array query", - "start": 4312, - "end": 4367, + "start": 4213, + "end": 4268, "loc": { "start": { - "line": 159, + "line": 153, "column": 3 }, "end": { - "line": 159, + "line": 153, "column": 58 } } @@ -4994,58 +4693,58 @@ }, { "type": "ExpressionStatement", - "start": 4415, - "end": 4448, + "start": 4316, + "end": 4349, "loc": { "start": { - "line": 161, + "line": 155, "column": 3 }, "end": { - "line": 161, + "line": 155, "column": 36 } }, "expression": { "type": "AssignmentExpression", - "start": 4415, - "end": 4448, + "start": 4316, + "end": 4349, "loc": { "start": { - "line": 161, + "line": 155, "column": 3 }, "end": { - "line": 161, + "line": 155, "column": 36 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 4415, - "end": 4435, + "start": 4316, + "end": 4336, "loc": { "start": { - "line": 161, + "line": 155, "column": 3 }, "end": { - "line": 161, + "line": 155, "column": 23 } }, "object": { "type": "Identifier", - "start": 4415, - "end": 4424, + "start": 4316, + "end": 4325, "loc": { "start": { - "line": 161, + "line": 155, "column": 3 }, "end": { - "line": 161, + "line": 155, "column": 12 }, "identifierName": "newSystem" @@ -5054,15 +4753,15 @@ }, "property": { "type": "Identifier", - "start": 4425, - "end": 4435, + "start": 4326, + "end": 4336, "loc": { "start": { - "line": 161, + "line": 155, "column": 13 }, "end": { - "line": 161, + "line": 155, "column": 23 }, "identifierName": "components" @@ -5073,15 +4772,15 @@ }, "right": { "type": "Identifier", - "start": 4438, - "end": 4448, + "start": 4339, + "end": 4349, "loc": { "start": { - "line": 161, + "line": 155, "column": 26 }, "end": { - "line": 161, + "line": 155, "column": 36 }, "identifierName": "components" @@ -5096,15 +4795,15 @@ { "type": "CommentLine", "value": " Add the system, return its ID", - "start": 4453, - "end": 4485, + "start": 4354, + "end": 4386, "loc": { "start": { - "line": 163, + "line": 157, "column": 3 }, "end": { - "line": 163, + "line": 157, "column": 35 } } @@ -5113,85 +4812,85 @@ }, { "type": "ReturnStatement", - "start": 4489, - "end": 4528, + "start": 4390, + "end": 4429, "loc": { "start": { - "line": 164, + "line": 158, "column": 3 }, "end": { - "line": 164, + "line": 158, "column": 42 } }, "argument": { "type": "BinaryExpression", - "start": 4496, - "end": 4528, + "start": 4397, + "end": 4429, "loc": { "start": { - "line": 164, + "line": 158, "column": 10 }, "end": { - "line": 164, + "line": 158, "column": 42 } }, "left": { "type": "CallExpression", - "start": 4496, - "end": 4524, + "start": 4397, + "end": 4425, "loc": { "start": { - "line": 164, + "line": 158, "column": 10 }, "end": { - "line": 164, + "line": 158, "column": 38 } }, "callee": { "type": "MemberExpression", - "start": 4496, - "end": 4513, + "start": 4397, + "end": 4414, "loc": { "start": { - "line": 164, + "line": 158, "column": 10 }, "end": { - "line": 164, + "line": 158, "column": 27 } }, "object": { "type": "MemberExpression", - "start": 4496, - "end": 4508, + "start": 4397, + "end": 4409, "loc": { "start": { - "line": 164, + "line": 158, "column": 10 }, "end": { - "line": 164, + "line": 158, "column": 22 } }, "object": { "type": "ThisExpression", - "start": 4496, - "end": 4500, + "start": 4397, + "end": 4401, "loc": { "start": { - "line": 164, + "line": 158, "column": 10 }, "end": { - "line": 164, + "line": 158, "column": 14 } }, @@ -5199,15 +4898,15 @@ }, "property": { "type": "Identifier", - "start": 4501, - "end": 4508, + "start": 4402, + "end": 4409, "loc": { "start": { - "line": 164, + "line": 158, "column": 15 }, "end": { - "line": 164, + "line": 158, "column": 22 }, "identifierName": "systems" @@ -5219,15 +4918,15 @@ }, "property": { "type": "Identifier", - "start": 4509, - "end": 4513, + "start": 4410, + "end": 4414, "loc": { "start": { - "line": 164, + "line": 158, "column": 23 }, "end": { - "line": 164, + "line": 158, "column": 27 }, "identifierName": "push" @@ -5240,15 +4939,15 @@ "arguments": [ { "type": "Identifier", - "start": 4514, - "end": 4523, + "start": 4415, + "end": 4424, "loc": { "start": { - "line": 164, + "line": 158, "column": 28 }, "end": { - "line": 164, + "line": 158, "column": 37 }, "identifierName": "newSystem" @@ -5261,15 +4960,15 @@ "operator": "-", "right": { "type": "NumericLiteral", - "start": 4527, - "end": 4528, + "start": 4428, + "end": 4429, "loc": { "start": { - "line": 164, + "line": 158, "column": 41 }, "end": { - "line": 164, + "line": 158, "column": 42 } }, @@ -5285,15 +4984,15 @@ { "type": "CommentLine", "value": " Add the system, return its ID", - "start": 4453, - "end": 4485, + "start": 4354, + "end": 4386, "loc": { "start": { - "line": 163, + "line": 157, "column": 3 }, "end": { - "line": 163, + "line": 157, "column": 35 } } @@ -5308,15 +5007,15 @@ { "type": "CommentLine", "value": " TODO: Make components optional, and parameters more dynamic by only using ...args", - "start": 4191, - "end": 4275, + "start": 4092, + "end": 4176, "loc": { "start": { - "line": 157, + "line": 151, "column": 2 }, "end": { - "line": 157, + "line": 151, "column": 86 } } @@ -5325,29 +5024,29 @@ }, { "type": "ReturnStatement", - "start": 4535, - "end": 4551, + "start": 4436, + "end": 4452, "loc": { "start": { - "line": 166, + "line": 160, "column": 2 }, "end": { - "line": 166, + "line": 160, "column": 18 } }, "argument": { "type": "Identifier", - "start": 4542, - "end": 4551, + "start": 4443, + "end": 4452, "loc": { "start": { - "line": 166, + "line": 160, "column": 9 }, "end": { - "line": 166, + "line": 160, "column": 18 }, "identifierName": "undefined" @@ -5363,15 +5062,15 @@ { "type": "CommentBlock", "value": "*\n\t * Registers a system to the world.\n\t * The order the systems get registered, is the order then run in.\n\t *\n\t * @example\n\t * // Movement system\n\t * world.system(['position', 'velocity'], class {\n\t * every(position, velocity, entity) {\n\t * position.x += velocity.x\n\t * position.y += velocity.y\n\t * }\n\t * })\n\t *\n\t * @param {Array} components - The list of components the system will process in every(). This follows the same logic as entity.has() and world.every().\n\t * @param {Function} systemClass - The system class to instantiate. Can contain the following methods: constructor, initialize,\n\t * pre, every, post. Pre() and post() get called before and after every(), for each of the independent systems. See world.run()\n\t * for an example of the call order.\n\t * @param {...Object} [args] - The arguments to forward to the system's constructors\n\t *\n\t * @return {number} Unique ID of the system on success or undefined on failure\n\t ", - "start": 3165, - "end": 4144, + "start": 3066, + "end": 4045, "loc": { "start": { - "line": 135, + "line": 129, "column": 1 }, "end": { - "line": 155, + "line": 149, "column": 4 } } @@ -5381,15 +5080,15 @@ { "type": "CommentBlock", "value": "*\n\t * Calls initialize() on all systems\n\t *\n\t * @example\n\t * world.initialize(renderContext)\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' initialize() methods\n\t ", - "start": 4557, - "end": 4754, + "start": 4458, + "end": 4655, "loc": { "start": { - "line": 169, + "line": 163, "column": 1 }, "end": { - "line": 176, + "line": 170, "column": 4 } } @@ -5398,15 +5097,15 @@ }, { "type": "ClassMethod", - "start": 4756, - "end": 4862, + "start": 4657, + "end": 4763, "loc": { "start": { - "line": 177, + "line": 171, "column": 1 }, "end": { - "line": 181, + "line": 175, "column": 2 } }, @@ -5414,15 +5113,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 4756, - "end": 4766, + "start": 4657, + "end": 4667, "loc": { "start": { - "line": 177, + "line": 171, "column": 1 }, "end": { - "line": 177, + "line": 171, "column": 11 }, "identifierName": "initialize" @@ -5438,29 +5137,29 @@ "params": [ { "type": "RestElement", - "start": 4767, - "end": 4774, + "start": 4668, + "end": 4675, "loc": { "start": { - "line": 177, + "line": 171, "column": 12 }, "end": { - "line": 177, + "line": 171, "column": 19 } }, "argument": { "type": "Identifier", - "start": 4770, - "end": 4774, + "start": 4671, + "end": 4675, "loc": { "start": { - "line": 177, + "line": 171, "column": 15 }, "end": { - "line": 177, + "line": 171, "column": 19 }, "identifierName": "args" @@ -5471,73 +5170,73 @@ ], "body": { "type": "BlockStatement", - "start": 4776, - "end": 4862, + "start": 4677, + "end": 4763, "loc": { "start": { - "line": 177, + "line": 171, "column": 21 }, "end": { - "line": 181, + "line": 175, "column": 2 } }, "body": [ { "type": "ForOfStatement", - "start": 4780, - "end": 4859, + "start": 4681, + "end": 4760, "loc": { "start": { - "line": 178, + "line": 172, "column": 2 }, "end": { - "line": 180, + "line": 174, "column": 3 } }, "left": { "type": "VariableDeclaration", - "start": 4785, - "end": 4795, + "start": 4686, + "end": 4696, "loc": { "start": { - "line": 178, + "line": 172, "column": 7 }, "end": { - "line": 178, + "line": 172, "column": 17 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 4789, - "end": 4795, + "start": 4690, + "end": 4696, "loc": { "start": { - "line": 178, + "line": 172, "column": 11 }, "end": { - "line": 178, + "line": 172, "column": 17 } }, "id": { "type": "Identifier", - "start": 4789, - "end": 4795, + "start": 4690, + "end": 4696, "loc": { "start": { - "line": 178, + "line": 172, "column": 11 }, "end": { - "line": 178, + "line": 172, "column": 17 }, "identifierName": "system" @@ -5551,44 +5250,44 @@ }, "right": { "type": "MemberExpression", - "start": 4799, - "end": 4811, + "start": 4700, + "end": 4712, "loc": { "start": { - "line": 178, + "line": 172, "column": 21 }, "end": { - "line": 178, + "line": 172, "column": 33 } }, "object": { "type": "ThisExpression", - "start": 4799, - "end": 4803, + "start": 4700, + "end": 4704, "loc": { "start": { - "line": 178, + "line": 172, "column": 21 }, "end": { - "line": 178, + "line": 172, "column": 25 } } }, "property": { "type": "Identifier", - "start": 4804, - "end": 4811, + "start": 4705, + "end": 4712, "loc": { "start": { - "line": 178, + "line": 172, "column": 26 }, "end": { - "line": 178, + "line": 172, "column": 33 }, "identifierName": "systems" @@ -5599,58 +5298,58 @@ }, "body": { "type": "BlockStatement", - "start": 4813, - "end": 4859, + "start": 4714, + "end": 4760, "loc": { "start": { - "line": 178, + "line": 172, "column": 35 }, "end": { - "line": 180, + "line": 174, "column": 3 } }, "body": [ { "type": "ExpressionStatement", - "start": 4818, - "end": 4855, + "start": 4719, + "end": 4756, "loc": { "start": { - "line": 179, + "line": 173, "column": 3 }, "end": { - "line": 179, + "line": 173, "column": 40 } }, "expression": { "type": "CallExpression", - "start": 4818, - "end": 4855, + "start": 4719, + "end": 4756, "loc": { "start": { - "line": 179, + "line": 173, "column": 3 }, "end": { - "line": 179, + "line": 173, "column": 40 } }, "callee": { "type": "Identifier", - "start": 4818, - "end": 4824, + "start": 4719, + "end": 4725, "loc": { "start": { - "line": 179, + "line": 173, "column": 3 }, "end": { - "line": 179, + "line": 173, "column": 9 }, "identifierName": "invoke" @@ -5660,15 +5359,15 @@ "arguments": [ { "type": "Identifier", - "start": 4825, - "end": 4831, + "start": 4726, + "end": 4732, "loc": { "start": { - "line": 179, + "line": 173, "column": 10 }, "end": { - "line": 179, + "line": 173, "column": 16 }, "identifierName": "system" @@ -5677,15 +5376,15 @@ }, { "type": "StringLiteral", - "start": 4833, - "end": 4845, + "start": 4734, + "end": 4746, "loc": { "start": { - "line": 179, + "line": 173, "column": 18 }, "end": { - "line": 179, + "line": 173, "column": 30 } }, @@ -5697,29 +5396,29 @@ }, { "type": "SpreadElement", - "start": 4847, - "end": 4854, + "start": 4748, + "end": 4755, "loc": { "start": { - "line": 179, + "line": 173, "column": 32 }, "end": { - "line": 179, + "line": 173, "column": 39 } }, "argument": { "type": "Identifier", - "start": 4850, - "end": 4854, + "start": 4751, + "end": 4755, "loc": { "start": { - "line": 179, + "line": 173, "column": 35 }, "end": { - "line": 179, + "line": 173, "column": 39 }, "identifierName": "args" @@ -5742,15 +5441,15 @@ { "type": "CommentBlock", "value": "*\n\t * Calls initialize() on all systems\n\t *\n\t * @example\n\t * world.initialize(renderContext)\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' initialize() methods\n\t ", - "start": 4557, - "end": 4754, + "start": 4458, + "end": 4655, "loc": { "start": { - "line": 169, + "line": 163, "column": 1 }, "end": { - "line": 176, + "line": 170, "column": 4 } } @@ -5760,15 +5459,15 @@ { "type": "CommentBlock", "value": "*\n\t * Calls pre(), every(), and post() on all systems\n\t *\n\t * @example\n\t * world.run(deltaTime)\n\t *\n\t * @example\n\t * // Example flow of method call order:\n\t * // Setup systems:\n\t * world.system([], systemA)\n\t * world.system([], systemB)\n\t * // During world.run():\n\t * // systemA.pre()\n\t * // systemA.every() * number of entities\n\t * // systemA.post()\n\t * // systemB.pre()\n\t * // systemB.every() * number of entities\n\t * // systemB.post()\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' methods\n\t ", - "start": 4865, - "end": 5394, + "start": 4766, + "end": 5295, "loc": { "start": { - "line": 183, + "line": 177, "column": 1 }, "end": { - "line": 203, + "line": 197, "column": 4 } } @@ -5777,15 +5476,15 @@ }, { "type": "ClassMethod", - "start": 5396, - "end": 5678, + "start": 5297, + "end": 5579, "loc": { "start": { - "line": 204, + "line": 198, "column": 1 }, "end": { - "line": 215, + "line": 209, "column": 2 } }, @@ -5793,15 +5492,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 5396, - "end": 5399, + "start": 5297, + "end": 5300, "loc": { "start": { - "line": 204, + "line": 198, "column": 1 }, "end": { - "line": 204, + "line": 198, "column": 4 }, "identifierName": "run" @@ -5817,29 +5516,29 @@ "params": [ { "type": "RestElement", - "start": 5400, - "end": 5407, + "start": 5301, + "end": 5308, "loc": { "start": { - "line": 204, + "line": 198, "column": 5 }, "end": { - "line": 204, + "line": 198, "column": 12 } }, "argument": { "type": "Identifier", - "start": 5403, - "end": 5407, + "start": 5304, + "end": 5308, "loc": { "start": { - "line": 204, + "line": 198, "column": 8 }, "end": { - "line": 204, + "line": 198, "column": 12 }, "identifierName": "args" @@ -5850,73 +5549,73 @@ ], "body": { "type": "BlockStatement", - "start": 5409, - "end": 5678, + "start": 5310, + "end": 5579, "loc": { "start": { - "line": 204, + "line": 198, "column": 14 }, "end": { - "line": 215, + "line": 209, "column": 2 } }, "body": [ { "type": "ForOfStatement", - "start": 5413, - "end": 5675, + "start": 5314, + "end": 5576, "loc": { "start": { - "line": 205, + "line": 199, "column": 2 }, "end": { - "line": 214, + "line": 208, "column": 3 } }, "left": { "type": "VariableDeclaration", - "start": 5418, - "end": 5428, + "start": 5319, + "end": 5329, "loc": { "start": { - "line": 205, + "line": 199, "column": 7 }, "end": { - "line": 205, + "line": 199, "column": 17 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 5422, - "end": 5428, + "start": 5323, + "end": 5329, "loc": { "start": { - "line": 205, + "line": 199, "column": 11 }, "end": { - "line": 205, + "line": 199, "column": 17 } }, "id": { "type": "Identifier", - "start": 5422, - "end": 5428, + "start": 5323, + "end": 5329, "loc": { "start": { - "line": 205, + "line": 199, "column": 11 }, "end": { - "line": 205, + "line": 199, "column": 17 }, "identifierName": "system" @@ -5930,44 +5629,44 @@ }, "right": { "type": "MemberExpression", - "start": 5432, - "end": 5444, + "start": 5333, + "end": 5345, "loc": { "start": { - "line": 205, + "line": 199, "column": 21 }, "end": { - "line": 205, + "line": 199, "column": 33 } }, "object": { "type": "ThisExpression", - "start": 5432, - "end": 5436, + "start": 5333, + "end": 5337, "loc": { "start": { - "line": 205, + "line": 199, "column": 21 }, "end": { - "line": 205, + "line": 199, "column": 25 } } }, "property": { "type": "Identifier", - "start": 5437, - "end": 5444, + "start": 5338, + "end": 5345, "loc": { "start": { - "line": 205, + "line": 199, "column": 26 }, "end": { - "line": 205, + "line": 199, "column": 33 }, "identifierName": "systems" @@ -5978,58 +5677,58 @@ }, "body": { "type": "BlockStatement", - "start": 5446, - "end": 5675, + "start": 5347, + "end": 5576, "loc": { "start": { - "line": 205, + "line": 199, "column": 35 }, "end": { - "line": 214, + "line": 208, "column": 3 } }, "body": [ { "type": "ExpressionStatement", - "start": 5451, - "end": 5481, + "start": 5352, + "end": 5382, "loc": { "start": { - "line": 206, + "line": 200, "column": 3 }, "end": { - "line": 206, + "line": 200, "column": 33 } }, "expression": { "type": "CallExpression", - "start": 5451, - "end": 5481, + "start": 5352, + "end": 5382, "loc": { "start": { - "line": 206, + "line": 200, "column": 3 }, "end": { - "line": 206, + "line": 200, "column": 33 } }, "callee": { "type": "Identifier", - "start": 5451, - "end": 5457, + "start": 5352, + "end": 5358, "loc": { "start": { - "line": 206, + "line": 200, "column": 3 }, "end": { - "line": 206, + "line": 200, "column": 9 }, "identifierName": "invoke" @@ -6039,15 +5738,15 @@ "arguments": [ { "type": "Identifier", - "start": 5458, - "end": 5464, + "start": 5359, + "end": 5365, "loc": { "start": { - "line": 206, + "line": 200, "column": 10 }, "end": { - "line": 206, + "line": 200, "column": 16 }, "identifierName": "system" @@ -6056,15 +5755,15 @@ }, { "type": "StringLiteral", - "start": 5466, - "end": 5471, + "start": 5367, + "end": 5372, "loc": { "start": { - "line": 206, + "line": 200, "column": 18 }, "end": { - "line": 206, + "line": 200, "column": 23 } }, @@ -6076,29 +5775,29 @@ }, { "type": "SpreadElement", - "start": 5473, - "end": 5480, + "start": 5374, + "end": 5381, "loc": { "start": { - "line": 206, + "line": 200, "column": 25 }, "end": { - "line": 206, + "line": 200, "column": 32 } }, "argument": { "type": "Identifier", - "start": 5476, - "end": 5480, + "start": 5377, + "end": 5381, "loc": { "start": { - "line": 206, + "line": 200, "column": 28 }, "end": { - "line": 206, + "line": 200, "column": 32 }, "identifierName": "args" @@ -6113,15 +5812,15 @@ { "type": "CommentLine", "value": " Run the \"every\" method in the system", - "start": 5486, - "end": 5525, + "start": 5387, + "end": 5426, "loc": { "start": { - "line": 208, + "line": 202, "column": 3 }, "end": { - "line": 208, + "line": 202, "column": 42 } } @@ -6130,43 +5829,43 @@ }, { "type": "IfStatement", - "start": 5529, - "end": 5635, + "start": 5430, + "end": 5536, "loc": { "start": { - "line": 209, + "line": 203, "column": 3 }, "end": { - "line": 211, + "line": 205, "column": 4 } }, "test": { "type": "CallExpression", - "start": 5533, - "end": 5557, + "start": 5434, + "end": 5458, "loc": { "start": { - "line": 209, + "line": 203, "column": 7 }, "end": { - "line": 209, + "line": 203, "column": 31 } }, "callee": { "type": "Identifier", - "start": 5533, - "end": 5543, + "start": 5434, + "end": 5444, "loc": { "start": { - "line": 209, + "line": 203, "column": 7 }, "end": { - "line": 209, + "line": 203, "column": 17 }, "identifierName": "isFunction" @@ -6177,29 +5876,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 5544, - "end": 5556, + "start": 5445, + "end": 5457, "loc": { "start": { - "line": 209, + "line": 203, "column": 18 }, "end": { - "line": 209, + "line": 203, "column": 30 } }, "object": { "type": "Identifier", - "start": 5544, - "end": 5550, + "start": 5445, + "end": 5451, "loc": { "start": { - "line": 209, + "line": 203, "column": 18 }, "end": { - "line": 209, + "line": 203, "column": 24 }, "identifierName": "system" @@ -6208,15 +5907,15 @@ }, "property": { "type": "Identifier", - "start": 5551, - "end": 5556, + "start": 5452, + "end": 5457, "loc": { "start": { - "line": 209, + "line": 203, "column": 25 }, "end": { - "line": 209, + "line": 203, "column": 30 }, "identifierName": "every" @@ -6230,87 +5929,87 @@ }, "consequent": { "type": "BlockStatement", - "start": 5559, - "end": 5635, + "start": 5460, + "end": 5536, "loc": { "start": { - "line": 209, + "line": 203, "column": 33 }, "end": { - "line": 211, + "line": 205, "column": 4 } }, "body": [ { "type": "ExpressionStatement", - "start": 5565, - "end": 5630, + "start": 5466, + "end": 5531, "loc": { "start": { - "line": 210, + "line": 204, "column": 4 }, "end": { - "line": 210, + "line": 204, "column": 69 } }, "expression": { "type": "CallExpression", - "start": 5565, - "end": 5630, + "start": 5466, + "end": 5531, "loc": { "start": { - "line": 210, + "line": 204, "column": 4 }, "end": { - "line": 210, + "line": 204, "column": 69 } }, "callee": { "type": "MemberExpression", - "start": 5565, - "end": 5575, + "start": 5466, + "end": 5476, "loc": { "start": { - "line": 210, + "line": 204, "column": 4 }, "end": { - "line": 210, + "line": 204, "column": 14 } }, "object": { "type": "ThisExpression", - "start": 5565, - "end": 5569, + "start": 5466, + "end": 5470, "loc": { "start": { - "line": 210, + "line": 204, "column": 4 }, "end": { - "line": 210, + "line": 204, "column": 8 } } }, "property": { "type": "Identifier", - "start": 5570, - "end": 5575, + "start": 5471, + "end": 5476, "loc": { "start": { - "line": 210, + "line": 204, "column": 9 }, "end": { - "line": 210, + "line": 204, "column": 14 }, "identifierName": "every" @@ -6322,29 +6021,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 5576, - "end": 5593, + "start": 5477, + "end": 5494, "loc": { "start": { - "line": 210, + "line": 204, "column": 15 }, "end": { - "line": 210, + "line": 204, "column": 32 } }, "object": { "type": "Identifier", - "start": 5576, - "end": 5582, + "start": 5477, + "end": 5483, "loc": { "start": { - "line": 210, + "line": 204, "column": 15 }, "end": { - "line": 210, + "line": 204, "column": 21 }, "identifierName": "system" @@ -6353,15 +6052,15 @@ }, "property": { "type": "Identifier", - "start": 5583, - "end": 5593, + "start": 5484, + "end": 5494, "loc": { "start": { - "line": 210, + "line": 204, "column": 22 }, "end": { - "line": 210, + "line": 204, "column": 32 }, "identifierName": "components" @@ -6372,57 +6071,57 @@ }, { "type": "CallExpression", - "start": 5595, - "end": 5620, + "start": 5496, + "end": 5521, "loc": { "start": { - "line": 210, + "line": 204, "column": 34 }, "end": { - "line": 210, + "line": 204, "column": 59 } }, "callee": { "type": "MemberExpression", - "start": 5595, - "end": 5612, + "start": 5496, + "end": 5513, "loc": { "start": { - "line": 210, + "line": 204, "column": 34 }, "end": { - "line": 210, + "line": 204, "column": 51 } }, "object": { "type": "MemberExpression", - "start": 5595, - "end": 5607, + "start": 5496, + "end": 5508, "loc": { "start": { - "line": 210, + "line": 204, "column": 34 }, "end": { - "line": 210, + "line": 204, "column": 46 } }, "object": { "type": "Identifier", - "start": 5595, - "end": 5601, + "start": 5496, + "end": 5502, "loc": { "start": { - "line": 210, + "line": 204, "column": 34 }, "end": { - "line": 210, + "line": 204, "column": 40 }, "identifierName": "system" @@ -6431,15 +6130,15 @@ }, "property": { "type": "Identifier", - "start": 5602, - "end": 5607, + "start": 5503, + "end": 5508, "loc": { "start": { - "line": 210, + "line": 204, "column": 41 }, "end": { - "line": 210, + "line": 204, "column": 46 }, "identifierName": "every" @@ -6450,15 +6149,15 @@ }, "property": { "type": "Identifier", - "start": 5608, - "end": 5612, + "start": 5509, + "end": 5513, "loc": { "start": { - "line": 210, + "line": 204, "column": 47 }, "end": { - "line": 210, + "line": 204, "column": 51 }, "identifierName": "bind" @@ -6470,15 +6169,15 @@ "arguments": [ { "type": "Identifier", - "start": 5613, - "end": 5619, + "start": 5514, + "end": 5520, "loc": { "start": { - "line": 210, + "line": 204, "column": 52 }, "end": { - "line": 210, + "line": 204, "column": 58 }, "identifierName": "system" @@ -6489,29 +6188,29 @@ }, { "type": "SpreadElement", - "start": 5622, - "end": 5629, + "start": 5523, + "end": 5530, "loc": { "start": { - "line": 210, + "line": 204, "column": 61 }, "end": { - "line": 210, + "line": 204, "column": 68 } }, "argument": { "type": "Identifier", - "start": 5625, - "end": 5629, + "start": 5526, + "end": 5530, "loc": { "start": { - "line": 210, + "line": 204, "column": 64 }, "end": { - "line": 210, + "line": 204, "column": 68 }, "identifierName": "args" @@ -6530,15 +6229,15 @@ { "type": "CommentLine", "value": " Run the \"every\" method in the system", - "start": 5486, - "end": 5525, + "start": 5387, + "end": 5426, "loc": { "start": { - "line": 208, + "line": 202, "column": 3 }, "end": { - "line": 208, + "line": 202, "column": 42 } } @@ -6547,43 +6246,43 @@ }, { "type": "ExpressionStatement", - "start": 5640, - "end": 5671, + "start": 5541, + "end": 5572, "loc": { "start": { - "line": 213, + "line": 207, "column": 3 }, "end": { - "line": 213, + "line": 207, "column": 34 } }, "expression": { "type": "CallExpression", - "start": 5640, - "end": 5671, + "start": 5541, + "end": 5572, "loc": { "start": { - "line": 213, + "line": 207, "column": 3 }, "end": { - "line": 213, + "line": 207, "column": 34 } }, "callee": { "type": "Identifier", - "start": 5640, - "end": 5646, + "start": 5541, + "end": 5547, "loc": { "start": { - "line": 213, + "line": 207, "column": 3 }, "end": { - "line": 213, + "line": 207, "column": 9 }, "identifierName": "invoke" @@ -6593,15 +6292,15 @@ "arguments": [ { "type": "Identifier", - "start": 5647, - "end": 5653, + "start": 5548, + "end": 5554, "loc": { "start": { - "line": 213, + "line": 207, "column": 10 }, "end": { - "line": 213, + "line": 207, "column": 16 }, "identifierName": "system" @@ -6610,15 +6309,15 @@ }, { "type": "StringLiteral", - "start": 5655, - "end": 5661, + "start": 5556, + "end": 5562, "loc": { "start": { - "line": 213, + "line": 207, "column": 18 }, "end": { - "line": 213, + "line": 207, "column": 24 } }, @@ -6630,29 +6329,29 @@ }, { "type": "SpreadElement", - "start": 5663, - "end": 5670, + "start": 5564, + "end": 5571, "loc": { "start": { - "line": 213, + "line": 207, "column": 26 }, "end": { - "line": 213, + "line": 207, "column": 33 } }, "argument": { "type": "Identifier", - "start": 5666, - "end": 5670, + "start": 5567, + "end": 5571, "loc": { "start": { - "line": 213, + "line": 207, "column": 29 }, "end": { - "line": 213, + "line": 207, "column": 33 }, "identifierName": "args" @@ -6675,15 +6374,15 @@ { "type": "CommentBlock", "value": "*\n\t * Calls pre(), every(), and post() on all systems\n\t *\n\t * @example\n\t * world.run(deltaTime)\n\t *\n\t * @example\n\t * // Example flow of method call order:\n\t * // Setup systems:\n\t * world.system([], systemA)\n\t * world.system([], systemB)\n\t * // During world.run():\n\t * // systemA.pre()\n\t * // systemA.every() * number of entities\n\t * // systemA.post()\n\t * // systemB.pre()\n\t * // systemB.every() * number of entities\n\t * // systemB.post()\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' methods\n\t ", - "start": 4865, - "end": 5394, + "start": 4766, + "end": 5295, "loc": { "start": { - "line": 183, + "line": 177, "column": 1 }, "end": { - "line": 203, + "line": 197, "column": 4 } } @@ -6693,15 +6392,15 @@ { "type": "CommentBlock", "value": "*\n\t * Iterate through entities with the specified components\n\t *\n\t * @example\n\t * // Use a callback to process entities one-by-one\n\t * world.every(['comp'], comp => {comp.value = 0})\n\t *\n\t * @example\n\t * // Get an iterator for the entities\n\t * let it = world.every(['comp'])\n\t * for (let entity of it) {...}\n\t *\n\t * @param {Array} componentNames - The component names to match entites with. This checks if the entity\n\t * has ALL of the specified components, but does not check for additional components.\n\t * @param {Function} callback - The callback to call for each entity. Takes (...components, entity, ...args).\n\t * @param {...Object} [args] - Any additional arguments to pass to the callback.\n\t *\n\t * @return {MapIterator} An iterator to the entities themselves\n\t ", - "start": 5681, - "end": 6472, + "start": 5582, + "end": 6373, "loc": { "start": { - "line": 217, + "line": 211, "column": 1 }, "end": { - "line": 235, + "line": 229, "column": 4 } } @@ -6710,15 +6409,15 @@ }, { "type": "ClassMethod", - "start": 6474, - "end": 7287, + "start": 6375, + "end": 7188, "loc": { "start": { - "line": 236, + "line": 230, "column": 1 }, "end": { - "line": 260, + "line": 254, "column": 2 } }, @@ -6726,15 +6425,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 6474, - "end": 6479, + "start": 6375, + "end": 6380, "loc": { "start": { - "line": 236, + "line": 230, "column": 1 }, "end": { - "line": 236, + "line": 230, "column": 6 }, "identifierName": "every" @@ -6750,15 +6449,15 @@ "params": [ { "type": "Identifier", - "start": 6480, - "end": 6494, + "start": 6381, + "end": 6395, "loc": { "start": { - "line": 236, + "line": 230, "column": 7 }, "end": { - "line": 236, + "line": 230, "column": 21 }, "identifierName": "componentNames" @@ -6767,15 +6466,15 @@ }, { "type": "Identifier", - "start": 6496, - "end": 6504, + "start": 6397, + "end": 6405, "loc": { "start": { - "line": 236, + "line": 230, "column": 23 }, "end": { - "line": 236, + "line": 230, "column": 31 }, "identifierName": "callback" @@ -6784,29 +6483,29 @@ }, { "type": "RestElement", - "start": 6506, - "end": 6513, + "start": 6407, + "end": 6414, "loc": { "start": { - "line": 236, + "line": 230, "column": 33 }, "end": { - "line": 236, + "line": 230, "column": 40 } }, "argument": { "type": "Identifier", - "start": 6509, - "end": 6513, + "start": 6410, + "end": 6414, "loc": { "start": { - "line": 236, + "line": 230, "column": 36 }, "end": { - "line": 236, + "line": 230, "column": 40 }, "identifierName": "args" @@ -6817,59 +6516,59 @@ ], "body": { "type": "BlockStatement", - "start": 6515, - "end": 7287, + "start": 6416, + "end": 7188, "loc": { "start": { - "line": 236, + "line": 230, "column": 42 }, "end": { - "line": 260, + "line": 254, "column": 2 } }, "body": [ { "type": "VariableDeclaration", - "start": 6552, - "end": 6599, + "start": 6453, + "end": 6500, "loc": { "start": { - "line": 238, + "line": 232, "column": 2 }, "end": { - "line": 238, + "line": 232, "column": 49 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 6556, - "end": 6599, + "start": 6457, + "end": 6500, "loc": { "start": { - "line": 238, + "line": 232, "column": 6 }, "end": { - "line": 238, + "line": 232, "column": 49 } }, "id": { "type": "Identifier", - "start": 6556, - "end": 6564, + "start": 6457, + "end": 6465, "loc": { "start": { - "line": 238, + "line": 232, "column": 6 }, "end": { - "line": 238, + "line": 232, "column": 14 }, "identifierName": "entities" @@ -6879,72 +6578,72 @@ }, "init": { "type": "CallExpression", - "start": 6567, - "end": 6599, + "start": 6468, + "end": 6500, "loc": { "start": { - "line": 238, + "line": 232, "column": 17 }, "end": { - "line": 238, + "line": 232, "column": 49 } }, "callee": { "type": "MemberExpression", - "start": 6567, - "end": 6583, + "start": 6468, + "end": 6484, "loc": { "start": { - "line": 238, + "line": 232, "column": 17 }, "end": { - "line": 238, + "line": 232, "column": 33 } }, "object": { "type": "MemberExpression", - "start": 6567, - "end": 6577, + "start": 6468, + "end": 6478, "loc": { "start": { - "line": 238, + "line": 232, "column": 17 }, "end": { - "line": 238, + "line": 232, "column": 27 } }, "object": { "type": "ThisExpression", - "start": 6567, - "end": 6571, + "start": 6468, + "end": 6472, "loc": { "start": { - "line": 238, + "line": 232, "column": 17 }, "end": { - "line": 238, + "line": 232, "column": 21 } } }, "property": { "type": "Identifier", - "start": 6572, - "end": 6577, + "start": 6473, + "end": 6478, "loc": { "start": { - "line": 238, + "line": 232, "column": 22 }, "end": { - "line": 238, + "line": 232, "column": 27 }, "identifierName": "index" @@ -6955,15 +6654,15 @@ }, "property": { "type": "Identifier", - "start": 6578, - "end": 6583, + "start": 6479, + "end": 6484, "loc": { "start": { - "line": 238, + "line": 232, "column": 28 }, "end": { - "line": 238, + "line": 232, "column": 33 }, "identifierName": "query" @@ -6975,15 +6674,15 @@ "arguments": [ { "type": "Identifier", - "start": 6584, - "end": 6598, + "start": 6485, + "end": 6499, "loc": { "start": { - "line": 238, + "line": 232, "column": 34 }, "end": { - "line": 238, + "line": 232, "column": 48 }, "identifierName": "componentNames" @@ -7000,15 +6699,15 @@ { "type": "CommentLine", "value": " Get indexed map of entities", - "start": 6519, - "end": 6549, + "start": 6420, + "end": 6450, "loc": { "start": { - "line": 237, + "line": 231, "column": 2 }, "end": { - "line": 237, + "line": 231, "column": 32 } } @@ -7017,43 +6716,43 @@ }, { "type": "IfStatement", - "start": 6603, - "end": 7256, + "start": 6504, + "end": 7157, "loc": { "start": { - "line": 240, + "line": 234, "column": 2 }, "end": { - "line": 257, + "line": 251, "column": 3 } }, "test": { "type": "CallExpression", - "start": 6607, - "end": 6627, + "start": 6508, + "end": 6528, "loc": { "start": { - "line": 240, + "line": 234, "column": 6 }, "end": { - "line": 240, + "line": 234, "column": 26 } }, "callee": { "type": "Identifier", - "start": 6607, - "end": 6617, + "start": 6508, + "end": 6518, "loc": { "start": { - "line": 240, + "line": 234, "column": 6 }, "end": { - "line": 240, + "line": 234, "column": 16 }, "identifierName": "isFunction" @@ -7063,15 +6762,15 @@ "arguments": [ { "type": "Identifier", - "start": 6618, - "end": 6626, + "start": 6519, + "end": 6527, "loc": { "start": { - "line": 240, + "line": 234, "column": 17 }, "end": { - "line": 240, + "line": 234, "column": 25 }, "identifierName": "callback" @@ -7082,73 +6781,73 @@ }, "consequent": { "type": "BlockStatement", - "start": 6629, - "end": 7256, + "start": 6530, + "end": 7157, "loc": { "start": { - "line": 240, + "line": 234, "column": 28 }, "end": { - "line": 257, + "line": 251, "column": 3 } }, "body": [ { "type": "ForOfStatement", - "start": 6671, - "end": 7252, + "start": 6572, + "end": 7153, "loc": { "start": { - "line": 242, + "line": 236, "column": 3 }, "end": { - "line": 256, + "line": 250, "column": 4 } }, "left": { "type": "VariableDeclaration", - "start": 6676, - "end": 6686, + "start": 6577, + "end": 6587, "loc": { "start": { - "line": 242, + "line": 236, "column": 8 }, "end": { - "line": 242, + "line": 236, "column": 18 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 6680, - "end": 6686, + "start": 6581, + "end": 6587, "loc": { "start": { - "line": 242, + "line": 236, "column": 12 }, "end": { - "line": 242, + "line": 236, "column": 18 } }, "id": { "type": "Identifier", - "start": 6680, - "end": 6686, + "start": 6581, + "end": 6587, "loc": { "start": { - "line": 242, + "line": 236, "column": 12 }, "end": { - "line": 242, + "line": 236, "column": 18 }, "identifierName": "entity" @@ -7165,43 +6864,43 @@ }, "right": { "type": "CallExpression", - "start": 6690, - "end": 6707, + "start": 6591, + "end": 6608, "loc": { "start": { - "line": 242, + "line": 236, "column": 22 }, "end": { - "line": 242, + "line": 236, "column": 39 } }, "callee": { "type": "MemberExpression", - "start": 6690, - "end": 6705, + "start": 6591, + "end": 6606, "loc": { "start": { - "line": 242, + "line": 236, "column": 22 }, "end": { - "line": 242, + "line": 236, "column": 37 } }, "object": { "type": "Identifier", - "start": 6690, - "end": 6698, + "start": 6591, + "end": 6599, "loc": { "start": { - "line": 242, + "line": 236, "column": 22 }, "end": { - "line": 242, + "line": 236, "column": 30 }, "identifierName": "entities" @@ -7210,15 +6909,15 @@ }, "property": { "type": "Identifier", - "start": 6699, - "end": 6705, + "start": 6600, + "end": 6606, "loc": { "start": { - "line": 242, + "line": 236, "column": 31 }, "end": { - "line": 242, + "line": 236, "column": 37 }, "identifierName": "values" @@ -7231,59 +6930,59 @@ }, "body": { "type": "BlockStatement", - "start": 6709, - "end": 7252, + "start": 6610, + "end": 7153, "loc": { "start": { - "line": 242, + "line": 236, "column": 41 }, "end": { - "line": 256, + "line": 250, "column": 4 } }, "body": [ { "type": "VariableDeclaration", - "start": 6947, - "end": 7008, + "start": 6848, + "end": 6909, "loc": { "start": { - "line": 247, + "line": 241, "column": 4 }, "end": { - "line": 247, + "line": 241, "column": 65 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 6951, - "end": 7008, + "start": 6852, + "end": 6909, "loc": { "start": { - "line": 247, + "line": 241, "column": 8 }, "end": { - "line": 247, + "line": 241, "column": 65 } }, "id": { "type": "Identifier", - "start": 6951, - "end": 6961, + "start": 6852, + "end": 6862, "loc": { "start": { - "line": 247, + "line": 241, "column": 8 }, "end": { - "line": 247, + "line": 241, "column": 18 }, "identifierName": "components" @@ -7293,43 +6992,43 @@ }, "init": { "type": "CallExpression", - "start": 6964, - "end": 7008, + "start": 6865, + "end": 6909, "loc": { "start": { - "line": 247, + "line": 241, "column": 21 }, "end": { - "line": 247, + "line": 241, "column": 65 } }, "callee": { "type": "MemberExpression", - "start": 6964, - "end": 6982, + "start": 6865, + "end": 6883, "loc": { "start": { - "line": 247, + "line": 241, "column": 21 }, "end": { - "line": 247, + "line": 241, "column": 39 } }, "object": { "type": "Identifier", - "start": 6964, - "end": 6978, + "start": 6865, + "end": 6879, "loc": { "start": { - "line": 247, + "line": 241, "column": 21 }, "end": { - "line": 247, + "line": 241, "column": 35 }, "identifierName": "componentNames" @@ -7338,15 +7037,15 @@ }, "property": { "type": "Identifier", - "start": 6979, - "end": 6982, + "start": 6880, + "end": 6883, "loc": { "start": { - "line": 247, + "line": 241, "column": 36 }, "end": { - "line": 247, + "line": 241, "column": 39 }, "identifierName": "map" @@ -7358,15 +7057,15 @@ "arguments": [ { "type": "ArrowFunctionExpression", - "start": 6983, - "end": 7007, + "start": 6884, + "end": 6908, "loc": { "start": { - "line": 247, + "line": 241, "column": 40 }, "end": { - "line": 247, + "line": 241, "column": 64 } }, @@ -7377,15 +7076,15 @@ "params": [ { "type": "Identifier", - "start": 6983, - "end": 6987, + "start": 6884, + "end": 6888, "loc": { "start": { - "line": 247, + "line": 241, "column": 40 }, "end": { - "line": 247, + "line": 241, "column": 44 }, "identifierName": "name" @@ -7395,43 +7094,43 @@ ], "body": { "type": "CallExpression", - "start": 6991, - "end": 7007, + "start": 6892, + "end": 6908, "loc": { "start": { - "line": 247, + "line": 241, "column": 48 }, "end": { - "line": 247, + "line": 241, "column": 64 } }, "callee": { "type": "MemberExpression", - "start": 6991, - "end": 7001, + "start": 6892, + "end": 6902, "loc": { "start": { - "line": 247, + "line": 241, "column": 48 }, "end": { - "line": 247, + "line": 241, "column": 58 } }, "object": { "type": "Identifier", - "start": 6991, - "end": 6997, + "start": 6892, + "end": 6898, "loc": { "start": { - "line": 247, + "line": 241, "column": 48 }, "end": { - "line": 247, + "line": 241, "column": 54 }, "identifierName": "entity" @@ -7440,15 +7139,15 @@ }, "property": { "type": "Identifier", - "start": 6998, - "end": 7001, + "start": 6899, + "end": 6902, "loc": { "start": { - "line": 247, + "line": 241, "column": 55 }, "end": { - "line": 247, + "line": 241, "column": 58 }, "identifierName": "get" @@ -7460,15 +7159,15 @@ "arguments": [ { "type": "Identifier", - "start": 7002, - "end": 7006, + "start": 6903, + "end": 6907, "loc": { "start": { - "line": 247, + "line": 241, "column": 59 }, "end": { - "line": 247, + "line": 241, "column": 63 }, "identifierName": "name" @@ -7490,15 +7189,15 @@ { "type": "CommentLine", "value": " At this point, we can safely assume that all components exist, even if entities/components", - "start": 6715, - "end": 6808, + "start": 6616, + "end": 6709, "loc": { "start": { - "line": 243, + "line": 237, "column": 4 }, "end": { - "line": 243, + "line": 237, "column": 97 } } @@ -7506,15 +7205,15 @@ { "type": "CommentLine", "value": " are deleted/modified during the loop, because JavaScript's MapIterator is smart enough.", - "start": 6813, - "end": 6903, + "start": 6714, + "end": 6804, "loc": { "start": { - "line": 244, + "line": 238, "column": 4 }, "end": { - "line": 244, + "line": 238, "column": 94 } } @@ -7522,15 +7221,15 @@ { "type": "CommentLine", "value": " Get all components as an array", - "start": 6909, - "end": 6942, + "start": 6810, + "end": 6843, "loc": { "start": { - "line": 246, + "line": 240, "column": 4 }, "end": { - "line": 246, + "line": 240, "column": 37 } } @@ -7540,15 +7239,15 @@ { "type": "CommentLine", "value": " Pass components, then the main entity, then any additional arguments", - "start": 7014, - "end": 7085, + "start": 6915, + "end": 6986, "loc": { "start": { - "line": 249, + "line": 243, "column": 4 }, "end": { - "line": 249, + "line": 243, "column": 75 } } @@ -7557,44 +7256,44 @@ }, { "type": "VariableDeclaration", - "start": 7090, - "end": 7143, + "start": 6991, + "end": 7044, "loc": { "start": { - "line": 250, + "line": 244, "column": 4 }, "end": { - "line": 250, + "line": 244, "column": 57 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 7094, - "end": 7143, + "start": 6995, + "end": 7044, "loc": { "start": { - "line": 250, + "line": 244, "column": 8 }, "end": { - "line": 250, + "line": 244, "column": 57 } }, "id": { "type": "Identifier", - "start": 7094, - "end": 7100, + "start": 6995, + "end": 7001, "loc": { "start": { - "line": 250, + "line": 244, "column": 8 }, "end": { - "line": 250, + "line": 244, "column": 14 }, "identifierName": "status" @@ -7604,29 +7303,29 @@ }, "init": { "type": "CallExpression", - "start": 7103, - "end": 7143, + "start": 7004, + "end": 7044, "loc": { "start": { - "line": 250, + "line": 244, "column": 17 }, "end": { - "line": 250, + "line": 244, "column": 57 } }, "callee": { "type": "Identifier", - "start": 7103, - "end": 7111, + "start": 7004, + "end": 7012, "loc": { "start": { - "line": 250, + "line": 244, "column": 17 }, "end": { - "line": 250, + "line": 244, "column": 25 }, "identifierName": "callback" @@ -7636,29 +7335,29 @@ "arguments": [ { "type": "SpreadElement", - "start": 7112, - "end": 7125, + "start": 7013, + "end": 7026, "loc": { "start": { - "line": 250, + "line": 244, "column": 26 }, "end": { - "line": 250, + "line": 244, "column": 39 } }, "argument": { "type": "Identifier", - "start": 7115, - "end": 7125, + "start": 7016, + "end": 7026, "loc": { "start": { - "line": 250, + "line": 244, "column": 29 }, "end": { - "line": 250, + "line": 244, "column": 39 }, "identifierName": "components" @@ -7668,15 +7367,15 @@ }, { "type": "Identifier", - "start": 7127, - "end": 7133, + "start": 7028, + "end": 7034, "loc": { "start": { - "line": 250, + "line": 244, "column": 41 }, "end": { - "line": 250, + "line": 244, "column": 47 }, "identifierName": "entity" @@ -7685,29 +7384,29 @@ }, { "type": "SpreadElement", - "start": 7135, - "end": 7142, + "start": 7036, + "end": 7043, "loc": { "start": { - "line": 250, + "line": 244, "column": 49 }, "end": { - "line": 250, + "line": 244, "column": 56 } }, "argument": { "type": "Identifier", - "start": 7138, - "end": 7142, + "start": 7039, + "end": 7043, "loc": { "start": { - "line": 250, + "line": 244, "column": 52 }, "end": { - "line": 250, + "line": 244, "column": 56 }, "identifierName": "args" @@ -7727,15 +7426,15 @@ { "type": "CommentLine", "value": " Pass components, then the main entity, then any additional arguments", - "start": 7014, - "end": 7085, + "start": 6915, + "end": 6986, "loc": { "start": { - "line": 249, + "line": 243, "column": 4 }, "end": { - "line": 249, + "line": 243, "column": 75 } } @@ -7745,15 +7444,15 @@ { "type": "CommentLine", "value": " Stop the iteration when the callback returns false", - "start": 7149, - "end": 7202, + "start": 7050, + "end": 7103, "loc": { "start": { - "line": 252, + "line": 246, "column": 4 }, "end": { - "line": 252, + "line": 246, "column": 57 } } @@ -7762,43 +7461,43 @@ }, { "type": "IfStatement", - "start": 7207, - "end": 7247, + "start": 7108, + "end": 7148, "loc": { "start": { - "line": 253, + "line": 247, "column": 4 }, "end": { - "line": 255, + "line": 249, "column": 5 } }, "test": { "type": "BinaryExpression", - "start": 7211, - "end": 7227, + "start": 7112, + "end": 7128, "loc": { "start": { - "line": 253, + "line": 247, "column": 8 }, "end": { - "line": 253, + "line": 247, "column": 24 } }, "left": { "type": "Identifier", - "start": 7211, - "end": 7217, + "start": 7112, + "end": 7118, "loc": { "start": { - "line": 253, + "line": 247, "column": 8 }, "end": { - "line": 253, + "line": 247, "column": 14 }, "identifierName": "status" @@ -7809,15 +7508,15 @@ "operator": "===", "right": { "type": "BooleanLiteral", - "start": 7222, - "end": 7227, + "start": 7123, + "end": 7128, "loc": { "start": { - "line": 253, + "line": 247, "column": 19 }, "end": { - "line": 253, + "line": 247, "column": 24 } }, @@ -7827,30 +7526,30 @@ }, "consequent": { "type": "BlockStatement", - "start": 7229, - "end": 7247, + "start": 7130, + "end": 7148, "loc": { "start": { - "line": 253, + "line": 247, "column": 26 }, "end": { - "line": 255, + "line": 249, "column": 5 } }, "body": [ { "type": "BreakStatement", - "start": 7236, - "end": 7241, + "start": 7137, + "end": 7142, "loc": { "start": { - "line": 254, + "line": 248, "column": 5 }, "end": { - "line": 254, + "line": 248, "column": 10 } }, @@ -7864,15 +7563,15 @@ { "type": "CommentLine", "value": " Stop the iteration when the callback returns false", - "start": 7149, - "end": 7202, + "start": 7050, + "end": 7103, "loc": { "start": { - "line": 252, + "line": 246, "column": 4 }, "end": { - "line": 252, + "line": 246, "column": 57 } } @@ -7886,15 +7585,15 @@ { "type": "CommentLine", "value": " Go through the map of entities", - "start": 6634, - "end": 6667, + "start": 6535, + "end": 6568, "loc": { "start": { - "line": 241, + "line": 235, "column": 3 }, "end": { - "line": 241, + "line": 235, "column": 36 } } @@ -7908,57 +7607,57 @@ }, { "type": "ReturnStatement", - "start": 7260, - "end": 7284, + "start": 7161, + "end": 7185, "loc": { "start": { - "line": 259, + "line": 253, "column": 2 }, "end": { - "line": 259, + "line": 253, "column": 26 } }, "argument": { "type": "CallExpression", - "start": 7267, - "end": 7284, + "start": 7168, + "end": 7185, "loc": { "start": { - "line": 259, + "line": 253, "column": 9 }, "end": { - "line": 259, + "line": 253, "column": 26 } }, "callee": { "type": "MemberExpression", - "start": 7267, - "end": 7282, + "start": 7168, + "end": 7183, "loc": { "start": { - "line": 259, + "line": 253, "column": 9 }, "end": { - "line": 259, + "line": 253, "column": 24 } }, "object": { "type": "Identifier", - "start": 7267, - "end": 7275, + "start": 7168, + "end": 7176, "loc": { "start": { - "line": 259, + "line": 253, "column": 9 }, "end": { - "line": 259, + "line": 253, "column": 17 }, "identifierName": "entities" @@ -7967,15 +7666,15 @@ }, "property": { "type": "Identifier", - "start": 7276, - "end": 7282, + "start": 7177, + "end": 7183, "loc": { "start": { - "line": 259, + "line": 253, "column": 18 }, "end": { - "line": 259, + "line": 253, "column": 24 }, "identifierName": "values" @@ -7995,15 +7694,15 @@ { "type": "CommentBlock", "value": "*\n\t * Iterate through entities with the specified components\n\t *\n\t * @example\n\t * // Use a callback to process entities one-by-one\n\t * world.every(['comp'], comp => {comp.value = 0})\n\t *\n\t * @example\n\t * // Get an iterator for the entities\n\t * let it = world.every(['comp'])\n\t * for (let entity of it) {...}\n\t *\n\t * @param {Array} componentNames - The component names to match entites with. This checks if the entity\n\t * has ALL of the specified components, but does not check for additional components.\n\t * @param {Function} callback - The callback to call for each entity. Takes (...components, entity, ...args).\n\t * @param {...Object} [args] - Any additional arguments to pass to the callback.\n\t *\n\t * @return {MapIterator} An iterator to the entities themselves\n\t ", - "start": 5681, - "end": 6472, + "start": 5582, + "end": 6373, "loc": { "start": { - "line": 217, + "line": 211, "column": 1 }, "end": { - "line": 235, + "line": 229, "column": 4 } } @@ -8013,15 +7712,15 @@ { "type": "CommentBlock", "value": "*\n\t * Returns an array of entities with matching components\n\t * Simplified version of every(), returns an actual array, and only takes component names as arguments.\n\t *\n\t * @example\n\t * world.get('player', 'sprite')\n\t *\n\t * @param {Array} componentNames - The component names to match on. See every() for how this matches.\n\t *\n\t * @return {Array} Array of entities, instead of iterator like every().\n\t ", - "start": 7290, - "end": 7696, + "start": 7191, + "end": 7597, "loc": { "start": { - "line": 262, + "line": 256, "column": 1 }, "end": { - "line": 272, + "line": 266, "column": 4 } } @@ -8030,15 +7729,15 @@ }, { "type": "ClassMethod", - "start": 7698, - "end": 7766, + "start": 7599, + "end": 7667, "loc": { "start": { - "line": 273, + "line": 267, "column": 1 }, "end": { - "line": 275, + "line": 269, "column": 2 } }, @@ -8046,15 +7745,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 7698, - "end": 7701, + "start": 7599, + "end": 7602, "loc": { "start": { - "line": 273, + "line": 267, "column": 1 }, "end": { - "line": 273, + "line": 267, "column": 4 }, "identifierName": "get" @@ -8070,29 +7769,29 @@ "params": [ { "type": "RestElement", - "start": 7702, - "end": 7719, + "start": 7603, + "end": 7620, "loc": { "start": { - "line": 273, + "line": 267, "column": 5 }, "end": { - "line": 273, + "line": 267, "column": 22 } }, "argument": { "type": "Identifier", - "start": 7705, - "end": 7719, + "start": 7606, + "end": 7620, "loc": { "start": { - "line": 273, + "line": 267, "column": 8 }, "end": { - "line": 273, + "line": 267, "column": 22 }, "identifierName": "componentNames" @@ -8103,116 +7802,116 @@ ], "body": { "type": "BlockStatement", - "start": 7721, - "end": 7766, + "start": 7622, + "end": 7667, "loc": { "start": { - "line": 273, + "line": 267, "column": 24 }, "end": { - "line": 275, + "line": 269, "column": 2 } }, "body": [ { "type": "ReturnStatement", - "start": 7725, - "end": 7763, + "start": 7626, + "end": 7664, "loc": { "start": { - "line": 274, + "line": 268, "column": 2 }, "end": { - "line": 274, + "line": 268, "column": 40 } }, "argument": { "type": "ArrayExpression", - "start": 7732, - "end": 7763, + "start": 7633, + "end": 7664, "loc": { "start": { - "line": 274, + "line": 268, "column": 9 }, "end": { - "line": 274, + "line": 268, "column": 40 } }, "elements": [ { "type": "SpreadElement", - "start": 7733, - "end": 7762, + "start": 7634, + "end": 7663, "loc": { "start": { - "line": 274, + "line": 268, "column": 10 }, "end": { - "line": 274, + "line": 268, "column": 39 } }, "argument": { "type": "CallExpression", - "start": 7736, - "end": 7762, + "start": 7637, + "end": 7663, "loc": { "start": { - "line": 274, + "line": 268, "column": 13 }, "end": { - "line": 274, + "line": 268, "column": 39 } }, "callee": { "type": "MemberExpression", - "start": 7736, - "end": 7746, + "start": 7637, + "end": 7647, "loc": { "start": { - "line": 274, + "line": 268, "column": 13 }, "end": { - "line": 274, + "line": 268, "column": 23 } }, "object": { "type": "ThisExpression", - "start": 7736, - "end": 7740, + "start": 7637, + "end": 7641, "loc": { "start": { - "line": 274, + "line": 268, "column": 13 }, "end": { - "line": 274, + "line": 268, "column": 17 } } }, "property": { "type": "Identifier", - "start": 7741, - "end": 7746, + "start": 7642, + "end": 7647, "loc": { "start": { - "line": 274, + "line": 268, "column": 18 }, "end": { - "line": 274, + "line": 268, "column": 23 }, "identifierName": "every" @@ -8224,15 +7923,15 @@ "arguments": [ { "type": "Identifier", - "start": 7747, - "end": 7761, + "start": 7648, + "end": 7662, "loc": { "start": { - "line": 274, + "line": 268, "column": 24 }, "end": { - "line": 274, + "line": 268, "column": 38 }, "identifierName": "componentNames" @@ -8253,15 +7952,15 @@ { "type": "CommentBlock", "value": "*\n\t * Returns an array of entities with matching components\n\t * Simplified version of every(), returns an actual array, and only takes component names as arguments.\n\t *\n\t * @example\n\t * world.get('player', 'sprite')\n\t *\n\t * @param {Array} componentNames - The component names to match on. See every() for how this matches.\n\t *\n\t * @return {Array} Array of entities, instead of iterator like every().\n\t ", - "start": 7290, - "end": 7696, + "start": 7191, + "end": 7597, "loc": { "start": { - "line": 262, + "line": 256, "column": 1 }, "end": { - "line": 272, + "line": 266, "column": 4 } } @@ -8271,15 +7970,15 @@ { "type": "CommentBlock", "value": "*\n\t * Registers entity prototype(s). Any existing prototype names that are the same will be overwritten\n\t *\n\t * @example\n\t * world.prototype({\n\t * Movable: {\n\t * position: {},\n\t * velocity: {}\n\t * }\n\t * })\n\t *\n\t * @param {Object} data - Object structure to register as a prototype. Should be a dictionary with the top level keys\n\t * being the prototype names. Can also be a JSON formatted string.\n\t *\n\t * @return {number} Number of prototypes added.\n\t ", - "start": 7769, - "end": 8249, + "start": 7670, + "end": 8150, "loc": { "start": { - "line": 277, + "line": 271, "column": 1 }, "end": { - "line": 292, + "line": 286, "column": 4 } } @@ -8288,15 +7987,15 @@ }, { "type": "ClassMethod", - "start": 8251, - "end": 8889, + "start": 8152, + "end": 8790, "loc": { "start": { - "line": 293, + "line": 287, "column": 1 }, "end": { - "line": 318, + "line": 312, "column": 2 } }, @@ -8304,15 +8003,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 8251, - "end": 8260, + "start": 8152, + "end": 8161, "loc": { "start": { - "line": 293, + "line": 287, "column": 1 }, "end": { - "line": 293, + "line": 287, "column": 10 }, "identifierName": "prototype" @@ -8328,15 +8027,15 @@ "params": [ { "type": "Identifier", - "start": 8261, - "end": 8265, + "start": 8162, + "end": 8166, "loc": { "start": { - "line": 293, + "line": 287, "column": 11 }, "end": { - "line": 293, + "line": 287, "column": 15 }, "identifierName": "data" @@ -8346,59 +8045,59 @@ ], "body": { "type": "BlockStatement", - "start": 8267, - "end": 8889, + "start": 8168, + "end": 8790, "loc": { "start": { - "line": 293, + "line": 287, "column": 17 }, "end": { - "line": 318, + "line": 312, "column": 2 } }, "body": [ { "type": "VariableDeclaration", - "start": 8271, - "end": 8284, + "start": 8172, + "end": 8185, "loc": { "start": { - "line": 294, + "line": 288, "column": 2 }, "end": { - "line": 294, + "line": 288, "column": 15 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 8275, - "end": 8284, + "start": 8176, + "end": 8185, "loc": { "start": { - "line": 294, + "line": 288, "column": 6 }, "end": { - "line": 294, + "line": 288, "column": 15 } }, "id": { "type": "Identifier", - "start": 8275, - "end": 8280, + "start": 8176, + "end": 8181, "loc": { "start": { - "line": 294, + "line": 288, "column": 6 }, "end": { - "line": 294, + "line": 288, "column": 11 }, "identifierName": "count" @@ -8407,15 +8106,15 @@ }, "init": { "type": "NumericLiteral", - "start": 8283, - "end": 8284, + "start": 8184, + "end": 8185, "loc": { "start": { - "line": 294, + "line": 288, "column": 14 }, "end": { - "line": 294, + "line": 288, "column": 15 } }, @@ -8435,15 +8134,15 @@ { "type": "CommentLine", "value": " Convert to an object when given a string", - "start": 8288, - "end": 8331, + "start": 8189, + "end": 8232, "loc": { "start": { - "line": 296, + "line": 290, "column": 2 }, "end": { - "line": 296, + "line": 290, "column": 45 } } @@ -8452,43 +8151,43 @@ }, { "type": "IfStatement", - "start": 8334, - "end": 8396, + "start": 8235, + "end": 8297, "loc": { "start": { - "line": 297, + "line": 291, "column": 2 }, "end": { - "line": 299, + "line": 293, "column": 3 } }, "test": { "type": "BinaryExpression", - "start": 8338, - "end": 8362, + "start": 8239, + "end": 8263, "loc": { "start": { - "line": 297, + "line": 291, "column": 6 }, "end": { - "line": 297, + "line": 291, "column": 30 } }, "left": { "type": "UnaryExpression", - "start": 8338, - "end": 8349, + "start": 8239, + "end": 8250, "loc": { "start": { - "line": 297, + "line": 291, "column": 6 }, "end": { - "line": 297, + "line": 291, "column": 17 } }, @@ -8496,15 +8195,15 @@ "prefix": true, "argument": { "type": "Identifier", - "start": 8345, - "end": 8349, + "start": 8246, + "end": 8250, "loc": { "start": { - "line": 297, + "line": 291, "column": 13 }, "end": { - "line": 297, + "line": 291, "column": 17 }, "identifierName": "data" @@ -8520,15 +8219,15 @@ "operator": "===", "right": { "type": "StringLiteral", - "start": 8354, - "end": 8362, + "start": 8255, + "end": 8263, "loc": { "start": { - "line": 297, + "line": 291, "column": 22 }, "end": { - "line": 297, + "line": 291, "column": 30 } }, @@ -8542,59 +8241,59 @@ }, "consequent": { "type": "BlockStatement", - "start": 8364, - "end": 8396, + "start": 8265, + "end": 8297, "loc": { "start": { - "line": 297, + "line": 291, "column": 32 }, "end": { - "line": 299, + "line": 293, "column": 3 } }, "body": [ { "type": "ExpressionStatement", - "start": 8369, - "end": 8392, + "start": 8270, + "end": 8293, "loc": { "start": { - "line": 298, + "line": 292, "column": 3 }, "end": { - "line": 298, + "line": 292, "column": 26 } }, "expression": { "type": "AssignmentExpression", - "start": 8369, - "end": 8392, + "start": 8270, + "end": 8293, "loc": { "start": { - "line": 298, + "line": 292, "column": 3 }, "end": { - "line": 298, + "line": 292, "column": 26 } }, "operator": "=", "left": { "type": "Identifier", - "start": 8369, - "end": 8373, + "start": 8270, + "end": 8274, "loc": { "start": { - "line": 298, + "line": 292, "column": 3 }, "end": { - "line": 298, + "line": 292, "column": 7 }, "identifierName": "data" @@ -8603,43 +8302,43 @@ }, "right": { "type": "CallExpression", - "start": 8376, - "end": 8392, + "start": 8277, + "end": 8293, "loc": { "start": { - "line": 298, + "line": 292, "column": 10 }, "end": { - "line": 298, + "line": 292, "column": 26 } }, "callee": { "type": "MemberExpression", - "start": 8376, - "end": 8386, + "start": 8277, + "end": 8287, "loc": { "start": { - "line": 298, + "line": 292, "column": 10 }, "end": { - "line": 298, + "line": 292, "column": 20 } }, "object": { "type": "Identifier", - "start": 8376, - "end": 8380, + "start": 8277, + "end": 8281, "loc": { "start": { - "line": 298, + "line": 292, "column": 10 }, "end": { - "line": 298, + "line": 292, "column": 14 }, "identifierName": "JSON" @@ -8648,15 +8347,15 @@ }, "property": { "type": "Identifier", - "start": 8381, - "end": 8386, + "start": 8282, + "end": 8287, "loc": { "start": { - "line": 298, + "line": 292, "column": 15 }, "end": { - "line": 298, + "line": 292, "column": 20 }, "identifierName": "parse" @@ -8668,15 +8367,15 @@ "arguments": [ { "type": "Identifier", - "start": 8387, - "end": 8391, + "start": 8288, + "end": 8292, "loc": { "start": { - "line": 298, + "line": 292, "column": 21 }, "end": { - "line": 298, + "line": 292, "column": 25 }, "identifierName": "data" @@ -8696,15 +8395,15 @@ { "type": "CommentLine", "value": " Convert to an object when given a string", - "start": 8288, - "end": 8331, + "start": 8189, + "end": 8232, "loc": { "start": { - "line": 296, + "line": 290, "column": 2 }, "end": { - "line": 296, + "line": 290, "column": 45 } } @@ -8714,15 +8413,15 @@ { "type": "CommentLine", "value": " Data must be an object at this point", - "start": 8400, - "end": 8439, + "start": 8301, + "end": 8340, "loc": { "start": { - "line": 301, + "line": 295, "column": 2 }, "end": { - "line": 301, + "line": 295, "column": 41 } } @@ -8731,43 +8430,43 @@ }, { "type": "IfStatement", - "start": 8442, - "end": 8870, + "start": 8343, + "end": 8771, "loc": { "start": { - "line": 302, + "line": 296, "column": 2 }, "end": { - "line": 315, + "line": 309, "column": 3 } }, "test": { "type": "BinaryExpression", - "start": 8446, - "end": 8470, + "start": 8347, + "end": 8371, "loc": { "start": { - "line": 302, + "line": 296, "column": 6 }, "end": { - "line": 302, + "line": 296, "column": 30 } }, "left": { "type": "UnaryExpression", - "start": 8446, - "end": 8457, + "start": 8347, + "end": 8358, "loc": { "start": { - "line": 302, + "line": 296, "column": 6 }, "end": { - "line": 302, + "line": 296, "column": 17 } }, @@ -8775,15 +8474,15 @@ "prefix": true, "argument": { "type": "Identifier", - "start": 8453, - "end": 8457, + "start": 8354, + "end": 8358, "loc": { "start": { - "line": 302, + "line": 296, "column": 13 }, "end": { - "line": 302, + "line": 296, "column": 17 }, "identifierName": "data" @@ -8799,15 +8498,15 @@ "operator": "===", "right": { "type": "StringLiteral", - "start": 8462, - "end": 8470, + "start": 8363, + "end": 8371, "loc": { "start": { - "line": 302, + "line": 296, "column": 22 }, "end": { - "line": 302, + "line": 296, "column": 30 } }, @@ -8821,73 +8520,73 @@ }, "consequent": { "type": "BlockStatement", - "start": 8472, - "end": 8870, + "start": 8373, + "end": 8771, "loc": { "start": { - "line": 302, + "line": 296, "column": 32 }, "end": { - "line": 315, + "line": 309, "column": 3 } }, "body": [ { "type": "ForInStatement", - "start": 8515, - "end": 8866, + "start": 8416, + "end": 8767, "loc": { "start": { - "line": 304, + "line": 298, "column": 3 }, "end": { - "line": 314, + "line": 308, "column": 4 } }, "left": { "type": "VariableDeclaration", - "start": 8520, - "end": 8533, + "start": 8421, + "end": 8434, "loc": { "start": { - "line": 304, + "line": 298, "column": 8 }, "end": { - "line": 304, + "line": 298, "column": 21 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 8524, - "end": 8533, + "start": 8425, + "end": 8434, "loc": { "start": { - "line": 304, + "line": 298, "column": 12 }, "end": { - "line": 304, + "line": 298, "column": 21 } }, "id": { "type": "Identifier", - "start": 8524, - "end": 8533, + "start": 8425, + "end": 8434, "loc": { "start": { - "line": 304, + "line": 298, "column": 12 }, "end": { - "line": 304, + "line": 298, "column": 21 }, "identifierName": "protoName" @@ -8904,15 +8603,15 @@ }, "right": { "type": "Identifier", - "start": 8537, - "end": 8541, + "start": 8438, + "end": 8442, "loc": { "start": { - "line": 304, + "line": 298, "column": 25 }, "end": { - "line": 304, + "line": 298, "column": 29 }, "identifierName": "data" @@ -8921,59 +8620,59 @@ }, "body": { "type": "BlockStatement", - "start": 8543, - "end": 8866, + "start": 8444, + "end": 8767, "loc": { "start": { - "line": 304, + "line": 298, "column": 31 }, "end": { - "line": 314, + "line": 308, "column": 4 } }, "body": [ { "type": "VariableDeclaration", - "start": 8549, - "end": 8582, + "start": 8450, + "end": 8483, "loc": { "start": { - "line": 305, + "line": 299, "column": 4 }, "end": { - "line": 305, + "line": 299, "column": 37 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 8553, - "end": 8582, + "start": 8454, + "end": 8483, "loc": { "start": { - "line": 305, + "line": 299, "column": 8 }, "end": { - "line": 305, + "line": 299, "column": 37 } }, "id": { "type": "Identifier", - "start": 8553, - "end": 8564, + "start": 8454, + "end": 8465, "loc": { "start": { - "line": 305, + "line": 299, "column": 8 }, "end": { - "line": 305, + "line": 299, "column": 19 }, "identifierName": "inputObject" @@ -8982,29 +8681,29 @@ }, "init": { "type": "MemberExpression", - "start": 8567, - "end": 8582, + "start": 8468, + "end": 8483, "loc": { "start": { - "line": 305, + "line": 299, "column": 22 }, "end": { - "line": 305, + "line": 299, "column": 37 } }, "object": { "type": "Identifier", - "start": 8567, - "end": 8571, + "start": 8468, + "end": 8472, "loc": { "start": { - "line": 305, + "line": 299, "column": 22 }, "end": { - "line": 305, + "line": 299, "column": 26 }, "identifierName": "data" @@ -9013,15 +8712,15 @@ }, "property": { "type": "Identifier", - "start": 8572, - "end": 8581, + "start": 8473, + "end": 8482, "loc": { "start": { - "line": 305, + "line": 299, "column": 27 }, "end": { - "line": 305, + "line": 299, "column": 36 }, "identifierName": "protoName" @@ -9036,44 +8735,44 @@ }, { "type": "VariableDeclaration", - "start": 8587, - "end": 8607, + "start": 8488, + "end": 8508, "loc": { "start": { - "line": 306, + "line": 300, "column": 4 }, "end": { - "line": 306, + "line": 300, "column": 24 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 8591, - "end": 8607, + "start": 8492, + "end": 8508, "loc": { "start": { - "line": 306, + "line": 300, "column": 8 }, "end": { - "line": 306, + "line": 300, "column": 24 } }, "id": { "type": "Identifier", - "start": 8591, - "end": 8602, + "start": 8492, + "end": 8503, "loc": { "start": { - "line": 306, + "line": 300, "column": 8 }, "end": { - "line": 306, + "line": 300, "column": 19 }, "identifierName": "protoObject" @@ -9082,15 +8781,15 @@ }, "init": { "type": "ObjectExpression", - "start": 8605, - "end": 8607, + "start": 8506, + "end": 8508, "loc": { "start": { - "line": 306, + "line": 300, "column": 22 }, "end": { - "line": 306, + "line": 300, "column": 24 } }, @@ -9106,15 +8805,15 @@ { "type": "CommentLine", "value": " Iterate through component names", - "start": 8612, - "end": 8646, + "start": 8513, + "end": 8547, "loc": { "start": { - "line": 307, + "line": 301, "column": 4 }, "end": { - "line": 307, + "line": 301, "column": 38 } } @@ -9123,58 +8822,58 @@ }, { "type": "ForInStatement", - "start": 8651, - "end": 8799, + "start": 8552, + "end": 8700, "loc": { "start": { - "line": 308, + "line": 302, "column": 4 }, "end": { - "line": 311, + "line": 305, "column": 5 } }, "left": { "type": "VariableDeclaration", - "start": 8656, - "end": 8668, + "start": 8557, + "end": 8569, "loc": { "start": { - "line": 308, + "line": 302, "column": 9 }, "end": { - "line": 308, + "line": 302, "column": 21 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 8660, - "end": 8668, + "start": 8561, + "end": 8569, "loc": { "start": { - "line": 308, + "line": 302, "column": 13 }, "end": { - "line": 308, + "line": 302, "column": 21 } }, "id": { "type": "Identifier", - "start": 8660, - "end": 8668, + "start": 8561, + "end": 8569, "loc": { "start": { - "line": 308, + "line": 302, "column": 13 }, "end": { - "line": 308, + "line": 302, "column": 21 }, "identifierName": "compName" @@ -9191,15 +8890,15 @@ }, "right": { "type": "Identifier", - "start": 8672, - "end": 8683, + "start": 8573, + "end": 8584, "loc": { "start": { - "line": 308, + "line": 302, "column": 25 }, "end": { - "line": 308, + "line": 302, "column": 36 }, "identifierName": "inputObject" @@ -9208,73 +8907,73 @@ }, "body": { "type": "BlockStatement", - "start": 8685, - "end": 8799, + "start": 8586, + "end": 8700, "loc": { "start": { - "line": 308, + "line": 302, "column": 38 }, "end": { - "line": 311, + "line": 305, "column": 5 } }, "body": [ { "type": "ExpressionStatement", - "start": 8732, - "end": 8793, + "start": 8633, + "end": 8694, "loc": { "start": { - "line": 310, + "line": 304, "column": 5 }, "end": { - "line": 310, + "line": 304, "column": 66 } }, "expression": { "type": "AssignmentExpression", - "start": 8732, - "end": 8793, + "start": 8633, + "end": 8694, "loc": { "start": { - "line": 310, + "line": 304, "column": 5 }, "end": { - "line": 310, + "line": 304, "column": 66 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 8732, - "end": 8753, + "start": 8633, + "end": 8654, "loc": { "start": { - "line": 310, + "line": 304, "column": 5 }, "end": { - "line": 310, + "line": 304, "column": 26 } }, "object": { "type": "Identifier", - "start": 8732, - "end": 8743, + "start": 8633, + "end": 8644, "loc": { "start": { - "line": 310, + "line": 304, "column": 5 }, "end": { - "line": 310, + "line": 304, "column": 16 }, "identifierName": "protoObject" @@ -9284,15 +8983,15 @@ }, "property": { "type": "Identifier", - "start": 8744, - "end": 8752, + "start": 8645, + "end": 8653, "loc": { "start": { - "line": 310, + "line": 304, "column": 17 }, "end": { - "line": 310, + "line": 304, "column": 25 }, "identifierName": "compName" @@ -9304,43 +9003,43 @@ }, "right": { "type": "CallExpression", - "start": 8756, - "end": 8793, + "start": 8657, + "end": 8694, "loc": { "start": { - "line": 310, + "line": 304, "column": 29 }, "end": { - "line": 310, + "line": 304, "column": 66 } }, "callee": { "type": "MemberExpression", - "start": 8756, - "end": 8770, + "start": 8657, + "end": 8671, "loc": { "start": { - "line": 310, + "line": 304, "column": 29 }, "end": { - "line": 310, + "line": 304, "column": 43 } }, "object": { "type": "Identifier", - "start": 8756, - "end": 8760, + "start": 8657, + "end": 8661, "loc": { "start": { - "line": 310, + "line": 304, "column": 29 }, "end": { - "line": 310, + "line": 304, "column": 33 }, "identifierName": "JSON" @@ -9349,15 +9048,15 @@ }, "property": { "type": "Identifier", - "start": 8761, - "end": 8770, + "start": 8662, + "end": 8671, "loc": { "start": { - "line": 310, + "line": 304, "column": 34 }, "end": { - "line": 310, + "line": 304, "column": 43 }, "identifierName": "stringify" @@ -9369,29 +9068,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 8771, - "end": 8792, + "start": 8672, + "end": 8693, "loc": { "start": { - "line": 310, + "line": 304, "column": 44 }, "end": { - "line": 310, + "line": 304, "column": 65 } }, "object": { "type": "Identifier", - "start": 8771, - "end": 8782, + "start": 8672, + "end": 8683, "loc": { "start": { - "line": 310, + "line": 304, "column": 44 }, "end": { - "line": 310, + "line": 304, "column": 55 }, "identifierName": "inputObject" @@ -9400,15 +9099,15 @@ }, "property": { "type": "Identifier", - "start": 8783, - "end": 8791, + "start": 8684, + "end": 8692, "loc": { "start": { - "line": 310, + "line": 304, "column": 56 }, "end": { - "line": 310, + "line": 304, "column": 64 }, "identifierName": "compName" @@ -9425,15 +9124,15 @@ { "type": "CommentLine", "value": " Store strings of each component", - "start": 8692, - "end": 8726, + "start": 8593, + "end": 8627, "loc": { "start": { - "line": 309, + "line": 303, "column": 5 }, "end": { - "line": 309, + "line": 303, "column": 39 } } @@ -9447,15 +9146,15 @@ { "type": "CommentLine", "value": " Iterate through component names", - "start": 8612, - "end": 8646, + "start": 8513, + "end": 8547, "loc": { "start": { - "line": 307, + "line": 301, "column": 4 }, "end": { - "line": 307, + "line": 301, "column": 38 } } @@ -9464,87 +9163,87 @@ }, { "type": "ExpressionStatement", - "start": 8804, - "end": 8849, + "start": 8705, + "end": 8750, "loc": { "start": { - "line": 312, + "line": 306, "column": 4 }, "end": { - "line": 312, + "line": 306, "column": 49 } }, "expression": { "type": "AssignmentExpression", - "start": 8804, - "end": 8849, + "start": 8705, + "end": 8750, "loc": { "start": { - "line": 312, + "line": 306, "column": 4 }, "end": { - "line": 312, + "line": 306, "column": 49 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 8804, - "end": 8835, + "start": 8705, + "end": 8736, "loc": { "start": { - "line": 312, + "line": 306, "column": 4 }, "end": { - "line": 312, + "line": 306, "column": 35 } }, "object": { "type": "MemberExpression", - "start": 8804, - "end": 8824, + "start": 8705, + "end": 8725, "loc": { "start": { - "line": 312, + "line": 306, "column": 4 }, "end": { - "line": 312, + "line": 306, "column": 24 } }, "object": { "type": "ThisExpression", - "start": 8804, - "end": 8808, + "start": 8705, + "end": 8709, "loc": { "start": { - "line": 312, + "line": 306, "column": 4 }, "end": { - "line": 312, + "line": 306, "column": 8 } } }, "property": { "type": "Identifier", - "start": 8809, - "end": 8824, + "start": 8710, + "end": 8725, "loc": { "start": { - "line": 312, + "line": 306, "column": 9 }, "end": { - "line": 312, + "line": 306, "column": 24 }, "identifierName": "entityTemplates" @@ -9555,15 +9254,15 @@ }, "property": { "type": "Identifier", - "start": 8825, - "end": 8834, + "start": 8726, + "end": 8735, "loc": { "start": { - "line": 312, + "line": 306, "column": 25 }, "end": { - "line": 312, + "line": 306, "column": 34 }, "identifierName": "protoName" @@ -9574,15 +9273,15 @@ }, "right": { "type": "Identifier", - "start": 8838, - "end": 8849, + "start": 8739, + "end": 8750, "loc": { "start": { - "line": 312, + "line": 306, "column": 38 }, "end": { - "line": 312, + "line": 306, "column": 49 }, "identifierName": "protoObject" @@ -9593,29 +9292,29 @@ }, { "type": "ExpressionStatement", - "start": 8854, - "end": 8861, + "start": 8755, + "end": 8762, "loc": { "start": { - "line": 313, + "line": 307, "column": 4 }, "end": { - "line": 313, + "line": 307, "column": 11 } }, "expression": { "type": "UpdateExpression", - "start": 8854, - "end": 8861, + "start": 8755, + "end": 8762, "loc": { "start": { - "line": 313, + "line": 307, "column": 4 }, "end": { - "line": 313, + "line": 307, "column": 11 } }, @@ -9623,15 +9322,15 @@ "prefix": true, "argument": { "type": "Identifier", - "start": 8856, - "end": 8861, + "start": 8757, + "end": 8762, "loc": { "start": { - "line": 313, + "line": 307, "column": 6 }, "end": { - "line": 313, + "line": 307, "column": 11 }, "identifierName": "count" @@ -9650,15 +9349,15 @@ { "type": "CommentLine", "value": " Iterate through prototype names", - "start": 8477, - "end": 8511, + "start": 8378, + "end": 8412, "loc": { "start": { - "line": 303, + "line": 297, "column": 3 }, "end": { - "line": 303, + "line": 297, "column": 37 } } @@ -9673,15 +9372,15 @@ { "type": "CommentLine", "value": " Data must be an object at this point", - "start": 8400, - "end": 8439, + "start": 8301, + "end": 8340, "loc": { "start": { - "line": 301, + "line": 295, "column": 2 }, "end": { - "line": 301, + "line": 295, "column": 41 } } @@ -9690,29 +9389,29 @@ }, { "type": "ReturnStatement", - "start": 8874, - "end": 8886, + "start": 8775, + "end": 8787, "loc": { "start": { - "line": 317, + "line": 311, "column": 2 }, "end": { - "line": 317, + "line": 311, "column": 14 } }, "argument": { "type": "Identifier", - "start": 8881, - "end": 8886, + "start": 8782, + "end": 8787, "loc": { "start": { - "line": 317, + "line": 311, "column": 9 }, "end": { - "line": 317, + "line": 311, "column": 14 }, "identifierName": "count" @@ -9727,15 +9426,15 @@ { "type": "CommentBlock", "value": "*\n\t * Registers entity prototype(s). Any existing prototype names that are the same will be overwritten\n\t *\n\t * @example\n\t * world.prototype({\n\t * Movable: {\n\t * position: {},\n\t * velocity: {}\n\t * }\n\t * })\n\t *\n\t * @param {Object} data - Object structure to register as a prototype. Should be a dictionary with the top level keys\n\t * being the prototype names. Can also be a JSON formatted string.\n\t *\n\t * @return {number} Number of prototypes added.\n\t ", - "start": 7769, - "end": 8249, + "start": 7670, + "end": 8150, "loc": { "start": { - "line": 277, + "line": 271, "column": 1 }, "end": { - "line": 292, + "line": 286, "column": 4 } } @@ -9748,15 +9447,15 @@ { "type": "CommentBlock", "value": "*\n * Class for world.\n *\n * @class World (name)\n ", - "start": 307, - "end": 365, + "start": 206, + "end": 264, "loc": { "start": { - "line": 19, + "line": 10, "column": 0 }, "end": { - "line": 23, + "line": 14, "column": 3 } } @@ -9765,58 +9464,58 @@ }, { "type": "ExpressionStatement", - "start": 8893, - "end": 8914, + "start": 8794, + "end": 8815, "loc": { "start": { - "line": 321, + "line": 315, "column": 0 }, "end": { - "line": 321, + "line": 315, "column": 21 } }, "expression": { "type": "AssignmentExpression", - "start": 8893, - "end": 8914, + "start": 8794, + "end": 8815, "loc": { "start": { - "line": 321, + "line": 315, "column": 0 }, "end": { - "line": 321, + "line": 315, "column": 21 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 8893, - "end": 8906, + "start": 8794, + "end": 8807, "loc": { "start": { - "line": 321, + "line": 315, "column": 0 }, "end": { - "line": 321, + "line": 315, "column": 13 } }, "object": { "type": "Identifier", - "start": 8893, - "end": 8900, + "start": 8794, + "end": 8801, "loc": { "start": { - "line": 321, + "line": 315, "column": 0 }, "end": { - "line": 321, + "line": 315, "column": 7 }, "identifierName": "exports" @@ -9825,15 +9524,15 @@ }, "property": { "type": "Identifier", - "start": 8901, - "end": 8906, + "start": 8802, + "end": 8807, "loc": { "start": { - "line": 321, + "line": 315, "column": 8 }, "end": { - "line": 321, + "line": 315, "column": 13 }, "identifierName": "World" @@ -9844,15 +9543,15 @@ }, "right": { "type": "Identifier", - "start": 8909, - "end": 8914, + "start": 8810, + "end": 8815, "loc": { "start": { - "line": 321, + "line": 315, "column": 16 }, "end": { - "line": 321, + "line": 315, "column": 21 }, "identifierName": "World" @@ -9884,8 +9583,8 @@ { "type": "CommentBlock", "value": "* @ignore ", - "start": 61, - "end": 75, + "start": 73, + "end": 87, "loc": { "start": { "line": 4, @@ -9900,8 +9599,8 @@ { "type": "CommentBlock", "value": "* @ignore ", - "start": 119, - "end": 133, + "start": 131, + "end": 145, "loc": { "start": { "line": 7, @@ -9915,9 +9614,9 @@ }, { "type": "CommentBlock", - "value": "*\n * Determines if function.\n *\n * @ignore\n ", - "start": 194, - "end": 242, + "value": "*\n * Class for world.\n *\n * @class World (name)\n ", + "start": 206, + "end": 264, "loc": { "start": { "line": 10, @@ -9931,32 +9630,16 @@ }, { "type": "CommentBlock", - "value": "*\n * Class for world.\n *\n * @class World (name)\n ", - "start": 307, - "end": 365, + "value": "*\n\t * Constructs an instance of the world.\n\t ", + "start": 280, + "end": 329, "loc": { "start": { - "line": 19, - "column": 0 - }, - "end": { - "line": 23, - "column": 3 - } - } - }, - { - "type": "CommentBlock", - "value": "*\n\t * Constructs an instance of the world.\n\t ", - "start": 381, - "end": 430, - "loc": { - "start": { - "line": 25, + "line": 16, "column": 1 }, "end": { - "line": 27, + "line": 18, "column": 4 } } @@ -9964,47 +9647,47 @@ { "type": "CommentBlock", "value": "* @ignore ", - "start": 450, - "end": 464, + "start": 349, + "end": 363, "loc": { "start": { - "line": 29, + "line": 20, "column": 2 }, "end": { - "line": 29, + "line": 20, "column": 16 } } }, { "type": "CommentBlock", - "value": "* @ignore ", - "start": 487, - "end": 501, + "value": "*\n\t\t * Maps entity IDs to entities\n\t\t * @ignore\n\t\t ", + "start": 387, + "end": 442, "loc": { "start": { - "line": 31, + "line": 23, "column": 2 }, "end": { - "line": 31, - "column": 16 + "line": 26, + "column": 5 } } }, { "type": "CommentBlock", "value": "* @ignore ", - "start": 525, - "end": 539, + "start": 474, + "end": 488, "loc": { "start": { - "line": 33, + "line": 29, "column": 2 }, "end": { - "line": 33, + "line": 29, "column": 16 } } @@ -10012,15 +9695,15 @@ { "type": "CommentBlock", "value": "* @ignore ", - "start": 565, - "end": 579, + "start": 515, + "end": 529, "loc": { "start": { - "line": 35, + "line": 32, "column": 2 }, "end": { - "line": 35, + "line": 32, "column": 16 } } @@ -10028,15 +9711,15 @@ { "type": "CommentBlock", "value": "* @ignore ", - "start": 611, - "end": 625, + "start": 561, + "end": 575, "loc": { "start": { - "line": 38, + "line": 35, "column": 2 }, "end": { - "line": 38, + "line": 35, "column": 16 } } @@ -10044,15 +9727,15 @@ { "type": "CommentBlock", "value": "*\n\t\t * Maps entire queries to arrays of entities\n\t\t * @ignore\n\t\t ", - "start": 650, - "end": 719, + "start": 600, + "end": 669, "loc": { "start": { - "line": 41, + "line": 38, "column": 2 }, "end": { - "line": 44, + "line": 41, "column": 5 } } @@ -10060,15 +9743,15 @@ { "type": "CommentBlock", "value": "*\n\t * Removes all entities from the world.\n\t * Does not affect registered systems, components, or prototypes.\n\t *\n\t * @example\n\t * world.clear()\n\t ", - "start": 774, - "end": 925, + "start": 724, + "end": 875, "loc": { "start": { - "line": 48, + "line": 45, "column": 1 }, "end": { - "line": 54, + "line": 51, "column": 4 } } @@ -10076,15 +9759,15 @@ { "type": "CommentLine", "value": " Call onRemove on all components of all entities", - "start": 939, - "end": 989, + "start": 889, + "end": 939, "loc": { "start": { - "line": 56, + "line": 53, "column": 2 }, "end": { - "line": 56, + "line": 53, "column": 52 } } @@ -10092,15 +9775,15 @@ { "type": "CommentLine", "value": " Get component, and call onRemove if it exists as a function", - "start": 1118, - "end": 1180, + "start": 1040, + "end": 1102, "loc": { "start": { - "line": 60, + "line": 56, "column": 4 }, "end": { - "line": 60, + "line": 56, "column": 66 } } @@ -10108,15 +9791,15 @@ { "type": "CommentLine", "value": " Clear entities", - "start": 1314, - "end": 1331, + "start": 1196, + "end": 1213, "loc": { "start": { - "line": 68, + "line": 62, "column": 2 }, "end": { - "line": 68, + "line": 62, "column": 19 } } @@ -10124,15 +9807,15 @@ { "type": "CommentBlock", "value": "*\n\t * Registers a component type to the world. Components must be constructable. They are passed the entity first,\n\t * then the rest of the arguments from methods like entity.set(). Components also can have an onRemove() method.\n\t *\n\t * @param {string} name - The name\n\t * @param {function} componentClass - The component class, must be a constructable class or function\n\t *\n\t * @example\n\t * world.component('myComponent', class {\n\t * constructor(entity, some, args) {\n\t * this.entity = entity\n\t * this.some = some\n\t * this.args = args\n\t * }\n\t * })\n\t * // entity === the new entity object\n\t * // some === 10\n\t * // args === 500\n\t * world.entity().set('myComponent', 10, 500)\n\t *\n\t * @return {string} Registered component name on success, undefined on failure\n\t ", - "start": 1392, - "end": 2201, + "start": 1281, + "end": 2090, "loc": { "start": { - "line": 73, + "line": 67, "column": 1 }, "end": { - "line": 94, + "line": 88, "column": 4 } } @@ -10140,15 +9823,15 @@ { "type": "CommentLine", "value": " Only allow functions and classes to be components", - "start": 2239, - "end": 2291, + "start": 2128, + "end": 2180, "loc": { "start": { - "line": 96, + "line": 90, "column": 2 }, "end": { - "line": 96, + "line": 90, "column": 54 } } @@ -10156,15 +9839,15 @@ { "type": "CommentBlock", "value": "*\n\t * Creates a new entity in the world\n\t *\n\t * @param {string} [name] - The prototype name to use\n\t *\n\t * @example\n\t * world.entity()\n\t *\n\t * @example\n\t * world.entity('Player')\n\t *\n\t * @return {Entity} The new entity created\n\t ", - "start": 2394, - "end": 2627, + "start": 2283, + "end": 2516, "loc": { "start": { - "line": 103, + "line": 97, "column": 1 }, "end": { - "line": 115, + "line": 109, "column": 4 } } @@ -10172,15 +9855,15 @@ { "type": "CommentLine", "value": " Use 'name' to get prototype data (if specified)", - "start": 2717, - "end": 2767, + "start": 2612, + "end": 2662, "loc": { "start": { - "line": 120, + "line": 114, "column": 2 }, "end": { - "line": 120, + "line": 114, "column": 52 } } @@ -10188,15 +9871,15 @@ { "type": "CommentLine", "value": " Add all components from prototype", - "start": 2817, - "end": 2853, + "start": 2712, + "end": 2748, "loc": { "start": { - "line": 122, + "line": 116, "column": 3 }, "end": { - "line": 122, + "line": 116, "column": 39 } } @@ -10204,15 +9887,15 @@ { "type": "CommentLine", "value": " Update component with data from template", - "start": 2944, - "end": 2987, + "start": 2839, + "end": 2882, "loc": { "start": { - "line": 125, + "line": 119, "column": 4 }, "end": { - "line": 125, + "line": 119, "column": 47 } } @@ -10220,15 +9903,15 @@ { "type": "CommentBlock", "value": "*\n\t * Registers a system to the world.\n\t * The order the systems get registered, is the order then run in.\n\t *\n\t * @example\n\t * // Movement system\n\t * world.system(['position', 'velocity'], class {\n\t * every(position, velocity, entity) {\n\t * position.x += velocity.x\n\t * position.y += velocity.y\n\t * }\n\t * })\n\t *\n\t * @param {Array} components - The list of components the system will process in every(). This follows the same logic as entity.has() and world.every().\n\t * @param {Function} systemClass - The system class to instantiate. Can contain the following methods: constructor, initialize,\n\t * pre, every, post. Pre() and post() get called before and after every(), for each of the independent systems. See world.run()\n\t * for an example of the call order.\n\t * @param {...Object} [args] - The arguments to forward to the system's constructors\n\t *\n\t * @return {number} Unique ID of the system on success or undefined on failure\n\t ", - "start": 3165, - "end": 4144, + "start": 3066, + "end": 4045, "loc": { "start": { - "line": 135, + "line": 129, "column": 1 }, "end": { - "line": 155, + "line": 149, "column": 4 } } @@ -10236,15 +9919,15 @@ { "type": "CommentLine", "value": " TODO: Make components optional, and parameters more dynamic by only using ...args", - "start": 4191, - "end": 4275, + "start": 4092, + "end": 4176, "loc": { "start": { - "line": 157, + "line": 151, "column": 2 }, "end": { - "line": 157, + "line": 151, "column": 86 } } @@ -10252,15 +9935,15 @@ { "type": "CommentLine", "value": " Create the system, and set the component array query", - "start": 4312, - "end": 4367, + "start": 4213, + "end": 4268, "loc": { "start": { - "line": 159, + "line": 153, "column": 3 }, "end": { - "line": 159, + "line": 153, "column": 58 } } @@ -10268,15 +9951,15 @@ { "type": "CommentLine", "value": " Add the system, return its ID", - "start": 4453, - "end": 4485, + "start": 4354, + "end": 4386, "loc": { "start": { - "line": 163, + "line": 157, "column": 3 }, "end": { - "line": 163, + "line": 157, "column": 35 } } @@ -10284,15 +9967,15 @@ { "type": "CommentBlock", "value": "*\n\t * Calls initialize() on all systems\n\t *\n\t * @example\n\t * world.initialize(renderContext)\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' initialize() methods\n\t ", - "start": 4557, - "end": 4754, + "start": 4458, + "end": 4655, "loc": { "start": { - "line": 169, + "line": 163, "column": 1 }, "end": { - "line": 176, + "line": 170, "column": 4 } } @@ -10300,15 +9983,15 @@ { "type": "CommentBlock", "value": "*\n\t * Calls pre(), every(), and post() on all systems\n\t *\n\t * @example\n\t * world.run(deltaTime)\n\t *\n\t * @example\n\t * // Example flow of method call order:\n\t * // Setup systems:\n\t * world.system([], systemA)\n\t * world.system([], systemB)\n\t * // During world.run():\n\t * // systemA.pre()\n\t * // systemA.every() * number of entities\n\t * // systemA.post()\n\t * // systemB.pre()\n\t * // systemB.every() * number of entities\n\t * // systemB.post()\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' methods\n\t ", - "start": 4865, - "end": 5394, + "start": 4766, + "end": 5295, "loc": { "start": { - "line": 183, + "line": 177, "column": 1 }, "end": { - "line": 203, + "line": 197, "column": 4 } } @@ -10316,15 +9999,15 @@ { "type": "CommentLine", "value": " Run the \"every\" method in the system", - "start": 5486, - "end": 5525, + "start": 5387, + "end": 5426, "loc": { "start": { - "line": 208, + "line": 202, "column": 3 }, "end": { - "line": 208, + "line": 202, "column": 42 } } @@ -10332,15 +10015,15 @@ { "type": "CommentBlock", "value": "*\n\t * Iterate through entities with the specified components\n\t *\n\t * @example\n\t * // Use a callback to process entities one-by-one\n\t * world.every(['comp'], comp => {comp.value = 0})\n\t *\n\t * @example\n\t * // Get an iterator for the entities\n\t * let it = world.every(['comp'])\n\t * for (let entity of it) {...}\n\t *\n\t * @param {Array} componentNames - The component names to match entites with. This checks if the entity\n\t * has ALL of the specified components, but does not check for additional components.\n\t * @param {Function} callback - The callback to call for each entity. Takes (...components, entity, ...args).\n\t * @param {...Object} [args] - Any additional arguments to pass to the callback.\n\t *\n\t * @return {MapIterator} An iterator to the entities themselves\n\t ", - "start": 5681, - "end": 6472, + "start": 5582, + "end": 6373, "loc": { "start": { - "line": 217, + "line": 211, "column": 1 }, "end": { - "line": 235, + "line": 229, "column": 4 } } @@ -10348,15 +10031,15 @@ { "type": "CommentLine", "value": " Get indexed map of entities", - "start": 6519, - "end": 6549, + "start": 6420, + "end": 6450, "loc": { "start": { - "line": 237, + "line": 231, "column": 2 }, "end": { - "line": 237, + "line": 231, "column": 32 } } @@ -10364,15 +10047,15 @@ { "type": "CommentLine", "value": " Go through the map of entities", - "start": 6634, - "end": 6667, + "start": 6535, + "end": 6568, "loc": { "start": { - "line": 241, + "line": 235, "column": 3 }, "end": { - "line": 241, + "line": 235, "column": 36 } } @@ -10380,15 +10063,15 @@ { "type": "CommentLine", "value": " At this point, we can safely assume that all components exist, even if entities/components", - "start": 6715, - "end": 6808, + "start": 6616, + "end": 6709, "loc": { "start": { - "line": 243, + "line": 237, "column": 4 }, "end": { - "line": 243, + "line": 237, "column": 97 } } @@ -10396,15 +10079,15 @@ { "type": "CommentLine", "value": " are deleted/modified during the loop, because JavaScript's MapIterator is smart enough.", - "start": 6813, - "end": 6903, + "start": 6714, + "end": 6804, "loc": { "start": { - "line": 244, + "line": 238, "column": 4 }, "end": { - "line": 244, + "line": 238, "column": 94 } } @@ -10412,15 +10095,15 @@ { "type": "CommentLine", "value": " Get all components as an array", - "start": 6909, - "end": 6942, + "start": 6810, + "end": 6843, "loc": { "start": { - "line": 246, + "line": 240, "column": 4 }, "end": { - "line": 246, + "line": 240, "column": 37 } } @@ -10428,15 +10111,15 @@ { "type": "CommentLine", "value": " Pass components, then the main entity, then any additional arguments", - "start": 7014, - "end": 7085, + "start": 6915, + "end": 6986, "loc": { "start": { - "line": 249, + "line": 243, "column": 4 }, "end": { - "line": 249, + "line": 243, "column": 75 } } @@ -10444,15 +10127,15 @@ { "type": "CommentLine", "value": " Stop the iteration when the callback returns false", - "start": 7149, - "end": 7202, + "start": 7050, + "end": 7103, "loc": { "start": { - "line": 252, + "line": 246, "column": 4 }, "end": { - "line": 252, + "line": 246, "column": 57 } } @@ -10460,15 +10143,15 @@ { "type": "CommentBlock", "value": "*\n\t * Returns an array of entities with matching components\n\t * Simplified version of every(), returns an actual array, and only takes component names as arguments.\n\t *\n\t * @example\n\t * world.get('player', 'sprite')\n\t *\n\t * @param {Array} componentNames - The component names to match on. See every() for how this matches.\n\t *\n\t * @return {Array} Array of entities, instead of iterator like every().\n\t ", - "start": 7290, - "end": 7696, + "start": 7191, + "end": 7597, "loc": { "start": { - "line": 262, + "line": 256, "column": 1 }, "end": { - "line": 272, + "line": 266, "column": 4 } } @@ -10476,15 +10159,15 @@ { "type": "CommentBlock", "value": "*\n\t * Registers entity prototype(s). Any existing prototype names that are the same will be overwritten\n\t *\n\t * @example\n\t * world.prototype({\n\t * Movable: {\n\t * position: {},\n\t * velocity: {}\n\t * }\n\t * })\n\t *\n\t * @param {Object} data - Object structure to register as a prototype. Should be a dictionary with the top level keys\n\t * being the prototype names. Can also be a JSON formatted string.\n\t *\n\t * @return {number} Number of prototypes added.\n\t ", - "start": 7769, - "end": 8249, + "start": 7670, + "end": 8150, "loc": { "start": { - "line": 277, + "line": 271, "column": 1 }, "end": { - "line": 292, + "line": 286, "column": 4 } } @@ -10492,15 +10175,15 @@ { "type": "CommentLine", "value": " Convert to an object when given a string", - "start": 8288, - "end": 8331, + "start": 8189, + "end": 8232, "loc": { "start": { - "line": 296, + "line": 290, "column": 2 }, "end": { - "line": 296, + "line": 290, "column": 45 } } @@ -10508,15 +10191,15 @@ { "type": "CommentLine", "value": " Data must be an object at this point", - "start": 8400, - "end": 8439, + "start": 8301, + "end": 8340, "loc": { "start": { - "line": 301, + "line": 295, "column": 2 }, "end": { - "line": 301, + "line": 295, "column": 41 } } @@ -10524,15 +10207,15 @@ { "type": "CommentLine", "value": " Iterate through prototype names", - "start": 8477, - "end": 8511, + "start": 8378, + "end": 8412, "loc": { "start": { - "line": 303, + "line": 297, "column": 3 }, "end": { - "line": 303, + "line": 297, "column": 37 } } @@ -10540,15 +10223,15 @@ { "type": "CommentLine", "value": " Iterate through component names", - "start": 8612, - "end": 8646, + "start": 8513, + "end": 8547, "loc": { "start": { - "line": 307, + "line": 301, "column": 4 }, "end": { - "line": 307, + "line": 301, "column": 38 } } @@ -10556,15 +10239,15 @@ { "type": "CommentLine", "value": " Store strings of each component", - "start": 8692, - "end": 8726, + "start": 8593, + "end": 8627, "loc": { "start": { - "line": 309, + "line": 303, "column": 5 }, "end": { - "line": 309, + "line": 303, "column": 39 } } @@ -10666,6 +10349,58 @@ } } }, + { + "type": { + "label": ",", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 29, + "end": 30, + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "isFunction", + "start": 31, + "end": 41, + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 26 + } + } + }, { "type": { "label": "}", @@ -10678,16 +10413,16 @@ "postfix": false, "binop": null }, - "start": 30, - "end": 31, + "start": 42, + "end": 43, "loc": { "start": { "line": 2, - "column": 15 + "column": 27 }, "end": { "line": 2, - "column": 16 + "column": 28 } } }, @@ -10705,16 +10440,16 @@ "updateContext": null }, "value": "=", - "start": 32, - "end": 33, + "start": 44, + "end": 45, "loc": { "start": { "line": 2, - "column": 17 + "column": 29 }, "end": { "line": 2, - "column": 18 + "column": 30 } } }, @@ -10731,16 +10466,16 @@ "binop": null }, "value": "require", - "start": 34, - "end": 41, + "start": 46, + "end": 53, "loc": { "start": { "line": 2, - "column": 19 + "column": 31 }, "end": { "line": 2, - "column": 26 + "column": 38 } } }, @@ -10756,16 +10491,16 @@ "postfix": false, "binop": null }, - "start": 41, - "end": 42, + "start": 53, + "end": 54, "loc": { "start": { "line": 2, - "column": 26 + "column": 38 }, "end": { "line": 2, - "column": 27 + "column": 39 } } }, @@ -10783,16 +10518,16 @@ "updateContext": null }, "value": "./utilities.js", - "start": 42, - "end": 58, + "start": 54, + "end": 70, "loc": { "start": { "line": 2, - "column": 27 + "column": 39 }, "end": { "line": 2, - "column": 43 + "column": 55 } } }, @@ -10808,24 +10543,24 @@ "postfix": false, "binop": null }, - "start": 58, - "end": 59, + "start": 70, + "end": 71, "loc": { "start": { "line": 2, - "column": 43 + "column": 55 }, "end": { "line": 2, - "column": 44 + "column": 56 } } }, { "type": "CommentBlock", "value": "* @ignore ", - "start": 61, - "end": 75, + "start": 73, + "end": 87, "loc": { "start": { "line": 4, @@ -10852,8 +10587,8 @@ "updateContext": null }, "value": "const", - "start": 76, - "end": 81, + "start": 88, + "end": 93, "loc": { "start": { "line": 5, @@ -10877,8 +10612,8 @@ "postfix": false, "binop": null }, - "start": 82, - "end": 83, + "start": 94, + "end": 95, "loc": { "start": { "line": 5, @@ -10903,8 +10638,8 @@ "binop": null }, "value": "Entity", - "start": 84, - "end": 90, + "start": 96, + "end": 102, "loc": { "start": { "line": 5, @@ -10928,8 +10663,8 @@ "postfix": false, "binop": null }, - "start": 91, - "end": 92, + "start": 103, + "end": 104, "loc": { "start": { "line": 5, @@ -10955,8 +10690,8 @@ "updateContext": null }, "value": "=", - "start": 93, - "end": 94, + "start": 105, + "end": 106, "loc": { "start": { "line": 5, @@ -10981,8 +10716,8 @@ "binop": null }, "value": "require", - "start": 95, - "end": 102, + "start": 107, + "end": 114, "loc": { "start": { "line": 5, @@ -11006,8 +10741,8 @@ "postfix": false, "binop": null }, - "start": 102, - "end": 103, + "start": 114, + "end": 115, "loc": { "start": { "line": 5, @@ -11033,8 +10768,8 @@ "updateContext": null }, "value": "./entity.js", - "start": 103, - "end": 116, + "start": 115, + "end": 128, "loc": { "start": { "line": 5, @@ -11058,8 +10793,8 @@ "postfix": false, "binop": null }, - "start": 116, - "end": 117, + "start": 128, + "end": 129, "loc": { "start": { "line": 5, @@ -11074,8 +10809,8 @@ { "type": "CommentBlock", "value": "* @ignore ", - "start": 119, - "end": 133, + "start": 131, + "end": 145, "loc": { "start": { "line": 7, @@ -11102,8 +10837,8 @@ "updateContext": null }, "value": "const", - "start": 134, - "end": 139, + "start": 146, + "end": 151, "loc": { "start": { "line": 8, @@ -11127,8 +10862,8 @@ "postfix": false, "binop": null }, - "start": 140, - "end": 141, + "start": 152, + "end": 153, "loc": { "start": { "line": 8, @@ -11153,8 +10888,8 @@ "binop": null }, "value": "ComponentIndex", - "start": 142, - "end": 156, + "start": 154, + "end": 168, "loc": { "start": { "line": 8, @@ -11178,8 +10913,8 @@ "postfix": false, "binop": null }, - "start": 157, - "end": 158, + "start": 169, + "end": 170, "loc": { "start": { "line": 8, @@ -11205,8 +10940,8 @@ "updateContext": null }, "value": "=", - "start": 159, - "end": 160, + "start": 171, + "end": 172, "loc": { "start": { "line": 8, @@ -11231,8 +10966,8 @@ "binop": null }, "value": "require", - "start": 161, - "end": 168, + "start": 173, + "end": 180, "loc": { "start": { "line": 8, @@ -11256,8 +10991,8 @@ "postfix": false, "binop": null }, - "start": 168, - "end": 169, + "start": 180, + "end": 181, "loc": { "start": { "line": 8, @@ -11283,8 +11018,8 @@ "updateContext": null }, "value": "./component_index.js", - "start": 169, - "end": 191, + "start": 181, + "end": 203, "loc": { "start": { "line": 8, @@ -11308,8 +11043,8 @@ "postfix": false, "binop": null }, - "start": 191, - "end": 192, + "start": 203, + "end": 204, "loc": { "start": { "line": 8, @@ -11323,9 +11058,9 @@ }, { "type": "CommentBlock", - "value": "*\n * Determines if function.\n *\n * @ignore\n ", - "start": 194, - "end": 242, + "value": "*\n * Class for world.\n *\n * @class World (name)\n ", + "start": 206, + "end": 264, "loc": { "start": { "line": 10, @@ -11339,20 +11074,21 @@ }, { "type": { - "label": "function", - "keyword": "function", + "label": "class", + "keyword": "class", "beforeExpr": false, - "startsExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "function", - "start": 243, - "end": 251, + "value": "class", + "start": 265, + "end": 270, "loc": { "start": { "line": 15, @@ -11360,7 +11096,7 @@ }, "end": { "line": 15, - "column": 8 + "column": 5 } } }, @@ -11376,23 +11112,23 @@ "postfix": false, "binop": null }, - "value": "isFunction", - "start": 252, - "end": 262, + "value": "World", + "start": 271, + "end": 276, "loc": { "start": { "line": 15, - "column": 9 + "column": 6 }, "end": { "line": 15, - "column": 19 + "column": 11 } } }, { "type": { - "label": "(", + "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, @@ -11402,710 +11138,32 @@ "postfix": false, "binop": null }, - "start": 262, - "end": 263, + "start": 277, + "end": 278, "loc": { "start": { "line": 15, - "column": 19 + "column": 12 }, "end": { "line": 15, - "column": 20 - } - } - }, - { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "obj", - "start": 263, - "end": 266, - "loc": { - "start": { - "line": 15, - "column": 20 - }, - "end": { - "line": 15, - "column": 23 - } - } - }, - { - "type": { - "label": ")", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 266, - "end": 267, - "loc": { - "start": { - "line": 15, - "column": 23 - }, - "end": { - "line": 15, - "column": 24 - } - } - }, - { - "type": { - "label": "{", - "beforeExpr": true, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 268, - "end": 269, - "loc": { - "start": { - "line": 15, - "column": 25 - }, - "end": { - "line": 15, - "column": 26 - } - } - }, - { - "type": { - "label": "return", - "keyword": "return", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "return", - "start": 271, - "end": 277, - "loc": { - "start": { - "line": 16, - "column": 1 - }, - "end": { - "line": 16, - "column": 7 - } - } - }, - { - "type": { - "label": "typeof", - "keyword": "typeof", - "beforeExpr": true, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": true, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "typeof", - "start": 278, - "end": 284, - "loc": { - "start": { - "line": 16, - "column": 8 - }, - "end": { - "line": 16, - "column": 14 - } - } - }, - { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "obj", - "start": 285, - "end": 288, - "loc": { - "start": { - "line": 16, - "column": 15 - }, - "end": { - "line": 16, - "column": 18 - } - } - }, - { - "type": { - "label": "==/!=", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": 6, - "updateContext": null - }, - "value": "===", - "start": 289, - "end": 292, - "loc": { - "start": { - "line": 16, - "column": 19 - }, - "end": { - "line": 16, - "column": 22 - } - } - }, - { - "type": { - "label": "string", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "function", - "start": 293, - "end": 303, - "loc": { - "start": { - "line": 16, - "column": 23 - }, - "end": { - "line": 16, - "column": 33 - } - } - }, - { - "type": { - "label": "}", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 304, - "end": 305, - "loc": { - "start": { - "line": 17, - "column": 0 - }, - "end": { - "line": 17, - "column": 1 - } - } - }, - { - "type": "CommentBlock", - "value": "*\n * Class for world.\n *\n * @class World (name)\n ", - "start": 307, - "end": 365, - "loc": { - "start": { - "line": 19, - "column": 0 - }, - "end": { - "line": 23, - "column": 3 - } - } - }, - { - "type": { - "label": "class", - "keyword": "class", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "class", - "start": 366, - "end": 371, - "loc": { - "start": { - "line": 24, - "column": 0 - }, - "end": { - "line": 24, - "column": 5 - } - } - }, - { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "World", - "start": 372, - "end": 377, - "loc": { - "start": { - "line": 24, - "column": 6 - }, - "end": { - "line": 24, - "column": 11 - } - } - }, - { - "type": { - "label": "{", - "beforeExpr": true, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 378, - "end": 379, - "loc": { - "start": { - "line": 24, - "column": 12 - }, - "end": { - "line": 24, - "column": 13 - } - } - }, - { - "type": "CommentBlock", - "value": "*\n\t * Constructs an instance of the world.\n\t ", - "start": 381, - "end": 430, - "loc": { - "start": { - "line": 25, - "column": 1 - }, - "end": { - "line": 27, - "column": 4 - } - } - }, - { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "constructor", - "start": 432, - "end": 443, - "loc": { - "start": { - "line": 28, - "column": 1 - }, - "end": { - "line": 28, - "column": 12 - } - } - }, - { - "type": { - "label": "(", - "beforeExpr": true, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 443, - "end": 444, - "loc": { - "start": { - "line": 28, - "column": 12 - }, - "end": { - "line": 28, - "column": 13 - } - } - }, - { - "type": { - "label": ")", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 444, - "end": 445, - "loc": { - "start": { - "line": 28, - "column": 13 - }, - "end": { - "line": 28, - "column": 14 - } - } - }, - { - "type": { - "label": "{", - "beforeExpr": true, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 446, - "end": 447, - "loc": { - "start": { - "line": 28, - "column": 15 - }, - "end": { - "line": 28, - "column": 16 - } - } - }, - { - "type": "CommentBlock", - "value": "* @ignore ", - "start": 450, - "end": 464, - "loc": { - "start": { - "line": 29, - "column": 2 - }, - "end": { - "line": 29, - "column": 16 - } - } - }, - { - "type": { - "label": "this", - "keyword": "this", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "this", - "start": 467, - "end": 471, - "loc": { - "start": { - "line": 30, - "column": 2 - }, - "end": { - "line": 30, - "column": 6 - } - } - }, - { - "type": { - "label": ".", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "start": 471, - "end": 472, - "loc": { - "start": { - "line": 30, - "column": 6 - }, - "end": { - "line": 30, - "column": 7 - } - } - }, - { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "systems", - "start": 472, - "end": 479, - "loc": { - "start": { - "line": 30, - "column": 7 - }, - "end": { - "line": 30, - "column": 14 - } - } - }, - { - "type": { - "label": "=", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": true, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "=", - "start": 480, - "end": 481, - "loc": { - "start": { - "line": 30, - "column": 15 - }, - "end": { - "line": 30, - "column": 16 - } - } - }, - { - "type": { - "label": "[", - "beforeExpr": true, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "start": 482, - "end": 483, - "loc": { - "start": { - "line": 30, - "column": 17 - }, - "end": { - "line": 30, - "column": 18 - } - } - }, - { - "type": { - "label": "]", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "start": 483, - "end": 484, - "loc": { - "start": { - "line": 30, - "column": 18 - }, - "end": { - "line": 30, - "column": 19 + "column": 13 } } }, { "type": "CommentBlock", - "value": "* @ignore ", - "start": 487, - "end": 501, - "loc": { - "start": { - "line": 31, - "column": 2 - }, - "end": { - "line": 31, - "column": 16 - } - } - }, - { - "type": { - "label": "this", - "keyword": "this", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "this", - "start": 504, - "end": 508, - "loc": { - "start": { - "line": 32, - "column": 2 - }, - "end": { - "line": 32, - "column": 6 - } - } - }, - { - "type": { - "label": ".", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "start": 508, - "end": 509, + "value": "*\n\t * Constructs an instance of the world.\n\t ", + "start": 280, + "end": 329, "loc": { - "start": { - "line": 32, - "column": 6 + "start": { + "line": 16, + "column": 1 }, "end": { - "line": 32, - "column": 7 + "line": 18, + "column": 4 } } }, @@ -12121,52 +11179,50 @@ "postfix": false, "binop": null }, - "value": "entities", - "start": 509, - "end": 517, + "value": "constructor", + "start": 331, + "end": 342, "loc": { "start": { - "line": 32, - "column": 7 + "line": 19, + "column": 1 }, "end": { - "line": 32, - "column": 15 + "line": 19, + "column": 12 } } }, { "type": { - "label": "=", + "label": "(", "beforeExpr": true, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, - "isAssign": true, + "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "=", - "start": 518, - "end": 519, + "start": 342, + "end": 343, "loc": { "start": { - "line": 32, - "column": 16 + "line": 19, + "column": 12 }, "end": { - "line": 32, - "column": 17 + "line": 19, + "column": 13 } } }, { "type": { - "label": "{", - "beforeExpr": true, - "startsExpr": true, + "label": ")", + "beforeExpr": false, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -12174,24 +11230,24 @@ "postfix": false, "binop": null }, - "start": 520, - "end": 521, + "start": 343, + "end": 344, "loc": { "start": { - "line": 32, - "column": 18 + "line": 19, + "column": 13 }, "end": { - "line": 32, - "column": 19 + "line": 19, + "column": 14 } } }, { "type": { - "label": "}", - "beforeExpr": false, - "startsExpr": false, + "label": "{", + "beforeExpr": true, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -12199,31 +11255,31 @@ "postfix": false, "binop": null }, - "start": 521, - "end": 522, + "start": 345, + "end": 346, "loc": { "start": { - "line": 32, - "column": 19 + "line": 19, + "column": 15 }, "end": { - "line": 32, - "column": 20 + "line": 19, + "column": 16 } } }, { "type": "CommentBlock", "value": "* @ignore ", - "start": 525, - "end": 539, + "start": 349, + "end": 363, "loc": { "start": { - "line": 33, + "line": 20, "column": 2 }, "end": { - "line": 33, + "line": 20, "column": 16 } } @@ -12243,15 +11299,15 @@ "updateContext": null }, "value": "this", - "start": 542, - "end": 546, + "start": 366, + "end": 370, "loc": { "start": { - "line": 34, + "line": 21, "column": 2 }, "end": { - "line": 34, + "line": 21, "column": 6 } } @@ -12269,15 +11325,15 @@ "binop": null, "updateContext": null }, - "start": 546, - "end": 547, + "start": 370, + "end": 371, "loc": { "start": { - "line": 34, + "line": 21, "column": 6 }, "end": { - "line": 34, + "line": 21, "column": 7 } } @@ -12294,17 +11350,17 @@ "postfix": false, "binop": null }, - "value": "components", - "start": 547, - "end": 557, + "value": "systems", + "start": 371, + "end": 378, "loc": { "start": { - "line": 34, + "line": 21, "column": 7 }, "end": { - "line": 34, - "column": 17 + "line": 21, + "column": 14 } } }, @@ -12322,22 +11378,22 @@ "updateContext": null }, "value": "=", - "start": 558, - "end": 559, + "start": 379, + "end": 380, "loc": { "start": { - "line": 34, - "column": 18 + "line": 21, + "column": 15 }, "end": { - "line": 34, - "column": 19 + "line": 21, + "column": 16 } } }, { "type": { - "label": "{", + "label": "[", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, @@ -12345,24 +11401,25 @@ "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "start": 560, - "end": 561, + "start": 381, + "end": 382, "loc": { "start": { - "line": 34, - "column": 20 + "line": 21, + "column": 17 }, "end": { - "line": 34, - "column": 21 + "line": 21, + "column": 18 } } }, { "type": { - "label": "}", + "label": "]", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, @@ -12370,34 +11427,35 @@ "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "start": 561, - "end": 562, + "start": 382, + "end": 383, "loc": { "start": { - "line": 34, - "column": 21 + "line": 21, + "column": 18 }, "end": { - "line": 34, - "column": 22 + "line": 21, + "column": 19 } } }, { "type": "CommentBlock", - "value": "* @ignore ", - "start": 565, - "end": 579, + "value": "*\n\t\t * Maps entity IDs to entities\n\t\t * @ignore\n\t\t ", + "start": 387, + "end": 442, "loc": { "start": { - "line": 35, + "line": 23, "column": 2 }, "end": { - "line": 35, - "column": 16 + "line": 26, + "column": 5 } } }, @@ -12416,15 +11474,15 @@ "updateContext": null }, "value": "this", - "start": 582, - "end": 586, + "start": 445, + "end": 449, "loc": { "start": { - "line": 36, + "line": 27, "column": 2 }, "end": { - "line": 36, + "line": 27, "column": 6 } } @@ -12442,15 +11500,15 @@ "binop": null, "updateContext": null }, - "start": 586, - "end": 587, + "start": 449, + "end": 450, "loc": { "start": { - "line": 36, + "line": 27, "column": 6 }, "end": { - "line": 36, + "line": 27, "column": 7 } } @@ -12467,17 +11525,17 @@ "postfix": false, "binop": null }, - "value": "entityTemplates", - "start": 587, - "end": 602, + "value": "entities", + "start": 450, + "end": 458, "loc": { "start": { - "line": 36, + "line": 27, "column": 7 }, "end": { - "line": 36, - "column": 22 + "line": 27, + "column": 15 } } }, @@ -12495,22 +11553,23 @@ "updateContext": null }, "value": "=", - "start": 603, - "end": 604, + "start": 459, + "end": 460, "loc": { "start": { - "line": 36, - "column": 23 + "line": 27, + "column": 16 }, "end": { - "line": 36, - "column": 24 + "line": 27, + "column": 17 } } }, { "type": { - "label": "{", + "label": "new", + "keyword": "new", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, @@ -12518,24 +11577,77 @@ "isAssign": false, "prefix": false, "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "new", + "start": 461, + "end": 464, + "loc": { + "start": { + "line": 27, + "column": 18 + }, + "end": { + "line": 27, + "column": 21 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, "binop": null }, - "start": 605, - "end": 606, + "value": "Map", + "start": 465, + "end": 468, "loc": { "start": { - "line": 36, + "line": 27, + "column": 22 + }, + "end": { + "line": 27, + "column": 25 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 468, + "end": 469, + "loc": { + "start": { + "line": 27, "column": 25 }, "end": { - "line": 36, + "line": 27, "column": 26 } } }, { "type": { - "label": "}", + "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, @@ -12545,15 +11657,15 @@ "postfix": false, "binop": null }, - "start": 606, - "end": 607, + "start": 469, + "end": 470, "loc": { "start": { - "line": 36, + "line": 27, "column": 26 }, "end": { - "line": 36, + "line": 27, "column": 27 } } @@ -12561,15 +11673,15 @@ { "type": "CommentBlock", "value": "* @ignore ", - "start": 611, - "end": 625, + "start": 474, + "end": 488, "loc": { "start": { - "line": 38, + "line": 29, "column": 2 }, "end": { - "line": 38, + "line": 29, "column": 16 } } @@ -12589,15 +11701,15 @@ "updateContext": null }, "value": "this", - "start": 628, - "end": 632, + "start": 491, + "end": 495, "loc": { "start": { - "line": 39, + "line": 30, "column": 2 }, "end": { - "line": 39, + "line": 30, "column": 6 } } @@ -12615,15 +11727,15 @@ "binop": null, "updateContext": null }, - "start": 632, - "end": 633, + "start": 495, + "end": 496, "loc": { "start": { - "line": 39, + "line": 30, "column": 6 }, "end": { - "line": 39, + "line": 30, "column": 7 } } @@ -12640,17 +11752,17 @@ "postfix": false, "binop": null }, - "value": "idCounter", - "start": 633, - "end": 642, + "value": "components", + "start": 496, + "end": 506, "loc": { "start": { - "line": 39, + "line": 30, "column": 7 }, "end": { - "line": 39, - "column": 16 + "line": 30, + "column": 17 } } }, @@ -12668,59 +11780,82 @@ "updateContext": null }, "value": "=", - "start": 643, - "end": 644, + "start": 507, + "end": 508, "loc": { "start": { - "line": 39, - "column": 17 + "line": 30, + "column": 18 }, "end": { - "line": 39, - "column": 18 + "line": 30, + "column": 19 } } }, { "type": { - "label": "num", - "beforeExpr": false, + "label": "{", + "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": 1, - "start": 645, - "end": 646, + "start": 509, + "end": 510, "loc": { "start": { - "line": 39, - "column": 19 + "line": 30, + "column": 20 }, "end": { - "line": 39, - "column": 20 + "line": 30, + "column": 21 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 510, + "end": 511, + "loc": { + "start": { + "line": 30, + "column": 21 + }, + "end": { + "line": 30, + "column": 22 } } }, { "type": "CommentBlock", - "value": "*\n\t\t * Maps entire queries to arrays of entities\n\t\t * @ignore\n\t\t ", - "start": 650, - "end": 719, + "value": "* @ignore ", + "start": 515, + "end": 529, "loc": { "start": { - "line": 41, + "line": 32, "column": 2 }, "end": { - "line": 44, - "column": 5 + "line": 32, + "column": 16 } } }, @@ -12739,15 +11874,15 @@ "updateContext": null }, "value": "this", - "start": 722, - "end": 726, + "start": 532, + "end": 536, "loc": { "start": { - "line": 45, + "line": 33, "column": 2 }, "end": { - "line": 45, + "line": 33, "column": 6 } } @@ -12765,15 +11900,15 @@ "binop": null, "updateContext": null }, - "start": 726, - "end": 727, + "start": 536, + "end": 537, "loc": { "start": { - "line": 45, + "line": 33, "column": 6 }, "end": { - "line": 45, + "line": 33, "column": 7 } } @@ -12790,17 +11925,17 @@ "postfix": false, "binop": null }, - "value": "index", - "start": 727, - "end": 732, + "value": "entityTemplates", + "start": 537, + "end": 552, "loc": { "start": { - "line": 45, + "line": 33, "column": 7 }, "end": { - "line": 45, - "column": 12 + "line": 33, + "column": 22 } } }, @@ -12818,23 +11953,22 @@ "updateContext": null }, "value": "=", - "start": 733, - "end": 734, + "start": 553, + "end": 554, "loc": { "start": { - "line": 45, - "column": 13 + "line": 33, + "column": 23 }, "end": { - "line": 45, - "column": 14 + "line": 33, + "column": 24 } } }, { "type": { - "label": "new", - "keyword": "new", + "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, @@ -12842,28 +11976,26 @@ "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "new", - "start": 735, - "end": 738, + "start": 555, + "end": 556, "loc": { "start": { - "line": 45, - "column": 15 + "line": 33, + "column": 25 }, "end": { - "line": 45, - "column": 18 + "line": 33, + "column": 26 } } }, { "type": { - "label": "name", + "label": "}", "beforeExpr": false, - "startsExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -12871,42 +12003,32 @@ "postfix": false, "binop": null }, - "value": "ComponentIndex", - "start": 739, - "end": 753, + "start": 556, + "end": 557, "loc": { "start": { - "line": 45, - "column": 19 + "line": 33, + "column": 26 }, "end": { - "line": 45, - "column": 33 + "line": 33, + "column": 27 } } }, { - "type": { - "label": "(", - "beforeExpr": true, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 753, - "end": 754, + "type": "CommentBlock", + "value": "* @ignore ", + "start": 561, + "end": 575, "loc": { "start": { - "line": 45, - "column": 33 + "line": 35, + "column": 2 }, "end": { - "line": 45, - "column": 34 + "line": 35, + "column": 16 } } }, @@ -12925,16 +12047,16 @@ "updateContext": null }, "value": "this", - "start": 754, - "end": 758, + "start": 578, + "end": 582, "loc": { "start": { - "line": 45, - "column": 34 + "line": 36, + "column": 2 }, "end": { - "line": 45, - "column": 38 + "line": 36, + "column": 6 } } }, @@ -12951,16 +12073,16 @@ "binop": null, "updateContext": null }, - "start": 758, - "end": 759, + "start": 582, + "end": 583, "loc": { "start": { - "line": 45, - "column": 38 + "line": 36, + "column": 6 }, "end": { - "line": 45, - "column": 39 + "line": 36, + "column": 7 } } }, @@ -12976,89 +12098,94 @@ "postfix": false, "binop": null }, - "value": "entities", - "start": 759, - "end": 767, + "value": "idCounter", + "start": 583, + "end": 592, "loc": { "start": { - "line": 45, - "column": 39 + "line": 36, + "column": 7 }, "end": { - "line": 45, - "column": 47 + "line": 36, + "column": 16 } } }, { "type": { - "label": ")", - "beforeExpr": false, + "label": "=", + "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, - "isAssign": false, + "isAssign": true, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "start": 767, - "end": 768, + "value": "=", + "start": 593, + "end": 594, "loc": { "start": { - "line": 45, - "column": 47 + "line": 36, + "column": 17 }, "end": { - "line": 45, - "column": 48 + "line": 36, + "column": 18 } } }, { "type": { - "label": "}", + "label": "num", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "start": 770, - "end": 771, + "value": 1, + "start": 595, + "end": 596, "loc": { "start": { - "line": 46, - "column": 1 + "line": 36, + "column": 19 }, "end": { - "line": 46, - "column": 2 + "line": 36, + "column": 20 } } }, { "type": "CommentBlock", - "value": "*\n\t * Removes all entities from the world.\n\t * Does not affect registered systems, components, or prototypes.\n\t *\n\t * @example\n\t * world.clear()\n\t ", - "start": 774, - "end": 925, + "value": "*\n\t\t * Maps entire queries to arrays of entities\n\t\t * @ignore\n\t\t ", + "start": 600, + "end": 669, "loc": { "start": { - "line": 48, - "column": 1 + "line": 38, + "column": 2 }, "end": { - "line": 54, - "column": 4 + "line": 41, + "column": 5 } } }, { "type": { - "label": "name", + "label": "this", + "keyword": "this", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, @@ -13066,52 +12193,54 @@ "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "clear", - "start": 927, - "end": 932, + "value": "this", + "start": 672, + "end": 676, "loc": { "start": { - "line": 55, - "column": 1 + "line": 42, + "column": 2 }, "end": { - "line": 55, + "line": 42, "column": 6 } } }, { "type": { - "label": "(", - "beforeExpr": true, - "startsExpr": true, + "label": ".", + "beforeExpr": false, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "start": 932, - "end": 933, + "start": 676, + "end": 677, "loc": { "start": { - "line": 55, + "line": 42, "column": 6 }, "end": { - "line": 55, + "line": 42, "column": 7 } } }, { "type": { - "label": ")", + "label": "name", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -13119,119 +12248,53 @@ "postfix": false, "binop": null }, - "start": 933, - "end": 934, + "value": "index", + "start": 677, + "end": 682, "loc": { "start": { - "line": 55, + "line": 42, "column": 7 }, "end": { - "line": 55, - "column": 8 + "line": 42, + "column": 12 } } }, { "type": { - "label": "{", + "label": "=", "beforeExpr": true, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 935, - "end": 936, - "loc": { - "start": { - "line": 55, - "column": 9 - }, - "end": { - "line": 55, - "column": 10 - } - } - }, - { - "type": "CommentLine", - "value": " Call onRemove on all components of all entities", - "start": 939, - "end": 989, - "loc": { - "start": { - "line": 56, - "column": 2 - }, - "end": { - "line": 56, - "column": 52 - } - } - }, - { - "type": { - "label": "for", - "keyword": "for", - "beforeExpr": false, "startsExpr": false, "rightAssociative": false, - "isLoop": true, - "isAssign": false, + "isLoop": false, + "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, - "value": "for", - "start": 992, - "end": 995, + "value": "=", + "start": 683, + "end": 684, "loc": { "start": { - "line": 57, - "column": 2 + "line": 42, + "column": 13 }, "end": { - "line": 57, - "column": 5 + "line": 42, + "column": 14 } } }, { "type": { - "label": "(", + "label": "new", + "keyword": "new", "beforeExpr": true, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 996, - "end": 997, - "loc": { - "start": { - "line": 57, - "column": 6 - }, - "end": { - "line": 57, - "column": 7 - } - } - }, - { - "type": { - "label": "let", - "keyword": "let", - "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -13240,17 +12303,17 @@ "binop": null, "updateContext": null }, - "value": "let", - "start": 997, - "end": 1000, + "value": "new", + "start": 685, + "end": 688, "loc": { "start": { - "line": 57, - "column": 7 + "line": 42, + "column": 15 }, "end": { - "line": 57, - "column": 10 + "line": 42, + "column": 18 } } }, @@ -13266,45 +12329,42 @@ "postfix": false, "binop": null }, - "value": "entityId", - "start": 1001, - "end": 1009, + "value": "ComponentIndex", + "start": 689, + "end": 703, "loc": { "start": { - "line": 57, - "column": 11 + "line": 42, + "column": 19 }, "end": { - "line": 57, - "column": 19 + "line": 42, + "column": 33 } } }, { "type": { - "label": "in", - "keyword": "in", + "label": "(", "beforeExpr": true, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": 7, - "updateContext": null + "binop": null }, - "value": "in", - "start": 1010, - "end": 1012, + "start": 703, + "end": 704, "loc": { "start": { - "line": 57, - "column": 20 + "line": 42, + "column": 33 }, "end": { - "line": 57, - "column": 22 + "line": 42, + "column": 34 } } }, @@ -13323,16 +12383,16 @@ "updateContext": null }, "value": "this", - "start": 1013, - "end": 1017, + "start": 704, + "end": 708, "loc": { "start": { - "line": 57, - "column": 23 + "line": 42, + "column": 34 }, "end": { - "line": 57, - "column": 27 + "line": 42, + "column": 38 } } }, @@ -13349,16 +12409,16 @@ "binop": null, "updateContext": null }, - "start": 1017, - "end": 1018, + "start": 708, + "end": 709, "loc": { "start": { - "line": 57, - "column": 27 + "line": 42, + "column": 38 }, "end": { - "line": 57, - "column": 28 + "line": 42, + "column": 39 } } }, @@ -13375,16 +12435,16 @@ "binop": null }, "value": "entities", - "start": 1018, - "end": 1026, + "start": 709, + "end": 717, "loc": { "start": { - "line": 57, - "column": 28 + "line": 42, + "column": 39 }, "end": { - "line": 57, - "column": 36 + "line": 42, + "column": 47 } } }, @@ -13400,24 +12460,24 @@ "postfix": false, "binop": null }, - "start": 1026, - "end": 1027, + "start": 717, + "end": 718, "loc": { "start": { - "line": 57, - "column": 36 + "line": 42, + "column": 47 }, "end": { - "line": 57, - "column": 37 + "line": 42, + "column": 48 } } }, { "type": { - "label": "{", - "beforeExpr": true, - "startsExpr": true, + "label": "}", + "beforeExpr": false, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -13425,44 +12485,32 @@ "postfix": false, "binop": null }, - "start": 1028, - "end": 1029, + "start": 720, + "end": 721, "loc": { "start": { - "line": 57, - "column": 38 + "line": 43, + "column": 1 }, "end": { - "line": 57, - "column": 39 + "line": 43, + "column": 2 } } }, { - "type": { - "label": "let", - "keyword": "let", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "let", - "start": 1033, - "end": 1036, + "type": "CommentBlock", + "value": "*\n\t * Removes all entities from the world.\n\t * Does not affect registered systems, components, or prototypes.\n\t *\n\t * @example\n\t * world.clear()\n\t ", + "start": 724, + "end": 875, "loc": { "start": { - "line": 58, - "column": 3 + "line": 45, + "column": 1 }, "end": { - "line": 58, - "column": 6 + "line": 51, + "column": 4 } } }, @@ -13478,157 +12526,143 @@ "postfix": false, "binop": null }, - "value": "entity", - "start": 1037, - "end": 1043, + "value": "clear", + "start": 877, + "end": 882, "loc": { "start": { - "line": 58, - "column": 7 + "line": 52, + "column": 1 }, "end": { - "line": 58, - "column": 13 + "line": 52, + "column": 6 } } }, { "type": { - "label": "=", + "label": "(", "beforeExpr": true, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, - "isAssign": true, + "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "=", - "start": 1044, - "end": 1045, + "start": 882, + "end": 883, "loc": { "start": { - "line": 58, - "column": 14 + "line": 52, + "column": 6 }, "end": { - "line": 58, - "column": 15 + "line": 52, + "column": 7 } } }, { "type": { - "label": "this", - "keyword": "this", + "label": ")", "beforeExpr": false, - "startsExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "this", - "start": 1046, - "end": 1050, + "start": 883, + "end": 884, "loc": { "start": { - "line": 58, - "column": 16 + "line": 52, + "column": 7 }, "end": { - "line": 58, - "column": 20 + "line": 52, + "column": 8 } } }, { "type": { - "label": ".", - "beforeExpr": false, - "startsExpr": false, + "label": "{", + "beforeExpr": true, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "start": 1050, - "end": 1051, + "start": 885, + "end": 886, "loc": { "start": { - "line": 58, - "column": 20 + "line": 52, + "column": 9 }, "end": { - "line": 58, - "column": 21 + "line": 52, + "column": 10 } } }, { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "entities", - "start": 1051, - "end": 1059, + "type": "CommentLine", + "value": " Call onRemove on all components of all entities", + "start": 889, + "end": 939, "loc": { "start": { - "line": 58, - "column": 21 + "line": 53, + "column": 2 }, "end": { - "line": 58, - "column": 29 + "line": 53, + "column": 52 } } }, { "type": { - "label": "[", - "beforeExpr": true, - "startsExpr": true, + "label": "for", + "keyword": "for", + "beforeExpr": false, + "startsExpr": false, "rightAssociative": false, - "isLoop": false, + "isLoop": true, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, - "start": 1059, - "end": 1060, + "value": "for", + "start": 942, + "end": 945, "loc": { "start": { - "line": 58, - "column": 29 + "line": 54, + "column": 2 }, "end": { - "line": 58, - "column": 30 + "line": 54, + "column": 5 } } }, { "type": { - "label": "name", - "beforeExpr": false, + "label": "(", + "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, @@ -13637,23 +12671,23 @@ "postfix": false, "binop": null }, - "value": "entityId", - "start": 1060, - "end": 1068, + "start": 946, + "end": 947, "loc": { "start": { - "line": 58, - "column": 30 + "line": 54, + "column": 6 }, "end": { - "line": 58, - "column": 38 + "line": 54, + "column": 7 } } }, { "type": { - "label": "]", + "label": "const", + "keyword": "const", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, @@ -13664,51 +12698,50 @@ "binop": null, "updateContext": null }, - "start": 1068, - "end": 1069, + "value": "const", + "start": 947, + "end": 952, "loc": { "start": { - "line": 58, - "column": 38 + "line": 54, + "column": 7 }, "end": { - "line": 58, - "column": 39 + "line": 54, + "column": 12 } } }, { "type": { - "label": "for", - "keyword": "for", - "beforeExpr": false, - "startsExpr": false, + "label": "[", + "beforeExpr": true, + "startsExpr": true, "rightAssociative": false, - "isLoop": true, + "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, - "value": "for", - "start": 1073, - "end": 1076, + "start": 953, + "end": 954, "loc": { "start": { - "line": 59, - "column": 3 + "line": 54, + "column": 13 }, "end": { - "line": 59, - "column": 6 + "line": 54, + "column": 14 } } }, { "type": { - "label": "(", - "beforeExpr": true, + "label": "name", + "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, @@ -13717,24 +12750,24 @@ "postfix": false, "binop": null }, - "start": 1077, - "end": 1078, + "value": "entityId", + "start": 954, + "end": 962, "loc": { "start": { - "line": 59, - "column": 7 + "line": 54, + "column": 14 }, "end": { - "line": 59, - "column": 8 + "line": 54, + "column": 22 } } }, { "type": { - "label": "let", - "keyword": "let", - "beforeExpr": false, + "label": ",", + "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, @@ -13744,17 +12777,16 @@ "binop": null, "updateContext": null }, - "value": "let", - "start": 1078, - "end": 1081, + "start": 962, + "end": 963, "loc": { "start": { - "line": 59, - "column": 8 + "line": 54, + "column": 22 }, "end": { - "line": 59, - "column": 11 + "line": 54, + "column": 23 } } }, @@ -13770,45 +12802,43 @@ "postfix": false, "binop": null }, - "value": "componentName", - "start": 1082, - "end": 1095, + "value": "entity", + "start": 964, + "end": 970, "loc": { "start": { - "line": 59, - "column": 12 + "line": 54, + "column": 24 }, "end": { - "line": 59, - "column": 25 + "line": 54, + "column": 30 } } }, { "type": { - "label": "in", - "keyword": "in", - "beforeExpr": true, + "label": "]", + "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": 7, + "binop": null, "updateContext": null }, - "value": "in", - "start": 1096, - "end": 1098, + "start": 970, + "end": 971, "loc": { "start": { - "line": 59, - "column": 26 + "line": 54, + "column": 30 }, "end": { - "line": 59, - "column": 28 + "line": 54, + "column": 31 } } }, @@ -13824,25 +12854,26 @@ "postfix": false, "binop": null }, - "value": "entity", - "start": 1099, - "end": 1105, + "value": "of", + "start": 972, + "end": 974, "loc": { "start": { - "line": 59, - "column": 29 + "line": 54, + "column": 32 }, "end": { - "line": 59, - "column": 35 + "line": 54, + "column": 34 } } }, { "type": { - "label": ".", + "label": "this", + "keyword": "this", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -13851,50 +12882,51 @@ "binop": null, "updateContext": null }, - "start": 1105, - "end": 1106, + "value": "this", + "start": 975, + "end": 979, "loc": { "start": { - "line": 59, + "line": 54, "column": 35 }, "end": { - "line": 59, - "column": 36 + "line": 54, + "column": 39 } } }, { "type": { - "label": "name", + "label": ".", "beforeExpr": false, - "startsExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "data", - "start": 1106, - "end": 1110, + "start": 979, + "end": 980, "loc": { "start": { - "line": 59, - "column": 36 + "line": 54, + "column": 39 }, "end": { - "line": 59, + "line": 54, "column": 40 } } }, { "type": { - "label": ")", + "label": "name", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -13902,24 +12934,25 @@ "postfix": false, "binop": null }, - "start": 1110, - "end": 1111, + "value": "entities", + "start": 980, + "end": 988, "loc": { "start": { - "line": 59, + "line": 54, "column": 40 }, "end": { - "line": 59, - "column": 41 + "line": 54, + "column": 48 } } }, { "type": { - "label": "{", - "beforeExpr": true, - "startsExpr": true, + "label": ")", + "beforeExpr": false, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -13927,67 +12960,76 @@ "postfix": false, "binop": null }, - "start": 1112, - "end": 1113, + "start": 988, + "end": 989, "loc": { "start": { - "line": 59, - "column": 42 + "line": 54, + "column": 48 }, "end": { - "line": 59, - "column": 43 + "line": 54, + "column": 49 } } }, { - "type": "CommentLine", - "value": " Get component, and call onRemove if it exists as a function", - "start": 1118, - "end": 1180, + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 990, + "end": 991, "loc": { "start": { - "line": 60, - "column": 4 + "line": 54, + "column": 50 }, "end": { - "line": 60, - "column": 66 + "line": 54, + "column": 51 } } }, { "type": { - "label": "let", - "keyword": "let", + "label": "for", + "keyword": "for", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, - "isLoop": false, + "isLoop": true, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, - "value": "let", - "start": 1185, - "end": 1188, + "value": "for", + "start": 995, + "end": 998, "loc": { "start": { - "line": 61, - "column": 4 + "line": 55, + "column": 3 }, "end": { - "line": 61, - "column": 7 + "line": 55, + "column": 6 } } }, { "type": { - "label": "name", - "beforeExpr": false, + "label": "(", + "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, @@ -13996,44 +13038,44 @@ "postfix": false, "binop": null }, - "value": "component", - "start": 1189, - "end": 1198, + "start": 999, + "end": 1000, "loc": { "start": { - "line": 61, - "column": 8 + "line": 55, + "column": 7 }, "end": { - "line": 61, - "column": 17 + "line": 55, + "column": 8 } } }, { "type": { - "label": "=", - "beforeExpr": true, + "label": "let", + "keyword": "let", + "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, - "isAssign": true, + "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, - "value": "=", - "start": 1199, - "end": 1200, + "value": "let", + "start": 1000, + "end": 1003, "loc": { "start": { - "line": 61, - "column": 18 + "line": 55, + "column": 8 }, "end": { - "line": 61, - "column": 19 + "line": 55, + "column": 11 } } }, @@ -14049,43 +13091,45 @@ "postfix": false, "binop": null }, - "value": "entity", - "start": 1201, - "end": 1207, + "value": "componentName", + "start": 1004, + "end": 1017, "loc": { "start": { - "line": 61, - "column": 20 + "line": 55, + "column": 12 }, "end": { - "line": 61, - "column": 26 + "line": 55, + "column": 25 } } }, { "type": { - "label": ".", - "beforeExpr": false, + "label": "in", + "keyword": "in", + "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null, + "binop": 7, "updateContext": null }, - "start": 1207, - "end": 1208, + "value": "in", + "start": 1018, + "end": 1020, "loc": { "start": { - "line": 61, + "line": 55, "column": 26 }, "end": { - "line": 61, - "column": 27 + "line": 55, + "column": 28 } } }, @@ -14101,25 +13145,25 @@ "postfix": false, "binop": null }, - "value": "data", - "start": 1208, - "end": 1212, + "value": "entity", + "start": 1021, + "end": 1027, "loc": { "start": { - "line": 61, - "column": 27 + "line": 55, + "column": 29 }, "end": { - "line": 61, - "column": 31 + "line": 55, + "column": 35 } } }, { "type": { - "label": "[", - "beforeExpr": true, - "startsExpr": true, + "label": ".", + "beforeExpr": false, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -14128,16 +13172,16 @@ "binop": null, "updateContext": null }, - "start": 1212, - "end": 1213, + "start": 1027, + "end": 1028, "loc": { "start": { - "line": 61, - "column": 31 + "line": 55, + "column": 35 }, "end": { - "line": 61, - "column": 32 + "line": 55, + "column": 36 } } }, @@ -14153,23 +13197,23 @@ "postfix": false, "binop": null }, - "value": "componentName", - "start": 1213, - "end": 1226, + "value": "data", + "start": 1028, + "end": 1032, "loc": { "start": { - "line": 61, - "column": 32 + "line": 55, + "column": 36 }, "end": { - "line": 61, - "column": 45 + "line": 55, + "column": 40 } } }, { "type": { - "label": "]", + "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, @@ -14177,72 +13221,87 @@ "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "start": 1226, - "end": 1227, + "start": 1032, + "end": 1033, "loc": { "start": { - "line": 61, - "column": 45 + "line": 55, + "column": 40 }, "end": { - "line": 61, - "column": 46 + "line": 55, + "column": 41 } } }, { "type": { - "label": "if", - "keyword": "if", - "beforeExpr": false, - "startsExpr": false, + "label": "{", + "beforeExpr": true, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "if", - "start": 1232, - "end": 1234, + "start": 1034, + "end": 1035, "loc": { "start": { - "line": 62, + "line": 55, + "column": 42 + }, + "end": { + "line": 55, + "column": 43 + } + } + }, + { + "type": "CommentLine", + "value": " Get component, and call onRemove if it exists as a function", + "start": 1040, + "end": 1102, + "loc": { + "start": { + "line": 56, "column": 4 }, "end": { - "line": 62, - "column": 6 + "line": 56, + "column": 66 } } }, { "type": { - "label": "(", - "beforeExpr": true, - "startsExpr": true, + "label": "let", + "keyword": "let", + "beforeExpr": false, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "start": 1235, - "end": 1236, + "value": "let", + "start": 1107, + "end": 1110, "loc": { "start": { - "line": 62, - "column": 7 + "line": 57, + "column": 4 }, "end": { - "line": 62, - "column": 8 + "line": 57, + "column": 7 } } }, @@ -14258,41 +13317,43 @@ "postfix": false, "binop": null }, - "value": "isFunction", - "start": 1236, - "end": 1246, + "value": "component", + "start": 1111, + "end": 1120, "loc": { "start": { - "line": 62, + "line": 57, "column": 8 }, "end": { - "line": 62, - "column": 18 + "line": 57, + "column": 17 } } }, { "type": { - "label": "(", + "label": "=", "beforeExpr": true, - "startsExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, - "isAssign": false, + "isAssign": true, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "start": 1246, - "end": 1247, + "value": "=", + "start": 1121, + "end": 1122, "loc": { "start": { - "line": 62, + "line": 57, "column": 18 }, "end": { - "line": 62, + "line": 57, "column": 19 } } @@ -14309,17 +13370,17 @@ "postfix": false, "binop": null }, - "value": "component", - "start": 1247, - "end": 1256, + "value": "entity", + "start": 1123, + "end": 1129, "loc": { "start": { - "line": 62, - "column": 19 + "line": 57, + "column": 20 }, "end": { - "line": 62, - "column": 28 + "line": 57, + "column": 26 } } }, @@ -14336,16 +13397,16 @@ "binop": null, "updateContext": null }, - "start": 1256, - "end": 1257, + "start": 1129, + "end": 1130, "loc": { "start": { - "line": 62, - "column": 28 + "line": 57, + "column": 26 }, "end": { - "line": 62, - "column": 29 + "line": 57, + "column": 27 } } }, @@ -14361,50 +13422,51 @@ "postfix": false, "binop": null }, - "value": "onRemove", - "start": 1257, - "end": 1265, + "value": "data", + "start": 1130, + "end": 1134, "loc": { "start": { - "line": 62, - "column": 29 + "line": 57, + "column": 27 }, "end": { - "line": 62, - "column": 37 + "line": 57, + "column": 31 } } }, { "type": { - "label": ")", - "beforeExpr": false, - "startsExpr": false, + "label": "[", + "beforeExpr": true, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "start": 1265, - "end": 1266, + "start": 1134, + "end": 1135, "loc": { "start": { - "line": 62, - "column": 37 + "line": 57, + "column": 31 }, "end": { - "line": 62, - "column": 38 + "line": 57, + "column": 32 } } }, { "type": { - "label": ")", + "label": "name", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -14412,41 +13474,43 @@ "postfix": false, "binop": null }, - "start": 1266, - "end": 1267, + "value": "componentName", + "start": 1135, + "end": 1148, "loc": { "start": { - "line": 62, - "column": 38 + "line": 57, + "column": 32 }, "end": { - "line": 62, - "column": 39 + "line": 57, + "column": 45 } } }, { "type": { - "label": "{", - "beforeExpr": true, - "startsExpr": true, + "label": "]", + "beforeExpr": false, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "start": 1268, - "end": 1269, + "start": 1148, + "end": 1149, "loc": { "start": { - "line": 62, - "column": 40 + "line": 57, + "column": 45 }, "end": { - "line": 62, - "column": 41 + "line": 57, + "column": 46 } } }, @@ -14462,43 +13526,42 @@ "postfix": false, "binop": null }, - "value": "component", - "start": 1275, - "end": 1284, + "value": "invoke", + "start": 1154, + "end": 1160, "loc": { "start": { - "line": 63, - "column": 5 + "line": 58, + "column": 4 }, "end": { - "line": 63, - "column": 14 + "line": 58, + "column": 10 } } }, { "type": { - "label": ".", - "beforeExpr": false, - "startsExpr": false, + "label": "(", + "beforeExpr": true, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "start": 1284, - "end": 1285, + "start": 1160, + "end": 1161, "loc": { "start": { - "line": 63, - "column": 14 + "line": 58, + "column": 10 }, "end": { - "line": 63, - "column": 15 + "line": 58, + "column": 11 } } }, @@ -14514,73 +13577,76 @@ "postfix": false, "binop": null }, - "value": "onRemove", - "start": 1285, - "end": 1293, + "value": "component", + "start": 1161, + "end": 1170, "loc": { "start": { - "line": 63, - "column": 15 + "line": 58, + "column": 11 }, "end": { - "line": 63, - "column": 23 + "line": 58, + "column": 20 } } }, { "type": { - "label": "(", + "label": ",", "beforeExpr": true, - "startsExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "start": 1293, - "end": 1294, + "start": 1170, + "end": 1171, "loc": { "start": { - "line": 63, - "column": 23 + "line": 58, + "column": 20 }, "end": { - "line": 63, - "column": 24 + "line": 58, + "column": 21 } } }, { "type": { - "label": ")", + "label": "string", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "start": 1294, - "end": 1295, + "value": "onRemove", + "start": 1172, + "end": 1182, "loc": { "start": { - "line": 63, - "column": 24 + "line": 58, + "column": 22 }, "end": { - "line": 63, - "column": 25 + "line": 58, + "column": 32 } } }, { "type": { - "label": "}", + "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, @@ -14590,16 +13656,16 @@ "postfix": false, "binop": null }, - "start": 1300, - "end": 1301, + "start": 1182, + "end": 1183, "loc": { "start": { - "line": 64, - "column": 4 + "line": 58, + "column": 32 }, "end": { - "line": 64, - "column": 5 + "line": 58, + "column": 33 } } }, @@ -14615,15 +13681,15 @@ "postfix": false, "binop": null }, - "start": 1305, - "end": 1306, + "start": 1187, + "end": 1188, "loc": { "start": { - "line": 65, + "line": 59, "column": 3 }, "end": { - "line": 65, + "line": 59, "column": 4 } } @@ -14640,15 +13706,15 @@ "postfix": false, "binop": null }, - "start": 1309, - "end": 1310, + "start": 1191, + "end": 1192, "loc": { "start": { - "line": 66, + "line": 60, "column": 2 }, "end": { - "line": 66, + "line": 60, "column": 3 } } @@ -14656,15 +13722,15 @@ { "type": "CommentLine", "value": " Clear entities", - "start": 1314, - "end": 1331, + "start": 1196, + "end": 1213, "loc": { "start": { - "line": 68, + "line": 62, "column": 2 }, "end": { - "line": 68, + "line": 62, "column": 19 } } @@ -14684,15 +13750,15 @@ "updateContext": null }, "value": "this", - "start": 1334, - "end": 1338, + "start": 1216, + "end": 1220, "loc": { "start": { - "line": 69, + "line": 63, "column": 2 }, "end": { - "line": 69, + "line": 63, "column": 6 } } @@ -14710,75 +13776,129 @@ "binop": null, "updateContext": null }, - "start": 1338, - "end": 1339, + "start": 1220, + "end": 1221, "loc": { "start": { - "line": 69, + "line": 63, "column": 6 }, "end": { - "line": 69, - "column": 7 + "line": 63, + "column": 7 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "entities", + "start": 1221, + "end": 1229, + "loc": { + "start": { + "line": 63, + "column": 7 + }, + "end": { + "line": 63, + "column": 15 + } + } + }, + { + "type": { + "label": "=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": true, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "=", + "start": 1230, + "end": 1231, + "loc": { + "start": { + "line": 63, + "column": 16 + }, + "end": { + "line": 63, + "column": 17 } } }, { "type": { - "label": "name", - "beforeExpr": false, + "label": "new", + "keyword": "new", + "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "entities", - "start": 1339, - "end": 1347, + "value": "new", + "start": 1232, + "end": 1235, "loc": { "start": { - "line": 69, - "column": 7 + "line": 63, + "column": 18 }, "end": { - "line": 69, - "column": 15 + "line": 63, + "column": 21 } } }, { "type": { - "label": "=", - "beforeExpr": true, - "startsExpr": false, + "label": "name", + "beforeExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, - "isAssign": true, + "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "=", - "start": 1348, - "end": 1349, + "value": "Map", + "start": 1236, + "end": 1239, "loc": { "start": { - "line": 69, - "column": 16 + "line": 63, + "column": 22 }, "end": { - "line": 69, - "column": 17 + "line": 63, + "column": 25 } } }, { "type": { - "label": "{", + "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, @@ -14788,22 +13908,22 @@ "postfix": false, "binop": null }, - "start": 1350, - "end": 1351, + "start": 1239, + "end": 1240, "loc": { "start": { - "line": 69, - "column": 18 + "line": 63, + "column": 25 }, "end": { - "line": 69, - "column": 19 + "line": 63, + "column": 26 } } }, { "type": { - "label": "}", + "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, @@ -14813,16 +13933,16 @@ "postfix": false, "binop": null }, - "start": 1351, - "end": 1352, + "start": 1240, + "end": 1241, "loc": { "start": { - "line": 69, - "column": 19 + "line": 63, + "column": 26 }, "end": { - "line": 69, - "column": 20 + "line": 63, + "column": 27 } } }, @@ -14841,15 +13961,15 @@ "updateContext": null }, "value": "this", - "start": 1355, - "end": 1359, + "start": 1244, + "end": 1248, "loc": { "start": { - "line": 70, + "line": 64, "column": 2 }, "end": { - "line": 70, + "line": 64, "column": 6 } } @@ -14867,15 +13987,15 @@ "binop": null, "updateContext": null }, - "start": 1359, - "end": 1360, + "start": 1248, + "end": 1249, "loc": { "start": { - "line": 70, + "line": 64, "column": 6 }, "end": { - "line": 70, + "line": 64, "column": 7 } } @@ -14893,15 +14013,15 @@ "binop": null }, "value": "index", - "start": 1360, - "end": 1365, + "start": 1249, + "end": 1254, "loc": { "start": { - "line": 70, + "line": 64, "column": 7 }, "end": { - "line": 70, + "line": 64, "column": 12 } } @@ -14919,15 +14039,15 @@ "binop": null, "updateContext": null }, - "start": 1365, - "end": 1366, + "start": 1254, + "end": 1255, "loc": { "start": { - "line": 70, + "line": 64, "column": 12 }, "end": { - "line": 70, + "line": 64, "column": 13 } } @@ -14945,15 +14065,15 @@ "binop": null }, "value": "clear", - "start": 1366, - "end": 1371, + "start": 1255, + "end": 1260, "loc": { "start": { - "line": 70, + "line": 64, "column": 13 }, "end": { - "line": 70, + "line": 64, "column": 18 } } @@ -14970,15 +14090,15 @@ "postfix": false, "binop": null }, - "start": 1371, - "end": 1372, + "start": 1260, + "end": 1261, "loc": { "start": { - "line": 70, + "line": 64, "column": 18 }, "end": { - "line": 70, + "line": 64, "column": 19 } } @@ -14998,15 +14118,15 @@ "updateContext": null }, "value": "this", - "start": 1372, - "end": 1376, + "start": 1261, + "end": 1265, "loc": { "start": { - "line": 70, + "line": 64, "column": 19 }, "end": { - "line": 70, + "line": 64, "column": 23 } } @@ -15024,15 +14144,15 @@ "binop": null, "updateContext": null }, - "start": 1376, - "end": 1377, + "start": 1265, + "end": 1266, "loc": { "start": { - "line": 70, + "line": 64, "column": 23 }, "end": { - "line": 70, + "line": 64, "column": 24 } } @@ -15050,15 +14170,15 @@ "binop": null }, "value": "entities", - "start": 1377, - "end": 1385, + "start": 1266, + "end": 1274, "loc": { "start": { - "line": 70, + "line": 64, "column": 24 }, "end": { - "line": 70, + "line": 64, "column": 32 } } @@ -15075,15 +14195,15 @@ "postfix": false, "binop": null }, - "start": 1385, - "end": 1386, + "start": 1274, + "end": 1275, "loc": { "start": { - "line": 70, + "line": 64, "column": 32 }, "end": { - "line": 70, + "line": 64, "column": 33 } } @@ -15100,15 +14220,15 @@ "postfix": false, "binop": null }, - "start": 1388, - "end": 1389, + "start": 1277, + "end": 1278, "loc": { "start": { - "line": 71, + "line": 65, "column": 1 }, "end": { - "line": 71, + "line": 65, "column": 2 } } @@ -15116,15 +14236,15 @@ { "type": "CommentBlock", "value": "*\n\t * Registers a component type to the world. Components must be constructable. They are passed the entity first,\n\t * then the rest of the arguments from methods like entity.set(). Components also can have an onRemove() method.\n\t *\n\t * @param {string} name - The name\n\t * @param {function} componentClass - The component class, must be a constructable class or function\n\t *\n\t * @example\n\t * world.component('myComponent', class {\n\t * constructor(entity, some, args) {\n\t * this.entity = entity\n\t * this.some = some\n\t * this.args = args\n\t * }\n\t * })\n\t * // entity === the new entity object\n\t * // some === 10\n\t * // args === 500\n\t * world.entity().set('myComponent', 10, 500)\n\t *\n\t * @return {string} Registered component name on success, undefined on failure\n\t ", - "start": 1392, - "end": 2201, + "start": 1281, + "end": 2090, "loc": { "start": { - "line": 73, + "line": 67, "column": 1 }, "end": { - "line": 94, + "line": 88, "column": 4 } } @@ -15142,15 +14262,15 @@ "binop": null }, "value": "component", - "start": 2203, - "end": 2212, + "start": 2092, + "end": 2101, "loc": { "start": { - "line": 95, + "line": 89, "column": 1 }, "end": { - "line": 95, + "line": 89, "column": 10 } } @@ -15167,15 +14287,15 @@ "postfix": false, "binop": null }, - "start": 2212, - "end": 2213, + "start": 2101, + "end": 2102, "loc": { "start": { - "line": 95, + "line": 89, "column": 10 }, "end": { - "line": 95, + "line": 89, "column": 11 } } @@ -15193,15 +14313,15 @@ "binop": null }, "value": "name", - "start": 2213, - "end": 2217, + "start": 2102, + "end": 2106, "loc": { "start": { - "line": 95, + "line": 89, "column": 11 }, "end": { - "line": 95, + "line": 89, "column": 15 } } @@ -15219,15 +14339,15 @@ "binop": null, "updateContext": null }, - "start": 2217, - "end": 2218, + "start": 2106, + "end": 2107, "loc": { "start": { - "line": 95, + "line": 89, "column": 15 }, "end": { - "line": 95, + "line": 89, "column": 16 } } @@ -15245,15 +14365,15 @@ "binop": null }, "value": "componentClass", - "start": 2219, - "end": 2233, + "start": 2108, + "end": 2122, "loc": { "start": { - "line": 95, + "line": 89, "column": 17 }, "end": { - "line": 95, + "line": 89, "column": 31 } } @@ -15270,15 +14390,15 @@ "postfix": false, "binop": null }, - "start": 2233, - "end": 2234, + "start": 2122, + "end": 2123, "loc": { "start": { - "line": 95, + "line": 89, "column": 31 }, "end": { - "line": 95, + "line": 89, "column": 32 } } @@ -15295,15 +14415,15 @@ "postfix": false, "binop": null }, - "start": 2235, - "end": 2236, + "start": 2124, + "end": 2125, "loc": { "start": { - "line": 95, + "line": 89, "column": 33 }, "end": { - "line": 95, + "line": 89, "column": 34 } } @@ -15311,15 +14431,15 @@ { "type": "CommentLine", "value": " Only allow functions and classes to be components", - "start": 2239, - "end": 2291, + "start": 2128, + "end": 2180, "loc": { "start": { - "line": 96, + "line": 90, "column": 2 }, "end": { - "line": 96, + "line": 90, "column": 54 } } @@ -15339,15 +14459,15 @@ "updateContext": null }, "value": "if", - "start": 2294, - "end": 2296, + "start": 2183, + "end": 2185, "loc": { "start": { - "line": 97, + "line": 91, "column": 2 }, "end": { - "line": 97, + "line": 91, "column": 4 } } @@ -15364,15 +14484,15 @@ "postfix": false, "binop": null }, - "start": 2297, - "end": 2298, + "start": 2186, + "end": 2187, "loc": { "start": { - "line": 97, + "line": 91, "column": 5 }, "end": { - "line": 97, + "line": 91, "column": 6 } } @@ -15390,15 +14510,15 @@ "binop": null }, "value": "isFunction", - "start": 2298, - "end": 2308, + "start": 2187, + "end": 2197, "loc": { "start": { - "line": 97, + "line": 91, "column": 6 }, "end": { - "line": 97, + "line": 91, "column": 16 } } @@ -15415,15 +14535,15 @@ "postfix": false, "binop": null }, - "start": 2308, - "end": 2309, + "start": 2197, + "end": 2198, "loc": { "start": { - "line": 97, + "line": 91, "column": 16 }, "end": { - "line": 97, + "line": 91, "column": 17 } } @@ -15441,15 +14561,15 @@ "binop": null }, "value": "componentClass", - "start": 2309, - "end": 2323, + "start": 2198, + "end": 2212, "loc": { "start": { - "line": 97, + "line": 91, "column": 17 }, "end": { - "line": 97, + "line": 91, "column": 31 } } @@ -15466,15 +14586,15 @@ "postfix": false, "binop": null }, - "start": 2323, - "end": 2324, + "start": 2212, + "end": 2213, "loc": { "start": { - "line": 97, + "line": 91, "column": 31 }, "end": { - "line": 97, + "line": 91, "column": 32 } } @@ -15491,15 +14611,15 @@ "postfix": false, "binop": null }, - "start": 2324, - "end": 2325, + "start": 2213, + "end": 2214, "loc": { "start": { - "line": 97, + "line": 91, "column": 32 }, "end": { - "line": 97, + "line": 91, "column": 33 } } @@ -15516,15 +14636,15 @@ "postfix": false, "binop": null }, - "start": 2326, - "end": 2327, + "start": 2215, + "end": 2216, "loc": { "start": { - "line": 97, + "line": 91, "column": 34 }, "end": { - "line": 97, + "line": 91, "column": 35 } } @@ -15544,15 +14664,15 @@ "updateContext": null }, "value": "this", - "start": 2331, - "end": 2335, + "start": 2220, + "end": 2224, "loc": { "start": { - "line": 98, + "line": 92, "column": 3 }, "end": { - "line": 98, + "line": 92, "column": 7 } } @@ -15570,15 +14690,15 @@ "binop": null, "updateContext": null }, - "start": 2335, - "end": 2336, + "start": 2224, + "end": 2225, "loc": { "start": { - "line": 98, + "line": 92, "column": 7 }, "end": { - "line": 98, + "line": 92, "column": 8 } } @@ -15596,15 +14716,15 @@ "binop": null }, "value": "components", - "start": 2336, - "end": 2346, + "start": 2225, + "end": 2235, "loc": { "start": { - "line": 98, + "line": 92, "column": 8 }, "end": { - "line": 98, + "line": 92, "column": 18 } } @@ -15622,15 +14742,15 @@ "binop": null, "updateContext": null }, - "start": 2346, - "end": 2347, + "start": 2235, + "end": 2236, "loc": { "start": { - "line": 98, + "line": 92, "column": 18 }, "end": { - "line": 98, + "line": 92, "column": 19 } } @@ -15648,15 +14768,15 @@ "binop": null }, "value": "name", - "start": 2347, - "end": 2351, + "start": 2236, + "end": 2240, "loc": { "start": { - "line": 98, + "line": 92, "column": 19 }, "end": { - "line": 98, + "line": 92, "column": 23 } } @@ -15674,15 +14794,15 @@ "binop": null, "updateContext": null }, - "start": 2351, - "end": 2352, + "start": 2240, + "end": 2241, "loc": { "start": { - "line": 98, + "line": 92, "column": 23 }, "end": { - "line": 98, + "line": 92, "column": 24 } } @@ -15701,15 +14821,15 @@ "updateContext": null }, "value": "=", - "start": 2353, - "end": 2354, + "start": 2242, + "end": 2243, "loc": { "start": { - "line": 98, + "line": 92, "column": 25 }, "end": { - "line": 98, + "line": 92, "column": 26 } } @@ -15727,15 +14847,15 @@ "binop": null }, "value": "componentClass", - "start": 2355, - "end": 2369, + "start": 2244, + "end": 2258, "loc": { "start": { - "line": 98, + "line": 92, "column": 27 }, "end": { - "line": 98, + "line": 92, "column": 41 } } @@ -15755,15 +14875,15 @@ "updateContext": null }, "value": "return", - "start": 2373, - "end": 2379, + "start": 2262, + "end": 2268, "loc": { "start": { - "line": 99, + "line": 93, "column": 3 }, "end": { - "line": 99, + "line": 93, "column": 9 } } @@ -15781,15 +14901,15 @@ "binop": null }, "value": "name", - "start": 2380, - "end": 2384, + "start": 2269, + "end": 2273, "loc": { "start": { - "line": 99, + "line": 93, "column": 10 }, "end": { - "line": 99, + "line": 93, "column": 14 } } @@ -15806,15 +14926,15 @@ "postfix": false, "binop": null }, - "start": 2387, - "end": 2388, + "start": 2276, + "end": 2277, "loc": { "start": { - "line": 100, + "line": 94, "column": 2 }, "end": { - "line": 100, + "line": 94, "column": 3 } } @@ -15831,15 +14951,15 @@ "postfix": false, "binop": null }, - "start": 2390, - "end": 2391, + "start": 2279, + "end": 2280, "loc": { "start": { - "line": 101, + "line": 95, "column": 1 }, "end": { - "line": 101, + "line": 95, "column": 2 } } @@ -15847,15 +14967,15 @@ { "type": "CommentBlock", "value": "*\n\t * Creates a new entity in the world\n\t *\n\t * @param {string} [name] - The prototype name to use\n\t *\n\t * @example\n\t * world.entity()\n\t *\n\t * @example\n\t * world.entity('Player')\n\t *\n\t * @return {Entity} The new entity created\n\t ", - "start": 2394, - "end": 2627, + "start": 2283, + "end": 2516, "loc": { "start": { - "line": 103, + "line": 97, "column": 1 }, "end": { - "line": 115, + "line": 109, "column": 4 } } @@ -15873,15 +14993,15 @@ "binop": null }, "value": "entity", - "start": 2629, - "end": 2635, + "start": 2518, + "end": 2524, "loc": { "start": { - "line": 116, + "line": 110, "column": 1 }, "end": { - "line": 116, + "line": 110, "column": 7 } } @@ -15898,15 +15018,15 @@ "postfix": false, "binop": null }, - "start": 2635, - "end": 2636, + "start": 2524, + "end": 2525, "loc": { "start": { - "line": 116, + "line": 110, "column": 7 }, "end": { - "line": 116, + "line": 110, "column": 8 } } @@ -15924,15 +15044,15 @@ "binop": null }, "value": "name", - "start": 2636, - "end": 2640, + "start": 2525, + "end": 2529, "loc": { "start": { - "line": 116, + "line": 110, "column": 8 }, "end": { - "line": 116, + "line": 110, "column": 12 } } @@ -15949,15 +15069,15 @@ "postfix": false, "binop": null }, - "start": 2640, - "end": 2641, + "start": 2529, + "end": 2530, "loc": { "start": { - "line": 116, + "line": 110, "column": 12 }, "end": { - "line": 116, + "line": 110, "column": 13 } } @@ -15974,15 +15094,15 @@ "postfix": false, "binop": null }, - "start": 2642, - "end": 2643, + "start": 2531, + "end": 2532, "loc": { "start": { - "line": 116, + "line": 110, "column": 14 }, "end": { - "line": 116, + "line": 110, "column": 15 } } @@ -16002,15 +15122,15 @@ "updateContext": null }, "value": "let", - "start": 2646, - "end": 2649, + "start": 2535, + "end": 2538, "loc": { "start": { - "line": 117, + "line": 111, "column": 2 }, "end": { - "line": 117, + "line": 111, "column": 5 } } @@ -16027,17 +15147,17 @@ "postfix": false, "binop": null }, - "value": "entId", - "start": 2650, - "end": 2655, + "value": "entityId", + "start": 2539, + "end": 2547, "loc": { "start": { - "line": 117, + "line": 111, "column": 6 }, "end": { - "line": 117, - "column": 11 + "line": 111, + "column": 14 } } }, @@ -16055,16 +15175,16 @@ "updateContext": null }, "value": "=", - "start": 2656, - "end": 2657, + "start": 2548, + "end": 2549, "loc": { "start": { - "line": 117, - "column": 12 + "line": 111, + "column": 15 }, "end": { - "line": 117, - "column": 13 + "line": 111, + "column": 16 } } }, @@ -16083,16 +15203,16 @@ "updateContext": null }, "value": "this", - "start": 2658, - "end": 2662, + "start": 2550, + "end": 2554, "loc": { "start": { - "line": 117, - "column": 14 + "line": 111, + "column": 17 }, "end": { - "line": 117, - "column": 18 + "line": 111, + "column": 21 } } }, @@ -16109,16 +15229,16 @@ "binop": null, "updateContext": null }, - "start": 2662, - "end": 2663, + "start": 2554, + "end": 2555, "loc": { "start": { - "line": 117, - "column": 18 + "line": 111, + "column": 21 }, "end": { - "line": 117, - "column": 19 + "line": 111, + "column": 22 } } }, @@ -16135,16 +15255,16 @@ "binop": null }, "value": "idCounter", - "start": 2663, - "end": 2672, + "start": 2555, + "end": 2564, "loc": { "start": { - "line": 117, - "column": 19 + "line": 111, + "column": 22 }, "end": { - "line": 117, - "column": 28 + "line": 111, + "column": 31 } } }, @@ -16161,16 +15281,16 @@ "binop": null }, "value": "++", - "start": 2672, - "end": 2674, + "start": 2564, + "end": 2566, "loc": { "start": { - "line": 117, - "column": 28 + "line": 111, + "column": 31 }, "end": { - "line": 117, - "column": 30 + "line": 111, + "column": 33 } } }, @@ -16189,15 +15309,15 @@ "updateContext": null }, "value": "let", - "start": 2677, - "end": 2680, + "start": 2569, + "end": 2572, "loc": { "start": { - "line": 118, + "line": 112, "column": 2 }, "end": { - "line": 118, + "line": 112, "column": 5 } } @@ -16215,15 +15335,15 @@ "binop": null }, "value": "entity", - "start": 2681, - "end": 2687, + "start": 2573, + "end": 2579, "loc": { "start": { - "line": 118, + "line": 112, "column": 6 }, "end": { - "line": 118, + "line": 112, "column": 12 } } @@ -16242,15 +15362,15 @@ "updateContext": null }, "value": "=", - "start": 2688, - "end": 2689, + "start": 2580, + "end": 2581, "loc": { "start": { - "line": 118, + "line": 112, "column": 13 }, "end": { - "line": 118, + "line": 112, "column": 14 } } @@ -16270,15 +15390,15 @@ "updateContext": null }, "value": "new", - "start": 2690, - "end": 2693, + "start": 2582, + "end": 2585, "loc": { "start": { - "line": 118, + "line": 112, "column": 15 }, "end": { - "line": 118, + "line": 112, "column": 18 } } @@ -16296,15 +15416,15 @@ "binop": null }, "value": "Entity", - "start": 2694, - "end": 2700, + "start": 2586, + "end": 2592, "loc": { "start": { - "line": 118, + "line": 112, "column": 19 }, "end": { - "line": 118, + "line": 112, "column": 25 } } @@ -16321,15 +15441,15 @@ "postfix": false, "binop": null }, - "start": 2700, - "end": 2701, + "start": 2592, + "end": 2593, "loc": { "start": { - "line": 118, + "line": 112, "column": 25 }, "end": { - "line": 118, + "line": 112, "column": 26 } } @@ -16349,15 +15469,15 @@ "updateContext": null }, "value": "this", - "start": 2701, - "end": 2705, + "start": 2593, + "end": 2597, "loc": { "start": { - "line": 118, + "line": 112, "column": 26 }, "end": { - "line": 118, + "line": 112, "column": 30 } } @@ -16375,15 +15495,15 @@ "binop": null, "updateContext": null }, - "start": 2705, - "end": 2706, + "start": 2597, + "end": 2598, "loc": { "start": { - "line": 118, + "line": 112, "column": 30 }, "end": { - "line": 118, + "line": 112, "column": 31 } } @@ -16400,17 +15520,17 @@ "postfix": false, "binop": null }, - "value": "entId", - "start": 2707, - "end": 2712, + "value": "entityId", + "start": 2599, + "end": 2607, "loc": { "start": { - "line": 118, + "line": 112, "column": 32 }, "end": { - "line": 118, - "column": 37 + "line": 112, + "column": 40 } } }, @@ -16426,31 +15546,31 @@ "postfix": false, "binop": null }, - "start": 2712, - "end": 2713, + "start": 2607, + "end": 2608, "loc": { "start": { - "line": 118, - "column": 37 + "line": 112, + "column": 40 }, "end": { - "line": 118, - "column": 38 + "line": 112, + "column": 41 } } }, { "type": "CommentLine", "value": " Use 'name' to get prototype data (if specified)", - "start": 2717, - "end": 2767, + "start": 2612, + "end": 2662, "loc": { "start": { - "line": 120, + "line": 114, "column": 2 }, "end": { - "line": 120, + "line": 114, "column": 52 } } @@ -16470,15 +15590,15 @@ "updateContext": null }, "value": "if", - "start": 2770, - "end": 2772, + "start": 2665, + "end": 2667, "loc": { "start": { - "line": 121, + "line": 115, "column": 2 }, "end": { - "line": 121, + "line": 115, "column": 4 } } @@ -16495,15 +15615,15 @@ "postfix": false, "binop": null }, - "start": 2773, - "end": 2774, + "start": 2668, + "end": 2669, "loc": { "start": { - "line": 121, + "line": 115, "column": 5 }, "end": { - "line": 121, + "line": 115, "column": 6 } } @@ -16521,15 +15641,15 @@ "binop": null }, "value": "name", - "start": 2774, - "end": 2778, + "start": 2669, + "end": 2673, "loc": { "start": { - "line": 121, + "line": 115, "column": 6 }, "end": { - "line": 121, + "line": 115, "column": 10 } } @@ -16548,15 +15668,15 @@ "updateContext": null }, "value": "&&", - "start": 2779, - "end": 2781, + "start": 2674, + "end": 2676, "loc": { "start": { - "line": 121, + "line": 115, "column": 11 }, "end": { - "line": 121, + "line": 115, "column": 13 } } @@ -16574,15 +15694,15 @@ "binop": null }, "value": "name", - "start": 2782, - "end": 2786, + "start": 2677, + "end": 2681, "loc": { "start": { - "line": 121, + "line": 115, "column": 14 }, "end": { - "line": 121, + "line": 115, "column": 18 } } @@ -16602,15 +15722,15 @@ "updateContext": null }, "value": "in", - "start": 2787, - "end": 2789, + "start": 2682, + "end": 2684, "loc": { "start": { - "line": 121, + "line": 115, "column": 19 }, "end": { - "line": 121, + "line": 115, "column": 21 } } @@ -16630,15 +15750,15 @@ "updateContext": null }, "value": "this", - "start": 2790, - "end": 2794, + "start": 2685, + "end": 2689, "loc": { "start": { - "line": 121, + "line": 115, "column": 22 }, "end": { - "line": 121, + "line": 115, "column": 26 } } @@ -16656,15 +15776,15 @@ "binop": null, "updateContext": null }, - "start": 2794, - "end": 2795, + "start": 2689, + "end": 2690, "loc": { "start": { - "line": 121, + "line": 115, "column": 26 }, "end": { - "line": 121, + "line": 115, "column": 27 } } @@ -16682,15 +15802,15 @@ "binop": null }, "value": "entityTemplates", - "start": 2795, - "end": 2810, + "start": 2690, + "end": 2705, "loc": { "start": { - "line": 121, + "line": 115, "column": 27 }, "end": { - "line": 121, + "line": 115, "column": 42 } } @@ -16707,15 +15827,15 @@ "postfix": false, "binop": null }, - "start": 2810, - "end": 2811, + "start": 2705, + "end": 2706, "loc": { "start": { - "line": 121, + "line": 115, "column": 42 }, "end": { - "line": 121, + "line": 115, "column": 43 } } @@ -16732,15 +15852,15 @@ "postfix": false, "binop": null }, - "start": 2812, - "end": 2813, + "start": 2707, + "end": 2708, "loc": { "start": { - "line": 121, + "line": 115, "column": 44 }, "end": { - "line": 121, + "line": 115, "column": 45 } } @@ -16748,15 +15868,15 @@ { "type": "CommentLine", "value": " Add all components from prototype", - "start": 2817, - "end": 2853, + "start": 2712, + "end": 2748, "loc": { "start": { - "line": 122, + "line": 116, "column": 3 }, "end": { - "line": 122, + "line": 116, "column": 39 } } @@ -16776,15 +15896,15 @@ "updateContext": null }, "value": "let", - "start": 2857, - "end": 2860, + "start": 2752, + "end": 2755, "loc": { "start": { - "line": 123, + "line": 117, "column": 3 }, "end": { - "line": 123, + "line": 117, "column": 6 } } @@ -16802,15 +15922,15 @@ "binop": null }, "value": "template", - "start": 2861, - "end": 2869, + "start": 2756, + "end": 2764, "loc": { "start": { - "line": 123, + "line": 117, "column": 7 }, "end": { - "line": 123, + "line": 117, "column": 15 } } @@ -16829,15 +15949,15 @@ "updateContext": null }, "value": "=", - "start": 2870, - "end": 2871, + "start": 2765, + "end": 2766, "loc": { "start": { - "line": 123, + "line": 117, "column": 16 }, "end": { - "line": 123, + "line": 117, "column": 17 } } @@ -16857,15 +15977,15 @@ "updateContext": null }, "value": "this", - "start": 2872, - "end": 2876, + "start": 2767, + "end": 2771, "loc": { "start": { - "line": 123, + "line": 117, "column": 18 }, "end": { - "line": 123, + "line": 117, "column": 22 } } @@ -16883,15 +16003,15 @@ "binop": null, "updateContext": null }, - "start": 2876, - "end": 2877, + "start": 2771, + "end": 2772, "loc": { "start": { - "line": 123, + "line": 117, "column": 22 }, "end": { - "line": 123, + "line": 117, "column": 23 } } @@ -16909,15 +16029,15 @@ "binop": null }, "value": "entityTemplates", - "start": 2877, - "end": 2892, + "start": 2772, + "end": 2787, "loc": { "start": { - "line": 123, + "line": 117, "column": 23 }, "end": { - "line": 123, + "line": 117, "column": 38 } } @@ -16935,15 +16055,15 @@ "binop": null, "updateContext": null }, - "start": 2892, - "end": 2893, + "start": 2787, + "end": 2788, "loc": { "start": { - "line": 123, + "line": 117, "column": 38 }, "end": { - "line": 123, + "line": 117, "column": 39 } } @@ -16961,15 +16081,15 @@ "binop": null }, "value": "name", - "start": 2893, - "end": 2897, + "start": 2788, + "end": 2792, "loc": { "start": { - "line": 123, + "line": 117, "column": 39 }, "end": { - "line": 123, + "line": 117, "column": 43 } } @@ -16987,15 +16107,15 @@ "binop": null, "updateContext": null }, - "start": 2897, - "end": 2898, + "start": 2792, + "end": 2793, "loc": { "start": { - "line": 123, + "line": 117, "column": 43 }, "end": { - "line": 123, + "line": 117, "column": 44 } } @@ -17015,15 +16135,15 @@ "updateContext": null }, "value": "for", - "start": 2902, - "end": 2905, + "start": 2797, + "end": 2800, "loc": { "start": { - "line": 124, + "line": 118, "column": 3 }, "end": { - "line": 124, + "line": 118, "column": 6 } } @@ -17040,15 +16160,15 @@ "postfix": false, "binop": null }, - "start": 2906, - "end": 2907, + "start": 2801, + "end": 2802, "loc": { "start": { - "line": 124, + "line": 118, "column": 7 }, "end": { - "line": 124, + "line": 118, "column": 8 } } @@ -17068,15 +16188,15 @@ "updateContext": null }, "value": "let", - "start": 2907, - "end": 2910, + "start": 2802, + "end": 2805, "loc": { "start": { - "line": 124, + "line": 118, "column": 8 }, "end": { - "line": 124, + "line": 118, "column": 11 } } @@ -17094,15 +16214,15 @@ "binop": null }, "value": "componentName", - "start": 2911, - "end": 2924, + "start": 2806, + "end": 2819, "loc": { "start": { - "line": 124, + "line": 118, "column": 12 }, "end": { - "line": 124, + "line": 118, "column": 25 } } @@ -17122,15 +16242,15 @@ "updateContext": null }, "value": "in", - "start": 2925, - "end": 2927, + "start": 2820, + "end": 2822, "loc": { "start": { - "line": 124, + "line": 118, "column": 26 }, "end": { - "line": 124, + "line": 118, "column": 28 } } @@ -17148,15 +16268,15 @@ "binop": null }, "value": "template", - "start": 2928, - "end": 2936, + "start": 2823, + "end": 2831, "loc": { "start": { - "line": 124, + "line": 118, "column": 29 }, "end": { - "line": 124, + "line": 118, "column": 37 } } @@ -17173,15 +16293,15 @@ "postfix": false, "binop": null }, - "start": 2936, - "end": 2937, + "start": 2831, + "end": 2832, "loc": { "start": { - "line": 124, + "line": 118, "column": 37 }, "end": { - "line": 124, + "line": 118, "column": 38 } } @@ -17198,15 +16318,15 @@ "postfix": false, "binop": null }, - "start": 2938, - "end": 2939, + "start": 2833, + "end": 2834, "loc": { "start": { - "line": 124, + "line": 118, "column": 39 }, "end": { - "line": 124, + "line": 118, "column": 40 } } @@ -17214,15 +16334,15 @@ { "type": "CommentLine", "value": " Update component with data from template", - "start": 2944, - "end": 2987, + "start": 2839, + "end": 2882, "loc": { "start": { - "line": 125, + "line": 119, "column": 4 }, "end": { - "line": 125, + "line": 119, "column": 47 } } @@ -17242,15 +16362,15 @@ "updateContext": null }, "value": "let", - "start": 2992, - "end": 2995, + "start": 2887, + "end": 2890, "loc": { "start": { - "line": 126, + "line": 120, "column": 4 }, "end": { - "line": 126, + "line": 120, "column": 7 } } @@ -17268,15 +16388,15 @@ "binop": null }, "value": "newComponentData", - "start": 2996, - "end": 3012, + "start": 2891, + "end": 2907, "loc": { "start": { - "line": 126, + "line": 120, "column": 8 }, "end": { - "line": 126, + "line": 120, "column": 24 } } @@ -17295,15 +16415,15 @@ "updateContext": null }, "value": "=", - "start": 3013, - "end": 3014, + "start": 2908, + "end": 2909, "loc": { "start": { - "line": 126, + "line": 120, "column": 25 }, "end": { - "line": 126, + "line": 120, "column": 26 } } @@ -17321,15 +16441,15 @@ "binop": null }, "value": "JSON", - "start": 3015, - "end": 3019, + "start": 2910, + "end": 2914, "loc": { "start": { - "line": 126, + "line": 120, "column": 27 }, "end": { - "line": 126, + "line": 120, "column": 31 } } @@ -17347,15 +16467,15 @@ "binop": null, "updateContext": null }, - "start": 3019, - "end": 3020, + "start": 2914, + "end": 2915, "loc": { "start": { - "line": 126, + "line": 120, "column": 31 }, "end": { - "line": 126, + "line": 120, "column": 32 } } @@ -17373,15 +16493,15 @@ "binop": null }, "value": "parse", - "start": 3020, - "end": 3025, + "start": 2915, + "end": 2920, "loc": { "start": { - "line": 126, + "line": 120, "column": 32 }, "end": { - "line": 126, + "line": 120, "column": 37 } } @@ -17398,15 +16518,15 @@ "postfix": false, "binop": null }, - "start": 3025, - "end": 3026, + "start": 2920, + "end": 2921, "loc": { "start": { - "line": 126, + "line": 120, "column": 37 }, "end": { - "line": 126, + "line": 120, "column": 38 } } @@ -17424,15 +16544,15 @@ "binop": null }, "value": "template", - "start": 3026, - "end": 3034, + "start": 2921, + "end": 2929, "loc": { "start": { - "line": 126, + "line": 120, "column": 38 }, "end": { - "line": 126, + "line": 120, "column": 46 } } @@ -17450,15 +16570,15 @@ "binop": null, "updateContext": null }, - "start": 3034, - "end": 3035, + "start": 2929, + "end": 2930, "loc": { "start": { - "line": 126, + "line": 120, "column": 46 }, "end": { - "line": 126, + "line": 120, "column": 47 } } @@ -17476,15 +16596,15 @@ "binop": null }, "value": "componentName", - "start": 3035, - "end": 3048, + "start": 2930, + "end": 2943, "loc": { "start": { - "line": 126, + "line": 120, "column": 47 }, "end": { - "line": 126, + "line": 120, "column": 60 } } @@ -17502,15 +16622,15 @@ "binop": null, "updateContext": null }, - "start": 3048, - "end": 3049, + "start": 2943, + "end": 2944, "loc": { "start": { - "line": 126, + "line": 120, "column": 60 }, "end": { - "line": 126, + "line": 120, "column": 61 } } @@ -17527,15 +16647,15 @@ "postfix": false, "binop": null }, - "start": 3049, - "end": 3050, + "start": 2944, + "end": 2945, "loc": { "start": { - "line": 126, + "line": 120, "column": 61 }, "end": { - "line": 126, + "line": 120, "column": 62 } } @@ -17553,15 +16673,15 @@ "binop": null }, "value": "entity", - "start": 3055, - "end": 3061, + "start": 2950, + "end": 2956, "loc": { "start": { - "line": 127, + "line": 121, "column": 4 }, "end": { - "line": 127, + "line": 121, "column": 10 } } @@ -17579,15 +16699,15 @@ "binop": null, "updateContext": null }, - "start": 3061, - "end": 3062, + "start": 2956, + "end": 2957, "loc": { "start": { - "line": 127, + "line": 121, "column": 10 }, "end": { - "line": 127, + "line": 121, "column": 11 } } @@ -17605,15 +16725,15 @@ "binop": null }, "value": "update", - "start": 3062, - "end": 3068, + "start": 2957, + "end": 2963, "loc": { "start": { - "line": 127, + "line": 121, "column": 11 }, "end": { - "line": 127, + "line": 121, "column": 17 } } @@ -17630,15 +16750,15 @@ "postfix": false, "binop": null }, - "start": 3068, - "end": 3069, + "start": 2963, + "end": 2964, "loc": { "start": { - "line": 127, + "line": 121, "column": 17 }, "end": { - "line": 127, + "line": 121, "column": 18 } } @@ -17656,15 +16776,15 @@ "binop": null }, "value": "componentName", - "start": 3069, - "end": 3082, + "start": 2964, + "end": 2977, "loc": { "start": { - "line": 127, + "line": 121, "column": 18 }, "end": { - "line": 127, + "line": 121, "column": 31 } } @@ -17682,15 +16802,15 @@ "binop": null, "updateContext": null }, - "start": 3082, - "end": 3083, + "start": 2977, + "end": 2978, "loc": { "start": { - "line": 127, + "line": 121, "column": 31 }, "end": { - "line": 127, + "line": 121, "column": 32 } } @@ -17708,15 +16828,15 @@ "binop": null }, "value": "newComponentData", - "start": 3084, - "end": 3100, + "start": 2979, + "end": 2995, "loc": { "start": { - "line": 127, + "line": 121, "column": 33 }, "end": { - "line": 127, + "line": 121, "column": 49 } } @@ -17733,15 +16853,15 @@ "postfix": false, "binop": null }, - "start": 3100, - "end": 3101, + "start": 2995, + "end": 2996, "loc": { "start": { - "line": 127, + "line": 121, "column": 49 }, "end": { - "line": 127, + "line": 121, "column": 50 } } @@ -17758,15 +16878,15 @@ "postfix": false, "binop": null }, - "start": 3105, - "end": 3106, + "start": 3000, + "end": 3001, "loc": { "start": { - "line": 128, + "line": 122, "column": 3 }, "end": { - "line": 128, + "line": 122, "column": 4 } } @@ -17783,15 +16903,15 @@ "postfix": false, "binop": null }, - "start": 3109, - "end": 3110, + "start": 3004, + "end": 3005, "loc": { "start": { - "line": 129, + "line": 123, "column": 2 }, "end": { - "line": 129, + "line": 123, "column": 3 } } @@ -17811,15 +16931,15 @@ "updateContext": null }, "value": "this", - "start": 3114, - "end": 3118, + "start": 3009, + "end": 3013, "loc": { "start": { - "line": 131, + "line": 125, "column": 2 }, "end": { - "line": 131, + "line": 125, "column": 6 } } @@ -17837,15 +16957,15 @@ "binop": null, "updateContext": null }, - "start": 3118, - "end": 3119, + "start": 3013, + "end": 3014, "loc": { "start": { - "line": 131, + "line": 125, "column": 6 }, "end": { - "line": 131, + "line": 125, "column": 7 } } @@ -17863,24 +16983,24 @@ "binop": null }, "value": "entities", - "start": 3119, - "end": 3127, + "start": 3014, + "end": 3022, "loc": { "start": { - "line": 131, + "line": 125, "column": 7 }, "end": { - "line": 131, + "line": 125, "column": 15 } } }, { "type": { - "label": "[", - "beforeExpr": true, - "startsExpr": true, + "label": ".", + "beforeExpr": false, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -17889,15 +17009,15 @@ "binop": null, "updateContext": null }, - "start": 3127, - "end": 3128, + "start": 3022, + "end": 3023, "loc": { "start": { - "line": 131, + "line": 125, "column": 15 }, "end": { - "line": 131, + "line": 125, "column": 16 } } @@ -17914,24 +17034,75 @@ "postfix": false, "binop": null }, - "value": "entId", - "start": 3128, - "end": 3133, + "value": "set", + "start": 3023, + "end": 3026, "loc": { "start": { - "line": 131, + "line": 125, "column": 16 }, "end": { - "line": 131, - "column": 21 + "line": 125, + "column": 19 } } }, { "type": { - "label": "]", + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 3026, + "end": 3027, + "loc": { + "start": { + "line": 125, + "column": 19 + }, + "end": { + "line": 125, + "column": 20 + } + } + }, + { + "type": { + "label": "name", "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "entityId", + "start": 3027, + "end": 3035, + "loc": { + "start": { + "line": 125, + "column": 20 + }, + "end": { + "line": 125, + "column": 28 + } + } + }, + { + "type": { + "label": ",", + "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, @@ -17941,51 +17112,50 @@ "binop": null, "updateContext": null }, - "start": 3133, - "end": 3134, + "start": 3035, + "end": 3036, "loc": { "start": { - "line": 131, - "column": 21 + "line": 125, + "column": 28 }, "end": { - "line": 131, - "column": 22 + "line": 125, + "column": 29 } } }, { "type": { - "label": "=", - "beforeExpr": true, - "startsExpr": false, + "label": "name", + "beforeExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, - "isAssign": true, + "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "=", - "start": 3135, - "end": 3136, + "value": "entity", + "start": 3037, + "end": 3043, "loc": { "start": { - "line": 131, - "column": 23 + "line": 125, + "column": 30 }, "end": { - "line": 131, - "column": 24 + "line": 125, + "column": 36 } } }, { "type": { - "label": "name", + "label": ")", "beforeExpr": false, - "startsExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -17993,17 +17163,16 @@ "postfix": false, "binop": null }, - "value": "entity", - "start": 3137, - "end": 3143, + "start": 3043, + "end": 3044, "loc": { "start": { - "line": 131, - "column": 25 + "line": 125, + "column": 36 }, "end": { - "line": 131, - "column": 31 + "line": 125, + "column": 37 } } }, @@ -18022,15 +17191,15 @@ "updateContext": null }, "value": "return", - "start": 3146, - "end": 3152, + "start": 3047, + "end": 3053, "loc": { "start": { - "line": 132, + "line": 126, "column": 2 }, "end": { - "line": 132, + "line": 126, "column": 8 } } @@ -18048,15 +17217,15 @@ "binop": null }, "value": "entity", - "start": 3153, - "end": 3159, + "start": 3054, + "end": 3060, "loc": { "start": { - "line": 132, + "line": 126, "column": 9 }, "end": { - "line": 132, + "line": 126, "column": 15 } } @@ -18073,15 +17242,15 @@ "postfix": false, "binop": null }, - "start": 3161, - "end": 3162, + "start": 3062, + "end": 3063, "loc": { "start": { - "line": 133, + "line": 127, "column": 1 }, "end": { - "line": 133, + "line": 127, "column": 2 } } @@ -18089,15 +17258,15 @@ { "type": "CommentBlock", "value": "*\n\t * Registers a system to the world.\n\t * The order the systems get registered, is the order then run in.\n\t *\n\t * @example\n\t * // Movement system\n\t * world.system(['position', 'velocity'], class {\n\t * every(position, velocity, entity) {\n\t * position.x += velocity.x\n\t * position.y += velocity.y\n\t * }\n\t * })\n\t *\n\t * @param {Array} components - The list of components the system will process in every(). This follows the same logic as entity.has() and world.every().\n\t * @param {Function} systemClass - The system class to instantiate. Can contain the following methods: constructor, initialize,\n\t * pre, every, post. Pre() and post() get called before and after every(), for each of the independent systems. See world.run()\n\t * for an example of the call order.\n\t * @param {...Object} [args] - The arguments to forward to the system's constructors\n\t *\n\t * @return {number} Unique ID of the system on success or undefined on failure\n\t ", - "start": 3165, - "end": 4144, + "start": 3066, + "end": 4045, "loc": { "start": { - "line": 135, + "line": 129, "column": 1 }, "end": { - "line": 155, + "line": 149, "column": 4 } } @@ -18115,15 +17284,15 @@ "binop": null }, "value": "system", - "start": 4146, - "end": 4152, + "start": 4047, + "end": 4053, "loc": { "start": { - "line": 156, + "line": 150, "column": 1 }, "end": { - "line": 156, + "line": 150, "column": 7 } } @@ -18140,15 +17309,15 @@ "postfix": false, "binop": null }, - "start": 4152, - "end": 4153, + "start": 4053, + "end": 4054, "loc": { "start": { - "line": 156, + "line": 150, "column": 7 }, "end": { - "line": 156, + "line": 150, "column": 8 } } @@ -18166,15 +17335,15 @@ "binop": null }, "value": "components", - "start": 4153, - "end": 4163, + "start": 4054, + "end": 4064, "loc": { "start": { - "line": 156, + "line": 150, "column": 8 }, "end": { - "line": 156, + "line": 150, "column": 18 } } @@ -18192,15 +17361,15 @@ "binop": null, "updateContext": null }, - "start": 4163, - "end": 4164, + "start": 4064, + "end": 4065, "loc": { "start": { - "line": 156, + "line": 150, "column": 18 }, "end": { - "line": 156, + "line": 150, "column": 19 } } @@ -18218,15 +17387,15 @@ "binop": null }, "value": "systemClass", - "start": 4165, - "end": 4176, + "start": 4066, + "end": 4077, "loc": { "start": { - "line": 156, + "line": 150, "column": 20 }, "end": { - "line": 156, + "line": 150, "column": 31 } } @@ -18244,15 +17413,15 @@ "binop": null, "updateContext": null }, - "start": 4176, - "end": 4177, + "start": 4077, + "end": 4078, "loc": { "start": { - "line": 156, + "line": 150, "column": 31 }, "end": { - "line": 156, + "line": 150, "column": 32 } } @@ -18270,15 +17439,15 @@ "binop": null, "updateContext": null }, - "start": 4178, - "end": 4181, + "start": 4079, + "end": 4082, "loc": { "start": { - "line": 156, + "line": 150, "column": 33 }, "end": { - "line": 156, + "line": 150, "column": 36 } } @@ -18296,15 +17465,15 @@ "binop": null }, "value": "args", - "start": 4181, - "end": 4185, + "start": 4082, + "end": 4086, "loc": { "start": { - "line": 156, + "line": 150, "column": 36 }, "end": { - "line": 156, + "line": 150, "column": 40 } } @@ -18321,15 +17490,15 @@ "postfix": false, "binop": null }, - "start": 4185, - "end": 4186, + "start": 4086, + "end": 4087, "loc": { "start": { - "line": 156, + "line": 150, "column": 40 }, "end": { - "line": 156, + "line": 150, "column": 41 } } @@ -18346,15 +17515,15 @@ "postfix": false, "binop": null }, - "start": 4187, - "end": 4188, + "start": 4088, + "end": 4089, "loc": { "start": { - "line": 156, + "line": 150, "column": 42 }, "end": { - "line": 156, + "line": 150, "column": 43 } } @@ -18362,15 +17531,15 @@ { "type": "CommentLine", "value": " TODO: Make components optional, and parameters more dynamic by only using ...args", - "start": 4191, - "end": 4275, + "start": 4092, + "end": 4176, "loc": { "start": { - "line": 157, + "line": 151, "column": 2 }, "end": { - "line": 157, + "line": 151, "column": 86 } } @@ -18390,15 +17559,15 @@ "updateContext": null }, "value": "if", - "start": 4278, - "end": 4280, + "start": 4179, + "end": 4181, "loc": { "start": { - "line": 158, + "line": 152, "column": 2 }, "end": { - "line": 158, + "line": 152, "column": 4 } } @@ -18415,15 +17584,15 @@ "postfix": false, "binop": null }, - "start": 4281, - "end": 4282, + "start": 4182, + "end": 4183, "loc": { "start": { - "line": 158, + "line": 152, "column": 5 }, "end": { - "line": 158, + "line": 152, "column": 6 } } @@ -18441,15 +17610,15 @@ "binop": null }, "value": "isFunction", - "start": 4282, - "end": 4292, + "start": 4183, + "end": 4193, "loc": { "start": { - "line": 158, + "line": 152, "column": 6 }, "end": { - "line": 158, + "line": 152, "column": 16 } } @@ -18466,15 +17635,15 @@ "postfix": false, "binop": null }, - "start": 4292, - "end": 4293, + "start": 4193, + "end": 4194, "loc": { "start": { - "line": 158, + "line": 152, "column": 16 }, "end": { - "line": 158, + "line": 152, "column": 17 } } @@ -18492,15 +17661,15 @@ "binop": null }, "value": "systemClass", - "start": 4293, - "end": 4304, + "start": 4194, + "end": 4205, "loc": { "start": { - "line": 158, + "line": 152, "column": 17 }, "end": { - "line": 158, + "line": 152, "column": 28 } } @@ -18517,15 +17686,15 @@ "postfix": false, "binop": null }, - "start": 4304, - "end": 4305, + "start": 4205, + "end": 4206, "loc": { "start": { - "line": 158, + "line": 152, "column": 28 }, "end": { - "line": 158, + "line": 152, "column": 29 } } @@ -18542,15 +17711,15 @@ "postfix": false, "binop": null }, - "start": 4305, - "end": 4306, + "start": 4206, + "end": 4207, "loc": { "start": { - "line": 158, + "line": 152, "column": 29 }, "end": { - "line": 158, + "line": 152, "column": 30 } } @@ -18567,15 +17736,15 @@ "postfix": false, "binop": null }, - "start": 4307, - "end": 4308, + "start": 4208, + "end": 4209, "loc": { "start": { - "line": 158, + "line": 152, "column": 31 }, "end": { - "line": 158, + "line": 152, "column": 32 } } @@ -18583,15 +17752,15 @@ { "type": "CommentLine", "value": " Create the system, and set the component array query", - "start": 4312, - "end": 4367, + "start": 4213, + "end": 4268, "loc": { "start": { - "line": 159, + "line": 153, "column": 3 }, "end": { - "line": 159, + "line": 153, "column": 58 } } @@ -18611,15 +17780,15 @@ "updateContext": null }, "value": "let", - "start": 4371, - "end": 4374, + "start": 4272, + "end": 4275, "loc": { "start": { - "line": 160, + "line": 154, "column": 3 }, "end": { - "line": 160, + "line": 154, "column": 6 } } @@ -18637,15 +17806,15 @@ "binop": null }, "value": "newSystem", - "start": 4375, - "end": 4384, + "start": 4276, + "end": 4285, "loc": { "start": { - "line": 160, + "line": 154, "column": 7 }, "end": { - "line": 160, + "line": 154, "column": 16 } } @@ -18664,15 +17833,15 @@ "updateContext": null }, "value": "=", - "start": 4385, - "end": 4386, + "start": 4286, + "end": 4287, "loc": { "start": { - "line": 160, + "line": 154, "column": 17 }, "end": { - "line": 160, + "line": 154, "column": 18 } } @@ -18692,15 +17861,15 @@ "updateContext": null }, "value": "new", - "start": 4387, - "end": 4390, + "start": 4288, + "end": 4291, "loc": { "start": { - "line": 160, + "line": 154, "column": 19 }, "end": { - "line": 160, + "line": 154, "column": 22 } } @@ -18718,15 +17887,15 @@ "binop": null }, "value": "systemClass", - "start": 4391, - "end": 4402, + "start": 4292, + "end": 4303, "loc": { "start": { - "line": 160, + "line": 154, "column": 23 }, "end": { - "line": 160, + "line": 154, "column": 34 } } @@ -18743,15 +17912,15 @@ "postfix": false, "binop": null }, - "start": 4402, - "end": 4403, + "start": 4303, + "end": 4304, "loc": { "start": { - "line": 160, + "line": 154, "column": 34 }, "end": { - "line": 160, + "line": 154, "column": 35 } } @@ -18769,15 +17938,15 @@ "binop": null, "updateContext": null }, - "start": 4403, - "end": 4406, + "start": 4304, + "end": 4307, "loc": { "start": { - "line": 160, + "line": 154, "column": 35 }, "end": { - "line": 160, + "line": 154, "column": 38 } } @@ -18795,15 +17964,15 @@ "binop": null }, "value": "args", - "start": 4406, - "end": 4410, + "start": 4307, + "end": 4311, "loc": { "start": { - "line": 160, + "line": 154, "column": 38 }, "end": { - "line": 160, + "line": 154, "column": 42 } } @@ -18820,15 +17989,15 @@ "postfix": false, "binop": null }, - "start": 4410, - "end": 4411, + "start": 4311, + "end": 4312, "loc": { "start": { - "line": 160, + "line": 154, "column": 42 }, "end": { - "line": 160, + "line": 154, "column": 43 } } @@ -18846,15 +18015,15 @@ "binop": null }, "value": "newSystem", - "start": 4415, - "end": 4424, + "start": 4316, + "end": 4325, "loc": { "start": { - "line": 161, + "line": 155, "column": 3 }, "end": { - "line": 161, + "line": 155, "column": 12 } } @@ -18872,15 +18041,15 @@ "binop": null, "updateContext": null }, - "start": 4424, - "end": 4425, + "start": 4325, + "end": 4326, "loc": { "start": { - "line": 161, + "line": 155, "column": 12 }, "end": { - "line": 161, + "line": 155, "column": 13 } } @@ -18898,15 +18067,15 @@ "binop": null }, "value": "components", - "start": 4425, - "end": 4435, + "start": 4326, + "end": 4336, "loc": { "start": { - "line": 161, + "line": 155, "column": 13 }, "end": { - "line": 161, + "line": 155, "column": 23 } } @@ -18925,15 +18094,15 @@ "updateContext": null }, "value": "=", - "start": 4436, - "end": 4437, + "start": 4337, + "end": 4338, "loc": { "start": { - "line": 161, + "line": 155, "column": 24 }, "end": { - "line": 161, + "line": 155, "column": 25 } } @@ -18951,15 +18120,15 @@ "binop": null }, "value": "components", - "start": 4438, - "end": 4448, + "start": 4339, + "end": 4349, "loc": { "start": { - "line": 161, + "line": 155, "column": 26 }, "end": { - "line": 161, + "line": 155, "column": 36 } } @@ -18967,15 +18136,15 @@ { "type": "CommentLine", "value": " Add the system, return its ID", - "start": 4453, - "end": 4485, + "start": 4354, + "end": 4386, "loc": { "start": { - "line": 163, + "line": 157, "column": 3 }, "end": { - "line": 163, + "line": 157, "column": 35 } } @@ -18995,15 +18164,15 @@ "updateContext": null }, "value": "return", - "start": 4489, - "end": 4495, + "start": 4390, + "end": 4396, "loc": { "start": { - "line": 164, + "line": 158, "column": 3 }, "end": { - "line": 164, + "line": 158, "column": 9 } } @@ -19023,15 +18192,15 @@ "updateContext": null }, "value": "this", - "start": 4496, - "end": 4500, + "start": 4397, + "end": 4401, "loc": { "start": { - "line": 164, + "line": 158, "column": 10 }, "end": { - "line": 164, + "line": 158, "column": 14 } } @@ -19049,15 +18218,15 @@ "binop": null, "updateContext": null }, - "start": 4500, - "end": 4501, + "start": 4401, + "end": 4402, "loc": { "start": { - "line": 164, + "line": 158, "column": 14 }, "end": { - "line": 164, + "line": 158, "column": 15 } } @@ -19075,15 +18244,15 @@ "binop": null }, "value": "systems", - "start": 4501, - "end": 4508, + "start": 4402, + "end": 4409, "loc": { "start": { - "line": 164, + "line": 158, "column": 15 }, "end": { - "line": 164, + "line": 158, "column": 22 } } @@ -19101,15 +18270,15 @@ "binop": null, "updateContext": null }, - "start": 4508, - "end": 4509, + "start": 4409, + "end": 4410, "loc": { "start": { - "line": 164, + "line": 158, "column": 22 }, "end": { - "line": 164, + "line": 158, "column": 23 } } @@ -19127,15 +18296,15 @@ "binop": null }, "value": "push", - "start": 4509, - "end": 4513, + "start": 4410, + "end": 4414, "loc": { "start": { - "line": 164, + "line": 158, "column": 23 }, "end": { - "line": 164, + "line": 158, "column": 27 } } @@ -19152,15 +18321,15 @@ "postfix": false, "binop": null }, - "start": 4513, - "end": 4514, + "start": 4414, + "end": 4415, "loc": { "start": { - "line": 164, + "line": 158, "column": 27 }, "end": { - "line": 164, + "line": 158, "column": 28 } } @@ -19178,15 +18347,15 @@ "binop": null }, "value": "newSystem", - "start": 4514, - "end": 4523, + "start": 4415, + "end": 4424, "loc": { "start": { - "line": 164, + "line": 158, "column": 28 }, "end": { - "line": 164, + "line": 158, "column": 37 } } @@ -19203,15 +18372,15 @@ "postfix": false, "binop": null }, - "start": 4523, - "end": 4524, + "start": 4424, + "end": 4425, "loc": { "start": { - "line": 164, + "line": 158, "column": 37 }, "end": { - "line": 164, + "line": 158, "column": 38 } } @@ -19230,15 +18399,15 @@ "updateContext": null }, "value": "-", - "start": 4525, - "end": 4526, + "start": 4426, + "end": 4427, "loc": { "start": { - "line": 164, + "line": 158, "column": 39 }, "end": { - "line": 164, + "line": 158, "column": 40 } } @@ -19257,15 +18426,15 @@ "updateContext": null }, "value": 1, - "start": 4527, - "end": 4528, + "start": 4428, + "end": 4429, "loc": { "start": { - "line": 164, + "line": 158, "column": 41 }, "end": { - "line": 164, + "line": 158, "column": 42 } } @@ -19282,15 +18451,15 @@ "postfix": false, "binop": null }, - "start": 4531, - "end": 4532, + "start": 4432, + "end": 4433, "loc": { "start": { - "line": 165, + "line": 159, "column": 2 }, "end": { - "line": 165, + "line": 159, "column": 3 } } @@ -19310,15 +18479,15 @@ "updateContext": null }, "value": "return", - "start": 4535, - "end": 4541, + "start": 4436, + "end": 4442, "loc": { "start": { - "line": 166, + "line": 160, "column": 2 }, "end": { - "line": 166, + "line": 160, "column": 8 } } @@ -19336,15 +18505,15 @@ "binop": null }, "value": "undefined", - "start": 4542, - "end": 4551, + "start": 4443, + "end": 4452, "loc": { "start": { - "line": 166, + "line": 160, "column": 9 }, "end": { - "line": 166, + "line": 160, "column": 18 } } @@ -19361,15 +18530,15 @@ "postfix": false, "binop": null }, - "start": 4553, - "end": 4554, + "start": 4454, + "end": 4455, "loc": { "start": { - "line": 167, + "line": 161, "column": 1 }, "end": { - "line": 167, + "line": 161, "column": 2 } } @@ -19377,15 +18546,15 @@ { "type": "CommentBlock", "value": "*\n\t * Calls initialize() on all systems\n\t *\n\t * @example\n\t * world.initialize(renderContext)\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' initialize() methods\n\t ", - "start": 4557, - "end": 4754, + "start": 4458, + "end": 4655, "loc": { "start": { - "line": 169, + "line": 163, "column": 1 }, "end": { - "line": 176, + "line": 170, "column": 4 } } @@ -19403,15 +18572,15 @@ "binop": null }, "value": "initialize", - "start": 4756, - "end": 4766, + "start": 4657, + "end": 4667, "loc": { "start": { - "line": 177, + "line": 171, "column": 1 }, "end": { - "line": 177, + "line": 171, "column": 11 } } @@ -19428,15 +18597,15 @@ "postfix": false, "binop": null }, - "start": 4766, - "end": 4767, + "start": 4667, + "end": 4668, "loc": { "start": { - "line": 177, + "line": 171, "column": 11 }, "end": { - "line": 177, + "line": 171, "column": 12 } } @@ -19454,15 +18623,15 @@ "binop": null, "updateContext": null }, - "start": 4767, - "end": 4770, + "start": 4668, + "end": 4671, "loc": { "start": { - "line": 177, + "line": 171, "column": 12 }, "end": { - "line": 177, + "line": 171, "column": 15 } } @@ -19480,15 +18649,15 @@ "binop": null }, "value": "args", - "start": 4770, - "end": 4774, + "start": 4671, + "end": 4675, "loc": { "start": { - "line": 177, + "line": 171, "column": 15 }, "end": { - "line": 177, + "line": 171, "column": 19 } } @@ -19505,15 +18674,15 @@ "postfix": false, "binop": null }, - "start": 4774, - "end": 4775, + "start": 4675, + "end": 4676, "loc": { "start": { - "line": 177, + "line": 171, "column": 19 }, "end": { - "line": 177, + "line": 171, "column": 20 } } @@ -19530,15 +18699,15 @@ "postfix": false, "binop": null }, - "start": 4776, - "end": 4777, + "start": 4677, + "end": 4678, "loc": { "start": { - "line": 177, + "line": 171, "column": 21 }, "end": { - "line": 177, + "line": 171, "column": 22 } } @@ -19558,15 +18727,15 @@ "updateContext": null }, "value": "for", - "start": 4780, - "end": 4783, + "start": 4681, + "end": 4684, "loc": { "start": { - "line": 178, + "line": 172, "column": 2 }, "end": { - "line": 178, + "line": 172, "column": 5 } } @@ -19583,15 +18752,15 @@ "postfix": false, "binop": null }, - "start": 4784, - "end": 4785, + "start": 4685, + "end": 4686, "loc": { "start": { - "line": 178, + "line": 172, "column": 6 }, "end": { - "line": 178, + "line": 172, "column": 7 } } @@ -19611,15 +18780,15 @@ "updateContext": null }, "value": "let", - "start": 4785, - "end": 4788, + "start": 4686, + "end": 4689, "loc": { "start": { - "line": 178, + "line": 172, "column": 7 }, "end": { - "line": 178, + "line": 172, "column": 10 } } @@ -19637,15 +18806,15 @@ "binop": null }, "value": "system", - "start": 4789, - "end": 4795, + "start": 4690, + "end": 4696, "loc": { "start": { - "line": 178, + "line": 172, "column": 11 }, "end": { - "line": 178, + "line": 172, "column": 17 } } @@ -19663,15 +18832,15 @@ "binop": null }, "value": "of", - "start": 4796, - "end": 4798, + "start": 4697, + "end": 4699, "loc": { "start": { - "line": 178, + "line": 172, "column": 18 }, "end": { - "line": 178, + "line": 172, "column": 20 } } @@ -19691,15 +18860,15 @@ "updateContext": null }, "value": "this", - "start": 4799, - "end": 4803, + "start": 4700, + "end": 4704, "loc": { "start": { - "line": 178, + "line": 172, "column": 21 }, "end": { - "line": 178, + "line": 172, "column": 25 } } @@ -19717,15 +18886,15 @@ "binop": null, "updateContext": null }, - "start": 4803, - "end": 4804, + "start": 4704, + "end": 4705, "loc": { "start": { - "line": 178, + "line": 172, "column": 25 }, "end": { - "line": 178, + "line": 172, "column": 26 } } @@ -19743,15 +18912,15 @@ "binop": null }, "value": "systems", - "start": 4804, - "end": 4811, + "start": 4705, + "end": 4712, "loc": { "start": { - "line": 178, + "line": 172, "column": 26 }, "end": { - "line": 178, + "line": 172, "column": 33 } } @@ -19768,15 +18937,15 @@ "postfix": false, "binop": null }, - "start": 4811, - "end": 4812, + "start": 4712, + "end": 4713, "loc": { "start": { - "line": 178, + "line": 172, "column": 33 }, "end": { - "line": 178, + "line": 172, "column": 34 } } @@ -19793,15 +18962,15 @@ "postfix": false, "binop": null }, - "start": 4813, - "end": 4814, + "start": 4714, + "end": 4715, "loc": { "start": { - "line": 178, + "line": 172, "column": 35 }, "end": { - "line": 178, + "line": 172, "column": 36 } } @@ -19819,15 +18988,15 @@ "binop": null }, "value": "invoke", - "start": 4818, - "end": 4824, + "start": 4719, + "end": 4725, "loc": { "start": { - "line": 179, + "line": 173, "column": 3 }, "end": { - "line": 179, + "line": 173, "column": 9 } } @@ -19844,15 +19013,15 @@ "postfix": false, "binop": null }, - "start": 4824, - "end": 4825, + "start": 4725, + "end": 4726, "loc": { "start": { - "line": 179, + "line": 173, "column": 9 }, "end": { - "line": 179, + "line": 173, "column": 10 } } @@ -19870,15 +19039,15 @@ "binop": null }, "value": "system", - "start": 4825, - "end": 4831, + "start": 4726, + "end": 4732, "loc": { "start": { - "line": 179, + "line": 173, "column": 10 }, "end": { - "line": 179, + "line": 173, "column": 16 } } @@ -19896,15 +19065,15 @@ "binop": null, "updateContext": null }, - "start": 4831, - "end": 4832, + "start": 4732, + "end": 4733, "loc": { "start": { - "line": 179, + "line": 173, "column": 16 }, "end": { - "line": 179, + "line": 173, "column": 17 } } @@ -19923,15 +19092,15 @@ "updateContext": null }, "value": "initialize", - "start": 4833, - "end": 4845, + "start": 4734, + "end": 4746, "loc": { "start": { - "line": 179, + "line": 173, "column": 18 }, "end": { - "line": 179, + "line": 173, "column": 30 } } @@ -19949,15 +19118,15 @@ "binop": null, "updateContext": null }, - "start": 4845, - "end": 4846, + "start": 4746, + "end": 4747, "loc": { "start": { - "line": 179, + "line": 173, "column": 30 }, "end": { - "line": 179, + "line": 173, "column": 31 } } @@ -19975,15 +19144,15 @@ "binop": null, "updateContext": null }, - "start": 4847, - "end": 4850, + "start": 4748, + "end": 4751, "loc": { "start": { - "line": 179, + "line": 173, "column": 32 }, "end": { - "line": 179, + "line": 173, "column": 35 } } @@ -20001,15 +19170,15 @@ "binop": null }, "value": "args", - "start": 4850, - "end": 4854, + "start": 4751, + "end": 4755, "loc": { "start": { - "line": 179, + "line": 173, "column": 35 }, "end": { - "line": 179, + "line": 173, "column": 39 } } @@ -20026,15 +19195,15 @@ "postfix": false, "binop": null }, - "start": 4854, - "end": 4855, + "start": 4755, + "end": 4756, "loc": { "start": { - "line": 179, + "line": 173, "column": 39 }, "end": { - "line": 179, + "line": 173, "column": 40 } } @@ -20051,15 +19220,15 @@ "postfix": false, "binop": null }, - "start": 4858, - "end": 4859, + "start": 4759, + "end": 4760, "loc": { "start": { - "line": 180, + "line": 174, "column": 2 }, "end": { - "line": 180, + "line": 174, "column": 3 } } @@ -20076,15 +19245,15 @@ "postfix": false, "binop": null }, - "start": 4861, - "end": 4862, + "start": 4762, + "end": 4763, "loc": { "start": { - "line": 181, + "line": 175, "column": 1 }, "end": { - "line": 181, + "line": 175, "column": 2 } } @@ -20092,15 +19261,15 @@ { "type": "CommentBlock", "value": "*\n\t * Calls pre(), every(), and post() on all systems\n\t *\n\t * @example\n\t * world.run(deltaTime)\n\t *\n\t * @example\n\t * // Example flow of method call order:\n\t * // Setup systems:\n\t * world.system([], systemA)\n\t * world.system([], systemB)\n\t * // During world.run():\n\t * // systemA.pre()\n\t * // systemA.every() * number of entities\n\t * // systemA.post()\n\t * // systemB.pre()\n\t * // systemB.every() * number of entities\n\t * // systemB.post()\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' methods\n\t ", - "start": 4865, - "end": 5394, + "start": 4766, + "end": 5295, "loc": { "start": { - "line": 183, + "line": 177, "column": 1 }, "end": { - "line": 203, + "line": 197, "column": 4 } } @@ -20118,15 +19287,15 @@ "binop": null }, "value": "run", - "start": 5396, - "end": 5399, + "start": 5297, + "end": 5300, "loc": { "start": { - "line": 204, + "line": 198, "column": 1 }, "end": { - "line": 204, + "line": 198, "column": 4 } } @@ -20143,15 +19312,15 @@ "postfix": false, "binop": null }, - "start": 5399, - "end": 5400, + "start": 5300, + "end": 5301, "loc": { "start": { - "line": 204, + "line": 198, "column": 4 }, "end": { - "line": 204, + "line": 198, "column": 5 } } @@ -20169,15 +19338,15 @@ "binop": null, "updateContext": null }, - "start": 5400, - "end": 5403, + "start": 5301, + "end": 5304, "loc": { "start": { - "line": 204, + "line": 198, "column": 5 }, "end": { - "line": 204, + "line": 198, "column": 8 } } @@ -20195,15 +19364,15 @@ "binop": null }, "value": "args", - "start": 5403, - "end": 5407, + "start": 5304, + "end": 5308, "loc": { "start": { - "line": 204, + "line": 198, "column": 8 }, "end": { - "line": 204, + "line": 198, "column": 12 } } @@ -20220,15 +19389,15 @@ "postfix": false, "binop": null }, - "start": 5407, - "end": 5408, + "start": 5308, + "end": 5309, "loc": { "start": { - "line": 204, + "line": 198, "column": 12 }, "end": { - "line": 204, + "line": 198, "column": 13 } } @@ -20245,15 +19414,15 @@ "postfix": false, "binop": null }, - "start": 5409, - "end": 5410, + "start": 5310, + "end": 5311, "loc": { "start": { - "line": 204, + "line": 198, "column": 14 }, "end": { - "line": 204, + "line": 198, "column": 15 } } @@ -20273,15 +19442,15 @@ "updateContext": null }, "value": "for", - "start": 5413, - "end": 5416, + "start": 5314, + "end": 5317, "loc": { "start": { - "line": 205, + "line": 199, "column": 2 }, "end": { - "line": 205, + "line": 199, "column": 5 } } @@ -20298,15 +19467,15 @@ "postfix": false, "binop": null }, - "start": 5417, - "end": 5418, + "start": 5318, + "end": 5319, "loc": { "start": { - "line": 205, + "line": 199, "column": 6 }, "end": { - "line": 205, + "line": 199, "column": 7 } } @@ -20326,15 +19495,15 @@ "updateContext": null }, "value": "let", - "start": 5418, - "end": 5421, + "start": 5319, + "end": 5322, "loc": { "start": { - "line": 205, + "line": 199, "column": 7 }, "end": { - "line": 205, + "line": 199, "column": 10 } } @@ -20352,15 +19521,15 @@ "binop": null }, "value": "system", - "start": 5422, - "end": 5428, + "start": 5323, + "end": 5329, "loc": { "start": { - "line": 205, + "line": 199, "column": 11 }, "end": { - "line": 205, + "line": 199, "column": 17 } } @@ -20378,15 +19547,15 @@ "binop": null }, "value": "of", - "start": 5429, - "end": 5431, + "start": 5330, + "end": 5332, "loc": { "start": { - "line": 205, + "line": 199, "column": 18 }, "end": { - "line": 205, + "line": 199, "column": 20 } } @@ -20406,15 +19575,15 @@ "updateContext": null }, "value": "this", - "start": 5432, - "end": 5436, + "start": 5333, + "end": 5337, "loc": { "start": { - "line": 205, + "line": 199, "column": 21 }, "end": { - "line": 205, + "line": 199, "column": 25 } } @@ -20432,15 +19601,15 @@ "binop": null, "updateContext": null }, - "start": 5436, - "end": 5437, + "start": 5337, + "end": 5338, "loc": { "start": { - "line": 205, + "line": 199, "column": 25 }, "end": { - "line": 205, + "line": 199, "column": 26 } } @@ -20458,15 +19627,15 @@ "binop": null }, "value": "systems", - "start": 5437, - "end": 5444, + "start": 5338, + "end": 5345, "loc": { "start": { - "line": 205, + "line": 199, "column": 26 }, "end": { - "line": 205, + "line": 199, "column": 33 } } @@ -20483,15 +19652,15 @@ "postfix": false, "binop": null }, - "start": 5444, - "end": 5445, + "start": 5345, + "end": 5346, "loc": { "start": { - "line": 205, + "line": 199, "column": 33 }, "end": { - "line": 205, + "line": 199, "column": 34 } } @@ -20508,15 +19677,15 @@ "postfix": false, "binop": null }, - "start": 5446, - "end": 5447, + "start": 5347, + "end": 5348, "loc": { "start": { - "line": 205, + "line": 199, "column": 35 }, "end": { - "line": 205, + "line": 199, "column": 36 } } @@ -20534,15 +19703,15 @@ "binop": null }, "value": "invoke", - "start": 5451, - "end": 5457, + "start": 5352, + "end": 5358, "loc": { "start": { - "line": 206, + "line": 200, "column": 3 }, "end": { - "line": 206, + "line": 200, "column": 9 } } @@ -20559,15 +19728,15 @@ "postfix": false, "binop": null }, - "start": 5457, - "end": 5458, + "start": 5358, + "end": 5359, "loc": { "start": { - "line": 206, + "line": 200, "column": 9 }, "end": { - "line": 206, + "line": 200, "column": 10 } } @@ -20585,15 +19754,15 @@ "binop": null }, "value": "system", - "start": 5458, - "end": 5464, + "start": 5359, + "end": 5365, "loc": { "start": { - "line": 206, + "line": 200, "column": 10 }, "end": { - "line": 206, + "line": 200, "column": 16 } } @@ -20611,15 +19780,15 @@ "binop": null, "updateContext": null }, - "start": 5464, - "end": 5465, + "start": 5365, + "end": 5366, "loc": { "start": { - "line": 206, + "line": 200, "column": 16 }, "end": { - "line": 206, + "line": 200, "column": 17 } } @@ -20638,15 +19807,15 @@ "updateContext": null }, "value": "pre", - "start": 5466, - "end": 5471, + "start": 5367, + "end": 5372, "loc": { "start": { - "line": 206, + "line": 200, "column": 18 }, "end": { - "line": 206, + "line": 200, "column": 23 } } @@ -20664,15 +19833,15 @@ "binop": null, "updateContext": null }, - "start": 5471, - "end": 5472, + "start": 5372, + "end": 5373, "loc": { "start": { - "line": 206, + "line": 200, "column": 23 }, "end": { - "line": 206, + "line": 200, "column": 24 } } @@ -20690,15 +19859,15 @@ "binop": null, "updateContext": null }, - "start": 5473, - "end": 5476, + "start": 5374, + "end": 5377, "loc": { "start": { - "line": 206, + "line": 200, "column": 25 }, "end": { - "line": 206, + "line": 200, "column": 28 } } @@ -20716,15 +19885,15 @@ "binop": null }, "value": "args", - "start": 5476, - "end": 5480, + "start": 5377, + "end": 5381, "loc": { "start": { - "line": 206, + "line": 200, "column": 28 }, "end": { - "line": 206, + "line": 200, "column": 32 } } @@ -20741,15 +19910,15 @@ "postfix": false, "binop": null }, - "start": 5480, - "end": 5481, + "start": 5381, + "end": 5382, "loc": { "start": { - "line": 206, + "line": 200, "column": 32 }, "end": { - "line": 206, + "line": 200, "column": 33 } } @@ -20757,15 +19926,15 @@ { "type": "CommentLine", "value": " Run the \"every\" method in the system", - "start": 5486, - "end": 5525, + "start": 5387, + "end": 5426, "loc": { "start": { - "line": 208, + "line": 202, "column": 3 }, "end": { - "line": 208, + "line": 202, "column": 42 } } @@ -20785,15 +19954,15 @@ "updateContext": null }, "value": "if", - "start": 5529, - "end": 5531, + "start": 5430, + "end": 5432, "loc": { "start": { - "line": 209, + "line": 203, "column": 3 }, "end": { - "line": 209, + "line": 203, "column": 5 } } @@ -20810,15 +19979,15 @@ "postfix": false, "binop": null }, - "start": 5532, - "end": 5533, + "start": 5433, + "end": 5434, "loc": { "start": { - "line": 209, + "line": 203, "column": 6 }, "end": { - "line": 209, + "line": 203, "column": 7 } } @@ -20836,15 +20005,15 @@ "binop": null }, "value": "isFunction", - "start": 5533, - "end": 5543, + "start": 5434, + "end": 5444, "loc": { "start": { - "line": 209, + "line": 203, "column": 7 }, "end": { - "line": 209, + "line": 203, "column": 17 } } @@ -20861,15 +20030,15 @@ "postfix": false, "binop": null }, - "start": 5543, - "end": 5544, + "start": 5444, + "end": 5445, "loc": { "start": { - "line": 209, + "line": 203, "column": 17 }, "end": { - "line": 209, + "line": 203, "column": 18 } } @@ -20887,15 +20056,15 @@ "binop": null }, "value": "system", - "start": 5544, - "end": 5550, + "start": 5445, + "end": 5451, "loc": { "start": { - "line": 209, + "line": 203, "column": 18 }, "end": { - "line": 209, + "line": 203, "column": 24 } } @@ -20913,15 +20082,15 @@ "binop": null, "updateContext": null }, - "start": 5550, - "end": 5551, + "start": 5451, + "end": 5452, "loc": { "start": { - "line": 209, + "line": 203, "column": 24 }, "end": { - "line": 209, + "line": 203, "column": 25 } } @@ -20939,15 +20108,15 @@ "binop": null }, "value": "every", - "start": 5551, - "end": 5556, + "start": 5452, + "end": 5457, "loc": { "start": { - "line": 209, + "line": 203, "column": 25 }, "end": { - "line": 209, + "line": 203, "column": 30 } } @@ -20964,15 +20133,15 @@ "postfix": false, "binop": null }, - "start": 5556, - "end": 5557, + "start": 5457, + "end": 5458, "loc": { "start": { - "line": 209, + "line": 203, "column": 30 }, "end": { - "line": 209, + "line": 203, "column": 31 } } @@ -20989,15 +20158,15 @@ "postfix": false, "binop": null }, - "start": 5557, - "end": 5558, + "start": 5458, + "end": 5459, "loc": { "start": { - "line": 209, + "line": 203, "column": 31 }, "end": { - "line": 209, + "line": 203, "column": 32 } } @@ -21014,15 +20183,15 @@ "postfix": false, "binop": null }, - "start": 5559, - "end": 5560, + "start": 5460, + "end": 5461, "loc": { "start": { - "line": 209, + "line": 203, "column": 33 }, "end": { - "line": 209, + "line": 203, "column": 34 } } @@ -21042,15 +20211,15 @@ "updateContext": null }, "value": "this", - "start": 5565, - "end": 5569, + "start": 5466, + "end": 5470, "loc": { "start": { - "line": 210, + "line": 204, "column": 4 }, "end": { - "line": 210, + "line": 204, "column": 8 } } @@ -21068,15 +20237,15 @@ "binop": null, "updateContext": null }, - "start": 5569, - "end": 5570, + "start": 5470, + "end": 5471, "loc": { "start": { - "line": 210, + "line": 204, "column": 8 }, "end": { - "line": 210, + "line": 204, "column": 9 } } @@ -21094,15 +20263,15 @@ "binop": null }, "value": "every", - "start": 5570, - "end": 5575, + "start": 5471, + "end": 5476, "loc": { "start": { - "line": 210, + "line": 204, "column": 9 }, "end": { - "line": 210, + "line": 204, "column": 14 } } @@ -21119,15 +20288,15 @@ "postfix": false, "binop": null }, - "start": 5575, - "end": 5576, + "start": 5476, + "end": 5477, "loc": { "start": { - "line": 210, + "line": 204, "column": 14 }, "end": { - "line": 210, + "line": 204, "column": 15 } } @@ -21145,15 +20314,15 @@ "binop": null }, "value": "system", - "start": 5576, - "end": 5582, + "start": 5477, + "end": 5483, "loc": { "start": { - "line": 210, + "line": 204, "column": 15 }, "end": { - "line": 210, + "line": 204, "column": 21 } } @@ -21171,15 +20340,15 @@ "binop": null, "updateContext": null }, - "start": 5582, - "end": 5583, + "start": 5483, + "end": 5484, "loc": { "start": { - "line": 210, + "line": 204, "column": 21 }, "end": { - "line": 210, + "line": 204, "column": 22 } } @@ -21197,15 +20366,15 @@ "binop": null }, "value": "components", - "start": 5583, - "end": 5593, + "start": 5484, + "end": 5494, "loc": { "start": { - "line": 210, + "line": 204, "column": 22 }, "end": { - "line": 210, + "line": 204, "column": 32 } } @@ -21223,15 +20392,15 @@ "binop": null, "updateContext": null }, - "start": 5593, - "end": 5594, + "start": 5494, + "end": 5495, "loc": { "start": { - "line": 210, + "line": 204, "column": 32 }, "end": { - "line": 210, + "line": 204, "column": 33 } } @@ -21249,15 +20418,15 @@ "binop": null }, "value": "system", - "start": 5595, - "end": 5601, + "start": 5496, + "end": 5502, "loc": { "start": { - "line": 210, + "line": 204, "column": 34 }, "end": { - "line": 210, + "line": 204, "column": 40 } } @@ -21275,15 +20444,15 @@ "binop": null, "updateContext": null }, - "start": 5601, - "end": 5602, + "start": 5502, + "end": 5503, "loc": { "start": { - "line": 210, + "line": 204, "column": 40 }, "end": { - "line": 210, + "line": 204, "column": 41 } } @@ -21301,15 +20470,15 @@ "binop": null }, "value": "every", - "start": 5602, - "end": 5607, + "start": 5503, + "end": 5508, "loc": { "start": { - "line": 210, + "line": 204, "column": 41 }, "end": { - "line": 210, + "line": 204, "column": 46 } } @@ -21327,15 +20496,15 @@ "binop": null, "updateContext": null }, - "start": 5607, - "end": 5608, + "start": 5508, + "end": 5509, "loc": { "start": { - "line": 210, + "line": 204, "column": 46 }, "end": { - "line": 210, + "line": 204, "column": 47 } } @@ -21353,15 +20522,15 @@ "binop": null }, "value": "bind", - "start": 5608, - "end": 5612, + "start": 5509, + "end": 5513, "loc": { "start": { - "line": 210, + "line": 204, "column": 47 }, "end": { - "line": 210, + "line": 204, "column": 51 } } @@ -21378,15 +20547,15 @@ "postfix": false, "binop": null }, - "start": 5612, - "end": 5613, + "start": 5513, + "end": 5514, "loc": { "start": { - "line": 210, + "line": 204, "column": 51 }, "end": { - "line": 210, + "line": 204, "column": 52 } } @@ -21404,15 +20573,15 @@ "binop": null }, "value": "system", - "start": 5613, - "end": 5619, + "start": 5514, + "end": 5520, "loc": { "start": { - "line": 210, + "line": 204, "column": 52 }, "end": { - "line": 210, + "line": 204, "column": 58 } } @@ -21429,15 +20598,15 @@ "postfix": false, "binop": null }, - "start": 5619, - "end": 5620, + "start": 5520, + "end": 5521, "loc": { "start": { - "line": 210, + "line": 204, "column": 58 }, "end": { - "line": 210, + "line": 204, "column": 59 } } @@ -21455,15 +20624,15 @@ "binop": null, "updateContext": null }, - "start": 5620, - "end": 5621, + "start": 5521, + "end": 5522, "loc": { "start": { - "line": 210, + "line": 204, "column": 59 }, "end": { - "line": 210, + "line": 204, "column": 60 } } @@ -21481,15 +20650,15 @@ "binop": null, "updateContext": null }, - "start": 5622, - "end": 5625, + "start": 5523, + "end": 5526, "loc": { "start": { - "line": 210, + "line": 204, "column": 61 }, "end": { - "line": 210, + "line": 204, "column": 64 } } @@ -21507,15 +20676,15 @@ "binop": null }, "value": "args", - "start": 5625, - "end": 5629, + "start": 5526, + "end": 5530, "loc": { "start": { - "line": 210, + "line": 204, "column": 64 }, "end": { - "line": 210, + "line": 204, "column": 68 } } @@ -21532,15 +20701,15 @@ "postfix": false, "binop": null }, - "start": 5629, - "end": 5630, + "start": 5530, + "end": 5531, "loc": { "start": { - "line": 210, + "line": 204, "column": 68 }, "end": { - "line": 210, + "line": 204, "column": 69 } } @@ -21557,15 +20726,15 @@ "postfix": false, "binop": null }, - "start": 5634, - "end": 5635, + "start": 5535, + "end": 5536, "loc": { "start": { - "line": 211, + "line": 205, "column": 3 }, "end": { - "line": 211, + "line": 205, "column": 4 } } @@ -21583,15 +20752,15 @@ "binop": null }, "value": "invoke", - "start": 5640, - "end": 5646, + "start": 5541, + "end": 5547, "loc": { "start": { - "line": 213, + "line": 207, "column": 3 }, "end": { - "line": 213, + "line": 207, "column": 9 } } @@ -21608,15 +20777,15 @@ "postfix": false, "binop": null }, - "start": 5646, - "end": 5647, + "start": 5547, + "end": 5548, "loc": { "start": { - "line": 213, + "line": 207, "column": 9 }, "end": { - "line": 213, + "line": 207, "column": 10 } } @@ -21634,15 +20803,15 @@ "binop": null }, "value": "system", - "start": 5647, - "end": 5653, + "start": 5548, + "end": 5554, "loc": { "start": { - "line": 213, + "line": 207, "column": 10 }, "end": { - "line": 213, + "line": 207, "column": 16 } } @@ -21660,15 +20829,15 @@ "binop": null, "updateContext": null }, - "start": 5653, - "end": 5654, + "start": 5554, + "end": 5555, "loc": { "start": { - "line": 213, + "line": 207, "column": 16 }, "end": { - "line": 213, + "line": 207, "column": 17 } } @@ -21687,15 +20856,15 @@ "updateContext": null }, "value": "post", - "start": 5655, - "end": 5661, + "start": 5556, + "end": 5562, "loc": { "start": { - "line": 213, + "line": 207, "column": 18 }, "end": { - "line": 213, + "line": 207, "column": 24 } } @@ -21713,15 +20882,15 @@ "binop": null, "updateContext": null }, - "start": 5661, - "end": 5662, + "start": 5562, + "end": 5563, "loc": { "start": { - "line": 213, + "line": 207, "column": 24 }, "end": { - "line": 213, + "line": 207, "column": 25 } } @@ -21739,15 +20908,15 @@ "binop": null, "updateContext": null }, - "start": 5663, - "end": 5666, + "start": 5564, + "end": 5567, "loc": { "start": { - "line": 213, + "line": 207, "column": 26 }, "end": { - "line": 213, + "line": 207, "column": 29 } } @@ -21765,15 +20934,15 @@ "binop": null }, "value": "args", - "start": 5666, - "end": 5670, + "start": 5567, + "end": 5571, "loc": { "start": { - "line": 213, + "line": 207, "column": 29 }, "end": { - "line": 213, + "line": 207, "column": 33 } } @@ -21790,15 +20959,15 @@ "postfix": false, "binop": null }, - "start": 5670, - "end": 5671, + "start": 5571, + "end": 5572, "loc": { "start": { - "line": 213, + "line": 207, "column": 33 }, "end": { - "line": 213, + "line": 207, "column": 34 } } @@ -21815,15 +20984,15 @@ "postfix": false, "binop": null }, - "start": 5674, - "end": 5675, + "start": 5575, + "end": 5576, "loc": { "start": { - "line": 214, + "line": 208, "column": 2 }, "end": { - "line": 214, + "line": 208, "column": 3 } } @@ -21840,15 +21009,15 @@ "postfix": false, "binop": null }, - "start": 5677, - "end": 5678, + "start": 5578, + "end": 5579, "loc": { "start": { - "line": 215, + "line": 209, "column": 1 }, "end": { - "line": 215, + "line": 209, "column": 2 } } @@ -21856,15 +21025,15 @@ { "type": "CommentBlock", "value": "*\n\t * Iterate through entities with the specified components\n\t *\n\t * @example\n\t * // Use a callback to process entities one-by-one\n\t * world.every(['comp'], comp => {comp.value = 0})\n\t *\n\t * @example\n\t * // Get an iterator for the entities\n\t * let it = world.every(['comp'])\n\t * for (let entity of it) {...}\n\t *\n\t * @param {Array} componentNames - The component names to match entites with. This checks if the entity\n\t * has ALL of the specified components, but does not check for additional components.\n\t * @param {Function} callback - The callback to call for each entity. Takes (...components, entity, ...args).\n\t * @param {...Object} [args] - Any additional arguments to pass to the callback.\n\t *\n\t * @return {MapIterator} An iterator to the entities themselves\n\t ", - "start": 5681, - "end": 6472, + "start": 5582, + "end": 6373, "loc": { "start": { - "line": 217, + "line": 211, "column": 1 }, "end": { - "line": 235, + "line": 229, "column": 4 } } @@ -21882,15 +21051,15 @@ "binop": null }, "value": "every", - "start": 6474, - "end": 6479, + "start": 6375, + "end": 6380, "loc": { "start": { - "line": 236, + "line": 230, "column": 1 }, "end": { - "line": 236, + "line": 230, "column": 6 } } @@ -21907,15 +21076,15 @@ "postfix": false, "binop": null }, - "start": 6479, - "end": 6480, + "start": 6380, + "end": 6381, "loc": { "start": { - "line": 236, + "line": 230, "column": 6 }, "end": { - "line": 236, + "line": 230, "column": 7 } } @@ -21933,15 +21102,15 @@ "binop": null }, "value": "componentNames", - "start": 6480, - "end": 6494, + "start": 6381, + "end": 6395, "loc": { "start": { - "line": 236, + "line": 230, "column": 7 }, "end": { - "line": 236, + "line": 230, "column": 21 } } @@ -21959,15 +21128,15 @@ "binop": null, "updateContext": null }, - "start": 6494, - "end": 6495, + "start": 6395, + "end": 6396, "loc": { "start": { - "line": 236, + "line": 230, "column": 21 }, "end": { - "line": 236, + "line": 230, "column": 22 } } @@ -21985,15 +21154,15 @@ "binop": null }, "value": "callback", - "start": 6496, - "end": 6504, + "start": 6397, + "end": 6405, "loc": { "start": { - "line": 236, + "line": 230, "column": 23 }, "end": { - "line": 236, + "line": 230, "column": 31 } } @@ -22011,15 +21180,15 @@ "binop": null, "updateContext": null }, - "start": 6504, - "end": 6505, + "start": 6405, + "end": 6406, "loc": { "start": { - "line": 236, + "line": 230, "column": 31 }, "end": { - "line": 236, + "line": 230, "column": 32 } } @@ -22037,15 +21206,15 @@ "binop": null, "updateContext": null }, - "start": 6506, - "end": 6509, + "start": 6407, + "end": 6410, "loc": { "start": { - "line": 236, + "line": 230, "column": 33 }, "end": { - "line": 236, + "line": 230, "column": 36 } } @@ -22063,15 +21232,15 @@ "binop": null }, "value": "args", - "start": 6509, - "end": 6513, + "start": 6410, + "end": 6414, "loc": { "start": { - "line": 236, + "line": 230, "column": 36 }, "end": { - "line": 236, + "line": 230, "column": 40 } } @@ -22088,15 +21257,15 @@ "postfix": false, "binop": null }, - "start": 6513, - "end": 6514, + "start": 6414, + "end": 6415, "loc": { "start": { - "line": 236, + "line": 230, "column": 40 }, "end": { - "line": 236, + "line": 230, "column": 41 } } @@ -22113,15 +21282,15 @@ "postfix": false, "binop": null }, - "start": 6515, - "end": 6516, + "start": 6416, + "end": 6417, "loc": { "start": { - "line": 236, + "line": 230, "column": 42 }, "end": { - "line": 236, + "line": 230, "column": 43 } } @@ -22129,15 +21298,15 @@ { "type": "CommentLine", "value": " Get indexed map of entities", - "start": 6519, - "end": 6549, + "start": 6420, + "end": 6450, "loc": { "start": { - "line": 237, + "line": 231, "column": 2 }, "end": { - "line": 237, + "line": 231, "column": 32 } } @@ -22157,15 +21326,15 @@ "updateContext": null }, "value": "let", - "start": 6552, - "end": 6555, + "start": 6453, + "end": 6456, "loc": { "start": { - "line": 238, + "line": 232, "column": 2 }, "end": { - "line": 238, + "line": 232, "column": 5 } } @@ -22183,15 +21352,15 @@ "binop": null }, "value": "entities", - "start": 6556, - "end": 6564, + "start": 6457, + "end": 6465, "loc": { "start": { - "line": 238, + "line": 232, "column": 6 }, "end": { - "line": 238, + "line": 232, "column": 14 } } @@ -22210,15 +21379,15 @@ "updateContext": null }, "value": "=", - "start": 6565, - "end": 6566, + "start": 6466, + "end": 6467, "loc": { "start": { - "line": 238, + "line": 232, "column": 15 }, "end": { - "line": 238, + "line": 232, "column": 16 } } @@ -22238,15 +21407,15 @@ "updateContext": null }, "value": "this", - "start": 6567, - "end": 6571, + "start": 6468, + "end": 6472, "loc": { "start": { - "line": 238, + "line": 232, "column": 17 }, "end": { - "line": 238, + "line": 232, "column": 21 } } @@ -22264,15 +21433,15 @@ "binop": null, "updateContext": null }, - "start": 6571, - "end": 6572, + "start": 6472, + "end": 6473, "loc": { "start": { - "line": 238, + "line": 232, "column": 21 }, "end": { - "line": 238, + "line": 232, "column": 22 } } @@ -22290,15 +21459,15 @@ "binop": null }, "value": "index", - "start": 6572, - "end": 6577, + "start": 6473, + "end": 6478, "loc": { "start": { - "line": 238, + "line": 232, "column": 22 }, "end": { - "line": 238, + "line": 232, "column": 27 } } @@ -22316,15 +21485,15 @@ "binop": null, "updateContext": null }, - "start": 6577, - "end": 6578, + "start": 6478, + "end": 6479, "loc": { "start": { - "line": 238, + "line": 232, "column": 27 }, "end": { - "line": 238, + "line": 232, "column": 28 } } @@ -22342,15 +21511,15 @@ "binop": null }, "value": "query", - "start": 6578, - "end": 6583, + "start": 6479, + "end": 6484, "loc": { "start": { - "line": 238, + "line": 232, "column": 28 }, "end": { - "line": 238, + "line": 232, "column": 33 } } @@ -22367,15 +21536,15 @@ "postfix": false, "binop": null }, - "start": 6583, - "end": 6584, + "start": 6484, + "end": 6485, "loc": { "start": { - "line": 238, + "line": 232, "column": 33 }, "end": { - "line": 238, + "line": 232, "column": 34 } } @@ -22393,15 +21562,15 @@ "binop": null }, "value": "componentNames", - "start": 6584, - "end": 6598, + "start": 6485, + "end": 6499, "loc": { "start": { - "line": 238, + "line": 232, "column": 34 }, "end": { - "line": 238, + "line": 232, "column": 48 } } @@ -22418,15 +21587,15 @@ "postfix": false, "binop": null }, - "start": 6598, - "end": 6599, + "start": 6499, + "end": 6500, "loc": { "start": { - "line": 238, + "line": 232, "column": 48 }, "end": { - "line": 238, + "line": 232, "column": 49 } } @@ -22446,15 +21615,15 @@ "updateContext": null }, "value": "if", - "start": 6603, - "end": 6605, + "start": 6504, + "end": 6506, "loc": { "start": { - "line": 240, + "line": 234, "column": 2 }, "end": { - "line": 240, + "line": 234, "column": 4 } } @@ -22471,15 +21640,15 @@ "postfix": false, "binop": null }, - "start": 6606, - "end": 6607, + "start": 6507, + "end": 6508, "loc": { "start": { - "line": 240, + "line": 234, "column": 5 }, "end": { - "line": 240, + "line": 234, "column": 6 } } @@ -22497,15 +21666,15 @@ "binop": null }, "value": "isFunction", - "start": 6607, - "end": 6617, + "start": 6508, + "end": 6518, "loc": { "start": { - "line": 240, + "line": 234, "column": 6 }, "end": { - "line": 240, + "line": 234, "column": 16 } } @@ -22522,15 +21691,15 @@ "postfix": false, "binop": null }, - "start": 6617, - "end": 6618, + "start": 6518, + "end": 6519, "loc": { "start": { - "line": 240, + "line": 234, "column": 16 }, "end": { - "line": 240, + "line": 234, "column": 17 } } @@ -22548,15 +21717,15 @@ "binop": null }, "value": "callback", - "start": 6618, - "end": 6626, + "start": 6519, + "end": 6527, "loc": { "start": { - "line": 240, + "line": 234, "column": 17 }, "end": { - "line": 240, + "line": 234, "column": 25 } } @@ -22573,15 +21742,15 @@ "postfix": false, "binop": null }, - "start": 6626, - "end": 6627, + "start": 6527, + "end": 6528, "loc": { "start": { - "line": 240, + "line": 234, "column": 25 }, "end": { - "line": 240, + "line": 234, "column": 26 } } @@ -22598,15 +21767,15 @@ "postfix": false, "binop": null }, - "start": 6627, - "end": 6628, + "start": 6528, + "end": 6529, "loc": { "start": { - "line": 240, + "line": 234, "column": 26 }, "end": { - "line": 240, + "line": 234, "column": 27 } } @@ -22623,15 +21792,15 @@ "postfix": false, "binop": null }, - "start": 6629, - "end": 6630, + "start": 6530, + "end": 6531, "loc": { "start": { - "line": 240, + "line": 234, "column": 28 }, "end": { - "line": 240, + "line": 234, "column": 29 } } @@ -22639,15 +21808,15 @@ { "type": "CommentLine", "value": " Go through the map of entities", - "start": 6634, - "end": 6667, + "start": 6535, + "end": 6568, "loc": { "start": { - "line": 241, + "line": 235, "column": 3 }, "end": { - "line": 241, + "line": 235, "column": 36 } } @@ -22667,15 +21836,15 @@ "updateContext": null }, "value": "for", - "start": 6671, - "end": 6674, + "start": 6572, + "end": 6575, "loc": { "start": { - "line": 242, + "line": 236, "column": 3 }, "end": { - "line": 242, + "line": 236, "column": 6 } } @@ -22692,15 +21861,15 @@ "postfix": false, "binop": null }, - "start": 6675, - "end": 6676, + "start": 6576, + "end": 6577, "loc": { "start": { - "line": 242, + "line": 236, "column": 7 }, "end": { - "line": 242, + "line": 236, "column": 8 } } @@ -22720,15 +21889,15 @@ "updateContext": null }, "value": "let", - "start": 6676, - "end": 6679, + "start": 6577, + "end": 6580, "loc": { "start": { - "line": 242, + "line": 236, "column": 8 }, "end": { - "line": 242, + "line": 236, "column": 11 } } @@ -22746,15 +21915,15 @@ "binop": null }, "value": "entity", - "start": 6680, - "end": 6686, + "start": 6581, + "end": 6587, "loc": { "start": { - "line": 242, + "line": 236, "column": 12 }, "end": { - "line": 242, + "line": 236, "column": 18 } } @@ -22772,15 +21941,15 @@ "binop": null }, "value": "of", - "start": 6687, - "end": 6689, + "start": 6588, + "end": 6590, "loc": { "start": { - "line": 242, + "line": 236, "column": 19 }, "end": { - "line": 242, + "line": 236, "column": 21 } } @@ -22798,15 +21967,15 @@ "binop": null }, "value": "entities", - "start": 6690, - "end": 6698, + "start": 6591, + "end": 6599, "loc": { "start": { - "line": 242, + "line": 236, "column": 22 }, "end": { - "line": 242, + "line": 236, "column": 30 } } @@ -22824,15 +21993,15 @@ "binop": null, "updateContext": null }, - "start": 6698, - "end": 6699, + "start": 6599, + "end": 6600, "loc": { "start": { - "line": 242, + "line": 236, "column": 30 }, "end": { - "line": 242, + "line": 236, "column": 31 } } @@ -22850,15 +22019,15 @@ "binop": null }, "value": "values", - "start": 6699, - "end": 6705, + "start": 6600, + "end": 6606, "loc": { "start": { - "line": 242, + "line": 236, "column": 31 }, "end": { - "line": 242, + "line": 236, "column": 37 } } @@ -22875,15 +22044,15 @@ "postfix": false, "binop": null }, - "start": 6705, - "end": 6706, + "start": 6606, + "end": 6607, "loc": { "start": { - "line": 242, + "line": 236, "column": 37 }, "end": { - "line": 242, + "line": 236, "column": 38 } } @@ -22900,15 +22069,15 @@ "postfix": false, "binop": null }, - "start": 6706, - "end": 6707, + "start": 6607, + "end": 6608, "loc": { "start": { - "line": 242, + "line": 236, "column": 38 }, "end": { - "line": 242, + "line": 236, "column": 39 } } @@ -22925,15 +22094,15 @@ "postfix": false, "binop": null }, - "start": 6707, - "end": 6708, + "start": 6608, + "end": 6609, "loc": { "start": { - "line": 242, + "line": 236, "column": 39 }, "end": { - "line": 242, + "line": 236, "column": 40 } } @@ -22950,15 +22119,15 @@ "postfix": false, "binop": null }, - "start": 6709, - "end": 6710, + "start": 6610, + "end": 6611, "loc": { "start": { - "line": 242, + "line": 236, "column": 41 }, "end": { - "line": 242, + "line": 236, "column": 42 } } @@ -22966,15 +22135,15 @@ { "type": "CommentLine", "value": " At this point, we can safely assume that all components exist, even if entities/components", - "start": 6715, - "end": 6808, + "start": 6616, + "end": 6709, "loc": { "start": { - "line": 243, + "line": 237, "column": 4 }, "end": { - "line": 243, + "line": 237, "column": 97 } } @@ -22982,15 +22151,15 @@ { "type": "CommentLine", "value": " are deleted/modified during the loop, because JavaScript's MapIterator is smart enough.", - "start": 6813, - "end": 6903, + "start": 6714, + "end": 6804, "loc": { "start": { - "line": 244, + "line": 238, "column": 4 }, "end": { - "line": 244, + "line": 238, "column": 94 } } @@ -22998,15 +22167,15 @@ { "type": "CommentLine", "value": " Get all components as an array", - "start": 6909, - "end": 6942, + "start": 6810, + "end": 6843, "loc": { "start": { - "line": 246, + "line": 240, "column": 4 }, "end": { - "line": 246, + "line": 240, "column": 37 } } @@ -23026,15 +22195,15 @@ "updateContext": null }, "value": "let", - "start": 6947, - "end": 6950, + "start": 6848, + "end": 6851, "loc": { "start": { - "line": 247, + "line": 241, "column": 4 }, "end": { - "line": 247, + "line": 241, "column": 7 } } @@ -23052,15 +22221,15 @@ "binop": null }, "value": "components", - "start": 6951, - "end": 6961, + "start": 6852, + "end": 6862, "loc": { "start": { - "line": 247, + "line": 241, "column": 8 }, "end": { - "line": 247, + "line": 241, "column": 18 } } @@ -23079,15 +22248,15 @@ "updateContext": null }, "value": "=", - "start": 6962, - "end": 6963, + "start": 6863, + "end": 6864, "loc": { "start": { - "line": 247, + "line": 241, "column": 19 }, "end": { - "line": 247, + "line": 241, "column": 20 } } @@ -23105,15 +22274,15 @@ "binop": null }, "value": "componentNames", - "start": 6964, - "end": 6978, + "start": 6865, + "end": 6879, "loc": { "start": { - "line": 247, + "line": 241, "column": 21 }, "end": { - "line": 247, + "line": 241, "column": 35 } } @@ -23131,15 +22300,15 @@ "binop": null, "updateContext": null }, - "start": 6978, - "end": 6979, + "start": 6879, + "end": 6880, "loc": { "start": { - "line": 247, + "line": 241, "column": 35 }, "end": { - "line": 247, + "line": 241, "column": 36 } } @@ -23157,15 +22326,15 @@ "binop": null }, "value": "map", - "start": 6979, - "end": 6982, + "start": 6880, + "end": 6883, "loc": { "start": { - "line": 247, + "line": 241, "column": 36 }, "end": { - "line": 247, + "line": 241, "column": 39 } } @@ -23182,15 +22351,15 @@ "postfix": false, "binop": null }, - "start": 6982, - "end": 6983, + "start": 6883, + "end": 6884, "loc": { "start": { - "line": 247, + "line": 241, "column": 39 }, "end": { - "line": 247, + "line": 241, "column": 40 } } @@ -23208,15 +22377,15 @@ "binop": null }, "value": "name", - "start": 6983, - "end": 6987, + "start": 6884, + "end": 6888, "loc": { "start": { - "line": 247, + "line": 241, "column": 40 }, "end": { - "line": 247, + "line": 241, "column": 44 } } @@ -23234,15 +22403,15 @@ "binop": null, "updateContext": null }, - "start": 6988, - "end": 6990, + "start": 6889, + "end": 6891, "loc": { "start": { - "line": 247, + "line": 241, "column": 45 }, "end": { - "line": 247, + "line": 241, "column": 47 } } @@ -23260,15 +22429,15 @@ "binop": null }, "value": "entity", - "start": 6991, - "end": 6997, + "start": 6892, + "end": 6898, "loc": { "start": { - "line": 247, + "line": 241, "column": 48 }, "end": { - "line": 247, + "line": 241, "column": 54 } } @@ -23286,15 +22455,15 @@ "binop": null, "updateContext": null }, - "start": 6997, - "end": 6998, + "start": 6898, + "end": 6899, "loc": { "start": { - "line": 247, + "line": 241, "column": 54 }, "end": { - "line": 247, + "line": 241, "column": 55 } } @@ -23312,15 +22481,15 @@ "binop": null }, "value": "get", - "start": 6998, - "end": 7001, + "start": 6899, + "end": 6902, "loc": { "start": { - "line": 247, + "line": 241, "column": 55 }, "end": { - "line": 247, + "line": 241, "column": 58 } } @@ -23337,15 +22506,15 @@ "postfix": false, "binop": null }, - "start": 7001, - "end": 7002, + "start": 6902, + "end": 6903, "loc": { "start": { - "line": 247, + "line": 241, "column": 58 }, "end": { - "line": 247, + "line": 241, "column": 59 } } @@ -23363,15 +22532,15 @@ "binop": null }, "value": "name", - "start": 7002, - "end": 7006, + "start": 6903, + "end": 6907, "loc": { "start": { - "line": 247, + "line": 241, "column": 59 }, "end": { - "line": 247, + "line": 241, "column": 63 } } @@ -23388,15 +22557,15 @@ "postfix": false, "binop": null }, - "start": 7006, - "end": 7007, + "start": 6907, + "end": 6908, "loc": { "start": { - "line": 247, + "line": 241, "column": 63 }, "end": { - "line": 247, + "line": 241, "column": 64 } } @@ -23413,15 +22582,15 @@ "postfix": false, "binop": null }, - "start": 7007, - "end": 7008, + "start": 6908, + "end": 6909, "loc": { "start": { - "line": 247, + "line": 241, "column": 64 }, "end": { - "line": 247, + "line": 241, "column": 65 } } @@ -23429,15 +22598,15 @@ { "type": "CommentLine", "value": " Pass components, then the main entity, then any additional arguments", - "start": 7014, - "end": 7085, + "start": 6915, + "end": 6986, "loc": { "start": { - "line": 249, + "line": 243, "column": 4 }, "end": { - "line": 249, + "line": 243, "column": 75 } } @@ -23457,15 +22626,15 @@ "updateContext": null }, "value": "let", - "start": 7090, - "end": 7093, + "start": 6991, + "end": 6994, "loc": { "start": { - "line": 250, + "line": 244, "column": 4 }, "end": { - "line": 250, + "line": 244, "column": 7 } } @@ -23483,15 +22652,15 @@ "binop": null }, "value": "status", - "start": 7094, - "end": 7100, + "start": 6995, + "end": 7001, "loc": { "start": { - "line": 250, + "line": 244, "column": 8 }, "end": { - "line": 250, + "line": 244, "column": 14 } } @@ -23510,15 +22679,15 @@ "updateContext": null }, "value": "=", - "start": 7101, - "end": 7102, + "start": 7002, + "end": 7003, "loc": { "start": { - "line": 250, + "line": 244, "column": 15 }, "end": { - "line": 250, + "line": 244, "column": 16 } } @@ -23536,15 +22705,15 @@ "binop": null }, "value": "callback", - "start": 7103, - "end": 7111, + "start": 7004, + "end": 7012, "loc": { "start": { - "line": 250, + "line": 244, "column": 17 }, "end": { - "line": 250, + "line": 244, "column": 25 } } @@ -23561,15 +22730,15 @@ "postfix": false, "binop": null }, - "start": 7111, - "end": 7112, + "start": 7012, + "end": 7013, "loc": { "start": { - "line": 250, + "line": 244, "column": 25 }, "end": { - "line": 250, + "line": 244, "column": 26 } } @@ -23587,15 +22756,15 @@ "binop": null, "updateContext": null }, - "start": 7112, - "end": 7115, + "start": 7013, + "end": 7016, "loc": { "start": { - "line": 250, + "line": 244, "column": 26 }, "end": { - "line": 250, + "line": 244, "column": 29 } } @@ -23613,15 +22782,15 @@ "binop": null }, "value": "components", - "start": 7115, - "end": 7125, + "start": 7016, + "end": 7026, "loc": { "start": { - "line": 250, + "line": 244, "column": 29 }, "end": { - "line": 250, + "line": 244, "column": 39 } } @@ -23639,15 +22808,15 @@ "binop": null, "updateContext": null }, - "start": 7125, - "end": 7126, + "start": 7026, + "end": 7027, "loc": { "start": { - "line": 250, + "line": 244, "column": 39 }, "end": { - "line": 250, + "line": 244, "column": 40 } } @@ -23665,15 +22834,15 @@ "binop": null }, "value": "entity", - "start": 7127, - "end": 7133, + "start": 7028, + "end": 7034, "loc": { "start": { - "line": 250, + "line": 244, "column": 41 }, "end": { - "line": 250, + "line": 244, "column": 47 } } @@ -23691,15 +22860,15 @@ "binop": null, "updateContext": null }, - "start": 7133, - "end": 7134, + "start": 7034, + "end": 7035, "loc": { "start": { - "line": 250, + "line": 244, "column": 47 }, "end": { - "line": 250, + "line": 244, "column": 48 } } @@ -23717,15 +22886,15 @@ "binop": null, "updateContext": null }, - "start": 7135, - "end": 7138, + "start": 7036, + "end": 7039, "loc": { "start": { - "line": 250, + "line": 244, "column": 49 }, "end": { - "line": 250, + "line": 244, "column": 52 } } @@ -23743,15 +22912,15 @@ "binop": null }, "value": "args", - "start": 7138, - "end": 7142, + "start": 7039, + "end": 7043, "loc": { "start": { - "line": 250, + "line": 244, "column": 52 }, "end": { - "line": 250, + "line": 244, "column": 56 } } @@ -23768,15 +22937,15 @@ "postfix": false, "binop": null }, - "start": 7142, - "end": 7143, + "start": 7043, + "end": 7044, "loc": { "start": { - "line": 250, + "line": 244, "column": 56 }, "end": { - "line": 250, + "line": 244, "column": 57 } } @@ -23784,15 +22953,15 @@ { "type": "CommentLine", "value": " Stop the iteration when the callback returns false", - "start": 7149, - "end": 7202, + "start": 7050, + "end": 7103, "loc": { "start": { - "line": 252, + "line": 246, "column": 4 }, "end": { - "line": 252, + "line": 246, "column": 57 } } @@ -23812,15 +22981,15 @@ "updateContext": null }, "value": "if", - "start": 7207, - "end": 7209, + "start": 7108, + "end": 7110, "loc": { "start": { - "line": 253, + "line": 247, "column": 4 }, "end": { - "line": 253, + "line": 247, "column": 6 } } @@ -23837,15 +23006,15 @@ "postfix": false, "binop": null }, - "start": 7210, - "end": 7211, + "start": 7111, + "end": 7112, "loc": { "start": { - "line": 253, + "line": 247, "column": 7 }, "end": { - "line": 253, + "line": 247, "column": 8 } } @@ -23863,15 +23032,15 @@ "binop": null }, "value": "status", - "start": 7211, - "end": 7217, + "start": 7112, + "end": 7118, "loc": { "start": { - "line": 253, + "line": 247, "column": 8 }, "end": { - "line": 253, + "line": 247, "column": 14 } } @@ -23890,15 +23059,15 @@ "updateContext": null }, "value": "===", - "start": 7218, - "end": 7221, + "start": 7119, + "end": 7122, "loc": { "start": { - "line": 253, + "line": 247, "column": 15 }, "end": { - "line": 253, + "line": 247, "column": 18 } } @@ -23918,15 +23087,15 @@ "updateContext": null }, "value": "false", - "start": 7222, - "end": 7227, + "start": 7123, + "end": 7128, "loc": { "start": { - "line": 253, + "line": 247, "column": 19 }, "end": { - "line": 253, + "line": 247, "column": 24 } } @@ -23943,15 +23112,15 @@ "postfix": false, "binop": null }, - "start": 7227, - "end": 7228, + "start": 7128, + "end": 7129, "loc": { "start": { - "line": 253, + "line": 247, "column": 24 }, "end": { - "line": 253, + "line": 247, "column": 25 } } @@ -23968,15 +23137,15 @@ "postfix": false, "binop": null }, - "start": 7229, - "end": 7230, + "start": 7130, + "end": 7131, "loc": { "start": { - "line": 253, + "line": 247, "column": 26 }, "end": { - "line": 253, + "line": 247, "column": 27 } } @@ -23996,15 +23165,15 @@ "updateContext": null }, "value": "break", - "start": 7236, - "end": 7241, + "start": 7137, + "end": 7142, "loc": { "start": { - "line": 254, + "line": 248, "column": 5 }, "end": { - "line": 254, + "line": 248, "column": 10 } } @@ -24021,15 +23190,15 @@ "postfix": false, "binop": null }, - "start": 7246, - "end": 7247, + "start": 7147, + "end": 7148, "loc": { "start": { - "line": 255, + "line": 249, "column": 4 }, "end": { - "line": 255, + "line": 249, "column": 5 } } @@ -24046,15 +23215,15 @@ "postfix": false, "binop": null }, - "start": 7251, - "end": 7252, + "start": 7152, + "end": 7153, "loc": { "start": { - "line": 256, + "line": 250, "column": 3 }, "end": { - "line": 256, + "line": 250, "column": 4 } } @@ -24071,15 +23240,15 @@ "postfix": false, "binop": null }, - "start": 7255, - "end": 7256, + "start": 7156, + "end": 7157, "loc": { "start": { - "line": 257, + "line": 251, "column": 2 }, "end": { - "line": 257, + "line": 251, "column": 3 } } @@ -24099,15 +23268,15 @@ "updateContext": null }, "value": "return", - "start": 7260, - "end": 7266, + "start": 7161, + "end": 7167, "loc": { "start": { - "line": 259, + "line": 253, "column": 2 }, "end": { - "line": 259, + "line": 253, "column": 8 } } @@ -24125,15 +23294,15 @@ "binop": null }, "value": "entities", - "start": 7267, - "end": 7275, + "start": 7168, + "end": 7176, "loc": { "start": { - "line": 259, + "line": 253, "column": 9 }, "end": { - "line": 259, + "line": 253, "column": 17 } } @@ -24151,15 +23320,15 @@ "binop": null, "updateContext": null }, - "start": 7275, - "end": 7276, + "start": 7176, + "end": 7177, "loc": { "start": { - "line": 259, + "line": 253, "column": 17 }, "end": { - "line": 259, + "line": 253, "column": 18 } } @@ -24177,15 +23346,15 @@ "binop": null }, "value": "values", - "start": 7276, - "end": 7282, + "start": 7177, + "end": 7183, "loc": { "start": { - "line": 259, + "line": 253, "column": 18 }, "end": { - "line": 259, + "line": 253, "column": 24 } } @@ -24202,15 +23371,15 @@ "postfix": false, "binop": null }, - "start": 7282, - "end": 7283, + "start": 7183, + "end": 7184, "loc": { "start": { - "line": 259, + "line": 253, "column": 24 }, "end": { - "line": 259, + "line": 253, "column": 25 } } @@ -24227,15 +23396,15 @@ "postfix": false, "binop": null }, - "start": 7283, - "end": 7284, + "start": 7184, + "end": 7185, "loc": { "start": { - "line": 259, + "line": 253, "column": 25 }, "end": { - "line": 259, + "line": 253, "column": 26 } } @@ -24252,15 +23421,15 @@ "postfix": false, "binop": null }, - "start": 7286, - "end": 7287, + "start": 7187, + "end": 7188, "loc": { "start": { - "line": 260, + "line": 254, "column": 1 }, "end": { - "line": 260, + "line": 254, "column": 2 } } @@ -24268,15 +23437,15 @@ { "type": "CommentBlock", "value": "*\n\t * Returns an array of entities with matching components\n\t * Simplified version of every(), returns an actual array, and only takes component names as arguments.\n\t *\n\t * @example\n\t * world.get('player', 'sprite')\n\t *\n\t * @param {Array} componentNames - The component names to match on. See every() for how this matches.\n\t *\n\t * @return {Array} Array of entities, instead of iterator like every().\n\t ", - "start": 7290, - "end": 7696, + "start": 7191, + "end": 7597, "loc": { "start": { - "line": 262, + "line": 256, "column": 1 }, "end": { - "line": 272, + "line": 266, "column": 4 } } @@ -24294,15 +23463,15 @@ "binop": null }, "value": "get", - "start": 7698, - "end": 7701, + "start": 7599, + "end": 7602, "loc": { "start": { - "line": 273, + "line": 267, "column": 1 }, "end": { - "line": 273, + "line": 267, "column": 4 } } @@ -24319,15 +23488,15 @@ "postfix": false, "binop": null }, - "start": 7701, - "end": 7702, + "start": 7602, + "end": 7603, "loc": { "start": { - "line": 273, + "line": 267, "column": 4 }, "end": { - "line": 273, + "line": 267, "column": 5 } } @@ -24345,15 +23514,15 @@ "binop": null, "updateContext": null }, - "start": 7702, - "end": 7705, + "start": 7603, + "end": 7606, "loc": { "start": { - "line": 273, + "line": 267, "column": 5 }, "end": { - "line": 273, + "line": 267, "column": 8 } } @@ -24371,15 +23540,15 @@ "binop": null }, "value": "componentNames", - "start": 7705, - "end": 7719, + "start": 7606, + "end": 7620, "loc": { "start": { - "line": 273, + "line": 267, "column": 8 }, "end": { - "line": 273, + "line": 267, "column": 22 } } @@ -24396,15 +23565,15 @@ "postfix": false, "binop": null }, - "start": 7719, - "end": 7720, + "start": 7620, + "end": 7621, "loc": { "start": { - "line": 273, + "line": 267, "column": 22 }, "end": { - "line": 273, + "line": 267, "column": 23 } } @@ -24421,15 +23590,15 @@ "postfix": false, "binop": null }, - "start": 7721, - "end": 7722, + "start": 7622, + "end": 7623, "loc": { "start": { - "line": 273, + "line": 267, "column": 24 }, "end": { - "line": 273, + "line": 267, "column": 25 } } @@ -24449,15 +23618,15 @@ "updateContext": null }, "value": "return", - "start": 7725, - "end": 7731, + "start": 7626, + "end": 7632, "loc": { "start": { - "line": 274, + "line": 268, "column": 2 }, "end": { - "line": 274, + "line": 268, "column": 8 } } @@ -24475,15 +23644,15 @@ "binop": null, "updateContext": null }, - "start": 7732, - "end": 7733, + "start": 7633, + "end": 7634, "loc": { "start": { - "line": 274, + "line": 268, "column": 9 }, "end": { - "line": 274, + "line": 268, "column": 10 } } @@ -24501,15 +23670,15 @@ "binop": null, "updateContext": null }, - "start": 7733, - "end": 7736, + "start": 7634, + "end": 7637, "loc": { "start": { - "line": 274, + "line": 268, "column": 10 }, "end": { - "line": 274, + "line": 268, "column": 13 } } @@ -24529,15 +23698,15 @@ "updateContext": null }, "value": "this", - "start": 7736, - "end": 7740, + "start": 7637, + "end": 7641, "loc": { "start": { - "line": 274, + "line": 268, "column": 13 }, "end": { - "line": 274, + "line": 268, "column": 17 } } @@ -24555,15 +23724,15 @@ "binop": null, "updateContext": null }, - "start": 7740, - "end": 7741, + "start": 7641, + "end": 7642, "loc": { "start": { - "line": 274, + "line": 268, "column": 17 }, "end": { - "line": 274, + "line": 268, "column": 18 } } @@ -24581,15 +23750,15 @@ "binop": null }, "value": "every", - "start": 7741, - "end": 7746, + "start": 7642, + "end": 7647, "loc": { "start": { - "line": 274, + "line": 268, "column": 18 }, "end": { - "line": 274, + "line": 268, "column": 23 } } @@ -24606,15 +23775,15 @@ "postfix": false, "binop": null }, - "start": 7746, - "end": 7747, + "start": 7647, + "end": 7648, "loc": { "start": { - "line": 274, + "line": 268, "column": 23 }, "end": { - "line": 274, + "line": 268, "column": 24 } } @@ -24632,15 +23801,15 @@ "binop": null }, "value": "componentNames", - "start": 7747, - "end": 7761, + "start": 7648, + "end": 7662, "loc": { "start": { - "line": 274, + "line": 268, "column": 24 }, "end": { - "line": 274, + "line": 268, "column": 38 } } @@ -24657,15 +23826,15 @@ "postfix": false, "binop": null }, - "start": 7761, - "end": 7762, + "start": 7662, + "end": 7663, "loc": { "start": { - "line": 274, + "line": 268, "column": 38 }, "end": { - "line": 274, + "line": 268, "column": 39 } } @@ -24683,15 +23852,15 @@ "binop": null, "updateContext": null }, - "start": 7762, - "end": 7763, + "start": 7663, + "end": 7664, "loc": { "start": { - "line": 274, + "line": 268, "column": 39 }, "end": { - "line": 274, + "line": 268, "column": 40 } } @@ -24708,15 +23877,15 @@ "postfix": false, "binop": null }, - "start": 7765, - "end": 7766, + "start": 7666, + "end": 7667, "loc": { "start": { - "line": 275, + "line": 269, "column": 1 }, "end": { - "line": 275, + "line": 269, "column": 2 } } @@ -24724,15 +23893,15 @@ { "type": "CommentBlock", "value": "*\n\t * Registers entity prototype(s). Any existing prototype names that are the same will be overwritten\n\t *\n\t * @example\n\t * world.prototype({\n\t * Movable: {\n\t * position: {},\n\t * velocity: {}\n\t * }\n\t * })\n\t *\n\t * @param {Object} data - Object structure to register as a prototype. Should be a dictionary with the top level keys\n\t * being the prototype names. Can also be a JSON formatted string.\n\t *\n\t * @return {number} Number of prototypes added.\n\t ", - "start": 7769, - "end": 8249, + "start": 7670, + "end": 8150, "loc": { "start": { - "line": 277, + "line": 271, "column": 1 }, "end": { - "line": 292, + "line": 286, "column": 4 } } @@ -24750,15 +23919,15 @@ "binop": null }, "value": "prototype", - "start": 8251, - "end": 8260, + "start": 8152, + "end": 8161, "loc": { "start": { - "line": 293, + "line": 287, "column": 1 }, "end": { - "line": 293, + "line": 287, "column": 10 } } @@ -24775,15 +23944,15 @@ "postfix": false, "binop": null }, - "start": 8260, - "end": 8261, + "start": 8161, + "end": 8162, "loc": { "start": { - "line": 293, + "line": 287, "column": 10 }, "end": { - "line": 293, + "line": 287, "column": 11 } } @@ -24801,15 +23970,15 @@ "binop": null }, "value": "data", - "start": 8261, - "end": 8265, + "start": 8162, + "end": 8166, "loc": { "start": { - "line": 293, + "line": 287, "column": 11 }, "end": { - "line": 293, + "line": 287, "column": 15 } } @@ -24826,15 +23995,15 @@ "postfix": false, "binop": null }, - "start": 8265, - "end": 8266, + "start": 8166, + "end": 8167, "loc": { "start": { - "line": 293, + "line": 287, "column": 15 }, "end": { - "line": 293, + "line": 287, "column": 16 } } @@ -24851,15 +24020,15 @@ "postfix": false, "binop": null }, - "start": 8267, - "end": 8268, + "start": 8168, + "end": 8169, "loc": { "start": { - "line": 293, + "line": 287, "column": 17 }, "end": { - "line": 293, + "line": 287, "column": 18 } } @@ -24879,15 +24048,15 @@ "updateContext": null }, "value": "let", - "start": 8271, - "end": 8274, + "start": 8172, + "end": 8175, "loc": { "start": { - "line": 294, + "line": 288, "column": 2 }, "end": { - "line": 294, + "line": 288, "column": 5 } } @@ -24905,15 +24074,15 @@ "binop": null }, "value": "count", - "start": 8275, - "end": 8280, + "start": 8176, + "end": 8181, "loc": { "start": { - "line": 294, + "line": 288, "column": 6 }, "end": { - "line": 294, + "line": 288, "column": 11 } } @@ -24932,15 +24101,15 @@ "updateContext": null }, "value": "=", - "start": 8281, - "end": 8282, + "start": 8182, + "end": 8183, "loc": { "start": { - "line": 294, + "line": 288, "column": 12 }, "end": { - "line": 294, + "line": 288, "column": 13 } } @@ -24959,15 +24128,15 @@ "updateContext": null }, "value": 0, - "start": 8283, - "end": 8284, + "start": 8184, + "end": 8185, "loc": { "start": { - "line": 294, + "line": 288, "column": 14 }, "end": { - "line": 294, + "line": 288, "column": 15 } } @@ -24975,15 +24144,15 @@ { "type": "CommentLine", "value": " Convert to an object when given a string", - "start": 8288, - "end": 8331, + "start": 8189, + "end": 8232, "loc": { "start": { - "line": 296, + "line": 290, "column": 2 }, "end": { - "line": 296, + "line": 290, "column": 45 } } @@ -25003,15 +24172,15 @@ "updateContext": null }, "value": "if", - "start": 8334, - "end": 8336, + "start": 8235, + "end": 8237, "loc": { "start": { - "line": 297, + "line": 291, "column": 2 }, "end": { - "line": 297, + "line": 291, "column": 4 } } @@ -25028,15 +24197,15 @@ "postfix": false, "binop": null }, - "start": 8337, - "end": 8338, + "start": 8238, + "end": 8239, "loc": { "start": { - "line": 297, + "line": 291, "column": 5 }, "end": { - "line": 297, + "line": 291, "column": 6 } } @@ -25056,15 +24225,15 @@ "updateContext": null }, "value": "typeof", - "start": 8338, - "end": 8344, + "start": 8239, + "end": 8245, "loc": { "start": { - "line": 297, + "line": 291, "column": 6 }, "end": { - "line": 297, + "line": 291, "column": 12 } } @@ -25082,15 +24251,15 @@ "binop": null }, "value": "data", - "start": 8345, - "end": 8349, + "start": 8246, + "end": 8250, "loc": { "start": { - "line": 297, + "line": 291, "column": 13 }, "end": { - "line": 297, + "line": 291, "column": 17 } } @@ -25109,15 +24278,15 @@ "updateContext": null }, "value": "===", - "start": 8350, - "end": 8353, + "start": 8251, + "end": 8254, "loc": { "start": { - "line": 297, + "line": 291, "column": 18 }, "end": { - "line": 297, + "line": 291, "column": 21 } } @@ -25136,15 +24305,15 @@ "updateContext": null }, "value": "string", - "start": 8354, - "end": 8362, + "start": 8255, + "end": 8263, "loc": { "start": { - "line": 297, + "line": 291, "column": 22 }, "end": { - "line": 297, + "line": 291, "column": 30 } } @@ -25161,15 +24330,15 @@ "postfix": false, "binop": null }, - "start": 8362, - "end": 8363, + "start": 8263, + "end": 8264, "loc": { "start": { - "line": 297, + "line": 291, "column": 30 }, "end": { - "line": 297, + "line": 291, "column": 31 } } @@ -25186,15 +24355,15 @@ "postfix": false, "binop": null }, - "start": 8364, - "end": 8365, + "start": 8265, + "end": 8266, "loc": { "start": { - "line": 297, + "line": 291, "column": 32 }, "end": { - "line": 297, + "line": 291, "column": 33 } } @@ -25212,15 +24381,15 @@ "binop": null }, "value": "data", - "start": 8369, - "end": 8373, + "start": 8270, + "end": 8274, "loc": { "start": { - "line": 298, + "line": 292, "column": 3 }, "end": { - "line": 298, + "line": 292, "column": 7 } } @@ -25239,15 +24408,15 @@ "updateContext": null }, "value": "=", - "start": 8374, - "end": 8375, + "start": 8275, + "end": 8276, "loc": { "start": { - "line": 298, + "line": 292, "column": 8 }, "end": { - "line": 298, + "line": 292, "column": 9 } } @@ -25265,15 +24434,15 @@ "binop": null }, "value": "JSON", - "start": 8376, - "end": 8380, + "start": 8277, + "end": 8281, "loc": { "start": { - "line": 298, + "line": 292, "column": 10 }, "end": { - "line": 298, + "line": 292, "column": 14 } } @@ -25291,15 +24460,15 @@ "binop": null, "updateContext": null }, - "start": 8380, - "end": 8381, + "start": 8281, + "end": 8282, "loc": { "start": { - "line": 298, + "line": 292, "column": 14 }, "end": { - "line": 298, + "line": 292, "column": 15 } } @@ -25317,15 +24486,15 @@ "binop": null }, "value": "parse", - "start": 8381, - "end": 8386, + "start": 8282, + "end": 8287, "loc": { "start": { - "line": 298, + "line": 292, "column": 15 }, "end": { - "line": 298, + "line": 292, "column": 20 } } @@ -25342,15 +24511,15 @@ "postfix": false, "binop": null }, - "start": 8386, - "end": 8387, + "start": 8287, + "end": 8288, "loc": { "start": { - "line": 298, + "line": 292, "column": 20 }, "end": { - "line": 298, + "line": 292, "column": 21 } } @@ -25368,15 +24537,15 @@ "binop": null }, "value": "data", - "start": 8387, - "end": 8391, + "start": 8288, + "end": 8292, "loc": { "start": { - "line": 298, + "line": 292, "column": 21 }, "end": { - "line": 298, + "line": 292, "column": 25 } } @@ -25393,15 +24562,15 @@ "postfix": false, "binop": null }, - "start": 8391, - "end": 8392, + "start": 8292, + "end": 8293, "loc": { "start": { - "line": 298, + "line": 292, "column": 25 }, "end": { - "line": 298, + "line": 292, "column": 26 } } @@ -25418,15 +24587,15 @@ "postfix": false, "binop": null }, - "start": 8395, - "end": 8396, + "start": 8296, + "end": 8297, "loc": { "start": { - "line": 299, + "line": 293, "column": 2 }, "end": { - "line": 299, + "line": 293, "column": 3 } } @@ -25434,15 +24603,15 @@ { "type": "CommentLine", "value": " Data must be an object at this point", - "start": 8400, - "end": 8439, + "start": 8301, + "end": 8340, "loc": { "start": { - "line": 301, + "line": 295, "column": 2 }, "end": { - "line": 301, + "line": 295, "column": 41 } } @@ -25462,15 +24631,15 @@ "updateContext": null }, "value": "if", - "start": 8442, - "end": 8444, + "start": 8343, + "end": 8345, "loc": { "start": { - "line": 302, + "line": 296, "column": 2 }, "end": { - "line": 302, + "line": 296, "column": 4 } } @@ -25487,15 +24656,15 @@ "postfix": false, "binop": null }, - "start": 8445, - "end": 8446, + "start": 8346, + "end": 8347, "loc": { "start": { - "line": 302, + "line": 296, "column": 5 }, "end": { - "line": 302, + "line": 296, "column": 6 } } @@ -25515,15 +24684,15 @@ "updateContext": null }, "value": "typeof", - "start": 8446, - "end": 8452, + "start": 8347, + "end": 8353, "loc": { "start": { - "line": 302, + "line": 296, "column": 6 }, "end": { - "line": 302, + "line": 296, "column": 12 } } @@ -25541,15 +24710,15 @@ "binop": null }, "value": "data", - "start": 8453, - "end": 8457, + "start": 8354, + "end": 8358, "loc": { "start": { - "line": 302, + "line": 296, "column": 13 }, "end": { - "line": 302, + "line": 296, "column": 17 } } @@ -25568,15 +24737,15 @@ "updateContext": null }, "value": "===", - "start": 8458, - "end": 8461, + "start": 8359, + "end": 8362, "loc": { "start": { - "line": 302, + "line": 296, "column": 18 }, "end": { - "line": 302, + "line": 296, "column": 21 } } @@ -25595,15 +24764,15 @@ "updateContext": null }, "value": "object", - "start": 8462, - "end": 8470, + "start": 8363, + "end": 8371, "loc": { "start": { - "line": 302, + "line": 296, "column": 22 }, "end": { - "line": 302, + "line": 296, "column": 30 } } @@ -25620,15 +24789,15 @@ "postfix": false, "binop": null }, - "start": 8470, - "end": 8471, + "start": 8371, + "end": 8372, "loc": { "start": { - "line": 302, + "line": 296, "column": 30 }, "end": { - "line": 302, + "line": 296, "column": 31 } } @@ -25645,15 +24814,15 @@ "postfix": false, "binop": null }, - "start": 8472, - "end": 8473, + "start": 8373, + "end": 8374, "loc": { "start": { - "line": 302, + "line": 296, "column": 32 }, "end": { - "line": 302, + "line": 296, "column": 33 } } @@ -25661,15 +24830,15 @@ { "type": "CommentLine", "value": " Iterate through prototype names", - "start": 8477, - "end": 8511, + "start": 8378, + "end": 8412, "loc": { "start": { - "line": 303, + "line": 297, "column": 3 }, "end": { - "line": 303, + "line": 297, "column": 37 } } @@ -25689,15 +24858,15 @@ "updateContext": null }, "value": "for", - "start": 8515, - "end": 8518, + "start": 8416, + "end": 8419, "loc": { "start": { - "line": 304, + "line": 298, "column": 3 }, "end": { - "line": 304, + "line": 298, "column": 6 } } @@ -25714,15 +24883,15 @@ "postfix": false, "binop": null }, - "start": 8519, - "end": 8520, + "start": 8420, + "end": 8421, "loc": { "start": { - "line": 304, + "line": 298, "column": 7 }, "end": { - "line": 304, + "line": 298, "column": 8 } } @@ -25742,15 +24911,15 @@ "updateContext": null }, "value": "let", - "start": 8520, - "end": 8523, + "start": 8421, + "end": 8424, "loc": { "start": { - "line": 304, + "line": 298, "column": 8 }, "end": { - "line": 304, + "line": 298, "column": 11 } } @@ -25768,15 +24937,15 @@ "binop": null }, "value": "protoName", - "start": 8524, - "end": 8533, + "start": 8425, + "end": 8434, "loc": { "start": { - "line": 304, + "line": 298, "column": 12 }, "end": { - "line": 304, + "line": 298, "column": 21 } } @@ -25796,15 +24965,15 @@ "updateContext": null }, "value": "in", - "start": 8534, - "end": 8536, + "start": 8435, + "end": 8437, "loc": { "start": { - "line": 304, + "line": 298, "column": 22 }, "end": { - "line": 304, + "line": 298, "column": 24 } } @@ -25822,15 +24991,15 @@ "binop": null }, "value": "data", - "start": 8537, - "end": 8541, + "start": 8438, + "end": 8442, "loc": { "start": { - "line": 304, + "line": 298, "column": 25 }, "end": { - "line": 304, + "line": 298, "column": 29 } } @@ -25847,15 +25016,15 @@ "postfix": false, "binop": null }, - "start": 8541, - "end": 8542, + "start": 8442, + "end": 8443, "loc": { "start": { - "line": 304, + "line": 298, "column": 29 }, "end": { - "line": 304, + "line": 298, "column": 30 } } @@ -25872,15 +25041,15 @@ "postfix": false, "binop": null }, - "start": 8543, - "end": 8544, + "start": 8444, + "end": 8445, "loc": { "start": { - "line": 304, + "line": 298, "column": 31 }, "end": { - "line": 304, + "line": 298, "column": 32 } } @@ -25900,15 +25069,15 @@ "updateContext": null }, "value": "let", - "start": 8549, - "end": 8552, + "start": 8450, + "end": 8453, "loc": { "start": { - "line": 305, + "line": 299, "column": 4 }, "end": { - "line": 305, + "line": 299, "column": 7 } } @@ -25926,15 +25095,15 @@ "binop": null }, "value": "inputObject", - "start": 8553, - "end": 8564, + "start": 8454, + "end": 8465, "loc": { "start": { - "line": 305, + "line": 299, "column": 8 }, "end": { - "line": 305, + "line": 299, "column": 19 } } @@ -25953,15 +25122,15 @@ "updateContext": null }, "value": "=", - "start": 8565, - "end": 8566, + "start": 8466, + "end": 8467, "loc": { "start": { - "line": 305, + "line": 299, "column": 20 }, "end": { - "line": 305, + "line": 299, "column": 21 } } @@ -25979,15 +25148,15 @@ "binop": null }, "value": "data", - "start": 8567, - "end": 8571, + "start": 8468, + "end": 8472, "loc": { "start": { - "line": 305, + "line": 299, "column": 22 }, "end": { - "line": 305, + "line": 299, "column": 26 } } @@ -26005,15 +25174,15 @@ "binop": null, "updateContext": null }, - "start": 8571, - "end": 8572, + "start": 8472, + "end": 8473, "loc": { "start": { - "line": 305, + "line": 299, "column": 26 }, "end": { - "line": 305, + "line": 299, "column": 27 } } @@ -26031,15 +25200,15 @@ "binop": null }, "value": "protoName", - "start": 8572, - "end": 8581, + "start": 8473, + "end": 8482, "loc": { "start": { - "line": 305, + "line": 299, "column": 27 }, "end": { - "line": 305, + "line": 299, "column": 36 } } @@ -26057,15 +25226,15 @@ "binop": null, "updateContext": null }, - "start": 8581, - "end": 8582, + "start": 8482, + "end": 8483, "loc": { "start": { - "line": 305, + "line": 299, "column": 36 }, "end": { - "line": 305, + "line": 299, "column": 37 } } @@ -26085,15 +25254,15 @@ "updateContext": null }, "value": "let", - "start": 8587, - "end": 8590, + "start": 8488, + "end": 8491, "loc": { "start": { - "line": 306, + "line": 300, "column": 4 }, "end": { - "line": 306, + "line": 300, "column": 7 } } @@ -26111,15 +25280,15 @@ "binop": null }, "value": "protoObject", - "start": 8591, - "end": 8602, + "start": 8492, + "end": 8503, "loc": { "start": { - "line": 306, + "line": 300, "column": 8 }, "end": { - "line": 306, + "line": 300, "column": 19 } } @@ -26138,15 +25307,15 @@ "updateContext": null }, "value": "=", - "start": 8603, - "end": 8604, + "start": 8504, + "end": 8505, "loc": { "start": { - "line": 306, + "line": 300, "column": 20 }, "end": { - "line": 306, + "line": 300, "column": 21 } } @@ -26163,15 +25332,15 @@ "postfix": false, "binop": null }, - "start": 8605, - "end": 8606, + "start": 8506, + "end": 8507, "loc": { "start": { - "line": 306, + "line": 300, "column": 22 }, "end": { - "line": 306, + "line": 300, "column": 23 } } @@ -26188,15 +25357,15 @@ "postfix": false, "binop": null }, - "start": 8606, - "end": 8607, + "start": 8507, + "end": 8508, "loc": { "start": { - "line": 306, + "line": 300, "column": 23 }, "end": { - "line": 306, + "line": 300, "column": 24 } } @@ -26204,15 +25373,15 @@ { "type": "CommentLine", "value": " Iterate through component names", - "start": 8612, - "end": 8646, + "start": 8513, + "end": 8547, "loc": { "start": { - "line": 307, + "line": 301, "column": 4 }, "end": { - "line": 307, + "line": 301, "column": 38 } } @@ -26232,15 +25401,15 @@ "updateContext": null }, "value": "for", - "start": 8651, - "end": 8654, + "start": 8552, + "end": 8555, "loc": { "start": { - "line": 308, + "line": 302, "column": 4 }, "end": { - "line": 308, + "line": 302, "column": 7 } } @@ -26257,15 +25426,15 @@ "postfix": false, "binop": null }, - "start": 8655, - "end": 8656, + "start": 8556, + "end": 8557, "loc": { "start": { - "line": 308, + "line": 302, "column": 8 }, "end": { - "line": 308, + "line": 302, "column": 9 } } @@ -26285,15 +25454,15 @@ "updateContext": null }, "value": "let", - "start": 8656, - "end": 8659, + "start": 8557, + "end": 8560, "loc": { "start": { - "line": 308, + "line": 302, "column": 9 }, "end": { - "line": 308, + "line": 302, "column": 12 } } @@ -26311,15 +25480,15 @@ "binop": null }, "value": "compName", - "start": 8660, - "end": 8668, + "start": 8561, + "end": 8569, "loc": { "start": { - "line": 308, + "line": 302, "column": 13 }, "end": { - "line": 308, + "line": 302, "column": 21 } } @@ -26339,15 +25508,15 @@ "updateContext": null }, "value": "in", - "start": 8669, - "end": 8671, + "start": 8570, + "end": 8572, "loc": { "start": { - "line": 308, + "line": 302, "column": 22 }, "end": { - "line": 308, + "line": 302, "column": 24 } } @@ -26365,15 +25534,15 @@ "binop": null }, "value": "inputObject", - "start": 8672, - "end": 8683, + "start": 8573, + "end": 8584, "loc": { "start": { - "line": 308, + "line": 302, "column": 25 }, "end": { - "line": 308, + "line": 302, "column": 36 } } @@ -26390,15 +25559,15 @@ "postfix": false, "binop": null }, - "start": 8683, - "end": 8684, + "start": 8584, + "end": 8585, "loc": { "start": { - "line": 308, + "line": 302, "column": 36 }, "end": { - "line": 308, + "line": 302, "column": 37 } } @@ -26415,15 +25584,15 @@ "postfix": false, "binop": null }, - "start": 8685, - "end": 8686, + "start": 8586, + "end": 8587, "loc": { "start": { - "line": 308, + "line": 302, "column": 38 }, "end": { - "line": 308, + "line": 302, "column": 39 } } @@ -26431,15 +25600,15 @@ { "type": "CommentLine", "value": " Store strings of each component", - "start": 8692, - "end": 8726, + "start": 8593, + "end": 8627, "loc": { "start": { - "line": 309, + "line": 303, "column": 5 }, "end": { - "line": 309, + "line": 303, "column": 39 } } @@ -26457,15 +25626,15 @@ "binop": null }, "value": "protoObject", - "start": 8732, - "end": 8743, + "start": 8633, + "end": 8644, "loc": { "start": { - "line": 310, + "line": 304, "column": 5 }, "end": { - "line": 310, + "line": 304, "column": 16 } } @@ -26483,15 +25652,15 @@ "binop": null, "updateContext": null }, - "start": 8743, - "end": 8744, + "start": 8644, + "end": 8645, "loc": { "start": { - "line": 310, + "line": 304, "column": 16 }, "end": { - "line": 310, + "line": 304, "column": 17 } } @@ -26509,15 +25678,15 @@ "binop": null }, "value": "compName", - "start": 8744, - "end": 8752, + "start": 8645, + "end": 8653, "loc": { "start": { - "line": 310, + "line": 304, "column": 17 }, "end": { - "line": 310, + "line": 304, "column": 25 } } @@ -26535,15 +25704,15 @@ "binop": null, "updateContext": null }, - "start": 8752, - "end": 8753, + "start": 8653, + "end": 8654, "loc": { "start": { - "line": 310, + "line": 304, "column": 25 }, "end": { - "line": 310, + "line": 304, "column": 26 } } @@ -26562,15 +25731,15 @@ "updateContext": null }, "value": "=", - "start": 8754, - "end": 8755, + "start": 8655, + "end": 8656, "loc": { "start": { - "line": 310, + "line": 304, "column": 27 }, "end": { - "line": 310, + "line": 304, "column": 28 } } @@ -26588,15 +25757,15 @@ "binop": null }, "value": "JSON", - "start": 8756, - "end": 8760, + "start": 8657, + "end": 8661, "loc": { "start": { - "line": 310, + "line": 304, "column": 29 }, "end": { - "line": 310, + "line": 304, "column": 33 } } @@ -26614,15 +25783,15 @@ "binop": null, "updateContext": null }, - "start": 8760, - "end": 8761, + "start": 8661, + "end": 8662, "loc": { "start": { - "line": 310, + "line": 304, "column": 33 }, "end": { - "line": 310, + "line": 304, "column": 34 } } @@ -26640,15 +25809,15 @@ "binop": null }, "value": "stringify", - "start": 8761, - "end": 8770, + "start": 8662, + "end": 8671, "loc": { "start": { - "line": 310, + "line": 304, "column": 34 }, "end": { - "line": 310, + "line": 304, "column": 43 } } @@ -26665,15 +25834,15 @@ "postfix": false, "binop": null }, - "start": 8770, - "end": 8771, + "start": 8671, + "end": 8672, "loc": { "start": { - "line": 310, + "line": 304, "column": 43 }, "end": { - "line": 310, + "line": 304, "column": 44 } } @@ -26691,15 +25860,15 @@ "binop": null }, "value": "inputObject", - "start": 8771, - "end": 8782, + "start": 8672, + "end": 8683, "loc": { "start": { - "line": 310, + "line": 304, "column": 44 }, "end": { - "line": 310, + "line": 304, "column": 55 } } @@ -26717,15 +25886,15 @@ "binop": null, "updateContext": null }, - "start": 8782, - "end": 8783, + "start": 8683, + "end": 8684, "loc": { "start": { - "line": 310, + "line": 304, "column": 55 }, "end": { - "line": 310, + "line": 304, "column": 56 } } @@ -26743,15 +25912,15 @@ "binop": null }, "value": "compName", - "start": 8783, - "end": 8791, + "start": 8684, + "end": 8692, "loc": { "start": { - "line": 310, + "line": 304, "column": 56 }, "end": { - "line": 310, + "line": 304, "column": 64 } } @@ -26769,15 +25938,15 @@ "binop": null, "updateContext": null }, - "start": 8791, - "end": 8792, + "start": 8692, + "end": 8693, "loc": { "start": { - "line": 310, + "line": 304, "column": 64 }, "end": { - "line": 310, + "line": 304, "column": 65 } } @@ -26794,15 +25963,15 @@ "postfix": false, "binop": null }, - "start": 8792, - "end": 8793, + "start": 8693, + "end": 8694, "loc": { "start": { - "line": 310, + "line": 304, "column": 65 }, "end": { - "line": 310, + "line": 304, "column": 66 } } @@ -26819,15 +25988,15 @@ "postfix": false, "binop": null }, - "start": 8798, - "end": 8799, + "start": 8699, + "end": 8700, "loc": { "start": { - "line": 311, + "line": 305, "column": 4 }, "end": { - "line": 311, + "line": 305, "column": 5 } } @@ -26847,15 +26016,15 @@ "updateContext": null }, "value": "this", - "start": 8804, - "end": 8808, + "start": 8705, + "end": 8709, "loc": { "start": { - "line": 312, + "line": 306, "column": 4 }, "end": { - "line": 312, + "line": 306, "column": 8 } } @@ -26873,15 +26042,15 @@ "binop": null, "updateContext": null }, - "start": 8808, - "end": 8809, + "start": 8709, + "end": 8710, "loc": { "start": { - "line": 312, + "line": 306, "column": 8 }, "end": { - "line": 312, + "line": 306, "column": 9 } } @@ -26899,15 +26068,15 @@ "binop": null }, "value": "entityTemplates", - "start": 8809, - "end": 8824, + "start": 8710, + "end": 8725, "loc": { "start": { - "line": 312, + "line": 306, "column": 9 }, "end": { - "line": 312, + "line": 306, "column": 24 } } @@ -26925,15 +26094,15 @@ "binop": null, "updateContext": null }, - "start": 8824, - "end": 8825, + "start": 8725, + "end": 8726, "loc": { "start": { - "line": 312, + "line": 306, "column": 24 }, "end": { - "line": 312, + "line": 306, "column": 25 } } @@ -26951,15 +26120,15 @@ "binop": null }, "value": "protoName", - "start": 8825, - "end": 8834, + "start": 8726, + "end": 8735, "loc": { "start": { - "line": 312, + "line": 306, "column": 25 }, "end": { - "line": 312, + "line": 306, "column": 34 } } @@ -26977,15 +26146,15 @@ "binop": null, "updateContext": null }, - "start": 8834, - "end": 8835, + "start": 8735, + "end": 8736, "loc": { "start": { - "line": 312, + "line": 306, "column": 34 }, "end": { - "line": 312, + "line": 306, "column": 35 } } @@ -27004,15 +26173,15 @@ "updateContext": null }, "value": "=", - "start": 8836, - "end": 8837, + "start": 8737, + "end": 8738, "loc": { "start": { - "line": 312, + "line": 306, "column": 36 }, "end": { - "line": 312, + "line": 306, "column": 37 } } @@ -27030,15 +26199,15 @@ "binop": null }, "value": "protoObject", - "start": 8838, - "end": 8849, + "start": 8739, + "end": 8750, "loc": { "start": { - "line": 312, + "line": 306, "column": 38 }, "end": { - "line": 312, + "line": 306, "column": 49 } } @@ -27056,15 +26225,15 @@ "binop": null }, "value": "++", - "start": 8854, - "end": 8856, + "start": 8755, + "end": 8757, "loc": { "start": { - "line": 313, + "line": 307, "column": 4 }, "end": { - "line": 313, + "line": 307, "column": 6 } } @@ -27082,15 +26251,15 @@ "binop": null }, "value": "count", - "start": 8856, - "end": 8861, + "start": 8757, + "end": 8762, "loc": { "start": { - "line": 313, + "line": 307, "column": 6 }, "end": { - "line": 313, + "line": 307, "column": 11 } } @@ -27107,15 +26276,15 @@ "postfix": false, "binop": null }, - "start": 8865, - "end": 8866, + "start": 8766, + "end": 8767, "loc": { "start": { - "line": 314, + "line": 308, "column": 3 }, "end": { - "line": 314, + "line": 308, "column": 4 } } @@ -27132,15 +26301,15 @@ "postfix": false, "binop": null }, - "start": 8869, - "end": 8870, + "start": 8770, + "end": 8771, "loc": { "start": { - "line": 315, + "line": 309, "column": 2 }, "end": { - "line": 315, + "line": 309, "column": 3 } } @@ -27160,15 +26329,15 @@ "updateContext": null }, "value": "return", - "start": 8874, - "end": 8880, + "start": 8775, + "end": 8781, "loc": { "start": { - "line": 317, + "line": 311, "column": 2 }, "end": { - "line": 317, + "line": 311, "column": 8 } } @@ -27186,15 +26355,15 @@ "binop": null }, "value": "count", - "start": 8881, - "end": 8886, + "start": 8782, + "end": 8787, "loc": { "start": { - "line": 317, + "line": 311, "column": 9 }, "end": { - "line": 317, + "line": 311, "column": 14 } } @@ -27211,15 +26380,15 @@ "postfix": false, "binop": null }, - "start": 8888, - "end": 8889, + "start": 8789, + "end": 8790, "loc": { "start": { - "line": 318, + "line": 312, "column": 1 }, "end": { - "line": 318, + "line": 312, "column": 2 } } @@ -27236,15 +26405,15 @@ "postfix": false, "binop": null }, - "start": 8890, - "end": 8891, + "start": 8791, + "end": 8792, "loc": { "start": { - "line": 319, + "line": 313, "column": 0 }, "end": { - "line": 319, + "line": 313, "column": 1 } } @@ -27262,15 +26431,15 @@ "binop": null }, "value": "exports", - "start": 8893, - "end": 8900, + "start": 8794, + "end": 8801, "loc": { "start": { - "line": 321, + "line": 315, "column": 0 }, "end": { - "line": 321, + "line": 315, "column": 7 } } @@ -27288,15 +26457,15 @@ "binop": null, "updateContext": null }, - "start": 8900, - "end": 8901, + "start": 8801, + "end": 8802, "loc": { "start": { - "line": 321, + "line": 315, "column": 7 }, "end": { - "line": 321, + "line": 315, "column": 8 } } @@ -27314,15 +26483,15 @@ "binop": null }, "value": "World", - "start": 8901, - "end": 8906, + "start": 8802, + "end": 8807, "loc": { "start": { - "line": 321, + "line": 315, "column": 8 }, "end": { - "line": 321, + "line": 315, "column": 13 } } @@ -27341,15 +26510,15 @@ "updateContext": null }, "value": "=", - "start": 8907, - "end": 8908, + "start": 8808, + "end": 8809, "loc": { "start": { - "line": 321, + "line": 315, "column": 14 }, "end": { - "line": 321, + "line": 315, "column": 15 } } @@ -27367,15 +26536,15 @@ "binop": null }, "value": "World", - "start": 8909, - "end": 8914, + "start": 8810, + "end": 8815, "loc": { "start": { - "line": 321, + "line": 315, "column": 16 }, "end": { - "line": 321, + "line": 315, "column": 21 } } @@ -27393,15 +26562,15 @@ "binop": null, "updateContext": null }, - "start": 8915, - "end": 8915, + "start": 8816, + "end": 8816, "loc": { "start": { - "line": 322, + "line": 316, "column": 0 }, "end": { - "line": 322, + "line": 316, "column": 0 } } diff --git a/docs/class/src/world.js~World.html b/docs/class/src/world.js~World.html index 4be91ea..918d859 100644 --- a/docs/class/src/world.js~World.html +++ b/docs/class/src/world.js~World.html @@ -42,7 +42,7 @@ - | source + | source
@@ -402,7 +402,7 @@

- source + source

@@ -450,7 +450,7 @@

- source + source

@@ -502,7 +502,7 @@

- source + source

@@ -601,7 +601,7 @@

- source + source

@@ -686,7 +686,7 @@

- source + source

@@ -789,7 +789,7 @@

- source + source

@@ -871,7 +871,7 @@

- source + source

@@ -939,7 +939,7 @@

- source + source

@@ -1026,7 +1026,7 @@

- source + source

@@ -1108,7 +1108,7 @@

- source + source

diff --git a/docs/coverage.json b/docs/coverage.json index 44e4039..005ca73 100644 --- a/docs/coverage.json +++ b/docs/coverage.json @@ -14,11 +14,11 @@ 14, 25, 31, - 51, - 68, - 75, - 82, - 87 + 49, + 66, + 73, + 80, + 85 ] }, "src/entity.js": { @@ -27,13 +27,13 @@ "undocumentLines": [] }, "src/utilities.js": { - "expectCount": 1, - "actualCount": 1, + "expectCount": 2, + "actualCount": 2, "undocumentLines": [] }, "src/world.js": { - "expectCount": 21, - "actualCount": 21, + "expectCount": 20, + "actualCount": 20, "undocumentLines": [] } } diff --git a/docs/file/src/component_index.js.html b/docs/file/src/component_index.js.html index b75e904..bd90ce8 100644 --- a/docs/file/src/component_index.js.html +++ b/docs/file/src/component_index.js.html @@ -69,9 +69,7 @@ build(hash, componentNames) { let matchingEntities = new Map() - for (let entId in this.entities) { - let entity = this.entities[entId] - + for (const [entityId, entity] of this.entities) { // Ensure entity contains all specified components if (entity.has(...componentNames)) { // Add entity to index @@ -104,14 +102,14 @@ // Update an entity in the index (for creating components) add(entity, ...componentNames) { - this.apply(componentNames, (entities) => { + this.apply(componentNames, entities => { entities.set(entity.toString(), entity) }) } // Update an entity in the index (for removing components) remove(entity, ...componentNames) { - this.apply(componentNames, (entities) => { + this.apply(componentNames, entities => { entities.delete(entity.toString()) }) } diff --git a/docs/file/src/entity.js.html b/docs/file/src/entity.js.html index 4a0e25c..64f29e5 100644 --- a/docs/file/src/entity.js.html +++ b/docs/file/src/entity.js.html @@ -258,7 +258,7 @@ this.world.index.remove(this) // Remove from world - delete this.world.entities[this._id] + this.world.entities.delete(this._id) this._id = undefined } } @@ -343,7 +343,7 @@ // Assign new id, and reattach to world this.world = world this._id = this.world.idCounter++ - this.world.entities[this._id] = this + this.world.entities.set(this._id, this) this.world.index.addEntity(this) } } @@ -361,7 +361,7 @@ if (this.valid()) { // Remove from current world this.world.index.removeEntity(this) - delete this.world.entities[this._id] + this.world.entities.delete(this._id) this._id = undefined this.world = undefined } diff --git a/docs/file/src/utilities.js.html b/docs/file/src/utilities.js.html index 40971c9..89a021d 100644 --- a/docs/file/src/utilities.js.html +++ b/docs/file/src/utilities.js.html @@ -53,7 +53,17 @@ } } +/** + * Determines if function. + * + * @ignore + */ +function isFunction(obj) { + return typeof obj === 'function' +} + exports.invoke = invoke +exports.isFunction = isFunction
diff --git a/docs/file/src/world.js.html b/docs/file/src/world.js.html index f98d82d..a0c373d 100644 --- a/docs/file/src/world.js.html +++ b/docs/file/src/world.js.html @@ -37,7 +37,7 @@

src/world.js

/** @ignore */
-const { invoke } = require('./utilities.js')
+const { invoke, isFunction } = require('./utilities.js')
 
 /** @ignore */
 const { Entity } = require('./entity.js')
@@ -45,15 +45,6 @@
 /** @ignore */
 const { ComponentIndex } = require('./component_index.js')
 
-/**
- * Determines if function.
- *
- * @ignore
- */
-function isFunction(obj) {
-	return typeof obj === 'function'
-}
-
 /**
  * Class for world.
  *
@@ -66,10 +57,16 @@
 	constructor() {
 		/** @ignore */
 		this.systems = []
-		/** @ignore */
-		this.entities = {}
+
+		/**
+		 * Maps entity IDs to entities
+		 * @ignore
+		 */
+		this.entities = new Map()
+
 		/** @ignore */
 		this.components = {}
+
 		/** @ignore */
 		this.entityTemplates = {}
 
@@ -92,19 +89,16 @@
 	 */
 	clear() {
 		// Call onRemove on all components of all entities
-		for (let entityId in this.entities) {
-			let entity = this.entities[entityId]
+		for (const [entityId, entity] of this.entities) {
 			for (let componentName in entity.data) {
 				// Get component, and call onRemove if it exists as a function
 				let component = entity.data[componentName]
-				if (isFunction(component.onRemove)) {
-					component.onRemove()
-				}
+				invoke(component, 'onRemove')
 			}
 		}
 
 		// Clear entities
-		this.entities = {}
+		this.entities = new Map()
 		this.index.clear(this.entities)
 	}
 
@@ -152,8 +146,8 @@
 	 * @return {Entity} The new entity created
 	 */
 	entity(name) {
-		let entId = this.idCounter++
-		let entity = new Entity(this, entId)
+		let entityId = this.idCounter++
+		let entity = new Entity(this, entityId)
 
 		// Use 'name' to get prototype data (if specified)
 		if (name && name in this.entityTemplates) {
@@ -166,7 +160,7 @@
 			}
 		}
 
-		this.entities[entId] = entity
+		this.entities.set(entityId, entity)
 		return entity
 	}
 
diff --git a/docs/index.json b/docs/index.json
index 8124830..9b15697 100644
--- a/docs/index.json
+++ b/docs/index.json
@@ -567,7 +567,7 @@
     "__docId__": 48,
     "kind": "file",
     "name": "src/component_index.js",
-    "content": "/** @ignore */\nclass ComponentIndex {\n\tconstructor(entities) {\n\t\tthis.clear(entities)\n\t}\n\n\t// Removes everything from the index\n\tclear(entities) {\n\t\tthis.entities = entities\n\t\tthis.index = {}\n\t}\n\n\t// Uses an existing index or builds a new index, to return entities with the specified components\n\tquery(componentNames) {\n\t\tlet hash = this.hashComponents(componentNames)\n\n\t\tif (hash in this.index) {\n\t\t\treturn this.index[hash].entities\n\t\t} else {\n\t\t\treturn this.build(hash, componentNames).entities\n\t\t}\n\t}\n\n\t// Creates a hash from an array of component names\n\thashComponents(names) {\n\t\treturn JSON.stringify(names.concat().sort())\n\t}\n\n\t// Builds an initial index for a set of components\n\t// These indexes are expected to be updated when doing entity/component operations\n\tbuild(hash, componentNames) {\n\t\tlet matchingEntities = new Map()\n\n\t\tfor (let entId in this.entities) {\n\t\t\tlet entity = this.entities[entId]\n\n\t\t\t// Ensure entity contains all specified components\n\t\t\tif (entity.has(...componentNames)) {\n\t\t\t\t// Add entity to index\n\t\t\t\tmatchingEntities.set(entity.toString(), entity)\n\t\t\t}\n\t\t}\n\n\t\treturn this.index[hash] = {\n\t\t\tcomponents: new Set(componentNames),\n\t\t\tentities: matchingEntities\n\t\t}\n\t}\n\n\t// Generic way to apply an operation to matching component groups\n\tapply(componentNames, callback) {\n\t\tfor (let hash in this.index) {\n\t\t\tlet group = this.index[hash]\n\n\t\t\t// Check if index group has any of the components that the entity has\n\t\t\tlet hasAny = componentNames.some(name => group.components.has(name))\n\n\t\t\t// Check if the current index group is supposed to match all entities\n\t\t\tlet isMatchAllGroup = ((componentNames == undefined || componentNames.length === 0) && group.components.size == 0)\n\n\t\t\tif (hasAny || isMatchAllGroup) {\n\t\t\t\tcallback(group.entities)\n\t\t\t}\n\t\t}\n\t}\n\n\t// Update an entity in the index (for creating components)\n\tadd(entity, ...componentNames) {\n\t\tthis.apply(componentNames, (entities) => {\n\t\t\tentities.set(entity.toString(), entity)\n\t\t})\n\t}\n\n\t// Update an entity in the index (for removing components)\n\tremove(entity, ...componentNames) {\n\t\tthis.apply(componentNames, (entities) => {\n\t\t\tentities.delete(entity.toString())\n\t\t})\n\t}\n\n\t// Add an entity and all of its components to the index\n\taddEntity(entity) {\n\t\tthis.add(entity, ...Object.keys(entity.data))\n\t}\n\n\t// Remove an entity and all of its components from the index\n\tremoveEntity(entity) {\n\t\tthis.remove(entity, ...Object.keys(entity.data))\n\t}\n}\n\nexports.ComponentIndex = ComponentIndex\n",
+    "content": "/** @ignore */\nclass ComponentIndex {\n\tconstructor(entities) {\n\t\tthis.clear(entities)\n\t}\n\n\t// Removes everything from the index\n\tclear(entities) {\n\t\tthis.entities = entities\n\t\tthis.index = {}\n\t}\n\n\t// Uses an existing index or builds a new index, to return entities with the specified components\n\tquery(componentNames) {\n\t\tlet hash = this.hashComponents(componentNames)\n\n\t\tif (hash in this.index) {\n\t\t\treturn this.index[hash].entities\n\t\t} else {\n\t\t\treturn this.build(hash, componentNames).entities\n\t\t}\n\t}\n\n\t// Creates a hash from an array of component names\n\thashComponents(names) {\n\t\treturn JSON.stringify(names.concat().sort())\n\t}\n\n\t// Builds an initial index for a set of components\n\t// These indexes are expected to be updated when doing entity/component operations\n\tbuild(hash, componentNames) {\n\t\tlet matchingEntities = new Map()\n\n\t\tfor (const [entityId, entity] of this.entities) {\n\t\t\t// Ensure entity contains all specified components\n\t\t\tif (entity.has(...componentNames)) {\n\t\t\t\t// Add entity to index\n\t\t\t\tmatchingEntities.set(entity.toString(), entity)\n\t\t\t}\n\t\t}\n\n\t\treturn this.index[hash] = {\n\t\t\tcomponents: new Set(componentNames),\n\t\t\tentities: matchingEntities\n\t\t}\n\t}\n\n\t// Generic way to apply an operation to matching component groups\n\tapply(componentNames, callback) {\n\t\tfor (let hash in this.index) {\n\t\t\tlet group = this.index[hash]\n\n\t\t\t// Check if index group has any of the components that the entity has\n\t\t\tlet hasAny = componentNames.some(name => group.components.has(name))\n\n\t\t\t// Check if the current index group is supposed to match all entities\n\t\t\tlet isMatchAllGroup = ((componentNames == undefined || componentNames.length === 0) && group.components.size == 0)\n\n\t\t\tif (hasAny || isMatchAllGroup) {\n\t\t\t\tcallback(group.entities)\n\t\t\t}\n\t\t}\n\t}\n\n\t// Update an entity in the index (for creating components)\n\tadd(entity, ...componentNames) {\n\t\tthis.apply(componentNames, entities => {\n\t\t\tentities.set(entity.toString(), entity)\n\t\t})\n\t}\n\n\t// Update an entity in the index (for removing components)\n\tremove(entity, ...componentNames) {\n\t\tthis.apply(componentNames, entities => {\n\t\t\tentities.delete(entity.toString())\n\t\t})\n\t}\n\n\t// Add an entity and all of its components to the index\n\taddEntity(entity) {\n\t\tthis.add(entity, ...Object.keys(entity.data))\n\t}\n\n\t// Remove an entity and all of its components from the index\n\tremoveEntity(entity) {\n\t\tthis.remove(entity, ...Object.keys(entity.data))\n\t}\n}\n\nexports.ComponentIndex = ComponentIndex\n",
     "static": true,
     "longname": "/srv/http/picoes/src/component_index.js",
     "access": "public",
@@ -759,7 +759,7 @@
     "longname": "src/component_index.js~ComponentIndex#apply",
     "access": "public",
     "description": null,
-    "lineNumber": 51,
+    "lineNumber": 49,
     "undocument": true,
     "params": [
       {
@@ -788,7 +788,7 @@
     "longname": "src/component_index.js~ComponentIndex#add",
     "access": "public",
     "description": null,
-    "lineNumber": 68,
+    "lineNumber": 66,
     "undocument": true,
     "params": [
       {
@@ -818,7 +818,7 @@
     "longname": "src/component_index.js~ComponentIndex#remove",
     "access": "public",
     "description": null,
-    "lineNumber": 75,
+    "lineNumber": 73,
     "undocument": true,
     "params": [
       {
@@ -848,7 +848,7 @@
     "longname": "src/component_index.js~ComponentIndex#addEntity",
     "access": "public",
     "description": null,
-    "lineNumber": 82,
+    "lineNumber": 80,
     "undocument": true,
     "params": [
       {
@@ -871,7 +871,7 @@
     "longname": "src/component_index.js~ComponentIndex#removeEntity",
     "access": "public",
     "description": null,
-    "lineNumber": 87,
+    "lineNumber": 85,
     "undocument": true,
     "params": [
       {
@@ -887,7 +887,7 @@
     "__docId__": 62,
     "kind": "file",
     "name": "src/entity.js",
-    "content": "/** @ignore */\nconst { invoke } = require('./utilities.js')\n\n/**\n * Entity class used for storing components.\n *\n * @class      Entity (name)\n */\nclass Entity {\n\t/**\n\t * Do not construct an Entity yourself - use the entity() method in World instead.\n\t * Also, do not shallow/deep copy entity objects, only pass around references.\n\t *\n\t * @private\n\t *\n\t * @param {World}  world - The world\n\t * @param {number} id    - The identifier\n\t */\n\tconstructor(world, id) {\n\t\t/** @ignore */\n\t\tthis.world = world\n\n\t\t/** @ignore */\n\t\tthis._id = id\n\n\t\t/** @ignore */\n\t\tthis.data = {}\n\n\t\t// Add to the index, to update match all index\n\t\tif (this.valid()) {\n\t\t\tthis.world.index.add(this)\n\t\t}\n\t}\n\n\t/**\n\t * Return the entity ID.\n\t *\n\t * @return {number} Integer entity ID\n\t */\n\tget id() {\n\t\treturn this._id\n\t}\n\n\t/**\n\t * ID is read-only, attempting to set it will throw an error.\n\t *\n\t * @private\n\t */\n\tset id(id) {\n\t\tthrow new Error('Cannot set entity id')\n\t}\n\n\t/**\n\t * Returns true if the entity has ALL of the specified component names.\n\t * Additional components that the entity has, which are not specified in has(), will be ignored.\n\t * If no component names are specified, this method returns true.\n\t *\n\t * @example\n\t * if (entity.has('position', 'velocity')) {...}\n\t *\n\t * @param {...string} [components] - The component names to check for\n\t *\n\t * @return {boolean} true or false\n\t */\n\thas(...components) {\n\t\treturn components.every(name => name in this.data)\n\t}\n\n\t/**\n\t * Returns a component by name, or undefined if it doesn't exist\n\t *\n\t * @example\n\t * let position = entity.get('position')\n\t *\n\t * @param {string} component - The component name to get\n\t *\n\t * @return {Object} The component if defined, otherwise undefined\n\t */\n\tget(component) {\n\t\treturn this.data[component]\n\t}\n\n\t/**\n\t * Returns a component by name (automatically created if it doesn't exist)\n\t *\n\t * @example\n\t * let position = entity.access('position', 3, 4)\n\t *\n\t * @param {string}    component - The component name to create/get\n\t * @param {...Object} [args]    - The arguments to forward to create the new component, only if it doesn't exist.\n\t *\n\t * @return {Object} Always returns either the existing component, or the newly created one.\n\t */\n\taccess(component, ...args) {\n\t\tif (!this.has(component)) {\n\t\t\tthis.set(component, ...args)\n\t\t}\n\t\treturn this.data[component]\n\t}\n\n\t/**\n\t * Adds a new component, or re-creates and overwrites an existing component\n\t *\n\t * @example\n\t * entity.set('position', 1, 2)\n\t *\n\t * @example\n\t * entity.set('anonymousComponent', { keys: 'values' })\n\t *\n\t * @example\n\t * entity.set('anotherAnonymousComponent', 'Any type of any value')\n\t *\n\t * @param {string}    component - The component name to create. If there is a registered component for this name, then\n\t * its constructor will be called and an object of that type will be created.\n\t * @param {...Object} [args]    - The arguments to forward to the registered component type. If the component type is\n\t * registered, then only the first additional argument will be used as the value of the entire component.\n\t *\n\t * @return {Object} The original entity that set() was called on, so that operations can be chained.\n\t */\n\tset(component, ...args) {\n\t\tif (this.valid() && component in this.world.components) {\n\t\t\t// Use defined component template, passing entity as first parameter\n\t\t\tthis.data[component] = new this.world.components[component](this, ...args)\n\t\t} else if (args.length > 0) {\n\t\t\t// Use first argument as component value\n\t\t\tthis.data[component] = args[0]\n\t\t} else {\n\t\t\t// Make an empty object\n\t\t\tthis.data[component] = {}\n\t\t}\n\n\t\t// Update the index with this new component\n\t\tif (this.valid()) {\n\t\t\tthis.world.index.add(this, component)\n\t\t}\n\n\t\treturn this\n\t}\n\n\t/**\n\t * Updates component data from an object or other component. Similar to access() with a shallow merge applied after.\n\t *\n\t * @example\n\t * entity.update('position', { x: 1, y: 2 })\n\t *\n\t * @param {string} component - The component name to update\n\t * @param {Object} data      - The object or other component to merge into the specified component.\n\t *\n\t * @return {Object} The original entity that update() was called on, so that operations can be chained.\n\t */\n\tupdate(component, data) {\n\t\tlet comp = this.access(component)\n\n\t\t// Shallow set keys of the component\n\t\tfor (let key in data) {\n\t\t\tcomp[key] = data[key]\n\t\t}\n\n\t\treturn this\n\t}\n\n\t/**\n\t * Removes a component from the entity - has no effect when it doesn't exist.\n\t * Can specify an onRemove() method in your component which gets called before it is removed.\n\t * If nothing is specified, then nothing will be removed. Use removeAll() to remove all components.\n\t *\n\t * @example\n\t * entity.remove('position')\n\t *\n\t * @param {...string} [components] - The component names to remove from the entity.\n\t *\n\t * @return {Object} The original entity that remove() was called on, so that operations can be chained.\n\t */\n\tremove(...components) {\n\t\tfor (let component of components) {\n\t\t\tif (component in this.data) {\n\n\t\t\t\t// Remove from index\n\t\t\t\tif (this.valid()) {\n\t\t\t\t\tthis.world.index.remove(this, component)\n\t\t\t\t}\n\n\t\t\t\t// Call custom onRemove\n\t\t\t\tinvoke(this.data[component], 'onRemove')\n\n\t\t\t\tdelete this.data[component]\n\t\t\t}\n\t\t}\n\t\treturn this\n\t}\n\n\t// Remove all components\n\n\t/**\n\t * Removes all components from the entity.\n\t *\n\t * @example\n\t * entity.removeAll()\n\t *\n\t * @return {Object} The original entity that removeAll() was called on, so that operations can be chained.\n\t */\n\tremoveAll() {\n\t\tthis.remove(...Object.keys(this.data))\n\t\tthis.data = {}\n\t\treturn this\n\t}\n\n\t/**\n\t * Remove this entity and all of its components from the world. After an entity is destroyed, the object should be discarded,\n\t * and it is recommended to avoid re-using it.\n\t *\n\t * @example\n\t * entity.destroy()\n\t */\n\tdestroy() {\n\t\tthis.removeAll()\n\n\t\tif (this.valid()) {\n\t\t\t// Remove from the index, to update match all index\n\t\t\tthis.world.index.remove(this)\n\n\t\t\t// Remove from world\n\t\t\tdelete this.world.entities[this._id]\n\t\t\tthis._id = undefined\n\t\t}\n\t}\n\n\t/**\n\t * Returns true if this is a valid, existing, and usable entity, which is attached to a world.\n\t *\n\t * @example\n\t * if (entity.valid()) {...}\n\t *\n\t * @return {boolean} true or false\n\t */\n\tvalid() {\n\t\t// Note: No need to actually look in the world for the ID, if entities are only ever copied by reference.\n\t\t// If entities are ever deep/shallow copied, this function will need to check this to be more robust.\n\t\treturn this.world && this._id !== undefined\n\t}\n\n\t/**\n\t * Returns unique entity ID as a string.\n\t *\n\t * @example\n\t * let entityId = entity.toString()\n\t *\n\t * @return {string} String representation of the entity ID.\n\t */\n\ttoString() {\n\t\treturn String(this._id)\n\t}\n\n\t/**\n\t * Serializes entire entity and components to JSON.\n\t * Note: Defining toJSON methods in your components will override the built-in behavior.\n\t *\n\t * @example\n\t * let serializedEntity = entity.toJSON()\n\t *\n\t * @return {string} JSON encoded string\n\t */\n\ttoJSON() {\n\t\treturn JSON.stringify(this.data)\n\t}\n\n\t/**\n\t * Deserializes data from JSON, creating new components and overwriting existing components.\n\t * Note: Defining fromJSON methods in your components will override the built-in behavior.\n\t *\n\t * @example\n\t * entity.fromJSON(serializedEntity)\n\t *\n\t * @param {string} data - A JSON string containing component data to parse, and store in this entity.\n\t *\n\t * @return {Object} The original entity that fromJSON() was called on, so that operations can be chained.\n\t */\n\tfromJSON(data) {\n\t\tlet parsed = JSON.parse(data)\n\t\tfor (let name in parsed) {\n\t\t\tlet comp = this.access(name)\n\n\t\t\t// Either call custom method or copy all properties\n\t\t\tif (typeof comp.fromJSON === 'function') {\n\t\t\t\tcomp.fromJSON(parsed[name])\n\t\t\t} else {\n\t\t\t\tthis.update(name, parsed[name])\n\t\t\t}\n\t\t}\n\t\treturn this\n\t}\n\n\t/**\n\t * Attaches a currently detached entity back to a world.\n\t * Note: Do not use detached entities, get() may be safe, but avoid calling other methods\n\t * Note: The ID will be reassigned, so do not rely on this\n\t *\n\t * @example\n\t * entity.attach(world)\n\t *\n\t * @param {World} world - The world to attach this entity to\n\t */\n\tattach(world) {\n\t\tif (world && !this.valid()) {\n\t\t\t// Assign new id, and reattach to world\n\t\t\tthis.world = world\n\t\t\tthis._id = this.world.idCounter++\n\t\t\tthis.world.entities[this._id] = this\n\t\t\tthis.world.index.addEntity(this)\n\t\t}\n\t}\n\n\t/**\n\t * Removes this entity from the current world, without removing any components or data.\n\t * It can be re-attached to another world (or the same world), using the attach() method.\n\t * Note: Do not use detached entities, get() may be safe, but avoid calling other methods\n\t * Note: The ID will be reassigned, so do not rely on this\n\t *\n\t * @example\n\t * entity.detach()\n\t */\n\tdetach() {\n\t\tif (this.valid()) {\n\t\t\t// Remove from current world\n\t\t\tthis.world.index.removeEntity(this)\n\t\t\tdelete this.world.entities[this._id]\n\t\t\tthis._id = undefined\n\t\t\tthis.world = undefined\n\t\t}\n\t}\n}\n\nexports.Entity = Entity\n",
+    "content": "/** @ignore */\nconst { invoke } = require('./utilities.js')\n\n/**\n * Entity class used for storing components.\n *\n * @class      Entity (name)\n */\nclass Entity {\n\t/**\n\t * Do not construct an Entity yourself - use the entity() method in World instead.\n\t * Also, do not shallow/deep copy entity objects, only pass around references.\n\t *\n\t * @private\n\t *\n\t * @param {World}  world - The world\n\t * @param {number} id    - The identifier\n\t */\n\tconstructor(world, id) {\n\t\t/** @ignore */\n\t\tthis.world = world\n\n\t\t/** @ignore */\n\t\tthis._id = id\n\n\t\t/** @ignore */\n\t\tthis.data = {}\n\n\t\t// Add to the index, to update match all index\n\t\tif (this.valid()) {\n\t\t\tthis.world.index.add(this)\n\t\t}\n\t}\n\n\t/**\n\t * Return the entity ID.\n\t *\n\t * @return {number} Integer entity ID\n\t */\n\tget id() {\n\t\treturn this._id\n\t}\n\n\t/**\n\t * ID is read-only, attempting to set it will throw an error.\n\t *\n\t * @private\n\t */\n\tset id(id) {\n\t\tthrow new Error('Cannot set entity id')\n\t}\n\n\t/**\n\t * Returns true if the entity has ALL of the specified component names.\n\t * Additional components that the entity has, which are not specified in has(), will be ignored.\n\t * If no component names are specified, this method returns true.\n\t *\n\t * @example\n\t * if (entity.has('position', 'velocity')) {...}\n\t *\n\t * @param {...string} [components] - The component names to check for\n\t *\n\t * @return {boolean} true or false\n\t */\n\thas(...components) {\n\t\treturn components.every(name => name in this.data)\n\t}\n\n\t/**\n\t * Returns a component by name, or undefined if it doesn't exist\n\t *\n\t * @example\n\t * let position = entity.get('position')\n\t *\n\t * @param {string} component - The component name to get\n\t *\n\t * @return {Object} The component if defined, otherwise undefined\n\t */\n\tget(component) {\n\t\treturn this.data[component]\n\t}\n\n\t/**\n\t * Returns a component by name (automatically created if it doesn't exist)\n\t *\n\t * @example\n\t * let position = entity.access('position', 3, 4)\n\t *\n\t * @param {string}    component - The component name to create/get\n\t * @param {...Object} [args]    - The arguments to forward to create the new component, only if it doesn't exist.\n\t *\n\t * @return {Object} Always returns either the existing component, or the newly created one.\n\t */\n\taccess(component, ...args) {\n\t\tif (!this.has(component)) {\n\t\t\tthis.set(component, ...args)\n\t\t}\n\t\treturn this.data[component]\n\t}\n\n\t/**\n\t * Adds a new component, or re-creates and overwrites an existing component\n\t *\n\t * @example\n\t * entity.set('position', 1, 2)\n\t *\n\t * @example\n\t * entity.set('anonymousComponent', { keys: 'values' })\n\t *\n\t * @example\n\t * entity.set('anotherAnonymousComponent', 'Any type of any value')\n\t *\n\t * @param {string}    component - The component name to create. If there is a registered component for this name, then\n\t * its constructor will be called and an object of that type will be created.\n\t * @param {...Object} [args]    - The arguments to forward to the registered component type. If the component type is\n\t * registered, then only the first additional argument will be used as the value of the entire component.\n\t *\n\t * @return {Object} The original entity that set() was called on, so that operations can be chained.\n\t */\n\tset(component, ...args) {\n\t\tif (this.valid() && component in this.world.components) {\n\t\t\t// Use defined component template, passing entity as first parameter\n\t\t\tthis.data[component] = new this.world.components[component](this, ...args)\n\t\t} else if (args.length > 0) {\n\t\t\t// Use first argument as component value\n\t\t\tthis.data[component] = args[0]\n\t\t} else {\n\t\t\t// Make an empty object\n\t\t\tthis.data[component] = {}\n\t\t}\n\n\t\t// Update the index with this new component\n\t\tif (this.valid()) {\n\t\t\tthis.world.index.add(this, component)\n\t\t}\n\n\t\treturn this\n\t}\n\n\t/**\n\t * Updates component data from an object or other component. Similar to access() with a shallow merge applied after.\n\t *\n\t * @example\n\t * entity.update('position', { x: 1, y: 2 })\n\t *\n\t * @param {string} component - The component name to update\n\t * @param {Object} data      - The object or other component to merge into the specified component.\n\t *\n\t * @return {Object} The original entity that update() was called on, so that operations can be chained.\n\t */\n\tupdate(component, data) {\n\t\tlet comp = this.access(component)\n\n\t\t// Shallow set keys of the component\n\t\tfor (let key in data) {\n\t\t\tcomp[key] = data[key]\n\t\t}\n\n\t\treturn this\n\t}\n\n\t/**\n\t * Removes a component from the entity - has no effect when it doesn't exist.\n\t * Can specify an onRemove() method in your component which gets called before it is removed.\n\t * If nothing is specified, then nothing will be removed. Use removeAll() to remove all components.\n\t *\n\t * @example\n\t * entity.remove('position')\n\t *\n\t * @param {...string} [components] - The component names to remove from the entity.\n\t *\n\t * @return {Object} The original entity that remove() was called on, so that operations can be chained.\n\t */\n\tremove(...components) {\n\t\tfor (let component of components) {\n\t\t\tif (component in this.data) {\n\n\t\t\t\t// Remove from index\n\t\t\t\tif (this.valid()) {\n\t\t\t\t\tthis.world.index.remove(this, component)\n\t\t\t\t}\n\n\t\t\t\t// Call custom onRemove\n\t\t\t\tinvoke(this.data[component], 'onRemove')\n\n\t\t\t\tdelete this.data[component]\n\t\t\t}\n\t\t}\n\t\treturn this\n\t}\n\n\t// Remove all components\n\n\t/**\n\t * Removes all components from the entity.\n\t *\n\t * @example\n\t * entity.removeAll()\n\t *\n\t * @return {Object} The original entity that removeAll() was called on, so that operations can be chained.\n\t */\n\tremoveAll() {\n\t\tthis.remove(...Object.keys(this.data))\n\t\tthis.data = {}\n\t\treturn this\n\t}\n\n\t/**\n\t * Remove this entity and all of its components from the world. After an entity is destroyed, the object should be discarded,\n\t * and it is recommended to avoid re-using it.\n\t *\n\t * @example\n\t * entity.destroy()\n\t */\n\tdestroy() {\n\t\tthis.removeAll()\n\n\t\tif (this.valid()) {\n\t\t\t// Remove from the index, to update match all index\n\t\t\tthis.world.index.remove(this)\n\n\t\t\t// Remove from world\n\t\t\tthis.world.entities.delete(this._id)\n\t\t\tthis._id = undefined\n\t\t}\n\t}\n\n\t/**\n\t * Returns true if this is a valid, existing, and usable entity, which is attached to a world.\n\t *\n\t * @example\n\t * if (entity.valid()) {...}\n\t *\n\t * @return {boolean} true or false\n\t */\n\tvalid() {\n\t\t// Note: No need to actually look in the world for the ID, if entities are only ever copied by reference.\n\t\t// If entities are ever deep/shallow copied, this function will need to check this to be more robust.\n\t\treturn this.world && this._id !== undefined\n\t}\n\n\t/**\n\t * Returns unique entity ID as a string.\n\t *\n\t * @example\n\t * let entityId = entity.toString()\n\t *\n\t * @return {string} String representation of the entity ID.\n\t */\n\ttoString() {\n\t\treturn String(this._id)\n\t}\n\n\t/**\n\t * Serializes entire entity and components to JSON.\n\t * Note: Defining toJSON methods in your components will override the built-in behavior.\n\t *\n\t * @example\n\t * let serializedEntity = entity.toJSON()\n\t *\n\t * @return {string} JSON encoded string\n\t */\n\ttoJSON() {\n\t\treturn JSON.stringify(this.data)\n\t}\n\n\t/**\n\t * Deserializes data from JSON, creating new components and overwriting existing components.\n\t * Note: Defining fromJSON methods in your components will override the built-in behavior.\n\t *\n\t * @example\n\t * entity.fromJSON(serializedEntity)\n\t *\n\t * @param {string} data - A JSON string containing component data to parse, and store in this entity.\n\t *\n\t * @return {Object} The original entity that fromJSON() was called on, so that operations can be chained.\n\t */\n\tfromJSON(data) {\n\t\tlet parsed = JSON.parse(data)\n\t\tfor (let name in parsed) {\n\t\t\tlet comp = this.access(name)\n\n\t\t\t// Either call custom method or copy all properties\n\t\t\tif (typeof comp.fromJSON === 'function') {\n\t\t\t\tcomp.fromJSON(parsed[name])\n\t\t\t} else {\n\t\t\t\tthis.update(name, parsed[name])\n\t\t\t}\n\t\t}\n\t\treturn this\n\t}\n\n\t/**\n\t * Attaches a currently detached entity back to a world.\n\t * Note: Do not use detached entities, get() may be safe, but avoid calling other methods\n\t * Note: The ID will be reassigned, so do not rely on this\n\t *\n\t * @example\n\t * entity.attach(world)\n\t *\n\t * @param {World} world - The world to attach this entity to\n\t */\n\tattach(world) {\n\t\tif (world && !this.valid()) {\n\t\t\t// Assign new id, and reattach to world\n\t\t\tthis.world = world\n\t\t\tthis._id = this.world.idCounter++\n\t\t\tthis.world.entities.set(this._id, this)\n\t\t\tthis.world.index.addEntity(this)\n\t\t}\n\t}\n\n\t/**\n\t * Removes this entity from the current world, without removing any components or data.\n\t * It can be re-attached to another world (or the same world), using the attach() method.\n\t * Note: Do not use detached entities, get() may be safe, but avoid calling other methods\n\t * Note: The ID will be reassigned, so do not rely on this\n\t *\n\t * @example\n\t * entity.detach()\n\t */\n\tdetach() {\n\t\tif (this.valid()) {\n\t\t\t// Remove from current world\n\t\t\tthis.world.index.removeEntity(this)\n\t\t\tthis.world.entities.delete(this._id)\n\t\t\tthis._id = undefined\n\t\t\tthis.world = undefined\n\t\t}\n\t}\n}\n\nexports.Entity = Entity\n",
     "static": true,
     "longname": "/srv/http/picoes/src/entity.js",
     "access": "public",
@@ -1513,7 +1513,7 @@
     "__docId__": 91,
     "kind": "file",
     "name": "src/utilities.js",
-    "content": "/**\n * Utility function for invoking methods inside objects, binding \"this\" to the object.\n *\n * @ignore\n *\n * @param {Object}   object - The object\n * @param {Function} method - The method\n * @param {Array}    args   - The arguments\n *\n * @return {Object} Returns what the called method returns\n */\nfunction invoke(object, method, ...args) {\n\tif (object && typeof object[method] === 'function') {\n\t\treturn object[method].call(object, ...args)\n\t}\n}\n\nexports.invoke = invoke\n",
+    "content": "/**\n * Utility function for invoking methods inside objects, binding \"this\" to the object.\n *\n * @ignore\n *\n * @param {Object}   object - The object\n * @param {Function} method - The method\n * @param {Array}    args   - The arguments\n *\n * @return {Object} Returns what the called method returns\n */\nfunction invoke(object, method, ...args) {\n\tif (object && typeof object[method] === 'function') {\n\t\treturn object[method].call(object, ...args)\n\t}\n}\n\n/**\n * Determines if function.\n *\n * @ignore\n */\nfunction isFunction(obj) {\n\treturn typeof obj === 'function'\n}\n\nexports.invoke = invoke\nexports.isFunction = isFunction\n",
     "static": true,
     "longname": "/srv/http/picoes/src/utilities.js",
     "access": "public",
@@ -1579,9 +1579,39 @@
   },
   {
     "__docId__": 93,
+    "kind": "function",
+    "name": "isFunction",
+    "memberof": "src/utilities.js",
+    "generator": false,
+    "async": false,
+    "static": true,
+    "longname": "src/utilities.js~isFunction",
+    "access": "public",
+    "export": false,
+    "importPath": "picoes/src/utilities.js",
+    "importStyle": null,
+    "description": "Determines if function.",
+    "lineNumber": 23,
+    "ignore": true,
+    "params": [
+      {
+        "name": "obj",
+        "types": [
+          "*"
+        ]
+      }
+    ],
+    "return": {
+      "types": [
+        "*"
+      ]
+    }
+  },
+  {
+    "__docId__": 94,
     "kind": "file",
     "name": "src/world.js",
-    "content": "/** @ignore */\nconst { invoke } = require('./utilities.js')\n\n/** @ignore */\nconst { Entity } = require('./entity.js')\n\n/** @ignore */\nconst { ComponentIndex } = require('./component_index.js')\n\n/**\n * Determines if function.\n *\n * @ignore\n */\nfunction isFunction(obj) {\n\treturn typeof obj === 'function'\n}\n\n/**\n * Class for world.\n *\n * @class      World (name)\n */\nclass World {\n\t/**\n\t * Constructs an instance of the world.\n\t */\n\tconstructor() {\n\t\t/** @ignore */\n\t\tthis.systems = []\n\t\t/** @ignore */\n\t\tthis.entities = {}\n\t\t/** @ignore */\n\t\tthis.components = {}\n\t\t/** @ignore */\n\t\tthis.entityTemplates = {}\n\n\t\t/** @ignore */\n\t\tthis.idCounter = 1\n\n\t\t/**\n\t\t * Maps entire queries to arrays of entities\n\t\t * @ignore\n\t\t */\n\t\tthis.index = new ComponentIndex(this.entities)\n\t}\n\n\t/**\n\t * Removes all entities from the world.\n\t * Does not affect registered systems, components, or prototypes.\n\t *\n\t * @example\n\t * world.clear()\n\t */\n\tclear() {\n\t\t// Call onRemove on all components of all entities\n\t\tfor (let entityId in this.entities) {\n\t\t\tlet entity = this.entities[entityId]\n\t\t\tfor (let componentName in entity.data) {\n\t\t\t\t// Get component, and call onRemove if it exists as a function\n\t\t\t\tlet component = entity.data[componentName]\n\t\t\t\tif (isFunction(component.onRemove)) {\n\t\t\t\t\tcomponent.onRemove()\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Clear entities\n\t\tthis.entities = {}\n\t\tthis.index.clear(this.entities)\n\t}\n\n\t/**\n\t * Registers a component type to the world. Components must be constructable. They are passed the entity first,\n\t * then the rest of the arguments from methods like entity.set(). Components also can have an onRemove() method.\n\t *\n\t * @param {string}   name           - The name\n\t * @param {function} componentClass - The component class, must be a constructable class or function\n\t *\n\t * @example\n\t * world.component('myComponent', class {\n\t *     constructor(entity, some, args) {\n\t *         this.entity = entity\n\t *         this.some = some\n\t *         this.args = args\n\t *     }\n\t * })\n\t * // entity === the new entity object\n\t * // some === 10\n\t * // args === 500\n\t * world.entity().set('myComponent', 10, 500)\n\t *\n\t * @return {string} Registered component name on success, undefined on failure\n\t */\n\tcomponent(name, componentClass) {\n\t\t// Only allow functions and classes to be components\n\t\tif (isFunction(componentClass)) {\n\t\t\tthis.components[name] = componentClass\n\t\t\treturn name\n\t\t}\n\t}\n\n\t/**\n\t * Creates a new entity in the world\n\t *\n\t * @param {string} [name] - The prototype name to use\n\t *\n\t * @example\n\t * world.entity()\n\t *\n\t * @example\n\t * world.entity('Player')\n\t *\n\t * @return {Entity} The new entity created\n\t */\n\tentity(name) {\n\t\tlet entId = this.idCounter++\n\t\tlet entity = new Entity(this, entId)\n\n\t\t// Use 'name' to get prototype data (if specified)\n\t\tif (name && name in this.entityTemplates) {\n\t\t\t// Add all components from prototype\n\t\t\tlet template = this.entityTemplates[name]\n\t\t\tfor (let componentName in template) {\n\t\t\t\t// Update component with data from template\n\t\t\t\tlet newComponentData = JSON.parse(template[componentName])\n\t\t\t\tentity.update(componentName, newComponentData)\n\t\t\t}\n\t\t}\n\n\t\tthis.entities[entId] = entity\n\t\treturn entity\n\t}\n\n\t/**\n\t * Registers a system to the world.\n\t * The order the systems get registered, is the order then run in.\n\t *\n\t * @example\n\t * // Movement system\n\t * world.system(['position', 'velocity'], class {\n\t *      every(position, velocity, entity) {\n\t *          position.x += velocity.x\n\t *          position.y += velocity.y\n\t *      }\n\t *  })\n\t *\n\t * @param {Array}     components  - The list of components the system will process in every(). This follows the same logic as entity.has() and world.every().\n\t * @param {Function}  systemClass - The system class to instantiate. Can contain the following methods: constructor, initialize,\n\t * pre, every, post. Pre() and post() get called before and after every(), for each of the independent systems. See world.run()\n\t * for an example of the call order.\n\t * @param {...Object} [args]      - The arguments to forward to the system's constructors\n\t *\n\t * @return {number} Unique ID of the system on success or undefined on failure\n\t */\n\tsystem(components, systemClass, ...args) {\n\t\t// TODO: Make components optional, and parameters more dynamic by only using ...args\n\t\tif (isFunction(systemClass)) {\n\t\t\t// Create the system, and set the component array query\n\t\t\tlet newSystem = new systemClass(...args)\n\t\t\tnewSystem.components = components\n\n\t\t\t// Add the system, return its ID\n\t\t\treturn this.systems.push(newSystem) - 1\n\t\t}\n\t\treturn undefined\n\t}\n\n\t/**\n\t * Calls initialize() on all systems\n\t *\n\t * @example\n\t * world.initialize(renderContext)\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' initialize() methods\n\t */\n\tinitialize(...args) {\n\t\tfor (let system of this.systems) {\n\t\t\tinvoke(system, 'initialize', ...args)\n\t\t}\n\t}\n\n\t/**\n\t * Calls pre(), every(), and post() on all systems\n\t *\n\t * @example\n\t * world.run(deltaTime)\n\t *\n\t * @example\n\t * // Example flow of method call order:\n\t * // Setup systems:\n\t * world.system([], systemA)\n\t * world.system([], systemB)\n\t * // During world.run():\n\t * // systemA.pre()\n\t * // systemA.every() * number of entities\n\t * // systemA.post()\n\t * // systemB.pre()\n\t * // systemB.every() * number of entities\n\t * // systemB.post()\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' methods\n\t */\n\trun(...args) {\n\t\tfor (let system of this.systems) {\n\t\t\tinvoke(system, 'pre', ...args)\n\n\t\t\t// Run the \"every\" method in the system\n\t\t\tif (isFunction(system.every)) {\n\t\t\t\tthis.every(system.components, system.every.bind(system), ...args)\n\t\t\t}\n\n\t\t\tinvoke(system, 'post', ...args)\n\t\t}\n\t}\n\n\t/**\n\t * Iterate through entities with the specified components\n\t *\n\t * @example\n\t * // Use a callback to process entities one-by-one\n\t * world.every(['comp'], comp => {comp.value = 0})\n\t *\n\t * @example\n\t * // Get an iterator for the entities\n\t * let it = world.every(['comp'])\n\t * for (let entity of it) {...}\n\t *\n\t * @param {Array}     componentNames - The component names to match entites with. This checks if the entity\n\t * has ALL of the specified components, but does not check for additional components.\n\t * @param {Function}  callback       - The callback to call for each entity. Takes (...components, entity, ...args).\n\t * @param {...Object} [args]         - Any additional arguments to pass to the callback.\n\t *\n\t * @return {MapIterator} An iterator to the entities themselves\n\t */\n\tevery(componentNames, callback, ...args) {\n\t\t// Get indexed map of entities\n\t\tlet entities = this.index.query(componentNames)\n\n\t\tif (isFunction(callback)) {\n\t\t\t// Go through the map of entities\n\t\t\tfor (let entity of entities.values()) {\n\t\t\t\t// At this point, we can safely assume that all components exist, even if entities/components\n\t\t\t\t// are deleted/modified during the loop, because JavaScript's MapIterator is smart enough.\n\n\t\t\t\t// Get all components as an array\n\t\t\t\tlet components = componentNames.map(name => entity.get(name))\n\n\t\t\t\t// Pass components, then the main entity, then any additional arguments\n\t\t\t\tlet status = callback(...components, entity, ...args)\n\n\t\t\t\t// Stop the iteration when the callback returns false\n\t\t\t\tif (status === false) {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn entities.values()\n\t}\n\n\t/**\n\t * Returns an array of entities with matching components\n\t * Simplified version of every(), returns an actual array, and only takes component names as arguments.\n\t *\n\t * @example\n\t * world.get('player', 'sprite')\n\t *\n\t * @param {Array} componentNames - The component names to match on. See every() for how this matches.\n\t *\n\t * @return {Array} Array of entities, instead of iterator like every().\n\t */\n\tget(...componentNames) {\n\t\treturn [...this.every(componentNames)]\n\t}\n\n\t/**\n\t * Registers entity prototype(s). Any existing prototype names that are the same will be overwritten\n\t *\n\t * @example\n\t * world.prototype({\n\t *     Movable: {\n\t *         position: {},\n\t *         velocity: {}\n\t *     }\n\t * })\n\t *\n\t * @param {Object} data - Object structure to register as a prototype. Should be a dictionary with the top level keys\n\t * being the prototype names. Can also be a JSON formatted string.\n\t *\n\t * @return {number} Number of prototypes added.\n\t */\n\tprototype(data) {\n\t\tlet count = 0\n\n\t\t// Convert to an object when given a string\n\t\tif (typeof data === 'string') {\n\t\t\tdata = JSON.parse(data)\n\t\t}\n\n\t\t// Data must be an object at this point\n\t\tif (typeof data === 'object') {\n\t\t\t// Iterate through prototype names\n\t\t\tfor (let protoName in data) {\n\t\t\t\tlet inputObject = data[protoName]\n\t\t\t\tlet protoObject = {}\n\t\t\t\t// Iterate through component names\n\t\t\t\tfor (let compName in inputObject) {\n\t\t\t\t\t// Store strings of each component\n\t\t\t\t\tprotoObject[compName] = JSON.stringify(inputObject[compName])\n\t\t\t\t}\n\t\t\t\tthis.entityTemplates[protoName] = protoObject\n\t\t\t\t++count\n\t\t\t}\n\t\t}\n\n\t\treturn count\n\t}\n}\n\nexports.World = World\n",
+    "content": "/** @ignore */\nconst { invoke, isFunction } = require('./utilities.js')\n\n/** @ignore */\nconst { Entity } = require('./entity.js')\n\n/** @ignore */\nconst { ComponentIndex } = require('./component_index.js')\n\n/**\n * Class for world.\n *\n * @class      World (name)\n */\nclass World {\n\t/**\n\t * Constructs an instance of the world.\n\t */\n\tconstructor() {\n\t\t/** @ignore */\n\t\tthis.systems = []\n\n\t\t/**\n\t\t * Maps entity IDs to entities\n\t\t * @ignore\n\t\t */\n\t\tthis.entities = new Map()\n\n\t\t/** @ignore */\n\t\tthis.components = {}\n\n\t\t/** @ignore */\n\t\tthis.entityTemplates = {}\n\n\t\t/** @ignore */\n\t\tthis.idCounter = 1\n\n\t\t/**\n\t\t * Maps entire queries to arrays of entities\n\t\t * @ignore\n\t\t */\n\t\tthis.index = new ComponentIndex(this.entities)\n\t}\n\n\t/**\n\t * Removes all entities from the world.\n\t * Does not affect registered systems, components, or prototypes.\n\t *\n\t * @example\n\t * world.clear()\n\t */\n\tclear() {\n\t\t// Call onRemove on all components of all entities\n\t\tfor (const [entityId, entity] of this.entities) {\n\t\t\tfor (let componentName in entity.data) {\n\t\t\t\t// Get component, and call onRemove if it exists as a function\n\t\t\t\tlet component = entity.data[componentName]\n\t\t\t\tinvoke(component, 'onRemove')\n\t\t\t}\n\t\t}\n\n\t\t// Clear entities\n\t\tthis.entities = new Map()\n\t\tthis.index.clear(this.entities)\n\t}\n\n\t/**\n\t * Registers a component type to the world. Components must be constructable. They are passed the entity first,\n\t * then the rest of the arguments from methods like entity.set(). Components also can have an onRemove() method.\n\t *\n\t * @param {string}   name           - The name\n\t * @param {function} componentClass - The component class, must be a constructable class or function\n\t *\n\t * @example\n\t * world.component('myComponent', class {\n\t *     constructor(entity, some, args) {\n\t *         this.entity = entity\n\t *         this.some = some\n\t *         this.args = args\n\t *     }\n\t * })\n\t * // entity === the new entity object\n\t * // some === 10\n\t * // args === 500\n\t * world.entity().set('myComponent', 10, 500)\n\t *\n\t * @return {string} Registered component name on success, undefined on failure\n\t */\n\tcomponent(name, componentClass) {\n\t\t// Only allow functions and classes to be components\n\t\tif (isFunction(componentClass)) {\n\t\t\tthis.components[name] = componentClass\n\t\t\treturn name\n\t\t}\n\t}\n\n\t/**\n\t * Creates a new entity in the world\n\t *\n\t * @param {string} [name] - The prototype name to use\n\t *\n\t * @example\n\t * world.entity()\n\t *\n\t * @example\n\t * world.entity('Player')\n\t *\n\t * @return {Entity} The new entity created\n\t */\n\tentity(name) {\n\t\tlet entityId = this.idCounter++\n\t\tlet entity = new Entity(this, entityId)\n\n\t\t// Use 'name' to get prototype data (if specified)\n\t\tif (name && name in this.entityTemplates) {\n\t\t\t// Add all components from prototype\n\t\t\tlet template = this.entityTemplates[name]\n\t\t\tfor (let componentName in template) {\n\t\t\t\t// Update component with data from template\n\t\t\t\tlet newComponentData = JSON.parse(template[componentName])\n\t\t\t\tentity.update(componentName, newComponentData)\n\t\t\t}\n\t\t}\n\n\t\tthis.entities.set(entityId, entity)\n\t\treturn entity\n\t}\n\n\t/**\n\t * Registers a system to the world.\n\t * The order the systems get registered, is the order then run in.\n\t *\n\t * @example\n\t * // Movement system\n\t * world.system(['position', 'velocity'], class {\n\t *      every(position, velocity, entity) {\n\t *          position.x += velocity.x\n\t *          position.y += velocity.y\n\t *      }\n\t *  })\n\t *\n\t * @param {Array}     components  - The list of components the system will process in every(). This follows the same logic as entity.has() and world.every().\n\t * @param {Function}  systemClass - The system class to instantiate. Can contain the following methods: constructor, initialize,\n\t * pre, every, post. Pre() and post() get called before and after every(), for each of the independent systems. See world.run()\n\t * for an example of the call order.\n\t * @param {...Object} [args]      - The arguments to forward to the system's constructors\n\t *\n\t * @return {number} Unique ID of the system on success or undefined on failure\n\t */\n\tsystem(components, systemClass, ...args) {\n\t\t// TODO: Make components optional, and parameters more dynamic by only using ...args\n\t\tif (isFunction(systemClass)) {\n\t\t\t// Create the system, and set the component array query\n\t\t\tlet newSystem = new systemClass(...args)\n\t\t\tnewSystem.components = components\n\n\t\t\t// Add the system, return its ID\n\t\t\treturn this.systems.push(newSystem) - 1\n\t\t}\n\t\treturn undefined\n\t}\n\n\t/**\n\t * Calls initialize() on all systems\n\t *\n\t * @example\n\t * world.initialize(renderContext)\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' initialize() methods\n\t */\n\tinitialize(...args) {\n\t\tfor (let system of this.systems) {\n\t\t\tinvoke(system, 'initialize', ...args)\n\t\t}\n\t}\n\n\t/**\n\t * Calls pre(), every(), and post() on all systems\n\t *\n\t * @example\n\t * world.run(deltaTime)\n\t *\n\t * @example\n\t * // Example flow of method call order:\n\t * // Setup systems:\n\t * world.system([], systemA)\n\t * world.system([], systemB)\n\t * // During world.run():\n\t * // systemA.pre()\n\t * // systemA.every() * number of entities\n\t * // systemA.post()\n\t * // systemB.pre()\n\t * // systemB.every() * number of entities\n\t * // systemB.post()\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' methods\n\t */\n\trun(...args) {\n\t\tfor (let system of this.systems) {\n\t\t\tinvoke(system, 'pre', ...args)\n\n\t\t\t// Run the \"every\" method in the system\n\t\t\tif (isFunction(system.every)) {\n\t\t\t\tthis.every(system.components, system.every.bind(system), ...args)\n\t\t\t}\n\n\t\t\tinvoke(system, 'post', ...args)\n\t\t}\n\t}\n\n\t/**\n\t * Iterate through entities with the specified components\n\t *\n\t * @example\n\t * // Use a callback to process entities one-by-one\n\t * world.every(['comp'], comp => {comp.value = 0})\n\t *\n\t * @example\n\t * // Get an iterator for the entities\n\t * let it = world.every(['comp'])\n\t * for (let entity of it) {...}\n\t *\n\t * @param {Array}     componentNames - The component names to match entites with. This checks if the entity\n\t * has ALL of the specified components, but does not check for additional components.\n\t * @param {Function}  callback       - The callback to call for each entity. Takes (...components, entity, ...args).\n\t * @param {...Object} [args]         - Any additional arguments to pass to the callback.\n\t *\n\t * @return {MapIterator} An iterator to the entities themselves\n\t */\n\tevery(componentNames, callback, ...args) {\n\t\t// Get indexed map of entities\n\t\tlet entities = this.index.query(componentNames)\n\n\t\tif (isFunction(callback)) {\n\t\t\t// Go through the map of entities\n\t\t\tfor (let entity of entities.values()) {\n\t\t\t\t// At this point, we can safely assume that all components exist, even if entities/components\n\t\t\t\t// are deleted/modified during the loop, because JavaScript's MapIterator is smart enough.\n\n\t\t\t\t// Get all components as an array\n\t\t\t\tlet components = componentNames.map(name => entity.get(name))\n\n\t\t\t\t// Pass components, then the main entity, then any additional arguments\n\t\t\t\tlet status = callback(...components, entity, ...args)\n\n\t\t\t\t// Stop the iteration when the callback returns false\n\t\t\t\tif (status === false) {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn entities.values()\n\t}\n\n\t/**\n\t * Returns an array of entities with matching components\n\t * Simplified version of every(), returns an actual array, and only takes component names as arguments.\n\t *\n\t * @example\n\t * world.get('player', 'sprite')\n\t *\n\t * @param {Array} componentNames - The component names to match on. See every() for how this matches.\n\t *\n\t * @return {Array} Array of entities, instead of iterator like every().\n\t */\n\tget(...componentNames) {\n\t\treturn [...this.every(componentNames)]\n\t}\n\n\t/**\n\t * Registers entity prototype(s). Any existing prototype names that are the same will be overwritten\n\t *\n\t * @example\n\t * world.prototype({\n\t *     Movable: {\n\t *         position: {},\n\t *         velocity: {}\n\t *     }\n\t * })\n\t *\n\t * @param {Object} data - Object structure to register as a prototype. Should be a dictionary with the top level keys\n\t * being the prototype names. Can also be a JSON formatted string.\n\t *\n\t * @return {number} Number of prototypes added.\n\t */\n\tprototype(data) {\n\t\tlet count = 0\n\n\t\t// Convert to an object when given a string\n\t\tif (typeof data === 'string') {\n\t\t\tdata = JSON.parse(data)\n\t\t}\n\n\t\t// Data must be an object at this point\n\t\tif (typeof data === 'object') {\n\t\t\t// Iterate through prototype names\n\t\t\tfor (let protoName in data) {\n\t\t\t\tlet inputObject = data[protoName]\n\t\t\t\tlet protoObject = {}\n\t\t\t\t// Iterate through component names\n\t\t\t\tfor (let compName in inputObject) {\n\t\t\t\t\t// Store strings of each component\n\t\t\t\t\tprotoObject[compName] = JSON.stringify(inputObject[compName])\n\t\t\t\t}\n\t\t\t\tthis.entityTemplates[protoName] = protoObject\n\t\t\t\t++count\n\t\t\t}\n\t\t}\n\n\t\treturn count\n\t}\n}\n\nexports.World = World\n",
     "static": true,
     "longname": "/srv/http/picoes/src/world.js",
     "access": "public",
@@ -1589,7 +1619,7 @@
     "lineNumber": 1
   },
   {
-    "__docId__": 94,
+    "__docId__": 95,
     "kind": "variable",
     "name": "invoke",
     "memberof": "src/world.js",
@@ -1609,7 +1639,7 @@
     }
   },
   {
-    "__docId__": 95,
+    "__docId__": 96,
     "kind": "variable",
     "name": "Entity",
     "memberof": "src/world.js",
@@ -1629,7 +1659,7 @@
     }
   },
   {
-    "__docId__": 96,
+    "__docId__": 97,
     "kind": "variable",
     "name": "ComponentIndex",
     "memberof": "src/world.js",
@@ -1648,36 +1678,6 @@
       ]
     }
   },
-  {
-    "__docId__": 97,
-    "kind": "function",
-    "name": "isFunction",
-    "memberof": "src/world.js",
-    "generator": false,
-    "async": false,
-    "static": true,
-    "longname": "src/world.js~isFunction",
-    "access": "public",
-    "export": false,
-    "importPath": "picoes/src/world.js",
-    "importStyle": null,
-    "description": "Determines if function.",
-    "lineNumber": 15,
-    "ignore": true,
-    "params": [
-      {
-        "name": "obj",
-        "types": [
-          "*"
-        ]
-      }
-    ],
-    "return": {
-      "types": [
-        "*"
-      ]
-    }
-  },
   {
     "__docId__": 98,
     "kind": "class",
@@ -1690,7 +1690,7 @@
     "importPath": "picoes/src/world.js",
     "importStyle": null,
     "description": "Class for world.",
-    "lineNumber": 24,
+    "lineNumber": 15,
     "unknown": [
       {
         "tagName": "@class",
@@ -1710,7 +1710,7 @@
     "longname": "src/world.js~World#constructor",
     "access": "public",
     "description": "Constructs an instance of the world.",
-    "lineNumber": 28
+    "lineNumber": 19
   },
   {
     "__docId__": 100,
@@ -1721,7 +1721,7 @@
     "longname": "src/world.js~World#systems",
     "access": "public",
     "description": null,
-    "lineNumber": 30,
+    "lineNumber": 21,
     "ignore": true,
     "type": {
       "types": [
@@ -1737,12 +1737,12 @@
     "static": false,
     "longname": "src/world.js~World#entities",
     "access": "public",
-    "description": null,
-    "lineNumber": 32,
+    "description": "Maps entity IDs to entities",
+    "lineNumber": 27,
     "ignore": true,
     "type": {
       "types": [
-        "{}"
+        "*"
       ]
     }
   },
@@ -1755,7 +1755,7 @@
     "longname": "src/world.js~World#components",
     "access": "public",
     "description": null,
-    "lineNumber": 34,
+    "lineNumber": 30,
     "ignore": true,
     "type": {
       "types": [
@@ -1772,7 +1772,7 @@
     "longname": "src/world.js~World#entityTemplates",
     "access": "public",
     "description": null,
-    "lineNumber": 36,
+    "lineNumber": 33,
     "ignore": true,
     "type": {
       "types": [
@@ -1789,7 +1789,7 @@
     "longname": "src/world.js~World#idCounter",
     "access": "public",
     "description": null,
-    "lineNumber": 39,
+    "lineNumber": 36,
     "ignore": true,
     "type": {
       "types": [
@@ -1806,7 +1806,7 @@
     "longname": "src/world.js~World#index",
     "access": "public",
     "description": "Maps entire queries to arrays of entities",
-    "lineNumber": 45,
+    "lineNumber": 42,
     "ignore": true,
     "type": {
       "types": [
@@ -1828,7 +1828,7 @@
     "examples": [
       "world.clear()"
     ],
-    "lineNumber": 55,
+    "lineNumber": 52,
     "params": [],
     "return": null
   },
@@ -1846,7 +1846,7 @@
     "examples": [
       "world.component('myComponent', class {\n    constructor(entity, some, args) {\n        this.entity = entity\n        this.some = some\n        this.args = args\n    }\n})\n// entity === the new entity object\n// some === 10\n// args === 500\nworld.entity().set('myComponent', 10, 500)"
     ],
-    "lineNumber": 95,
+    "lineNumber": 89,
     "params": [
       {
         "nullable": null,
@@ -1893,7 +1893,7 @@
       "world.entity()",
       "world.entity('Player')"
     ],
-    "lineNumber": 116,
+    "lineNumber": 110,
     "params": [
       {
         "nullable": null,
@@ -1929,7 +1929,7 @@
     "examples": [
       "// Movement system\nworld.system(['position', 'velocity'], class {\n     every(position, velocity, entity) {\n         position.x += velocity.x\n         position.y += velocity.y\n     }\n })"
     ],
-    "lineNumber": 156,
+    "lineNumber": 150,
     "params": [
       {
         "nullable": null,
@@ -1985,7 +1985,7 @@
     "examples": [
       "world.initialize(renderContext)"
     ],
-    "lineNumber": 177,
+    "lineNumber": 171,
     "params": [
       {
         "nullable": null,
@@ -2015,7 +2015,7 @@
       "world.run(deltaTime)",
       "// Example flow of method call order:\n// Setup systems:\nworld.system([], systemA)\nworld.system([], systemB)\n// During world.run():\n// systemA.pre()\n// systemA.every() * number of entities\n// systemA.post()\n// systemB.pre()\n// systemB.every() * number of entities\n// systemB.post()"
     ],
-    "lineNumber": 204,
+    "lineNumber": 198,
     "params": [
       {
         "nullable": null,
@@ -2045,7 +2045,7 @@
       "// Use a callback to process entities one-by-one\nworld.every(['comp'], comp => {comp.value = 0})",
       "// Get an iterator for the entities\nlet it = world.every(['comp'])\nfor (let entity of it) {...}"
     ],
-    "lineNumber": 236,
+    "lineNumber": 230,
     "params": [
       {
         "nullable": null,
@@ -2101,7 +2101,7 @@
     "examples": [
       "world.get('player', 'sprite')"
     ],
-    "lineNumber": 273,
+    "lineNumber": 267,
     "params": [
       {
         "nullable": null,
@@ -2137,7 +2137,7 @@
     "examples": [
       "world.prototype({\n    Movable: {\n        position: {},\n        velocity: {}\n    }\n})"
     ],
-    "lineNumber": 293,
+    "lineNumber": 287,
     "params": [
       {
         "nullable": null,
diff --git a/docs/source.html b/docs/source.html
index 689147c..2f790a5 100644
--- a/docs/source.html
+++ b/docs/source.html
@@ -51,36 +51,36 @@
   
     
   
-      src/component_index.js
+      src/component_index.js
       -
       7 %1/13
-      2479 byte
-      92
-      2018-04-07 19:06:25 (UTC)
+      2452 byte
+      90
+      2018-04-07 19:32:41 (UTC)
     
 
       src/entity.js
       Entity
       100 %22/22
-      8963 byte
+      8966 byte
       333
-      2018-04-07 19:19:35 (UTC)
+      2018-04-07 19:37:01 (UTC)
     
 
       src/utilities.js
       -
-      100 %1/1
-      474 byte
-      18
-      2018-04-07 19:06:25 (UTC)
+      100 %2/2
+      619 byte
+      28
+      2018-04-07 19:30:18 (UTC)
     
 
       src/world.js
       World
-      100 %21/21
-      8915 byte
-      321
-      2018-04-07 19:06:25 (UTC)
+      100 %20/20
+      8816 byte
+      315
+      2018-04-07 19:39:12 (UTC)
     
 
 
diff --git a/src/component_index.js b/src/component_index.js
index 2f36a76..74bc605 100644
--- a/src/component_index.js
+++ b/src/component_index.js
@@ -31,9 +31,7 @@ class ComponentIndex {
 	build(hash, componentNames) {
 		let matchingEntities = new Map()
 
-		for (let entId in this.entities) {
-			let entity = this.entities[entId]
-
+		for (const [entityId, entity] of this.entities) {
 			// Ensure entity contains all specified components
 			if (entity.has(...componentNames)) {
 				// Add entity to index
@@ -66,14 +64,14 @@ class ComponentIndex {
 
 	// Update an entity in the index (for creating components)
 	add(entity, ...componentNames) {
-		this.apply(componentNames, (entities) => {
+		this.apply(componentNames, entities => {
 			entities.set(entity.toString(), entity)
 		})
 	}
 
 	// Update an entity in the index (for removing components)
 	remove(entity, ...componentNames) {
-		this.apply(componentNames, (entities) => {
+		this.apply(componentNames, entities => {
 			entities.delete(entity.toString())
 		})
 	}
diff --git a/src/entity.js b/src/entity.js
index a3577df..a6c3078 100644
--- a/src/entity.js
+++ b/src/entity.js
@@ -220,7 +220,7 @@ class Entity {
 			this.world.index.remove(this)
 
 			// Remove from world
-			delete this.world.entities[this._id]
+			this.world.entities.delete(this._id)
 			this._id = undefined
 		}
 	}
@@ -305,7 +305,7 @@ class Entity {
 			// Assign new id, and reattach to world
 			this.world = world
 			this._id = this.world.idCounter++
-			this.world.entities[this._id] = this
+			this.world.entities.set(this._id, this)
 			this.world.index.addEntity(this)
 		}
 	}
@@ -323,7 +323,7 @@ class Entity {
 		if (this.valid()) {
 			// Remove from current world
 			this.world.index.removeEntity(this)
-			delete this.world.entities[this._id]
+			this.world.entities.delete(this._id)
 			this._id = undefined
 			this.world = undefined
 		}
diff --git a/src/utilities.js b/src/utilities.js
index ef93d9d..f3455a6 100644
--- a/src/utilities.js
+++ b/src/utilities.js
@@ -15,4 +15,14 @@ function invoke(object, method, ...args) {
 	}
 }
 
+/**
+ * Determines if function.
+ *
+ * @ignore
+ */
+function isFunction(obj) {
+	return typeof obj === 'function'
+}
+
 exports.invoke = invoke
+exports.isFunction = isFunction
diff --git a/src/world.js b/src/world.js
index dae28b0..e6f010c 100644
--- a/src/world.js
+++ b/src/world.js
@@ -1,5 +1,5 @@
 /** @ignore */
-const { invoke } = require('./utilities.js')
+const { invoke, isFunction } = require('./utilities.js')
 
 /** @ignore */
 const { Entity } = require('./entity.js')
@@ -7,15 +7,6 @@ const { Entity } = require('./entity.js')
 /** @ignore */
 const { ComponentIndex } = require('./component_index.js')
 
-/**
- * Determines if function.
- *
- * @ignore
- */
-function isFunction(obj) {
-	return typeof obj === 'function'
-}
-
 /**
  * Class for world.
  *
@@ -28,10 +19,16 @@ class World {
 	constructor() {
 		/** @ignore */
 		this.systems = []
-		/** @ignore */
-		this.entities = {}
+
+		/**
+		 * Maps entity IDs to entities
+		 * @ignore
+		 */
+		this.entities = new Map()
+
 		/** @ignore */
 		this.components = {}
+
 		/** @ignore */
 		this.entityTemplates = {}
 
@@ -54,19 +51,16 @@ class World {
 	 */
 	clear() {
 		// Call onRemove on all components of all entities
-		for (let entityId in this.entities) {
-			let entity = this.entities[entityId]
+		for (const [entityId, entity] of this.entities) {
 			for (let componentName in entity.data) {
 				// Get component, and call onRemove if it exists as a function
 				let component = entity.data[componentName]
-				if (isFunction(component.onRemove)) {
-					component.onRemove()
-				}
+				invoke(component, 'onRemove')
 			}
 		}
 
 		// Clear entities
-		this.entities = {}
+		this.entities = new Map()
 		this.index.clear(this.entities)
 	}
 
@@ -114,8 +108,8 @@ class World {
 	 * @return {Entity} The new entity created
 	 */
 	entity(name) {
-		let entId = this.idCounter++
-		let entity = new Entity(this, entId)
+		let entityId = this.idCounter++
+		let entity = new Entity(this, entityId)
 
 		// Use 'name' to get prototype data (if specified)
 		if (name && name in this.entityTemplates) {
@@ -128,7 +122,7 @@ class World {
 			}
 		}
 
-		this.entities[entId] = entity
+		this.entities.set(entityId, entity)
 		return entity
 	}
 
diff --git a/test/tests.js b/test/tests.js
index 8be0cdb..0943947 100644
--- a/test/tests.js
+++ b/test/tests.js
@@ -236,7 +236,7 @@ describe('World', function() {
 			ent.detach()
 			assert(!ent.valid())
 			assert(spriteCount === 2)
-			assert(Object.keys(world.entities).length === 1)
+			assert(world.entities.size === 1)
 			assert(getSize(world.every(['position'])) === 1)
 			assert(world.get('position').length === 1)
 			assert(world.get('position')[0].get('position').x === 2)
@@ -246,7 +246,7 @@ describe('World', function() {
 			ent.attach(world)
 			assert(ent.valid())
 			assert(spriteCount === 2)
-			assert(Object.keys(world.entities).length === 2)
+			assert(world.entities.size === 2)
 			assert(getSize(world.every(['position'])) === 2)
 			assert(world.get('position').length === 2)
 			assert(ent.get('position').x === 1)
@@ -618,7 +618,7 @@ describe('World', function() {
 			let world = new World()
 			world.component('position')
 			let ent = world.entity()
-			assert(Object.keys(world.entities).length == 1)
+			assert(world.entities.size == 1)
 			assert(ent.toString() == String(ent.id))
 		})
 		it('test if ID is read-only', function() {
@@ -650,7 +650,7 @@ describe('World', function() {
 			ent.set('position')
 			ent.get('position').val = 100
 
-			assert(Object.keys(world.entities).length == 1)
+			assert(world.entities.size == 1)
 			assert(Object.keys(world.components).length == 1)
 			assert(ent.has('position'))
 			assert(ent.get('position').val === 100)
@@ -658,7 +658,7 @@ describe('World', function() {
 
 			ent.destroy()
 
-			assert(Object.keys(world.entities).length == 0)
+			assert(world.entities.size == 0)
 			assert(Object.keys(world.components).length == 1)
 			assert(!ent.valid())
 			assert(!ent.has('position'))
@@ -666,7 +666,7 @@ describe('World', function() {
 			// Just for safe measure
 			ent.destroy()
 
-			assert(Object.keys(world.entities).length == 0)
+			assert(world.entities.size == 0)
 			assert(Object.keys(world.components).length == 1)
 			assert(!ent.valid())
 			assert(!ent.has('position'))

From 74ab931e54a4648dabf6053b5c810017e3c434d6 Mon Sep 17 00:00:00 2001
From: Eric Hebert 
Date: Sat, 7 Apr 2018 17:01:27 -0400
Subject: [PATCH 2/2] Systems can now be created without a component name array
 Restructured the documentation so the parameters would match up Updated/added
 tests

---
 docs/ast/source/entity.js.json       |  9488 ++++++------
 docs/ast/source/world.js.json        | 19339 ++++++++++++++-----------
 docs/class/src/entity.js~Entity.html |    44 +-
 docs/class/src/world.js~World.html   |    61 +-
 docs/file/src/entity.js.html         |     2 +
 docs/file/src/world.js.html          |    51 +-
 docs/index.json                      |    83 +-
 docs/source.html                     |    12 +-
 src/entity.js                        |     2 +
 src/world.js                         |    51 +-
 test/tests.js                        |    27 +-
 11 files changed, 15823 insertions(+), 13337 deletions(-)

diff --git a/docs/ast/source/entity.js.json b/docs/ast/source/entity.js.json
index 43a84db..91d89e8 100644
--- a/docs/ast/source/entity.js.json
+++ b/docs/ast/source/entity.js.json
@@ -1,28 +1,28 @@
 {
   "type": "File",
   "start": 0,
-  "end": 8966,
+  "end": 9011,
   "loc": {
     "start": {
       "line": 1,
       "column": 0
     },
     "end": {
-      "line": 334,
+      "line": 336,
       "column": 0
     }
   },
   "program": {
     "type": "Program",
     "start": 0,
-    "end": 8966,
+    "end": 9011,
     "loc": {
       "start": {
         "line": 1,
         "column": 0
       },
       "end": {
-        "line": 334,
+        "line": 336,
         "column": 0
       }
     },
@@ -232,14 +232,14 @@
       {
         "type": "ClassDeclaration",
         "start": 146,
-        "end": 8940,
+        "end": 8985,
         "loc": {
           "start": {
             "line": 9,
             "column": 0
           },
           "end": {
-            "line": 331,
+            "line": 333,
             "column": 1
           }
         },
@@ -265,14 +265,14 @@
         "body": {
           "type": "ClassBody",
           "start": 159,
-          "end": 8940,
+          "end": 8985,
           "loc": {
             "start": {
               "line": 9,
               "column": 13
             },
             "end": {
-              "line": 331,
+              "line": 333,
               "column": 1
             }
           },
@@ -1243,16 +1243,16 @@
               "trailingComments": [
                 {
                   "type": "CommentBlock",
-                  "value": "*\n\t * ID is read-only, attempting to set it will throw an error.\n\t *\n\t * @private\n\t ",
+                  "value": "*\n\t * ID is read-only, attempting to set it will throw an error.\n\t *\n\t * @private\n\t *\n\t * @throws {Error} Cannot set entity id\n\t ",
                   "start": 794,
-                  "end": 882,
+                  "end": 927,
                   "loc": {
                     "start": {
                       "line": 44,
                       "column": 1
                     },
                     "end": {
-                      "line": 48,
+                      "line": 50,
                       "column": 4
                     }
                   }
@@ -1261,15 +1261,15 @@
             },
             {
               "type": "ClassMethod",
-              "start": 884,
-              "end": 941,
+              "start": 929,
+              "end": 986,
               "loc": {
                 "start": {
-                  "line": 49,
+                  "line": 51,
                   "column": 1
                 },
                 "end": {
-                  "line": 51,
+                  "line": 53,
                   "column": 2
                 }
               },
@@ -1277,15 +1277,15 @@
               "computed": false,
               "key": {
                 "type": "Identifier",
-                "start": 888,
-                "end": 890,
+                "start": 933,
+                "end": 935,
                 "loc": {
                   "start": {
-                    "line": 49,
+                    "line": 51,
                     "column": 5
                   },
                   "end": {
-                    "line": 49,
+                    "line": 51,
                     "column": 7
                   },
                   "identifierName": "id"
@@ -1300,15 +1300,15 @@
               "params": [
                 {
                   "type": "Identifier",
-                  "start": 891,
-                  "end": 893,
+                  "start": 936,
+                  "end": 938,
                   "loc": {
                     "start": {
-                      "line": 49,
+                      "line": 51,
                       "column": 8
                     },
                     "end": {
-                      "line": 49,
+                      "line": 51,
                       "column": 10
                     },
                     "identifierName": "id"
@@ -1318,58 +1318,58 @@
               ],
               "body": {
                 "type": "BlockStatement",
-                "start": 895,
-                "end": 941,
+                "start": 940,
+                "end": 986,
                 "loc": {
                   "start": {
-                    "line": 49,
+                    "line": 51,
                     "column": 12
                   },
                   "end": {
-                    "line": 51,
+                    "line": 53,
                     "column": 2
                   }
                 },
                 "body": [
                   {
                     "type": "ThrowStatement",
-                    "start": 899,
-                    "end": 938,
+                    "start": 944,
+                    "end": 983,
                     "loc": {
                       "start": {
-                        "line": 50,
+                        "line": 52,
                         "column": 2
                       },
                       "end": {
-                        "line": 50,
+                        "line": 52,
                         "column": 41
                       }
                     },
                     "argument": {
                       "type": "NewExpression",
-                      "start": 905,
-                      "end": 938,
+                      "start": 950,
+                      "end": 983,
                       "loc": {
                         "start": {
-                          "line": 50,
+                          "line": 52,
                           "column": 8
                         },
                         "end": {
-                          "line": 50,
+                          "line": 52,
                           "column": 41
                         }
                       },
                       "callee": {
                         "type": "Identifier",
-                        "start": 909,
-                        "end": 914,
+                        "start": 954,
+                        "end": 959,
                         "loc": {
                           "start": {
-                            "line": 50,
+                            "line": 52,
                             "column": 12
                           },
                           "end": {
-                            "line": 50,
+                            "line": 52,
                             "column": 17
                           },
                           "identifierName": "Error"
@@ -1379,15 +1379,15 @@
                       "arguments": [
                         {
                           "type": "StringLiteral",
-                          "start": 915,
-                          "end": 937,
+                          "start": 960,
+                          "end": 982,
                           "loc": {
                             "start": {
-                              "line": 50,
+                              "line": 52,
                               "column": 18
                             },
                             "end": {
-                              "line": 50,
+                              "line": 52,
                               "column": 40
                             }
                           },
@@ -1407,16 +1407,16 @@
               "leadingComments": [
                 {
                   "type": "CommentBlock",
-                  "value": "*\n\t * ID is read-only, attempting to set it will throw an error.\n\t *\n\t * @private\n\t ",
+                  "value": "*\n\t * ID is read-only, attempting to set it will throw an error.\n\t *\n\t * @private\n\t *\n\t * @throws {Error} Cannot set entity id\n\t ",
                   "start": 794,
-                  "end": 882,
+                  "end": 927,
                   "loc": {
                     "start": {
                       "line": 44,
                       "column": 1
                     },
                     "end": {
-                      "line": 48,
+                      "line": 50,
                       "column": 4
                     }
                   }
@@ -1426,15 +1426,15 @@
                 {
                   "type": "CommentBlock",
                   "value": "*\n\t * Returns true if the entity has ALL of the specified component names.\n\t * Additional components that the entity has, which are not specified in has(), will be ignored.\n\t * If no component names are specified, this method returns true.\n\t *\n\t * @example\n\t * if (entity.has('position', 'velocity')) {...}\n\t *\n\t * @param {...string} [components] - The component names to check for\n\t *\n\t * @return {boolean} true or false\n\t ",
-                  "start": 944,
-                  "end": 1372,
+                  "start": 989,
+                  "end": 1417,
                   "loc": {
                     "start": {
-                      "line": 53,
+                      "line": 55,
                       "column": 1
                     },
                     "end": {
-                      "line": 64,
+                      "line": 66,
                       "column": 4
                     }
                   }
@@ -1443,15 +1443,15 @@
             },
             {
               "type": "ClassMethod",
-              "start": 1374,
-              "end": 1450,
+              "start": 1419,
+              "end": 1495,
               "loc": {
                 "start": {
-                  "line": 65,
+                  "line": 67,
                   "column": 1
                 },
                 "end": {
-                  "line": 67,
+                  "line": 69,
                   "column": 2
                 }
               },
@@ -1459,15 +1459,15 @@
               "computed": false,
               "key": {
                 "type": "Identifier",
-                "start": 1374,
-                "end": 1377,
+                "start": 1419,
+                "end": 1422,
                 "loc": {
                   "start": {
-                    "line": 65,
+                    "line": 67,
                     "column": 1
                   },
                   "end": {
-                    "line": 65,
+                    "line": 67,
                     "column": 4
                   },
                   "identifierName": "has"
@@ -1483,29 +1483,29 @@
               "params": [
                 {
                   "type": "RestElement",
-                  "start": 1378,
-                  "end": 1391,
+                  "start": 1423,
+                  "end": 1436,
                   "loc": {
                     "start": {
-                      "line": 65,
+                      "line": 67,
                       "column": 5
                     },
                     "end": {
-                      "line": 65,
+                      "line": 67,
                       "column": 18
                     }
                   },
                   "argument": {
                     "type": "Identifier",
-                    "start": 1381,
-                    "end": 1391,
+                    "start": 1426,
+                    "end": 1436,
                     "loc": {
                       "start": {
-                        "line": 65,
+                        "line": 67,
                         "column": 8
                       },
                       "end": {
-                        "line": 65,
+                        "line": 67,
                         "column": 18
                       },
                       "identifierName": "components"
@@ -1516,72 +1516,72 @@
               ],
               "body": {
                 "type": "BlockStatement",
-                "start": 1393,
-                "end": 1450,
+                "start": 1438,
+                "end": 1495,
                 "loc": {
                   "start": {
-                    "line": 65,
+                    "line": 67,
                     "column": 20
                   },
                   "end": {
-                    "line": 67,
+                    "line": 69,
                     "column": 2
                   }
                 },
                 "body": [
                   {
                     "type": "ReturnStatement",
-                    "start": 1397,
-                    "end": 1447,
+                    "start": 1442,
+                    "end": 1492,
                     "loc": {
                       "start": {
-                        "line": 66,
+                        "line": 68,
                         "column": 2
                       },
                       "end": {
-                        "line": 66,
+                        "line": 68,
                         "column": 52
                       }
                     },
                     "argument": {
                       "type": "CallExpression",
-                      "start": 1404,
-                      "end": 1447,
+                      "start": 1449,
+                      "end": 1492,
                       "loc": {
                         "start": {
-                          "line": 66,
+                          "line": 68,
                           "column": 9
                         },
                         "end": {
-                          "line": 66,
+                          "line": 68,
                           "column": 52
                         }
                       },
                       "callee": {
                         "type": "MemberExpression",
-                        "start": 1404,
-                        "end": 1420,
+                        "start": 1449,
+                        "end": 1465,
                         "loc": {
                           "start": {
-                            "line": 66,
+                            "line": 68,
                             "column": 9
                           },
                           "end": {
-                            "line": 66,
+                            "line": 68,
                             "column": 25
                           }
                         },
                         "object": {
                           "type": "Identifier",
-                          "start": 1404,
-                          "end": 1414,
+                          "start": 1449,
+                          "end": 1459,
                           "loc": {
                             "start": {
-                              "line": 66,
+                              "line": 68,
                               "column": 9
                             },
                             "end": {
-                              "line": 66,
+                              "line": 68,
                               "column": 19
                             },
                             "identifierName": "components"
@@ -1590,15 +1590,15 @@
                         },
                         "property": {
                           "type": "Identifier",
-                          "start": 1415,
-                          "end": 1420,
+                          "start": 1460,
+                          "end": 1465,
                           "loc": {
                             "start": {
-                              "line": 66,
+                              "line": 68,
                               "column": 20
                             },
                             "end": {
-                              "line": 66,
+                              "line": 68,
                               "column": 25
                             },
                             "identifierName": "every"
@@ -1610,15 +1610,15 @@
                       "arguments": [
                         {
                           "type": "ArrowFunctionExpression",
-                          "start": 1421,
-                          "end": 1446,
+                          "start": 1466,
+                          "end": 1491,
                           "loc": {
                             "start": {
-                              "line": 66,
+                              "line": 68,
                               "column": 26
                             },
                             "end": {
-                              "line": 66,
+                              "line": 68,
                               "column": 51
                             }
                           },
@@ -1629,15 +1629,15 @@
                           "params": [
                             {
                               "type": "Identifier",
-                              "start": 1421,
-                              "end": 1425,
+                              "start": 1466,
+                              "end": 1470,
                               "loc": {
                                 "start": {
-                                  "line": 66,
+                                  "line": 68,
                                   "column": 26
                                 },
                                 "end": {
-                                  "line": 66,
+                                  "line": 68,
                                   "column": 30
                                 },
                                 "identifierName": "name"
@@ -1647,29 +1647,29 @@
                           ],
                           "body": {
                             "type": "BinaryExpression",
-                            "start": 1429,
-                            "end": 1446,
+                            "start": 1474,
+                            "end": 1491,
                             "loc": {
                               "start": {
-                                "line": 66,
+                                "line": 68,
                                 "column": 34
                               },
                               "end": {
-                                "line": 66,
+                                "line": 68,
                                 "column": 51
                               }
                             },
                             "left": {
                               "type": "Identifier",
-                              "start": 1429,
-                              "end": 1433,
+                              "start": 1474,
+                              "end": 1478,
                               "loc": {
                                 "start": {
-                                  "line": 66,
+                                  "line": 68,
                                   "column": 34
                                 },
                                 "end": {
-                                  "line": 66,
+                                  "line": 68,
                                   "column": 38
                                 },
                                 "identifierName": "name"
@@ -1679,44 +1679,44 @@
                             "operator": "in",
                             "right": {
                               "type": "MemberExpression",
-                              "start": 1437,
-                              "end": 1446,
+                              "start": 1482,
+                              "end": 1491,
                               "loc": {
                                 "start": {
-                                  "line": 66,
+                                  "line": 68,
                                   "column": 42
                                 },
                                 "end": {
-                                  "line": 66,
+                                  "line": 68,
                                   "column": 51
                                 }
                               },
                               "object": {
                                 "type": "ThisExpression",
-                                "start": 1437,
-                                "end": 1441,
+                                "start": 1482,
+                                "end": 1486,
                                 "loc": {
                                   "start": {
-                                    "line": 66,
+                                    "line": 68,
                                     "column": 42
                                   },
                                   "end": {
-                                    "line": 66,
+                                    "line": 68,
                                     "column": 46
                                   }
                                 }
                               },
                               "property": {
                                 "type": "Identifier",
-                                "start": 1442,
-                                "end": 1446,
+                                "start": 1487,
+                                "end": 1491,
                                 "loc": {
                                   "start": {
-                                    "line": 66,
+                                    "line": 68,
                                     "column": 47
                                   },
                                   "end": {
-                                    "line": 66,
+                                    "line": 68,
                                     "column": 51
                                   },
                                   "identifierName": "data"
@@ -1738,15 +1738,15 @@
                 {
                   "type": "CommentBlock",
                   "value": "*\n\t * Returns true if the entity has ALL of the specified component names.\n\t * Additional components that the entity has, which are not specified in has(), will be ignored.\n\t * If no component names are specified, this method returns true.\n\t *\n\t * @example\n\t * if (entity.has('position', 'velocity')) {...}\n\t *\n\t * @param {...string} [components] - The component names to check for\n\t *\n\t * @return {boolean} true or false\n\t ",
-                  "start": 944,
-                  "end": 1372,
+                  "start": 989,
+                  "end": 1417,
                   "loc": {
                     "start": {
-                      "line": 53,
+                      "line": 55,
                       "column": 1
                     },
                     "end": {
-                      "line": 64,
+                      "line": 66,
                       "column": 4
                     }
                   }
@@ -1756,15 +1756,15 @@
                 {
                   "type": "CommentBlock",
                   "value": "*\n\t * Returns a component by name, or undefined if it doesn't exist\n\t *\n\t * @example\n\t * let position = entity.get('position')\n\t *\n\t * @param {string} component - The component name to get\n\t *\n\t * @return {Object} The component if defined, otherwise undefined\n\t ",
-                  "start": 1453,
-                  "end": 1719,
+                  "start": 1498,
+                  "end": 1764,
                   "loc": {
                     "start": {
-                      "line": 69,
+                      "line": 71,
                       "column": 1
                     },
                     "end": {
-                      "line": 78,
+                      "line": 80,
                       "column": 4
                     }
                   }
@@ -1773,15 +1773,15 @@
             },
             {
               "type": "ClassMethod",
-              "start": 1721,
-              "end": 1770,
+              "start": 1766,
+              "end": 1815,
               "loc": {
                 "start": {
-                  "line": 79,
+                  "line": 81,
                   "column": 1
                 },
                 "end": {
-                  "line": 81,
+                  "line": 83,
                   "column": 2
                 }
               },
@@ -1789,15 +1789,15 @@
               "computed": false,
               "key": {
                 "type": "Identifier",
-                "start": 1721,
-                "end": 1724,
+                "start": 1766,
+                "end": 1769,
                 "loc": {
                   "start": {
-                    "line": 79,
+                    "line": 81,
                     "column": 1
                   },
                   "end": {
-                    "line": 79,
+                    "line": 81,
                     "column": 4
                   },
                   "identifierName": "get"
@@ -1813,15 +1813,15 @@
               "params": [
                 {
                   "type": "Identifier",
-                  "start": 1725,
-                  "end": 1734,
+                  "start": 1770,
+                  "end": 1779,
                   "loc": {
                     "start": {
-                      "line": 79,
+                      "line": 81,
                       "column": 5
                     },
                     "end": {
-                      "line": 79,
+                      "line": 81,
                       "column": 14
                     },
                     "identifierName": "component"
@@ -1831,87 +1831,87 @@
               ],
               "body": {
                 "type": "BlockStatement",
-                "start": 1736,
-                "end": 1770,
+                "start": 1781,
+                "end": 1815,
                 "loc": {
                   "start": {
-                    "line": 79,
+                    "line": 81,
                     "column": 16
                   },
                   "end": {
-                    "line": 81,
+                    "line": 83,
                     "column": 2
                   }
                 },
                 "body": [
                   {
                     "type": "ReturnStatement",
-                    "start": 1740,
-                    "end": 1767,
+                    "start": 1785,
+                    "end": 1812,
                     "loc": {
                       "start": {
-                        "line": 80,
+                        "line": 82,
                         "column": 2
                       },
                       "end": {
-                        "line": 80,
+                        "line": 82,
                         "column": 29
                       }
                     },
                     "argument": {
                       "type": "MemberExpression",
-                      "start": 1747,
-                      "end": 1767,
+                      "start": 1792,
+                      "end": 1812,
                       "loc": {
                         "start": {
-                          "line": 80,
+                          "line": 82,
                           "column": 9
                         },
                         "end": {
-                          "line": 80,
+                          "line": 82,
                           "column": 29
                         }
                       },
                       "object": {
                         "type": "MemberExpression",
-                        "start": 1747,
-                        "end": 1756,
+                        "start": 1792,
+                        "end": 1801,
                         "loc": {
                           "start": {
-                            "line": 80,
+                            "line": 82,
                             "column": 9
                           },
                           "end": {
-                            "line": 80,
+                            "line": 82,
                             "column": 18
                           }
                         },
                         "object": {
                           "type": "ThisExpression",
-                          "start": 1747,
-                          "end": 1751,
+                          "start": 1792,
+                          "end": 1796,
                           "loc": {
                             "start": {
-                              "line": 80,
+                              "line": 82,
                               "column": 9
                             },
                             "end": {
-                              "line": 80,
+                              "line": 82,
                               "column": 13
                             }
                           }
                         },
                         "property": {
                           "type": "Identifier",
-                          "start": 1752,
-                          "end": 1756,
+                          "start": 1797,
+                          "end": 1801,
                           "loc": {
                             "start": {
-                              "line": 80,
+                              "line": 82,
                               "column": 14
                             },
                             "end": {
-                              "line": 80,
+                              "line": 82,
                               "column": 18
                             },
                             "identifierName": "data"
@@ -1922,15 +1922,15 @@
                       },
                       "property": {
                         "type": "Identifier",
-                        "start": 1757,
-                        "end": 1766,
+                        "start": 1802,
+                        "end": 1811,
                         "loc": {
                           "start": {
-                            "line": 80,
+                            "line": 82,
                             "column": 19
                           },
                           "end": {
-                            "line": 80,
+                            "line": 82,
                             "column": 28
                           },
                           "identifierName": "component"
@@ -1948,15 +1948,15 @@
                 {
                   "type": "CommentBlock",
                   "value": "*\n\t * Returns a component by name, or undefined if it doesn't exist\n\t *\n\t * @example\n\t * let position = entity.get('position')\n\t *\n\t * @param {string} component - The component name to get\n\t *\n\t * @return {Object} The component if defined, otherwise undefined\n\t ",
-                  "start": 1453,
-                  "end": 1719,
+                  "start": 1498,
+                  "end": 1764,
                   "loc": {
                     "start": {
-                      "line": 69,
+                      "line": 71,
                       "column": 1
                     },
                     "end": {
-                      "line": 78,
+                      "line": 80,
                       "column": 4
                     }
                   }
@@ -1966,15 +1966,15 @@
                 {
                   "type": "CommentBlock",
                   "value": "*\n\t * Returns a component by name (automatically created if it doesn't exist)\n\t *\n\t * @example\n\t * let position = entity.access('position', 3, 4)\n\t *\n\t * @param {string}    component - The component name to create/get\n\t * @param {...Object} [args]    - The arguments to forward to create the new component, only if it doesn't exist.\n\t *\n\t * @return {Object} Always returns either the existing component, or the newly created one.\n\t ",
-                  "start": 1773,
-                  "end": 2209,
+                  "start": 1818,
+                  "end": 2254,
                   "loc": {
                     "start": {
-                      "line": 83,
+                      "line": 85,
                       "column": 1
                     },
                     "end": {
-                      "line": 93,
+                      "line": 95,
                       "column": 4
                     }
                   }
@@ -1983,15 +1983,15 @@
             },
             {
               "type": "ClassMethod",
-              "start": 2211,
-              "end": 2338,
+              "start": 2256,
+              "end": 2383,
               "loc": {
                 "start": {
-                  "line": 94,
+                  "line": 96,
                   "column": 1
                 },
                 "end": {
-                  "line": 99,
+                  "line": 101,
                   "column": 2
                 }
               },
@@ -1999,15 +1999,15 @@
               "computed": false,
               "key": {
                 "type": "Identifier",
-                "start": 2211,
-                "end": 2217,
+                "start": 2256,
+                "end": 2262,
                 "loc": {
                   "start": {
-                    "line": 94,
+                    "line": 96,
                     "column": 1
                   },
                   "end": {
-                    "line": 94,
+                    "line": 96,
                     "column": 7
                   },
                   "identifierName": "access"
@@ -2023,15 +2023,15 @@
               "params": [
                 {
                   "type": "Identifier",
-                  "start": 2218,
-                  "end": 2227,
+                  "start": 2263,
+                  "end": 2272,
                   "loc": {
                     "start": {
-                      "line": 94,
+                      "line": 96,
                       "column": 8
                     },
                     "end": {
-                      "line": 94,
+                      "line": 96,
                       "column": 17
                     },
                     "identifierName": "component"
@@ -2040,29 +2040,29 @@
                 },
                 {
                   "type": "RestElement",
-                  "start": 2229,
-                  "end": 2236,
+                  "start": 2274,
+                  "end": 2281,
                   "loc": {
                     "start": {
-                      "line": 94,
+                      "line": 96,
                       "column": 19
                     },
                     "end": {
-                      "line": 94,
+                      "line": 96,
                       "column": 26
                     }
                   },
                   "argument": {
                     "type": "Identifier",
-                    "start": 2232,
-                    "end": 2236,
+                    "start": 2277,
+                    "end": 2281,
                     "loc": {
                       "start": {
-                        "line": 94,
+                        "line": 96,
                         "column": 22
                       },
                       "end": {
-                        "line": 94,
+                        "line": 96,
                         "column": 26
                       },
                       "identifierName": "args"
@@ -2073,44 +2073,44 @@
               ],
               "body": {
                 "type": "BlockStatement",
-                "start": 2238,
-                "end": 2338,
+                "start": 2283,
+                "end": 2383,
                 "loc": {
                   "start": {
-                    "line": 94,
+                    "line": 96,
                     "column": 28
                   },
                   "end": {
-                    "line": 99,
+                    "line": 101,
                     "column": 2
                   }
                 },
                 "body": [
                   {
                     "type": "IfStatement",
-                    "start": 2242,
-                    "end": 2305,
+                    "start": 2287,
+                    "end": 2350,
                     "loc": {
                       "start": {
-                        "line": 95,
+                        "line": 97,
                         "column": 2
                       },
                       "end": {
-                        "line": 97,
+                        "line": 99,
                         "column": 3
                       }
                     },
                     "test": {
                       "type": "UnaryExpression",
-                      "start": 2246,
-                      "end": 2266,
+                      "start": 2291,
+                      "end": 2311,
                       "loc": {
                         "start": {
-                          "line": 95,
+                          "line": 97,
                           "column": 6
                         },
                         "end": {
-                          "line": 95,
+                          "line": 97,
                           "column": 26
                         }
                       },
@@ -2118,58 +2118,58 @@
                       "prefix": true,
                       "argument": {
                         "type": "CallExpression",
-                        "start": 2247,
-                        "end": 2266,
+                        "start": 2292,
+                        "end": 2311,
                         "loc": {
                           "start": {
-                            "line": 95,
+                            "line": 97,
                             "column": 7
                           },
                           "end": {
-                            "line": 95,
+                            "line": 97,
                             "column": 26
                           }
                         },
                         "callee": {
                           "type": "MemberExpression",
-                          "start": 2247,
-                          "end": 2255,
+                          "start": 2292,
+                          "end": 2300,
                           "loc": {
                             "start": {
-                              "line": 95,
+                              "line": 97,
                               "column": 7
                             },
                             "end": {
-                              "line": 95,
+                              "line": 97,
                               "column": 15
                             }
                           },
                           "object": {
                             "type": "ThisExpression",
-                            "start": 2247,
-                            "end": 2251,
+                            "start": 2292,
+                            "end": 2296,
                             "loc": {
                               "start": {
-                                "line": 95,
+                                "line": 97,
                                 "column": 7
                               },
                               "end": {
-                                "line": 95,
+                                "line": 97,
                                 "column": 11
                               }
                             }
                           },
                           "property": {
                             "type": "Identifier",
-                            "start": 2252,
-                            "end": 2255,
+                            "start": 2297,
+                            "end": 2300,
                             "loc": {
                               "start": {
-                                "line": 95,
+                                "line": 97,
                                 "column": 12
                               },
                               "end": {
-                                "line": 95,
+                                "line": 97,
                                 "column": 15
                               },
                               "identifierName": "has"
@@ -2181,15 +2181,15 @@
                         "arguments": [
                           {
                             "type": "Identifier",
-                            "start": 2256,
-                            "end": 2265,
+                            "start": 2301,
+                            "end": 2310,
                             "loc": {
                               "start": {
-                                "line": 95,
+                                "line": 97,
                                 "column": 16
                               },
                               "end": {
-                                "line": 95,
+                                "line": 97,
                                 "column": 25
                               },
                               "identifierName": "component"
@@ -2204,87 +2204,87 @@
                     },
                     "consequent": {
                       "type": "BlockStatement",
-                      "start": 2268,
-                      "end": 2305,
+                      "start": 2313,
+                      "end": 2350,
                       "loc": {
                         "start": {
-                          "line": 95,
+                          "line": 97,
                           "column": 28
                         },
                         "end": {
-                          "line": 97,
+                          "line": 99,
                           "column": 3
                         }
                       },
                       "body": [
                         {
                           "type": "ExpressionStatement",
-                          "start": 2273,
-                          "end": 2301,
+                          "start": 2318,
+                          "end": 2346,
                           "loc": {
                             "start": {
-                              "line": 96,
+                              "line": 98,
                               "column": 3
                             },
                             "end": {
-                              "line": 96,
+                              "line": 98,
                               "column": 31
                             }
                           },
                           "expression": {
                             "type": "CallExpression",
-                            "start": 2273,
-                            "end": 2301,
+                            "start": 2318,
+                            "end": 2346,
                             "loc": {
                               "start": {
-                                "line": 96,
+                                "line": 98,
                                 "column": 3
                               },
                               "end": {
-                                "line": 96,
+                                "line": 98,
                                 "column": 31
                               }
                             },
                             "callee": {
                               "type": "MemberExpression",
-                              "start": 2273,
-                              "end": 2281,
+                              "start": 2318,
+                              "end": 2326,
                               "loc": {
                                 "start": {
-                                  "line": 96,
+                                  "line": 98,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 96,
+                                  "line": 98,
                                   "column": 11
                                 }
                               },
                               "object": {
                                 "type": "ThisExpression",
-                                "start": 2273,
-                                "end": 2277,
+                                "start": 2318,
+                                "end": 2322,
                                 "loc": {
                                   "start": {
-                                    "line": 96,
+                                    "line": 98,
                                     "column": 3
                                   },
                                   "end": {
-                                    "line": 96,
+                                    "line": 98,
                                     "column": 7
                                   }
                                 }
                               },
                               "property": {
                                 "type": "Identifier",
-                                "start": 2278,
-                                "end": 2281,
+                                "start": 2323,
+                                "end": 2326,
                                 "loc": {
                                   "start": {
-                                    "line": 96,
+                                    "line": 98,
                                     "column": 8
                                   },
                                   "end": {
-                                    "line": 96,
+                                    "line": 98,
                                     "column": 11
                                   },
                                   "identifierName": "set"
@@ -2296,15 +2296,15 @@
                             "arguments": [
                               {
                                 "type": "Identifier",
-                                "start": 2282,
-                                "end": 2291,
+                                "start": 2327,
+                                "end": 2336,
                                 "loc": {
                                   "start": {
-                                    "line": 96,
+                                    "line": 98,
                                     "column": 12
                                   },
                                   "end": {
-                                    "line": 96,
+                                    "line": 98,
                                     "column": 21
                                   },
                                   "identifierName": "component"
@@ -2313,29 +2313,29 @@
                               },
                               {
                                 "type": "SpreadElement",
-                                "start": 2293,
-                                "end": 2300,
+                                "start": 2338,
+                                "end": 2345,
                                 "loc": {
                                   "start": {
-                                    "line": 96,
+                                    "line": 98,
                                     "column": 23
                                   },
                                   "end": {
-                                    "line": 96,
+                                    "line": 98,
                                     "column": 30
                                   }
                                 },
                                 "argument": {
                                   "type": "Identifier",
-                                  "start": 2296,
-                                  "end": 2300,
+                                  "start": 2341,
+                                  "end": 2345,
                                   "loc": {
                                     "start": {
-                                      "line": 96,
+                                      "line": 98,
                                       "column": 26
                                     },
                                     "end": {
-                                      "line": 96,
+                                      "line": 98,
                                       "column": 30
                                     },
                                     "identifierName": "args"
@@ -2353,72 +2353,72 @@
                   },
                   {
                     "type": "ReturnStatement",
-                    "start": 2308,
-                    "end": 2335,
+                    "start": 2353,
+                    "end": 2380,
                     "loc": {
                       "start": {
-                        "line": 98,
+                        "line": 100,
                         "column": 2
                       },
                       "end": {
-                        "line": 98,
+                        "line": 100,
                         "column": 29
                       }
                     },
                     "argument": {
                       "type": "MemberExpression",
-                      "start": 2315,
-                      "end": 2335,
+                      "start": 2360,
+                      "end": 2380,
                       "loc": {
                         "start": {
-                          "line": 98,
+                          "line": 100,
                           "column": 9
                         },
                         "end": {
-                          "line": 98,
+                          "line": 100,
                           "column": 29
                         }
                       },
                       "object": {
                         "type": "MemberExpression",
-                        "start": 2315,
-                        "end": 2324,
+                        "start": 2360,
+                        "end": 2369,
                         "loc": {
                           "start": {
-                            "line": 98,
+                            "line": 100,
                             "column": 9
                           },
                           "end": {
-                            "line": 98,
+                            "line": 100,
                             "column": 18
                           }
                         },
                         "object": {
                           "type": "ThisExpression",
-                          "start": 2315,
-                          "end": 2319,
+                          "start": 2360,
+                          "end": 2364,
                           "loc": {
                             "start": {
-                              "line": 98,
+                              "line": 100,
                               "column": 9
                             },
                             "end": {
-                              "line": 98,
+                              "line": 100,
                               "column": 13
                             }
                           }
                         },
                         "property": {
                           "type": "Identifier",
-                          "start": 2320,
-                          "end": 2324,
+                          "start": 2365,
+                          "end": 2369,
                           "loc": {
                             "start": {
-                              "line": 98,
+                              "line": 100,
                               "column": 14
                             },
                             "end": {
-                              "line": 98,
+                              "line": 100,
                               "column": 18
                             },
                             "identifierName": "data"
@@ -2429,15 +2429,15 @@
                       },
                       "property": {
                         "type": "Identifier",
-                        "start": 2325,
-                        "end": 2334,
+                        "start": 2370,
+                        "end": 2379,
                         "loc": {
                           "start": {
-                            "line": 98,
+                            "line": 100,
                             "column": 19
                           },
                           "end": {
-                            "line": 98,
+                            "line": 100,
                             "column": 28
                           },
                           "identifierName": "component"
@@ -2455,15 +2455,15 @@
                 {
                   "type": "CommentBlock",
                   "value": "*\n\t * Returns a component by name (automatically created if it doesn't exist)\n\t *\n\t * @example\n\t * let position = entity.access('position', 3, 4)\n\t *\n\t * @param {string}    component - The component name to create/get\n\t * @param {...Object} [args]    - The arguments to forward to create the new component, only if it doesn't exist.\n\t *\n\t * @return {Object} Always returns either the existing component, or the newly created one.\n\t ",
-                  "start": 1773,
-                  "end": 2209,
+                  "start": 1818,
+                  "end": 2254,
                   "loc": {
                     "start": {
-                      "line": 83,
+                      "line": 85,
                       "column": 1
                     },
                     "end": {
-                      "line": 93,
+                      "line": 95,
                       "column": 4
                     }
                   }
@@ -2473,15 +2473,15 @@
                 {
                   "type": "CommentBlock",
                   "value": "*\n\t * Adds a new component, or re-creates and overwrites an existing component\n\t *\n\t * @example\n\t * entity.set('position', 1, 2)\n\t *\n\t * @example\n\t * entity.set('anonymousComponent', { keys: 'values' })\n\t *\n\t * @example\n\t * entity.set('anotherAnonymousComponent', 'Any type of any value')\n\t *\n\t * @param {string}    component - The component name to create. If there is a registered component for this name, then\n\t * its constructor will be called and an object of that type will be created.\n\t * @param {...Object} [args]    - The arguments to forward to the registered component type. If the component type is\n\t * registered, then only the first additional argument will be used as the value of the entire component.\n\t *\n\t * @return {Object} The original entity that set() was called on, so that operations can be chained.\n\t ",
-                  "start": 2341,
-                  "end": 3171,
+                  "start": 2386,
+                  "end": 3216,
                   "loc": {
                     "start": {
-                      "line": 101,
+                      "line": 103,
                       "column": 1
                     },
                     "end": {
-                      "line": 119,
+                      "line": 121,
                       "column": 4
                     }
                   }
@@ -2490,15 +2490,15 @@
             },
             {
               "type": "ClassMethod",
-              "start": 3173,
-              "end": 3721,
+              "start": 3218,
+              "end": 3766,
               "loc": {
                 "start": {
-                  "line": 120,
+                  "line": 122,
                   "column": 1
                 },
                 "end": {
-                  "line": 138,
+                  "line": 140,
                   "column": 2
                 }
               },
@@ -2506,15 +2506,15 @@
               "computed": false,
               "key": {
                 "type": "Identifier",
-                "start": 3173,
-                "end": 3176,
+                "start": 3218,
+                "end": 3221,
                 "loc": {
                   "start": {
-                    "line": 120,
+                    "line": 122,
                     "column": 1
                   },
                   "end": {
-                    "line": 120,
+                    "line": 122,
                     "column": 4
                   },
                   "identifierName": "set"
@@ -2530,15 +2530,15 @@
               "params": [
                 {
                   "type": "Identifier",
-                  "start": 3177,
-                  "end": 3186,
+                  "start": 3222,
+                  "end": 3231,
                   "loc": {
                     "start": {
-                      "line": 120,
+                      "line": 122,
                       "column": 5
                     },
                     "end": {
-                      "line": 120,
+                      "line": 122,
                       "column": 14
                     },
                     "identifierName": "component"
@@ -2547,29 +2547,29 @@
                 },
                 {
                   "type": "RestElement",
-                  "start": 3188,
-                  "end": 3195,
+                  "start": 3233,
+                  "end": 3240,
                   "loc": {
                     "start": {
-                      "line": 120,
+                      "line": 122,
                       "column": 16
                     },
                     "end": {
-                      "line": 120,
+                      "line": 122,
                       "column": 23
                     }
                   },
                   "argument": {
                     "type": "Identifier",
-                    "start": 3191,
-                    "end": 3195,
+                    "start": 3236,
+                    "end": 3240,
                     "loc": {
                       "start": {
-                        "line": 120,
+                        "line": 122,
                         "column": 19
                       },
                       "end": {
-                        "line": 120,
+                        "line": 122,
                         "column": 23
                       },
                       "identifierName": "args"
@@ -2580,101 +2580,101 @@
               ],
               "body": {
                 "type": "BlockStatement",
-                "start": 3197,
-                "end": 3721,
+                "start": 3242,
+                "end": 3766,
                 "loc": {
                   "start": {
-                    "line": 120,
+                    "line": 122,
                     "column": 25
                   },
                   "end": {
-                    "line": 138,
+                    "line": 140,
                     "column": 2
                   }
                 },
                 "body": [
                   {
                     "type": "IfStatement",
-                    "start": 3201,
-                    "end": 3589,
+                    "start": 3246,
+                    "end": 3634,
                     "loc": {
                       "start": {
-                        "line": 121,
+                        "line": 123,
                         "column": 2
                       },
                       "end": {
-                        "line": 130,
+                        "line": 132,
                         "column": 3
                       }
                     },
                     "test": {
                       "type": "LogicalExpression",
-                      "start": 3205,
-                      "end": 3255,
+                      "start": 3250,
+                      "end": 3300,
                       "loc": {
                         "start": {
-                          "line": 121,
+                          "line": 123,
                           "column": 6
                         },
                         "end": {
-                          "line": 121,
+                          "line": 123,
                           "column": 56
                         }
                       },
                       "left": {
                         "type": "CallExpression",
-                        "start": 3205,
-                        "end": 3217,
+                        "start": 3250,
+                        "end": 3262,
                         "loc": {
                           "start": {
-                            "line": 121,
+                            "line": 123,
                             "column": 6
                           },
                           "end": {
-                            "line": 121,
+                            "line": 123,
                             "column": 18
                           }
                         },
                         "callee": {
                           "type": "MemberExpression",
-                          "start": 3205,
-                          "end": 3215,
+                          "start": 3250,
+                          "end": 3260,
                           "loc": {
                             "start": {
-                              "line": 121,
+                              "line": 123,
                               "column": 6
                             },
                             "end": {
-                              "line": 121,
+                              "line": 123,
                               "column": 16
                             }
                           },
                           "object": {
                             "type": "ThisExpression",
-                            "start": 3205,
-                            "end": 3209,
+                            "start": 3250,
+                            "end": 3254,
                             "loc": {
                               "start": {
-                                "line": 121,
+                                "line": 123,
                                 "column": 6
                               },
                               "end": {
-                                "line": 121,
+                                "line": 123,
                                 "column": 10
                               }
                             }
                           },
                           "property": {
                             "type": "Identifier",
-                            "start": 3210,
-                            "end": 3215,
+                            "start": 3255,
+                            "end": 3260,
                             "loc": {
                               "start": {
-                                "line": 121,
+                                "line": 123,
                                 "column": 11
                               },
                               "end": {
-                                "line": 121,
+                                "line": 123,
                                 "column": 16
                               },
                               "identifierName": "valid"
@@ -2688,29 +2688,29 @@
                       "operator": "&&",
                       "right": {
                         "type": "BinaryExpression",
-                        "start": 3221,
-                        "end": 3255,
+                        "start": 3266,
+                        "end": 3300,
                         "loc": {
                           "start": {
-                            "line": 121,
+                            "line": 123,
                             "column": 22
                           },
                           "end": {
-                            "line": 121,
+                            "line": 123,
                             "column": 56
                           }
                         },
                         "left": {
                           "type": "Identifier",
-                          "start": 3221,
-                          "end": 3230,
+                          "start": 3266,
+                          "end": 3275,
                           "loc": {
                             "start": {
-                              "line": 121,
+                              "line": 123,
                               "column": 22
                             },
                             "end": {
-                              "line": 121,
+                              "line": 123,
                               "column": 31
                             },
                             "identifierName": "component"
@@ -2720,58 +2720,58 @@
                         "operator": "in",
                         "right": {
                           "type": "MemberExpression",
-                          "start": 3234,
-                          "end": 3255,
+                          "start": 3279,
+                          "end": 3300,
                           "loc": {
                             "start": {
-                              "line": 121,
+                              "line": 123,
                               "column": 35
                             },
                             "end": {
-                              "line": 121,
+                              "line": 123,
                               "column": 56
                             }
                           },
                           "object": {
                             "type": "MemberExpression",
-                            "start": 3234,
-                            "end": 3244,
+                            "start": 3279,
+                            "end": 3289,
                             "loc": {
                               "start": {
-                                "line": 121,
+                                "line": 123,
                                 "column": 35
                               },
                               "end": {
-                                "line": 121,
+                                "line": 123,
                                 "column": 45
                               }
                             },
                             "object": {
                               "type": "ThisExpression",
-                              "start": 3234,
-                              "end": 3238,
+                              "start": 3279,
+                              "end": 3283,
                               "loc": {
                                 "start": {
-                                  "line": 121,
+                                  "line": 123,
                                   "column": 35
                                 },
                                 "end": {
-                                  "line": 121,
+                                  "line": 123,
                                   "column": 39
                                 }
                               }
                             },
                             "property": {
                               "type": "Identifier",
-                              "start": 3239,
-                              "end": 3244,
+                              "start": 3284,
+                              "end": 3289,
                               "loc": {
                                 "start": {
-                                  "line": 121,
+                                  "line": 123,
                                   "column": 40
                                 },
                                 "end": {
-                                  "line": 121,
+                                  "line": 123,
                                   "column": 45
                                 },
                                 "identifierName": "world"
@@ -2782,15 +2782,15 @@
                           },
                           "property": {
                             "type": "Identifier",
-                            "start": 3245,
-                            "end": 3255,
+                            "start": 3290,
+                            "end": 3300,
                             "loc": {
                               "start": {
-                                "line": 121,
+                                "line": 123,
                                 "column": 46
                               },
                               "end": {
-                                "line": 121,
+                                "line": 123,
                                 "column": 56
                               },
                               "identifierName": "components"
@@ -2803,87 +2803,87 @@
                     },
                     "consequent": {
                       "type": "BlockStatement",
-                      "start": 3257,
-                      "end": 3412,
+                      "start": 3302,
+                      "end": 3457,
                       "loc": {
                         "start": {
-                          "line": 121,
+                          "line": 123,
                           "column": 58
                         },
                         "end": {
-                          "line": 124,
+                          "line": 126,
                           "column": 3
                         }
                       },
                       "body": [
                         {
                           "type": "ExpressionStatement",
-                          "start": 3334,
-                          "end": 3408,
+                          "start": 3379,
+                          "end": 3453,
                           "loc": {
                             "start": {
-                              "line": 123,
+                              "line": 125,
                               "column": 3
                             },
                             "end": {
-                              "line": 123,
+                              "line": 125,
                               "column": 77
                             }
                           },
                           "expression": {
                             "type": "AssignmentExpression",
-                            "start": 3334,
-                            "end": 3408,
+                            "start": 3379,
+                            "end": 3453,
                             "loc": {
                               "start": {
-                                "line": 123,
+                                "line": 125,
                                 "column": 3
                               },
                               "end": {
-                                "line": 123,
+                                "line": 125,
                                 "column": 77
                               }
                             },
                             "operator": "=",
                             "left": {
                               "type": "MemberExpression",
-                              "start": 3334,
-                              "end": 3354,
+                              "start": 3379,
+                              "end": 3399,
                               "loc": {
                                 "start": {
-                                  "line": 123,
+                                  "line": 125,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 123,
+                                  "line": 125,
                                   "column": 23
                                 }
                               },
                               "object": {
                                 "type": "MemberExpression",
-                                "start": 3334,
-                                "end": 3343,
+                                "start": 3379,
+                                "end": 3388,
                                 "loc": {
                                   "start": {
-                                    "line": 123,
+                                    "line": 125,
                                     "column": 3
                                   },
                                   "end": {
-                                    "line": 123,
+                                    "line": 125,
                                     "column": 12
                                   }
                                 },
                                 "object": {
                                   "type": "ThisExpression",
-                                  "start": 3334,
-                                  "end": 3338,
+                                  "start": 3379,
+                                  "end": 3383,
                                   "loc": {
                                     "start": {
-                                      "line": 123,
+                                      "line": 125,
                                       "column": 3
                                     },
                                     "end": {
-                                      "line": 123,
+                                      "line": 125,
                                       "column": 7
                                     }
                                   },
@@ -2891,15 +2891,15 @@
                                 },
                                 "property": {
                                   "type": "Identifier",
-                                  "start": 3339,
-                                  "end": 3343,
+                                  "start": 3384,
+                                  "end": 3388,
                                   "loc": {
                                     "start": {
-                                      "line": 123,
+                                      "line": 125,
                                       "column": 8
                                     },
                                     "end": {
-                                      "line": 123,
+                                      "line": 125,
                                       "column": 12
                                     },
                                     "identifierName": "data"
@@ -2911,15 +2911,15 @@
                               },
                               "property": {
                                 "type": "Identifier",
-                                "start": 3344,
-                                "end": 3353,
+                                "start": 3389,
+                                "end": 3398,
                                 "loc": {
                                   "start": {
-                                    "line": 123,
+                                    "line": 125,
                                     "column": 13
                                   },
                                   "end": {
-                                    "line": 123,
+                                    "line": 125,
                                     "column": 22
                                   },
                                   "identifierName": "component"
@@ -2931,86 +2931,86 @@
                             },
                             "right": {
                               "type": "NewExpression",
-                              "start": 3357,
-                              "end": 3408,
+                              "start": 3402,
+                              "end": 3453,
                               "loc": {
                                 "start": {
-                                  "line": 123,
+                                  "line": 125,
                                   "column": 26
                                 },
                                 "end": {
-                                  "line": 123,
+                                  "line": 125,
                                   "column": 77
                                 }
                               },
                               "callee": {
                                 "type": "MemberExpression",
-                                "start": 3361,
-                                "end": 3393,
+                                "start": 3406,
+                                "end": 3438,
                                 "loc": {
                                   "start": {
-                                    "line": 123,
+                                    "line": 125,
                                     "column": 30
                                   },
                                   "end": {
-                                    "line": 123,
+                                    "line": 125,
                                     "column": 62
                                   }
                                 },
                                 "object": {
                                   "type": "MemberExpression",
-                                  "start": 3361,
-                                  "end": 3382,
+                                  "start": 3406,
+                                  "end": 3427,
                                   "loc": {
                                     "start": {
-                                      "line": 123,
+                                      "line": 125,
                                       "column": 30
                                     },
                                     "end": {
-                                      "line": 123,
+                                      "line": 125,
                                       "column": 51
                                     }
                                   },
                                   "object": {
                                     "type": "MemberExpression",
-                                    "start": 3361,
-                                    "end": 3371,
+                                    "start": 3406,
+                                    "end": 3416,
                                     "loc": {
                                       "start": {
-                                        "line": 123,
+                                        "line": 125,
                                         "column": 30
                                       },
                                       "end": {
-                                        "line": 123,
+                                        "line": 125,
                                         "column": 40
                                       }
                                     },
                                     "object": {
                                       "type": "ThisExpression",
-                                      "start": 3361,
-                                      "end": 3365,
+                                      "start": 3406,
+                                      "end": 3410,
                                       "loc": {
                                         "start": {
-                                          "line": 123,
+                                          "line": 125,
                                           "column": 30
                                         },
                                         "end": {
-                                          "line": 123,
+                                          "line": 125,
                                           "column": 34
                                         }
                                       }
                                     },
                                     "property": {
                                       "type": "Identifier",
-                                      "start": 3366,
-                                      "end": 3371,
+                                      "start": 3411,
+                                      "end": 3416,
                                       "loc": {
                                         "start": {
-                                          "line": 123,
+                                          "line": 125,
                                           "column": 35
                                         },
                                         "end": {
-                                          "line": 123,
+                                          "line": 125,
                                           "column": 40
                                         },
                                         "identifierName": "world"
@@ -3021,15 +3021,15 @@
                                   },
                                   "property": {
                                     "type": "Identifier",
-                                    "start": 3372,
-                                    "end": 3382,
+                                    "start": 3417,
+                                    "end": 3427,
                                     "loc": {
                                       "start": {
-                                        "line": 123,
+                                        "line": 125,
                                         "column": 41
                                       },
                                       "end": {
-                                        "line": 123,
+                                        "line": 125,
                                         "column": 51
                                       },
                                       "identifierName": "components"
@@ -3040,15 +3040,15 @@
                                 },
                                 "property": {
                                   "type": "Identifier",
-                                  "start": 3383,
-                                  "end": 3392,
+                                  "start": 3428,
+                                  "end": 3437,
                                   "loc": {
                                     "start": {
-                                      "line": 123,
+                                      "line": 125,
                                       "column": 52
                                     },
                                     "end": {
-                                      "line": 123,
+                                      "line": 125,
                                       "column": 61
                                     },
                                     "identifierName": "component"
@@ -3060,44 +3060,44 @@
                               "arguments": [
                                 {
                                   "type": "ThisExpression",
-                                  "start": 3394,
-                                  "end": 3398,
+                                  "start": 3439,
+                                  "end": 3443,
                                   "loc": {
                                     "start": {
-                                      "line": 123,
+                                      "line": 125,
                                       "column": 63
                                     },
                                     "end": {
-                                      "line": 123,
+                                      "line": 125,
                                       "column": 67
                                     }
                                   }
                                 },
                                 {
                                   "type": "SpreadElement",
-                                  "start": 3400,
-                                  "end": 3407,
+                                  "start": 3445,
+                                  "end": 3452,
                                   "loc": {
                                     "start": {
-                                      "line": 123,
+                                      "line": 125,
                                       "column": 69
                                     },
                                     "end": {
-                                      "line": 123,
+                                      "line": 125,
                                       "column": 76
                                     }
                                   },
                                   "argument": {
                                     "type": "Identifier",
-                                    "start": 3403,
-                                    "end": 3407,
+                                    "start": 3448,
+                                    "end": 3452,
                                     "loc": {
                                       "start": {
-                                        "line": 123,
+                                        "line": 125,
                                         "column": 72
                                       },
                                       "end": {
-                                        "line": 123,
+                                        "line": 125,
                                         "column": 76
                                       },
                                       "identifierName": "args"
@@ -3113,15 +3113,15 @@
                             {
                               "type": "CommentLine",
                               "value": " Use defined component template, passing entity as first parameter",
-                              "start": 3262,
-                              "end": 3330,
+                              "start": 3307,
+                              "end": 3375,
                               "loc": {
                                 "start": {
-                                  "line": 122,
+                                  "line": 124,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 122,
+                                  "line": 124,
                                   "column": 71
                                 }
                               }
@@ -3133,57 +3133,57 @@
                     },
                     "alternate": {
                       "type": "IfStatement",
-                      "start": 3418,
-                      "end": 3589,
+                      "start": 3463,
+                      "end": 3634,
                       "loc": {
                         "start": {
-                          "line": 124,
+                          "line": 126,
                           "column": 9
                         },
                         "end": {
-                          "line": 130,
+                          "line": 132,
                           "column": 3
                         }
                       },
                       "test": {
                         "type": "BinaryExpression",
-                        "start": 3422,
-                        "end": 3437,
+                        "start": 3467,
+                        "end": 3482,
                         "loc": {
                           "start": {
-                            "line": 124,
+                            "line": 126,
                             "column": 13
                           },
                           "end": {
-                            "line": 124,
+                            "line": 126,
                             "column": 28
                           }
                         },
                         "left": {
                           "type": "MemberExpression",
-                          "start": 3422,
-                          "end": 3433,
+                          "start": 3467,
+                          "end": 3478,
                           "loc": {
                             "start": {
-                              "line": 124,
+                              "line": 126,
                               "column": 13
                             },
                             "end": {
-                              "line": 124,
+                              "line": 126,
                               "column": 24
                             }
                           },
                           "object": {
                             "type": "Identifier",
-                            "start": 3422,
-                            "end": 3426,
+                            "start": 3467,
+                            "end": 3471,
                             "loc": {
                               "start": {
-                                "line": 124,
+                                "line": 126,
                                 "column": 13
                               },
                               "end": {
-                                "line": 124,
+                                "line": 126,
                                 "column": 17
                               },
                               "identifierName": "args"
@@ -3192,15 +3192,15 @@
                           },
                           "property": {
                             "type": "Identifier",
-                            "start": 3427,
-                            "end": 3433,
+                            "start": 3472,
+                            "end": 3478,
                             "loc": {
                               "start": {
-                                "line": 124,
+                                "line": 126,
                                 "column": 18
                               },
                               "end": {
-                                "line": 124,
+                                "line": 126,
                                 "column": 24
                               },
                               "identifierName": "length"
@@ -3212,15 +3212,15 @@
                         "operator": ">",
                         "right": {
                           "type": "NumericLiteral",
-                          "start": 3436,
-                          "end": 3437,
+                          "start": 3481,
+                          "end": 3482,
                           "loc": {
                             "start": {
-                              "line": 124,
+                              "line": 126,
                               "column": 27
                             },
                             "end": {
-                              "line": 124,
+                              "line": 126,
                               "column": 28
                             }
                           },
@@ -3233,87 +3233,87 @@
                       },
                       "consequent": {
                         "type": "BlockStatement",
-                        "start": 3439,
-                        "end": 3522,
+                        "start": 3484,
+                        "end": 3567,
                         "loc": {
                           "start": {
-                            "line": 124,
+                            "line": 126,
                             "column": 30
                           },
                           "end": {
-                            "line": 127,
+                            "line": 129,
                             "column": 3
                           }
                         },
                         "body": [
                           {
                             "type": "ExpressionStatement",
-                            "start": 3488,
-                            "end": 3518,
+                            "start": 3533,
+                            "end": 3563,
                             "loc": {
                               "start": {
-                                "line": 126,
+                                "line": 128,
                                 "column": 3
                               },
                               "end": {
-                                "line": 126,
+                                "line": 128,
                                 "column": 33
                               }
                             },
                             "expression": {
                               "type": "AssignmentExpression",
-                              "start": 3488,
-                              "end": 3518,
+                              "start": 3533,
+                              "end": 3563,
                               "loc": {
                                 "start": {
-                                  "line": 126,
+                                  "line": 128,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 126,
+                                  "line": 128,
                                   "column": 33
                                 }
                               },
                               "operator": "=",
                               "left": {
                                 "type": "MemberExpression",
-                                "start": 3488,
-                                "end": 3508,
+                                "start": 3533,
+                                "end": 3553,
                                 "loc": {
                                   "start": {
-                                    "line": 126,
+                                    "line": 128,
                                     "column": 3
                                   },
                                   "end": {
-                                    "line": 126,
+                                    "line": 128,
                                     "column": 23
                                   }
                                 },
                                 "object": {
                                   "type": "MemberExpression",
-                                  "start": 3488,
-                                  "end": 3497,
+                                  "start": 3533,
+                                  "end": 3542,
                                   "loc": {
                                     "start": {
-                                      "line": 126,
+                                      "line": 128,
                                       "column": 3
                                     },
                                     "end": {
-                                      "line": 126,
+                                      "line": 128,
                                       "column": 12
                                     }
                                   },
                                   "object": {
                                     "type": "ThisExpression",
-                                    "start": 3488,
-                                    "end": 3492,
+                                    "start": 3533,
+                                    "end": 3537,
                                     "loc": {
                                       "start": {
-                                        "line": 126,
+                                        "line": 128,
                                         "column": 3
                                       },
                                       "end": {
-                                        "line": 126,
+                                        "line": 128,
                                         "column": 7
                                       }
                                     },
@@ -3321,15 +3321,15 @@
                                   },
                                   "property": {
                                     "type": "Identifier",
-                                    "start": 3493,
-                                    "end": 3497,
+                                    "start": 3538,
+                                    "end": 3542,
                                     "loc": {
                                       "start": {
-                                        "line": 126,
+                                        "line": 128,
                                         "column": 8
                                       },
                                       "end": {
-                                        "line": 126,
+                                        "line": 128,
                                         "column": 12
                                       },
                                       "identifierName": "data"
@@ -3341,15 +3341,15 @@
                                 },
                                 "property": {
                                   "type": "Identifier",
-                                  "start": 3498,
-                                  "end": 3507,
+                                  "start": 3543,
+                                  "end": 3552,
                                   "loc": {
                                     "start": {
-                                      "line": 126,
+                                      "line": 128,
                                       "column": 13
                                     },
                                     "end": {
-                                      "line": 126,
+                                      "line": 128,
                                       "column": 22
                                     },
                                     "identifierName": "component"
@@ -3361,29 +3361,29 @@
                               },
                               "right": {
                                 "type": "MemberExpression",
-                                "start": 3511,
-                                "end": 3518,
+                                "start": 3556,
+                                "end": 3563,
                                 "loc": {
                                   "start": {
-                                    "line": 126,
+                                    "line": 128,
                                     "column": 26
                                   },
                                   "end": {
-                                    "line": 126,
+                                    "line": 128,
                                     "column": 33
                                   }
                                 },
                                 "object": {
                                   "type": "Identifier",
-                                  "start": 3511,
-                                  "end": 3515,
+                                  "start": 3556,
+                                  "end": 3560,
                                   "loc": {
                                     "start": {
-                                      "line": 126,
+                                      "line": 128,
                                       "column": 26
                                     },
                                     "end": {
-                                      "line": 126,
+                                      "line": 128,
                                       "column": 30
                                     },
                                     "identifierName": "args"
@@ -3392,15 +3392,15 @@
                                 },
                                 "property": {
                                   "type": "NumericLiteral",
-                                  "start": 3516,
-                                  "end": 3517,
+                                  "start": 3561,
+                                  "end": 3562,
                                   "loc": {
                                     "start": {
-                                      "line": 126,
+                                      "line": 128,
                                       "column": 31
                                     },
                                     "end": {
-                                      "line": 126,
+                                      "line": 128,
                                       "column": 32
                                     }
                                   },
@@ -3418,15 +3418,15 @@
                               {
                                 "type": "CommentLine",
                                 "value": " Use first argument as component value",
-                                "start": 3444,
-                                "end": 3484,
+                                "start": 3489,
+                                "end": 3529,
                                 "loc": {
                                   "start": {
-                                    "line": 125,
+                                    "line": 127,
                                     "column": 3
                                   },
                                   "end": {
-                                    "line": 125,
+                                    "line": 127,
                                     "column": 43
                                   }
                                 }
@@ -3438,87 +3438,87 @@
                       },
                       "alternate": {
                         "type": "BlockStatement",
-                        "start": 3528,
-                        "end": 3589,
+                        "start": 3573,
+                        "end": 3634,
                         "loc": {
                           "start": {
-                            "line": 127,
+                            "line": 129,
                             "column": 9
                           },
                           "end": {
-                            "line": 130,
+                            "line": 132,
                             "column": 3
                           }
                         },
                         "body": [
                           {
                             "type": "ExpressionStatement",
-                            "start": 3560,
-                            "end": 3585,
+                            "start": 3605,
+                            "end": 3630,
                             "loc": {
                               "start": {
-                                "line": 129,
+                                "line": 131,
                                 "column": 3
                               },
                               "end": {
-                                "line": 129,
+                                "line": 131,
                                 "column": 28
                               }
                             },
                             "expression": {
                               "type": "AssignmentExpression",
-                              "start": 3560,
-                              "end": 3585,
+                              "start": 3605,
+                              "end": 3630,
                               "loc": {
                                 "start": {
-                                  "line": 129,
+                                  "line": 131,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 129,
+                                  "line": 131,
                                   "column": 28
                                 }
                               },
                               "operator": "=",
                               "left": {
                                 "type": "MemberExpression",
-                                "start": 3560,
-                                "end": 3580,
+                                "start": 3605,
+                                "end": 3625,
                                 "loc": {
                                   "start": {
-                                    "line": 129,
+                                    "line": 131,
                                     "column": 3
                                   },
                                   "end": {
-                                    "line": 129,
+                                    "line": 131,
                                     "column": 23
                                   }
                                 },
                                 "object": {
                                   "type": "MemberExpression",
-                                  "start": 3560,
-                                  "end": 3569,
+                                  "start": 3605,
+                                  "end": 3614,
                                   "loc": {
                                     "start": {
-                                      "line": 129,
+                                      "line": 131,
                                       "column": 3
                                     },
                                     "end": {
-                                      "line": 129,
+                                      "line": 131,
                                       "column": 12
                                     }
                                   },
                                   "object": {
                                     "type": "ThisExpression",
-                                    "start": 3560,
-                                    "end": 3564,
+                                    "start": 3605,
+                                    "end": 3609,
                                     "loc": {
                                       "start": {
-                                        "line": 129,
+                                        "line": 131,
                                         "column": 3
                                       },
                                       "end": {
-                                        "line": 129,
+                                        "line": 131,
                                         "column": 7
                                       }
                                     },
@@ -3526,15 +3526,15 @@
                                   },
                                   "property": {
                                     "type": "Identifier",
-                                    "start": 3565,
-                                    "end": 3569,
+                                    "start": 3610,
+                                    "end": 3614,
                                     "loc": {
                                       "start": {
-                                        "line": 129,
+                                        "line": 131,
                                         "column": 8
                                       },
                                       "end": {
-                                        "line": 129,
+                                        "line": 131,
                                         "column": 12
                                       },
                                       "identifierName": "data"
@@ -3546,15 +3546,15 @@
                                 },
                                 "property": {
                                   "type": "Identifier",
-                                  "start": 3570,
-                                  "end": 3579,
+                                  "start": 3615,
+                                  "end": 3624,
                                   "loc": {
                                     "start": {
-                                      "line": 129,
+                                      "line": 131,
                                       "column": 13
                                     },
                                     "end": {
-                                      "line": 129,
+                                      "line": 131,
                                       "column": 22
                                     },
                                     "identifierName": "component"
@@ -3566,15 +3566,15 @@
                               },
                               "right": {
                                 "type": "ObjectExpression",
-                                "start": 3583,
-                                "end": 3585,
+                                "start": 3628,
+                                "end": 3630,
                                 "loc": {
                                   "start": {
-                                    "line": 129,
+                                    "line": 131,
                                     "column": 26
                                   },
                                   "end": {
-                                    "line": 129,
+                                    "line": 131,
                                     "column": 28
                                   }
                                 },
@@ -3586,15 +3586,15 @@
                               {
                                 "type": "CommentLine",
                                 "value": " Make an empty object",
-                                "start": 3533,
-                                "end": 3556,
+                                "start": 3578,
+                                "end": 3601,
                                 "loc": {
                                   "start": {
-                                    "line": 128,
+                                    "line": 130,
                                     "column": 3
                                   },
                                   "end": {
-                                    "line": 128,
+                                    "line": 130,
                                     "column": 26
                                   }
                                 }
@@ -3611,15 +3611,15 @@
                       {
                         "type": "CommentLine",
                         "value": " Update the index with this new component",
-                        "start": 3593,
-                        "end": 3636,
+                        "start": 3638,
+                        "end": 3681,
                         "loc": {
                           "start": {
-                            "line": 132,
+                            "line": 134,
                             "column": 2
                           },
                           "end": {
-                            "line": 132,
+                            "line": 134,
                             "column": 45
                           }
                         }
@@ -3628,57 +3628,57 @@
                   },
                   {
                     "type": "IfStatement",
-                    "start": 3639,
-                    "end": 3703,
+                    "start": 3684,
+                    "end": 3748,
                     "loc": {
                       "start": {
-                        "line": 133,
+                        "line": 135,
                         "column": 2
                       },
                       "end": {
-                        "line": 135,
+                        "line": 137,
                         "column": 3
                       }
                     },
                     "test": {
                       "type": "CallExpression",
-                      "start": 3643,
-                      "end": 3655,
+                      "start": 3688,
+                      "end": 3700,
                       "loc": {
                         "start": {
-                          "line": 133,
+                          "line": 135,
                           "column": 6
                         },
                         "end": {
-                          "line": 133,
+                          "line": 135,
                           "column": 18
                         }
                       },
                       "callee": {
                         "type": "MemberExpression",
-                        "start": 3643,
-                        "end": 3653,
+                        "start": 3688,
+                        "end": 3698,
                         "loc": {
                           "start": {
-                            "line": 133,
+                            "line": 135,
                             "column": 6
                           },
                           "end": {
-                            "line": 133,
+                            "line": 135,
                             "column": 16
                           }
                         },
                         "object": {
                           "type": "ThisExpression",
-                          "start": 3643,
-                          "end": 3647,
+                          "start": 3688,
+                          "end": 3692,
                           "loc": {
                             "start": {
-                              "line": 133,
+                              "line": 135,
                               "column": 6
                             },
                             "end": {
-                              "line": 133,
+                              "line": 135,
                               "column": 10
                             }
                           },
@@ -3686,15 +3686,15 @@
                         },
                         "property": {
                           "type": "Identifier",
-                          "start": 3648,
-                          "end": 3653,
+                          "start": 3693,
+                          "end": 3698,
                           "loc": {
                             "start": {
-                              "line": 133,
+                              "line": 135,
                               "column": 11
                             },
                             "end": {
-                              "line": 133,
+                              "line": 135,
                               "column": 16
                             },
                             "identifierName": "valid"
@@ -3709,115 +3709,115 @@
                     },
                     "consequent": {
                       "type": "BlockStatement",
-                      "start": 3657,
-                      "end": 3703,
+                      "start": 3702,
+                      "end": 3748,
                       "loc": {
                         "start": {
-                          "line": 133,
+                          "line": 135,
                           "column": 20
                         },
                         "end": {
-                          "line": 135,
+                          "line": 137,
                           "column": 3
                         }
                       },
                       "body": [
                         {
                           "type": "ExpressionStatement",
-                          "start": 3662,
-                          "end": 3699,
+                          "start": 3707,
+                          "end": 3744,
                           "loc": {
                             "start": {
-                              "line": 134,
+                              "line": 136,
                               "column": 3
                             },
                             "end": {
-                              "line": 134,
+                              "line": 136,
                               "column": 40
                             }
                           },
                           "expression": {
                             "type": "CallExpression",
-                            "start": 3662,
-                            "end": 3699,
+                            "start": 3707,
+                            "end": 3744,
                             "loc": {
                               "start": {
-                                "line": 134,
+                                "line": 136,
                                 "column": 3
                               },
                               "end": {
-                                "line": 134,
+                                "line": 136,
                                 "column": 40
                               }
                             },
                             "callee": {
                               "type": "MemberExpression",
-                              "start": 3662,
-                              "end": 3682,
+                              "start": 3707,
+                              "end": 3727,
                               "loc": {
                                 "start": {
-                                  "line": 134,
+                                  "line": 136,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 134,
+                                  "line": 136,
                                   "column": 23
                                 }
                               },
                               "object": {
                                 "type": "MemberExpression",
-                                "start": 3662,
-                                "end": 3678,
+                                "start": 3707,
+                                "end": 3723,
                                 "loc": {
                                   "start": {
-                                    "line": 134,
+                                    "line": 136,
                                     "column": 3
                                   },
                                   "end": {
-                                    "line": 134,
+                                    "line": 136,
                                     "column": 19
                                   }
                                 },
                                 "object": {
                                   "type": "MemberExpression",
-                                  "start": 3662,
-                                  "end": 3672,
+                                  "start": 3707,
+                                  "end": 3717,
                                   "loc": {
                                     "start": {
-                                      "line": 134,
+                                      "line": 136,
                                       "column": 3
                                     },
                                     "end": {
-                                      "line": 134,
+                                      "line": 136,
                                       "column": 13
                                     }
                                   },
                                   "object": {
                                     "type": "ThisExpression",
-                                    "start": 3662,
-                                    "end": 3666,
+                                    "start": 3707,
+                                    "end": 3711,
                                     "loc": {
                                       "start": {
-                                        "line": 134,
+                                        "line": 136,
                                         "column": 3
                                       },
                                       "end": {
-                                        "line": 134,
+                                        "line": 136,
                                         "column": 7
                                       }
                                     }
                                   },
                                   "property": {
                                     "type": "Identifier",
-                                    "start": 3667,
-                                    "end": 3672,
+                                    "start": 3712,
+                                    "end": 3717,
                                     "loc": {
                                       "start": {
-                                        "line": 134,
+                                        "line": 136,
                                         "column": 8
                                       },
                                       "end": {
-                                        "line": 134,
+                                        "line": 136,
                                         "column": 13
                                       },
                                       "identifierName": "world"
@@ -3828,15 +3828,15 @@
                                 },
                                 "property": {
                                   "type": "Identifier",
-                                  "start": 3673,
-                                  "end": 3678,
+                                  "start": 3718,
+                                  "end": 3723,
                                   "loc": {
                                     "start": {
-                                      "line": 134,
+                                      "line": 136,
                                       "column": 14
                                     },
                                     "end": {
-                                      "line": 134,
+                                      "line": 136,
                                       "column": 19
                                     },
                                     "identifierName": "index"
@@ -3847,15 +3847,15 @@
                               },
                               "property": {
                                 "type": "Identifier",
-                                "start": 3679,
-                                "end": 3682,
+                                "start": 3724,
+                                "end": 3727,
                                 "loc": {
                                   "start": {
-                                    "line": 134,
+                                    "line": 136,
                                     "column": 20
                                   },
                                   "end": {
-                                    "line": 134,
+                                    "line": 136,
                                     "column": 23
                                   },
                                   "identifierName": "add"
@@ -3867,30 +3867,30 @@
                             "arguments": [
                               {
                                 "type": "ThisExpression",
-                                "start": 3683,
-                                "end": 3687,
+                                "start": 3728,
+                                "end": 3732,
                                 "loc": {
                                   "start": {
-                                    "line": 134,
+                                    "line": 136,
                                     "column": 24
                                   },
                                   "end": {
-                                    "line": 134,
+                                    "line": 136,
                                     "column": 28
                                   }
                                 }
                               },
                               {
                                 "type": "Identifier",
-                                "start": 3689,
-                                "end": 3698,
+                                "start": 3734,
+                                "end": 3743,
                                 "loc": {
                                   "start": {
-                                    "line": 134,
+                                    "line": 136,
                                     "column": 30
                                   },
                                   "end": {
-                                    "line": 134,
+                                    "line": 136,
                                     "column": 39
                                   },
                                   "identifierName": "component"
@@ -3908,15 +3908,15 @@
                       {
                         "type": "CommentLine",
                         "value": " Update the index with this new component",
-                        "start": 3593,
-                        "end": 3636,
+                        "start": 3638,
+                        "end": 3681,
                         "loc": {
                           "start": {
-                            "line": 132,
+                            "line": 134,
                             "column": 2
                           },
                           "end": {
-                            "line": 132,
+                            "line": 134,
                             "column": 45
                           }
                         }
@@ -3925,29 +3925,29 @@
                   },
                   {
                     "type": "ReturnStatement",
-                    "start": 3707,
-                    "end": 3718,
+                    "start": 3752,
+                    "end": 3763,
                     "loc": {
                       "start": {
-                        "line": 137,
+                        "line": 139,
                         "column": 2
                       },
                       "end": {
-                        "line": 137,
+                        "line": 139,
                         "column": 13
                       }
                     },
                     "argument": {
                       "type": "ThisExpression",
-                      "start": 3714,
-                      "end": 3718,
+                      "start": 3759,
+                      "end": 3763,
                       "loc": {
                         "start": {
-                          "line": 137,
+                          "line": 139,
                           "column": 9
                         },
                         "end": {
-                          "line": 137,
+                          "line": 139,
                           "column": 13
                         }
                       }
@@ -3961,15 +3961,15 @@
                 {
                   "type": "CommentBlock",
                   "value": "*\n\t * Adds a new component, or re-creates and overwrites an existing component\n\t *\n\t * @example\n\t * entity.set('position', 1, 2)\n\t *\n\t * @example\n\t * entity.set('anonymousComponent', { keys: 'values' })\n\t *\n\t * @example\n\t * entity.set('anotherAnonymousComponent', 'Any type of any value')\n\t *\n\t * @param {string}    component - The component name to create. If there is a registered component for this name, then\n\t * its constructor will be called and an object of that type will be created.\n\t * @param {...Object} [args]    - The arguments to forward to the registered component type. If the component type is\n\t * registered, then only the first additional argument will be used as the value of the entire component.\n\t *\n\t * @return {Object} The original entity that set() was called on, so that operations can be chained.\n\t ",
-                  "start": 2341,
-                  "end": 3171,
+                  "start": 2386,
+                  "end": 3216,
                   "loc": {
                     "start": {
-                      "line": 101,
+                      "line": 103,
                       "column": 1
                     },
                     "end": {
-                      "line": 119,
+                      "line": 121,
                       "column": 4
                     }
                   }
@@ -3979,15 +3979,15 @@
                 {
                   "type": "CommentBlock",
                   "value": "*\n\t * Updates component data from an object or other component. Similar to access() with a shallow merge applied after.\n\t *\n\t * @example\n\t * entity.update('position', { x: 1, y: 2 })\n\t *\n\t * @param {string} component - The component name to update\n\t * @param {Object} data      - The object or other component to merge into the specified component.\n\t *\n\t * @return {Object} The original entity that update() was called on, so that operations can be chained.\n\t ",
-                  "start": 3724,
-                  "end": 4188,
+                  "start": 3769,
+                  "end": 4233,
                   "loc": {
                     "start": {
-                      "line": 140,
+                      "line": 142,
                       "column": 1
                     },
                     "end": {
-                      "line": 150,
+                      "line": 152,
                       "column": 4
                     }
                   }
@@ -3996,15 +3996,15 @@
             },
             {
               "type": "ClassMethod",
-              "start": 4190,
-              "end": 4364,
+              "start": 4235,
+              "end": 4409,
               "loc": {
                 "start": {
-                  "line": 151,
+                  "line": 153,
                   "column": 1
                 },
                 "end": {
-                  "line": 160,
+                  "line": 162,
                   "column": 2
                 }
               },
@@ -4012,15 +4012,15 @@
               "computed": false,
               "key": {
                 "type": "Identifier",
-                "start": 4190,
-                "end": 4196,
+                "start": 4235,
+                "end": 4241,
                 "loc": {
                   "start": {
-                    "line": 151,
+                    "line": 153,
                     "column": 1
                   },
                   "end": {
-                    "line": 151,
+                    "line": 153,
                     "column": 7
                   },
                   "identifierName": "update"
@@ -4036,15 +4036,15 @@
               "params": [
                 {
                   "type": "Identifier",
-                  "start": 4197,
-                  "end": 4206,
+                  "start": 4242,
+                  "end": 4251,
                   "loc": {
                     "start": {
-                      "line": 151,
+                      "line": 153,
                       "column": 8
                     },
                     "end": {
-                      "line": 151,
+                      "line": 153,
                       "column": 17
                     },
                     "identifierName": "component"
@@ -4053,15 +4053,15 @@
                 },
                 {
                   "type": "Identifier",
-                  "start": 4208,
-                  "end": 4212,
+                  "start": 4253,
+                  "end": 4257,
                   "loc": {
                     "start": {
-                      "line": 151,
+                      "line": 153,
                       "column": 19
                     },
                     "end": {
-                      "line": 151,
+                      "line": 153,
                       "column": 23
                     },
                     "identifierName": "data"
@@ -4071,59 +4071,59 @@
               ],
               "body": {
                 "type": "BlockStatement",
-                "start": 4214,
-                "end": 4364,
+                "start": 4259,
+                "end": 4409,
                 "loc": {
                   "start": {
-                    "line": 151,
+                    "line": 153,
                     "column": 25
                   },
                   "end": {
-                    "line": 160,
+                    "line": 162,
                     "column": 2
                   }
                 },
                 "body": [
                   {
                     "type": "VariableDeclaration",
-                    "start": 4218,
-                    "end": 4251,
+                    "start": 4263,
+                    "end": 4296,
                     "loc": {
                       "start": {
-                        "line": 152,
+                        "line": 154,
                         "column": 2
                       },
                       "end": {
-                        "line": 152,
+                        "line": 154,
                         "column": 35
                       }
                     },
                     "declarations": [
                       {
                         "type": "VariableDeclarator",
-                        "start": 4222,
-                        "end": 4251,
+                        "start": 4267,
+                        "end": 4296,
                         "loc": {
                           "start": {
-                            "line": 152,
+                            "line": 154,
                             "column": 6
                           },
                           "end": {
-                            "line": 152,
+                            "line": 154,
                             "column": 35
                           }
                         },
                         "id": {
                           "type": "Identifier",
-                          "start": 4222,
-                          "end": 4226,
+                          "start": 4267,
+                          "end": 4271,
                           "loc": {
                             "start": {
-                              "line": 152,
+                              "line": 154,
                               "column": 6
                             },
                             "end": {
-                              "line": 152,
+                              "line": 154,
                               "column": 10
                             },
                             "identifierName": "comp"
@@ -4132,58 +4132,58 @@
                         },
                         "init": {
                           "type": "CallExpression",
-                          "start": 4229,
-                          "end": 4251,
+                          "start": 4274,
+                          "end": 4296,
                           "loc": {
                             "start": {
-                              "line": 152,
+                              "line": 154,
                               "column": 13
                             },
                             "end": {
-                              "line": 152,
+                              "line": 154,
                               "column": 35
                             }
                           },
                           "callee": {
                             "type": "MemberExpression",
-                            "start": 4229,
-                            "end": 4240,
+                            "start": 4274,
+                            "end": 4285,
                             "loc": {
                               "start": {
-                                "line": 152,
+                                "line": 154,
                                 "column": 13
                               },
                               "end": {
-                                "line": 152,
+                                "line": 154,
                                 "column": 24
                               }
                             },
                             "object": {
                               "type": "ThisExpression",
-                              "start": 4229,
-                              "end": 4233,
+                              "start": 4274,
+                              "end": 4278,
                               "loc": {
                                 "start": {
-                                  "line": 152,
+                                  "line": 154,
                                   "column": 13
                                 },
                                 "end": {
-                                  "line": 152,
+                                  "line": 154,
                                   "column": 17
                                 }
                               }
                             },
                             "property": {
                               "type": "Identifier",
-                              "start": 4234,
-                              "end": 4240,
+                              "start": 4279,
+                              "end": 4285,
                               "loc": {
                                 "start": {
-                                  "line": 152,
+                                  "line": 154,
                                   "column": 18
                                 },
                                 "end": {
-                                  "line": 152,
+                                  "line": 154,
                                   "column": 24
                                 },
                                 "identifierName": "access"
@@ -4195,15 +4195,15 @@
                           "arguments": [
                             {
                               "type": "Identifier",
-                              "start": 4241,
-                              "end": 4250,
+                              "start": 4286,
+                              "end": 4295,
                               "loc": {
                                 "start": {
-                                  "line": 152,
+                                  "line": 154,
                                   "column": 25
                                 },
                                 "end": {
-                                  "line": 152,
+                                  "line": 154,
                                   "column": 34
                                 },
                                 "identifierName": "component"
@@ -4221,15 +4221,15 @@
                       {
                         "type": "CommentLine",
                         "value": " Shallow set keys of the component",
-                        "start": 4255,
-                        "end": 4291,
+                        "start": 4300,
+                        "end": 4336,
                         "loc": {
                           "start": {
-                            "line": 154,
+                            "line": 156,
                             "column": 2
                           },
                           "end": {
-                            "line": 154,
+                            "line": 156,
                             "column": 38
                           }
                         }
@@ -4238,58 +4238,58 @@
                   },
                   {
                     "type": "ForInStatement",
-                    "start": 4294,
-                    "end": 4346,
+                    "start": 4339,
+                    "end": 4391,
                     "loc": {
                       "start": {
-                        "line": 155,
+                        "line": 157,
                         "column": 2
                       },
                       "end": {
-                        "line": 157,
+                        "line": 159,
                         "column": 3
                       }
                     },
                     "left": {
                       "type": "VariableDeclaration",
-                      "start": 4299,
-                      "end": 4306,
+                      "start": 4344,
+                      "end": 4351,
                       "loc": {
                         "start": {
-                          "line": 155,
+                          "line": 157,
                           "column": 7
                         },
                         "end": {
-                          "line": 155,
+                          "line": 157,
                           "column": 14
                         }
                       },
                       "declarations": [
                         {
                           "type": "VariableDeclarator",
-                          "start": 4303,
-                          "end": 4306,
+                          "start": 4348,
+                          "end": 4351,
                           "loc": {
                             "start": {
-                              "line": 155,
+                              "line": 157,
                               "column": 11
                             },
                             "end": {
-                              "line": 155,
+                              "line": 157,
                               "column": 14
                             }
                           },
                           "id": {
                             "type": "Identifier",
-                            "start": 4303,
-                            "end": 4306,
+                            "start": 4348,
+                            "end": 4351,
                             "loc": {
                               "start": {
-                                "line": 155,
+                                "line": 157,
                                 "column": 11
                               },
                               "end": {
-                                "line": 155,
+                                "line": 157,
                                 "column": 14
                               },
                               "identifierName": "key"
@@ -4306,15 +4306,15 @@
                     },
                     "right": {
                       "type": "Identifier",
-                      "start": 4310,
-                      "end": 4314,
+                      "start": 4355,
+                      "end": 4359,
                       "loc": {
                         "start": {
-                          "line": 155,
+                          "line": 157,
                           "column": 18
                         },
                         "end": {
-                          "line": 155,
+                          "line": 157,
                           "column": 22
                         },
                         "identifierName": "data"
@@ -4323,73 +4323,73 @@
                     },
                     "body": {
                       "type": "BlockStatement",
-                      "start": 4316,
-                      "end": 4346,
+                      "start": 4361,
+                      "end": 4391,
                       "loc": {
                         "start": {
-                          "line": 155,
+                          "line": 157,
                           "column": 24
                         },
                         "end": {
-                          "line": 157,
+                          "line": 159,
                           "column": 3
                         }
                       },
                       "body": [
                         {
                           "type": "ExpressionStatement",
-                          "start": 4321,
-                          "end": 4342,
+                          "start": 4366,
+                          "end": 4387,
                           "loc": {
                             "start": {
-                              "line": 156,
+                              "line": 158,
                               "column": 3
                             },
                             "end": {
-                              "line": 156,
+                              "line": 158,
                               "column": 24
                             }
                           },
                           "expression": {
                             "type": "AssignmentExpression",
-                            "start": 4321,
-                            "end": 4342,
+                            "start": 4366,
+                            "end": 4387,
                             "loc": {
                               "start": {
-                                "line": 156,
+                                "line": 158,
                                 "column": 3
                               },
                               "end": {
-                                "line": 156,
+                                "line": 158,
                                 "column": 24
                               }
                             },
                             "operator": "=",
                             "left": {
                               "type": "MemberExpression",
-                              "start": 4321,
-                              "end": 4330,
+                              "start": 4366,
+                              "end": 4375,
                               "loc": {
                                 "start": {
-                                  "line": 156,
+                                  "line": 158,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 156,
+                                  "line": 158,
                                   "column": 12
                                 }
                               },
                               "object": {
                                 "type": "Identifier",
-                                "start": 4321,
-                                "end": 4325,
+                                "start": 4366,
+                                "end": 4370,
                                 "loc": {
                                   "start": {
-                                    "line": 156,
+                                    "line": 158,
                                     "column": 3
                                   },
                                   "end": {
-                                    "line": 156,
+                                    "line": 158,
                                     "column": 7
                                   },
                                   "identifierName": "comp"
@@ -4398,15 +4398,15 @@
                               },
                               "property": {
                                 "type": "Identifier",
-                                "start": 4326,
-                                "end": 4329,
+                                "start": 4371,
+                                "end": 4374,
                                 "loc": {
                                   "start": {
-                                    "line": 156,
+                                    "line": 158,
                                     "column": 8
                                   },
                                   "end": {
-                                    "line": 156,
+                                    "line": 158,
                                     "column": 11
                                   },
                                   "identifierName": "key"
@@ -4417,29 +4417,29 @@
                             },
                             "right": {
                               "type": "MemberExpression",
-                              "start": 4333,
-                              "end": 4342,
+                              "start": 4378,
+                              "end": 4387,
                               "loc": {
                                 "start": {
-                                  "line": 156,
+                                  "line": 158,
                                   "column": 15
                                 },
                                 "end": {
-                                  "line": 156,
+                                  "line": 158,
                                   "column": 24
                                 }
                               },
                               "object": {
                                 "type": "Identifier",
-                                "start": 4333,
-                                "end": 4337,
+                                "start": 4378,
+                                "end": 4382,
                                 "loc": {
                                   "start": {
-                                    "line": 156,
+                                    "line": 158,
                                     "column": 15
                                   },
                                   "end": {
-                                    "line": 156,
+                                    "line": 158,
                                     "column": 19
                                   },
                                   "identifierName": "data"
@@ -4448,15 +4448,15 @@
                               },
                               "property": {
                                 "type": "Identifier",
-                                "start": 4338,
-                                "end": 4341,
+                                "start": 4383,
+                                "end": 4386,
                                 "loc": {
                                   "start": {
-                                    "line": 156,
+                                    "line": 158,
                                     "column": 20
                                   },
                                   "end": {
-                                    "line": 156,
+                                    "line": 158,
                                     "column": 23
                                   },
                                   "identifierName": "key"
@@ -4474,15 +4474,15 @@
                       {
                         "type": "CommentLine",
                         "value": " Shallow set keys of the component",
-                        "start": 4255,
-                        "end": 4291,
+                        "start": 4300,
+                        "end": 4336,
                         "loc": {
                           "start": {
-                            "line": 154,
+                            "line": 156,
                             "column": 2
                           },
                           "end": {
-                            "line": 154,
+                            "line": 156,
                             "column": 38
                           }
                         }
@@ -4491,29 +4491,29 @@
                   },
                   {
                     "type": "ReturnStatement",
-                    "start": 4350,
-                    "end": 4361,
+                    "start": 4395,
+                    "end": 4406,
                     "loc": {
                       "start": {
-                        "line": 159,
+                        "line": 161,
                         "column": 2
                       },
                       "end": {
-                        "line": 159,
+                        "line": 161,
                         "column": 13
                       }
                     },
                     "argument": {
                       "type": "ThisExpression",
-                      "start": 4357,
-                      "end": 4361,
+                      "start": 4402,
+                      "end": 4406,
                       "loc": {
                         "start": {
-                          "line": 159,
+                          "line": 161,
                           "column": 9
                         },
                         "end": {
-                          "line": 159,
+                          "line": 161,
                           "column": 13
                         }
                       }
@@ -4527,15 +4527,15 @@
                 {
                   "type": "CommentBlock",
                   "value": "*\n\t * Updates component data from an object or other component. Similar to access() with a shallow merge applied after.\n\t *\n\t * @example\n\t * entity.update('position', { x: 1, y: 2 })\n\t *\n\t * @param {string} component - The component name to update\n\t * @param {Object} data      - The object or other component to merge into the specified component.\n\t *\n\t * @return {Object} The original entity that update() was called on, so that operations can be chained.\n\t ",
-                  "start": 3724,
-                  "end": 4188,
+                  "start": 3769,
+                  "end": 4233,
                   "loc": {
                     "start": {
-                      "line": 140,
+                      "line": 142,
                       "column": 1
                     },
                     "end": {
-                      "line": 150,
+                      "line": 152,
                       "column": 4
                     }
                   }
@@ -4545,15 +4545,15 @@
                 {
                   "type": "CommentBlock",
                   "value": "*\n\t * Removes a component from the entity - has no effect when it doesn't exist.\n\t * Can specify an onRemove() method in your component which gets called before it is removed.\n\t * If nothing is specified, then nothing will be removed. Use removeAll() to remove all components.\n\t *\n\t * @example\n\t * entity.remove('position')\n\t *\n\t * @param {...string} [components] - The component names to remove from the entity.\n\t *\n\t * @return {Object} The original entity that remove() was called on, so that operations can be chained.\n\t ",
-                  "start": 4367,
-                  "end": 4895,
+                  "start": 4412,
+                  "end": 4940,
                   "loc": {
                     "start": {
-                      "line": 162,
+                      "line": 164,
                       "column": 1
                     },
                     "end": {
-                      "line": 173,
+                      "line": 175,
                       "column": 4
                     }
                   }
@@ -4562,15 +4562,15 @@
             },
             {
               "type": "ClassMethod",
-              "start": 4897,
-              "end": 5226,
+              "start": 4942,
+              "end": 5271,
               "loc": {
                 "start": {
-                  "line": 174,
+                  "line": 176,
                   "column": 1
                 },
                 "end": {
-                  "line": 190,
+                  "line": 192,
                   "column": 2
                 }
               },
@@ -4578,15 +4578,15 @@
               "computed": false,
               "key": {
                 "type": "Identifier",
-                "start": 4897,
-                "end": 4903,
+                "start": 4942,
+                "end": 4948,
                 "loc": {
                   "start": {
-                    "line": 174,
+                    "line": 176,
                     "column": 1
                   },
                   "end": {
-                    "line": 174,
+                    "line": 176,
                     "column": 7
                   },
                   "identifierName": "remove"
@@ -4602,29 +4602,29 @@
               "params": [
                 {
                   "type": "RestElement",
-                  "start": 4904,
-                  "end": 4917,
+                  "start": 4949,
+                  "end": 4962,
                   "loc": {
                     "start": {
-                      "line": 174,
+                      "line": 176,
                       "column": 8
                     },
                     "end": {
-                      "line": 174,
+                      "line": 176,
                       "column": 21
                     }
                   },
                   "argument": {
                     "type": "Identifier",
-                    "start": 4907,
-                    "end": 4917,
+                    "start": 4952,
+                    "end": 4962,
                     "loc": {
                       "start": {
-                        "line": 174,
+                        "line": 176,
                         "column": 11
                       },
                       "end": {
-                        "line": 174,
+                        "line": 176,
                         "column": 21
                       },
                       "identifierName": "components"
@@ -4635,73 +4635,73 @@
               ],
               "body": {
                 "type": "BlockStatement",
-                "start": 4919,
-                "end": 5226,
+                "start": 4964,
+                "end": 5271,
                 "loc": {
                   "start": {
-                    "line": 174,
+                    "line": 176,
                     "column": 23
                   },
                   "end": {
-                    "line": 190,
+                    "line": 192,
                     "column": 2
                   }
                 },
                 "body": [
                   {
                     "type": "ForOfStatement",
-                    "start": 4923,
-                    "end": 5209,
+                    "start": 4968,
+                    "end": 5254,
                     "loc": {
                       "start": {
-                        "line": 175,
+                        "line": 177,
                         "column": 2
                       },
                       "end": {
-                        "line": 188,
+                        "line": 190,
                         "column": 3
                       }
                     },
                     "left": {
                       "type": "VariableDeclaration",
-                      "start": 4928,
-                      "end": 4941,
+                      "start": 4973,
+                      "end": 4986,
                       "loc": {
                         "start": {
-                          "line": 175,
+                          "line": 177,
                           "column": 7
                         },
                         "end": {
-                          "line": 175,
+                          "line": 177,
                           "column": 20
                         }
                       },
                       "declarations": [
                         {
                           "type": "VariableDeclarator",
-                          "start": 4932,
-                          "end": 4941,
+                          "start": 4977,
+                          "end": 4986,
                           "loc": {
                             "start": {
-                              "line": 175,
+                              "line": 177,
                               "column": 11
                             },
                             "end": {
-                              "line": 175,
+                              "line": 177,
                               "column": 20
                             }
                           },
                           "id": {
                             "type": "Identifier",
-                            "start": 4932,
-                            "end": 4941,
+                            "start": 4977,
+                            "end": 4986,
                             "loc": {
                               "start": {
-                                "line": 175,
+                                "line": 177,
                                 "column": 11
                               },
                               "end": {
-                                "line": 175,
+                                "line": 177,
                                 "column": 20
                               },
                               "identifierName": "component"
@@ -4715,15 +4715,15 @@
                     },
                     "right": {
                       "type": "Identifier",
-                      "start": 4945,
-                      "end": 4955,
+                      "start": 4990,
+                      "end": 5000,
                       "loc": {
                         "start": {
-                          "line": 175,
+                          "line": 177,
                           "column": 24
                         },
                         "end": {
-                          "line": 175,
+                          "line": 177,
                           "column": 34
                         },
                         "identifierName": "components"
@@ -4732,58 +4732,58 @@
                     },
                     "body": {
                       "type": "BlockStatement",
-                      "start": 4957,
-                      "end": 5209,
+                      "start": 5002,
+                      "end": 5254,
                       "loc": {
                         "start": {
-                          "line": 175,
+                          "line": 177,
                           "column": 36
                         },
                         "end": {
-                          "line": 188,
+                          "line": 190,
                           "column": 3
                         }
                       },
                       "body": [
                         {
                           "type": "IfStatement",
-                          "start": 4962,
-                          "end": 5205,
+                          "start": 5007,
+                          "end": 5250,
                           "loc": {
                             "start": {
-                              "line": 176,
+                              "line": 178,
                               "column": 3
                             },
                             "end": {
-                              "line": 187,
+                              "line": 189,
                               "column": 4
                             }
                           },
                           "test": {
                             "type": "BinaryExpression",
-                            "start": 4966,
-                            "end": 4988,
+                            "start": 5011,
+                            "end": 5033,
                             "loc": {
                               "start": {
-                                "line": 176,
+                                "line": 178,
                                 "column": 7
                               },
                               "end": {
-                                "line": 176,
+                                "line": 178,
                                 "column": 29
                               }
                             },
                             "left": {
                               "type": "Identifier",
-                              "start": 4966,
-                              "end": 4975,
+                              "start": 5011,
+                              "end": 5020,
                               "loc": {
                                 "start": {
-                                  "line": 176,
+                                  "line": 178,
                                   "column": 7
                                 },
                                 "end": {
-                                  "line": 176,
+                                  "line": 178,
                                   "column": 16
                                 },
                                 "identifierName": "component"
@@ -4793,44 +4793,44 @@
                             "operator": "in",
                             "right": {
                               "type": "MemberExpression",
-                              "start": 4979,
-                              "end": 4988,
+                              "start": 5024,
+                              "end": 5033,
                               "loc": {
                                 "start": {
-                                  "line": 176,
+                                  "line": 178,
                                   "column": 20
                                 },
                                 "end": {
-                                  "line": 176,
+                                  "line": 178,
                                   "column": 29
                                 }
                               },
                               "object": {
                                 "type": "ThisExpression",
-                                "start": 4979,
-                                "end": 4983,
+                                "start": 5024,
+                                "end": 5028,
                                 "loc": {
                                   "start": {
-                                    "line": 176,
+                                    "line": 178,
                                     "column": 20
                                   },
                                   "end": {
-                                    "line": 176,
+                                    "line": 178,
                                     "column": 24
                                   }
                                 }
                               },
                               "property": {
                                 "type": "Identifier",
-                                "start": 4984,
-                                "end": 4988,
+                                "start": 5029,
+                                "end": 5033,
                                 "loc": {
                                   "start": {
-                                    "line": 176,
+                                    "line": 178,
                                     "column": 25
                                   },
                                   "end": {
-                                    "line": 176,
+                                    "line": 178,
                                     "column": 29
                                   },
                                   "identifierName": "data"
@@ -4842,72 +4842,72 @@
                           },
                           "consequent": {
                             "type": "BlockStatement",
-                            "start": 4990,
-                            "end": 5205,
+                            "start": 5035,
+                            "end": 5250,
                             "loc": {
                               "start": {
-                                "line": 176,
+                                "line": 178,
                                 "column": 31
                               },
                               "end": {
-                                "line": 187,
+                                "line": 189,
                                 "column": 4
                               }
                             },
                             "body": [
                               {
                                 "type": "IfStatement",
-                                "start": 5022,
-                                "end": 5093,
+                                "start": 5067,
+                                "end": 5138,
                                 "loc": {
                                   "start": {
-                                    "line": 179,
+                                    "line": 181,
                                     "column": 4
                                   },
                                   "end": {
-                                    "line": 181,
+                                    "line": 183,
                                     "column": 5
                                   }
                                 },
                                 "test": {
                                   "type": "CallExpression",
-                                  "start": 5026,
-                                  "end": 5038,
+                                  "start": 5071,
+                                  "end": 5083,
                                   "loc": {
                                     "start": {
-                                      "line": 179,
+                                      "line": 181,
                                       "column": 8
                                     },
                                     "end": {
-                                      "line": 179,
+                                      "line": 181,
                                       "column": 20
                                     }
                                   },
                                   "callee": {
                                     "type": "MemberExpression",
-                                    "start": 5026,
-                                    "end": 5036,
+                                    "start": 5071,
+                                    "end": 5081,
                                     "loc": {
                                       "start": {
-                                        "line": 179,
+                                        "line": 181,
                                         "column": 8
                                       },
                                       "end": {
-                                        "line": 179,
+                                        "line": 181,
                                         "column": 18
                                       }
                                     },
                                     "object": {
                                       "type": "ThisExpression",
-                                      "start": 5026,
-                                      "end": 5030,
+                                      "start": 5071,
+                                      "end": 5075,
                                       "loc": {
                                         "start": {
-                                          "line": 179,
+                                          "line": 181,
                                           "column": 8
                                         },
                                         "end": {
-                                          "line": 179,
+                                          "line": 181,
                                           "column": 12
                                         }
                                       },
@@ -4915,15 +4915,15 @@
                                     },
                                     "property": {
                                       "type": "Identifier",
-                                      "start": 5031,
-                                      "end": 5036,
+                                      "start": 5076,
+                                      "end": 5081,
                                       "loc": {
                                         "start": {
-                                          "line": 179,
+                                          "line": 181,
                                           "column": 13
                                         },
                                         "end": {
-                                          "line": 179,
+                                          "line": 181,
                                           "column": 18
                                         },
                                         "identifierName": "valid"
@@ -4938,115 +4938,115 @@
                                 },
                                 "consequent": {
                                   "type": "BlockStatement",
-                                  "start": 5040,
-                                  "end": 5093,
+                                  "start": 5085,
+                                  "end": 5138,
                                   "loc": {
                                     "start": {
-                                      "line": 179,
+                                      "line": 181,
                                       "column": 22
                                     },
                                     "end": {
-                                      "line": 181,
+                                      "line": 183,
                                       "column": 5
                                     }
                                   },
                                   "body": [
                                     {
                                       "type": "ExpressionStatement",
-                                      "start": 5047,
-                                      "end": 5087,
+                                      "start": 5092,
+                                      "end": 5132,
                                       "loc": {
                                         "start": {
-                                          "line": 180,
+                                          "line": 182,
                                           "column": 5
                                         },
                                         "end": {
-                                          "line": 180,
+                                          "line": 182,
                                           "column": 45
                                         }
                                       },
                                       "expression": {
                                         "type": "CallExpression",
-                                        "start": 5047,
-                                        "end": 5087,
+                                        "start": 5092,
+                                        "end": 5132,
                                         "loc": {
                                           "start": {
-                                            "line": 180,
+                                            "line": 182,
                                             "column": 5
                                           },
                                           "end": {
-                                            "line": 180,
+                                            "line": 182,
                                             "column": 45
                                           }
                                         },
                                         "callee": {
                                           "type": "MemberExpression",
-                                          "start": 5047,
-                                          "end": 5070,
+                                          "start": 5092,
+                                          "end": 5115,
                                           "loc": {
                                             "start": {
-                                              "line": 180,
+                                              "line": 182,
                                               "column": 5
                                             },
                                             "end": {
-                                              "line": 180,
+                                              "line": 182,
                                               "column": 28
                                             }
                                           },
                                           "object": {
                                             "type": "MemberExpression",
-                                            "start": 5047,
-                                            "end": 5063,
+                                            "start": 5092,
+                                            "end": 5108,
                                             "loc": {
                                               "start": {
-                                                "line": 180,
+                                                "line": 182,
                                                 "column": 5
                                               },
                                               "end": {
-                                                "line": 180,
+                                                "line": 182,
                                                 "column": 21
                                               }
                                             },
                                             "object": {
                                               "type": "MemberExpression",
-                                              "start": 5047,
-                                              "end": 5057,
+                                              "start": 5092,
+                                              "end": 5102,
                                               "loc": {
                                                 "start": {
-                                                  "line": 180,
+                                                  "line": 182,
                                                   "column": 5
                                                 },
                                                 "end": {
-                                                  "line": 180,
+                                                  "line": 182,
                                                   "column": 15
                                                 }
                                               },
                                               "object": {
                                                 "type": "ThisExpression",
-                                                "start": 5047,
-                                                "end": 5051,
+                                                "start": 5092,
+                                                "end": 5096,
                                                 "loc": {
                                                   "start": {
-                                                    "line": 180,
+                                                    "line": 182,
                                                     "column": 5
                                                   },
                                                   "end": {
-                                                    "line": 180,
+                                                    "line": 182,
                                                     "column": 9
                                                   }
                                                 }
                                               },
                                               "property": {
                                                 "type": "Identifier",
-                                                "start": 5052,
-                                                "end": 5057,
+                                                "start": 5097,
+                                                "end": 5102,
                                                 "loc": {
                                                   "start": {
-                                                    "line": 180,
+                                                    "line": 182,
                                                     "column": 10
                                                   },
                                                   "end": {
-                                                    "line": 180,
+                                                    "line": 182,
                                                     "column": 15
                                                   },
                                                   "identifierName": "world"
@@ -5057,15 +5057,15 @@
                                             },
                                             "property": {
                                               "type": "Identifier",
-                                              "start": 5058,
-                                              "end": 5063,
+                                              "start": 5103,
+                                              "end": 5108,
                                               "loc": {
                                                 "start": {
-                                                  "line": 180,
+                                                  "line": 182,
                                                   "column": 16
                                                 },
                                                 "end": {
-                                                  "line": 180,
+                                                  "line": 182,
                                                   "column": 21
                                                 },
                                                 "identifierName": "index"
@@ -5076,15 +5076,15 @@
                                           },
                                           "property": {
                                             "type": "Identifier",
-                                            "start": 5064,
-                                            "end": 5070,
+                                            "start": 5109,
+                                            "end": 5115,
                                             "loc": {
                                               "start": {
-                                                "line": 180,
+                                                "line": 182,
                                                 "column": 22
                                               },
                                               "end": {
-                                                "line": 180,
+                                                "line": 182,
                                                 "column": 28
                                               },
                                               "identifierName": "remove"
@@ -5096,30 +5096,30 @@
                                         "arguments": [
                                           {
                                             "type": "ThisExpression",
-                                            "start": 5071,
-                                            "end": 5075,
+                                            "start": 5116,
+                                            "end": 5120,
                                             "loc": {
                                               "start": {
-                                                "line": 180,
+                                                "line": 182,
                                                 "column": 29
                                               },
                                               "end": {
-                                                "line": 180,
+                                                "line": 182,
                                                 "column": 33
                                               }
                                             }
                                           },
                                           {
                                             "type": "Identifier",
-                                            "start": 5077,
-                                            "end": 5086,
+                                            "start": 5122,
+                                            "end": 5131,
                                             "loc": {
                                               "start": {
-                                                "line": 180,
+                                                "line": 182,
                                                 "column": 35
                                               },
                                               "end": {
-                                                "line": 180,
+                                                "line": 182,
                                                 "column": 44
                                               },
                                               "identifierName": "component"
@@ -5138,15 +5138,15 @@
                                   {
                                     "type": "CommentLine",
                                     "value": " Remove from index",
-                                    "start": 4997,
-                                    "end": 5017,
+                                    "start": 5042,
+                                    "end": 5062,
                                     "loc": {
                                       "start": {
-                                        "line": 178,
+                                        "line": 180,
                                         "column": 4
                                       },
                                       "end": {
-                                        "line": 178,
+                                        "line": 180,
                                         "column": 24
                                       }
                                     }
@@ -5156,15 +5156,15 @@
                                   {
                                     "type": "CommentLine",
                                     "value": " Call custom onRemove",
-                                    "start": 5099,
-                                    "end": 5122,
+                                    "start": 5144,
+                                    "end": 5167,
                                     "loc": {
                                       "start": {
-                                        "line": 183,
+                                        "line": 185,
                                         "column": 4
                                       },
                                       "end": {
-                                        "line": 183,
+                                        "line": 185,
                                         "column": 27
                                       }
                                     }
@@ -5173,43 +5173,43 @@
                               },
                               {
                                 "type": "ExpressionStatement",
-                                "start": 5127,
-                                "end": 5167,
+                                "start": 5172,
+                                "end": 5212,
                                 "loc": {
                                   "start": {
-                                    "line": 184,
+                                    "line": 186,
                                     "column": 4
                                   },
                                   "end": {
-                                    "line": 184,
+                                    "line": 186,
                                     "column": 44
                                   }
                                 },
                                 "expression": {
                                   "type": "CallExpression",
-                                  "start": 5127,
-                                  "end": 5167,
+                                  "start": 5172,
+                                  "end": 5212,
                                   "loc": {
                                     "start": {
-                                      "line": 184,
+                                      "line": 186,
                                       "column": 4
                                     },
                                     "end": {
-                                      "line": 184,
+                                      "line": 186,
                                       "column": 44
                                     }
                                   },
                                   "callee": {
                                     "type": "Identifier",
-                                    "start": 5127,
-                                    "end": 5133,
+                                    "start": 5172,
+                                    "end": 5178,
                                     "loc": {
                                       "start": {
-                                        "line": 184,
+                                        "line": 186,
                                         "column": 4
                                       },
                                       "end": {
-                                        "line": 184,
+                                        "line": 186,
                                         "column": 10
                                       },
                                       "identifierName": "invoke"
@@ -5220,58 +5220,58 @@
                                   "arguments": [
                                     {
                                       "type": "MemberExpression",
-                                      "start": 5134,
-                                      "end": 5154,
+                                      "start": 5179,
+                                      "end": 5199,
                                       "loc": {
                                         "start": {
-                                          "line": 184,
+                                          "line": 186,
                                           "column": 11
                                         },
                                         "end": {
-                                          "line": 184,
+                                          "line": 186,
                                           "column": 31
                                         }
                                       },
                                       "object": {
                                         "type": "MemberExpression",
-                                        "start": 5134,
-                                        "end": 5143,
+                                        "start": 5179,
+                                        "end": 5188,
                                         "loc": {
                                           "start": {
-                                            "line": 184,
+                                            "line": 186,
                                             "column": 11
                                           },
                                           "end": {
-                                            "line": 184,
+                                            "line": 186,
                                             "column": 20
                                           }
                                         },
                                         "object": {
                                           "type": "ThisExpression",
-                                          "start": 5134,
-                                          "end": 5138,
+                                          "start": 5179,
+                                          "end": 5183,
                                           "loc": {
                                             "start": {
-                                              "line": 184,
+                                              "line": 186,
                                               "column": 11
                                             },
                                             "end": {
-                                              "line": 184,
+                                              "line": 186,
                                               "column": 15
                                             }
                                           }
                                         },
                                         "property": {
                                           "type": "Identifier",
-                                          "start": 5139,
-                                          "end": 5143,
+                                          "start": 5184,
+                                          "end": 5188,
                                           "loc": {
                                             "start": {
-                                              "line": 184,
+                                              "line": 186,
                                               "column": 16
                                             },
                                             "end": {
-                                              "line": 184,
+                                              "line": 186,
                                               "column": 20
                                             },
                                             "identifierName": "data"
@@ -5282,15 +5282,15 @@
                                       },
                                       "property": {
                                         "type": "Identifier",
-                                        "start": 5144,
-                                        "end": 5153,
+                                        "start": 5189,
+                                        "end": 5198,
                                         "loc": {
                                           "start": {
-                                            "line": 184,
+                                            "line": 186,
                                             "column": 21
                                           },
                                           "end": {
-                                            "line": 184,
+                                            "line": 186,
                                             "column": 30
                                           },
                                           "identifierName": "component"
@@ -5301,15 +5301,15 @@
                                     },
                                     {
                                       "type": "StringLiteral",
-                                      "start": 5156,
-                                      "end": 5166,
+                                      "start": 5201,
+                                      "end": 5211,
                                       "loc": {
                                         "start": {
-                                          "line": 184,
+                                          "line": 186,
                                           "column": 33
                                         },
                                         "end": {
-                                          "line": 184,
+                                          "line": 186,
                                           "column": 43
                                         }
                                       },
@@ -5326,15 +5326,15 @@
                                   {
                                     "type": "CommentLine",
                                     "value": " Call custom onRemove",
-                                    "start": 5099,
-                                    "end": 5122,
+                                    "start": 5144,
+                                    "end": 5167,
                                     "loc": {
                                       "start": {
-                                        "line": 183,
+                                        "line": 185,
                                         "column": 4
                                       },
                                       "end": {
-                                        "line": 183,
+                                        "line": 185,
                                         "column": 27
                                       }
                                     }
@@ -5343,29 +5343,29 @@
                               },
                               {
                                 "type": "ExpressionStatement",
-                                "start": 5173,
-                                "end": 5200,
+                                "start": 5218,
+                                "end": 5245,
                                 "loc": {
                                   "start": {
-                                    "line": 186,
+                                    "line": 188,
                                     "column": 4
                                   },
                                   "end": {
-                                    "line": 186,
+                                    "line": 188,
                                     "column": 31
                                   }
                                 },
                                 "expression": {
                                   "type": "UnaryExpression",
-                                  "start": 5173,
-                                  "end": 5200,
+                                  "start": 5218,
+                                  "end": 5245,
                                   "loc": {
                                     "start": {
-                                      "line": 186,
+                                      "line": 188,
                                       "column": 4
                                     },
                                     "end": {
-                                      "line": 186,
+                                      "line": 188,
                                       "column": 31
                                     }
                                   },
@@ -5373,58 +5373,58 @@
                                   "prefix": true,
                                   "argument": {
                                     "type": "MemberExpression",
-                                    "start": 5180,
-                                    "end": 5200,
+                                    "start": 5225,
+                                    "end": 5245,
                                     "loc": {
                                       "start": {
-                                        "line": 186,
+                                        "line": 188,
                                         "column": 11
                                       },
                                       "end": {
-                                        "line": 186,
+                                        "line": 188,
                                         "column": 31
                                       }
                                     },
                                     "object": {
                                       "type": "MemberExpression",
-                                      "start": 5180,
-                                      "end": 5189,
+                                      "start": 5225,
+                                      "end": 5234,
                                       "loc": {
                                         "start": {
-                                          "line": 186,
+                                          "line": 188,
                                           "column": 11
                                         },
                                         "end": {
-                                          "line": 186,
+                                          "line": 188,
                                           "column": 20
                                         }
                                       },
                                       "object": {
                                         "type": "ThisExpression",
-                                        "start": 5180,
-                                        "end": 5184,
+                                        "start": 5225,
+                                        "end": 5229,
                                         "loc": {
                                           "start": {
-                                            "line": 186,
+                                            "line": 188,
                                             "column": 11
                                           },
                                           "end": {
-                                            "line": 186,
+                                            "line": 188,
                                             "column": 15
                                           }
                                         }
                                       },
                                       "property": {
                                         "type": "Identifier",
-                                        "start": 5185,
-                                        "end": 5189,
+                                        "start": 5230,
+                                        "end": 5234,
                                         "loc": {
                                           "start": {
-                                            "line": 186,
+                                            "line": 188,
                                             "column": 16
                                           },
                                           "end": {
-                                            "line": 186,
+                                            "line": 188,
                                             "column": 20
                                           },
                                           "identifierName": "data"
@@ -5435,15 +5435,15 @@
                                     },
                                     "property": {
                                       "type": "Identifier",
-                                      "start": 5190,
-                                      "end": 5199,
+                                      "start": 5235,
+                                      "end": 5244,
                                       "loc": {
                                         "start": {
-                                          "line": 186,
+                                          "line": 188,
                                           "column": 21
                                         },
                                         "end": {
-                                          "line": 186,
+                                          "line": 188,
                                           "column": 30
                                         },
                                         "identifierName": "component"
@@ -5468,29 +5468,29 @@
                   },
                   {
                     "type": "ReturnStatement",
-                    "start": 5212,
-                    "end": 5223,
+                    "start": 5257,
+                    "end": 5268,
                     "loc": {
                       "start": {
-                        "line": 189,
+                        "line": 191,
                         "column": 2
                       },
                       "end": {
-                        "line": 189,
+                        "line": 191,
                         "column": 13
                       }
                     },
                     "argument": {
                       "type": "ThisExpression",
-                      "start": 5219,
-                      "end": 5223,
+                      "start": 5264,
+                      "end": 5268,
                       "loc": {
                         "start": {
-                          "line": 189,
+                          "line": 191,
                           "column": 9
                         },
                         "end": {
-                          "line": 189,
+                          "line": 191,
                           "column": 13
                         }
                       }
@@ -5504,15 +5504,15 @@
                 {
                   "type": "CommentBlock",
                   "value": "*\n\t * Removes a component from the entity - has no effect when it doesn't exist.\n\t * Can specify an onRemove() method in your component which gets called before it is removed.\n\t * If nothing is specified, then nothing will be removed. Use removeAll() to remove all components.\n\t *\n\t * @example\n\t * entity.remove('position')\n\t *\n\t * @param {...string} [components] - The component names to remove from the entity.\n\t *\n\t * @return {Object} The original entity that remove() was called on, so that operations can be chained.\n\t ",
-                  "start": 4367,
-                  "end": 4895,
+                  "start": 4412,
+                  "end": 4940,
                   "loc": {
                     "start": {
-                      "line": 162,
+                      "line": 164,
                       "column": 1
                     },
                     "end": {
-                      "line": 173,
+                      "line": 175,
                       "column": 4
                     }
                   }
@@ -5522,15 +5522,15 @@
                 {
                   "type": "CommentLine",
                   "value": " Remove all components",
-                  "start": 5229,
-                  "end": 5253,
+                  "start": 5274,
+                  "end": 5298,
                   "loc": {
                     "start": {
-                      "line": 192,
+                      "line": 194,
                       "column": 1
                     },
                     "end": {
-                      "line": 192,
+                      "line": 194,
                       "column": 25
                     }
                   }
@@ -5538,15 +5538,15 @@
                 {
                   "type": "CommentBlock",
                   "value": "*\n\t * Removes all components from the entity.\n\t *\n\t * @example\n\t * entity.removeAll()\n\t *\n\t * @return {Object} The original entity that removeAll() was called on, so that operations can be chained.\n\t ",
-                  "start": 5256,
-                  "end": 5460,
+                  "start": 5301,
+                  "end": 5505,
                   "loc": {
                     "start": {
-                      "line": 194,
+                      "line": 196,
                       "column": 1
                     },
                     "end": {
-                      "line": 201,
+                      "line": 203,
                       "column": 4
                     }
                   }
@@ -5555,15 +5555,15 @@
             },
             {
               "type": "ClassMethod",
-              "start": 5462,
-              "end": 5550,
+              "start": 5507,
+              "end": 5595,
               "loc": {
                 "start": {
-                  "line": 202,
+                  "line": 204,
                   "column": 1
                 },
                 "end": {
-                  "line": 206,
+                  "line": 208,
                   "column": 2
                 }
               },
@@ -5571,15 +5571,15 @@
               "computed": false,
               "key": {
                 "type": "Identifier",
-                "start": 5462,
-                "end": 5471,
+                "start": 5507,
+                "end": 5516,
                 "loc": {
                   "start": {
-                    "line": 202,
+                    "line": 204,
                     "column": 1
                   },
                   "end": {
-                    "line": 202,
+                    "line": 204,
                     "column": 10
                   },
                   "identifierName": "removeAll"
@@ -5595,87 +5595,87 @@
               "params": [],
               "body": {
                 "type": "BlockStatement",
-                "start": 5474,
-                "end": 5550,
+                "start": 5519,
+                "end": 5595,
                 "loc": {
                   "start": {
-                    "line": 202,
+                    "line": 204,
                     "column": 13
                   },
                   "end": {
-                    "line": 206,
+                    "line": 208,
                     "column": 2
                   }
                 },
                 "body": [
                   {
                     "type": "ExpressionStatement",
-                    "start": 5478,
-                    "end": 5516,
+                    "start": 5523,
+                    "end": 5561,
                     "loc": {
                       "start": {
-                        "line": 203,
+                        "line": 205,
                         "column": 2
                       },
                       "end": {
-                        "line": 203,
+                        "line": 205,
                         "column": 40
                       }
                     },
                     "expression": {
                       "type": "CallExpression",
-                      "start": 5478,
-                      "end": 5516,
+                      "start": 5523,
+                      "end": 5561,
                       "loc": {
                         "start": {
-                          "line": 203,
+                          "line": 205,
                           "column": 2
                         },
                         "end": {
-                          "line": 203,
+                          "line": 205,
                           "column": 40
                         }
                       },
                       "callee": {
                         "type": "MemberExpression",
-                        "start": 5478,
-                        "end": 5489,
+                        "start": 5523,
+                        "end": 5534,
                         "loc": {
                           "start": {
-                            "line": 203,
+                            "line": 205,
                             "column": 2
                           },
                           "end": {
-                            "line": 203,
+                            "line": 205,
                             "column": 13
                           }
                         },
                         "object": {
                           "type": "ThisExpression",
-                          "start": 5478,
-                          "end": 5482,
+                          "start": 5523,
+                          "end": 5527,
                           "loc": {
                             "start": {
-                              "line": 203,
+                              "line": 205,
                               "column": 2
                             },
                             "end": {
-                              "line": 203,
+                              "line": 205,
                               "column": 6
                             }
                           }
                         },
                         "property": {
                           "type": "Identifier",
-                          "start": 5483,
-                          "end": 5489,
+                          "start": 5528,
+                          "end": 5534,
                           "loc": {
                             "start": {
-                              "line": 203,
+                              "line": 205,
                               "column": 7
                             },
                             "end": {
-                              "line": 203,
+                              "line": 205,
                               "column": 13
                             },
                             "identifierName": "remove"
@@ -5687,57 +5687,57 @@
                       "arguments": [
                         {
                           "type": "SpreadElement",
-                          "start": 5490,
-                          "end": 5515,
+                          "start": 5535,
+                          "end": 5560,
                           "loc": {
                             "start": {
-                              "line": 203,
+                              "line": 205,
                               "column": 14
                             },
                             "end": {
-                              "line": 203,
+                              "line": 205,
                               "column": 39
                             }
                           },
                           "argument": {
                             "type": "CallExpression",
-                            "start": 5493,
-                            "end": 5515,
+                            "start": 5538,
+                            "end": 5560,
                             "loc": {
                               "start": {
-                                "line": 203,
+                                "line": 205,
                                 "column": 17
                               },
                               "end": {
-                                "line": 203,
+                                "line": 205,
                                 "column": 39
                               }
                             },
                             "callee": {
                               "type": "MemberExpression",
-                              "start": 5493,
-                              "end": 5504,
+                              "start": 5538,
+                              "end": 5549,
                               "loc": {
                                 "start": {
-                                  "line": 203,
+                                  "line": 205,
                                   "column": 17
                                 },
                                 "end": {
-                                  "line": 203,
+                                  "line": 205,
                                   "column": 28
                                 }
                               },
                               "object": {
                                 "type": "Identifier",
-                                "start": 5493,
-                                "end": 5499,
+                                "start": 5538,
+                                "end": 5544,
                                 "loc": {
                                   "start": {
-                                    "line": 203,
+                                    "line": 205,
                                     "column": 17
                                   },
                                   "end": {
-                                    "line": 203,
+                                    "line": 205,
                                     "column": 23
                                   },
                                   "identifierName": "Object"
@@ -5746,15 +5746,15 @@
                               },
                               "property": {
                                 "type": "Identifier",
-                                "start": 5500,
-                                "end": 5504,
+                                "start": 5545,
+                                "end": 5549,
                                 "loc": {
                                   "start": {
-                                    "line": 203,
+                                    "line": 205,
                                     "column": 24
                                   },
                                   "end": {
-                                    "line": 203,
+                                    "line": 205,
                                     "column": 28
                                   },
                                   "identifierName": "keys"
@@ -5766,44 +5766,44 @@
                             "arguments": [
                               {
                                 "type": "MemberExpression",
-                                "start": 5505,
-                                "end": 5514,
+                                "start": 5550,
+                                "end": 5559,
                                 "loc": {
                                   "start": {
-                                    "line": 203,
+                                    "line": 205,
                                     "column": 29
                                   },
                                   "end": {
-                                    "line": 203,
+                                    "line": 205,
                                     "column": 38
                                   }
                                 },
                                 "object": {
                                   "type": "ThisExpression",
-                                  "start": 5505,
-                                  "end": 5509,
+                                  "start": 5550,
+                                  "end": 5554,
                                   "loc": {
                                     "start": {
-                                      "line": 203,
+                                      "line": 205,
                                       "column": 29
                                     },
                                     "end": {
-                                      "line": 203,
+                                      "line": 205,
                                       "column": 33
                                     }
                                   }
                                 },
                                 "property": {
                                   "type": "Identifier",
-                                  "start": 5510,
-                                  "end": 5514,
+                                  "start": 5555,
+                                  "end": 5559,
                                   "loc": {
                                     "start": {
-                                      "line": 203,
+                                      "line": 205,
                                       "column": 34
                                     },
                                     "end": {
-                                      "line": 203,
+                                      "line": 205,
                                       "column": 38
                                     },
                                     "identifierName": "data"
@@ -5820,73 +5820,73 @@
                   },
                   {
                     "type": "ExpressionStatement",
-                    "start": 5519,
-                    "end": 5533,
+                    "start": 5564,
+                    "end": 5578,
                     "loc": {
                       "start": {
-                        "line": 204,
+                        "line": 206,
                         "column": 2
                       },
                       "end": {
-                        "line": 204,
+                        "line": 206,
                         "column": 16
                       }
                     },
                     "expression": {
                       "type": "AssignmentExpression",
-                      "start": 5519,
-                      "end": 5533,
+                      "start": 5564,
+                      "end": 5578,
                       "loc": {
                         "start": {
-                          "line": 204,
+                          "line": 206,
                           "column": 2
                         },
                         "end": {
-                          "line": 204,
+                          "line": 206,
                           "column": 16
                         }
                       },
                       "operator": "=",
                       "left": {
                         "type": "MemberExpression",
-                        "start": 5519,
-                        "end": 5528,
+                        "start": 5564,
+                        "end": 5573,
                         "loc": {
                           "start": {
-                            "line": 204,
+                            "line": 206,
                             "column": 2
                           },
                           "end": {
-                            "line": 204,
+                            "line": 206,
                             "column": 11
                           }
                         },
                         "object": {
                           "type": "ThisExpression",
-                          "start": 5519,
-                          "end": 5523,
+                          "start": 5564,
+                          "end": 5568,
                           "loc": {
                             "start": {
-                              "line": 204,
+                              "line": 206,
                               "column": 2
                             },
                             "end": {
-                              "line": 204,
+                              "line": 206,
                               "column": 6
                             }
                           }
                         },
                         "property": {
                           "type": "Identifier",
-                          "start": 5524,
-                          "end": 5528,
+                          "start": 5569,
+                          "end": 5573,
                           "loc": {
                             "start": {
-                              "line": 204,
+                              "line": 206,
                               "column": 7
                             },
                             "end": {
-                              "line": 204,
+                              "line": 206,
                               "column": 11
                             },
                             "identifierName": "data"
@@ -5897,15 +5897,15 @@
                       },
                       "right": {
                         "type": "ObjectExpression",
-                        "start": 5531,
-                        "end": 5533,
+                        "start": 5576,
+                        "end": 5578,
                         "loc": {
                           "start": {
-                            "line": 204,
+                            "line": 206,
                             "column": 14
                           },
                           "end": {
-                            "line": 204,
+                            "line": 206,
                             "column": 16
                           }
                         },
@@ -5915,29 +5915,29 @@
                   },
                   {
                     "type": "ReturnStatement",
-                    "start": 5536,
-                    "end": 5547,
+                    "start": 5581,
+                    "end": 5592,
                     "loc": {
                       "start": {
-                        "line": 205,
+                        "line": 207,
                         "column": 2
                       },
                       "end": {
-                        "line": 205,
+                        "line": 207,
                         "column": 13
                       }
                     },
                     "argument": {
                       "type": "ThisExpression",
-                      "start": 5543,
-                      "end": 5547,
+                      "start": 5588,
+                      "end": 5592,
                       "loc": {
                         "start": {
-                          "line": 205,
+                          "line": 207,
                           "column": 9
                         },
                         "end": {
-                          "line": 205,
+                          "line": 207,
                           "column": 13
                         }
                       }
@@ -5951,15 +5951,15 @@
                 {
                   "type": "CommentLine",
                   "value": " Remove all components",
-                  "start": 5229,
-                  "end": 5253,
+                  "start": 5274,
+                  "end": 5298,
                   "loc": {
                     "start": {
-                      "line": 192,
+                      "line": 194,
                       "column": 1
                     },
                     "end": {
-                      "line": 192,
+                      "line": 194,
                       "column": 25
                     }
                   }
@@ -5967,15 +5967,15 @@
                 {
                   "type": "CommentBlock",
                   "value": "*\n\t * Removes all components from the entity.\n\t *\n\t * @example\n\t * entity.removeAll()\n\t *\n\t * @return {Object} The original entity that removeAll() was called on, so that operations can be chained.\n\t ",
-                  "start": 5256,
-                  "end": 5460,
+                  "start": 5301,
+                  "end": 5505,
                   "loc": {
                     "start": {
-                      "line": 194,
+                      "line": 196,
                       "column": 1
                     },
                     "end": {
-                      "line": 201,
+                      "line": 203,
                       "column": 4
                     }
                   }
@@ -5985,15 +5985,15 @@
                 {
                   "type": "CommentBlock",
                   "value": "*\n\t * Remove this entity and all of its components from the world. After an entity is destroyed, the object should be discarded,\n\t * and it is recommended to avoid re-using it.\n\t *\n\t * @example\n\t * entity.destroy()\n\t ",
-                  "start": 5553,
-                  "end": 5774,
+                  "start": 5598,
+                  "end": 5819,
                   "loc": {
                     "start": {
-                      "line": 208,
+                      "line": 210,
                       "column": 1
                     },
                     "end": {
-                      "line": 214,
+                      "line": 216,
                       "column": 4
                     }
                   }
@@ -6002,15 +6002,15 @@
             },
             {
               "type": "ClassMethod",
-              "start": 5776,
-              "end": 6013,
+              "start": 5821,
+              "end": 6058,
               "loc": {
                 "start": {
-                  "line": 215,
+                  "line": 217,
                   "column": 1
                 },
                 "end": {
-                  "line": 226,
+                  "line": 228,
                   "column": 2
                 }
               },
@@ -6018,15 +6018,15 @@
               "computed": false,
               "key": {
                 "type": "Identifier",
-                "start": 5776,
-                "end": 5783,
+                "start": 5821,
+                "end": 5828,
                 "loc": {
                   "start": {
-                    "line": 215,
+                    "line": 217,
                     "column": 1
                   },
                   "end": {
-                    "line": 215,
+                    "line": 217,
                     "column": 8
                   },
                   "identifierName": "destroy"
@@ -6042,87 +6042,87 @@
               "params": [],
               "body": {
                 "type": "BlockStatement",
-                "start": 5786,
-                "end": 6013,
+                "start": 5831,
+                "end": 6058,
                 "loc": {
                   "start": {
-                    "line": 215,
+                    "line": 217,
                     "column": 11
                   },
                   "end": {
-                    "line": 226,
+                    "line": 228,
                     "column": 2
                   }
                 },
                 "body": [
                   {
                     "type": "ExpressionStatement",
-                    "start": 5790,
-                    "end": 5806,
+                    "start": 5835,
+                    "end": 5851,
                     "loc": {
                       "start": {
-                        "line": 216,
+                        "line": 218,
                         "column": 2
                       },
                       "end": {
-                        "line": 216,
+                        "line": 218,
                         "column": 18
                       }
                     },
                     "expression": {
                       "type": "CallExpression",
-                      "start": 5790,
-                      "end": 5806,
+                      "start": 5835,
+                      "end": 5851,
                       "loc": {
                         "start": {
-                          "line": 216,
+                          "line": 218,
                           "column": 2
                         },
                         "end": {
-                          "line": 216,
+                          "line": 218,
                           "column": 18
                         }
                       },
                       "callee": {
                         "type": "MemberExpression",
-                        "start": 5790,
-                        "end": 5804,
+                        "start": 5835,
+                        "end": 5849,
                         "loc": {
                           "start": {
-                            "line": 216,
+                            "line": 218,
                             "column": 2
                           },
                           "end": {
-                            "line": 216,
+                            "line": 218,
                             "column": 16
                           }
                         },
                         "object": {
                           "type": "ThisExpression",
-                          "start": 5790,
-                          "end": 5794,
+                          "start": 5835,
+                          "end": 5839,
                           "loc": {
                             "start": {
-                              "line": 216,
+                              "line": 218,
                               "column": 2
                             },
                             "end": {
-                              "line": 216,
+                              "line": 218,
                               "column": 6
                             }
                           }
                         },
                         "property": {
                           "type": "Identifier",
-                          "start": 5795,
-                          "end": 5804,
+                          "start": 5840,
+                          "end": 5849,
                           "loc": {
                             "start": {
-                              "line": 216,
+                              "line": 218,
                               "column": 7
                             },
                             "end": {
-                              "line": 216,
+                              "line": 218,
                               "column": 16
                             },
                             "identifierName": "removeAll"
@@ -6136,72 +6136,72 @@
                   },
                   {
                     "type": "IfStatement",
-                    "start": 5810,
-                    "end": 6010,
+                    "start": 5855,
+                    "end": 6055,
                     "loc": {
                       "start": {
-                        "line": 218,
+                        "line": 220,
                         "column": 2
                       },
                       "end": {
-                        "line": 225,
+                        "line": 227,
                         "column": 3
                       }
                     },
                     "test": {
                       "type": "CallExpression",
-                      "start": 5814,
-                      "end": 5826,
+                      "start": 5859,
+                      "end": 5871,
                       "loc": {
                         "start": {
-                          "line": 218,
+                          "line": 220,
                           "column": 6
                         },
                         "end": {
-                          "line": 218,
+                          "line": 220,
                           "column": 18
                         }
                       },
                       "callee": {
                         "type": "MemberExpression",
-                        "start": 5814,
-                        "end": 5824,
+                        "start": 5859,
+                        "end": 5869,
                         "loc": {
                           "start": {
-                            "line": 218,
+                            "line": 220,
                             "column": 6
                           },
                           "end": {
-                            "line": 218,
+                            "line": 220,
                             "column": 16
                           }
                         },
                         "object": {
                           "type": "ThisExpression",
-                          "start": 5814,
-                          "end": 5818,
+                          "start": 5859,
+                          "end": 5863,
                           "loc": {
                             "start": {
-                              "line": 218,
+                              "line": 220,
                               "column": 6
                             },
                             "end": {
-                              "line": 218,
+                              "line": 220,
                               "column": 10
                             }
                           }
                         },
                         "property": {
                           "type": "Identifier",
-                          "start": 5819,
-                          "end": 5824,
+                          "start": 5864,
+                          "end": 5869,
                           "loc": {
                             "start": {
-                              "line": 218,
+                              "line": 220,
                               "column": 11
                             },
                             "end": {
-                              "line": 218,
+                              "line": 220,
                               "column": 16
                             },
                             "identifierName": "valid"
@@ -6214,100 +6214,100 @@
                     },
                     "consequent": {
                       "type": "BlockStatement",
-                      "start": 5828,
-                      "end": 6010,
+                      "start": 5873,
+                      "end": 6055,
                       "loc": {
                         "start": {
-                          "line": 218,
+                          "line": 220,
                           "column": 20
                         },
                         "end": {
-                          "line": 225,
+                          "line": 227,
                           "column": 3
                         }
                       },
                       "body": [
                         {
                           "type": "ExpressionStatement",
-                          "start": 5888,
-                          "end": 5917,
+                          "start": 5933,
+                          "end": 5962,
                           "loc": {
                             "start": {
-                              "line": 220,
+                              "line": 222,
                               "column": 3
                             },
                             "end": {
-                              "line": 220,
+                              "line": 222,
                               "column": 32
                             }
                           },
                           "expression": {
                             "type": "CallExpression",
-                            "start": 5888,
-                            "end": 5917,
+                            "start": 5933,
+                            "end": 5962,
                             "loc": {
                               "start": {
-                                "line": 220,
+                                "line": 222,
                                 "column": 3
                               },
                               "end": {
-                                "line": 220,
+                                "line": 222,
                                 "column": 32
                               }
                             },
                             "callee": {
                               "type": "MemberExpression",
-                              "start": 5888,
-                              "end": 5911,
+                              "start": 5933,
+                              "end": 5956,
                               "loc": {
                                 "start": {
-                                  "line": 220,
+                                  "line": 222,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 220,
+                                  "line": 222,
                                   "column": 26
                                 }
                               },
                               "object": {
                                 "type": "MemberExpression",
-                                "start": 5888,
-                                "end": 5904,
+                                "start": 5933,
+                                "end": 5949,
                                 "loc": {
                                   "start": {
-                                    "line": 220,
+                                    "line": 222,
                                     "column": 3
                                   },
                                   "end": {
-                                    "line": 220,
+                                    "line": 222,
                                     "column": 19
                                   }
                                 },
                                 "object": {
                                   "type": "MemberExpression",
-                                  "start": 5888,
-                                  "end": 5898,
+                                  "start": 5933,
+                                  "end": 5943,
                                   "loc": {
                                     "start": {
-                                      "line": 220,
+                                      "line": 222,
                                       "column": 3
                                     },
                                     "end": {
-                                      "line": 220,
+                                      "line": 222,
                                       "column": 13
                                     }
                                   },
                                   "object": {
                                     "type": "ThisExpression",
-                                    "start": 5888,
-                                    "end": 5892,
+                                    "start": 5933,
+                                    "end": 5937,
                                     "loc": {
                                       "start": {
-                                        "line": 220,
+                                        "line": 222,
                                         "column": 3
                                       },
                                       "end": {
-                                        "line": 220,
+                                        "line": 222,
                                         "column": 7
                                       }
                                     },
@@ -6315,15 +6315,15 @@
                                   },
                                   "property": {
                                     "type": "Identifier",
-                                    "start": 5893,
-                                    "end": 5898,
+                                    "start": 5938,
+                                    "end": 5943,
                                     "loc": {
                                       "start": {
-                                        "line": 220,
+                                        "line": 222,
                                         "column": 8
                                       },
                                       "end": {
-                                        "line": 220,
+                                        "line": 222,
                                         "column": 13
                                       },
                                       "identifierName": "world"
@@ -6335,15 +6335,15 @@
                                 },
                                 "property": {
                                   "type": "Identifier",
-                                  "start": 5899,
-                                  "end": 5904,
+                                  "start": 5944,
+                                  "end": 5949,
                                   "loc": {
                                     "start": {
-                                      "line": 220,
+                                      "line": 222,
                                       "column": 14
                                     },
                                     "end": {
-                                      "line": 220,
+                                      "line": 222,
                                       "column": 19
                                     },
                                     "identifierName": "index"
@@ -6355,15 +6355,15 @@
                               },
                               "property": {
                                 "type": "Identifier",
-                                "start": 5905,
-                                "end": 5911,
+                                "start": 5950,
+                                "end": 5956,
                                 "loc": {
                                   "start": {
-                                    "line": 220,
+                                    "line": 222,
                                     "column": 20
                                   },
                                   "end": {
-                                    "line": 220,
+                                    "line": 222,
                                     "column": 26
                                   },
                                   "identifierName": "remove"
@@ -6376,15 +6376,15 @@
                             "arguments": [
                               {
                                 "type": "ThisExpression",
-                                "start": 5912,
-                                "end": 5916,
+                                "start": 5957,
+                                "end": 5961,
                                 "loc": {
                                   "start": {
-                                    "line": 220,
+                                    "line": 222,
                                     "column": 27
                                   },
                                   "end": {
-                                    "line": 220,
+                                    "line": 222,
                                     "column": 31
                                   }
                                 }
@@ -6397,15 +6397,15 @@
                             {
                               "type": "CommentLine",
                               "value": " Remove from the index, to update match all index",
-                              "start": 5833,
-                              "end": 5884,
+                              "start": 5878,
+                              "end": 5929,
                               "loc": {
                                 "start": {
-                                  "line": 219,
+                                  "line": 221,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 219,
+                                  "line": 221,
                                   "column": 54
                                 }
                               }
@@ -6415,15 +6415,15 @@
                             {
                               "type": "CommentLine",
                               "value": " Remove from world",
-                              "start": 5922,
-                              "end": 5942,
+                              "start": 5967,
+                              "end": 5987,
                               "loc": {
                                 "start": {
-                                  "line": 222,
+                                  "line": 224,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 222,
+                                  "line": 224,
                                   "column": 23
                                 }
                               }
@@ -6432,85 +6432,85 @@
                         },
                         {
                           "type": "ExpressionStatement",
-                          "start": 5946,
-                          "end": 5982,
+                          "start": 5991,
+                          "end": 6027,
                           "loc": {
                             "start": {
-                              "line": 223,
+                              "line": 225,
                               "column": 3
                             },
                             "end": {
-                              "line": 223,
+                              "line": 225,
                               "column": 39
                             }
                           },
                           "expression": {
                             "type": "CallExpression",
-                            "start": 5946,
-                            "end": 5982,
+                            "start": 5991,
+                            "end": 6027,
                             "loc": {
                               "start": {
-                                "line": 223,
+                                "line": 225,
                                 "column": 3
                               },
                               "end": {
-                                "line": 223,
+                                "line": 225,
                                 "column": 39
                               }
                             },
                             "callee": {
                               "type": "MemberExpression",
-                              "start": 5946,
-                              "end": 5972,
+                              "start": 5991,
+                              "end": 6017,
                               "loc": {
                                 "start": {
-                                  "line": 223,
+                                  "line": 225,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 223,
+                                  "line": 225,
                                   "column": 29
                                 }
                               },
                               "object": {
                                 "type": "MemberExpression",
-                                "start": 5946,
-                                "end": 5965,
+                                "start": 5991,
+                                "end": 6010,
                                 "loc": {
                                   "start": {
-                                    "line": 223,
+                                    "line": 225,
                                     "column": 3
                                   },
                                   "end": {
-                                    "line": 223,
+                                    "line": 225,
                                     "column": 22
                                   }
                                 },
                                 "object": {
                                   "type": "MemberExpression",
-                                  "start": 5946,
-                                  "end": 5956,
+                                  "start": 5991,
+                                  "end": 6001,
                                   "loc": {
                                     "start": {
-                                      "line": 223,
+                                      "line": 225,
                                       "column": 3
                                     },
                                     "end": {
-                                      "line": 223,
+                                      "line": 225,
                                       "column": 13
                                     }
                                   },
                                   "object": {
                                     "type": "ThisExpression",
-                                    "start": 5946,
-                                    "end": 5950,
+                                    "start": 5991,
+                                    "end": 5995,
                                     "loc": {
                                       "start": {
-                                        "line": 223,
+                                        "line": 225,
                                         "column": 3
                                       },
                                       "end": {
-                                        "line": 223,
+                                        "line": 225,
                                         "column": 7
                                       }
                                     },
@@ -6518,15 +6518,15 @@
                                   },
                                   "property": {
                                     "type": "Identifier",
-                                    "start": 5951,
-                                    "end": 5956,
+                                    "start": 5996,
+                                    "end": 6001,
                                     "loc": {
                                       "start": {
-                                        "line": 223,
+                                        "line": 225,
                                         "column": 8
                                       },
                                       "end": {
-                                        "line": 223,
+                                        "line": 225,
                                         "column": 13
                                       },
                                       "identifierName": "world"
@@ -6538,15 +6538,15 @@
                                 },
                                 "property": {
                                   "type": "Identifier",
-                                  "start": 5957,
-                                  "end": 5965,
+                                  "start": 6002,
+                                  "end": 6010,
                                   "loc": {
                                     "start": {
-                                      "line": 223,
+                                      "line": 225,
                                       "column": 14
                                     },
                                     "end": {
-                                      "line": 223,
+                                      "line": 225,
                                       "column": 22
                                     },
                                     "identifierName": "entities"
@@ -6558,15 +6558,15 @@
                               },
                               "property": {
                                 "type": "Identifier",
-                                "start": 5966,
-                                "end": 5972,
+                                "start": 6011,
+                                "end": 6017,
                                 "loc": {
                                   "start": {
-                                    "line": 223,
+                                    "line": 225,
                                     "column": 23
                                   },
                                   "end": {
-                                    "line": 223,
+                                    "line": 225,
                                     "column": 29
                                   },
                                   "identifierName": "delete"
@@ -6579,44 +6579,44 @@
                             "arguments": [
                               {
                                 "type": "MemberExpression",
-                                "start": 5973,
-                                "end": 5981,
+                                "start": 6018,
+                                "end": 6026,
                                 "loc": {
                                   "start": {
-                                    "line": 223,
+                                    "line": 225,
                                     "column": 30
                                   },
                                   "end": {
-                                    "line": 223,
+                                    "line": 225,
                                     "column": 38
                                   }
                                 },
                                 "object": {
                                   "type": "ThisExpression",
-                                  "start": 5973,
-                                  "end": 5977,
+                                  "start": 6018,
+                                  "end": 6022,
                                   "loc": {
                                     "start": {
-                                      "line": 223,
+                                      "line": 225,
                                       "column": 30
                                     },
                                     "end": {
-                                      "line": 223,
+                                      "line": 225,
                                       "column": 34
                                     }
                                   }
                                 },
                                 "property": {
                                   "type": "Identifier",
-                                  "start": 5978,
-                                  "end": 5981,
+                                  "start": 6023,
+                                  "end": 6026,
                                   "loc": {
                                     "start": {
-                                      "line": 223,
+                                      "line": 225,
                                       "column": 35
                                     },
                                     "end": {
-                                      "line": 223,
+                                      "line": 225,
                                       "column": 38
                                     },
                                     "identifierName": "_id"
@@ -6632,15 +6632,15 @@
                             {
                               "type": "CommentLine",
                               "value": " Remove from world",
-                              "start": 5922,
-                              "end": 5942,
+                              "start": 5967,
+                              "end": 5987,
                               "loc": {
                                 "start": {
-                                  "line": 222,
+                                  "line": 224,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 222,
+                                  "line": 224,
                                   "column": 23
                                 }
                               }
@@ -6649,73 +6649,73 @@
                         },
                         {
                           "type": "ExpressionStatement",
-                          "start": 5986,
-                          "end": 6006,
+                          "start": 6031,
+                          "end": 6051,
                           "loc": {
                             "start": {
-                              "line": 224,
+                              "line": 226,
                               "column": 3
                             },
                             "end": {
-                              "line": 224,
+                              "line": 226,
                               "column": 23
                             }
                           },
                           "expression": {
                             "type": "AssignmentExpression",
-                            "start": 5986,
-                            "end": 6006,
+                            "start": 6031,
+                            "end": 6051,
                             "loc": {
                               "start": {
-                                "line": 224,
+                                "line": 226,
                                 "column": 3
                               },
                               "end": {
-                                "line": 224,
+                                "line": 226,
                                 "column": 23
                               }
                             },
                             "operator": "=",
                             "left": {
                               "type": "MemberExpression",
-                              "start": 5986,
-                              "end": 5994,
+                              "start": 6031,
+                              "end": 6039,
                               "loc": {
                                 "start": {
-                                  "line": 224,
+                                  "line": 226,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 224,
+                                  "line": 226,
                                   "column": 11
                                 }
                               },
                               "object": {
                                 "type": "ThisExpression",
-                                "start": 5986,
-                                "end": 5990,
+                                "start": 6031,
+                                "end": 6035,
                                 "loc": {
                                   "start": {
-                                    "line": 224,
+                                    "line": 226,
                                     "column": 3
                                   },
                                   "end": {
-                                    "line": 224,
+                                    "line": 226,
                                     "column": 7
                                   }
                                 }
                               },
                               "property": {
                                 "type": "Identifier",
-                                "start": 5991,
-                                "end": 5994,
+                                "start": 6036,
+                                "end": 6039,
                                 "loc": {
                                   "start": {
-                                    "line": 224,
+                                    "line": 226,
                                     "column": 8
                                   },
                                   "end": {
-                                    "line": 224,
+                                    "line": 226,
                                     "column": 11
                                   },
                                   "identifierName": "_id"
@@ -6726,15 +6726,15 @@
                             },
                             "right": {
                               "type": "Identifier",
-                              "start": 5997,
-                              "end": 6006,
+                              "start": 6042,
+                              "end": 6051,
                               "loc": {
                                 "start": {
-                                  "line": 224,
+                                  "line": 226,
                                   "column": 14
                                 },
                                 "end": {
-                                  "line": 224,
+                                  "line": 226,
                                   "column": 23
                                 },
                                 "identifierName": "undefined"
@@ -6756,15 +6756,15 @@
                 {
                   "type": "CommentBlock",
                   "value": "*\n\t * Remove this entity and all of its components from the world. After an entity is destroyed, the object should be discarded,\n\t * and it is recommended to avoid re-using it.\n\t *\n\t * @example\n\t * entity.destroy()\n\t ",
-                  "start": 5553,
-                  "end": 5774,
+                  "start": 5598,
+                  "end": 5819,
                   "loc": {
                     "start": {
-                      "line": 208,
+                      "line": 210,
                       "column": 1
                     },
                     "end": {
-                      "line": 214,
+                      "line": 216,
                       "column": 4
                     }
                   }
@@ -6774,15 +6774,15 @@
                 {
                   "type": "CommentBlock",
                   "value": "*\n\t * Returns true if this is a valid, existing, and usable entity, which is attached to a world.\n\t *\n\t * @example\n\t * if (entity.valid()) {...}\n\t *\n\t * @return {boolean} true or false\n\t ",
-                  "start": 6016,
-                  "end": 6207,
+                  "start": 6061,
+                  "end": 6252,
                   "loc": {
                     "start": {
-                      "line": 228,
+                      "line": 230,
                       "column": 1
                     },
                     "end": {
-                      "line": 235,
+                      "line": 237,
                       "column": 4
                     }
                   }
@@ -6791,15 +6791,15 @@
             },
             {
               "type": "ClassMethod",
-              "start": 6209,
-              "end": 6479,
+              "start": 6254,
+              "end": 6524,
               "loc": {
                 "start": {
-                  "line": 236,
+                  "line": 238,
                   "column": 1
                 },
                 "end": {
-                  "line": 240,
+                  "line": 242,
                   "column": 2
                 }
               },
@@ -6807,15 +6807,15 @@
               "computed": false,
               "key": {
                 "type": "Identifier",
-                "start": 6209,
-                "end": 6214,
+                "start": 6254,
+                "end": 6259,
                 "loc": {
                   "start": {
-                    "line": 236,
+                    "line": 238,
                     "column": 1
                   },
                   "end": {
-                    "line": 236,
+                    "line": 238,
                     "column": 6
                   },
                   "identifierName": "valid"
@@ -6831,72 +6831,72 @@
               "params": [],
               "body": {
                 "type": "BlockStatement",
-                "start": 6217,
-                "end": 6479,
+                "start": 6262,
+                "end": 6524,
                 "loc": {
                   "start": {
-                    "line": 236,
+                    "line": 238,
                     "column": 9
                   },
                   "end": {
-                    "line": 240,
+                    "line": 242,
                     "column": 2
                   }
                 },
                 "body": [
                   {
                     "type": "ReturnStatement",
-                    "start": 6433,
-                    "end": 6476,
+                    "start": 6478,
+                    "end": 6521,
                     "loc": {
                       "start": {
-                        "line": 239,
+                        "line": 241,
                         "column": 2
                       },
                       "end": {
-                        "line": 239,
+                        "line": 241,
                         "column": 45
                       }
                     },
                     "argument": {
                       "type": "LogicalExpression",
-                      "start": 6440,
-                      "end": 6476,
+                      "start": 6485,
+                      "end": 6521,
                       "loc": {
                         "start": {
-                          "line": 239,
+                          "line": 241,
                           "column": 9
                         },
                         "end": {
-                          "line": 239,
+                          "line": 241,
                           "column": 45
                         }
                       },
                       "left": {
                         "type": "MemberExpression",
-                        "start": 6440,
-                        "end": 6450,
+                        "start": 6485,
+                        "end": 6495,
                         "loc": {
                           "start": {
-                            "line": 239,
+                            "line": 241,
                             "column": 9
                           },
                           "end": {
-                            "line": 239,
+                            "line": 241,
                             "column": 19
                           }
                         },
                         "object": {
                           "type": "ThisExpression",
-                          "start": 6440,
-                          "end": 6444,
+                          "start": 6485,
+                          "end": 6489,
                           "loc": {
                             "start": {
-                              "line": 239,
+                              "line": 241,
                               "column": 9
                             },
                             "end": {
-                              "line": 239,
+                              "line": 241,
                               "column": 13
                             }
                           },
@@ -6904,15 +6904,15 @@
                         },
                         "property": {
                           "type": "Identifier",
-                          "start": 6445,
-                          "end": 6450,
+                          "start": 6490,
+                          "end": 6495,
                           "loc": {
                             "start": {
-                              "line": 239,
+                              "line": 241,
                               "column": 14
                             },
                             "end": {
-                              "line": 239,
+                              "line": 241,
                               "column": 19
                             },
                             "identifierName": "world"
@@ -6925,58 +6925,58 @@
                       "operator": "&&",
                       "right": {
                         "type": "BinaryExpression",
-                        "start": 6454,
-                        "end": 6476,
+                        "start": 6499,
+                        "end": 6521,
                         "loc": {
                           "start": {
-                            "line": 239,
+                            "line": 241,
                             "column": 23
                           },
                           "end": {
-                            "line": 239,
+                            "line": 241,
                             "column": 45
                           }
                         },
                         "left": {
                           "type": "MemberExpression",
-                          "start": 6454,
-                          "end": 6462,
+                          "start": 6499,
+                          "end": 6507,
                           "loc": {
                             "start": {
-                              "line": 239,
+                              "line": 241,
                               "column": 23
                             },
                             "end": {
-                              "line": 239,
+                              "line": 241,
                               "column": 31
                             }
                           },
                           "object": {
                             "type": "ThisExpression",
-                            "start": 6454,
-                            "end": 6458,
+                            "start": 6499,
+                            "end": 6503,
                             "loc": {
                               "start": {
-                                "line": 239,
+                                "line": 241,
                                 "column": 23
                               },
                               "end": {
-                                "line": 239,
+                                "line": 241,
                                 "column": 27
                               }
                             }
                           },
                           "property": {
                             "type": "Identifier",
-                            "start": 6459,
-                            "end": 6462,
+                            "start": 6504,
+                            "end": 6507,
                             "loc": {
                               "start": {
-                                "line": 239,
+                                "line": 241,
                                 "column": 28
                               },
                               "end": {
-                                "line": 239,
+                                "line": 241,
                                 "column": 31
                               },
                               "identifierName": "_id"
@@ -6988,15 +6988,15 @@
                         "operator": "!==",
                         "right": {
                           "type": "Identifier",
-                          "start": 6467,
-                          "end": 6476,
+                          "start": 6512,
+                          "end": 6521,
                           "loc": {
                             "start": {
-                              "line": 239,
+                              "line": 241,
                               "column": 36
                             },
                             "end": {
-                              "line": 239,
+                              "line": 241,
                               "column": 45
                             },
                             "identifierName": "undefined"
@@ -7010,15 +7010,15 @@
                       {
                         "type": "CommentLine",
                         "value": " Note: No need to actually look in the world for the ID, if entities are only ever copied by reference.",
-                        "start": 6221,
-                        "end": 6326,
+                        "start": 6266,
+                        "end": 6371,
                         "loc": {
                           "start": {
-                            "line": 237,
+                            "line": 239,
                             "column": 2
                           },
                           "end": {
-                            "line": 237,
+                            "line": 239,
                             "column": 107
                           }
                         }
@@ -7026,15 +7026,15 @@
                       {
                         "type": "CommentLine",
                         "value": " If entities are ever deep/shallow copied, this function will need to check this to be more robust.",
-                        "start": 6329,
-                        "end": 6430,
+                        "start": 6374,
+                        "end": 6475,
                         "loc": {
                           "start": {
-                            "line": 238,
+                            "line": 240,
                             "column": 2
                           },
                           "end": {
-                            "line": 238,
+                            "line": 240,
                             "column": 103
                           }
                         }
@@ -7049,15 +7049,15 @@
                 {
                   "type": "CommentBlock",
                   "value": "*\n\t * Returns true if this is a valid, existing, and usable entity, which is attached to a world.\n\t *\n\t * @example\n\t * if (entity.valid()) {...}\n\t *\n\t * @return {boolean} true or false\n\t ",
-                  "start": 6016,
-                  "end": 6207,
+                  "start": 6061,
+                  "end": 6252,
                   "loc": {
                     "start": {
-                      "line": 228,
+                      "line": 230,
                       "column": 1
                     },
                     "end": {
-                      "line": 235,
+                      "line": 237,
                       "column": 4
                     }
                   }
@@ -7067,15 +7067,15 @@
                 {
                   "type": "CommentBlock",
                   "value": "*\n\t * Returns unique entity ID as a string.\n\t *\n\t * @example\n\t * let entityId = entity.toString()\n\t *\n\t * @return {string} String representation of the entity ID.\n\t ",
-                  "start": 6482,
-                  "end": 6651,
+                  "start": 6527,
+                  "end": 6696,
                   "loc": {
                     "start": {
-                      "line": 242,
+                      "line": 244,
                       "column": 1
                     },
                     "end": {
-                      "line": 249,
+                      "line": 251,
                       "column": 4
                     }
                   }
@@ -7084,15 +7084,15 @@
             },
             {
               "type": "ClassMethod",
-              "start": 6653,
-              "end": 6694,
+              "start": 6698,
+              "end": 6739,
               "loc": {
                 "start": {
-                  "line": 250,
+                  "line": 252,
                   "column": 1
                 },
                 "end": {
-                  "line": 252,
+                  "line": 254,
                   "column": 2
                 }
               },
@@ -7100,15 +7100,15 @@
               "computed": false,
               "key": {
                 "type": "Identifier",
-                "start": 6653,
-                "end": 6661,
+                "start": 6698,
+                "end": 6706,
                 "loc": {
                   "start": {
-                    "line": 250,
+                    "line": 252,
                     "column": 1
                   },
                   "end": {
-                    "line": 250,
+                    "line": 252,
                     "column": 9
                   },
                   "identifierName": "toString"
@@ -7124,58 +7124,58 @@
               "params": [],
               "body": {
                 "type": "BlockStatement",
-                "start": 6664,
-                "end": 6694,
+                "start": 6709,
+                "end": 6739,
                 "loc": {
                   "start": {
-                    "line": 250,
+                    "line": 252,
                     "column": 12
                   },
                   "end": {
-                    "line": 252,
+                    "line": 254,
                     "column": 2
                   }
                 },
                 "body": [
                   {
                     "type": "ReturnStatement",
-                    "start": 6668,
-                    "end": 6691,
+                    "start": 6713,
+                    "end": 6736,
                     "loc": {
                       "start": {
-                        "line": 251,
+                        "line": 253,
                         "column": 2
                       },
                       "end": {
-                        "line": 251,
+                        "line": 253,
                         "column": 25
                       }
                     },
                     "argument": {
                       "type": "CallExpression",
-                      "start": 6675,
-                      "end": 6691,
+                      "start": 6720,
+                      "end": 6736,
                       "loc": {
                         "start": {
-                          "line": 251,
+                          "line": 253,
                           "column": 9
                         },
                         "end": {
-                          "line": 251,
+                          "line": 253,
                           "column": 25
                         }
                       },
                       "callee": {
                         "type": "Identifier",
-                        "start": 6675,
-                        "end": 6681,
+                        "start": 6720,
+                        "end": 6726,
                         "loc": {
                           "start": {
-                            "line": 251,
+                            "line": 253,
                             "column": 9
                           },
                           "end": {
-                            "line": 251,
+                            "line": 253,
                             "column": 15
                           },
                           "identifierName": "String"
@@ -7185,44 +7185,44 @@
                       "arguments": [
                         {
                           "type": "MemberExpression",
-                          "start": 6682,
-                          "end": 6690,
+                          "start": 6727,
+                          "end": 6735,
                           "loc": {
                             "start": {
-                              "line": 251,
+                              "line": 253,
                               "column": 16
                             },
                             "end": {
-                              "line": 251,
+                              "line": 253,
                               "column": 24
                             }
                           },
                           "object": {
                             "type": "ThisExpression",
-                            "start": 6682,
-                            "end": 6686,
+                            "start": 6727,
+                            "end": 6731,
                             "loc": {
                               "start": {
-                                "line": 251,
+                                "line": 253,
                                 "column": 16
                               },
                               "end": {
-                                "line": 251,
+                                "line": 253,
                                 "column": 20
                               }
                             }
                           },
                           "property": {
                             "type": "Identifier",
-                            "start": 6687,
-                            "end": 6690,
+                            "start": 6732,
+                            "end": 6735,
                             "loc": {
                               "start": {
-                                "line": 251,
+                                "line": 253,
                                 "column": 21
                               },
                               "end": {
-                                "line": 251,
+                                "line": 253,
                                 "column": 24
                               },
                               "identifierName": "_id"
@@ -7242,15 +7242,15 @@
                 {
                   "type": "CommentBlock",
                   "value": "*\n\t * Returns unique entity ID as a string.\n\t *\n\t * @example\n\t * let entityId = entity.toString()\n\t *\n\t * @return {string} String representation of the entity ID.\n\t ",
-                  "start": 6482,
-                  "end": 6651,
+                  "start": 6527,
+                  "end": 6696,
                   "loc": {
                     "start": {
-                      "line": 242,
+                      "line": 244,
                       "column": 1
                     },
                     "end": {
-                      "line": 249,
+                      "line": 251,
                       "column": 4
                     }
                   }
@@ -7260,15 +7260,15 @@
                 {
                   "type": "CommentBlock",
                   "value": "*\n\t * Serializes entire entity and components to JSON.\n\t * Note: Defining toJSON methods in your components will override the built-in behavior.\n\t *\n\t * @example\n\t * let serializedEntity = entity.toJSON()\n\t *\n\t * @return {string} JSON encoded string\n\t ",
-                  "start": 6697,
-                  "end": 6953,
+                  "start": 6742,
+                  "end": 6998,
                   "loc": {
                     "start": {
-                      "line": 254,
+                      "line": 256,
                       "column": 1
                     },
                     "end": {
-                      "line": 262,
+                      "line": 264,
                       "column": 4
                     }
                   }
@@ -7277,15 +7277,15 @@
             },
             {
               "type": "ClassMethod",
-              "start": 6955,
-              "end": 7003,
+              "start": 7000,
+              "end": 7048,
               "loc": {
                 "start": {
-                  "line": 263,
+                  "line": 265,
                   "column": 1
                 },
                 "end": {
-                  "line": 265,
+                  "line": 267,
                   "column": 2
                 }
               },
@@ -7293,15 +7293,15 @@
               "computed": false,
               "key": {
                 "type": "Identifier",
-                "start": 6955,
-                "end": 6961,
+                "start": 7000,
+                "end": 7006,
                 "loc": {
                   "start": {
-                    "line": 263,
+                    "line": 265,
                     "column": 1
                   },
                   "end": {
-                    "line": 263,
+                    "line": 265,
                     "column": 7
                   },
                   "identifierName": "toJSON"
@@ -7317,72 +7317,72 @@
               "params": [],
               "body": {
                 "type": "BlockStatement",
-                "start": 6964,
-                "end": 7003,
+                "start": 7009,
+                "end": 7048,
                 "loc": {
                   "start": {
-                    "line": 263,
+                    "line": 265,
                     "column": 10
                   },
                   "end": {
-                    "line": 265,
+                    "line": 267,
                     "column": 2
                   }
                 },
                 "body": [
                   {
                     "type": "ReturnStatement",
-                    "start": 6968,
-                    "end": 7000,
+                    "start": 7013,
+                    "end": 7045,
                     "loc": {
                       "start": {
-                        "line": 264,
+                        "line": 266,
                         "column": 2
                       },
                       "end": {
-                        "line": 264,
+                        "line": 266,
                         "column": 34
                       }
                     },
                     "argument": {
                       "type": "CallExpression",
-                      "start": 6975,
-                      "end": 7000,
+                      "start": 7020,
+                      "end": 7045,
                       "loc": {
                         "start": {
-                          "line": 264,
+                          "line": 266,
                           "column": 9
                         },
                         "end": {
-                          "line": 264,
+                          "line": 266,
                           "column": 34
                         }
                       },
                       "callee": {
                         "type": "MemberExpression",
-                        "start": 6975,
-                        "end": 6989,
+                        "start": 7020,
+                        "end": 7034,
                         "loc": {
                           "start": {
-                            "line": 264,
+                            "line": 266,
                             "column": 9
                           },
                           "end": {
-                            "line": 264,
+                            "line": 266,
                             "column": 23
                           }
                         },
                         "object": {
                           "type": "Identifier",
-                          "start": 6975,
-                          "end": 6979,
+                          "start": 7020,
+                          "end": 7024,
                           "loc": {
                             "start": {
-                              "line": 264,
+                              "line": 266,
                               "column": 9
                             },
                             "end": {
-                              "line": 264,
+                              "line": 266,
                               "column": 13
                             },
                             "identifierName": "JSON"
@@ -7391,15 +7391,15 @@
                         },
                         "property": {
                           "type": "Identifier",
-                          "start": 6980,
-                          "end": 6989,
+                          "start": 7025,
+                          "end": 7034,
                           "loc": {
                             "start": {
-                              "line": 264,
+                              "line": 266,
                               "column": 14
                             },
                             "end": {
-                              "line": 264,
+                              "line": 266,
                               "column": 23
                             },
                             "identifierName": "stringify"
@@ -7411,44 +7411,44 @@
                       "arguments": [
                         {
                           "type": "MemberExpression",
-                          "start": 6990,
-                          "end": 6999,
+                          "start": 7035,
+                          "end": 7044,
                           "loc": {
                             "start": {
-                              "line": 264,
+                              "line": 266,
                               "column": 24
                             },
                             "end": {
-                              "line": 264,
+                              "line": 266,
                               "column": 33
                             }
                           },
                           "object": {
                             "type": "ThisExpression",
-                            "start": 6990,
-                            "end": 6994,
+                            "start": 7035,
+                            "end": 7039,
                             "loc": {
                               "start": {
-                                "line": 264,
+                                "line": 266,
                                 "column": 24
                               },
                               "end": {
-                                "line": 264,
+                                "line": 266,
                                 "column": 28
                               }
                             }
                           },
                           "property": {
                             "type": "Identifier",
-                            "start": 6995,
-                            "end": 6999,
+                            "start": 7040,
+                            "end": 7044,
                             "loc": {
                               "start": {
-                                "line": 264,
+                                "line": 266,
                                 "column": 29
                               },
                               "end": {
-                                "line": 264,
+                                "line": 266,
                                 "column": 33
                               },
                               "identifierName": "data"
@@ -7468,15 +7468,15 @@
                 {
                   "type": "CommentBlock",
                   "value": "*\n\t * Serializes entire entity and components to JSON.\n\t * Note: Defining toJSON methods in your components will override the built-in behavior.\n\t *\n\t * @example\n\t * let serializedEntity = entity.toJSON()\n\t *\n\t * @return {string} JSON encoded string\n\t ",
-                  "start": 6697,
-                  "end": 6953,
+                  "start": 6742,
+                  "end": 6998,
                   "loc": {
                     "start": {
-                      "line": 254,
+                      "line": 256,
                       "column": 1
                     },
                     "end": {
-                      "line": 262,
+                      "line": 264,
                       "column": 4
                     }
                   }
@@ -7486,15 +7486,15 @@
                 {
                   "type": "CommentBlock",
                   "value": "*\n\t * Deserializes data from JSON, creating new components and overwriting existing components.\n\t * Note: Defining fromJSON methods in your components will override the built-in behavior.\n\t *\n\t * @example\n\t * entity.fromJSON(serializedEntity)\n\t *\n\t * @param {string} data - A JSON string containing component data to parse, and store in this entity.\n\t *\n\t * @return {Object} The original entity that fromJSON() was called on, so that operations can be chained.\n\t ",
-                  "start": 7006,
-                  "end": 7473,
+                  "start": 7051,
+                  "end": 7518,
                   "loc": {
                     "start": {
-                      "line": 267,
+                      "line": 269,
                       "column": 1
                     },
                     "end": {
-                      "line": 277,
+                      "line": 279,
                       "column": 4
                     }
                   }
@@ -7503,15 +7503,15 @@
             },
             {
               "type": "ClassMethod",
-              "start": 7475,
-              "end": 7792,
+              "start": 7520,
+              "end": 7837,
               "loc": {
                 "start": {
-                  "line": 278,
+                  "line": 280,
                   "column": 1
                 },
                 "end": {
-                  "line": 291,
+                  "line": 293,
                   "column": 2
                 }
               },
@@ -7519,15 +7519,15 @@
               "computed": false,
               "key": {
                 "type": "Identifier",
-                "start": 7475,
-                "end": 7483,
+                "start": 7520,
+                "end": 7528,
                 "loc": {
                   "start": {
-                    "line": 278,
+                    "line": 280,
                     "column": 1
                   },
                   "end": {
-                    "line": 278,
+                    "line": 280,
                     "column": 9
                   },
                   "identifierName": "fromJSON"
@@ -7543,15 +7543,15 @@
               "params": [
                 {
                   "type": "Identifier",
-                  "start": 7484,
-                  "end": 7488,
+                  "start": 7529,
+                  "end": 7533,
                   "loc": {
                     "start": {
-                      "line": 278,
+                      "line": 280,
                       "column": 10
                     },
                     "end": {
-                      "line": 278,
+                      "line": 280,
                       "column": 14
                     },
                     "identifierName": "data"
@@ -7561,59 +7561,59 @@
               ],
               "body": {
                 "type": "BlockStatement",
-                "start": 7490,
-                "end": 7792,
+                "start": 7535,
+                "end": 7837,
                 "loc": {
                   "start": {
-                    "line": 278,
+                    "line": 280,
                     "column": 16
                   },
                   "end": {
-                    "line": 291,
+                    "line": 293,
                     "column": 2
                   }
                 },
                 "body": [
                   {
                     "type": "VariableDeclaration",
-                    "start": 7494,
-                    "end": 7523,
+                    "start": 7539,
+                    "end": 7568,
                     "loc": {
                       "start": {
-                        "line": 279,
+                        "line": 281,
                         "column": 2
                       },
                       "end": {
-                        "line": 279,
+                        "line": 281,
                         "column": 31
                       }
                     },
                     "declarations": [
                       {
                         "type": "VariableDeclarator",
-                        "start": 7498,
-                        "end": 7523,
+                        "start": 7543,
+                        "end": 7568,
                         "loc": {
                           "start": {
-                            "line": 279,
+                            "line": 281,
                             "column": 6
                           },
                           "end": {
-                            "line": 279,
+                            "line": 281,
                             "column": 31
                           }
                         },
                         "id": {
                           "type": "Identifier",
-                          "start": 7498,
-                          "end": 7504,
+                          "start": 7543,
+                          "end": 7549,
                           "loc": {
                             "start": {
-                              "line": 279,
+                              "line": 281,
                               "column": 6
                             },
                             "end": {
-                              "line": 279,
+                              "line": 281,
                               "column": 12
                             },
                             "identifierName": "parsed"
@@ -7622,43 +7622,43 @@
                         },
                         "init": {
                           "type": "CallExpression",
-                          "start": 7507,
-                          "end": 7523,
+                          "start": 7552,
+                          "end": 7568,
                           "loc": {
                             "start": {
-                              "line": 279,
+                              "line": 281,
                               "column": 15
                             },
                             "end": {
-                              "line": 279,
+                              "line": 281,
                               "column": 31
                             }
                           },
                           "callee": {
                             "type": "MemberExpression",
-                            "start": 7507,
-                            "end": 7517,
+                            "start": 7552,
+                            "end": 7562,
                             "loc": {
                               "start": {
-                                "line": 279,
+                                "line": 281,
                                 "column": 15
                               },
                               "end": {
-                                "line": 279,
+                                "line": 281,
                                 "column": 25
                               }
                             },
                             "object": {
                               "type": "Identifier",
-                              "start": 7507,
-                              "end": 7511,
+                              "start": 7552,
+                              "end": 7556,
                               "loc": {
                                 "start": {
-                                  "line": 279,
+                                  "line": 281,
                                   "column": 15
                                 },
                                 "end": {
-                                  "line": 279,
+                                  "line": 281,
                                   "column": 19
                                 },
                                 "identifierName": "JSON"
@@ -7667,15 +7667,15 @@
                             },
                             "property": {
                               "type": "Identifier",
-                              "start": 7512,
-                              "end": 7517,
+                              "start": 7557,
+                              "end": 7562,
                               "loc": {
                                 "start": {
-                                  "line": 279,
+                                  "line": 281,
                                   "column": 20
                                 },
                                 "end": {
-                                  "line": 279,
+                                  "line": 281,
                                   "column": 25
                                 },
                                 "identifierName": "parse"
@@ -7687,15 +7687,15 @@
                           "arguments": [
                             {
                               "type": "Identifier",
-                              "start": 7518,
-                              "end": 7522,
+                              "start": 7563,
+                              "end": 7567,
                               "loc": {
                                 "start": {
-                                  "line": 279,
+                                  "line": 281,
                                   "column": 26
                                 },
                                 "end": {
-                                  "line": 279,
+                                  "line": 281,
                                   "column": 30
                                 },
                                 "identifierName": "data"
@@ -7710,58 +7710,58 @@
                   },
                   {
                     "type": "ForInStatement",
-                    "start": 7526,
-                    "end": 7775,
+                    "start": 7571,
+                    "end": 7820,
                     "loc": {
                       "start": {
-                        "line": 280,
+                        "line": 282,
                         "column": 2
                       },
                       "end": {
-                        "line": 289,
+                        "line": 291,
                         "column": 3
                       }
                     },
                     "left": {
                       "type": "VariableDeclaration",
-                      "start": 7531,
-                      "end": 7539,
+                      "start": 7576,
+                      "end": 7584,
                       "loc": {
                         "start": {
-                          "line": 280,
+                          "line": 282,
                           "column": 7
                         },
                         "end": {
-                          "line": 280,
+                          "line": 282,
                           "column": 15
                         }
                       },
                       "declarations": [
                         {
                           "type": "VariableDeclarator",
-                          "start": 7535,
-                          "end": 7539,
+                          "start": 7580,
+                          "end": 7584,
                           "loc": {
                             "start": {
-                              "line": 280,
+                              "line": 282,
                               "column": 11
                             },
                             "end": {
-                              "line": 280,
+                              "line": 282,
                               "column": 15
                             }
                           },
                           "id": {
                             "type": "Identifier",
-                            "start": 7535,
-                            "end": 7539,
+                            "start": 7580,
+                            "end": 7584,
                             "loc": {
                               "start": {
-                                "line": 280,
+                                "line": 282,
                                 "column": 11
                               },
                               "end": {
-                                "line": 280,
+                                "line": 282,
                                 "column": 15
                               },
                               "identifierName": "name"
@@ -7775,15 +7775,15 @@
                     },
                     "right": {
                       "type": "Identifier",
-                      "start": 7543,
-                      "end": 7549,
+                      "start": 7588,
+                      "end": 7594,
                       "loc": {
                         "start": {
-                          "line": 280,
+                          "line": 282,
                           "column": 19
                         },
                         "end": {
-                          "line": 280,
+                          "line": 282,
                           "column": 25
                         },
                         "identifierName": "parsed"
@@ -7792,59 +7792,59 @@
                     },
                     "body": {
                       "type": "BlockStatement",
-                      "start": 7551,
-                      "end": 7775,
+                      "start": 7596,
+                      "end": 7820,
                       "loc": {
                         "start": {
-                          "line": 280,
+                          "line": 282,
                           "column": 27
                         },
                         "end": {
-                          "line": 289,
+                          "line": 291,
                           "column": 3
                         }
                       },
                       "body": [
                         {
                           "type": "VariableDeclaration",
-                          "start": 7556,
-                          "end": 7584,
+                          "start": 7601,
+                          "end": 7629,
                           "loc": {
                             "start": {
-                              "line": 281,
+                              "line": 283,
                               "column": 3
                             },
                             "end": {
-                              "line": 281,
+                              "line": 283,
                               "column": 31
                             }
                           },
                           "declarations": [
                             {
                               "type": "VariableDeclarator",
-                              "start": 7560,
-                              "end": 7584,
+                              "start": 7605,
+                              "end": 7629,
                               "loc": {
                                 "start": {
-                                  "line": 281,
+                                  "line": 283,
                                   "column": 7
                                 },
                                 "end": {
-                                  "line": 281,
+                                  "line": 283,
                                   "column": 31
                                 }
                               },
                               "id": {
                                 "type": "Identifier",
-                                "start": 7560,
-                                "end": 7564,
+                                "start": 7605,
+                                "end": 7609,
                                 "loc": {
                                   "start": {
-                                    "line": 281,
+                                    "line": 283,
                                     "column": 7
                                   },
                                   "end": {
-                                    "line": 281,
+                                    "line": 283,
                                     "column": 11
                                   },
                                   "identifierName": "comp"
@@ -7853,58 +7853,58 @@
                               },
                               "init": {
                                 "type": "CallExpression",
-                                "start": 7567,
-                                "end": 7584,
+                                "start": 7612,
+                                "end": 7629,
                                 "loc": {
                                   "start": {
-                                    "line": 281,
+                                    "line": 283,
                                     "column": 14
                                   },
                                   "end": {
-                                    "line": 281,
+                                    "line": 283,
                                     "column": 31
                                   }
                                 },
                                 "callee": {
                                   "type": "MemberExpression",
-                                  "start": 7567,
-                                  "end": 7578,
+                                  "start": 7612,
+                                  "end": 7623,
                                   "loc": {
                                     "start": {
-                                      "line": 281,
+                                      "line": 283,
                                       "column": 14
                                     },
                                     "end": {
-                                      "line": 281,
+                                      "line": 283,
                                       "column": 25
                                     }
                                   },
                                   "object": {
                                     "type": "ThisExpression",
-                                    "start": 7567,
-                                    "end": 7571,
+                                    "start": 7612,
+                                    "end": 7616,
                                     "loc": {
                                       "start": {
-                                        "line": 281,
+                                        "line": 283,
                                         "column": 14
                                       },
                                       "end": {
-                                        "line": 281,
+                                        "line": 283,
                                         "column": 18
                                       }
                                     }
                                   },
                                   "property": {
                                     "type": "Identifier",
-                                    "start": 7572,
-                                    "end": 7578,
+                                    "start": 7617,
+                                    "end": 7623,
                                     "loc": {
                                       "start": {
-                                        "line": 281,
+                                        "line": 283,
                                         "column": 19
                                       },
                                       "end": {
-                                        "line": 281,
+                                        "line": 283,
                                         "column": 25
                                       },
                                       "identifierName": "access"
@@ -7916,15 +7916,15 @@
                                 "arguments": [
                                   {
                                     "type": "Identifier",
-                                    "start": 7579,
-                                    "end": 7583,
+                                    "start": 7624,
+                                    "end": 7628,
                                     "loc": {
                                       "start": {
-                                        "line": 281,
+                                        "line": 283,
                                         "column": 26
                                       },
                                       "end": {
-                                        "line": 281,
+                                        "line": 283,
                                         "column": 30
                                       },
                                       "identifierName": "name"
@@ -7942,15 +7942,15 @@
                             {
                               "type": "CommentLine",
                               "value": " Either call custom method or copy all properties",
-                              "start": 7589,
-                              "end": 7640,
+                              "start": 7634,
+                              "end": 7685,
                               "loc": {
                                 "start": {
-                                  "line": 283,
+                                  "line": 285,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 283,
+                                  "line": 285,
                                   "column": 54
                                 }
                               }
@@ -7959,43 +7959,43 @@
                         },
                         {
                           "type": "IfStatement",
-                          "start": 7644,
-                          "end": 7771,
+                          "start": 7689,
+                          "end": 7816,
                           "loc": {
                             "start": {
-                              "line": 284,
+                              "line": 286,
                               "column": 3
                             },
                             "end": {
-                              "line": 288,
+                              "line": 290,
                               "column": 4
                             }
                           },
                           "test": {
                             "type": "BinaryExpression",
-                            "start": 7648,
-                            "end": 7683,
+                            "start": 7693,
+                            "end": 7728,
                             "loc": {
                               "start": {
-                                "line": 284,
+                                "line": 286,
                                 "column": 7
                               },
                               "end": {
-                                "line": 284,
+                                "line": 286,
                                 "column": 42
                               }
                             },
                             "left": {
                               "type": "UnaryExpression",
-                              "start": 7648,
-                              "end": 7668,
+                              "start": 7693,
+                              "end": 7713,
                               "loc": {
                                 "start": {
-                                  "line": 284,
+                                  "line": 286,
                                   "column": 7
                                 },
                                 "end": {
-                                  "line": 284,
+                                  "line": 286,
                                   "column": 27
                                 }
                               },
@@ -8003,29 +8003,29 @@
                               "prefix": true,
                               "argument": {
                                 "type": "MemberExpression",
-                                "start": 7655,
-                                "end": 7668,
+                                "start": 7700,
+                                "end": 7713,
                                 "loc": {
                                   "start": {
-                                    "line": 284,
+                                    "line": 286,
                                     "column": 14
                                   },
                                   "end": {
-                                    "line": 284,
+                                    "line": 286,
                                     "column": 27
                                   }
                                 },
                                 "object": {
                                   "type": "Identifier",
-                                  "start": 7655,
-                                  "end": 7659,
+                                  "start": 7700,
+                                  "end": 7704,
                                   "loc": {
                                     "start": {
-                                      "line": 284,
+                                      "line": 286,
                                       "column": 14
                                     },
                                     "end": {
-                                      "line": 284,
+                                      "line": 286,
                                       "column": 18
                                     },
                                     "identifierName": "comp"
@@ -8035,15 +8035,15 @@
                                 },
                                 "property": {
                                   "type": "Identifier",
-                                  "start": 7660,
-                                  "end": 7668,
+                                  "start": 7705,
+                                  "end": 7713,
                                   "loc": {
                                     "start": {
-                                      "line": 284,
+                                      "line": 286,
                                       "column": 19
                                     },
                                     "end": {
-                                      "line": 284,
+                                      "line": 286,
                                       "column": 27
                                     },
                                     "identifierName": "fromJSON"
@@ -8061,15 +8061,15 @@
                             "operator": "===",
                             "right": {
                               "type": "StringLiteral",
-                              "start": 7673,
-                              "end": 7683,
+                              "start": 7718,
+                              "end": 7728,
                               "loc": {
                                 "start": {
-                                  "line": 284,
+                                  "line": 286,
                                   "column": 32
                                 },
                                 "end": {
-                                  "line": 284,
+                                  "line": 286,
                                   "column": 42
                                 }
                               },
@@ -8083,72 +8083,72 @@
                           },
                           "consequent": {
                             "type": "BlockStatement",
-                            "start": 7685,
-                            "end": 7723,
+                            "start": 7730,
+                            "end": 7768,
                             "loc": {
                               "start": {
-                                "line": 284,
+                                "line": 286,
                                 "column": 44
                               },
                               "end": {
-                                "line": 286,
+                                "line": 288,
                                 "column": 4
                               }
                             },
                             "body": [
                               {
                                 "type": "ExpressionStatement",
-                                "start": 7691,
-                                "end": 7718,
+                                "start": 7736,
+                                "end": 7763,
                                 "loc": {
                                   "start": {
-                                    "line": 285,
+                                    "line": 287,
                                     "column": 4
                                   },
                                   "end": {
-                                    "line": 285,
+                                    "line": 287,
                                     "column": 31
                                   }
                                 },
                                 "expression": {
                                   "type": "CallExpression",
-                                  "start": 7691,
-                                  "end": 7718,
+                                  "start": 7736,
+                                  "end": 7763,
                                   "loc": {
                                     "start": {
-                                      "line": 285,
+                                      "line": 287,
                                       "column": 4
                                     },
                                     "end": {
-                                      "line": 285,
+                                      "line": 287,
                                       "column": 31
                                     }
                                   },
                                   "callee": {
                                     "type": "MemberExpression",
-                                    "start": 7691,
-                                    "end": 7704,
+                                    "start": 7736,
+                                    "end": 7749,
                                     "loc": {
                                       "start": {
-                                        "line": 285,
+                                        "line": 287,
                                         "column": 4
                                       },
                                       "end": {
-                                        "line": 285,
+                                        "line": 287,
                                         "column": 17
                                       }
                                     },
                                     "object": {
                                       "type": "Identifier",
-                                      "start": 7691,
-                                      "end": 7695,
+                                      "start": 7736,
+                                      "end": 7740,
                                       "loc": {
                                         "start": {
-                                          "line": 285,
+                                          "line": 287,
                                           "column": 4
                                         },
                                         "end": {
-                                          "line": 285,
+                                          "line": 287,
                                           "column": 8
                                         },
                                         "identifierName": "comp"
@@ -8157,15 +8157,15 @@
                                     },
                                     "property": {
                                       "type": "Identifier",
-                                      "start": 7696,
-                                      "end": 7704,
+                                      "start": 7741,
+                                      "end": 7749,
                                       "loc": {
                                         "start": {
-                                          "line": 285,
+                                          "line": 287,
                                           "column": 9
                                         },
                                         "end": {
-                                          "line": 285,
+                                          "line": 287,
                                           "column": 17
                                         },
                                         "identifierName": "fromJSON"
@@ -8177,29 +8177,29 @@
                                   "arguments": [
                                     {
                                       "type": "MemberExpression",
-                                      "start": 7705,
-                                      "end": 7717,
+                                      "start": 7750,
+                                      "end": 7762,
                                       "loc": {
                                         "start": {
-                                          "line": 285,
+                                          "line": 287,
                                           "column": 18
                                         },
                                         "end": {
-                                          "line": 285,
+                                          "line": 287,
                                           "column": 30
                                         }
                                       },
                                       "object": {
                                         "type": "Identifier",
-                                        "start": 7705,
-                                        "end": 7711,
+                                        "start": 7750,
+                                        "end": 7756,
                                         "loc": {
                                           "start": {
-                                            "line": 285,
+                                            "line": 287,
                                             "column": 18
                                           },
                                           "end": {
-                                            "line": 285,
+                                            "line": 287,
                                             "column": 24
                                           },
                                           "identifierName": "parsed"
@@ -8208,15 +8208,15 @@
                                       },
                                       "property": {
                                         "type": "Identifier",
-                                        "start": 7712,
-                                        "end": 7716,
+                                        "start": 7757,
+                                        "end": 7761,
                                         "loc": {
                                           "start": {
-                                            "line": 285,
+                                            "line": 287,
                                             "column": 25
                                           },
                                           "end": {
-                                            "line": 285,
+                                            "line": 287,
                                             "column": 29
                                           },
                                           "identifierName": "name"
@@ -8233,87 +8233,87 @@
                           },
                           "alternate": {
                             "type": "BlockStatement",
-                            "start": 7729,
-                            "end": 7771,
+                            "start": 7774,
+                            "end": 7816,
                             "loc": {
                               "start": {
-                                "line": 286,
+                                "line": 288,
                                 "column": 10
                               },
                               "end": {
-                                "line": 288,
+                                "line": 290,
                                 "column": 4
                               }
                             },
                             "body": [
                               {
                                 "type": "ExpressionStatement",
-                                "start": 7735,
-                                "end": 7766,
+                                "start": 7780,
+                                "end": 7811,
                                 "loc": {
                                   "start": {
-                                    "line": 287,
+                                    "line": 289,
                                     "column": 4
                                   },
                                   "end": {
-                                    "line": 287,
+                                    "line": 289,
                                     "column": 35
                                   }
                                 },
                                 "expression": {
                                   "type": "CallExpression",
-                                  "start": 7735,
-                                  "end": 7766,
+                                  "start": 7780,
+                                  "end": 7811,
                                   "loc": {
                                     "start": {
-                                      "line": 287,
+                                      "line": 289,
                                       "column": 4
                                     },
                                     "end": {
-                                      "line": 287,
+                                      "line": 289,
                                       "column": 35
                                     }
                                   },
                                   "callee": {
                                     "type": "MemberExpression",
-                                    "start": 7735,
-                                    "end": 7746,
+                                    "start": 7780,
+                                    "end": 7791,
                                     "loc": {
                                       "start": {
-                                        "line": 287,
+                                        "line": 289,
                                         "column": 4
                                       },
                                       "end": {
-                                        "line": 287,
+                                        "line": 289,
                                         "column": 15
                                       }
                                     },
                                     "object": {
                                       "type": "ThisExpression",
-                                      "start": 7735,
-                                      "end": 7739,
+                                      "start": 7780,
+                                      "end": 7784,
                                       "loc": {
                                         "start": {
-                                          "line": 287,
+                                          "line": 289,
                                           "column": 4
                                         },
                                         "end": {
-                                          "line": 287,
+                                          "line": 289,
                                           "column": 8
                                         }
                                       }
                                     },
                                     "property": {
                                       "type": "Identifier",
-                                      "start": 7740,
-                                      "end": 7746,
+                                      "start": 7785,
+                                      "end": 7791,
                                       "loc": {
                                         "start": {
-                                          "line": 287,
+                                          "line": 289,
                                           "column": 9
                                         },
                                         "end": {
-                                          "line": 287,
+                                          "line": 289,
                                           "column": 15
                                         },
                                         "identifierName": "update"
@@ -8325,15 +8325,15 @@
                                   "arguments": [
                                     {
                                       "type": "Identifier",
-                                      "start": 7747,
-                                      "end": 7751,
+                                      "start": 7792,
+                                      "end": 7796,
                                       "loc": {
                                         "start": {
-                                          "line": 287,
+                                          "line": 289,
                                           "column": 16
                                         },
                                         "end": {
-                                          "line": 287,
+                                          "line": 289,
                                           "column": 20
                                         },
                                         "identifierName": "name"
@@ -8342,29 +8342,29 @@
                                     },
                                     {
                                       "type": "MemberExpression",
-                                      "start": 7753,
-                                      "end": 7765,
+                                      "start": 7798,
+                                      "end": 7810,
                                       "loc": {
                                         "start": {
-                                          "line": 287,
+                                          "line": 289,
                                           "column": 22
                                         },
                                         "end": {
-                                          "line": 287,
+                                          "line": 289,
                                           "column": 34
                                         }
                                       },
                                       "object": {
                                         "type": "Identifier",
-                                        "start": 7753,
-                                        "end": 7759,
+                                        "start": 7798,
+                                        "end": 7804,
                                         "loc": {
                                           "start": {
-                                            "line": 287,
+                                            "line": 289,
                                             "column": 22
                                           },
                                           "end": {
-                                            "line": 287,
+                                            "line": 289,
                                             "column": 28
                                           },
                                           "identifierName": "parsed"
@@ -8373,15 +8373,15 @@
                                       },
                                       "property": {
                                         "type": "Identifier",
-                                        "start": 7760,
-                                        "end": 7764,
+                                        "start": 7805,
+                                        "end": 7809,
                                         "loc": {
                                           "start": {
-                                            "line": 287,
+                                            "line": 289,
                                             "column": 29
                                           },
                                           "end": {
-                                            "line": 287,
+                                            "line": 289,
                                             "column": 33
                                           },
                                           "identifierName": "name"
@@ -8400,15 +8400,15 @@
                             {
                               "type": "CommentLine",
                               "value": " Either call custom method or copy all properties",
-                              "start": 7589,
-                              "end": 7640,
+                              "start": 7634,
+                              "end": 7685,
                               "loc": {
                                 "start": {
-                                  "line": 283,
+                                  "line": 285,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 283,
+                                  "line": 285,
                                   "column": 54
                                 }
                               }
@@ -8421,29 +8421,29 @@
                   },
                   {
                     "type": "ReturnStatement",
-                    "start": 7778,
-                    "end": 7789,
+                    "start": 7823,
+                    "end": 7834,
                     "loc": {
                       "start": {
-                        "line": 290,
+                        "line": 292,
                         "column": 2
                       },
                       "end": {
-                        "line": 290,
+                        "line": 292,
                         "column": 13
                       }
                     },
                     "argument": {
                       "type": "ThisExpression",
-                      "start": 7785,
-                      "end": 7789,
+                      "start": 7830,
+                      "end": 7834,
                       "loc": {
                         "start": {
-                          "line": 290,
+                          "line": 292,
                           "column": 9
                         },
                         "end": {
-                          "line": 290,
+                          "line": 292,
                           "column": 13
                         }
                       }
@@ -8457,15 +8457,15 @@
                 {
                   "type": "CommentBlock",
                   "value": "*\n\t * Deserializes data from JSON, creating new components and overwriting existing components.\n\t * Note: Defining fromJSON methods in your components will override the built-in behavior.\n\t *\n\t * @example\n\t * entity.fromJSON(serializedEntity)\n\t *\n\t * @param {string} data - A JSON string containing component data to parse, and store in this entity.\n\t *\n\t * @return {Object} The original entity that fromJSON() was called on, so that operations can be chained.\n\t ",
-                  "start": 7006,
-                  "end": 7473,
+                  "start": 7051,
+                  "end": 7518,
                   "loc": {
                     "start": {
-                      "line": 267,
+                      "line": 269,
                       "column": 1
                     },
                     "end": {
-                      "line": 277,
+                      "line": 279,
                       "column": 4
                     }
                   }
@@ -8475,15 +8475,15 @@
                 {
                   "type": "CommentBlock",
                   "value": "*\n\t * Attaches a currently detached entity back to a world.\n\t * Note: Do not use detached entities, get() may be safe, but avoid calling other methods\n\t * Note: The ID will be reassigned, so do not rely on this\n\t *\n\t * @example\n\t * entity.attach(world)\n\t *\n\t * @param {World} world - The world to attach this entity to\n\t ",
-                  "start": 7795,
-                  "end": 8120,
+                  "start": 7840,
+                  "end": 8165,
                   "loc": {
                     "start": {
-                      "line": 293,
+                      "line": 295,
                       "column": 1
                     },
                     "end": {
-                      "line": 302,
+                      "line": 304,
                       "column": 4
                     }
                   }
@@ -8492,15 +8492,15 @@
             },
             {
               "type": "ClassMethod",
-              "start": 8122,
-              "end": 8357,
+              "start": 8167,
+              "end": 8402,
               "loc": {
                 "start": {
-                  "line": 303,
+                  "line": 305,
                   "column": 1
                 },
                 "end": {
-                  "line": 311,
+                  "line": 313,
                   "column": 2
                 }
               },
@@ -8508,15 +8508,15 @@
               "computed": false,
               "key": {
                 "type": "Identifier",
-                "start": 8122,
-                "end": 8128,
+                "start": 8167,
+                "end": 8173,
                 "loc": {
                   "start": {
-                    "line": 303,
+                    "line": 305,
                     "column": 1
                   },
                   "end": {
-                    "line": 303,
+                    "line": 305,
                     "column": 7
                   },
                   "identifierName": "attach"
@@ -8532,15 +8532,15 @@
               "params": [
                 {
                   "type": "Identifier",
-                  "start": 8129,
-                  "end": 8134,
+                  "start": 8174,
+                  "end": 8179,
                   "loc": {
                     "start": {
-                      "line": 303,
+                      "line": 305,
                       "column": 8
                     },
                     "end": {
-                      "line": 303,
+                      "line": 305,
                       "column": 13
                     },
                     "identifierName": "world"
@@ -8550,58 +8550,58 @@
               ],
               "body": {
                 "type": "BlockStatement",
-                "start": 8136,
-                "end": 8357,
+                "start": 8181,
+                "end": 8402,
                 "loc": {
                   "start": {
-                    "line": 303,
+                    "line": 305,
                     "column": 15
                   },
                   "end": {
-                    "line": 311,
+                    "line": 313,
                     "column": 2
                   }
                 },
                 "body": [
                   {
                     "type": "IfStatement",
-                    "start": 8140,
-                    "end": 8354,
+                    "start": 8185,
+                    "end": 8399,
                     "loc": {
                       "start": {
-                        "line": 304,
+                        "line": 306,
                         "column": 2
                       },
                       "end": {
-                        "line": 310,
+                        "line": 312,
                         "column": 3
                       }
                     },
                     "test": {
                       "type": "LogicalExpression",
-                      "start": 8144,
-                      "end": 8166,
+                      "start": 8189,
+                      "end": 8211,
                       "loc": {
                         "start": {
-                          "line": 304,
+                          "line": 306,
                           "column": 6
                         },
                         "end": {
-                          "line": 304,
+                          "line": 306,
                           "column": 28
                         }
                       },
                       "left": {
                         "type": "Identifier",
-                        "start": 8144,
-                        "end": 8149,
+                        "start": 8189,
+                        "end": 8194,
                         "loc": {
                           "start": {
-                            "line": 304,
+                            "line": 306,
                             "column": 6
                           },
                           "end": {
-                            "line": 304,
+                            "line": 306,
                             "column": 11
                           },
                           "identifierName": "world"
@@ -8611,15 +8611,15 @@
                       "operator": "&&",
                       "right": {
                         "type": "UnaryExpression",
-                        "start": 8153,
-                        "end": 8166,
+                        "start": 8198,
+                        "end": 8211,
                         "loc": {
                           "start": {
-                            "line": 304,
+                            "line": 306,
                             "column": 15
                           },
                           "end": {
-                            "line": 304,
+                            "line": 306,
                             "column": 28
                           }
                         },
@@ -8627,58 +8627,58 @@
                         "prefix": true,
                         "argument": {
                           "type": "CallExpression",
-                          "start": 8154,
-                          "end": 8166,
+                          "start": 8199,
+                          "end": 8211,
                           "loc": {
                             "start": {
-                              "line": 304,
+                              "line": 306,
                               "column": 16
                             },
                             "end": {
-                              "line": 304,
+                              "line": 306,
                               "column": 28
                             }
                           },
                           "callee": {
                             "type": "MemberExpression",
-                            "start": 8154,
-                            "end": 8164,
+                            "start": 8199,
+                            "end": 8209,
                             "loc": {
                               "start": {
-                                "line": 304,
+                                "line": 306,
                                 "column": 16
                               },
                               "end": {
-                                "line": 304,
+                                "line": 306,
                                 "column": 26
                               }
                             },
                             "object": {
                               "type": "ThisExpression",
-                              "start": 8154,
-                              "end": 8158,
+                              "start": 8199,
+                              "end": 8203,
                               "loc": {
                                 "start": {
-                                  "line": 304,
+                                  "line": 306,
                                   "column": 16
                                 },
                                 "end": {
-                                  "line": 304,
+                                  "line": 306,
                                   "column": 20
                                 }
                               }
                             },
                             "property": {
                               "type": "Identifier",
-                              "start": 8159,
-                              "end": 8164,
+                              "start": 8204,
+                              "end": 8209,
                               "loc": {
                                 "start": {
-                                  "line": 304,
+                                  "line": 306,
                                   "column": 21
                                 },
                                 "end": {
-                                  "line": 304,
+                                  "line": 306,
                                   "column": 26
                                 },
                                 "identifierName": "valid"
@@ -8696,73 +8696,73 @@
                     },
                     "consequent": {
                       "type": "BlockStatement",
-                      "start": 8168,
-                      "end": 8354,
+                      "start": 8213,
+                      "end": 8399,
                       "loc": {
                         "start": {
-                          "line": 304,
+                          "line": 306,
                           "column": 30
                         },
                         "end": {
-                          "line": 310,
+                          "line": 312,
                           "column": 3
                         }
                       },
                       "body": [
                         {
                           "type": "ExpressionStatement",
-                          "start": 8216,
-                          "end": 8234,
+                          "start": 8261,
+                          "end": 8279,
                           "loc": {
                             "start": {
-                              "line": 306,
+                              "line": 308,
                               "column": 3
                             },
                             "end": {
-                              "line": 306,
+                              "line": 308,
                               "column": 21
                             }
                           },
                           "expression": {
                             "type": "AssignmentExpression",
-                            "start": 8216,
-                            "end": 8234,
+                            "start": 8261,
+                            "end": 8279,
                             "loc": {
                               "start": {
-                                "line": 306,
+                                "line": 308,
                                 "column": 3
                               },
                               "end": {
-                                "line": 306,
+                                "line": 308,
                                 "column": 21
                               }
                             },
                             "operator": "=",
                             "left": {
                               "type": "MemberExpression",
-                              "start": 8216,
-                              "end": 8226,
+                              "start": 8261,
+                              "end": 8271,
                               "loc": {
                                 "start": {
-                                  "line": 306,
+                                  "line": 308,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 306,
+                                  "line": 308,
                                   "column": 13
                                 }
                               },
                               "object": {
                                 "type": "ThisExpression",
-                                "start": 8216,
-                                "end": 8220,
+                                "start": 8261,
+                                "end": 8265,
                                 "loc": {
                                   "start": {
-                                    "line": 306,
+                                    "line": 308,
                                     "column": 3
                                   },
                                   "end": {
-                                    "line": 306,
+                                    "line": 308,
                                     "column": 7
                                   }
                                 },
@@ -8770,15 +8770,15 @@
                               },
                               "property": {
                                 "type": "Identifier",
-                                "start": 8221,
-                                "end": 8226,
+                                "start": 8266,
+                                "end": 8271,
                                 "loc": {
                                   "start": {
-                                    "line": 306,
+                                    "line": 308,
                                     "column": 8
                                   },
                                   "end": {
-                                    "line": 306,
+                                    "line": 308,
                                     "column": 13
                                   },
                                   "identifierName": "world"
@@ -8790,15 +8790,15 @@
                             },
                             "right": {
                               "type": "Identifier",
-                              "start": 8229,
-                              "end": 8234,
+                              "start": 8274,
+                              "end": 8279,
                               "loc": {
                                 "start": {
-                                  "line": 306,
+                                  "line": 308,
                                   "column": 16
                                 },
                                 "end": {
-                                  "line": 306,
+                                  "line": 308,
                                   "column": 21
                                 },
                                 "identifierName": "world"
@@ -8811,15 +8811,15 @@
                             {
                               "type": "CommentLine",
                               "value": " Assign new id, and reattach to world",
-                              "start": 8173,
-                              "end": 8212,
+                              "start": 8218,
+                              "end": 8257,
                               "loc": {
                                 "start": {
-                                  "line": 305,
+                                  "line": 307,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 305,
+                                  "line": 307,
                                   "column": 42
                                 }
                               }
@@ -8828,73 +8828,73 @@
                         },
                         {
                           "type": "ExpressionStatement",
-                          "start": 8238,
-                          "end": 8271,
+                          "start": 8283,
+                          "end": 8316,
                           "loc": {
                             "start": {
-                              "line": 307,
+                              "line": 309,
                               "column": 3
                             },
                             "end": {
-                              "line": 307,
+                              "line": 309,
                               "column": 36
                             }
                           },
                           "expression": {
                             "type": "AssignmentExpression",
-                            "start": 8238,
-                            "end": 8271,
+                            "start": 8283,
+                            "end": 8316,
                             "loc": {
                               "start": {
-                                "line": 307,
+                                "line": 309,
                                 "column": 3
                               },
                               "end": {
-                                "line": 307,
+                                "line": 309,
                                 "column": 36
                               }
                             },
                             "operator": "=",
                             "left": {
                               "type": "MemberExpression",
-                              "start": 8238,
-                              "end": 8246,
+                              "start": 8283,
+                              "end": 8291,
                               "loc": {
                                 "start": {
-                                  "line": 307,
+                                  "line": 309,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 307,
+                                  "line": 309,
                                   "column": 11
                                 }
                               },
                               "object": {
                                 "type": "ThisExpression",
-                                "start": 8238,
-                                "end": 8242,
+                                "start": 8283,
+                                "end": 8287,
                                 "loc": {
                                   "start": {
-                                    "line": 307,
+                                    "line": 309,
                                     "column": 3
                                   },
                                   "end": {
-                                    "line": 307,
+                                    "line": 309,
                                     "column": 7
                                   }
                                 }
                               },
                               "property": {
                                 "type": "Identifier",
-                                "start": 8243,
-                                "end": 8246,
+                                "start": 8288,
+                                "end": 8291,
                                 "loc": {
                                   "start": {
-                                    "line": 307,
+                                    "line": 309,
                                     "column": 8
                                   },
                                   "end": {
-                                    "line": 307,
+                                    "line": 309,
                                     "column": 11
                                   },
                                   "identifierName": "_id"
@@ -8905,15 +8905,15 @@
                             },
                             "right": {
                               "type": "UpdateExpression",
-                              "start": 8249,
-                              "end": 8271,
+                              "start": 8294,
+                              "end": 8316,
                               "loc": {
                                 "start": {
-                                  "line": 307,
+                                  "line": 309,
                                   "column": 14
                                 },
                                 "end": {
-                                  "line": 307,
+                                  "line": 309,
                                   "column": 36
                                 }
                               },
@@ -8921,58 +8921,58 @@
                               "prefix": false,
                               "argument": {
                                 "type": "MemberExpression",
-                                "start": 8249,
-                                "end": 8269,
+                                "start": 8294,
+                                "end": 8314,
                                 "loc": {
                                   "start": {
-                                    "line": 307,
+                                    "line": 309,
                                     "column": 14
                                   },
                                   "end": {
-                                    "line": 307,
+                                    "line": 309,
                                     "column": 34
                                   }
                                 },
                                 "object": {
                                   "type": "MemberExpression",
-                                  "start": 8249,
-                                  "end": 8259,
+                                  "start": 8294,
+                                  "end": 8304,
                                   "loc": {
                                     "start": {
-                                      "line": 307,
+                                      "line": 309,
                                       "column": 14
                                     },
                                     "end": {
-                                      "line": 307,
+                                      "line": 309,
                                       "column": 24
                                     }
                                   },
                                   "object": {
                                     "type": "ThisExpression",
-                                    "start": 8249,
-                                    "end": 8253,
+                                    "start": 8294,
+                                    "end": 8298,
                                     "loc": {
                                       "start": {
-                                        "line": 307,
+                                        "line": 309,
                                         "column": 14
                                       },
                                       "end": {
-                                        "line": 307,
+                                        "line": 309,
                                         "column": 18
                                       }
                                     }
                                   },
                                   "property": {
                                     "type": "Identifier",
-                                    "start": 8254,
-                                    "end": 8259,
+                                    "start": 8299,
+                                    "end": 8304,
                                     "loc": {
                                       "start": {
-                                        "line": 307,
+                                        "line": 309,
                                         "column": 19
                                       },
                                       "end": {
-                                        "line": 307,
+                                        "line": 309,
                                         "column": 24
                                       },
                                       "identifierName": "world"
@@ -8983,15 +8983,15 @@
                                 },
                                 "property": {
                                   "type": "Identifier",
-                                  "start": 8260,
-                                  "end": 8269,
+                                  "start": 8305,
+                                  "end": 8314,
                                   "loc": {
                                     "start": {
-                                      "line": 307,
+                                      "line": 309,
                                       "column": 25
                                     },
                                     "end": {
-                                      "line": 307,
+                                      "line": 309,
                                       "column": 34
                                     },
                                     "identifierName": "idCounter"
@@ -9005,100 +9005,100 @@
                         },
                         {
                           "type": "ExpressionStatement",
-                          "start": 8275,
-                          "end": 8314,
+                          "start": 8320,
+                          "end": 8359,
                           "loc": {
                             "start": {
-                              "line": 308,
+                              "line": 310,
                               "column": 3
                             },
                             "end": {
-                              "line": 308,
+                              "line": 310,
                               "column": 42
                             }
                           },
                           "expression": {
                             "type": "CallExpression",
-                            "start": 8275,
-                            "end": 8314,
+                            "start": 8320,
+                            "end": 8359,
                             "loc": {
                               "start": {
-                                "line": 308,
+                                "line": 310,
                                 "column": 3
                               },
                               "end": {
-                                "line": 308,
+                                "line": 310,
                                 "column": 42
                               }
                             },
                             "callee": {
                               "type": "MemberExpression",
-                              "start": 8275,
-                              "end": 8298,
+                              "start": 8320,
+                              "end": 8343,
                               "loc": {
                                 "start": {
-                                  "line": 308,
+                                  "line": 310,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 308,
+                                  "line": 310,
                                   "column": 26
                                 }
                               },
                               "object": {
                                 "type": "MemberExpression",
-                                "start": 8275,
-                                "end": 8294,
+                                "start": 8320,
+                                "end": 8339,
                                 "loc": {
                                   "start": {
-                                    "line": 308,
+                                    "line": 310,
                                     "column": 3
                                   },
                                   "end": {
-                                    "line": 308,
+                                    "line": 310,
                                     "column": 22
                                   }
                                 },
                                 "object": {
                                   "type": "MemberExpression",
-                                  "start": 8275,
-                                  "end": 8285,
+                                  "start": 8320,
+                                  "end": 8330,
                                   "loc": {
                                     "start": {
-                                      "line": 308,
+                                      "line": 310,
                                       "column": 3
                                     },
                                     "end": {
-                                      "line": 308,
+                                      "line": 310,
                                       "column": 13
                                     }
                                   },
                                   "object": {
                                     "type": "ThisExpression",
-                                    "start": 8275,
-                                    "end": 8279,
+                                    "start": 8320,
+                                    "end": 8324,
                                     "loc": {
                                       "start": {
-                                        "line": 308,
+                                        "line": 310,
                                         "column": 3
                                       },
                                       "end": {
-                                        "line": 308,
+                                        "line": 310,
                                         "column": 7
                                       }
                                     }
                                   },
                                   "property": {
                                     "type": "Identifier",
-                                    "start": 8280,
-                                    "end": 8285,
+                                    "start": 8325,
+                                    "end": 8330,
                                     "loc": {
                                       "start": {
-                                        "line": 308,
+                                        "line": 310,
                                         "column": 8
                                       },
                                       "end": {
-                                        "line": 308,
+                                        "line": 310,
                                         "column": 13
                                       },
                                       "identifierName": "world"
@@ -9109,15 +9109,15 @@
                                 },
                                 "property": {
                                   "type": "Identifier",
-                                  "start": 8286,
-                                  "end": 8294,
+                                  "start": 8331,
+                                  "end": 8339,
                                   "loc": {
                                     "start": {
-                                      "line": 308,
+                                      "line": 310,
                                       "column": 14
                                     },
                                     "end": {
-                                      "line": 308,
+                                      "line": 310,
                                       "column": 22
                                     },
                                     "identifierName": "entities"
@@ -9128,15 +9128,15 @@
                               },
                               "property": {
                                 "type": "Identifier",
-                                "start": 8295,
-                                "end": 8298,
+                                "start": 8340,
+                                "end": 8343,
                                 "loc": {
                                   "start": {
-                                    "line": 308,
+                                    "line": 310,
                                     "column": 23
                                   },
                                   "end": {
-                                    "line": 308,
+                                    "line": 310,
                                     "column": 26
                                   },
                                   "identifierName": "set"
@@ -9148,44 +9148,44 @@
                             "arguments": [
                               {
                                 "type": "MemberExpression",
-                                "start": 8299,
-                                "end": 8307,
+                                "start": 8344,
+                                "end": 8352,
                                 "loc": {
                                   "start": {
-                                    "line": 308,
+                                    "line": 310,
                                     "column": 27
                                   },
                                   "end": {
-                                    "line": 308,
+                                    "line": 310,
                                     "column": 35
                                   }
                                 },
                                 "object": {
                                   "type": "ThisExpression",
-                                  "start": 8299,
-                                  "end": 8303,
+                                  "start": 8344,
+                                  "end": 8348,
                                   "loc": {
                                     "start": {
-                                      "line": 308,
+                                      "line": 310,
                                       "column": 27
                                     },
                                     "end": {
-                                      "line": 308,
+                                      "line": 310,
                                       "column": 31
                                     }
                                   }
                                 },
                                 "property": {
                                   "type": "Identifier",
-                                  "start": 8304,
-                                  "end": 8307,
+                                  "start": 8349,
+                                  "end": 8352,
                                   "loc": {
                                     "start": {
-                                      "line": 308,
+                                      "line": 310,
                                       "column": 32
                                     },
                                     "end": {
-                                      "line": 308,
+                                      "line": 310,
                                       "column": 35
                                     },
                                     "identifierName": "_id"
@@ -9196,15 +9196,15 @@
                               },
                               {
                                 "type": "ThisExpression",
-                                "start": 8309,
-                                "end": 8313,
+                                "start": 8354,
+                                "end": 8358,
                                 "loc": {
                                   "start": {
-                                    "line": 308,
+                                    "line": 310,
                                     "column": 37
                                   },
                                   "end": {
-                                    "line": 308,
+                                    "line": 310,
                                     "column": 41
                                   }
                                 }
@@ -9214,100 +9214,100 @@
                         },
                         {
                           "type": "ExpressionStatement",
-                          "start": 8318,
-                          "end": 8350,
+                          "start": 8363,
+                          "end": 8395,
                           "loc": {
                             "start": {
-                              "line": 309,
+                              "line": 311,
                               "column": 3
                             },
                             "end": {
-                              "line": 309,
+                              "line": 311,
                               "column": 35
                             }
                           },
                           "expression": {
                             "type": "CallExpression",
-                            "start": 8318,
-                            "end": 8350,
+                            "start": 8363,
+                            "end": 8395,
                             "loc": {
                               "start": {
-                                "line": 309,
+                                "line": 311,
                                 "column": 3
                               },
                               "end": {
-                                "line": 309,
+                                "line": 311,
                                 "column": 35
                               }
                             },
                             "callee": {
                               "type": "MemberExpression",
-                              "start": 8318,
-                              "end": 8344,
+                              "start": 8363,
+                              "end": 8389,
                               "loc": {
                                 "start": {
-                                  "line": 309,
+                                  "line": 311,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 309,
+                                  "line": 311,
                                   "column": 29
                                 }
                               },
                               "object": {
                                 "type": "MemberExpression",
-                                "start": 8318,
-                                "end": 8334,
+                                "start": 8363,
+                                "end": 8379,
                                 "loc": {
                                   "start": {
-                                    "line": 309,
+                                    "line": 311,
                                     "column": 3
                                   },
                                   "end": {
-                                    "line": 309,
+                                    "line": 311,
                                     "column": 19
                                   }
                                 },
                                 "object": {
                                   "type": "MemberExpression",
-                                  "start": 8318,
-                                  "end": 8328,
+                                  "start": 8363,
+                                  "end": 8373,
                                   "loc": {
                                     "start": {
-                                      "line": 309,
+                                      "line": 311,
                                       "column": 3
                                     },
                                     "end": {
-                                      "line": 309,
+                                      "line": 311,
                                       "column": 13
                                     }
                                   },
                                   "object": {
                                     "type": "ThisExpression",
-                                    "start": 8318,
-                                    "end": 8322,
+                                    "start": 8363,
+                                    "end": 8367,
                                     "loc": {
                                       "start": {
-                                        "line": 309,
+                                        "line": 311,
                                         "column": 3
                                       },
                                       "end": {
-                                        "line": 309,
+                                        "line": 311,
                                         "column": 7
                                       }
                                     }
                                   },
                                   "property": {
                                     "type": "Identifier",
-                                    "start": 8323,
-                                    "end": 8328,
+                                    "start": 8368,
+                                    "end": 8373,
                                     "loc": {
                                       "start": {
-                                        "line": 309,
+                                        "line": 311,
                                         "column": 8
                                       },
                                       "end": {
-                                        "line": 309,
+                                        "line": 311,
                                         "column": 13
                                       },
                                       "identifierName": "world"
@@ -9318,15 +9318,15 @@
                                 },
                                 "property": {
                                   "type": "Identifier",
-                                  "start": 8329,
-                                  "end": 8334,
+                                  "start": 8374,
+                                  "end": 8379,
                                   "loc": {
                                     "start": {
-                                      "line": 309,
+                                      "line": 311,
                                       "column": 14
                                     },
                                     "end": {
-                                      "line": 309,
+                                      "line": 311,
                                       "column": 19
                                     },
                                     "identifierName": "index"
@@ -9337,15 +9337,15 @@
                               },
                               "property": {
                                 "type": "Identifier",
-                                "start": 8335,
-                                "end": 8344,
+                                "start": 8380,
+                                "end": 8389,
                                 "loc": {
                                   "start": {
-                                    "line": 309,
+                                    "line": 311,
                                     "column": 20
                                   },
                                   "end": {
-                                    "line": 309,
+                                    "line": 311,
                                     "column": 29
                                   },
                                   "identifierName": "addEntity"
@@ -9357,15 +9357,15 @@
                             "arguments": [
                               {
                                 "type": "ThisExpression",
-                                "start": 8345,
-                                "end": 8349,
+                                "start": 8390,
+                                "end": 8394,
                                 "loc": {
                                   "start": {
-                                    "line": 309,
+                                    "line": 311,
                                     "column": 30
                                   },
                                   "end": {
-                                    "line": 309,
+                                    "line": 311,
                                     "column": 34
                                   }
                                 }
@@ -9386,15 +9386,15 @@
                 {
                   "type": "CommentBlock",
                   "value": "*\n\t * Attaches a currently detached entity back to a world.\n\t * Note: Do not use detached entities, get() may be safe, but avoid calling other methods\n\t * Note: The ID will be reassigned, so do not rely on this\n\t *\n\t * @example\n\t * entity.attach(world)\n\t *\n\t * @param {World} world - The world to attach this entity to\n\t ",
-                  "start": 7795,
-                  "end": 8120,
+                  "start": 7840,
+                  "end": 8165,
                   "loc": {
                     "start": {
-                      "line": 293,
+                      "line": 295,
                       "column": 1
                     },
                     "end": {
-                      "line": 302,
+                      "line": 304,
                       "column": 4
                     }
                   }
@@ -9404,15 +9404,15 @@
                 {
                   "type": "CommentBlock",
                   "value": "*\n\t * Removes this entity from the current world, without removing any components or data.\n\t * It can be re-attached to another world (or the same world), using the attach() method.\n\t * Note: Do not use detached entities, get() may be safe, but avoid calling other methods\n\t * Note: The ID will be reassigned, so do not rely on this\n\t *\n\t * @example\n\t * entity.detach()\n\t ",
-                  "start": 8360,
-                  "end": 8736,
+                  "start": 8405,
+                  "end": 8781,
                   "loc": {
                     "start": {
-                      "line": 313,
+                      "line": 315,
                       "column": 1
                     },
                     "end": {
-                      "line": 321,
+                      "line": 323,
                       "column": 4
                     }
                   }
@@ -9421,15 +9421,15 @@
             },
             {
               "type": "ClassMethod",
-              "start": 8738,
-              "end": 8938,
+              "start": 8783,
+              "end": 8983,
               "loc": {
                 "start": {
-                  "line": 322,
+                  "line": 324,
                   "column": 1
                 },
                 "end": {
-                  "line": 330,
+                  "line": 332,
                   "column": 2
                 }
               },
@@ -9437,15 +9437,15 @@
               "computed": false,
               "key": {
                 "type": "Identifier",
-                "start": 8738,
-                "end": 8744,
+                "start": 8783,
+                "end": 8789,
                 "loc": {
                   "start": {
-                    "line": 322,
+                    "line": 324,
                     "column": 1
                   },
                   "end": {
-                    "line": 322,
+                    "line": 324,
                     "column": 7
                   },
                   "identifierName": "detach"
@@ -9461,87 +9461,87 @@
               "params": [],
               "body": {
                 "type": "BlockStatement",
-                "start": 8747,
-                "end": 8938,
+                "start": 8792,
+                "end": 8983,
                 "loc": {
                   "start": {
-                    "line": 322,
+                    "line": 324,
                     "column": 10
                   },
                   "end": {
-                    "line": 330,
+                    "line": 332,
                     "column": 2
                   }
                 },
                 "body": [
                   {
                     "type": "IfStatement",
-                    "start": 8751,
-                    "end": 8935,
+                    "start": 8796,
+                    "end": 8980,
                     "loc": {
                       "start": {
-                        "line": 323,
+                        "line": 325,
                         "column": 2
                       },
                       "end": {
-                        "line": 329,
+                        "line": 331,
                         "column": 3
                       }
                     },
                     "test": {
                       "type": "CallExpression",
-                      "start": 8755,
-                      "end": 8767,
+                      "start": 8800,
+                      "end": 8812,
                       "loc": {
                         "start": {
-                          "line": 323,
+                          "line": 325,
                           "column": 6
                         },
                         "end": {
-                          "line": 323,
+                          "line": 325,
                           "column": 18
                         }
                       },
                       "callee": {
                         "type": "MemberExpression",
-                        "start": 8755,
-                        "end": 8765,
+                        "start": 8800,
+                        "end": 8810,
                         "loc": {
                           "start": {
-                            "line": 323,
+                            "line": 325,
                             "column": 6
                           },
                           "end": {
-                            "line": 323,
+                            "line": 325,
                             "column": 16
                           }
                         },
                         "object": {
                           "type": "ThisExpression",
-                          "start": 8755,
-                          "end": 8759,
+                          "start": 8800,
+                          "end": 8804,
                           "loc": {
                             "start": {
-                              "line": 323,
+                              "line": 325,
                               "column": 6
                             },
                             "end": {
-                              "line": 323,
+                              "line": 325,
                               "column": 10
                             }
                           }
                         },
                         "property": {
                           "type": "Identifier",
-                          "start": 8760,
-                          "end": 8765,
+                          "start": 8805,
+                          "end": 8810,
                           "loc": {
                             "start": {
-                              "line": 323,
+                              "line": 325,
                               "column": 11
                             },
                             "end": {
-                              "line": 323,
+                              "line": 325,
                               "column": 16
                             },
                             "identifierName": "valid"
@@ -9554,100 +9554,100 @@
                     },
                     "consequent": {
                       "type": "BlockStatement",
-                      "start": 8769,
-                      "end": 8935,
+                      "start": 8814,
+                      "end": 8980,
                       "loc": {
                         "start": {
-                          "line": 323,
+                          "line": 325,
                           "column": 20
                         },
                         "end": {
-                          "line": 329,
+                          "line": 331,
                           "column": 3
                         }
                       },
                       "body": [
                         {
                           "type": "ExpressionStatement",
-                          "start": 8806,
-                          "end": 8841,
+                          "start": 8851,
+                          "end": 8886,
                           "loc": {
                             "start": {
-                              "line": 325,
+                              "line": 327,
                               "column": 3
                             },
                             "end": {
-                              "line": 325,
+                              "line": 327,
                               "column": 38
                             }
                           },
                           "expression": {
                             "type": "CallExpression",
-                            "start": 8806,
-                            "end": 8841,
+                            "start": 8851,
+                            "end": 8886,
                             "loc": {
                               "start": {
-                                "line": 325,
+                                "line": 327,
                                 "column": 3
                               },
                               "end": {
-                                "line": 325,
+                                "line": 327,
                                 "column": 38
                               }
                             },
                             "callee": {
                               "type": "MemberExpression",
-                              "start": 8806,
-                              "end": 8835,
+                              "start": 8851,
+                              "end": 8880,
                               "loc": {
                                 "start": {
-                                  "line": 325,
+                                  "line": 327,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 325,
+                                  "line": 327,
                                   "column": 32
                                 }
                               },
                               "object": {
                                 "type": "MemberExpression",
-                                "start": 8806,
-                                "end": 8822,
+                                "start": 8851,
+                                "end": 8867,
                                 "loc": {
                                   "start": {
-                                    "line": 325,
+                                    "line": 327,
                                     "column": 3
                                   },
                                   "end": {
-                                    "line": 325,
+                                    "line": 327,
                                     "column": 19
                                   }
                                 },
                                 "object": {
                                   "type": "MemberExpression",
-                                  "start": 8806,
-                                  "end": 8816,
+                                  "start": 8851,
+                                  "end": 8861,
                                   "loc": {
                                     "start": {
-                                      "line": 325,
+                                      "line": 327,
                                       "column": 3
                                     },
                                     "end": {
-                                      "line": 325,
+                                      "line": 327,
                                       "column": 13
                                     }
                                   },
                                   "object": {
                                     "type": "ThisExpression",
-                                    "start": 8806,
-                                    "end": 8810,
+                                    "start": 8851,
+                                    "end": 8855,
                                     "loc": {
                                       "start": {
-                                        "line": 325,
+                                        "line": 327,
                                         "column": 3
                                       },
                                       "end": {
-                                        "line": 325,
+                                        "line": 327,
                                         "column": 7
                                       }
                                     },
@@ -9655,15 +9655,15 @@
                                   },
                                   "property": {
                                     "type": "Identifier",
-                                    "start": 8811,
-                                    "end": 8816,
+                                    "start": 8856,
+                                    "end": 8861,
                                     "loc": {
                                       "start": {
-                                        "line": 325,
+                                        "line": 327,
                                         "column": 8
                                       },
                                       "end": {
-                                        "line": 325,
+                                        "line": 327,
                                         "column": 13
                                       },
                                       "identifierName": "world"
@@ -9675,15 +9675,15 @@
                                 },
                                 "property": {
                                   "type": "Identifier",
-                                  "start": 8817,
-                                  "end": 8822,
+                                  "start": 8862,
+                                  "end": 8867,
                                   "loc": {
                                     "start": {
-                                      "line": 325,
+                                      "line": 327,
                                       "column": 14
                                     },
                                     "end": {
-                                      "line": 325,
+                                      "line": 327,
                                       "column": 19
                                     },
                                     "identifierName": "index"
@@ -9695,15 +9695,15 @@
                               },
                               "property": {
                                 "type": "Identifier",
-                                "start": 8823,
-                                "end": 8835,
+                                "start": 8868,
+                                "end": 8880,
                                 "loc": {
                                   "start": {
-                                    "line": 325,
+                                    "line": 327,
                                     "column": 20
                                   },
                                   "end": {
-                                    "line": 325,
+                                    "line": 327,
                                     "column": 32
                                   },
                                   "identifierName": "removeEntity"
@@ -9716,15 +9716,15 @@
                             "arguments": [
                               {
                                 "type": "ThisExpression",
-                                "start": 8836,
-                                "end": 8840,
+                                "start": 8881,
+                                "end": 8885,
                                 "loc": {
                                   "start": {
-                                    "line": 325,
+                                    "line": 327,
                                     "column": 33
                                   },
                                   "end": {
-                                    "line": 325,
+                                    "line": 327,
                                     "column": 37
                                   }
                                 }
@@ -9736,15 +9736,15 @@
                             {
                               "type": "CommentLine",
                               "value": " Remove from current world",
-                              "start": 8774,
-                              "end": 8802,
+                              "start": 8819,
+                              "end": 8847,
                               "loc": {
                                 "start": {
-                                  "line": 324,
+                                  "line": 326,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 324,
+                                  "line": 326,
                                   "column": 31
                                 }
                               }
@@ -9753,100 +9753,100 @@
                         },
                         {
                           "type": "ExpressionStatement",
-                          "start": 8845,
-                          "end": 8881,
+                          "start": 8890,
+                          "end": 8926,
                           "loc": {
                             "start": {
-                              "line": 326,
+                              "line": 328,
                               "column": 3
                             },
                             "end": {
-                              "line": 326,
+                              "line": 328,
                               "column": 39
                             }
                           },
                           "expression": {
                             "type": "CallExpression",
-                            "start": 8845,
-                            "end": 8881,
+                            "start": 8890,
+                            "end": 8926,
                             "loc": {
                               "start": {
-                                "line": 326,
+                                "line": 328,
                                 "column": 3
                               },
                               "end": {
-                                "line": 326,
+                                "line": 328,
                                 "column": 39
                               }
                             },
                             "callee": {
                               "type": "MemberExpression",
-                              "start": 8845,
-                              "end": 8871,
+                              "start": 8890,
+                              "end": 8916,
                               "loc": {
                                 "start": {
-                                  "line": 326,
+                                  "line": 328,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 326,
+                                  "line": 328,
                                   "column": 29
                                 }
                               },
                               "object": {
                                 "type": "MemberExpression",
-                                "start": 8845,
-                                "end": 8864,
+                                "start": 8890,
+                                "end": 8909,
                                 "loc": {
                                   "start": {
-                                    "line": 326,
+                                    "line": 328,
                                     "column": 3
                                   },
                                   "end": {
-                                    "line": 326,
+                                    "line": 328,
                                     "column": 22
                                   }
                                 },
                                 "object": {
                                   "type": "MemberExpression",
-                                  "start": 8845,
-                                  "end": 8855,
+                                  "start": 8890,
+                                  "end": 8900,
                                   "loc": {
                                     "start": {
-                                      "line": 326,
+                                      "line": 328,
                                       "column": 3
                                     },
                                     "end": {
-                                      "line": 326,
+                                      "line": 328,
                                       "column": 13
                                     }
                                   },
                                   "object": {
                                     "type": "ThisExpression",
-                                    "start": 8845,
-                                    "end": 8849,
+                                    "start": 8890,
+                                    "end": 8894,
                                     "loc": {
                                       "start": {
-                                        "line": 326,
+                                        "line": 328,
                                         "column": 3
                                       },
                                       "end": {
-                                        "line": 326,
+                                        "line": 328,
                                         "column": 7
                                       }
                                     }
                                   },
                                   "property": {
                                     "type": "Identifier",
-                                    "start": 8850,
-                                    "end": 8855,
+                                    "start": 8895,
+                                    "end": 8900,
                                     "loc": {
                                       "start": {
-                                        "line": 326,
+                                        "line": 328,
                                         "column": 8
                                       },
                                       "end": {
-                                        "line": 326,
+                                        "line": 328,
                                         "column": 13
                                       },
                                       "identifierName": "world"
@@ -9857,15 +9857,15 @@
                                 },
                                 "property": {
                                   "type": "Identifier",
-                                  "start": 8856,
-                                  "end": 8864,
+                                  "start": 8901,
+                                  "end": 8909,
                                   "loc": {
                                     "start": {
-                                      "line": 326,
+                                      "line": 328,
                                       "column": 14
                                     },
                                     "end": {
-                                      "line": 326,
+                                      "line": 328,
                                       "column": 22
                                     },
                                     "identifierName": "entities"
@@ -9876,15 +9876,15 @@
                               },
                               "property": {
                                 "type": "Identifier",
-                                "start": 8865,
-                                "end": 8871,
+                                "start": 8910,
+                                "end": 8916,
                                 "loc": {
                                   "start": {
-                                    "line": 326,
+                                    "line": 328,
                                     "column": 23
                                   },
                                   "end": {
-                                    "line": 326,
+                                    "line": 328,
                                     "column": 29
                                   },
                                   "identifierName": "delete"
@@ -9896,44 +9896,44 @@
                             "arguments": [
                               {
                                 "type": "MemberExpression",
-                                "start": 8872,
-                                "end": 8880,
+                                "start": 8917,
+                                "end": 8925,
                                 "loc": {
                                   "start": {
-                                    "line": 326,
+                                    "line": 328,
                                     "column": 30
                                   },
                                   "end": {
-                                    "line": 326,
+                                    "line": 328,
                                     "column": 38
                                   }
                                 },
                                 "object": {
                                   "type": "ThisExpression",
-                                  "start": 8872,
-                                  "end": 8876,
+                                  "start": 8917,
+                                  "end": 8921,
                                   "loc": {
                                     "start": {
-                                      "line": 326,
+                                      "line": 328,
                                       "column": 30
                                     },
                                     "end": {
-                                      "line": 326,
+                                      "line": 328,
                                       "column": 34
                                     }
                                   }
                                 },
                                 "property": {
                                   "type": "Identifier",
-                                  "start": 8877,
-                                  "end": 8880,
+                                  "start": 8922,
+                                  "end": 8925,
                                   "loc": {
                                     "start": {
-                                      "line": 326,
+                                      "line": 328,
                                       "column": 35
                                     },
                                     "end": {
-                                      "line": 326,
+                                      "line": 328,
                                       "column": 38
                                     },
                                     "identifierName": "_id"
@@ -9947,73 +9947,73 @@
                         },
                         {
                           "type": "ExpressionStatement",
-                          "start": 8885,
-                          "end": 8905,
+                          "start": 8930,
+                          "end": 8950,
                           "loc": {
                             "start": {
-                              "line": 327,
+                              "line": 329,
                               "column": 3
                             },
                             "end": {
-                              "line": 327,
+                              "line": 329,
                               "column": 23
                             }
                           },
                           "expression": {
                             "type": "AssignmentExpression",
-                            "start": 8885,
-                            "end": 8905,
+                            "start": 8930,
+                            "end": 8950,
                             "loc": {
                               "start": {
-                                "line": 327,
+                                "line": 329,
                                 "column": 3
                               },
                               "end": {
-                                "line": 327,
+                                "line": 329,
                                 "column": 23
                               }
                             },
                             "operator": "=",
                             "left": {
                               "type": "MemberExpression",
-                              "start": 8885,
-                              "end": 8893,
+                              "start": 8930,
+                              "end": 8938,
                               "loc": {
                                 "start": {
-                                  "line": 327,
+                                  "line": 329,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 327,
+                                  "line": 329,
                                   "column": 11
                                 }
                               },
                               "object": {
                                 "type": "ThisExpression",
-                                "start": 8885,
-                                "end": 8889,
+                                "start": 8930,
+                                "end": 8934,
                                 "loc": {
                                   "start": {
-                                    "line": 327,
+                                    "line": 329,
                                     "column": 3
                                   },
                                   "end": {
-                                    "line": 327,
+                                    "line": 329,
                                     "column": 7
                                   }
                                 }
                               },
                               "property": {
                                 "type": "Identifier",
-                                "start": 8890,
-                                "end": 8893,
+                                "start": 8935,
+                                "end": 8938,
                                 "loc": {
                                   "start": {
-                                    "line": 327,
+                                    "line": 329,
                                     "column": 8
                                   },
                                   "end": {
-                                    "line": 327,
+                                    "line": 329,
                                     "column": 11
                                   },
                                   "identifierName": "_id"
@@ -10024,15 +10024,15 @@
                             },
                             "right": {
                               "type": "Identifier",
-                              "start": 8896,
-                              "end": 8905,
+                              "start": 8941,
+                              "end": 8950,
                               "loc": {
                                 "start": {
-                                  "line": 327,
+                                  "line": 329,
                                   "column": 14
                                 },
                                 "end": {
-                                  "line": 327,
+                                  "line": 329,
                                   "column": 23
                                 },
                                 "identifierName": "undefined"
@@ -10043,73 +10043,73 @@
                         },
                         {
                           "type": "ExpressionStatement",
-                          "start": 8909,
-                          "end": 8931,
+                          "start": 8954,
+                          "end": 8976,
                           "loc": {
                             "start": {
-                              "line": 328,
+                              "line": 330,
                               "column": 3
                             },
                             "end": {
-                              "line": 328,
+                              "line": 330,
                               "column": 25
                             }
                           },
                           "expression": {
                             "type": "AssignmentExpression",
-                            "start": 8909,
-                            "end": 8931,
+                            "start": 8954,
+                            "end": 8976,
                             "loc": {
                               "start": {
-                                "line": 328,
+                                "line": 330,
                                 "column": 3
                               },
                               "end": {
-                                "line": 328,
+                                "line": 330,
                                 "column": 25
                               }
                             },
                             "operator": "=",
                             "left": {
                               "type": "MemberExpression",
-                              "start": 8909,
-                              "end": 8919,
+                              "start": 8954,
+                              "end": 8964,
                               "loc": {
                                 "start": {
-                                  "line": 328,
+                                  "line": 330,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 328,
+                                  "line": 330,
                                   "column": 13
                                 }
                               },
                               "object": {
                                 "type": "ThisExpression",
-                                "start": 8909,
-                                "end": 8913,
+                                "start": 8954,
+                                "end": 8958,
                                 "loc": {
                                   "start": {
-                                    "line": 328,
+                                    "line": 330,
                                     "column": 3
                                   },
                                   "end": {
-                                    "line": 328,
+                                    "line": 330,
                                     "column": 7
                                   }
                                 }
                               },
                               "property": {
                                 "type": "Identifier",
-                                "start": 8914,
-                                "end": 8919,
+                                "start": 8959,
+                                "end": 8964,
                                 "loc": {
                                   "start": {
-                                    "line": 328,
+                                    "line": 330,
                                     "column": 8
                                   },
                                   "end": {
-                                    "line": 328,
+                                    "line": 330,
                                     "column": 13
                                   },
                                   "identifierName": "world"
@@ -10120,15 +10120,15 @@
                             },
                             "right": {
                               "type": "Identifier",
-                              "start": 8922,
-                              "end": 8931,
+                              "start": 8967,
+                              "end": 8976,
                               "loc": {
                                 "start": {
-                                  "line": 328,
+                                  "line": 330,
                                   "column": 16
                                 },
                                 "end": {
-                                  "line": 328,
+                                  "line": 330,
                                   "column": 25
                                 },
                                 "identifierName": "undefined"
@@ -10149,15 +10149,15 @@
                 {
                   "type": "CommentBlock",
                   "value": "*\n\t * Removes this entity from the current world, without removing any components or data.\n\t * It can be re-attached to another world (or the same world), using the attach() method.\n\t * Note: Do not use detached entities, get() may be safe, but avoid calling other methods\n\t * Note: The ID will be reassigned, so do not rely on this\n\t *\n\t * @example\n\t * entity.detach()\n\t ",
-                  "start": 8360,
-                  "end": 8736,
+                  "start": 8405,
+                  "end": 8781,
                   "loc": {
                     "start": {
-                      "line": 313,
+                      "line": 315,
                       "column": 1
                     },
                     "end": {
-                      "line": 321,
+                      "line": 323,
                       "column": 4
                     }
                   }
@@ -10187,58 +10187,58 @@
       },
       {
         "type": "ExpressionStatement",
-        "start": 8942,
-        "end": 8965,
+        "start": 8987,
+        "end": 9010,
         "loc": {
           "start": {
-            "line": 333,
+            "line": 335,
             "column": 0
           },
           "end": {
-            "line": 333,
+            "line": 335,
             "column": 23
           }
         },
         "expression": {
           "type": "AssignmentExpression",
-          "start": 8942,
-          "end": 8965,
+          "start": 8987,
+          "end": 9010,
           "loc": {
             "start": {
-              "line": 333,
+              "line": 335,
               "column": 0
             },
             "end": {
-              "line": 333,
+              "line": 335,
               "column": 23
             }
           },
           "operator": "=",
           "left": {
             "type": "MemberExpression",
-            "start": 8942,
-            "end": 8956,
+            "start": 8987,
+            "end": 9001,
             "loc": {
               "start": {
-                "line": 333,
+                "line": 335,
                 "column": 0
               },
               "end": {
-                "line": 333,
+                "line": 335,
                 "column": 14
               }
             },
             "object": {
               "type": "Identifier",
-              "start": 8942,
-              "end": 8949,
+              "start": 8987,
+              "end": 8994,
               "loc": {
                 "start": {
-                  "line": 333,
+                  "line": 335,
                   "column": 0
                 },
                 "end": {
-                  "line": 333,
+                  "line": 335,
                   "column": 7
                 },
                 "identifierName": "exports"
@@ -10247,15 +10247,15 @@
             },
             "property": {
               "type": "Identifier",
-              "start": 8950,
-              "end": 8956,
+              "start": 8995,
+              "end": 9001,
               "loc": {
                 "start": {
-                  "line": 333,
+                  "line": 335,
                   "column": 8
                 },
                 "end": {
-                  "line": 333,
+                  "line": 335,
                   "column": 14
                 },
                 "identifierName": "Entity"
@@ -10266,15 +10266,15 @@
           },
           "right": {
             "type": "Identifier",
-            "start": 8959,
-            "end": 8965,
+            "start": 9004,
+            "end": 9010,
             "loc": {
               "start": {
-                "line": 333,
+                "line": 335,
                 "column": 17
               },
               "end": {
-                "line": 333,
+                "line": 335,
                 "column": 23
               },
               "identifierName": "Entity"
@@ -10417,16 +10417,16 @@
     },
     {
       "type": "CommentBlock",
-      "value": "*\n\t * ID is read-only, attempting to set it will throw an error.\n\t *\n\t * @private\n\t ",
+      "value": "*\n\t * ID is read-only, attempting to set it will throw an error.\n\t *\n\t * @private\n\t *\n\t * @throws {Error} Cannot set entity id\n\t ",
       "start": 794,
-      "end": 882,
+      "end": 927,
       "loc": {
         "start": {
           "line": 44,
           "column": 1
         },
         "end": {
-          "line": 48,
+          "line": 50,
           "column": 4
         }
       }
@@ -10434,15 +10434,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Returns true if the entity has ALL of the specified component names.\n\t * Additional components that the entity has, which are not specified in has(), will be ignored.\n\t * If no component names are specified, this method returns true.\n\t *\n\t * @example\n\t * if (entity.has('position', 'velocity')) {...}\n\t *\n\t * @param {...string} [components] - The component names to check for\n\t *\n\t * @return {boolean} true or false\n\t ",
-      "start": 944,
-      "end": 1372,
+      "start": 989,
+      "end": 1417,
       "loc": {
         "start": {
-          "line": 53,
+          "line": 55,
           "column": 1
         },
         "end": {
-          "line": 64,
+          "line": 66,
           "column": 4
         }
       }
@@ -10450,15 +10450,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Returns a component by name, or undefined if it doesn't exist\n\t *\n\t * @example\n\t * let position = entity.get('position')\n\t *\n\t * @param {string} component - The component name to get\n\t *\n\t * @return {Object} The component if defined, otherwise undefined\n\t ",
-      "start": 1453,
-      "end": 1719,
+      "start": 1498,
+      "end": 1764,
       "loc": {
         "start": {
-          "line": 69,
+          "line": 71,
           "column": 1
         },
         "end": {
-          "line": 78,
+          "line": 80,
           "column": 4
         }
       }
@@ -10466,15 +10466,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Returns a component by name (automatically created if it doesn't exist)\n\t *\n\t * @example\n\t * let position = entity.access('position', 3, 4)\n\t *\n\t * @param {string}    component - The component name to create/get\n\t * @param {...Object} [args]    - The arguments to forward to create the new component, only if it doesn't exist.\n\t *\n\t * @return {Object} Always returns either the existing component, or the newly created one.\n\t ",
-      "start": 1773,
-      "end": 2209,
+      "start": 1818,
+      "end": 2254,
       "loc": {
         "start": {
-          "line": 83,
+          "line": 85,
           "column": 1
         },
         "end": {
-          "line": 93,
+          "line": 95,
           "column": 4
         }
       }
@@ -10482,15 +10482,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Adds a new component, or re-creates and overwrites an existing component\n\t *\n\t * @example\n\t * entity.set('position', 1, 2)\n\t *\n\t * @example\n\t * entity.set('anonymousComponent', { keys: 'values' })\n\t *\n\t * @example\n\t * entity.set('anotherAnonymousComponent', 'Any type of any value')\n\t *\n\t * @param {string}    component - The component name to create. If there is a registered component for this name, then\n\t * its constructor will be called and an object of that type will be created.\n\t * @param {...Object} [args]    - The arguments to forward to the registered component type. If the component type is\n\t * registered, then only the first additional argument will be used as the value of the entire component.\n\t *\n\t * @return {Object} The original entity that set() was called on, so that operations can be chained.\n\t ",
-      "start": 2341,
-      "end": 3171,
+      "start": 2386,
+      "end": 3216,
       "loc": {
         "start": {
-          "line": 101,
+          "line": 103,
           "column": 1
         },
         "end": {
-          "line": 119,
+          "line": 121,
           "column": 4
         }
       }
@@ -10498,15 +10498,15 @@
     {
       "type": "CommentLine",
       "value": " Use defined component template, passing entity as first parameter",
-      "start": 3262,
-      "end": 3330,
+      "start": 3307,
+      "end": 3375,
       "loc": {
         "start": {
-          "line": 122,
+          "line": 124,
           "column": 3
         },
         "end": {
-          "line": 122,
+          "line": 124,
           "column": 71
         }
       }
@@ -10514,15 +10514,15 @@
     {
       "type": "CommentLine",
       "value": " Use first argument as component value",
-      "start": 3444,
-      "end": 3484,
+      "start": 3489,
+      "end": 3529,
       "loc": {
         "start": {
-          "line": 125,
+          "line": 127,
           "column": 3
         },
         "end": {
-          "line": 125,
+          "line": 127,
           "column": 43
         }
       }
@@ -10530,15 +10530,15 @@
     {
       "type": "CommentLine",
       "value": " Make an empty object",
-      "start": 3533,
-      "end": 3556,
+      "start": 3578,
+      "end": 3601,
       "loc": {
         "start": {
-          "line": 128,
+          "line": 130,
           "column": 3
         },
         "end": {
-          "line": 128,
+          "line": 130,
           "column": 26
         }
       }
@@ -10546,15 +10546,15 @@
     {
       "type": "CommentLine",
       "value": " Update the index with this new component",
-      "start": 3593,
-      "end": 3636,
+      "start": 3638,
+      "end": 3681,
       "loc": {
         "start": {
-          "line": 132,
+          "line": 134,
           "column": 2
         },
         "end": {
-          "line": 132,
+          "line": 134,
           "column": 45
         }
       }
@@ -10562,15 +10562,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Updates component data from an object or other component. Similar to access() with a shallow merge applied after.\n\t *\n\t * @example\n\t * entity.update('position', { x: 1, y: 2 })\n\t *\n\t * @param {string} component - The component name to update\n\t * @param {Object} data      - The object or other component to merge into the specified component.\n\t *\n\t * @return {Object} The original entity that update() was called on, so that operations can be chained.\n\t ",
-      "start": 3724,
-      "end": 4188,
+      "start": 3769,
+      "end": 4233,
       "loc": {
         "start": {
-          "line": 140,
+          "line": 142,
           "column": 1
         },
         "end": {
-          "line": 150,
+          "line": 152,
           "column": 4
         }
       }
@@ -10578,15 +10578,15 @@
     {
       "type": "CommentLine",
       "value": " Shallow set keys of the component",
-      "start": 4255,
-      "end": 4291,
+      "start": 4300,
+      "end": 4336,
       "loc": {
         "start": {
-          "line": 154,
+          "line": 156,
           "column": 2
         },
         "end": {
-          "line": 154,
+          "line": 156,
           "column": 38
         }
       }
@@ -10594,15 +10594,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Removes a component from the entity - has no effect when it doesn't exist.\n\t * Can specify an onRemove() method in your component which gets called before it is removed.\n\t * If nothing is specified, then nothing will be removed. Use removeAll() to remove all components.\n\t *\n\t * @example\n\t * entity.remove('position')\n\t *\n\t * @param {...string} [components] - The component names to remove from the entity.\n\t *\n\t * @return {Object} The original entity that remove() was called on, so that operations can be chained.\n\t ",
-      "start": 4367,
-      "end": 4895,
+      "start": 4412,
+      "end": 4940,
       "loc": {
         "start": {
-          "line": 162,
+          "line": 164,
           "column": 1
         },
         "end": {
-          "line": 173,
+          "line": 175,
           "column": 4
         }
       }
@@ -10610,15 +10610,15 @@
     {
       "type": "CommentLine",
       "value": " Remove from index",
-      "start": 4997,
-      "end": 5017,
+      "start": 5042,
+      "end": 5062,
       "loc": {
         "start": {
-          "line": 178,
+          "line": 180,
           "column": 4
         },
         "end": {
-          "line": 178,
+          "line": 180,
           "column": 24
         }
       }
@@ -10626,15 +10626,15 @@
     {
       "type": "CommentLine",
       "value": " Call custom onRemove",
-      "start": 5099,
-      "end": 5122,
+      "start": 5144,
+      "end": 5167,
       "loc": {
         "start": {
-          "line": 183,
+          "line": 185,
           "column": 4
         },
         "end": {
-          "line": 183,
+          "line": 185,
           "column": 27
         }
       }
@@ -10642,15 +10642,15 @@
     {
       "type": "CommentLine",
       "value": " Remove all components",
-      "start": 5229,
-      "end": 5253,
+      "start": 5274,
+      "end": 5298,
       "loc": {
         "start": {
-          "line": 192,
+          "line": 194,
           "column": 1
         },
         "end": {
-          "line": 192,
+          "line": 194,
           "column": 25
         }
       }
@@ -10658,15 +10658,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Removes all components from the entity.\n\t *\n\t * @example\n\t * entity.removeAll()\n\t *\n\t * @return {Object} The original entity that removeAll() was called on, so that operations can be chained.\n\t ",
-      "start": 5256,
-      "end": 5460,
+      "start": 5301,
+      "end": 5505,
       "loc": {
         "start": {
-          "line": 194,
+          "line": 196,
           "column": 1
         },
         "end": {
-          "line": 201,
+          "line": 203,
           "column": 4
         }
       }
@@ -10674,15 +10674,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Remove this entity and all of its components from the world. After an entity is destroyed, the object should be discarded,\n\t * and it is recommended to avoid re-using it.\n\t *\n\t * @example\n\t * entity.destroy()\n\t ",
-      "start": 5553,
-      "end": 5774,
+      "start": 5598,
+      "end": 5819,
       "loc": {
         "start": {
-          "line": 208,
+          "line": 210,
           "column": 1
         },
         "end": {
-          "line": 214,
+          "line": 216,
           "column": 4
         }
       }
@@ -10690,15 +10690,15 @@
     {
       "type": "CommentLine",
       "value": " Remove from the index, to update match all index",
-      "start": 5833,
-      "end": 5884,
+      "start": 5878,
+      "end": 5929,
       "loc": {
         "start": {
-          "line": 219,
+          "line": 221,
           "column": 3
         },
         "end": {
-          "line": 219,
+          "line": 221,
           "column": 54
         }
       }
@@ -10706,15 +10706,15 @@
     {
       "type": "CommentLine",
       "value": " Remove from world",
-      "start": 5922,
-      "end": 5942,
+      "start": 5967,
+      "end": 5987,
       "loc": {
         "start": {
-          "line": 222,
+          "line": 224,
           "column": 3
         },
         "end": {
-          "line": 222,
+          "line": 224,
           "column": 23
         }
       }
@@ -10722,15 +10722,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Returns true if this is a valid, existing, and usable entity, which is attached to a world.\n\t *\n\t * @example\n\t * if (entity.valid()) {...}\n\t *\n\t * @return {boolean} true or false\n\t ",
-      "start": 6016,
-      "end": 6207,
+      "start": 6061,
+      "end": 6252,
       "loc": {
         "start": {
-          "line": 228,
+          "line": 230,
           "column": 1
         },
         "end": {
-          "line": 235,
+          "line": 237,
           "column": 4
         }
       }
@@ -10738,15 +10738,15 @@
     {
       "type": "CommentLine",
       "value": " Note: No need to actually look in the world for the ID, if entities are only ever copied by reference.",
-      "start": 6221,
-      "end": 6326,
+      "start": 6266,
+      "end": 6371,
       "loc": {
         "start": {
-          "line": 237,
+          "line": 239,
           "column": 2
         },
         "end": {
-          "line": 237,
+          "line": 239,
           "column": 107
         }
       }
@@ -10754,15 +10754,15 @@
     {
       "type": "CommentLine",
       "value": " If entities are ever deep/shallow copied, this function will need to check this to be more robust.",
-      "start": 6329,
-      "end": 6430,
+      "start": 6374,
+      "end": 6475,
       "loc": {
         "start": {
-          "line": 238,
+          "line": 240,
           "column": 2
         },
         "end": {
-          "line": 238,
+          "line": 240,
           "column": 103
         }
       }
@@ -10770,15 +10770,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Returns unique entity ID as a string.\n\t *\n\t * @example\n\t * let entityId = entity.toString()\n\t *\n\t * @return {string} String representation of the entity ID.\n\t ",
-      "start": 6482,
-      "end": 6651,
+      "start": 6527,
+      "end": 6696,
       "loc": {
         "start": {
-          "line": 242,
+          "line": 244,
           "column": 1
         },
         "end": {
-          "line": 249,
+          "line": 251,
           "column": 4
         }
       }
@@ -10786,15 +10786,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Serializes entire entity and components to JSON.\n\t * Note: Defining toJSON methods in your components will override the built-in behavior.\n\t *\n\t * @example\n\t * let serializedEntity = entity.toJSON()\n\t *\n\t * @return {string} JSON encoded string\n\t ",
-      "start": 6697,
-      "end": 6953,
+      "start": 6742,
+      "end": 6998,
       "loc": {
         "start": {
-          "line": 254,
+          "line": 256,
           "column": 1
         },
         "end": {
-          "line": 262,
+          "line": 264,
           "column": 4
         }
       }
@@ -10802,15 +10802,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Deserializes data from JSON, creating new components and overwriting existing components.\n\t * Note: Defining fromJSON methods in your components will override the built-in behavior.\n\t *\n\t * @example\n\t * entity.fromJSON(serializedEntity)\n\t *\n\t * @param {string} data - A JSON string containing component data to parse, and store in this entity.\n\t *\n\t * @return {Object} The original entity that fromJSON() was called on, so that operations can be chained.\n\t ",
-      "start": 7006,
-      "end": 7473,
+      "start": 7051,
+      "end": 7518,
       "loc": {
         "start": {
-          "line": 267,
+          "line": 269,
           "column": 1
         },
         "end": {
-          "line": 277,
+          "line": 279,
           "column": 4
         }
       }
@@ -10818,15 +10818,15 @@
     {
       "type": "CommentLine",
       "value": " Either call custom method or copy all properties",
-      "start": 7589,
-      "end": 7640,
+      "start": 7634,
+      "end": 7685,
       "loc": {
         "start": {
-          "line": 283,
+          "line": 285,
           "column": 3
         },
         "end": {
-          "line": 283,
+          "line": 285,
           "column": 54
         }
       }
@@ -10834,15 +10834,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Attaches a currently detached entity back to a world.\n\t * Note: Do not use detached entities, get() may be safe, but avoid calling other methods\n\t * Note: The ID will be reassigned, so do not rely on this\n\t *\n\t * @example\n\t * entity.attach(world)\n\t *\n\t * @param {World} world - The world to attach this entity to\n\t ",
-      "start": 7795,
-      "end": 8120,
+      "start": 7840,
+      "end": 8165,
       "loc": {
         "start": {
-          "line": 293,
+          "line": 295,
           "column": 1
         },
         "end": {
-          "line": 302,
+          "line": 304,
           "column": 4
         }
       }
@@ -10850,15 +10850,15 @@
     {
       "type": "CommentLine",
       "value": " Assign new id, and reattach to world",
-      "start": 8173,
-      "end": 8212,
+      "start": 8218,
+      "end": 8257,
       "loc": {
         "start": {
-          "line": 305,
+          "line": 307,
           "column": 3
         },
         "end": {
-          "line": 305,
+          "line": 307,
           "column": 42
         }
       }
@@ -10866,15 +10866,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Removes this entity from the current world, without removing any components or data.\n\t * It can be re-attached to another world (or the same world), using the attach() method.\n\t * Note: Do not use detached entities, get() may be safe, but avoid calling other methods\n\t * Note: The ID will be reassigned, so do not rely on this\n\t *\n\t * @example\n\t * entity.detach()\n\t ",
-      "start": 8360,
-      "end": 8736,
+      "start": 8405,
+      "end": 8781,
       "loc": {
         "start": {
-          "line": 313,
+          "line": 315,
           "column": 1
         },
         "end": {
-          "line": 321,
+          "line": 323,
           "column": 4
         }
       }
@@ -10882,15 +10882,15 @@
     {
       "type": "CommentLine",
       "value": " Remove from current world",
-      "start": 8774,
-      "end": 8802,
+      "start": 8819,
+      "end": 8847,
       "loc": {
         "start": {
-          "line": 324,
+          "line": 326,
           "column": 3
         },
         "end": {
-          "line": 324,
+          "line": 326,
           "column": 31
         }
       }
@@ -12747,16 +12747,16 @@
     },
     {
       "type": "CommentBlock",
-      "value": "*\n\t * ID is read-only, attempting to set it will throw an error.\n\t *\n\t * @private\n\t ",
+      "value": "*\n\t * ID is read-only, attempting to set it will throw an error.\n\t *\n\t * @private\n\t *\n\t * @throws {Error} Cannot set entity id\n\t ",
       "start": 794,
-      "end": 882,
+      "end": 927,
       "loc": {
         "start": {
           "line": 44,
           "column": 1
         },
         "end": {
-          "line": 48,
+          "line": 50,
           "column": 4
         }
       }
@@ -12774,15 +12774,15 @@
         "binop": null
       },
       "value": "set",
-      "start": 884,
-      "end": 887,
+      "start": 929,
+      "end": 932,
       "loc": {
         "start": {
-          "line": 49,
+          "line": 51,
           "column": 1
         },
         "end": {
-          "line": 49,
+          "line": 51,
           "column": 4
         }
       }
@@ -12800,15 +12800,15 @@
         "binop": null
       },
       "value": "id",
-      "start": 888,
-      "end": 890,
+      "start": 933,
+      "end": 935,
       "loc": {
         "start": {
-          "line": 49,
+          "line": 51,
           "column": 5
         },
         "end": {
-          "line": 49,
+          "line": 51,
           "column": 7
         }
       }
@@ -12825,15 +12825,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 890,
-      "end": 891,
+      "start": 935,
+      "end": 936,
       "loc": {
         "start": {
-          "line": 49,
+          "line": 51,
           "column": 7
         },
         "end": {
-          "line": 49,
+          "line": 51,
           "column": 8
         }
       }
@@ -12851,15 +12851,15 @@
         "binop": null
       },
       "value": "id",
-      "start": 891,
-      "end": 893,
+      "start": 936,
+      "end": 938,
       "loc": {
         "start": {
-          "line": 49,
+          "line": 51,
           "column": 8
         },
         "end": {
-          "line": 49,
+          "line": 51,
           "column": 10
         }
       }
@@ -12876,15 +12876,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 893,
-      "end": 894,
+      "start": 938,
+      "end": 939,
       "loc": {
         "start": {
-          "line": 49,
+          "line": 51,
           "column": 10
         },
         "end": {
-          "line": 49,
+          "line": 51,
           "column": 11
         }
       }
@@ -12901,15 +12901,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 895,
-      "end": 896,
+      "start": 940,
+      "end": 941,
       "loc": {
         "start": {
-          "line": 49,
+          "line": 51,
           "column": 12
         },
         "end": {
-          "line": 49,
+          "line": 51,
           "column": 13
         }
       }
@@ -12929,15 +12929,15 @@
         "updateContext": null
       },
       "value": "throw",
-      "start": 899,
-      "end": 904,
+      "start": 944,
+      "end": 949,
       "loc": {
         "start": {
-          "line": 50,
+          "line": 52,
           "column": 2
         },
         "end": {
-          "line": 50,
+          "line": 52,
           "column": 7
         }
       }
@@ -12957,15 +12957,15 @@
         "updateContext": null
       },
       "value": "new",
-      "start": 905,
-      "end": 908,
+      "start": 950,
+      "end": 953,
       "loc": {
         "start": {
-          "line": 50,
+          "line": 52,
           "column": 8
         },
         "end": {
-          "line": 50,
+          "line": 52,
           "column": 11
         }
       }
@@ -12983,15 +12983,15 @@
         "binop": null
       },
       "value": "Error",
-      "start": 909,
-      "end": 914,
+      "start": 954,
+      "end": 959,
       "loc": {
         "start": {
-          "line": 50,
+          "line": 52,
           "column": 12
         },
         "end": {
-          "line": 50,
+          "line": 52,
           "column": 17
         }
       }
@@ -13008,15 +13008,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 914,
-      "end": 915,
+      "start": 959,
+      "end": 960,
       "loc": {
         "start": {
-          "line": 50,
+          "line": 52,
           "column": 17
         },
         "end": {
-          "line": 50,
+          "line": 52,
           "column": 18
         }
       }
@@ -13035,15 +13035,15 @@
         "updateContext": null
       },
       "value": "Cannot set entity id",
-      "start": 915,
-      "end": 937,
+      "start": 960,
+      "end": 982,
       "loc": {
         "start": {
-          "line": 50,
+          "line": 52,
           "column": 18
         },
         "end": {
-          "line": 50,
+          "line": 52,
           "column": 40
         }
       }
@@ -13060,15 +13060,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 937,
-      "end": 938,
+      "start": 982,
+      "end": 983,
       "loc": {
         "start": {
-          "line": 50,
+          "line": 52,
           "column": 40
         },
         "end": {
-          "line": 50,
+          "line": 52,
           "column": 41
         }
       }
@@ -13085,15 +13085,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 940,
-      "end": 941,
+      "start": 985,
+      "end": 986,
       "loc": {
         "start": {
-          "line": 51,
+          "line": 53,
           "column": 1
         },
         "end": {
-          "line": 51,
+          "line": 53,
           "column": 2
         }
       }
@@ -13101,15 +13101,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Returns true if the entity has ALL of the specified component names.\n\t * Additional components that the entity has, which are not specified in has(), will be ignored.\n\t * If no component names are specified, this method returns true.\n\t *\n\t * @example\n\t * if (entity.has('position', 'velocity')) {...}\n\t *\n\t * @param {...string} [components] - The component names to check for\n\t *\n\t * @return {boolean} true or false\n\t ",
-      "start": 944,
-      "end": 1372,
+      "start": 989,
+      "end": 1417,
       "loc": {
         "start": {
-          "line": 53,
+          "line": 55,
           "column": 1
         },
         "end": {
-          "line": 64,
+          "line": 66,
           "column": 4
         }
       }
@@ -13127,15 +13127,15 @@
         "binop": null
       },
       "value": "has",
-      "start": 1374,
-      "end": 1377,
+      "start": 1419,
+      "end": 1422,
       "loc": {
         "start": {
-          "line": 65,
+          "line": 67,
           "column": 1
         },
         "end": {
-          "line": 65,
+          "line": 67,
           "column": 4
         }
       }
@@ -13152,15 +13152,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 1377,
-      "end": 1378,
+      "start": 1422,
+      "end": 1423,
       "loc": {
         "start": {
-          "line": 65,
+          "line": 67,
           "column": 4
         },
         "end": {
-          "line": 65,
+          "line": 67,
           "column": 5
         }
       }
@@ -13178,15 +13178,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 1378,
-      "end": 1381,
+      "start": 1423,
+      "end": 1426,
       "loc": {
         "start": {
-          "line": 65,
+          "line": 67,
           "column": 5
         },
         "end": {
-          "line": 65,
+          "line": 67,
           "column": 8
         }
       }
@@ -13204,15 +13204,15 @@
         "binop": null
       },
       "value": "components",
-      "start": 1381,
-      "end": 1391,
+      "start": 1426,
+      "end": 1436,
       "loc": {
         "start": {
-          "line": 65,
+          "line": 67,
           "column": 8
         },
         "end": {
-          "line": 65,
+          "line": 67,
           "column": 18
         }
       }
@@ -13229,15 +13229,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 1391,
-      "end": 1392,
+      "start": 1436,
+      "end": 1437,
       "loc": {
         "start": {
-          "line": 65,
+          "line": 67,
           "column": 18
         },
         "end": {
-          "line": 65,
+          "line": 67,
           "column": 19
         }
       }
@@ -13254,15 +13254,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 1393,
-      "end": 1394,
+      "start": 1438,
+      "end": 1439,
       "loc": {
         "start": {
-          "line": 65,
+          "line": 67,
           "column": 20
         },
         "end": {
-          "line": 65,
+          "line": 67,
           "column": 21
         }
       }
@@ -13282,15 +13282,15 @@
         "updateContext": null
       },
       "value": "return",
-      "start": 1397,
-      "end": 1403,
+      "start": 1442,
+      "end": 1448,
       "loc": {
         "start": {
-          "line": 66,
+          "line": 68,
           "column": 2
         },
         "end": {
-          "line": 66,
+          "line": 68,
           "column": 8
         }
       }
@@ -13308,15 +13308,15 @@
         "binop": null
       },
       "value": "components",
-      "start": 1404,
-      "end": 1414,
+      "start": 1449,
+      "end": 1459,
       "loc": {
         "start": {
-          "line": 66,
+          "line": 68,
           "column": 9
         },
         "end": {
-          "line": 66,
+          "line": 68,
           "column": 19
         }
       }
@@ -13334,15 +13334,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 1414,
-      "end": 1415,
+      "start": 1459,
+      "end": 1460,
       "loc": {
         "start": {
-          "line": 66,
+          "line": 68,
           "column": 19
         },
         "end": {
-          "line": 66,
+          "line": 68,
           "column": 20
         }
       }
@@ -13360,15 +13360,15 @@
         "binop": null
       },
       "value": "every",
-      "start": 1415,
-      "end": 1420,
+      "start": 1460,
+      "end": 1465,
       "loc": {
         "start": {
-          "line": 66,
+          "line": 68,
           "column": 20
         },
         "end": {
-          "line": 66,
+          "line": 68,
           "column": 25
         }
       }
@@ -13385,15 +13385,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 1420,
-      "end": 1421,
+      "start": 1465,
+      "end": 1466,
       "loc": {
         "start": {
-          "line": 66,
+          "line": 68,
           "column": 25
         },
         "end": {
-          "line": 66,
+          "line": 68,
           "column": 26
         }
       }
@@ -13411,15 +13411,15 @@
         "binop": null
       },
       "value": "name",
-      "start": 1421,
-      "end": 1425,
+      "start": 1466,
+      "end": 1470,
       "loc": {
         "start": {
-          "line": 66,
+          "line": 68,
           "column": 26
         },
         "end": {
-          "line": 66,
+          "line": 68,
           "column": 30
         }
       }
@@ -13437,15 +13437,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 1426,
-      "end": 1428,
+      "start": 1471,
+      "end": 1473,
       "loc": {
         "start": {
-          "line": 66,
+          "line": 68,
           "column": 31
         },
         "end": {
-          "line": 66,
+          "line": 68,
           "column": 33
         }
       }
@@ -13463,15 +13463,15 @@
         "binop": null
       },
       "value": "name",
-      "start": 1429,
-      "end": 1433,
+      "start": 1474,
+      "end": 1478,
       "loc": {
         "start": {
-          "line": 66,
+          "line": 68,
           "column": 34
         },
         "end": {
-          "line": 66,
+          "line": 68,
           "column": 38
         }
       }
@@ -13491,15 +13491,15 @@
         "updateContext": null
       },
       "value": "in",
-      "start": 1434,
-      "end": 1436,
+      "start": 1479,
+      "end": 1481,
       "loc": {
         "start": {
-          "line": 66,
+          "line": 68,
           "column": 39
         },
         "end": {
-          "line": 66,
+          "line": 68,
           "column": 41
         }
       }
@@ -13519,15 +13519,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 1437,
-      "end": 1441,
+      "start": 1482,
+      "end": 1486,
       "loc": {
         "start": {
-          "line": 66,
+          "line": 68,
           "column": 42
         },
         "end": {
-          "line": 66,
+          "line": 68,
           "column": 46
         }
       }
@@ -13545,15 +13545,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 1441,
-      "end": 1442,
+      "start": 1486,
+      "end": 1487,
       "loc": {
         "start": {
-          "line": 66,
+          "line": 68,
           "column": 46
         },
         "end": {
-          "line": 66,
+          "line": 68,
           "column": 47
         }
       }
@@ -13571,15 +13571,15 @@
         "binop": null
       },
       "value": "data",
-      "start": 1442,
-      "end": 1446,
+      "start": 1487,
+      "end": 1491,
       "loc": {
         "start": {
-          "line": 66,
+          "line": 68,
           "column": 47
         },
         "end": {
-          "line": 66,
+          "line": 68,
           "column": 51
         }
       }
@@ -13596,15 +13596,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 1446,
-      "end": 1447,
+      "start": 1491,
+      "end": 1492,
       "loc": {
         "start": {
-          "line": 66,
+          "line": 68,
           "column": 51
         },
         "end": {
-          "line": 66,
+          "line": 68,
           "column": 52
         }
       }
@@ -13621,15 +13621,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 1449,
-      "end": 1450,
+      "start": 1494,
+      "end": 1495,
       "loc": {
         "start": {
-          "line": 67,
+          "line": 69,
           "column": 1
         },
         "end": {
-          "line": 67,
+          "line": 69,
           "column": 2
         }
       }
@@ -13637,15 +13637,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Returns a component by name, or undefined if it doesn't exist\n\t *\n\t * @example\n\t * let position = entity.get('position')\n\t *\n\t * @param {string} component - The component name to get\n\t *\n\t * @return {Object} The component if defined, otherwise undefined\n\t ",
-      "start": 1453,
-      "end": 1719,
+      "start": 1498,
+      "end": 1764,
       "loc": {
         "start": {
-          "line": 69,
+          "line": 71,
           "column": 1
         },
         "end": {
-          "line": 78,
+          "line": 80,
           "column": 4
         }
       }
@@ -13663,15 +13663,15 @@
         "binop": null
       },
       "value": "get",
-      "start": 1721,
-      "end": 1724,
+      "start": 1766,
+      "end": 1769,
       "loc": {
         "start": {
-          "line": 79,
+          "line": 81,
           "column": 1
         },
         "end": {
-          "line": 79,
+          "line": 81,
           "column": 4
         }
       }
@@ -13688,15 +13688,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 1724,
-      "end": 1725,
+      "start": 1769,
+      "end": 1770,
       "loc": {
         "start": {
-          "line": 79,
+          "line": 81,
           "column": 4
         },
         "end": {
-          "line": 79,
+          "line": 81,
           "column": 5
         }
       }
@@ -13714,15 +13714,15 @@
         "binop": null
       },
       "value": "component",
-      "start": 1725,
-      "end": 1734,
+      "start": 1770,
+      "end": 1779,
       "loc": {
         "start": {
-          "line": 79,
+          "line": 81,
           "column": 5
         },
         "end": {
-          "line": 79,
+          "line": 81,
           "column": 14
         }
       }
@@ -13739,15 +13739,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 1734,
-      "end": 1735,
+      "start": 1779,
+      "end": 1780,
       "loc": {
         "start": {
-          "line": 79,
+          "line": 81,
           "column": 14
         },
         "end": {
-          "line": 79,
+          "line": 81,
           "column": 15
         }
       }
@@ -13764,15 +13764,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 1736,
-      "end": 1737,
+      "start": 1781,
+      "end": 1782,
       "loc": {
         "start": {
-          "line": 79,
+          "line": 81,
           "column": 16
         },
         "end": {
-          "line": 79,
+          "line": 81,
           "column": 17
         }
       }
@@ -13792,15 +13792,15 @@
         "updateContext": null
       },
       "value": "return",
-      "start": 1740,
-      "end": 1746,
+      "start": 1785,
+      "end": 1791,
       "loc": {
         "start": {
-          "line": 80,
+          "line": 82,
           "column": 2
         },
         "end": {
-          "line": 80,
+          "line": 82,
           "column": 8
         }
       }
@@ -13820,15 +13820,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 1747,
-      "end": 1751,
+      "start": 1792,
+      "end": 1796,
       "loc": {
         "start": {
-          "line": 80,
+          "line": 82,
           "column": 9
         },
         "end": {
-          "line": 80,
+          "line": 82,
           "column": 13
         }
       }
@@ -13846,15 +13846,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 1751,
-      "end": 1752,
+      "start": 1796,
+      "end": 1797,
       "loc": {
         "start": {
-          "line": 80,
+          "line": 82,
           "column": 13
         },
         "end": {
-          "line": 80,
+          "line": 82,
           "column": 14
         }
       }
@@ -13872,15 +13872,15 @@
         "binop": null
       },
       "value": "data",
-      "start": 1752,
-      "end": 1756,
+      "start": 1797,
+      "end": 1801,
       "loc": {
         "start": {
-          "line": 80,
+          "line": 82,
           "column": 14
         },
         "end": {
-          "line": 80,
+          "line": 82,
           "column": 18
         }
       }
@@ -13898,15 +13898,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 1756,
-      "end": 1757,
+      "start": 1801,
+      "end": 1802,
       "loc": {
         "start": {
-          "line": 80,
+          "line": 82,
           "column": 18
         },
         "end": {
-          "line": 80,
+          "line": 82,
           "column": 19
         }
       }
@@ -13924,15 +13924,15 @@
         "binop": null
       },
       "value": "component",
-      "start": 1757,
-      "end": 1766,
+      "start": 1802,
+      "end": 1811,
       "loc": {
         "start": {
-          "line": 80,
+          "line": 82,
           "column": 19
         },
         "end": {
-          "line": 80,
+          "line": 82,
           "column": 28
         }
       }
@@ -13950,15 +13950,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 1766,
-      "end": 1767,
+      "start": 1811,
+      "end": 1812,
       "loc": {
         "start": {
-          "line": 80,
+          "line": 82,
           "column": 28
         },
         "end": {
-          "line": 80,
+          "line": 82,
           "column": 29
         }
       }
@@ -13975,15 +13975,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 1769,
-      "end": 1770,
+      "start": 1814,
+      "end": 1815,
       "loc": {
         "start": {
-          "line": 81,
+          "line": 83,
           "column": 1
         },
         "end": {
-          "line": 81,
+          "line": 83,
           "column": 2
         }
       }
@@ -13991,15 +13991,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Returns a component by name (automatically created if it doesn't exist)\n\t *\n\t * @example\n\t * let position = entity.access('position', 3, 4)\n\t *\n\t * @param {string}    component - The component name to create/get\n\t * @param {...Object} [args]    - The arguments to forward to create the new component, only if it doesn't exist.\n\t *\n\t * @return {Object} Always returns either the existing component, or the newly created one.\n\t ",
-      "start": 1773,
-      "end": 2209,
+      "start": 1818,
+      "end": 2254,
       "loc": {
         "start": {
-          "line": 83,
+          "line": 85,
           "column": 1
         },
         "end": {
-          "line": 93,
+          "line": 95,
           "column": 4
         }
       }
@@ -14017,15 +14017,15 @@
         "binop": null
       },
       "value": "access",
-      "start": 2211,
-      "end": 2217,
+      "start": 2256,
+      "end": 2262,
       "loc": {
         "start": {
-          "line": 94,
+          "line": 96,
           "column": 1
         },
         "end": {
-          "line": 94,
+          "line": 96,
           "column": 7
         }
       }
@@ -14042,15 +14042,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 2217,
-      "end": 2218,
+      "start": 2262,
+      "end": 2263,
       "loc": {
         "start": {
-          "line": 94,
+          "line": 96,
           "column": 7
         },
         "end": {
-          "line": 94,
+          "line": 96,
           "column": 8
         }
       }
@@ -14068,15 +14068,15 @@
         "binop": null
       },
       "value": "component",
-      "start": 2218,
-      "end": 2227,
+      "start": 2263,
+      "end": 2272,
       "loc": {
         "start": {
-          "line": 94,
+          "line": 96,
           "column": 8
         },
         "end": {
-          "line": 94,
+          "line": 96,
           "column": 17
         }
       }
@@ -14094,15 +14094,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 2227,
-      "end": 2228,
+      "start": 2272,
+      "end": 2273,
       "loc": {
         "start": {
-          "line": 94,
+          "line": 96,
           "column": 17
         },
         "end": {
-          "line": 94,
+          "line": 96,
           "column": 18
         }
       }
@@ -14120,15 +14120,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 2229,
-      "end": 2232,
+      "start": 2274,
+      "end": 2277,
       "loc": {
         "start": {
-          "line": 94,
+          "line": 96,
           "column": 19
         },
         "end": {
-          "line": 94,
+          "line": 96,
           "column": 22
         }
       }
@@ -14146,15 +14146,15 @@
         "binop": null
       },
       "value": "args",
-      "start": 2232,
-      "end": 2236,
+      "start": 2277,
+      "end": 2281,
       "loc": {
         "start": {
-          "line": 94,
+          "line": 96,
           "column": 22
         },
         "end": {
-          "line": 94,
+          "line": 96,
           "column": 26
         }
       }
@@ -14171,15 +14171,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 2236,
-      "end": 2237,
+      "start": 2281,
+      "end": 2282,
       "loc": {
         "start": {
-          "line": 94,
+          "line": 96,
           "column": 26
         },
         "end": {
-          "line": 94,
+          "line": 96,
           "column": 27
         }
       }
@@ -14196,15 +14196,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 2238,
-      "end": 2239,
+      "start": 2283,
+      "end": 2284,
       "loc": {
         "start": {
-          "line": 94,
+          "line": 96,
           "column": 28
         },
         "end": {
-          "line": 94,
+          "line": 96,
           "column": 29
         }
       }
@@ -14224,15 +14224,15 @@
         "updateContext": null
       },
       "value": "if",
-      "start": 2242,
-      "end": 2244,
+      "start": 2287,
+      "end": 2289,
       "loc": {
         "start": {
-          "line": 95,
+          "line": 97,
           "column": 2
         },
         "end": {
-          "line": 95,
+          "line": 97,
           "column": 4
         }
       }
@@ -14249,15 +14249,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 2245,
-      "end": 2246,
+      "start": 2290,
+      "end": 2291,
       "loc": {
         "start": {
-          "line": 95,
+          "line": 97,
           "column": 5
         },
         "end": {
-          "line": 95,
+          "line": 97,
           "column": 6
         }
       }
@@ -14276,15 +14276,15 @@
         "updateContext": null
       },
       "value": "!",
-      "start": 2246,
-      "end": 2247,
+      "start": 2291,
+      "end": 2292,
       "loc": {
         "start": {
-          "line": 95,
+          "line": 97,
           "column": 6
         },
         "end": {
-          "line": 95,
+          "line": 97,
           "column": 7
         }
       }
@@ -14304,15 +14304,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 2247,
-      "end": 2251,
+      "start": 2292,
+      "end": 2296,
       "loc": {
         "start": {
-          "line": 95,
+          "line": 97,
           "column": 7
         },
         "end": {
-          "line": 95,
+          "line": 97,
           "column": 11
         }
       }
@@ -14330,15 +14330,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 2251,
-      "end": 2252,
+      "start": 2296,
+      "end": 2297,
       "loc": {
         "start": {
-          "line": 95,
+          "line": 97,
           "column": 11
         },
         "end": {
-          "line": 95,
+          "line": 97,
           "column": 12
         }
       }
@@ -14356,15 +14356,15 @@
         "binop": null
       },
       "value": "has",
-      "start": 2252,
-      "end": 2255,
+      "start": 2297,
+      "end": 2300,
       "loc": {
         "start": {
-          "line": 95,
+          "line": 97,
           "column": 12
         },
         "end": {
-          "line": 95,
+          "line": 97,
           "column": 15
         }
       }
@@ -14381,15 +14381,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 2255,
-      "end": 2256,
+      "start": 2300,
+      "end": 2301,
       "loc": {
         "start": {
-          "line": 95,
+          "line": 97,
           "column": 15
         },
         "end": {
-          "line": 95,
+          "line": 97,
           "column": 16
         }
       }
@@ -14407,15 +14407,15 @@
         "binop": null
       },
       "value": "component",
-      "start": 2256,
-      "end": 2265,
+      "start": 2301,
+      "end": 2310,
       "loc": {
         "start": {
-          "line": 95,
+          "line": 97,
           "column": 16
         },
         "end": {
-          "line": 95,
+          "line": 97,
           "column": 25
         }
       }
@@ -14432,15 +14432,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 2265,
-      "end": 2266,
+      "start": 2310,
+      "end": 2311,
       "loc": {
         "start": {
-          "line": 95,
+          "line": 97,
           "column": 25
         },
         "end": {
-          "line": 95,
+          "line": 97,
           "column": 26
         }
       }
@@ -14457,15 +14457,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 2266,
-      "end": 2267,
+      "start": 2311,
+      "end": 2312,
       "loc": {
         "start": {
-          "line": 95,
+          "line": 97,
           "column": 26
         },
         "end": {
-          "line": 95,
+          "line": 97,
           "column": 27
         }
       }
@@ -14482,15 +14482,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 2268,
-      "end": 2269,
+      "start": 2313,
+      "end": 2314,
       "loc": {
         "start": {
-          "line": 95,
+          "line": 97,
           "column": 28
         },
         "end": {
-          "line": 95,
+          "line": 97,
           "column": 29
         }
       }
@@ -14510,15 +14510,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 2273,
-      "end": 2277,
+      "start": 2318,
+      "end": 2322,
       "loc": {
         "start": {
-          "line": 96,
+          "line": 98,
           "column": 3
         },
         "end": {
-          "line": 96,
+          "line": 98,
           "column": 7
         }
       }
@@ -14536,15 +14536,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 2277,
-      "end": 2278,
+      "start": 2322,
+      "end": 2323,
       "loc": {
         "start": {
-          "line": 96,
+          "line": 98,
           "column": 7
         },
         "end": {
-          "line": 96,
+          "line": 98,
           "column": 8
         }
       }
@@ -14562,15 +14562,15 @@
         "binop": null
       },
       "value": "set",
-      "start": 2278,
-      "end": 2281,
+      "start": 2323,
+      "end": 2326,
       "loc": {
         "start": {
-          "line": 96,
+          "line": 98,
           "column": 8
         },
         "end": {
-          "line": 96,
+          "line": 98,
           "column": 11
         }
       }
@@ -14587,15 +14587,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 2281,
-      "end": 2282,
+      "start": 2326,
+      "end": 2327,
       "loc": {
         "start": {
-          "line": 96,
+          "line": 98,
           "column": 11
         },
         "end": {
-          "line": 96,
+          "line": 98,
           "column": 12
         }
       }
@@ -14613,15 +14613,15 @@
         "binop": null
       },
       "value": "component",
-      "start": 2282,
-      "end": 2291,
+      "start": 2327,
+      "end": 2336,
       "loc": {
         "start": {
-          "line": 96,
+          "line": 98,
           "column": 12
         },
         "end": {
-          "line": 96,
+          "line": 98,
           "column": 21
         }
       }
@@ -14639,15 +14639,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 2291,
-      "end": 2292,
+      "start": 2336,
+      "end": 2337,
       "loc": {
         "start": {
-          "line": 96,
+          "line": 98,
           "column": 21
         },
         "end": {
-          "line": 96,
+          "line": 98,
           "column": 22
         }
       }
@@ -14665,15 +14665,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 2293,
-      "end": 2296,
+      "start": 2338,
+      "end": 2341,
       "loc": {
         "start": {
-          "line": 96,
+          "line": 98,
           "column": 23
         },
         "end": {
-          "line": 96,
+          "line": 98,
           "column": 26
         }
       }
@@ -14691,15 +14691,15 @@
         "binop": null
       },
       "value": "args",
-      "start": 2296,
-      "end": 2300,
+      "start": 2341,
+      "end": 2345,
       "loc": {
         "start": {
-          "line": 96,
+          "line": 98,
           "column": 26
         },
         "end": {
-          "line": 96,
+          "line": 98,
           "column": 30
         }
       }
@@ -14716,15 +14716,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 2300,
-      "end": 2301,
+      "start": 2345,
+      "end": 2346,
       "loc": {
         "start": {
-          "line": 96,
+          "line": 98,
           "column": 30
         },
         "end": {
-          "line": 96,
+          "line": 98,
           "column": 31
         }
       }
@@ -14741,15 +14741,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 2304,
-      "end": 2305,
+      "start": 2349,
+      "end": 2350,
       "loc": {
         "start": {
-          "line": 97,
+          "line": 99,
           "column": 2
         },
         "end": {
-          "line": 97,
+          "line": 99,
           "column": 3
         }
       }
@@ -14769,15 +14769,15 @@
         "updateContext": null
       },
       "value": "return",
-      "start": 2308,
-      "end": 2314,
+      "start": 2353,
+      "end": 2359,
       "loc": {
         "start": {
-          "line": 98,
+          "line": 100,
           "column": 2
         },
         "end": {
-          "line": 98,
+          "line": 100,
           "column": 8
         }
       }
@@ -14797,15 +14797,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 2315,
-      "end": 2319,
+      "start": 2360,
+      "end": 2364,
       "loc": {
         "start": {
-          "line": 98,
+          "line": 100,
           "column": 9
         },
         "end": {
-          "line": 98,
+          "line": 100,
           "column": 13
         }
       }
@@ -14823,15 +14823,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 2319,
-      "end": 2320,
+      "start": 2364,
+      "end": 2365,
       "loc": {
         "start": {
-          "line": 98,
+          "line": 100,
           "column": 13
         },
         "end": {
-          "line": 98,
+          "line": 100,
           "column": 14
         }
       }
@@ -14849,15 +14849,15 @@
         "binop": null
       },
       "value": "data",
-      "start": 2320,
-      "end": 2324,
+      "start": 2365,
+      "end": 2369,
       "loc": {
         "start": {
-          "line": 98,
+          "line": 100,
           "column": 14
         },
         "end": {
-          "line": 98,
+          "line": 100,
           "column": 18
         }
       }
@@ -14875,15 +14875,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 2324,
-      "end": 2325,
+      "start": 2369,
+      "end": 2370,
       "loc": {
         "start": {
-          "line": 98,
+          "line": 100,
           "column": 18
         },
         "end": {
-          "line": 98,
+          "line": 100,
           "column": 19
         }
       }
@@ -14901,15 +14901,15 @@
         "binop": null
       },
       "value": "component",
-      "start": 2325,
-      "end": 2334,
+      "start": 2370,
+      "end": 2379,
       "loc": {
         "start": {
-          "line": 98,
+          "line": 100,
           "column": 19
         },
         "end": {
-          "line": 98,
+          "line": 100,
           "column": 28
         }
       }
@@ -14927,15 +14927,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 2334,
-      "end": 2335,
+      "start": 2379,
+      "end": 2380,
       "loc": {
         "start": {
-          "line": 98,
+          "line": 100,
           "column": 28
         },
         "end": {
-          "line": 98,
+          "line": 100,
           "column": 29
         }
       }
@@ -14952,15 +14952,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 2337,
-      "end": 2338,
+      "start": 2382,
+      "end": 2383,
       "loc": {
         "start": {
-          "line": 99,
+          "line": 101,
           "column": 1
         },
         "end": {
-          "line": 99,
+          "line": 101,
           "column": 2
         }
       }
@@ -14968,15 +14968,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Adds a new component, or re-creates and overwrites an existing component\n\t *\n\t * @example\n\t * entity.set('position', 1, 2)\n\t *\n\t * @example\n\t * entity.set('anonymousComponent', { keys: 'values' })\n\t *\n\t * @example\n\t * entity.set('anotherAnonymousComponent', 'Any type of any value')\n\t *\n\t * @param {string}    component - The component name to create. If there is a registered component for this name, then\n\t * its constructor will be called and an object of that type will be created.\n\t * @param {...Object} [args]    - The arguments to forward to the registered component type. If the component type is\n\t * registered, then only the first additional argument will be used as the value of the entire component.\n\t *\n\t * @return {Object} The original entity that set() was called on, so that operations can be chained.\n\t ",
-      "start": 2341,
-      "end": 3171,
+      "start": 2386,
+      "end": 3216,
       "loc": {
         "start": {
-          "line": 101,
+          "line": 103,
           "column": 1
         },
         "end": {
-          "line": 119,
+          "line": 121,
           "column": 4
         }
       }
@@ -14994,15 +14994,15 @@
         "binop": null
       },
       "value": "set",
-      "start": 3173,
-      "end": 3176,
+      "start": 3218,
+      "end": 3221,
       "loc": {
         "start": {
-          "line": 120,
+          "line": 122,
           "column": 1
         },
         "end": {
-          "line": 120,
+          "line": 122,
           "column": 4
         }
       }
@@ -15019,15 +15019,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3176,
-      "end": 3177,
+      "start": 3221,
+      "end": 3222,
       "loc": {
         "start": {
-          "line": 120,
+          "line": 122,
           "column": 4
         },
         "end": {
-          "line": 120,
+          "line": 122,
           "column": 5
         }
       }
@@ -15045,15 +15045,15 @@
         "binop": null
       },
       "value": "component",
-      "start": 3177,
-      "end": 3186,
+      "start": 3222,
+      "end": 3231,
       "loc": {
         "start": {
-          "line": 120,
+          "line": 122,
           "column": 5
         },
         "end": {
-          "line": 120,
+          "line": 122,
           "column": 14
         }
       }
@@ -15071,15 +15071,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3186,
-      "end": 3187,
+      "start": 3231,
+      "end": 3232,
       "loc": {
         "start": {
-          "line": 120,
+          "line": 122,
           "column": 14
         },
         "end": {
-          "line": 120,
+          "line": 122,
           "column": 15
         }
       }
@@ -15097,15 +15097,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3188,
-      "end": 3191,
+      "start": 3233,
+      "end": 3236,
       "loc": {
         "start": {
-          "line": 120,
+          "line": 122,
           "column": 16
         },
         "end": {
-          "line": 120,
+          "line": 122,
           "column": 19
         }
       }
@@ -15123,15 +15123,15 @@
         "binop": null
       },
       "value": "args",
-      "start": 3191,
-      "end": 3195,
+      "start": 3236,
+      "end": 3240,
       "loc": {
         "start": {
-          "line": 120,
+          "line": 122,
           "column": 19
         },
         "end": {
-          "line": 120,
+          "line": 122,
           "column": 23
         }
       }
@@ -15148,15 +15148,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3195,
-      "end": 3196,
+      "start": 3240,
+      "end": 3241,
       "loc": {
         "start": {
-          "line": 120,
+          "line": 122,
           "column": 23
         },
         "end": {
-          "line": 120,
+          "line": 122,
           "column": 24
         }
       }
@@ -15173,15 +15173,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3197,
-      "end": 3198,
+      "start": 3242,
+      "end": 3243,
       "loc": {
         "start": {
-          "line": 120,
+          "line": 122,
           "column": 25
         },
         "end": {
-          "line": 120,
+          "line": 122,
           "column": 26
         }
       }
@@ -15201,15 +15201,15 @@
         "updateContext": null
       },
       "value": "if",
-      "start": 3201,
-      "end": 3203,
+      "start": 3246,
+      "end": 3248,
       "loc": {
         "start": {
-          "line": 121,
+          "line": 123,
           "column": 2
         },
         "end": {
-          "line": 121,
+          "line": 123,
           "column": 4
         }
       }
@@ -15226,15 +15226,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3204,
-      "end": 3205,
+      "start": 3249,
+      "end": 3250,
       "loc": {
         "start": {
-          "line": 121,
+          "line": 123,
           "column": 5
         },
         "end": {
-          "line": 121,
+          "line": 123,
           "column": 6
         }
       }
@@ -15254,15 +15254,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 3205,
-      "end": 3209,
+      "start": 3250,
+      "end": 3254,
       "loc": {
         "start": {
-          "line": 121,
+          "line": 123,
           "column": 6
         },
         "end": {
-          "line": 121,
+          "line": 123,
           "column": 10
         }
       }
@@ -15280,15 +15280,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3209,
-      "end": 3210,
+      "start": 3254,
+      "end": 3255,
       "loc": {
         "start": {
-          "line": 121,
+          "line": 123,
           "column": 10
         },
         "end": {
-          "line": 121,
+          "line": 123,
           "column": 11
         }
       }
@@ -15306,15 +15306,15 @@
         "binop": null
       },
       "value": "valid",
-      "start": 3210,
-      "end": 3215,
+      "start": 3255,
+      "end": 3260,
       "loc": {
         "start": {
-          "line": 121,
+          "line": 123,
           "column": 11
         },
         "end": {
-          "line": 121,
+          "line": 123,
           "column": 16
         }
       }
@@ -15331,15 +15331,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3215,
-      "end": 3216,
+      "start": 3260,
+      "end": 3261,
       "loc": {
         "start": {
-          "line": 121,
+          "line": 123,
           "column": 16
         },
         "end": {
-          "line": 121,
+          "line": 123,
           "column": 17
         }
       }
@@ -15356,15 +15356,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3216,
-      "end": 3217,
+      "start": 3261,
+      "end": 3262,
       "loc": {
         "start": {
-          "line": 121,
+          "line": 123,
           "column": 17
         },
         "end": {
-          "line": 121,
+          "line": 123,
           "column": 18
         }
       }
@@ -15383,15 +15383,15 @@
         "updateContext": null
       },
       "value": "&&",
-      "start": 3218,
-      "end": 3220,
+      "start": 3263,
+      "end": 3265,
       "loc": {
         "start": {
-          "line": 121,
+          "line": 123,
           "column": 19
         },
         "end": {
-          "line": 121,
+          "line": 123,
           "column": 21
         }
       }
@@ -15409,15 +15409,15 @@
         "binop": null
       },
       "value": "component",
-      "start": 3221,
-      "end": 3230,
+      "start": 3266,
+      "end": 3275,
       "loc": {
         "start": {
-          "line": 121,
+          "line": 123,
           "column": 22
         },
         "end": {
-          "line": 121,
+          "line": 123,
           "column": 31
         }
       }
@@ -15437,15 +15437,15 @@
         "updateContext": null
       },
       "value": "in",
-      "start": 3231,
-      "end": 3233,
+      "start": 3276,
+      "end": 3278,
       "loc": {
         "start": {
-          "line": 121,
+          "line": 123,
           "column": 32
         },
         "end": {
-          "line": 121,
+          "line": 123,
           "column": 34
         }
       }
@@ -15465,15 +15465,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 3234,
-      "end": 3238,
+      "start": 3279,
+      "end": 3283,
       "loc": {
         "start": {
-          "line": 121,
+          "line": 123,
           "column": 35
         },
         "end": {
-          "line": 121,
+          "line": 123,
           "column": 39
         }
       }
@@ -15491,15 +15491,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3238,
-      "end": 3239,
+      "start": 3283,
+      "end": 3284,
       "loc": {
         "start": {
-          "line": 121,
+          "line": 123,
           "column": 39
         },
         "end": {
-          "line": 121,
+          "line": 123,
           "column": 40
         }
       }
@@ -15517,15 +15517,15 @@
         "binop": null
       },
       "value": "world",
-      "start": 3239,
-      "end": 3244,
+      "start": 3284,
+      "end": 3289,
       "loc": {
         "start": {
-          "line": 121,
+          "line": 123,
           "column": 40
         },
         "end": {
-          "line": 121,
+          "line": 123,
           "column": 45
         }
       }
@@ -15543,15 +15543,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3244,
-      "end": 3245,
+      "start": 3289,
+      "end": 3290,
       "loc": {
         "start": {
-          "line": 121,
+          "line": 123,
           "column": 45
         },
         "end": {
-          "line": 121,
+          "line": 123,
           "column": 46
         }
       }
@@ -15569,15 +15569,15 @@
         "binop": null
       },
       "value": "components",
-      "start": 3245,
-      "end": 3255,
+      "start": 3290,
+      "end": 3300,
       "loc": {
         "start": {
-          "line": 121,
+          "line": 123,
           "column": 46
         },
         "end": {
-          "line": 121,
+          "line": 123,
           "column": 56
         }
       }
@@ -15594,15 +15594,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3255,
-      "end": 3256,
+      "start": 3300,
+      "end": 3301,
       "loc": {
         "start": {
-          "line": 121,
+          "line": 123,
           "column": 56
         },
         "end": {
-          "line": 121,
+          "line": 123,
           "column": 57
         }
       }
@@ -15619,15 +15619,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3257,
-      "end": 3258,
+      "start": 3302,
+      "end": 3303,
       "loc": {
         "start": {
-          "line": 121,
+          "line": 123,
           "column": 58
         },
         "end": {
-          "line": 121,
+          "line": 123,
           "column": 59
         }
       }
@@ -15635,15 +15635,15 @@
     {
       "type": "CommentLine",
       "value": " Use defined component template, passing entity as first parameter",
-      "start": 3262,
-      "end": 3330,
+      "start": 3307,
+      "end": 3375,
       "loc": {
         "start": {
-          "line": 122,
+          "line": 124,
           "column": 3
         },
         "end": {
-          "line": 122,
+          "line": 124,
           "column": 71
         }
       }
@@ -15663,15 +15663,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 3334,
-      "end": 3338,
+      "start": 3379,
+      "end": 3383,
       "loc": {
         "start": {
-          "line": 123,
+          "line": 125,
           "column": 3
         },
         "end": {
-          "line": 123,
+          "line": 125,
           "column": 7
         }
       }
@@ -15689,15 +15689,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3338,
-      "end": 3339,
+      "start": 3383,
+      "end": 3384,
       "loc": {
         "start": {
-          "line": 123,
+          "line": 125,
           "column": 7
         },
         "end": {
-          "line": 123,
+          "line": 125,
           "column": 8
         }
       }
@@ -15715,15 +15715,15 @@
         "binop": null
       },
       "value": "data",
-      "start": 3339,
-      "end": 3343,
+      "start": 3384,
+      "end": 3388,
       "loc": {
         "start": {
-          "line": 123,
+          "line": 125,
           "column": 8
         },
         "end": {
-          "line": 123,
+          "line": 125,
           "column": 12
         }
       }
@@ -15741,15 +15741,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3343,
-      "end": 3344,
+      "start": 3388,
+      "end": 3389,
       "loc": {
         "start": {
-          "line": 123,
+          "line": 125,
           "column": 12
         },
         "end": {
-          "line": 123,
+          "line": 125,
           "column": 13
         }
       }
@@ -15767,15 +15767,15 @@
         "binop": null
       },
       "value": "component",
-      "start": 3344,
-      "end": 3353,
+      "start": 3389,
+      "end": 3398,
       "loc": {
         "start": {
-          "line": 123,
+          "line": 125,
           "column": 13
         },
         "end": {
-          "line": 123,
+          "line": 125,
           "column": 22
         }
       }
@@ -15793,15 +15793,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3353,
-      "end": 3354,
+      "start": 3398,
+      "end": 3399,
       "loc": {
         "start": {
-          "line": 123,
+          "line": 125,
           "column": 22
         },
         "end": {
-          "line": 123,
+          "line": 125,
           "column": 23
         }
       }
@@ -15820,15 +15820,15 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 3355,
-      "end": 3356,
+      "start": 3400,
+      "end": 3401,
       "loc": {
         "start": {
-          "line": 123,
+          "line": 125,
           "column": 24
         },
         "end": {
-          "line": 123,
+          "line": 125,
           "column": 25
         }
       }
@@ -15848,15 +15848,15 @@
         "updateContext": null
       },
       "value": "new",
-      "start": 3357,
-      "end": 3360,
+      "start": 3402,
+      "end": 3405,
       "loc": {
         "start": {
-          "line": 123,
+          "line": 125,
           "column": 26
         },
         "end": {
-          "line": 123,
+          "line": 125,
           "column": 29
         }
       }
@@ -15876,15 +15876,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 3361,
-      "end": 3365,
+      "start": 3406,
+      "end": 3410,
       "loc": {
         "start": {
-          "line": 123,
+          "line": 125,
           "column": 30
         },
         "end": {
-          "line": 123,
+          "line": 125,
           "column": 34
         }
       }
@@ -15902,15 +15902,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3365,
-      "end": 3366,
+      "start": 3410,
+      "end": 3411,
       "loc": {
         "start": {
-          "line": 123,
+          "line": 125,
           "column": 34
         },
         "end": {
-          "line": 123,
+          "line": 125,
           "column": 35
         }
       }
@@ -15928,15 +15928,15 @@
         "binop": null
       },
       "value": "world",
-      "start": 3366,
-      "end": 3371,
+      "start": 3411,
+      "end": 3416,
       "loc": {
         "start": {
-          "line": 123,
+          "line": 125,
           "column": 35
         },
         "end": {
-          "line": 123,
+          "line": 125,
           "column": 40
         }
       }
@@ -15954,15 +15954,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3371,
-      "end": 3372,
+      "start": 3416,
+      "end": 3417,
       "loc": {
         "start": {
-          "line": 123,
+          "line": 125,
           "column": 40
         },
         "end": {
-          "line": 123,
+          "line": 125,
           "column": 41
         }
       }
@@ -15980,15 +15980,15 @@
         "binop": null
       },
       "value": "components",
-      "start": 3372,
-      "end": 3382,
+      "start": 3417,
+      "end": 3427,
       "loc": {
         "start": {
-          "line": 123,
+          "line": 125,
           "column": 41
         },
         "end": {
-          "line": 123,
+          "line": 125,
           "column": 51
         }
       }
@@ -16006,15 +16006,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3382,
-      "end": 3383,
+      "start": 3427,
+      "end": 3428,
       "loc": {
         "start": {
-          "line": 123,
+          "line": 125,
           "column": 51
         },
         "end": {
-          "line": 123,
+          "line": 125,
           "column": 52
         }
       }
@@ -16032,15 +16032,15 @@
         "binop": null
       },
       "value": "component",
-      "start": 3383,
-      "end": 3392,
+      "start": 3428,
+      "end": 3437,
       "loc": {
         "start": {
-          "line": 123,
+          "line": 125,
           "column": 52
         },
         "end": {
-          "line": 123,
+          "line": 125,
           "column": 61
         }
       }
@@ -16058,15 +16058,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3392,
-      "end": 3393,
+      "start": 3437,
+      "end": 3438,
       "loc": {
         "start": {
-          "line": 123,
+          "line": 125,
           "column": 61
         },
         "end": {
-          "line": 123,
+          "line": 125,
           "column": 62
         }
       }
@@ -16083,15 +16083,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3393,
-      "end": 3394,
+      "start": 3438,
+      "end": 3439,
       "loc": {
         "start": {
-          "line": 123,
+          "line": 125,
           "column": 62
         },
         "end": {
-          "line": 123,
+          "line": 125,
           "column": 63
         }
       }
@@ -16111,15 +16111,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 3394,
-      "end": 3398,
+      "start": 3439,
+      "end": 3443,
       "loc": {
         "start": {
-          "line": 123,
+          "line": 125,
           "column": 63
         },
         "end": {
-          "line": 123,
+          "line": 125,
           "column": 67
         }
       }
@@ -16137,15 +16137,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3398,
-      "end": 3399,
+      "start": 3443,
+      "end": 3444,
       "loc": {
         "start": {
-          "line": 123,
+          "line": 125,
           "column": 67
         },
         "end": {
-          "line": 123,
+          "line": 125,
           "column": 68
         }
       }
@@ -16163,15 +16163,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3400,
-      "end": 3403,
+      "start": 3445,
+      "end": 3448,
       "loc": {
         "start": {
-          "line": 123,
+          "line": 125,
           "column": 69
         },
         "end": {
-          "line": 123,
+          "line": 125,
           "column": 72
         }
       }
@@ -16189,15 +16189,15 @@
         "binop": null
       },
       "value": "args",
-      "start": 3403,
-      "end": 3407,
+      "start": 3448,
+      "end": 3452,
       "loc": {
         "start": {
-          "line": 123,
+          "line": 125,
           "column": 72
         },
         "end": {
-          "line": 123,
+          "line": 125,
           "column": 76
         }
       }
@@ -16214,15 +16214,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3407,
-      "end": 3408,
+      "start": 3452,
+      "end": 3453,
       "loc": {
         "start": {
-          "line": 123,
+          "line": 125,
           "column": 76
         },
         "end": {
-          "line": 123,
+          "line": 125,
           "column": 77
         }
       }
@@ -16239,15 +16239,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3411,
-      "end": 3412,
+      "start": 3456,
+      "end": 3457,
       "loc": {
         "start": {
-          "line": 124,
+          "line": 126,
           "column": 2
         },
         "end": {
-          "line": 124,
+          "line": 126,
           "column": 3
         }
       }
@@ -16267,15 +16267,15 @@
         "updateContext": null
       },
       "value": "else",
-      "start": 3413,
-      "end": 3417,
+      "start": 3458,
+      "end": 3462,
       "loc": {
         "start": {
-          "line": 124,
+          "line": 126,
           "column": 4
         },
         "end": {
-          "line": 124,
+          "line": 126,
           "column": 8
         }
       }
@@ -16295,15 +16295,15 @@
         "updateContext": null
       },
       "value": "if",
-      "start": 3418,
-      "end": 3420,
+      "start": 3463,
+      "end": 3465,
       "loc": {
         "start": {
-          "line": 124,
+          "line": 126,
           "column": 9
         },
         "end": {
-          "line": 124,
+          "line": 126,
           "column": 11
         }
       }
@@ -16320,15 +16320,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3421,
-      "end": 3422,
+      "start": 3466,
+      "end": 3467,
       "loc": {
         "start": {
-          "line": 124,
+          "line": 126,
           "column": 12
         },
         "end": {
-          "line": 124,
+          "line": 126,
           "column": 13
         }
       }
@@ -16346,15 +16346,15 @@
         "binop": null
       },
       "value": "args",
-      "start": 3422,
-      "end": 3426,
+      "start": 3467,
+      "end": 3471,
       "loc": {
         "start": {
-          "line": 124,
+          "line": 126,
           "column": 13
         },
         "end": {
-          "line": 124,
+          "line": 126,
           "column": 17
         }
       }
@@ -16372,15 +16372,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3426,
-      "end": 3427,
+      "start": 3471,
+      "end": 3472,
       "loc": {
         "start": {
-          "line": 124,
+          "line": 126,
           "column": 17
         },
         "end": {
-          "line": 124,
+          "line": 126,
           "column": 18
         }
       }
@@ -16398,15 +16398,15 @@
         "binop": null
       },
       "value": "length",
-      "start": 3427,
-      "end": 3433,
+      "start": 3472,
+      "end": 3478,
       "loc": {
         "start": {
-          "line": 124,
+          "line": 126,
           "column": 18
         },
         "end": {
-          "line": 124,
+          "line": 126,
           "column": 24
         }
       }
@@ -16425,15 +16425,15 @@
         "updateContext": null
       },
       "value": ">",
-      "start": 3434,
-      "end": 3435,
+      "start": 3479,
+      "end": 3480,
       "loc": {
         "start": {
-          "line": 124,
+          "line": 126,
           "column": 25
         },
         "end": {
-          "line": 124,
+          "line": 126,
           "column": 26
         }
       }
@@ -16452,15 +16452,15 @@
         "updateContext": null
       },
       "value": 0,
-      "start": 3436,
-      "end": 3437,
+      "start": 3481,
+      "end": 3482,
       "loc": {
         "start": {
-          "line": 124,
+          "line": 126,
           "column": 27
         },
         "end": {
-          "line": 124,
+          "line": 126,
           "column": 28
         }
       }
@@ -16477,15 +16477,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3437,
-      "end": 3438,
+      "start": 3482,
+      "end": 3483,
       "loc": {
         "start": {
-          "line": 124,
+          "line": 126,
           "column": 28
         },
         "end": {
-          "line": 124,
+          "line": 126,
           "column": 29
         }
       }
@@ -16502,15 +16502,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3439,
-      "end": 3440,
+      "start": 3484,
+      "end": 3485,
       "loc": {
         "start": {
-          "line": 124,
+          "line": 126,
           "column": 30
         },
         "end": {
-          "line": 124,
+          "line": 126,
           "column": 31
         }
       }
@@ -16518,15 +16518,15 @@
     {
       "type": "CommentLine",
       "value": " Use first argument as component value",
-      "start": 3444,
-      "end": 3484,
+      "start": 3489,
+      "end": 3529,
       "loc": {
         "start": {
-          "line": 125,
+          "line": 127,
           "column": 3
         },
         "end": {
-          "line": 125,
+          "line": 127,
           "column": 43
         }
       }
@@ -16546,15 +16546,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 3488,
-      "end": 3492,
+      "start": 3533,
+      "end": 3537,
       "loc": {
         "start": {
-          "line": 126,
+          "line": 128,
           "column": 3
         },
         "end": {
-          "line": 126,
+          "line": 128,
           "column": 7
         }
       }
@@ -16572,15 +16572,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3492,
-      "end": 3493,
+      "start": 3537,
+      "end": 3538,
       "loc": {
         "start": {
-          "line": 126,
+          "line": 128,
           "column": 7
         },
         "end": {
-          "line": 126,
+          "line": 128,
           "column": 8
         }
       }
@@ -16598,15 +16598,15 @@
         "binop": null
       },
       "value": "data",
-      "start": 3493,
-      "end": 3497,
+      "start": 3538,
+      "end": 3542,
       "loc": {
         "start": {
-          "line": 126,
+          "line": 128,
           "column": 8
         },
         "end": {
-          "line": 126,
+          "line": 128,
           "column": 12
         }
       }
@@ -16624,15 +16624,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3497,
-      "end": 3498,
+      "start": 3542,
+      "end": 3543,
       "loc": {
         "start": {
-          "line": 126,
+          "line": 128,
           "column": 12
         },
         "end": {
-          "line": 126,
+          "line": 128,
           "column": 13
         }
       }
@@ -16650,15 +16650,15 @@
         "binop": null
       },
       "value": "component",
-      "start": 3498,
-      "end": 3507,
+      "start": 3543,
+      "end": 3552,
       "loc": {
         "start": {
-          "line": 126,
+          "line": 128,
           "column": 13
         },
         "end": {
-          "line": 126,
+          "line": 128,
           "column": 22
         }
       }
@@ -16676,15 +16676,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3507,
-      "end": 3508,
+      "start": 3552,
+      "end": 3553,
       "loc": {
         "start": {
-          "line": 126,
+          "line": 128,
           "column": 22
         },
         "end": {
-          "line": 126,
+          "line": 128,
           "column": 23
         }
       }
@@ -16703,15 +16703,15 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 3509,
-      "end": 3510,
+      "start": 3554,
+      "end": 3555,
       "loc": {
         "start": {
-          "line": 126,
+          "line": 128,
           "column": 24
         },
         "end": {
-          "line": 126,
+          "line": 128,
           "column": 25
         }
       }
@@ -16729,15 +16729,15 @@
         "binop": null
       },
       "value": "args",
-      "start": 3511,
-      "end": 3515,
+      "start": 3556,
+      "end": 3560,
       "loc": {
         "start": {
-          "line": 126,
+          "line": 128,
           "column": 26
         },
         "end": {
-          "line": 126,
+          "line": 128,
           "column": 30
         }
       }
@@ -16755,15 +16755,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3515,
-      "end": 3516,
+      "start": 3560,
+      "end": 3561,
       "loc": {
         "start": {
-          "line": 126,
+          "line": 128,
           "column": 30
         },
         "end": {
-          "line": 126,
+          "line": 128,
           "column": 31
         }
       }
@@ -16782,15 +16782,15 @@
         "updateContext": null
       },
       "value": 0,
-      "start": 3516,
-      "end": 3517,
+      "start": 3561,
+      "end": 3562,
       "loc": {
         "start": {
-          "line": 126,
+          "line": 128,
           "column": 31
         },
         "end": {
-          "line": 126,
+          "line": 128,
           "column": 32
         }
       }
@@ -16808,15 +16808,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3517,
-      "end": 3518,
+      "start": 3562,
+      "end": 3563,
       "loc": {
         "start": {
-          "line": 126,
+          "line": 128,
           "column": 32
         },
         "end": {
-          "line": 126,
+          "line": 128,
           "column": 33
         }
       }
@@ -16833,15 +16833,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3521,
-      "end": 3522,
+      "start": 3566,
+      "end": 3567,
       "loc": {
         "start": {
-          "line": 127,
+          "line": 129,
           "column": 2
         },
         "end": {
-          "line": 127,
+          "line": 129,
           "column": 3
         }
       }
@@ -16861,15 +16861,15 @@
         "updateContext": null
       },
       "value": "else",
-      "start": 3523,
-      "end": 3527,
+      "start": 3568,
+      "end": 3572,
       "loc": {
         "start": {
-          "line": 127,
+          "line": 129,
           "column": 4
         },
         "end": {
-          "line": 127,
+          "line": 129,
           "column": 8
         }
       }
@@ -16886,15 +16886,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3528,
-      "end": 3529,
+      "start": 3573,
+      "end": 3574,
       "loc": {
         "start": {
-          "line": 127,
+          "line": 129,
           "column": 9
         },
         "end": {
-          "line": 127,
+          "line": 129,
           "column": 10
         }
       }
@@ -16902,15 +16902,15 @@
     {
       "type": "CommentLine",
       "value": " Make an empty object",
-      "start": 3533,
-      "end": 3556,
+      "start": 3578,
+      "end": 3601,
       "loc": {
         "start": {
-          "line": 128,
+          "line": 130,
           "column": 3
         },
         "end": {
-          "line": 128,
+          "line": 130,
           "column": 26
         }
       }
@@ -16930,15 +16930,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 3560,
-      "end": 3564,
+      "start": 3605,
+      "end": 3609,
       "loc": {
         "start": {
-          "line": 129,
+          "line": 131,
           "column": 3
         },
         "end": {
-          "line": 129,
+          "line": 131,
           "column": 7
         }
       }
@@ -16956,15 +16956,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3564,
-      "end": 3565,
+      "start": 3609,
+      "end": 3610,
       "loc": {
         "start": {
-          "line": 129,
+          "line": 131,
           "column": 7
         },
         "end": {
-          "line": 129,
+          "line": 131,
           "column": 8
         }
       }
@@ -16982,15 +16982,15 @@
         "binop": null
       },
       "value": "data",
-      "start": 3565,
-      "end": 3569,
+      "start": 3610,
+      "end": 3614,
       "loc": {
         "start": {
-          "line": 129,
+          "line": 131,
           "column": 8
         },
         "end": {
-          "line": 129,
+          "line": 131,
           "column": 12
         }
       }
@@ -17008,15 +17008,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3569,
-      "end": 3570,
+      "start": 3614,
+      "end": 3615,
       "loc": {
         "start": {
-          "line": 129,
+          "line": 131,
           "column": 12
         },
         "end": {
-          "line": 129,
+          "line": 131,
           "column": 13
         }
       }
@@ -17034,15 +17034,15 @@
         "binop": null
       },
       "value": "component",
-      "start": 3570,
-      "end": 3579,
+      "start": 3615,
+      "end": 3624,
       "loc": {
         "start": {
-          "line": 129,
+          "line": 131,
           "column": 13
         },
         "end": {
-          "line": 129,
+          "line": 131,
           "column": 22
         }
       }
@@ -17060,15 +17060,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3579,
-      "end": 3580,
+      "start": 3624,
+      "end": 3625,
       "loc": {
         "start": {
-          "line": 129,
+          "line": 131,
           "column": 22
         },
         "end": {
-          "line": 129,
+          "line": 131,
           "column": 23
         }
       }
@@ -17087,15 +17087,15 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 3581,
-      "end": 3582,
+      "start": 3626,
+      "end": 3627,
       "loc": {
         "start": {
-          "line": 129,
+          "line": 131,
           "column": 24
         },
         "end": {
-          "line": 129,
+          "line": 131,
           "column": 25
         }
       }
@@ -17112,15 +17112,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3583,
-      "end": 3584,
+      "start": 3628,
+      "end": 3629,
       "loc": {
         "start": {
-          "line": 129,
+          "line": 131,
           "column": 26
         },
         "end": {
-          "line": 129,
+          "line": 131,
           "column": 27
         }
       }
@@ -17137,15 +17137,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3584,
-      "end": 3585,
+      "start": 3629,
+      "end": 3630,
       "loc": {
         "start": {
-          "line": 129,
+          "line": 131,
           "column": 27
         },
         "end": {
-          "line": 129,
+          "line": 131,
           "column": 28
         }
       }
@@ -17162,15 +17162,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3588,
-      "end": 3589,
+      "start": 3633,
+      "end": 3634,
       "loc": {
         "start": {
-          "line": 130,
+          "line": 132,
           "column": 2
         },
         "end": {
-          "line": 130,
+          "line": 132,
           "column": 3
         }
       }
@@ -17178,15 +17178,15 @@
     {
       "type": "CommentLine",
       "value": " Update the index with this new component",
-      "start": 3593,
-      "end": 3636,
+      "start": 3638,
+      "end": 3681,
       "loc": {
         "start": {
-          "line": 132,
+          "line": 134,
           "column": 2
         },
         "end": {
-          "line": 132,
+          "line": 134,
           "column": 45
         }
       }
@@ -17206,15 +17206,15 @@
         "updateContext": null
       },
       "value": "if",
-      "start": 3639,
-      "end": 3641,
+      "start": 3684,
+      "end": 3686,
       "loc": {
         "start": {
-          "line": 133,
+          "line": 135,
           "column": 2
         },
         "end": {
-          "line": 133,
+          "line": 135,
           "column": 4
         }
       }
@@ -17231,15 +17231,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3642,
-      "end": 3643,
+      "start": 3687,
+      "end": 3688,
       "loc": {
         "start": {
-          "line": 133,
+          "line": 135,
           "column": 5
         },
         "end": {
-          "line": 133,
+          "line": 135,
           "column": 6
         }
       }
@@ -17259,15 +17259,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 3643,
-      "end": 3647,
+      "start": 3688,
+      "end": 3692,
       "loc": {
         "start": {
-          "line": 133,
+          "line": 135,
           "column": 6
         },
         "end": {
-          "line": 133,
+          "line": 135,
           "column": 10
         }
       }
@@ -17285,15 +17285,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3647,
-      "end": 3648,
+      "start": 3692,
+      "end": 3693,
       "loc": {
         "start": {
-          "line": 133,
+          "line": 135,
           "column": 10
         },
         "end": {
-          "line": 133,
+          "line": 135,
           "column": 11
         }
       }
@@ -17311,15 +17311,15 @@
         "binop": null
       },
       "value": "valid",
-      "start": 3648,
-      "end": 3653,
+      "start": 3693,
+      "end": 3698,
       "loc": {
         "start": {
-          "line": 133,
+          "line": 135,
           "column": 11
         },
         "end": {
-          "line": 133,
+          "line": 135,
           "column": 16
         }
       }
@@ -17336,15 +17336,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3653,
-      "end": 3654,
+      "start": 3698,
+      "end": 3699,
       "loc": {
         "start": {
-          "line": 133,
+          "line": 135,
           "column": 16
         },
         "end": {
-          "line": 133,
+          "line": 135,
           "column": 17
         }
       }
@@ -17361,15 +17361,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3654,
-      "end": 3655,
+      "start": 3699,
+      "end": 3700,
       "loc": {
         "start": {
-          "line": 133,
+          "line": 135,
           "column": 17
         },
         "end": {
-          "line": 133,
+          "line": 135,
           "column": 18
         }
       }
@@ -17386,15 +17386,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3655,
-      "end": 3656,
+      "start": 3700,
+      "end": 3701,
       "loc": {
         "start": {
-          "line": 133,
+          "line": 135,
           "column": 18
         },
         "end": {
-          "line": 133,
+          "line": 135,
           "column": 19
         }
       }
@@ -17411,15 +17411,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3657,
-      "end": 3658,
+      "start": 3702,
+      "end": 3703,
       "loc": {
         "start": {
-          "line": 133,
+          "line": 135,
           "column": 20
         },
         "end": {
-          "line": 133,
+          "line": 135,
           "column": 21
         }
       }
@@ -17439,15 +17439,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 3662,
-      "end": 3666,
+      "start": 3707,
+      "end": 3711,
       "loc": {
         "start": {
-          "line": 134,
+          "line": 136,
           "column": 3
         },
         "end": {
-          "line": 134,
+          "line": 136,
           "column": 7
         }
       }
@@ -17465,15 +17465,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3666,
-      "end": 3667,
+      "start": 3711,
+      "end": 3712,
       "loc": {
         "start": {
-          "line": 134,
+          "line": 136,
           "column": 7
         },
         "end": {
-          "line": 134,
+          "line": 136,
           "column": 8
         }
       }
@@ -17491,15 +17491,15 @@
         "binop": null
       },
       "value": "world",
-      "start": 3667,
-      "end": 3672,
+      "start": 3712,
+      "end": 3717,
       "loc": {
         "start": {
-          "line": 134,
+          "line": 136,
           "column": 8
         },
         "end": {
-          "line": 134,
+          "line": 136,
           "column": 13
         }
       }
@@ -17517,15 +17517,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3672,
-      "end": 3673,
+      "start": 3717,
+      "end": 3718,
       "loc": {
         "start": {
-          "line": 134,
+          "line": 136,
           "column": 13
         },
         "end": {
-          "line": 134,
+          "line": 136,
           "column": 14
         }
       }
@@ -17543,15 +17543,15 @@
         "binop": null
       },
       "value": "index",
-      "start": 3673,
-      "end": 3678,
+      "start": 3718,
+      "end": 3723,
       "loc": {
         "start": {
-          "line": 134,
+          "line": 136,
           "column": 14
         },
         "end": {
-          "line": 134,
+          "line": 136,
           "column": 19
         }
       }
@@ -17569,15 +17569,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3678,
-      "end": 3679,
+      "start": 3723,
+      "end": 3724,
       "loc": {
         "start": {
-          "line": 134,
+          "line": 136,
           "column": 19
         },
         "end": {
-          "line": 134,
+          "line": 136,
           "column": 20
         }
       }
@@ -17595,15 +17595,15 @@
         "binop": null
       },
       "value": "add",
-      "start": 3679,
-      "end": 3682,
+      "start": 3724,
+      "end": 3727,
       "loc": {
         "start": {
-          "line": 134,
+          "line": 136,
           "column": 20
         },
         "end": {
-          "line": 134,
+          "line": 136,
           "column": 23
         }
       }
@@ -17620,15 +17620,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3682,
-      "end": 3683,
+      "start": 3727,
+      "end": 3728,
       "loc": {
         "start": {
-          "line": 134,
+          "line": 136,
           "column": 23
         },
         "end": {
-          "line": 134,
+          "line": 136,
           "column": 24
         }
       }
@@ -17648,15 +17648,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 3683,
-      "end": 3687,
+      "start": 3728,
+      "end": 3732,
       "loc": {
         "start": {
-          "line": 134,
+          "line": 136,
           "column": 24
         },
         "end": {
-          "line": 134,
+          "line": 136,
           "column": 28
         }
       }
@@ -17674,15 +17674,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3687,
-      "end": 3688,
+      "start": 3732,
+      "end": 3733,
       "loc": {
         "start": {
-          "line": 134,
+          "line": 136,
           "column": 28
         },
         "end": {
-          "line": 134,
+          "line": 136,
           "column": 29
         }
       }
@@ -17700,15 +17700,15 @@
         "binop": null
       },
       "value": "component",
-      "start": 3689,
-      "end": 3698,
+      "start": 3734,
+      "end": 3743,
       "loc": {
         "start": {
-          "line": 134,
+          "line": 136,
           "column": 30
         },
         "end": {
-          "line": 134,
+          "line": 136,
           "column": 39
         }
       }
@@ -17725,15 +17725,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3698,
-      "end": 3699,
+      "start": 3743,
+      "end": 3744,
       "loc": {
         "start": {
-          "line": 134,
+          "line": 136,
           "column": 39
         },
         "end": {
-          "line": 134,
+          "line": 136,
           "column": 40
         }
       }
@@ -17750,15 +17750,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3702,
-      "end": 3703,
+      "start": 3747,
+      "end": 3748,
       "loc": {
         "start": {
-          "line": 135,
+          "line": 137,
           "column": 2
         },
         "end": {
-          "line": 135,
+          "line": 137,
           "column": 3
         }
       }
@@ -17778,15 +17778,15 @@
         "updateContext": null
       },
       "value": "return",
-      "start": 3707,
-      "end": 3713,
+      "start": 3752,
+      "end": 3758,
       "loc": {
         "start": {
-          "line": 137,
+          "line": 139,
           "column": 2
         },
         "end": {
-          "line": 137,
+          "line": 139,
           "column": 8
         }
       }
@@ -17806,15 +17806,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 3714,
-      "end": 3718,
+      "start": 3759,
+      "end": 3763,
       "loc": {
         "start": {
-          "line": 137,
+          "line": 139,
           "column": 9
         },
         "end": {
-          "line": 137,
+          "line": 139,
           "column": 13
         }
       }
@@ -17831,15 +17831,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3720,
-      "end": 3721,
+      "start": 3765,
+      "end": 3766,
       "loc": {
         "start": {
-          "line": 138,
+          "line": 140,
           "column": 1
         },
         "end": {
-          "line": 138,
+          "line": 140,
           "column": 2
         }
       }
@@ -17847,15 +17847,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Updates component data from an object or other component. Similar to access() with a shallow merge applied after.\n\t *\n\t * @example\n\t * entity.update('position', { x: 1, y: 2 })\n\t *\n\t * @param {string} component - The component name to update\n\t * @param {Object} data      - The object or other component to merge into the specified component.\n\t *\n\t * @return {Object} The original entity that update() was called on, so that operations can be chained.\n\t ",
-      "start": 3724,
-      "end": 4188,
+      "start": 3769,
+      "end": 4233,
       "loc": {
         "start": {
-          "line": 140,
+          "line": 142,
           "column": 1
         },
         "end": {
-          "line": 150,
+          "line": 152,
           "column": 4
         }
       }
@@ -17873,15 +17873,15 @@
         "binop": null
       },
       "value": "update",
-      "start": 4190,
-      "end": 4196,
+      "start": 4235,
+      "end": 4241,
       "loc": {
         "start": {
-          "line": 151,
+          "line": 153,
           "column": 1
         },
         "end": {
-          "line": 151,
+          "line": 153,
           "column": 7
         }
       }
@@ -17898,15 +17898,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4196,
-      "end": 4197,
+      "start": 4241,
+      "end": 4242,
       "loc": {
         "start": {
-          "line": 151,
+          "line": 153,
           "column": 7
         },
         "end": {
-          "line": 151,
+          "line": 153,
           "column": 8
         }
       }
@@ -17924,15 +17924,15 @@
         "binop": null
       },
       "value": "component",
-      "start": 4197,
-      "end": 4206,
+      "start": 4242,
+      "end": 4251,
       "loc": {
         "start": {
-          "line": 151,
+          "line": 153,
           "column": 8
         },
         "end": {
-          "line": 151,
+          "line": 153,
           "column": 17
         }
       }
@@ -17950,15 +17950,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 4206,
-      "end": 4207,
+      "start": 4251,
+      "end": 4252,
       "loc": {
         "start": {
-          "line": 151,
+          "line": 153,
           "column": 17
         },
         "end": {
-          "line": 151,
+          "line": 153,
           "column": 18
         }
       }
@@ -17976,15 +17976,15 @@
         "binop": null
       },
       "value": "data",
-      "start": 4208,
-      "end": 4212,
+      "start": 4253,
+      "end": 4257,
       "loc": {
         "start": {
-          "line": 151,
+          "line": 153,
           "column": 19
         },
         "end": {
-          "line": 151,
+          "line": 153,
           "column": 23
         }
       }
@@ -18001,15 +18001,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4212,
-      "end": 4213,
+      "start": 4257,
+      "end": 4258,
       "loc": {
         "start": {
-          "line": 151,
+          "line": 153,
           "column": 23
         },
         "end": {
-          "line": 151,
+          "line": 153,
           "column": 24
         }
       }
@@ -18026,15 +18026,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4214,
-      "end": 4215,
+      "start": 4259,
+      "end": 4260,
       "loc": {
         "start": {
-          "line": 151,
+          "line": 153,
           "column": 25
         },
         "end": {
-          "line": 151,
+          "line": 153,
           "column": 26
         }
       }
@@ -18054,15 +18054,15 @@
         "updateContext": null
       },
       "value": "let",
-      "start": 4218,
-      "end": 4221,
+      "start": 4263,
+      "end": 4266,
       "loc": {
         "start": {
-          "line": 152,
+          "line": 154,
           "column": 2
         },
         "end": {
-          "line": 152,
+          "line": 154,
           "column": 5
         }
       }
@@ -18080,15 +18080,15 @@
         "binop": null
       },
       "value": "comp",
-      "start": 4222,
-      "end": 4226,
+      "start": 4267,
+      "end": 4271,
       "loc": {
         "start": {
-          "line": 152,
+          "line": 154,
           "column": 6
         },
         "end": {
-          "line": 152,
+          "line": 154,
           "column": 10
         }
       }
@@ -18107,15 +18107,15 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 4227,
-      "end": 4228,
+      "start": 4272,
+      "end": 4273,
       "loc": {
         "start": {
-          "line": 152,
+          "line": 154,
           "column": 11
         },
         "end": {
-          "line": 152,
+          "line": 154,
           "column": 12
         }
       }
@@ -18135,15 +18135,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 4229,
-      "end": 4233,
+      "start": 4274,
+      "end": 4278,
       "loc": {
         "start": {
-          "line": 152,
+          "line": 154,
           "column": 13
         },
         "end": {
-          "line": 152,
+          "line": 154,
           "column": 17
         }
       }
@@ -18161,15 +18161,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 4233,
-      "end": 4234,
+      "start": 4278,
+      "end": 4279,
       "loc": {
         "start": {
-          "line": 152,
+          "line": 154,
           "column": 17
         },
         "end": {
-          "line": 152,
+          "line": 154,
           "column": 18
         }
       }
@@ -18187,15 +18187,15 @@
         "binop": null
       },
       "value": "access",
-      "start": 4234,
-      "end": 4240,
+      "start": 4279,
+      "end": 4285,
       "loc": {
         "start": {
-          "line": 152,
+          "line": 154,
           "column": 18
         },
         "end": {
-          "line": 152,
+          "line": 154,
           "column": 24
         }
       }
@@ -18212,15 +18212,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4240,
-      "end": 4241,
+      "start": 4285,
+      "end": 4286,
       "loc": {
         "start": {
-          "line": 152,
+          "line": 154,
           "column": 24
         },
         "end": {
-          "line": 152,
+          "line": 154,
           "column": 25
         }
       }
@@ -18238,15 +18238,15 @@
         "binop": null
       },
       "value": "component",
-      "start": 4241,
-      "end": 4250,
+      "start": 4286,
+      "end": 4295,
       "loc": {
         "start": {
-          "line": 152,
+          "line": 154,
           "column": 25
         },
         "end": {
-          "line": 152,
+          "line": 154,
           "column": 34
         }
       }
@@ -18263,15 +18263,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4250,
-      "end": 4251,
+      "start": 4295,
+      "end": 4296,
       "loc": {
         "start": {
-          "line": 152,
+          "line": 154,
           "column": 34
         },
         "end": {
-          "line": 152,
+          "line": 154,
           "column": 35
         }
       }
@@ -18279,15 +18279,15 @@
     {
       "type": "CommentLine",
       "value": " Shallow set keys of the component",
-      "start": 4255,
-      "end": 4291,
+      "start": 4300,
+      "end": 4336,
       "loc": {
         "start": {
-          "line": 154,
+          "line": 156,
           "column": 2
         },
         "end": {
-          "line": 154,
+          "line": 156,
           "column": 38
         }
       }
@@ -18307,15 +18307,15 @@
         "updateContext": null
       },
       "value": "for",
-      "start": 4294,
-      "end": 4297,
+      "start": 4339,
+      "end": 4342,
       "loc": {
         "start": {
-          "line": 155,
+          "line": 157,
           "column": 2
         },
         "end": {
-          "line": 155,
+          "line": 157,
           "column": 5
         }
       }
@@ -18332,15 +18332,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4298,
-      "end": 4299,
+      "start": 4343,
+      "end": 4344,
       "loc": {
         "start": {
-          "line": 155,
+          "line": 157,
           "column": 6
         },
         "end": {
-          "line": 155,
+          "line": 157,
           "column": 7
         }
       }
@@ -18360,15 +18360,15 @@
         "updateContext": null
       },
       "value": "let",
-      "start": 4299,
-      "end": 4302,
+      "start": 4344,
+      "end": 4347,
       "loc": {
         "start": {
-          "line": 155,
+          "line": 157,
           "column": 7
         },
         "end": {
-          "line": 155,
+          "line": 157,
           "column": 10
         }
       }
@@ -18386,15 +18386,15 @@
         "binop": null
       },
       "value": "key",
-      "start": 4303,
-      "end": 4306,
+      "start": 4348,
+      "end": 4351,
       "loc": {
         "start": {
-          "line": 155,
+          "line": 157,
           "column": 11
         },
         "end": {
-          "line": 155,
+          "line": 157,
           "column": 14
         }
       }
@@ -18414,15 +18414,15 @@
         "updateContext": null
       },
       "value": "in",
-      "start": 4307,
-      "end": 4309,
+      "start": 4352,
+      "end": 4354,
       "loc": {
         "start": {
-          "line": 155,
+          "line": 157,
           "column": 15
         },
         "end": {
-          "line": 155,
+          "line": 157,
           "column": 17
         }
       }
@@ -18440,15 +18440,15 @@
         "binop": null
       },
       "value": "data",
-      "start": 4310,
-      "end": 4314,
+      "start": 4355,
+      "end": 4359,
       "loc": {
         "start": {
-          "line": 155,
+          "line": 157,
           "column": 18
         },
         "end": {
-          "line": 155,
+          "line": 157,
           "column": 22
         }
       }
@@ -18465,15 +18465,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4314,
-      "end": 4315,
+      "start": 4359,
+      "end": 4360,
       "loc": {
         "start": {
-          "line": 155,
+          "line": 157,
           "column": 22
         },
         "end": {
-          "line": 155,
+          "line": 157,
           "column": 23
         }
       }
@@ -18490,15 +18490,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4316,
-      "end": 4317,
+      "start": 4361,
+      "end": 4362,
       "loc": {
         "start": {
-          "line": 155,
+          "line": 157,
           "column": 24
         },
         "end": {
-          "line": 155,
+          "line": 157,
           "column": 25
         }
       }
@@ -18516,15 +18516,15 @@
         "binop": null
       },
       "value": "comp",
-      "start": 4321,
-      "end": 4325,
+      "start": 4366,
+      "end": 4370,
       "loc": {
         "start": {
-          "line": 156,
+          "line": 158,
           "column": 3
         },
         "end": {
-          "line": 156,
+          "line": 158,
           "column": 7
         }
       }
@@ -18542,15 +18542,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 4325,
-      "end": 4326,
+      "start": 4370,
+      "end": 4371,
       "loc": {
         "start": {
-          "line": 156,
+          "line": 158,
           "column": 7
         },
         "end": {
-          "line": 156,
+          "line": 158,
           "column": 8
         }
       }
@@ -18568,15 +18568,15 @@
         "binop": null
       },
       "value": "key",
-      "start": 4326,
-      "end": 4329,
+      "start": 4371,
+      "end": 4374,
       "loc": {
         "start": {
-          "line": 156,
+          "line": 158,
           "column": 8
         },
         "end": {
-          "line": 156,
+          "line": 158,
           "column": 11
         }
       }
@@ -18594,15 +18594,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 4329,
-      "end": 4330,
+      "start": 4374,
+      "end": 4375,
       "loc": {
         "start": {
-          "line": 156,
+          "line": 158,
           "column": 11
         },
         "end": {
-          "line": 156,
+          "line": 158,
           "column": 12
         }
       }
@@ -18621,15 +18621,15 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 4331,
-      "end": 4332,
+      "start": 4376,
+      "end": 4377,
       "loc": {
         "start": {
-          "line": 156,
+          "line": 158,
           "column": 13
         },
         "end": {
-          "line": 156,
+          "line": 158,
           "column": 14
         }
       }
@@ -18647,15 +18647,15 @@
         "binop": null
       },
       "value": "data",
-      "start": 4333,
-      "end": 4337,
+      "start": 4378,
+      "end": 4382,
       "loc": {
         "start": {
-          "line": 156,
+          "line": 158,
           "column": 15
         },
         "end": {
-          "line": 156,
+          "line": 158,
           "column": 19
         }
       }
@@ -18673,15 +18673,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 4337,
-      "end": 4338,
+      "start": 4382,
+      "end": 4383,
       "loc": {
         "start": {
-          "line": 156,
+          "line": 158,
           "column": 19
         },
         "end": {
-          "line": 156,
+          "line": 158,
           "column": 20
         }
       }
@@ -18699,15 +18699,15 @@
         "binop": null
       },
       "value": "key",
-      "start": 4338,
-      "end": 4341,
+      "start": 4383,
+      "end": 4386,
       "loc": {
         "start": {
-          "line": 156,
+          "line": 158,
           "column": 20
         },
         "end": {
-          "line": 156,
+          "line": 158,
           "column": 23
         }
       }
@@ -18725,15 +18725,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 4341,
-      "end": 4342,
+      "start": 4386,
+      "end": 4387,
       "loc": {
         "start": {
-          "line": 156,
+          "line": 158,
           "column": 23
         },
         "end": {
-          "line": 156,
+          "line": 158,
           "column": 24
         }
       }
@@ -18750,15 +18750,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4345,
-      "end": 4346,
+      "start": 4390,
+      "end": 4391,
       "loc": {
         "start": {
-          "line": 157,
+          "line": 159,
           "column": 2
         },
         "end": {
-          "line": 157,
+          "line": 159,
           "column": 3
         }
       }
@@ -18778,15 +18778,15 @@
         "updateContext": null
       },
       "value": "return",
-      "start": 4350,
-      "end": 4356,
+      "start": 4395,
+      "end": 4401,
       "loc": {
         "start": {
-          "line": 159,
+          "line": 161,
           "column": 2
         },
         "end": {
-          "line": 159,
+          "line": 161,
           "column": 8
         }
       }
@@ -18806,15 +18806,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 4357,
-      "end": 4361,
+      "start": 4402,
+      "end": 4406,
       "loc": {
         "start": {
-          "line": 159,
+          "line": 161,
           "column": 9
         },
         "end": {
-          "line": 159,
+          "line": 161,
           "column": 13
         }
       }
@@ -18831,15 +18831,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4363,
-      "end": 4364,
+      "start": 4408,
+      "end": 4409,
       "loc": {
         "start": {
-          "line": 160,
+          "line": 162,
           "column": 1
         },
         "end": {
-          "line": 160,
+          "line": 162,
           "column": 2
         }
       }
@@ -18847,15 +18847,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Removes a component from the entity - has no effect when it doesn't exist.\n\t * Can specify an onRemove() method in your component which gets called before it is removed.\n\t * If nothing is specified, then nothing will be removed. Use removeAll() to remove all components.\n\t *\n\t * @example\n\t * entity.remove('position')\n\t *\n\t * @param {...string} [components] - The component names to remove from the entity.\n\t *\n\t * @return {Object} The original entity that remove() was called on, so that operations can be chained.\n\t ",
-      "start": 4367,
-      "end": 4895,
+      "start": 4412,
+      "end": 4940,
       "loc": {
         "start": {
-          "line": 162,
+          "line": 164,
           "column": 1
         },
         "end": {
-          "line": 173,
+          "line": 175,
           "column": 4
         }
       }
@@ -18873,15 +18873,15 @@
         "binop": null
       },
       "value": "remove",
-      "start": 4897,
-      "end": 4903,
+      "start": 4942,
+      "end": 4948,
       "loc": {
         "start": {
-          "line": 174,
+          "line": 176,
           "column": 1
         },
         "end": {
-          "line": 174,
+          "line": 176,
           "column": 7
         }
       }
@@ -18898,15 +18898,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4903,
-      "end": 4904,
+      "start": 4948,
+      "end": 4949,
       "loc": {
         "start": {
-          "line": 174,
+          "line": 176,
           "column": 7
         },
         "end": {
-          "line": 174,
+          "line": 176,
           "column": 8
         }
       }
@@ -18924,15 +18924,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 4904,
-      "end": 4907,
+      "start": 4949,
+      "end": 4952,
       "loc": {
         "start": {
-          "line": 174,
+          "line": 176,
           "column": 8
         },
         "end": {
-          "line": 174,
+          "line": 176,
           "column": 11
         }
       }
@@ -18950,15 +18950,15 @@
         "binop": null
       },
       "value": "components",
-      "start": 4907,
-      "end": 4917,
+      "start": 4952,
+      "end": 4962,
       "loc": {
         "start": {
-          "line": 174,
+          "line": 176,
           "column": 11
         },
         "end": {
-          "line": 174,
+          "line": 176,
           "column": 21
         }
       }
@@ -18975,15 +18975,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4917,
-      "end": 4918,
+      "start": 4962,
+      "end": 4963,
       "loc": {
         "start": {
-          "line": 174,
+          "line": 176,
           "column": 21
         },
         "end": {
-          "line": 174,
+          "line": 176,
           "column": 22
         }
       }
@@ -19000,15 +19000,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4919,
-      "end": 4920,
+      "start": 4964,
+      "end": 4965,
       "loc": {
         "start": {
-          "line": 174,
+          "line": 176,
           "column": 23
         },
         "end": {
-          "line": 174,
+          "line": 176,
           "column": 24
         }
       }
@@ -19028,15 +19028,15 @@
         "updateContext": null
       },
       "value": "for",
-      "start": 4923,
-      "end": 4926,
+      "start": 4968,
+      "end": 4971,
       "loc": {
         "start": {
-          "line": 175,
+          "line": 177,
           "column": 2
         },
         "end": {
-          "line": 175,
+          "line": 177,
           "column": 5
         }
       }
@@ -19053,15 +19053,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4927,
-      "end": 4928,
+      "start": 4972,
+      "end": 4973,
       "loc": {
         "start": {
-          "line": 175,
+          "line": 177,
           "column": 6
         },
         "end": {
-          "line": 175,
+          "line": 177,
           "column": 7
         }
       }
@@ -19081,15 +19081,15 @@
         "updateContext": null
       },
       "value": "let",
-      "start": 4928,
-      "end": 4931,
+      "start": 4973,
+      "end": 4976,
       "loc": {
         "start": {
-          "line": 175,
+          "line": 177,
           "column": 7
         },
         "end": {
-          "line": 175,
+          "line": 177,
           "column": 10
         }
       }
@@ -19107,15 +19107,15 @@
         "binop": null
       },
       "value": "component",
-      "start": 4932,
-      "end": 4941,
+      "start": 4977,
+      "end": 4986,
       "loc": {
         "start": {
-          "line": 175,
+          "line": 177,
           "column": 11
         },
         "end": {
-          "line": 175,
+          "line": 177,
           "column": 20
         }
       }
@@ -19133,15 +19133,15 @@
         "binop": null
       },
       "value": "of",
-      "start": 4942,
-      "end": 4944,
+      "start": 4987,
+      "end": 4989,
       "loc": {
         "start": {
-          "line": 175,
+          "line": 177,
           "column": 21
         },
         "end": {
-          "line": 175,
+          "line": 177,
           "column": 23
         }
       }
@@ -19159,15 +19159,15 @@
         "binop": null
       },
       "value": "components",
-      "start": 4945,
-      "end": 4955,
+      "start": 4990,
+      "end": 5000,
       "loc": {
         "start": {
-          "line": 175,
+          "line": 177,
           "column": 24
         },
         "end": {
-          "line": 175,
+          "line": 177,
           "column": 34
         }
       }
@@ -19184,15 +19184,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4955,
-      "end": 4956,
+      "start": 5000,
+      "end": 5001,
       "loc": {
         "start": {
-          "line": 175,
+          "line": 177,
           "column": 34
         },
         "end": {
-          "line": 175,
+          "line": 177,
           "column": 35
         }
       }
@@ -19209,15 +19209,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4957,
-      "end": 4958,
+      "start": 5002,
+      "end": 5003,
       "loc": {
         "start": {
-          "line": 175,
+          "line": 177,
           "column": 36
         },
         "end": {
-          "line": 175,
+          "line": 177,
           "column": 37
         }
       }
@@ -19237,15 +19237,15 @@
         "updateContext": null
       },
       "value": "if",
-      "start": 4962,
-      "end": 4964,
+      "start": 5007,
+      "end": 5009,
       "loc": {
         "start": {
-          "line": 176,
+          "line": 178,
           "column": 3
         },
         "end": {
-          "line": 176,
+          "line": 178,
           "column": 5
         }
       }
@@ -19262,15 +19262,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4965,
-      "end": 4966,
+      "start": 5010,
+      "end": 5011,
       "loc": {
         "start": {
-          "line": 176,
+          "line": 178,
           "column": 6
         },
         "end": {
-          "line": 176,
+          "line": 178,
           "column": 7
         }
       }
@@ -19288,15 +19288,15 @@
         "binop": null
       },
       "value": "component",
-      "start": 4966,
-      "end": 4975,
+      "start": 5011,
+      "end": 5020,
       "loc": {
         "start": {
-          "line": 176,
+          "line": 178,
           "column": 7
         },
         "end": {
-          "line": 176,
+          "line": 178,
           "column": 16
         }
       }
@@ -19316,15 +19316,15 @@
         "updateContext": null
       },
       "value": "in",
-      "start": 4976,
-      "end": 4978,
+      "start": 5021,
+      "end": 5023,
       "loc": {
         "start": {
-          "line": 176,
+          "line": 178,
           "column": 17
         },
         "end": {
-          "line": 176,
+          "line": 178,
           "column": 19
         }
       }
@@ -19344,15 +19344,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 4979,
-      "end": 4983,
+      "start": 5024,
+      "end": 5028,
       "loc": {
         "start": {
-          "line": 176,
+          "line": 178,
           "column": 20
         },
         "end": {
-          "line": 176,
+          "line": 178,
           "column": 24
         }
       }
@@ -19370,15 +19370,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 4983,
-      "end": 4984,
+      "start": 5028,
+      "end": 5029,
       "loc": {
         "start": {
-          "line": 176,
+          "line": 178,
           "column": 24
         },
         "end": {
-          "line": 176,
+          "line": 178,
           "column": 25
         }
       }
@@ -19396,15 +19396,15 @@
         "binop": null
       },
       "value": "data",
-      "start": 4984,
-      "end": 4988,
+      "start": 5029,
+      "end": 5033,
       "loc": {
         "start": {
-          "line": 176,
+          "line": 178,
           "column": 25
         },
         "end": {
-          "line": 176,
+          "line": 178,
           "column": 29
         }
       }
@@ -19421,15 +19421,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4988,
-      "end": 4989,
+      "start": 5033,
+      "end": 5034,
       "loc": {
         "start": {
-          "line": 176,
+          "line": 178,
           "column": 29
         },
         "end": {
-          "line": 176,
+          "line": 178,
           "column": 30
         }
       }
@@ -19446,15 +19446,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4990,
-      "end": 4991,
+      "start": 5035,
+      "end": 5036,
       "loc": {
         "start": {
-          "line": 176,
+          "line": 178,
           "column": 31
         },
         "end": {
-          "line": 176,
+          "line": 178,
           "column": 32
         }
       }
@@ -19462,15 +19462,15 @@
     {
       "type": "CommentLine",
       "value": " Remove from index",
-      "start": 4997,
-      "end": 5017,
+      "start": 5042,
+      "end": 5062,
       "loc": {
         "start": {
-          "line": 178,
+          "line": 180,
           "column": 4
         },
         "end": {
-          "line": 178,
+          "line": 180,
           "column": 24
         }
       }
@@ -19490,15 +19490,15 @@
         "updateContext": null
       },
       "value": "if",
-      "start": 5022,
-      "end": 5024,
+      "start": 5067,
+      "end": 5069,
       "loc": {
         "start": {
-          "line": 179,
+          "line": 181,
           "column": 4
         },
         "end": {
-          "line": 179,
+          "line": 181,
           "column": 6
         }
       }
@@ -19515,15 +19515,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5025,
-      "end": 5026,
+      "start": 5070,
+      "end": 5071,
       "loc": {
         "start": {
-          "line": 179,
+          "line": 181,
           "column": 7
         },
         "end": {
-          "line": 179,
+          "line": 181,
           "column": 8
         }
       }
@@ -19543,15 +19543,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 5026,
-      "end": 5030,
+      "start": 5071,
+      "end": 5075,
       "loc": {
         "start": {
-          "line": 179,
+          "line": 181,
           "column": 8
         },
         "end": {
-          "line": 179,
+          "line": 181,
           "column": 12
         }
       }
@@ -19569,15 +19569,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5030,
-      "end": 5031,
+      "start": 5075,
+      "end": 5076,
       "loc": {
         "start": {
-          "line": 179,
+          "line": 181,
           "column": 12
         },
         "end": {
-          "line": 179,
+          "line": 181,
           "column": 13
         }
       }
@@ -19595,15 +19595,15 @@
         "binop": null
       },
       "value": "valid",
-      "start": 5031,
-      "end": 5036,
+      "start": 5076,
+      "end": 5081,
       "loc": {
         "start": {
-          "line": 179,
+          "line": 181,
           "column": 13
         },
         "end": {
-          "line": 179,
+          "line": 181,
           "column": 18
         }
       }
@@ -19620,15 +19620,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5036,
-      "end": 5037,
+      "start": 5081,
+      "end": 5082,
       "loc": {
         "start": {
-          "line": 179,
+          "line": 181,
           "column": 18
         },
         "end": {
-          "line": 179,
+          "line": 181,
           "column": 19
         }
       }
@@ -19645,15 +19645,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5037,
-      "end": 5038,
+      "start": 5082,
+      "end": 5083,
       "loc": {
         "start": {
-          "line": 179,
+          "line": 181,
           "column": 19
         },
         "end": {
-          "line": 179,
+          "line": 181,
           "column": 20
         }
       }
@@ -19670,15 +19670,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5038,
-      "end": 5039,
+      "start": 5083,
+      "end": 5084,
       "loc": {
         "start": {
-          "line": 179,
+          "line": 181,
           "column": 20
         },
         "end": {
-          "line": 179,
+          "line": 181,
           "column": 21
         }
       }
@@ -19695,15 +19695,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5040,
-      "end": 5041,
+      "start": 5085,
+      "end": 5086,
       "loc": {
         "start": {
-          "line": 179,
+          "line": 181,
           "column": 22
         },
         "end": {
-          "line": 179,
+          "line": 181,
           "column": 23
         }
       }
@@ -19723,15 +19723,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 5047,
-      "end": 5051,
+      "start": 5092,
+      "end": 5096,
       "loc": {
         "start": {
-          "line": 180,
+          "line": 182,
           "column": 5
         },
         "end": {
-          "line": 180,
+          "line": 182,
           "column": 9
         }
       }
@@ -19749,15 +19749,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5051,
-      "end": 5052,
+      "start": 5096,
+      "end": 5097,
       "loc": {
         "start": {
-          "line": 180,
+          "line": 182,
           "column": 9
         },
         "end": {
-          "line": 180,
+          "line": 182,
           "column": 10
         }
       }
@@ -19775,15 +19775,15 @@
         "binop": null
       },
       "value": "world",
-      "start": 5052,
-      "end": 5057,
+      "start": 5097,
+      "end": 5102,
       "loc": {
         "start": {
-          "line": 180,
+          "line": 182,
           "column": 10
         },
         "end": {
-          "line": 180,
+          "line": 182,
           "column": 15
         }
       }
@@ -19801,15 +19801,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5057,
-      "end": 5058,
+      "start": 5102,
+      "end": 5103,
       "loc": {
         "start": {
-          "line": 180,
+          "line": 182,
           "column": 15
         },
         "end": {
-          "line": 180,
+          "line": 182,
           "column": 16
         }
       }
@@ -19827,15 +19827,15 @@
         "binop": null
       },
       "value": "index",
-      "start": 5058,
-      "end": 5063,
+      "start": 5103,
+      "end": 5108,
       "loc": {
         "start": {
-          "line": 180,
+          "line": 182,
           "column": 16
         },
         "end": {
-          "line": 180,
+          "line": 182,
           "column": 21
         }
       }
@@ -19853,15 +19853,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5063,
-      "end": 5064,
+      "start": 5108,
+      "end": 5109,
       "loc": {
         "start": {
-          "line": 180,
+          "line": 182,
           "column": 21
         },
         "end": {
-          "line": 180,
+          "line": 182,
           "column": 22
         }
       }
@@ -19879,15 +19879,15 @@
         "binop": null
       },
       "value": "remove",
-      "start": 5064,
-      "end": 5070,
+      "start": 5109,
+      "end": 5115,
       "loc": {
         "start": {
-          "line": 180,
+          "line": 182,
           "column": 22
         },
         "end": {
-          "line": 180,
+          "line": 182,
           "column": 28
         }
       }
@@ -19904,15 +19904,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5070,
-      "end": 5071,
+      "start": 5115,
+      "end": 5116,
       "loc": {
         "start": {
-          "line": 180,
+          "line": 182,
           "column": 28
         },
         "end": {
-          "line": 180,
+          "line": 182,
           "column": 29
         }
       }
@@ -19932,15 +19932,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 5071,
-      "end": 5075,
+      "start": 5116,
+      "end": 5120,
       "loc": {
         "start": {
-          "line": 180,
+          "line": 182,
           "column": 29
         },
         "end": {
-          "line": 180,
+          "line": 182,
           "column": 33
         }
       }
@@ -19958,15 +19958,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5075,
-      "end": 5076,
+      "start": 5120,
+      "end": 5121,
       "loc": {
         "start": {
-          "line": 180,
+          "line": 182,
           "column": 33
         },
         "end": {
-          "line": 180,
+          "line": 182,
           "column": 34
         }
       }
@@ -19984,15 +19984,15 @@
         "binop": null
       },
       "value": "component",
-      "start": 5077,
-      "end": 5086,
+      "start": 5122,
+      "end": 5131,
       "loc": {
         "start": {
-          "line": 180,
+          "line": 182,
           "column": 35
         },
         "end": {
-          "line": 180,
+          "line": 182,
           "column": 44
         }
       }
@@ -20009,15 +20009,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5086,
-      "end": 5087,
+      "start": 5131,
+      "end": 5132,
       "loc": {
         "start": {
-          "line": 180,
+          "line": 182,
           "column": 44
         },
         "end": {
-          "line": 180,
+          "line": 182,
           "column": 45
         }
       }
@@ -20034,15 +20034,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5092,
-      "end": 5093,
+      "start": 5137,
+      "end": 5138,
       "loc": {
         "start": {
-          "line": 181,
+          "line": 183,
           "column": 4
         },
         "end": {
-          "line": 181,
+          "line": 183,
           "column": 5
         }
       }
@@ -20050,15 +20050,15 @@
     {
       "type": "CommentLine",
       "value": " Call custom onRemove",
-      "start": 5099,
-      "end": 5122,
+      "start": 5144,
+      "end": 5167,
       "loc": {
         "start": {
-          "line": 183,
+          "line": 185,
           "column": 4
         },
         "end": {
-          "line": 183,
+          "line": 185,
           "column": 27
         }
       }
@@ -20076,15 +20076,15 @@
         "binop": null
       },
       "value": "invoke",
-      "start": 5127,
-      "end": 5133,
+      "start": 5172,
+      "end": 5178,
       "loc": {
         "start": {
-          "line": 184,
+          "line": 186,
           "column": 4
         },
         "end": {
-          "line": 184,
+          "line": 186,
           "column": 10
         }
       }
@@ -20101,15 +20101,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5133,
-      "end": 5134,
+      "start": 5178,
+      "end": 5179,
       "loc": {
         "start": {
-          "line": 184,
+          "line": 186,
           "column": 10
         },
         "end": {
-          "line": 184,
+          "line": 186,
           "column": 11
         }
       }
@@ -20129,15 +20129,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 5134,
-      "end": 5138,
+      "start": 5179,
+      "end": 5183,
       "loc": {
         "start": {
-          "line": 184,
+          "line": 186,
           "column": 11
         },
         "end": {
-          "line": 184,
+          "line": 186,
           "column": 15
         }
       }
@@ -20155,15 +20155,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5138,
-      "end": 5139,
+      "start": 5183,
+      "end": 5184,
       "loc": {
         "start": {
-          "line": 184,
+          "line": 186,
           "column": 15
         },
         "end": {
-          "line": 184,
+          "line": 186,
           "column": 16
         }
       }
@@ -20181,15 +20181,15 @@
         "binop": null
       },
       "value": "data",
-      "start": 5139,
-      "end": 5143,
+      "start": 5184,
+      "end": 5188,
       "loc": {
         "start": {
-          "line": 184,
+          "line": 186,
           "column": 16
         },
         "end": {
-          "line": 184,
+          "line": 186,
           "column": 20
         }
       }
@@ -20207,15 +20207,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5143,
-      "end": 5144,
+      "start": 5188,
+      "end": 5189,
       "loc": {
         "start": {
-          "line": 184,
+          "line": 186,
           "column": 20
         },
         "end": {
-          "line": 184,
+          "line": 186,
           "column": 21
         }
       }
@@ -20233,15 +20233,15 @@
         "binop": null
       },
       "value": "component",
-      "start": 5144,
-      "end": 5153,
+      "start": 5189,
+      "end": 5198,
       "loc": {
         "start": {
-          "line": 184,
+          "line": 186,
           "column": 21
         },
         "end": {
-          "line": 184,
+          "line": 186,
           "column": 30
         }
       }
@@ -20259,15 +20259,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5153,
-      "end": 5154,
+      "start": 5198,
+      "end": 5199,
       "loc": {
         "start": {
-          "line": 184,
+          "line": 186,
           "column": 30
         },
         "end": {
-          "line": 184,
+          "line": 186,
           "column": 31
         }
       }
@@ -20285,15 +20285,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5154,
-      "end": 5155,
+      "start": 5199,
+      "end": 5200,
       "loc": {
         "start": {
-          "line": 184,
+          "line": 186,
           "column": 31
         },
         "end": {
-          "line": 184,
+          "line": 186,
           "column": 32
         }
       }
@@ -20312,15 +20312,15 @@
         "updateContext": null
       },
       "value": "onRemove",
-      "start": 5156,
-      "end": 5166,
+      "start": 5201,
+      "end": 5211,
       "loc": {
         "start": {
-          "line": 184,
+          "line": 186,
           "column": 33
         },
         "end": {
-          "line": 184,
+          "line": 186,
           "column": 43
         }
       }
@@ -20337,15 +20337,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5166,
-      "end": 5167,
+      "start": 5211,
+      "end": 5212,
       "loc": {
         "start": {
-          "line": 184,
+          "line": 186,
           "column": 43
         },
         "end": {
-          "line": 184,
+          "line": 186,
           "column": 44
         }
       }
@@ -20365,15 +20365,15 @@
         "updateContext": null
       },
       "value": "delete",
-      "start": 5173,
-      "end": 5179,
+      "start": 5218,
+      "end": 5224,
       "loc": {
         "start": {
-          "line": 186,
+          "line": 188,
           "column": 4
         },
         "end": {
-          "line": 186,
+          "line": 188,
           "column": 10
         }
       }
@@ -20393,15 +20393,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 5180,
-      "end": 5184,
+      "start": 5225,
+      "end": 5229,
       "loc": {
         "start": {
-          "line": 186,
+          "line": 188,
           "column": 11
         },
         "end": {
-          "line": 186,
+          "line": 188,
           "column": 15
         }
       }
@@ -20419,15 +20419,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5184,
-      "end": 5185,
+      "start": 5229,
+      "end": 5230,
       "loc": {
         "start": {
-          "line": 186,
+          "line": 188,
           "column": 15
         },
         "end": {
-          "line": 186,
+          "line": 188,
           "column": 16
         }
       }
@@ -20445,15 +20445,15 @@
         "binop": null
       },
       "value": "data",
-      "start": 5185,
-      "end": 5189,
+      "start": 5230,
+      "end": 5234,
       "loc": {
         "start": {
-          "line": 186,
+          "line": 188,
           "column": 16
         },
         "end": {
-          "line": 186,
+          "line": 188,
           "column": 20
         }
       }
@@ -20471,15 +20471,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5189,
-      "end": 5190,
+      "start": 5234,
+      "end": 5235,
       "loc": {
         "start": {
-          "line": 186,
+          "line": 188,
           "column": 20
         },
         "end": {
-          "line": 186,
+          "line": 188,
           "column": 21
         }
       }
@@ -20497,15 +20497,15 @@
         "binop": null
       },
       "value": "component",
-      "start": 5190,
-      "end": 5199,
+      "start": 5235,
+      "end": 5244,
       "loc": {
         "start": {
-          "line": 186,
+          "line": 188,
           "column": 21
         },
         "end": {
-          "line": 186,
+          "line": 188,
           "column": 30
         }
       }
@@ -20523,15 +20523,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5199,
-      "end": 5200,
+      "start": 5244,
+      "end": 5245,
       "loc": {
         "start": {
-          "line": 186,
+          "line": 188,
           "column": 30
         },
         "end": {
-          "line": 186,
+          "line": 188,
           "column": 31
         }
       }
@@ -20548,15 +20548,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5204,
-      "end": 5205,
+      "start": 5249,
+      "end": 5250,
       "loc": {
         "start": {
-          "line": 187,
+          "line": 189,
           "column": 3
         },
         "end": {
-          "line": 187,
+          "line": 189,
           "column": 4
         }
       }
@@ -20573,15 +20573,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5208,
-      "end": 5209,
+      "start": 5253,
+      "end": 5254,
       "loc": {
         "start": {
-          "line": 188,
+          "line": 190,
           "column": 2
         },
         "end": {
-          "line": 188,
+          "line": 190,
           "column": 3
         }
       }
@@ -20601,15 +20601,15 @@
         "updateContext": null
       },
       "value": "return",
-      "start": 5212,
-      "end": 5218,
+      "start": 5257,
+      "end": 5263,
       "loc": {
         "start": {
-          "line": 189,
+          "line": 191,
           "column": 2
         },
         "end": {
-          "line": 189,
+          "line": 191,
           "column": 8
         }
       }
@@ -20629,15 +20629,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 5219,
-      "end": 5223,
+      "start": 5264,
+      "end": 5268,
       "loc": {
         "start": {
-          "line": 189,
+          "line": 191,
           "column": 9
         },
         "end": {
-          "line": 189,
+          "line": 191,
           "column": 13
         }
       }
@@ -20654,15 +20654,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5225,
-      "end": 5226,
+      "start": 5270,
+      "end": 5271,
       "loc": {
         "start": {
-          "line": 190,
+          "line": 192,
           "column": 1
         },
         "end": {
-          "line": 190,
+          "line": 192,
           "column": 2
         }
       }
@@ -20670,15 +20670,15 @@
     {
       "type": "CommentLine",
       "value": " Remove all components",
-      "start": 5229,
-      "end": 5253,
+      "start": 5274,
+      "end": 5298,
       "loc": {
         "start": {
-          "line": 192,
+          "line": 194,
           "column": 1
         },
         "end": {
-          "line": 192,
+          "line": 194,
           "column": 25
         }
       }
@@ -20686,15 +20686,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Removes all components from the entity.\n\t *\n\t * @example\n\t * entity.removeAll()\n\t *\n\t * @return {Object} The original entity that removeAll() was called on, so that operations can be chained.\n\t ",
-      "start": 5256,
-      "end": 5460,
+      "start": 5301,
+      "end": 5505,
       "loc": {
         "start": {
-          "line": 194,
+          "line": 196,
           "column": 1
         },
         "end": {
-          "line": 201,
+          "line": 203,
           "column": 4
         }
       }
@@ -20712,15 +20712,15 @@
         "binop": null
       },
       "value": "removeAll",
-      "start": 5462,
-      "end": 5471,
+      "start": 5507,
+      "end": 5516,
       "loc": {
         "start": {
-          "line": 202,
+          "line": 204,
           "column": 1
         },
         "end": {
-          "line": 202,
+          "line": 204,
           "column": 10
         }
       }
@@ -20737,15 +20737,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5471,
-      "end": 5472,
+      "start": 5516,
+      "end": 5517,
       "loc": {
         "start": {
-          "line": 202,
+          "line": 204,
           "column": 10
         },
         "end": {
-          "line": 202,
+          "line": 204,
           "column": 11
         }
       }
@@ -20762,15 +20762,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5472,
-      "end": 5473,
+      "start": 5517,
+      "end": 5518,
       "loc": {
         "start": {
-          "line": 202,
+          "line": 204,
           "column": 11
         },
         "end": {
-          "line": 202,
+          "line": 204,
           "column": 12
         }
       }
@@ -20787,15 +20787,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5474,
-      "end": 5475,
+      "start": 5519,
+      "end": 5520,
       "loc": {
         "start": {
-          "line": 202,
+          "line": 204,
           "column": 13
         },
         "end": {
-          "line": 202,
+          "line": 204,
           "column": 14
         }
       }
@@ -20815,15 +20815,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 5478,
-      "end": 5482,
+      "start": 5523,
+      "end": 5527,
       "loc": {
         "start": {
-          "line": 203,
+          "line": 205,
           "column": 2
         },
         "end": {
-          "line": 203,
+          "line": 205,
           "column": 6
         }
       }
@@ -20841,15 +20841,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5482,
-      "end": 5483,
+      "start": 5527,
+      "end": 5528,
       "loc": {
         "start": {
-          "line": 203,
+          "line": 205,
           "column": 6
         },
         "end": {
-          "line": 203,
+          "line": 205,
           "column": 7
         }
       }
@@ -20867,15 +20867,15 @@
         "binop": null
       },
       "value": "remove",
-      "start": 5483,
-      "end": 5489,
+      "start": 5528,
+      "end": 5534,
       "loc": {
         "start": {
-          "line": 203,
+          "line": 205,
           "column": 7
         },
         "end": {
-          "line": 203,
+          "line": 205,
           "column": 13
         }
       }
@@ -20892,15 +20892,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5489,
-      "end": 5490,
+      "start": 5534,
+      "end": 5535,
       "loc": {
         "start": {
-          "line": 203,
+          "line": 205,
           "column": 13
         },
         "end": {
-          "line": 203,
+          "line": 205,
           "column": 14
         }
       }
@@ -20918,15 +20918,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5490,
-      "end": 5493,
+      "start": 5535,
+      "end": 5538,
       "loc": {
         "start": {
-          "line": 203,
+          "line": 205,
           "column": 14
         },
         "end": {
-          "line": 203,
+          "line": 205,
           "column": 17
         }
       }
@@ -20944,15 +20944,15 @@
         "binop": null
       },
       "value": "Object",
-      "start": 5493,
-      "end": 5499,
+      "start": 5538,
+      "end": 5544,
       "loc": {
         "start": {
-          "line": 203,
+          "line": 205,
           "column": 17
         },
         "end": {
-          "line": 203,
+          "line": 205,
           "column": 23
         }
       }
@@ -20970,15 +20970,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5499,
-      "end": 5500,
+      "start": 5544,
+      "end": 5545,
       "loc": {
         "start": {
-          "line": 203,
+          "line": 205,
           "column": 23
         },
         "end": {
-          "line": 203,
+          "line": 205,
           "column": 24
         }
       }
@@ -20996,15 +20996,15 @@
         "binop": null
       },
       "value": "keys",
-      "start": 5500,
-      "end": 5504,
+      "start": 5545,
+      "end": 5549,
       "loc": {
         "start": {
-          "line": 203,
+          "line": 205,
           "column": 24
         },
         "end": {
-          "line": 203,
+          "line": 205,
           "column": 28
         }
       }
@@ -21021,15 +21021,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5504,
-      "end": 5505,
+      "start": 5549,
+      "end": 5550,
       "loc": {
         "start": {
-          "line": 203,
+          "line": 205,
           "column": 28
         },
         "end": {
-          "line": 203,
+          "line": 205,
           "column": 29
         }
       }
@@ -21049,15 +21049,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 5505,
-      "end": 5509,
+      "start": 5550,
+      "end": 5554,
       "loc": {
         "start": {
-          "line": 203,
+          "line": 205,
           "column": 29
         },
         "end": {
-          "line": 203,
+          "line": 205,
           "column": 33
         }
       }
@@ -21075,15 +21075,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5509,
-      "end": 5510,
+      "start": 5554,
+      "end": 5555,
       "loc": {
         "start": {
-          "line": 203,
+          "line": 205,
           "column": 33
         },
         "end": {
-          "line": 203,
+          "line": 205,
           "column": 34
         }
       }
@@ -21101,15 +21101,15 @@
         "binop": null
       },
       "value": "data",
-      "start": 5510,
-      "end": 5514,
+      "start": 5555,
+      "end": 5559,
       "loc": {
         "start": {
-          "line": 203,
+          "line": 205,
           "column": 34
         },
         "end": {
-          "line": 203,
+          "line": 205,
           "column": 38
         }
       }
@@ -21126,15 +21126,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5514,
-      "end": 5515,
+      "start": 5559,
+      "end": 5560,
       "loc": {
         "start": {
-          "line": 203,
+          "line": 205,
           "column": 38
         },
         "end": {
-          "line": 203,
+          "line": 205,
           "column": 39
         }
       }
@@ -21151,15 +21151,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5515,
-      "end": 5516,
+      "start": 5560,
+      "end": 5561,
       "loc": {
         "start": {
-          "line": 203,
+          "line": 205,
           "column": 39
         },
         "end": {
-          "line": 203,
+          "line": 205,
           "column": 40
         }
       }
@@ -21179,15 +21179,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 5519,
-      "end": 5523,
+      "start": 5564,
+      "end": 5568,
       "loc": {
         "start": {
-          "line": 204,
+          "line": 206,
           "column": 2
         },
         "end": {
-          "line": 204,
+          "line": 206,
           "column": 6
         }
       }
@@ -21205,15 +21205,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5523,
-      "end": 5524,
+      "start": 5568,
+      "end": 5569,
       "loc": {
         "start": {
-          "line": 204,
+          "line": 206,
           "column": 6
         },
         "end": {
-          "line": 204,
+          "line": 206,
           "column": 7
         }
       }
@@ -21231,15 +21231,15 @@
         "binop": null
       },
       "value": "data",
-      "start": 5524,
-      "end": 5528,
+      "start": 5569,
+      "end": 5573,
       "loc": {
         "start": {
-          "line": 204,
+          "line": 206,
           "column": 7
         },
         "end": {
-          "line": 204,
+          "line": 206,
           "column": 11
         }
       }
@@ -21258,15 +21258,15 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 5529,
-      "end": 5530,
+      "start": 5574,
+      "end": 5575,
       "loc": {
         "start": {
-          "line": 204,
+          "line": 206,
           "column": 12
         },
         "end": {
-          "line": 204,
+          "line": 206,
           "column": 13
         }
       }
@@ -21283,15 +21283,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5531,
-      "end": 5532,
+      "start": 5576,
+      "end": 5577,
       "loc": {
         "start": {
-          "line": 204,
+          "line": 206,
           "column": 14
         },
         "end": {
-          "line": 204,
+          "line": 206,
           "column": 15
         }
       }
@@ -21308,15 +21308,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5532,
-      "end": 5533,
+      "start": 5577,
+      "end": 5578,
       "loc": {
         "start": {
-          "line": 204,
+          "line": 206,
           "column": 15
         },
         "end": {
-          "line": 204,
+          "line": 206,
           "column": 16
         }
       }
@@ -21336,15 +21336,15 @@
         "updateContext": null
       },
       "value": "return",
-      "start": 5536,
-      "end": 5542,
+      "start": 5581,
+      "end": 5587,
       "loc": {
         "start": {
-          "line": 205,
+          "line": 207,
           "column": 2
         },
         "end": {
-          "line": 205,
+          "line": 207,
           "column": 8
         }
       }
@@ -21364,15 +21364,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 5543,
-      "end": 5547,
+      "start": 5588,
+      "end": 5592,
       "loc": {
         "start": {
-          "line": 205,
+          "line": 207,
           "column": 9
         },
         "end": {
-          "line": 205,
+          "line": 207,
           "column": 13
         }
       }
@@ -21389,15 +21389,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5549,
-      "end": 5550,
+      "start": 5594,
+      "end": 5595,
       "loc": {
         "start": {
-          "line": 206,
+          "line": 208,
           "column": 1
         },
         "end": {
-          "line": 206,
+          "line": 208,
           "column": 2
         }
       }
@@ -21405,15 +21405,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Remove this entity and all of its components from the world. After an entity is destroyed, the object should be discarded,\n\t * and it is recommended to avoid re-using it.\n\t *\n\t * @example\n\t * entity.destroy()\n\t ",
-      "start": 5553,
-      "end": 5774,
+      "start": 5598,
+      "end": 5819,
       "loc": {
         "start": {
-          "line": 208,
+          "line": 210,
           "column": 1
         },
         "end": {
-          "line": 214,
+          "line": 216,
           "column": 4
         }
       }
@@ -21431,15 +21431,15 @@
         "binop": null
       },
       "value": "destroy",
-      "start": 5776,
-      "end": 5783,
+      "start": 5821,
+      "end": 5828,
       "loc": {
         "start": {
-          "line": 215,
+          "line": 217,
           "column": 1
         },
         "end": {
-          "line": 215,
+          "line": 217,
           "column": 8
         }
       }
@@ -21456,15 +21456,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5783,
-      "end": 5784,
+      "start": 5828,
+      "end": 5829,
       "loc": {
         "start": {
-          "line": 215,
+          "line": 217,
           "column": 8
         },
         "end": {
-          "line": 215,
+          "line": 217,
           "column": 9
         }
       }
@@ -21481,15 +21481,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5784,
-      "end": 5785,
+      "start": 5829,
+      "end": 5830,
       "loc": {
         "start": {
-          "line": 215,
+          "line": 217,
           "column": 9
         },
         "end": {
-          "line": 215,
+          "line": 217,
           "column": 10
         }
       }
@@ -21506,15 +21506,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5786,
-      "end": 5787,
+      "start": 5831,
+      "end": 5832,
       "loc": {
         "start": {
-          "line": 215,
+          "line": 217,
           "column": 11
         },
         "end": {
-          "line": 215,
+          "line": 217,
           "column": 12
         }
       }
@@ -21534,15 +21534,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 5790,
-      "end": 5794,
+      "start": 5835,
+      "end": 5839,
       "loc": {
         "start": {
-          "line": 216,
+          "line": 218,
           "column": 2
         },
         "end": {
-          "line": 216,
+          "line": 218,
           "column": 6
         }
       }
@@ -21560,15 +21560,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5794,
-      "end": 5795,
+      "start": 5839,
+      "end": 5840,
       "loc": {
         "start": {
-          "line": 216,
+          "line": 218,
           "column": 6
         },
         "end": {
-          "line": 216,
+          "line": 218,
           "column": 7
         }
       }
@@ -21586,15 +21586,15 @@
         "binop": null
       },
       "value": "removeAll",
-      "start": 5795,
-      "end": 5804,
+      "start": 5840,
+      "end": 5849,
       "loc": {
         "start": {
-          "line": 216,
+          "line": 218,
           "column": 7
         },
         "end": {
-          "line": 216,
+          "line": 218,
           "column": 16
         }
       }
@@ -21611,15 +21611,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5804,
-      "end": 5805,
+      "start": 5849,
+      "end": 5850,
       "loc": {
         "start": {
-          "line": 216,
+          "line": 218,
           "column": 16
         },
         "end": {
-          "line": 216,
+          "line": 218,
           "column": 17
         }
       }
@@ -21636,15 +21636,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5805,
-      "end": 5806,
+      "start": 5850,
+      "end": 5851,
       "loc": {
         "start": {
-          "line": 216,
+          "line": 218,
           "column": 17
         },
         "end": {
-          "line": 216,
+          "line": 218,
           "column": 18
         }
       }
@@ -21664,15 +21664,15 @@
         "updateContext": null
       },
       "value": "if",
-      "start": 5810,
-      "end": 5812,
+      "start": 5855,
+      "end": 5857,
       "loc": {
         "start": {
-          "line": 218,
+          "line": 220,
           "column": 2
         },
         "end": {
-          "line": 218,
+          "line": 220,
           "column": 4
         }
       }
@@ -21689,15 +21689,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5813,
-      "end": 5814,
+      "start": 5858,
+      "end": 5859,
       "loc": {
         "start": {
-          "line": 218,
+          "line": 220,
           "column": 5
         },
         "end": {
-          "line": 218,
+          "line": 220,
           "column": 6
         }
       }
@@ -21717,15 +21717,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 5814,
-      "end": 5818,
+      "start": 5859,
+      "end": 5863,
       "loc": {
         "start": {
-          "line": 218,
+          "line": 220,
           "column": 6
         },
         "end": {
-          "line": 218,
+          "line": 220,
           "column": 10
         }
       }
@@ -21743,15 +21743,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5818,
-      "end": 5819,
+      "start": 5863,
+      "end": 5864,
       "loc": {
         "start": {
-          "line": 218,
+          "line": 220,
           "column": 10
         },
         "end": {
-          "line": 218,
+          "line": 220,
           "column": 11
         }
       }
@@ -21769,15 +21769,15 @@
         "binop": null
       },
       "value": "valid",
-      "start": 5819,
-      "end": 5824,
+      "start": 5864,
+      "end": 5869,
       "loc": {
         "start": {
-          "line": 218,
+          "line": 220,
           "column": 11
         },
         "end": {
-          "line": 218,
+          "line": 220,
           "column": 16
         }
       }
@@ -21794,15 +21794,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5824,
-      "end": 5825,
+      "start": 5869,
+      "end": 5870,
       "loc": {
         "start": {
-          "line": 218,
+          "line": 220,
           "column": 16
         },
         "end": {
-          "line": 218,
+          "line": 220,
           "column": 17
         }
       }
@@ -21819,15 +21819,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5825,
-      "end": 5826,
+      "start": 5870,
+      "end": 5871,
       "loc": {
         "start": {
-          "line": 218,
+          "line": 220,
           "column": 17
         },
         "end": {
-          "line": 218,
+          "line": 220,
           "column": 18
         }
       }
@@ -21844,15 +21844,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5826,
-      "end": 5827,
+      "start": 5871,
+      "end": 5872,
       "loc": {
         "start": {
-          "line": 218,
+          "line": 220,
           "column": 18
         },
         "end": {
-          "line": 218,
+          "line": 220,
           "column": 19
         }
       }
@@ -21869,15 +21869,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5828,
-      "end": 5829,
+      "start": 5873,
+      "end": 5874,
       "loc": {
         "start": {
-          "line": 218,
+          "line": 220,
           "column": 20
         },
         "end": {
-          "line": 218,
+          "line": 220,
           "column": 21
         }
       }
@@ -21885,15 +21885,15 @@
     {
       "type": "CommentLine",
       "value": " Remove from the index, to update match all index",
-      "start": 5833,
-      "end": 5884,
+      "start": 5878,
+      "end": 5929,
       "loc": {
         "start": {
-          "line": 219,
+          "line": 221,
           "column": 3
         },
         "end": {
-          "line": 219,
+          "line": 221,
           "column": 54
         }
       }
@@ -21913,15 +21913,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 5888,
-      "end": 5892,
+      "start": 5933,
+      "end": 5937,
       "loc": {
         "start": {
-          "line": 220,
+          "line": 222,
           "column": 3
         },
         "end": {
-          "line": 220,
+          "line": 222,
           "column": 7
         }
       }
@@ -21939,15 +21939,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5892,
-      "end": 5893,
+      "start": 5937,
+      "end": 5938,
       "loc": {
         "start": {
-          "line": 220,
+          "line": 222,
           "column": 7
         },
         "end": {
-          "line": 220,
+          "line": 222,
           "column": 8
         }
       }
@@ -21965,15 +21965,15 @@
         "binop": null
       },
       "value": "world",
-      "start": 5893,
-      "end": 5898,
+      "start": 5938,
+      "end": 5943,
       "loc": {
         "start": {
-          "line": 220,
+          "line": 222,
           "column": 8
         },
         "end": {
-          "line": 220,
+          "line": 222,
           "column": 13
         }
       }
@@ -21991,15 +21991,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5898,
-      "end": 5899,
+      "start": 5943,
+      "end": 5944,
       "loc": {
         "start": {
-          "line": 220,
+          "line": 222,
           "column": 13
         },
         "end": {
-          "line": 220,
+          "line": 222,
           "column": 14
         }
       }
@@ -22017,15 +22017,15 @@
         "binop": null
       },
       "value": "index",
-      "start": 5899,
-      "end": 5904,
+      "start": 5944,
+      "end": 5949,
       "loc": {
         "start": {
-          "line": 220,
+          "line": 222,
           "column": 14
         },
         "end": {
-          "line": 220,
+          "line": 222,
           "column": 19
         }
       }
@@ -22043,15 +22043,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5904,
-      "end": 5905,
+      "start": 5949,
+      "end": 5950,
       "loc": {
         "start": {
-          "line": 220,
+          "line": 222,
           "column": 19
         },
         "end": {
-          "line": 220,
+          "line": 222,
           "column": 20
         }
       }
@@ -22069,15 +22069,15 @@
         "binop": null
       },
       "value": "remove",
-      "start": 5905,
-      "end": 5911,
+      "start": 5950,
+      "end": 5956,
       "loc": {
         "start": {
-          "line": 220,
+          "line": 222,
           "column": 20
         },
         "end": {
-          "line": 220,
+          "line": 222,
           "column": 26
         }
       }
@@ -22094,15 +22094,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5911,
-      "end": 5912,
+      "start": 5956,
+      "end": 5957,
       "loc": {
         "start": {
-          "line": 220,
+          "line": 222,
           "column": 26
         },
         "end": {
-          "line": 220,
+          "line": 222,
           "column": 27
         }
       }
@@ -22122,15 +22122,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 5912,
-      "end": 5916,
+      "start": 5957,
+      "end": 5961,
       "loc": {
         "start": {
-          "line": 220,
+          "line": 222,
           "column": 27
         },
         "end": {
-          "line": 220,
+          "line": 222,
           "column": 31
         }
       }
@@ -22147,15 +22147,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5916,
-      "end": 5917,
+      "start": 5961,
+      "end": 5962,
       "loc": {
         "start": {
-          "line": 220,
+          "line": 222,
           "column": 31
         },
         "end": {
-          "line": 220,
+          "line": 222,
           "column": 32
         }
       }
@@ -22163,15 +22163,15 @@
     {
       "type": "CommentLine",
       "value": " Remove from world",
-      "start": 5922,
-      "end": 5942,
+      "start": 5967,
+      "end": 5987,
       "loc": {
         "start": {
-          "line": 222,
+          "line": 224,
           "column": 3
         },
         "end": {
-          "line": 222,
+          "line": 224,
           "column": 23
         }
       }
@@ -22191,15 +22191,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 5946,
-      "end": 5950,
+      "start": 5991,
+      "end": 5995,
       "loc": {
         "start": {
-          "line": 223,
+          "line": 225,
           "column": 3
         },
         "end": {
-          "line": 223,
+          "line": 225,
           "column": 7
         }
       }
@@ -22217,15 +22217,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5950,
-      "end": 5951,
+      "start": 5995,
+      "end": 5996,
       "loc": {
         "start": {
-          "line": 223,
+          "line": 225,
           "column": 7
         },
         "end": {
-          "line": 223,
+          "line": 225,
           "column": 8
         }
       }
@@ -22243,15 +22243,15 @@
         "binop": null
       },
       "value": "world",
-      "start": 5951,
-      "end": 5956,
+      "start": 5996,
+      "end": 6001,
       "loc": {
         "start": {
-          "line": 223,
+          "line": 225,
           "column": 8
         },
         "end": {
-          "line": 223,
+          "line": 225,
           "column": 13
         }
       }
@@ -22269,15 +22269,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5956,
-      "end": 5957,
+      "start": 6001,
+      "end": 6002,
       "loc": {
         "start": {
-          "line": 223,
+          "line": 225,
           "column": 13
         },
         "end": {
-          "line": 223,
+          "line": 225,
           "column": 14
         }
       }
@@ -22295,15 +22295,15 @@
         "binop": null
       },
       "value": "entities",
-      "start": 5957,
-      "end": 5965,
+      "start": 6002,
+      "end": 6010,
       "loc": {
         "start": {
-          "line": 223,
+          "line": 225,
           "column": 14
         },
         "end": {
-          "line": 223,
+          "line": 225,
           "column": 22
         }
       }
@@ -22321,15 +22321,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5965,
-      "end": 5966,
+      "start": 6010,
+      "end": 6011,
       "loc": {
         "start": {
-          "line": 223,
+          "line": 225,
           "column": 22
         },
         "end": {
-          "line": 223,
+          "line": 225,
           "column": 23
         }
       }
@@ -22349,15 +22349,15 @@
         "updateContext": null
       },
       "value": "delete",
-      "start": 5966,
-      "end": 5972,
+      "start": 6011,
+      "end": 6017,
       "loc": {
         "start": {
-          "line": 223,
+          "line": 225,
           "column": 23
         },
         "end": {
-          "line": 223,
+          "line": 225,
           "column": 29
         }
       }
@@ -22374,15 +22374,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5972,
-      "end": 5973,
+      "start": 6017,
+      "end": 6018,
       "loc": {
         "start": {
-          "line": 223,
+          "line": 225,
           "column": 29
         },
         "end": {
-          "line": 223,
+          "line": 225,
           "column": 30
         }
       }
@@ -22402,15 +22402,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 5973,
-      "end": 5977,
+      "start": 6018,
+      "end": 6022,
       "loc": {
         "start": {
-          "line": 223,
+          "line": 225,
           "column": 30
         },
         "end": {
-          "line": 223,
+          "line": 225,
           "column": 34
         }
       }
@@ -22428,15 +22428,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5977,
-      "end": 5978,
+      "start": 6022,
+      "end": 6023,
       "loc": {
         "start": {
-          "line": 223,
+          "line": 225,
           "column": 34
         },
         "end": {
-          "line": 223,
+          "line": 225,
           "column": 35
         }
       }
@@ -22454,15 +22454,15 @@
         "binop": null
       },
       "value": "_id",
-      "start": 5978,
-      "end": 5981,
+      "start": 6023,
+      "end": 6026,
       "loc": {
         "start": {
-          "line": 223,
+          "line": 225,
           "column": 35
         },
         "end": {
-          "line": 223,
+          "line": 225,
           "column": 38
         }
       }
@@ -22479,15 +22479,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5981,
-      "end": 5982,
+      "start": 6026,
+      "end": 6027,
       "loc": {
         "start": {
-          "line": 223,
+          "line": 225,
           "column": 38
         },
         "end": {
-          "line": 223,
+          "line": 225,
           "column": 39
         }
       }
@@ -22507,15 +22507,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 5986,
-      "end": 5990,
+      "start": 6031,
+      "end": 6035,
       "loc": {
         "start": {
-          "line": 224,
+          "line": 226,
           "column": 3
         },
         "end": {
-          "line": 224,
+          "line": 226,
           "column": 7
         }
       }
@@ -22533,15 +22533,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5990,
-      "end": 5991,
+      "start": 6035,
+      "end": 6036,
       "loc": {
         "start": {
-          "line": 224,
+          "line": 226,
           "column": 7
         },
         "end": {
-          "line": 224,
+          "line": 226,
           "column": 8
         }
       }
@@ -22559,15 +22559,15 @@
         "binop": null
       },
       "value": "_id",
-      "start": 5991,
-      "end": 5994,
+      "start": 6036,
+      "end": 6039,
       "loc": {
         "start": {
-          "line": 224,
+          "line": 226,
           "column": 8
         },
         "end": {
-          "line": 224,
+          "line": 226,
           "column": 11
         }
       }
@@ -22586,15 +22586,15 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 5995,
-      "end": 5996,
+      "start": 6040,
+      "end": 6041,
       "loc": {
         "start": {
-          "line": 224,
+          "line": 226,
           "column": 12
         },
         "end": {
-          "line": 224,
+          "line": 226,
           "column": 13
         }
       }
@@ -22612,15 +22612,15 @@
         "binop": null
       },
       "value": "undefined",
-      "start": 5997,
-      "end": 6006,
+      "start": 6042,
+      "end": 6051,
       "loc": {
         "start": {
-          "line": 224,
+          "line": 226,
           "column": 14
         },
         "end": {
-          "line": 224,
+          "line": 226,
           "column": 23
         }
       }
@@ -22637,15 +22637,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6009,
-      "end": 6010,
+      "start": 6054,
+      "end": 6055,
       "loc": {
         "start": {
-          "line": 225,
+          "line": 227,
           "column": 2
         },
         "end": {
-          "line": 225,
+          "line": 227,
           "column": 3
         }
       }
@@ -22662,15 +22662,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6012,
-      "end": 6013,
+      "start": 6057,
+      "end": 6058,
       "loc": {
         "start": {
-          "line": 226,
+          "line": 228,
           "column": 1
         },
         "end": {
-          "line": 226,
+          "line": 228,
           "column": 2
         }
       }
@@ -22678,15 +22678,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Returns true if this is a valid, existing, and usable entity, which is attached to a world.\n\t *\n\t * @example\n\t * if (entity.valid()) {...}\n\t *\n\t * @return {boolean} true or false\n\t ",
-      "start": 6016,
-      "end": 6207,
+      "start": 6061,
+      "end": 6252,
       "loc": {
         "start": {
-          "line": 228,
+          "line": 230,
           "column": 1
         },
         "end": {
-          "line": 235,
+          "line": 237,
           "column": 4
         }
       }
@@ -22704,15 +22704,15 @@
         "binop": null
       },
       "value": "valid",
-      "start": 6209,
-      "end": 6214,
+      "start": 6254,
+      "end": 6259,
       "loc": {
         "start": {
-          "line": 236,
+          "line": 238,
           "column": 1
         },
         "end": {
-          "line": 236,
+          "line": 238,
           "column": 6
         }
       }
@@ -22729,15 +22729,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6214,
-      "end": 6215,
+      "start": 6259,
+      "end": 6260,
       "loc": {
         "start": {
-          "line": 236,
+          "line": 238,
           "column": 6
         },
         "end": {
-          "line": 236,
+          "line": 238,
           "column": 7
         }
       }
@@ -22754,15 +22754,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6215,
-      "end": 6216,
+      "start": 6260,
+      "end": 6261,
       "loc": {
         "start": {
-          "line": 236,
+          "line": 238,
           "column": 7
         },
         "end": {
-          "line": 236,
+          "line": 238,
           "column": 8
         }
       }
@@ -22779,15 +22779,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6217,
-      "end": 6218,
+      "start": 6262,
+      "end": 6263,
       "loc": {
         "start": {
-          "line": 236,
+          "line": 238,
           "column": 9
         },
         "end": {
-          "line": 236,
+          "line": 238,
           "column": 10
         }
       }
@@ -22795,15 +22795,15 @@
     {
       "type": "CommentLine",
       "value": " Note: No need to actually look in the world for the ID, if entities are only ever copied by reference.",
-      "start": 6221,
-      "end": 6326,
+      "start": 6266,
+      "end": 6371,
       "loc": {
         "start": {
-          "line": 237,
+          "line": 239,
           "column": 2
         },
         "end": {
-          "line": 237,
+          "line": 239,
           "column": 107
         }
       }
@@ -22811,15 +22811,15 @@
     {
       "type": "CommentLine",
       "value": " If entities are ever deep/shallow copied, this function will need to check this to be more robust.",
-      "start": 6329,
-      "end": 6430,
+      "start": 6374,
+      "end": 6475,
       "loc": {
         "start": {
-          "line": 238,
+          "line": 240,
           "column": 2
         },
         "end": {
-          "line": 238,
+          "line": 240,
           "column": 103
         }
       }
@@ -22839,15 +22839,15 @@
         "updateContext": null
       },
       "value": "return",
-      "start": 6433,
-      "end": 6439,
+      "start": 6478,
+      "end": 6484,
       "loc": {
         "start": {
-          "line": 239,
+          "line": 241,
           "column": 2
         },
         "end": {
-          "line": 239,
+          "line": 241,
           "column": 8
         }
       }
@@ -22867,15 +22867,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 6440,
-      "end": 6444,
+      "start": 6485,
+      "end": 6489,
       "loc": {
         "start": {
-          "line": 239,
+          "line": 241,
           "column": 9
         },
         "end": {
-          "line": 239,
+          "line": 241,
           "column": 13
         }
       }
@@ -22893,15 +22893,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 6444,
-      "end": 6445,
+      "start": 6489,
+      "end": 6490,
       "loc": {
         "start": {
-          "line": 239,
+          "line": 241,
           "column": 13
         },
         "end": {
-          "line": 239,
+          "line": 241,
           "column": 14
         }
       }
@@ -22919,15 +22919,15 @@
         "binop": null
       },
       "value": "world",
-      "start": 6445,
-      "end": 6450,
+      "start": 6490,
+      "end": 6495,
       "loc": {
         "start": {
-          "line": 239,
+          "line": 241,
           "column": 14
         },
         "end": {
-          "line": 239,
+          "line": 241,
           "column": 19
         }
       }
@@ -22946,15 +22946,15 @@
         "updateContext": null
       },
       "value": "&&",
-      "start": 6451,
-      "end": 6453,
+      "start": 6496,
+      "end": 6498,
       "loc": {
         "start": {
-          "line": 239,
+          "line": 241,
           "column": 20
         },
         "end": {
-          "line": 239,
+          "line": 241,
           "column": 22
         }
       }
@@ -22974,15 +22974,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 6454,
-      "end": 6458,
+      "start": 6499,
+      "end": 6503,
       "loc": {
         "start": {
-          "line": 239,
+          "line": 241,
           "column": 23
         },
         "end": {
-          "line": 239,
+          "line": 241,
           "column": 27
         }
       }
@@ -23000,15 +23000,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 6458,
-      "end": 6459,
+      "start": 6503,
+      "end": 6504,
       "loc": {
         "start": {
-          "line": 239,
+          "line": 241,
           "column": 27
         },
         "end": {
-          "line": 239,
+          "line": 241,
           "column": 28
         }
       }
@@ -23026,15 +23026,15 @@
         "binop": null
       },
       "value": "_id",
-      "start": 6459,
-      "end": 6462,
+      "start": 6504,
+      "end": 6507,
       "loc": {
         "start": {
-          "line": 239,
+          "line": 241,
           "column": 28
         },
         "end": {
-          "line": 239,
+          "line": 241,
           "column": 31
         }
       }
@@ -23053,15 +23053,15 @@
         "updateContext": null
       },
       "value": "!==",
-      "start": 6463,
-      "end": 6466,
+      "start": 6508,
+      "end": 6511,
       "loc": {
         "start": {
-          "line": 239,
+          "line": 241,
           "column": 32
         },
         "end": {
-          "line": 239,
+          "line": 241,
           "column": 35
         }
       }
@@ -23079,15 +23079,15 @@
         "binop": null
       },
       "value": "undefined",
-      "start": 6467,
-      "end": 6476,
+      "start": 6512,
+      "end": 6521,
       "loc": {
         "start": {
-          "line": 239,
+          "line": 241,
           "column": 36
         },
         "end": {
-          "line": 239,
+          "line": 241,
           "column": 45
         }
       }
@@ -23104,15 +23104,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6478,
-      "end": 6479,
+      "start": 6523,
+      "end": 6524,
       "loc": {
         "start": {
-          "line": 240,
+          "line": 242,
           "column": 1
         },
         "end": {
-          "line": 240,
+          "line": 242,
           "column": 2
         }
       }
@@ -23120,15 +23120,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Returns unique entity ID as a string.\n\t *\n\t * @example\n\t * let entityId = entity.toString()\n\t *\n\t * @return {string} String representation of the entity ID.\n\t ",
-      "start": 6482,
-      "end": 6651,
+      "start": 6527,
+      "end": 6696,
       "loc": {
         "start": {
-          "line": 242,
+          "line": 244,
           "column": 1
         },
         "end": {
-          "line": 249,
+          "line": 251,
           "column": 4
         }
       }
@@ -23146,15 +23146,15 @@
         "binop": null
       },
       "value": "toString",
-      "start": 6653,
-      "end": 6661,
+      "start": 6698,
+      "end": 6706,
       "loc": {
         "start": {
-          "line": 250,
+          "line": 252,
           "column": 1
         },
         "end": {
-          "line": 250,
+          "line": 252,
           "column": 9
         }
       }
@@ -23171,15 +23171,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6661,
-      "end": 6662,
+      "start": 6706,
+      "end": 6707,
       "loc": {
         "start": {
-          "line": 250,
+          "line": 252,
           "column": 9
         },
         "end": {
-          "line": 250,
+          "line": 252,
           "column": 10
         }
       }
@@ -23196,15 +23196,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6662,
-      "end": 6663,
+      "start": 6707,
+      "end": 6708,
       "loc": {
         "start": {
-          "line": 250,
+          "line": 252,
           "column": 10
         },
         "end": {
-          "line": 250,
+          "line": 252,
           "column": 11
         }
       }
@@ -23221,15 +23221,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6664,
-      "end": 6665,
+      "start": 6709,
+      "end": 6710,
       "loc": {
         "start": {
-          "line": 250,
+          "line": 252,
           "column": 12
         },
         "end": {
-          "line": 250,
+          "line": 252,
           "column": 13
         }
       }
@@ -23249,15 +23249,15 @@
         "updateContext": null
       },
       "value": "return",
-      "start": 6668,
-      "end": 6674,
+      "start": 6713,
+      "end": 6719,
       "loc": {
         "start": {
-          "line": 251,
+          "line": 253,
           "column": 2
         },
         "end": {
-          "line": 251,
+          "line": 253,
           "column": 8
         }
       }
@@ -23275,15 +23275,15 @@
         "binop": null
       },
       "value": "String",
-      "start": 6675,
-      "end": 6681,
+      "start": 6720,
+      "end": 6726,
       "loc": {
         "start": {
-          "line": 251,
+          "line": 253,
           "column": 9
         },
         "end": {
-          "line": 251,
+          "line": 253,
           "column": 15
         }
       }
@@ -23300,15 +23300,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6681,
-      "end": 6682,
+      "start": 6726,
+      "end": 6727,
       "loc": {
         "start": {
-          "line": 251,
+          "line": 253,
           "column": 15
         },
         "end": {
-          "line": 251,
+          "line": 253,
           "column": 16
         }
       }
@@ -23328,15 +23328,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 6682,
-      "end": 6686,
+      "start": 6727,
+      "end": 6731,
       "loc": {
         "start": {
-          "line": 251,
+          "line": 253,
           "column": 16
         },
         "end": {
-          "line": 251,
+          "line": 253,
           "column": 20
         }
       }
@@ -23354,15 +23354,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 6686,
-      "end": 6687,
+      "start": 6731,
+      "end": 6732,
       "loc": {
         "start": {
-          "line": 251,
+          "line": 253,
           "column": 20
         },
         "end": {
-          "line": 251,
+          "line": 253,
           "column": 21
         }
       }
@@ -23380,15 +23380,15 @@
         "binop": null
       },
       "value": "_id",
-      "start": 6687,
-      "end": 6690,
+      "start": 6732,
+      "end": 6735,
       "loc": {
         "start": {
-          "line": 251,
+          "line": 253,
           "column": 21
         },
         "end": {
-          "line": 251,
+          "line": 253,
           "column": 24
         }
       }
@@ -23405,15 +23405,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6690,
-      "end": 6691,
+      "start": 6735,
+      "end": 6736,
       "loc": {
         "start": {
-          "line": 251,
+          "line": 253,
           "column": 24
         },
         "end": {
-          "line": 251,
+          "line": 253,
           "column": 25
         }
       }
@@ -23430,15 +23430,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6693,
-      "end": 6694,
+      "start": 6738,
+      "end": 6739,
       "loc": {
         "start": {
-          "line": 252,
+          "line": 254,
           "column": 1
         },
         "end": {
-          "line": 252,
+          "line": 254,
           "column": 2
         }
       }
@@ -23446,15 +23446,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Serializes entire entity and components to JSON.\n\t * Note: Defining toJSON methods in your components will override the built-in behavior.\n\t *\n\t * @example\n\t * let serializedEntity = entity.toJSON()\n\t *\n\t * @return {string} JSON encoded string\n\t ",
-      "start": 6697,
-      "end": 6953,
+      "start": 6742,
+      "end": 6998,
       "loc": {
         "start": {
-          "line": 254,
+          "line": 256,
           "column": 1
         },
         "end": {
-          "line": 262,
+          "line": 264,
           "column": 4
         }
       }
@@ -23472,15 +23472,15 @@
         "binop": null
       },
       "value": "toJSON",
-      "start": 6955,
-      "end": 6961,
+      "start": 7000,
+      "end": 7006,
       "loc": {
         "start": {
-          "line": 263,
+          "line": 265,
           "column": 1
         },
         "end": {
-          "line": 263,
+          "line": 265,
           "column": 7
         }
       }
@@ -23497,15 +23497,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6961,
-      "end": 6962,
+      "start": 7006,
+      "end": 7007,
       "loc": {
         "start": {
-          "line": 263,
+          "line": 265,
           "column": 7
         },
         "end": {
-          "line": 263,
+          "line": 265,
           "column": 8
         }
       }
@@ -23522,15 +23522,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6962,
-      "end": 6963,
+      "start": 7007,
+      "end": 7008,
       "loc": {
         "start": {
-          "line": 263,
+          "line": 265,
           "column": 8
         },
         "end": {
-          "line": 263,
+          "line": 265,
           "column": 9
         }
       }
@@ -23547,15 +23547,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6964,
-      "end": 6965,
+      "start": 7009,
+      "end": 7010,
       "loc": {
         "start": {
-          "line": 263,
+          "line": 265,
           "column": 10
         },
         "end": {
-          "line": 263,
+          "line": 265,
           "column": 11
         }
       }
@@ -23575,15 +23575,15 @@
         "updateContext": null
       },
       "value": "return",
-      "start": 6968,
-      "end": 6974,
+      "start": 7013,
+      "end": 7019,
       "loc": {
         "start": {
-          "line": 264,
+          "line": 266,
           "column": 2
         },
         "end": {
-          "line": 264,
+          "line": 266,
           "column": 8
         }
       }
@@ -23601,15 +23601,15 @@
         "binop": null
       },
       "value": "JSON",
-      "start": 6975,
-      "end": 6979,
+      "start": 7020,
+      "end": 7024,
       "loc": {
         "start": {
-          "line": 264,
+          "line": 266,
           "column": 9
         },
         "end": {
-          "line": 264,
+          "line": 266,
           "column": 13
         }
       }
@@ -23627,15 +23627,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 6979,
-      "end": 6980,
+      "start": 7024,
+      "end": 7025,
       "loc": {
         "start": {
-          "line": 264,
+          "line": 266,
           "column": 13
         },
         "end": {
-          "line": 264,
+          "line": 266,
           "column": 14
         }
       }
@@ -23653,15 +23653,15 @@
         "binop": null
       },
       "value": "stringify",
-      "start": 6980,
-      "end": 6989,
+      "start": 7025,
+      "end": 7034,
       "loc": {
         "start": {
-          "line": 264,
+          "line": 266,
           "column": 14
         },
         "end": {
-          "line": 264,
+          "line": 266,
           "column": 23
         }
       }
@@ -23678,15 +23678,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6989,
-      "end": 6990,
+      "start": 7034,
+      "end": 7035,
       "loc": {
         "start": {
-          "line": 264,
+          "line": 266,
           "column": 23
         },
         "end": {
-          "line": 264,
+          "line": 266,
           "column": 24
         }
       }
@@ -23706,15 +23706,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 6990,
-      "end": 6994,
+      "start": 7035,
+      "end": 7039,
       "loc": {
         "start": {
-          "line": 264,
+          "line": 266,
           "column": 24
         },
         "end": {
-          "line": 264,
+          "line": 266,
           "column": 28
         }
       }
@@ -23732,15 +23732,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 6994,
-      "end": 6995,
+      "start": 7039,
+      "end": 7040,
       "loc": {
         "start": {
-          "line": 264,
+          "line": 266,
           "column": 28
         },
         "end": {
-          "line": 264,
+          "line": 266,
           "column": 29
         }
       }
@@ -23758,15 +23758,15 @@
         "binop": null
       },
       "value": "data",
-      "start": 6995,
-      "end": 6999,
+      "start": 7040,
+      "end": 7044,
       "loc": {
         "start": {
-          "line": 264,
+          "line": 266,
           "column": 29
         },
         "end": {
-          "line": 264,
+          "line": 266,
           "column": 33
         }
       }
@@ -23783,15 +23783,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6999,
-      "end": 7000,
+      "start": 7044,
+      "end": 7045,
       "loc": {
         "start": {
-          "line": 264,
+          "line": 266,
           "column": 33
         },
         "end": {
-          "line": 264,
+          "line": 266,
           "column": 34
         }
       }
@@ -23808,15 +23808,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7002,
-      "end": 7003,
+      "start": 7047,
+      "end": 7048,
       "loc": {
         "start": {
-          "line": 265,
+          "line": 267,
           "column": 1
         },
         "end": {
-          "line": 265,
+          "line": 267,
           "column": 2
         }
       }
@@ -23824,15 +23824,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Deserializes data from JSON, creating new components and overwriting existing components.\n\t * Note: Defining fromJSON methods in your components will override the built-in behavior.\n\t *\n\t * @example\n\t * entity.fromJSON(serializedEntity)\n\t *\n\t * @param {string} data - A JSON string containing component data to parse, and store in this entity.\n\t *\n\t * @return {Object} The original entity that fromJSON() was called on, so that operations can be chained.\n\t ",
-      "start": 7006,
-      "end": 7473,
+      "start": 7051,
+      "end": 7518,
       "loc": {
         "start": {
-          "line": 267,
+          "line": 269,
           "column": 1
         },
         "end": {
-          "line": 277,
+          "line": 279,
           "column": 4
         }
       }
@@ -23850,15 +23850,15 @@
         "binop": null
       },
       "value": "fromJSON",
-      "start": 7475,
-      "end": 7483,
+      "start": 7520,
+      "end": 7528,
       "loc": {
         "start": {
-          "line": 278,
+          "line": 280,
           "column": 1
         },
         "end": {
-          "line": 278,
+          "line": 280,
           "column": 9
         }
       }
@@ -23875,15 +23875,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7483,
-      "end": 7484,
+      "start": 7528,
+      "end": 7529,
       "loc": {
         "start": {
-          "line": 278,
+          "line": 280,
           "column": 9
         },
         "end": {
-          "line": 278,
+          "line": 280,
           "column": 10
         }
       }
@@ -23901,15 +23901,15 @@
         "binop": null
       },
       "value": "data",
-      "start": 7484,
-      "end": 7488,
+      "start": 7529,
+      "end": 7533,
       "loc": {
         "start": {
-          "line": 278,
+          "line": 280,
           "column": 10
         },
         "end": {
-          "line": 278,
+          "line": 280,
           "column": 14
         }
       }
@@ -23926,15 +23926,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7488,
-      "end": 7489,
+      "start": 7533,
+      "end": 7534,
       "loc": {
         "start": {
-          "line": 278,
+          "line": 280,
           "column": 14
         },
         "end": {
-          "line": 278,
+          "line": 280,
           "column": 15
         }
       }
@@ -23951,15 +23951,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7490,
-      "end": 7491,
+      "start": 7535,
+      "end": 7536,
       "loc": {
         "start": {
-          "line": 278,
+          "line": 280,
           "column": 16
         },
         "end": {
-          "line": 278,
+          "line": 280,
           "column": 17
         }
       }
@@ -23979,15 +23979,15 @@
         "updateContext": null
       },
       "value": "let",
-      "start": 7494,
-      "end": 7497,
+      "start": 7539,
+      "end": 7542,
       "loc": {
         "start": {
-          "line": 279,
+          "line": 281,
           "column": 2
         },
         "end": {
-          "line": 279,
+          "line": 281,
           "column": 5
         }
       }
@@ -24005,15 +24005,15 @@
         "binop": null
       },
       "value": "parsed",
-      "start": 7498,
-      "end": 7504,
+      "start": 7543,
+      "end": 7549,
       "loc": {
         "start": {
-          "line": 279,
+          "line": 281,
           "column": 6
         },
         "end": {
-          "line": 279,
+          "line": 281,
           "column": 12
         }
       }
@@ -24032,15 +24032,15 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 7505,
-      "end": 7506,
+      "start": 7550,
+      "end": 7551,
       "loc": {
         "start": {
-          "line": 279,
+          "line": 281,
           "column": 13
         },
         "end": {
-          "line": 279,
+          "line": 281,
           "column": 14
         }
       }
@@ -24058,15 +24058,15 @@
         "binop": null
       },
       "value": "JSON",
-      "start": 7507,
-      "end": 7511,
+      "start": 7552,
+      "end": 7556,
       "loc": {
         "start": {
-          "line": 279,
+          "line": 281,
           "column": 15
         },
         "end": {
-          "line": 279,
+          "line": 281,
           "column": 19
         }
       }
@@ -24084,15 +24084,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 7511,
-      "end": 7512,
+      "start": 7556,
+      "end": 7557,
       "loc": {
         "start": {
-          "line": 279,
+          "line": 281,
           "column": 19
         },
         "end": {
-          "line": 279,
+          "line": 281,
           "column": 20
         }
       }
@@ -24110,15 +24110,15 @@
         "binop": null
       },
       "value": "parse",
-      "start": 7512,
-      "end": 7517,
+      "start": 7557,
+      "end": 7562,
       "loc": {
         "start": {
-          "line": 279,
+          "line": 281,
           "column": 20
         },
         "end": {
-          "line": 279,
+          "line": 281,
           "column": 25
         }
       }
@@ -24135,15 +24135,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7517,
-      "end": 7518,
+      "start": 7562,
+      "end": 7563,
       "loc": {
         "start": {
-          "line": 279,
+          "line": 281,
           "column": 25
         },
         "end": {
-          "line": 279,
+          "line": 281,
           "column": 26
         }
       }
@@ -24161,15 +24161,15 @@
         "binop": null
       },
       "value": "data",
-      "start": 7518,
-      "end": 7522,
+      "start": 7563,
+      "end": 7567,
       "loc": {
         "start": {
-          "line": 279,
+          "line": 281,
           "column": 26
         },
         "end": {
-          "line": 279,
+          "line": 281,
           "column": 30
         }
       }
@@ -24186,15 +24186,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7522,
-      "end": 7523,
+      "start": 7567,
+      "end": 7568,
       "loc": {
         "start": {
-          "line": 279,
+          "line": 281,
           "column": 30
         },
         "end": {
-          "line": 279,
+          "line": 281,
           "column": 31
         }
       }
@@ -24214,15 +24214,15 @@
         "updateContext": null
       },
       "value": "for",
-      "start": 7526,
-      "end": 7529,
+      "start": 7571,
+      "end": 7574,
       "loc": {
         "start": {
-          "line": 280,
+          "line": 282,
           "column": 2
         },
         "end": {
-          "line": 280,
+          "line": 282,
           "column": 5
         }
       }
@@ -24239,15 +24239,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7530,
-      "end": 7531,
+      "start": 7575,
+      "end": 7576,
       "loc": {
         "start": {
-          "line": 280,
+          "line": 282,
           "column": 6
         },
         "end": {
-          "line": 280,
+          "line": 282,
           "column": 7
         }
       }
@@ -24267,15 +24267,15 @@
         "updateContext": null
       },
       "value": "let",
-      "start": 7531,
-      "end": 7534,
+      "start": 7576,
+      "end": 7579,
       "loc": {
         "start": {
-          "line": 280,
+          "line": 282,
           "column": 7
         },
         "end": {
-          "line": 280,
+          "line": 282,
           "column": 10
         }
       }
@@ -24293,15 +24293,15 @@
         "binop": null
       },
       "value": "name",
-      "start": 7535,
-      "end": 7539,
+      "start": 7580,
+      "end": 7584,
       "loc": {
         "start": {
-          "line": 280,
+          "line": 282,
           "column": 11
         },
         "end": {
-          "line": 280,
+          "line": 282,
           "column": 15
         }
       }
@@ -24321,15 +24321,15 @@
         "updateContext": null
       },
       "value": "in",
-      "start": 7540,
-      "end": 7542,
+      "start": 7585,
+      "end": 7587,
       "loc": {
         "start": {
-          "line": 280,
+          "line": 282,
           "column": 16
         },
         "end": {
-          "line": 280,
+          "line": 282,
           "column": 18
         }
       }
@@ -24347,15 +24347,15 @@
         "binop": null
       },
       "value": "parsed",
-      "start": 7543,
-      "end": 7549,
+      "start": 7588,
+      "end": 7594,
       "loc": {
         "start": {
-          "line": 280,
+          "line": 282,
           "column": 19
         },
         "end": {
-          "line": 280,
+          "line": 282,
           "column": 25
         }
       }
@@ -24372,15 +24372,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7549,
-      "end": 7550,
+      "start": 7594,
+      "end": 7595,
       "loc": {
         "start": {
-          "line": 280,
+          "line": 282,
           "column": 25
         },
         "end": {
-          "line": 280,
+          "line": 282,
           "column": 26
         }
       }
@@ -24397,15 +24397,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7551,
-      "end": 7552,
+      "start": 7596,
+      "end": 7597,
       "loc": {
         "start": {
-          "line": 280,
+          "line": 282,
           "column": 27
         },
         "end": {
-          "line": 280,
+          "line": 282,
           "column": 28
         }
       }
@@ -24425,15 +24425,15 @@
         "updateContext": null
       },
       "value": "let",
-      "start": 7556,
-      "end": 7559,
+      "start": 7601,
+      "end": 7604,
       "loc": {
         "start": {
-          "line": 281,
+          "line": 283,
           "column": 3
         },
         "end": {
-          "line": 281,
+          "line": 283,
           "column": 6
         }
       }
@@ -24451,15 +24451,15 @@
         "binop": null
       },
       "value": "comp",
-      "start": 7560,
-      "end": 7564,
+      "start": 7605,
+      "end": 7609,
       "loc": {
         "start": {
-          "line": 281,
+          "line": 283,
           "column": 7
         },
         "end": {
-          "line": 281,
+          "line": 283,
           "column": 11
         }
       }
@@ -24478,15 +24478,15 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 7565,
-      "end": 7566,
+      "start": 7610,
+      "end": 7611,
       "loc": {
         "start": {
-          "line": 281,
+          "line": 283,
           "column": 12
         },
         "end": {
-          "line": 281,
+          "line": 283,
           "column": 13
         }
       }
@@ -24506,15 +24506,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 7567,
-      "end": 7571,
+      "start": 7612,
+      "end": 7616,
       "loc": {
         "start": {
-          "line": 281,
+          "line": 283,
           "column": 14
         },
         "end": {
-          "line": 281,
+          "line": 283,
           "column": 18
         }
       }
@@ -24532,15 +24532,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 7571,
-      "end": 7572,
+      "start": 7616,
+      "end": 7617,
       "loc": {
         "start": {
-          "line": 281,
+          "line": 283,
           "column": 18
         },
         "end": {
-          "line": 281,
+          "line": 283,
           "column": 19
         }
       }
@@ -24558,15 +24558,15 @@
         "binop": null
       },
       "value": "access",
-      "start": 7572,
-      "end": 7578,
+      "start": 7617,
+      "end": 7623,
       "loc": {
         "start": {
-          "line": 281,
+          "line": 283,
           "column": 19
         },
         "end": {
-          "line": 281,
+          "line": 283,
           "column": 25
         }
       }
@@ -24583,15 +24583,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7578,
-      "end": 7579,
+      "start": 7623,
+      "end": 7624,
       "loc": {
         "start": {
-          "line": 281,
+          "line": 283,
           "column": 25
         },
         "end": {
-          "line": 281,
+          "line": 283,
           "column": 26
         }
       }
@@ -24609,15 +24609,15 @@
         "binop": null
       },
       "value": "name",
-      "start": 7579,
-      "end": 7583,
+      "start": 7624,
+      "end": 7628,
       "loc": {
         "start": {
-          "line": 281,
+          "line": 283,
           "column": 26
         },
         "end": {
-          "line": 281,
+          "line": 283,
           "column": 30
         }
       }
@@ -24634,15 +24634,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7583,
-      "end": 7584,
+      "start": 7628,
+      "end": 7629,
       "loc": {
         "start": {
-          "line": 281,
+          "line": 283,
           "column": 30
         },
         "end": {
-          "line": 281,
+          "line": 283,
           "column": 31
         }
       }
@@ -24650,15 +24650,15 @@
     {
       "type": "CommentLine",
       "value": " Either call custom method or copy all properties",
-      "start": 7589,
-      "end": 7640,
+      "start": 7634,
+      "end": 7685,
       "loc": {
         "start": {
-          "line": 283,
+          "line": 285,
           "column": 3
         },
         "end": {
-          "line": 283,
+          "line": 285,
           "column": 54
         }
       }
@@ -24678,15 +24678,15 @@
         "updateContext": null
       },
       "value": "if",
-      "start": 7644,
-      "end": 7646,
+      "start": 7689,
+      "end": 7691,
       "loc": {
         "start": {
-          "line": 284,
+          "line": 286,
           "column": 3
         },
         "end": {
-          "line": 284,
+          "line": 286,
           "column": 5
         }
       }
@@ -24703,15 +24703,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7647,
-      "end": 7648,
+      "start": 7692,
+      "end": 7693,
       "loc": {
         "start": {
-          "line": 284,
+          "line": 286,
           "column": 6
         },
         "end": {
-          "line": 284,
+          "line": 286,
           "column": 7
         }
       }
@@ -24731,15 +24731,15 @@
         "updateContext": null
       },
       "value": "typeof",
-      "start": 7648,
-      "end": 7654,
+      "start": 7693,
+      "end": 7699,
       "loc": {
         "start": {
-          "line": 284,
+          "line": 286,
           "column": 7
         },
         "end": {
-          "line": 284,
+          "line": 286,
           "column": 13
         }
       }
@@ -24757,15 +24757,15 @@
         "binop": null
       },
       "value": "comp",
-      "start": 7655,
-      "end": 7659,
+      "start": 7700,
+      "end": 7704,
       "loc": {
         "start": {
-          "line": 284,
+          "line": 286,
           "column": 14
         },
         "end": {
-          "line": 284,
+          "line": 286,
           "column": 18
         }
       }
@@ -24783,15 +24783,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 7659,
-      "end": 7660,
+      "start": 7704,
+      "end": 7705,
       "loc": {
         "start": {
-          "line": 284,
+          "line": 286,
           "column": 18
         },
         "end": {
-          "line": 284,
+          "line": 286,
           "column": 19
         }
       }
@@ -24809,15 +24809,15 @@
         "binop": null
       },
       "value": "fromJSON",
-      "start": 7660,
-      "end": 7668,
+      "start": 7705,
+      "end": 7713,
       "loc": {
         "start": {
-          "line": 284,
+          "line": 286,
           "column": 19
         },
         "end": {
-          "line": 284,
+          "line": 286,
           "column": 27
         }
       }
@@ -24836,15 +24836,15 @@
         "updateContext": null
       },
       "value": "===",
-      "start": 7669,
-      "end": 7672,
+      "start": 7714,
+      "end": 7717,
       "loc": {
         "start": {
-          "line": 284,
+          "line": 286,
           "column": 28
         },
         "end": {
-          "line": 284,
+          "line": 286,
           "column": 31
         }
       }
@@ -24863,15 +24863,15 @@
         "updateContext": null
       },
       "value": "function",
-      "start": 7673,
-      "end": 7683,
+      "start": 7718,
+      "end": 7728,
       "loc": {
         "start": {
-          "line": 284,
+          "line": 286,
           "column": 32
         },
         "end": {
-          "line": 284,
+          "line": 286,
           "column": 42
         }
       }
@@ -24888,15 +24888,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7683,
-      "end": 7684,
+      "start": 7728,
+      "end": 7729,
       "loc": {
         "start": {
-          "line": 284,
+          "line": 286,
           "column": 42
         },
         "end": {
-          "line": 284,
+          "line": 286,
           "column": 43
         }
       }
@@ -24913,15 +24913,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7685,
-      "end": 7686,
+      "start": 7730,
+      "end": 7731,
       "loc": {
         "start": {
-          "line": 284,
+          "line": 286,
           "column": 44
         },
         "end": {
-          "line": 284,
+          "line": 286,
           "column": 45
         }
       }
@@ -24939,15 +24939,15 @@
         "binop": null
       },
       "value": "comp",
-      "start": 7691,
-      "end": 7695,
+      "start": 7736,
+      "end": 7740,
       "loc": {
         "start": {
-          "line": 285,
+          "line": 287,
           "column": 4
         },
         "end": {
-          "line": 285,
+          "line": 287,
           "column": 8
         }
       }
@@ -24965,15 +24965,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 7695,
-      "end": 7696,
+      "start": 7740,
+      "end": 7741,
       "loc": {
         "start": {
-          "line": 285,
+          "line": 287,
           "column": 8
         },
         "end": {
-          "line": 285,
+          "line": 287,
           "column": 9
         }
       }
@@ -24991,15 +24991,15 @@
         "binop": null
       },
       "value": "fromJSON",
-      "start": 7696,
-      "end": 7704,
+      "start": 7741,
+      "end": 7749,
       "loc": {
         "start": {
-          "line": 285,
+          "line": 287,
           "column": 9
         },
         "end": {
-          "line": 285,
+          "line": 287,
           "column": 17
         }
       }
@@ -25016,15 +25016,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7704,
-      "end": 7705,
+      "start": 7749,
+      "end": 7750,
       "loc": {
         "start": {
-          "line": 285,
+          "line": 287,
           "column": 17
         },
         "end": {
-          "line": 285,
+          "line": 287,
           "column": 18
         }
       }
@@ -25042,15 +25042,15 @@
         "binop": null
       },
       "value": "parsed",
-      "start": 7705,
-      "end": 7711,
+      "start": 7750,
+      "end": 7756,
       "loc": {
         "start": {
-          "line": 285,
+          "line": 287,
           "column": 18
         },
         "end": {
-          "line": 285,
+          "line": 287,
           "column": 24
         }
       }
@@ -25068,15 +25068,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 7711,
-      "end": 7712,
+      "start": 7756,
+      "end": 7757,
       "loc": {
         "start": {
-          "line": 285,
+          "line": 287,
           "column": 24
         },
         "end": {
-          "line": 285,
+          "line": 287,
           "column": 25
         }
       }
@@ -25094,15 +25094,15 @@
         "binop": null
       },
       "value": "name",
-      "start": 7712,
-      "end": 7716,
+      "start": 7757,
+      "end": 7761,
       "loc": {
         "start": {
-          "line": 285,
+          "line": 287,
           "column": 25
         },
         "end": {
-          "line": 285,
+          "line": 287,
           "column": 29
         }
       }
@@ -25120,15 +25120,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 7716,
-      "end": 7717,
+      "start": 7761,
+      "end": 7762,
       "loc": {
         "start": {
-          "line": 285,
+          "line": 287,
           "column": 29
         },
         "end": {
-          "line": 285,
+          "line": 287,
           "column": 30
         }
       }
@@ -25145,15 +25145,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7717,
-      "end": 7718,
+      "start": 7762,
+      "end": 7763,
       "loc": {
         "start": {
-          "line": 285,
+          "line": 287,
           "column": 30
         },
         "end": {
-          "line": 285,
+          "line": 287,
           "column": 31
         }
       }
@@ -25170,15 +25170,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7722,
-      "end": 7723,
+      "start": 7767,
+      "end": 7768,
       "loc": {
         "start": {
-          "line": 286,
+          "line": 288,
           "column": 3
         },
         "end": {
-          "line": 286,
+          "line": 288,
           "column": 4
         }
       }
@@ -25198,15 +25198,15 @@
         "updateContext": null
       },
       "value": "else",
-      "start": 7724,
-      "end": 7728,
+      "start": 7769,
+      "end": 7773,
       "loc": {
         "start": {
-          "line": 286,
+          "line": 288,
           "column": 5
         },
         "end": {
-          "line": 286,
+          "line": 288,
           "column": 9
         }
       }
@@ -25223,15 +25223,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7729,
-      "end": 7730,
+      "start": 7774,
+      "end": 7775,
       "loc": {
         "start": {
-          "line": 286,
+          "line": 288,
           "column": 10
         },
         "end": {
-          "line": 286,
+          "line": 288,
           "column": 11
         }
       }
@@ -25251,15 +25251,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 7735,
-      "end": 7739,
+      "start": 7780,
+      "end": 7784,
       "loc": {
         "start": {
-          "line": 287,
+          "line": 289,
           "column": 4
         },
         "end": {
-          "line": 287,
+          "line": 289,
           "column": 8
         }
       }
@@ -25277,15 +25277,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 7739,
-      "end": 7740,
+      "start": 7784,
+      "end": 7785,
       "loc": {
         "start": {
-          "line": 287,
+          "line": 289,
           "column": 8
         },
         "end": {
-          "line": 287,
+          "line": 289,
           "column": 9
         }
       }
@@ -25303,15 +25303,15 @@
         "binop": null
       },
       "value": "update",
-      "start": 7740,
-      "end": 7746,
+      "start": 7785,
+      "end": 7791,
       "loc": {
         "start": {
-          "line": 287,
+          "line": 289,
           "column": 9
         },
         "end": {
-          "line": 287,
+          "line": 289,
           "column": 15
         }
       }
@@ -25328,15 +25328,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7746,
-      "end": 7747,
+      "start": 7791,
+      "end": 7792,
       "loc": {
         "start": {
-          "line": 287,
+          "line": 289,
           "column": 15
         },
         "end": {
-          "line": 287,
+          "line": 289,
           "column": 16
         }
       }
@@ -25354,15 +25354,15 @@
         "binop": null
       },
       "value": "name",
-      "start": 7747,
-      "end": 7751,
+      "start": 7792,
+      "end": 7796,
       "loc": {
         "start": {
-          "line": 287,
+          "line": 289,
           "column": 16
         },
         "end": {
-          "line": 287,
+          "line": 289,
           "column": 20
         }
       }
@@ -25380,15 +25380,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 7751,
-      "end": 7752,
+      "start": 7796,
+      "end": 7797,
       "loc": {
         "start": {
-          "line": 287,
+          "line": 289,
           "column": 20
         },
         "end": {
-          "line": 287,
+          "line": 289,
           "column": 21
         }
       }
@@ -25406,15 +25406,15 @@
         "binop": null
       },
       "value": "parsed",
-      "start": 7753,
-      "end": 7759,
+      "start": 7798,
+      "end": 7804,
       "loc": {
         "start": {
-          "line": 287,
+          "line": 289,
           "column": 22
         },
         "end": {
-          "line": 287,
+          "line": 289,
           "column": 28
         }
       }
@@ -25432,15 +25432,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 7759,
-      "end": 7760,
+      "start": 7804,
+      "end": 7805,
       "loc": {
         "start": {
-          "line": 287,
+          "line": 289,
           "column": 28
         },
         "end": {
-          "line": 287,
+          "line": 289,
           "column": 29
         }
       }
@@ -25458,15 +25458,15 @@
         "binop": null
       },
       "value": "name",
-      "start": 7760,
-      "end": 7764,
+      "start": 7805,
+      "end": 7809,
       "loc": {
         "start": {
-          "line": 287,
+          "line": 289,
           "column": 29
         },
         "end": {
-          "line": 287,
+          "line": 289,
           "column": 33
         }
       }
@@ -25484,15 +25484,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 7764,
-      "end": 7765,
+      "start": 7809,
+      "end": 7810,
       "loc": {
         "start": {
-          "line": 287,
+          "line": 289,
           "column": 33
         },
         "end": {
-          "line": 287,
+          "line": 289,
           "column": 34
         }
       }
@@ -25509,15 +25509,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7765,
-      "end": 7766,
+      "start": 7810,
+      "end": 7811,
       "loc": {
         "start": {
-          "line": 287,
+          "line": 289,
           "column": 34
         },
         "end": {
-          "line": 287,
+          "line": 289,
           "column": 35
         }
       }
@@ -25534,15 +25534,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7770,
-      "end": 7771,
+      "start": 7815,
+      "end": 7816,
       "loc": {
         "start": {
-          "line": 288,
+          "line": 290,
           "column": 3
         },
         "end": {
-          "line": 288,
+          "line": 290,
           "column": 4
         }
       }
@@ -25559,15 +25559,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7774,
-      "end": 7775,
+      "start": 7819,
+      "end": 7820,
       "loc": {
         "start": {
-          "line": 289,
+          "line": 291,
           "column": 2
         },
         "end": {
-          "line": 289,
+          "line": 291,
           "column": 3
         }
       }
@@ -25587,15 +25587,15 @@
         "updateContext": null
       },
       "value": "return",
-      "start": 7778,
-      "end": 7784,
+      "start": 7823,
+      "end": 7829,
       "loc": {
         "start": {
-          "line": 290,
+          "line": 292,
           "column": 2
         },
         "end": {
-          "line": 290,
+          "line": 292,
           "column": 8
         }
       }
@@ -25615,15 +25615,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 7785,
-      "end": 7789,
+      "start": 7830,
+      "end": 7834,
       "loc": {
         "start": {
-          "line": 290,
+          "line": 292,
           "column": 9
         },
         "end": {
-          "line": 290,
+          "line": 292,
           "column": 13
         }
       }
@@ -25640,15 +25640,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7791,
-      "end": 7792,
+      "start": 7836,
+      "end": 7837,
       "loc": {
         "start": {
-          "line": 291,
+          "line": 293,
           "column": 1
         },
         "end": {
-          "line": 291,
+          "line": 293,
           "column": 2
         }
       }
@@ -25656,15 +25656,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Attaches a currently detached entity back to a world.\n\t * Note: Do not use detached entities, get() may be safe, but avoid calling other methods\n\t * Note: The ID will be reassigned, so do not rely on this\n\t *\n\t * @example\n\t * entity.attach(world)\n\t *\n\t * @param {World} world - The world to attach this entity to\n\t ",
-      "start": 7795,
-      "end": 8120,
+      "start": 7840,
+      "end": 8165,
       "loc": {
         "start": {
-          "line": 293,
+          "line": 295,
           "column": 1
         },
         "end": {
-          "line": 302,
+          "line": 304,
           "column": 4
         }
       }
@@ -25682,15 +25682,15 @@
         "binop": null
       },
       "value": "attach",
-      "start": 8122,
-      "end": 8128,
+      "start": 8167,
+      "end": 8173,
       "loc": {
         "start": {
-          "line": 303,
+          "line": 305,
           "column": 1
         },
         "end": {
-          "line": 303,
+          "line": 305,
           "column": 7
         }
       }
@@ -25707,15 +25707,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8128,
-      "end": 8129,
+      "start": 8173,
+      "end": 8174,
       "loc": {
         "start": {
-          "line": 303,
+          "line": 305,
           "column": 7
         },
         "end": {
-          "line": 303,
+          "line": 305,
           "column": 8
         }
       }
@@ -25733,15 +25733,15 @@
         "binop": null
       },
       "value": "world",
-      "start": 8129,
-      "end": 8134,
+      "start": 8174,
+      "end": 8179,
       "loc": {
         "start": {
-          "line": 303,
+          "line": 305,
           "column": 8
         },
         "end": {
-          "line": 303,
+          "line": 305,
           "column": 13
         }
       }
@@ -25758,15 +25758,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8134,
-      "end": 8135,
+      "start": 8179,
+      "end": 8180,
       "loc": {
         "start": {
-          "line": 303,
+          "line": 305,
           "column": 13
         },
         "end": {
-          "line": 303,
+          "line": 305,
           "column": 14
         }
       }
@@ -25783,15 +25783,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8136,
-      "end": 8137,
+      "start": 8181,
+      "end": 8182,
       "loc": {
         "start": {
-          "line": 303,
+          "line": 305,
           "column": 15
         },
         "end": {
-          "line": 303,
+          "line": 305,
           "column": 16
         }
       }
@@ -25811,15 +25811,15 @@
         "updateContext": null
       },
       "value": "if",
-      "start": 8140,
-      "end": 8142,
+      "start": 8185,
+      "end": 8187,
       "loc": {
         "start": {
-          "line": 304,
+          "line": 306,
           "column": 2
         },
         "end": {
-          "line": 304,
+          "line": 306,
           "column": 4
         }
       }
@@ -25836,15 +25836,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8143,
-      "end": 8144,
+      "start": 8188,
+      "end": 8189,
       "loc": {
         "start": {
-          "line": 304,
+          "line": 306,
           "column": 5
         },
         "end": {
-          "line": 304,
+          "line": 306,
           "column": 6
         }
       }
@@ -25862,15 +25862,15 @@
         "binop": null
       },
       "value": "world",
-      "start": 8144,
-      "end": 8149,
+      "start": 8189,
+      "end": 8194,
       "loc": {
         "start": {
-          "line": 304,
+          "line": 306,
           "column": 6
         },
         "end": {
-          "line": 304,
+          "line": 306,
           "column": 11
         }
       }
@@ -25889,15 +25889,15 @@
         "updateContext": null
       },
       "value": "&&",
-      "start": 8150,
-      "end": 8152,
+      "start": 8195,
+      "end": 8197,
       "loc": {
         "start": {
-          "line": 304,
+          "line": 306,
           "column": 12
         },
         "end": {
-          "line": 304,
+          "line": 306,
           "column": 14
         }
       }
@@ -25916,15 +25916,15 @@
         "updateContext": null
       },
       "value": "!",
-      "start": 8153,
-      "end": 8154,
+      "start": 8198,
+      "end": 8199,
       "loc": {
         "start": {
-          "line": 304,
+          "line": 306,
           "column": 15
         },
         "end": {
-          "line": 304,
+          "line": 306,
           "column": 16
         }
       }
@@ -25944,15 +25944,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 8154,
-      "end": 8158,
+      "start": 8199,
+      "end": 8203,
       "loc": {
         "start": {
-          "line": 304,
+          "line": 306,
           "column": 16
         },
         "end": {
-          "line": 304,
+          "line": 306,
           "column": 20
         }
       }
@@ -25970,15 +25970,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8158,
-      "end": 8159,
+      "start": 8203,
+      "end": 8204,
       "loc": {
         "start": {
-          "line": 304,
+          "line": 306,
           "column": 20
         },
         "end": {
-          "line": 304,
+          "line": 306,
           "column": 21
         }
       }
@@ -25996,15 +25996,15 @@
         "binop": null
       },
       "value": "valid",
-      "start": 8159,
-      "end": 8164,
+      "start": 8204,
+      "end": 8209,
       "loc": {
         "start": {
-          "line": 304,
+          "line": 306,
           "column": 21
         },
         "end": {
-          "line": 304,
+          "line": 306,
           "column": 26
         }
       }
@@ -26021,15 +26021,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8164,
-      "end": 8165,
+      "start": 8209,
+      "end": 8210,
       "loc": {
         "start": {
-          "line": 304,
+          "line": 306,
           "column": 26
         },
         "end": {
-          "line": 304,
+          "line": 306,
           "column": 27
         }
       }
@@ -26046,15 +26046,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8165,
-      "end": 8166,
+      "start": 8210,
+      "end": 8211,
       "loc": {
         "start": {
-          "line": 304,
+          "line": 306,
           "column": 27
         },
         "end": {
-          "line": 304,
+          "line": 306,
           "column": 28
         }
       }
@@ -26071,15 +26071,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8166,
-      "end": 8167,
+      "start": 8211,
+      "end": 8212,
       "loc": {
         "start": {
-          "line": 304,
+          "line": 306,
           "column": 28
         },
         "end": {
-          "line": 304,
+          "line": 306,
           "column": 29
         }
       }
@@ -26096,15 +26096,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8168,
-      "end": 8169,
+      "start": 8213,
+      "end": 8214,
       "loc": {
         "start": {
-          "line": 304,
+          "line": 306,
           "column": 30
         },
         "end": {
-          "line": 304,
+          "line": 306,
           "column": 31
         }
       }
@@ -26112,15 +26112,15 @@
     {
       "type": "CommentLine",
       "value": " Assign new id, and reattach to world",
-      "start": 8173,
-      "end": 8212,
+      "start": 8218,
+      "end": 8257,
       "loc": {
         "start": {
-          "line": 305,
+          "line": 307,
           "column": 3
         },
         "end": {
-          "line": 305,
+          "line": 307,
           "column": 42
         }
       }
@@ -26140,15 +26140,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 8216,
-      "end": 8220,
+      "start": 8261,
+      "end": 8265,
       "loc": {
         "start": {
-          "line": 306,
+          "line": 308,
           "column": 3
         },
         "end": {
-          "line": 306,
+          "line": 308,
           "column": 7
         }
       }
@@ -26166,15 +26166,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8220,
-      "end": 8221,
+      "start": 8265,
+      "end": 8266,
       "loc": {
         "start": {
-          "line": 306,
+          "line": 308,
           "column": 7
         },
         "end": {
-          "line": 306,
+          "line": 308,
           "column": 8
         }
       }
@@ -26192,15 +26192,15 @@
         "binop": null
       },
       "value": "world",
-      "start": 8221,
-      "end": 8226,
+      "start": 8266,
+      "end": 8271,
       "loc": {
         "start": {
-          "line": 306,
+          "line": 308,
           "column": 8
         },
         "end": {
-          "line": 306,
+          "line": 308,
           "column": 13
         }
       }
@@ -26219,15 +26219,15 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 8227,
-      "end": 8228,
+      "start": 8272,
+      "end": 8273,
       "loc": {
         "start": {
-          "line": 306,
+          "line": 308,
           "column": 14
         },
         "end": {
-          "line": 306,
+          "line": 308,
           "column": 15
         }
       }
@@ -26245,15 +26245,15 @@
         "binop": null
       },
       "value": "world",
-      "start": 8229,
-      "end": 8234,
+      "start": 8274,
+      "end": 8279,
       "loc": {
         "start": {
-          "line": 306,
+          "line": 308,
           "column": 16
         },
         "end": {
-          "line": 306,
+          "line": 308,
           "column": 21
         }
       }
@@ -26273,15 +26273,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 8238,
-      "end": 8242,
+      "start": 8283,
+      "end": 8287,
       "loc": {
         "start": {
-          "line": 307,
+          "line": 309,
           "column": 3
         },
         "end": {
-          "line": 307,
+          "line": 309,
           "column": 7
         }
       }
@@ -26299,15 +26299,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8242,
-      "end": 8243,
+      "start": 8287,
+      "end": 8288,
       "loc": {
         "start": {
-          "line": 307,
+          "line": 309,
           "column": 7
         },
         "end": {
-          "line": 307,
+          "line": 309,
           "column": 8
         }
       }
@@ -26325,15 +26325,15 @@
         "binop": null
       },
       "value": "_id",
-      "start": 8243,
-      "end": 8246,
+      "start": 8288,
+      "end": 8291,
       "loc": {
         "start": {
-          "line": 307,
+          "line": 309,
           "column": 8
         },
         "end": {
-          "line": 307,
+          "line": 309,
           "column": 11
         }
       }
@@ -26352,15 +26352,15 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 8247,
-      "end": 8248,
+      "start": 8292,
+      "end": 8293,
       "loc": {
         "start": {
-          "line": 307,
+          "line": 309,
           "column": 12
         },
         "end": {
-          "line": 307,
+          "line": 309,
           "column": 13
         }
       }
@@ -26380,15 +26380,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 8249,
-      "end": 8253,
+      "start": 8294,
+      "end": 8298,
       "loc": {
         "start": {
-          "line": 307,
+          "line": 309,
           "column": 14
         },
         "end": {
-          "line": 307,
+          "line": 309,
           "column": 18
         }
       }
@@ -26406,15 +26406,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8253,
-      "end": 8254,
+      "start": 8298,
+      "end": 8299,
       "loc": {
         "start": {
-          "line": 307,
+          "line": 309,
           "column": 18
         },
         "end": {
-          "line": 307,
+          "line": 309,
           "column": 19
         }
       }
@@ -26432,15 +26432,15 @@
         "binop": null
       },
       "value": "world",
-      "start": 8254,
-      "end": 8259,
+      "start": 8299,
+      "end": 8304,
       "loc": {
         "start": {
-          "line": 307,
+          "line": 309,
           "column": 19
         },
         "end": {
-          "line": 307,
+          "line": 309,
           "column": 24
         }
       }
@@ -26458,15 +26458,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8259,
-      "end": 8260,
+      "start": 8304,
+      "end": 8305,
       "loc": {
         "start": {
-          "line": 307,
+          "line": 309,
           "column": 24
         },
         "end": {
-          "line": 307,
+          "line": 309,
           "column": 25
         }
       }
@@ -26484,15 +26484,15 @@
         "binop": null
       },
       "value": "idCounter",
-      "start": 8260,
-      "end": 8269,
+      "start": 8305,
+      "end": 8314,
       "loc": {
         "start": {
-          "line": 307,
+          "line": 309,
           "column": 25
         },
         "end": {
-          "line": 307,
+          "line": 309,
           "column": 34
         }
       }
@@ -26510,15 +26510,15 @@
         "binop": null
       },
       "value": "++",
-      "start": 8269,
-      "end": 8271,
+      "start": 8314,
+      "end": 8316,
       "loc": {
         "start": {
-          "line": 307,
+          "line": 309,
           "column": 34
         },
         "end": {
-          "line": 307,
+          "line": 309,
           "column": 36
         }
       }
@@ -26538,15 +26538,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 8275,
-      "end": 8279,
+      "start": 8320,
+      "end": 8324,
       "loc": {
         "start": {
-          "line": 308,
+          "line": 310,
           "column": 3
         },
         "end": {
-          "line": 308,
+          "line": 310,
           "column": 7
         }
       }
@@ -26564,15 +26564,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8279,
-      "end": 8280,
+      "start": 8324,
+      "end": 8325,
       "loc": {
         "start": {
-          "line": 308,
+          "line": 310,
           "column": 7
         },
         "end": {
-          "line": 308,
+          "line": 310,
           "column": 8
         }
       }
@@ -26590,15 +26590,15 @@
         "binop": null
       },
       "value": "world",
-      "start": 8280,
-      "end": 8285,
+      "start": 8325,
+      "end": 8330,
       "loc": {
         "start": {
-          "line": 308,
+          "line": 310,
           "column": 8
         },
         "end": {
-          "line": 308,
+          "line": 310,
           "column": 13
         }
       }
@@ -26616,15 +26616,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8285,
-      "end": 8286,
+      "start": 8330,
+      "end": 8331,
       "loc": {
         "start": {
-          "line": 308,
+          "line": 310,
           "column": 13
         },
         "end": {
-          "line": 308,
+          "line": 310,
           "column": 14
         }
       }
@@ -26642,15 +26642,15 @@
         "binop": null
       },
       "value": "entities",
-      "start": 8286,
-      "end": 8294,
+      "start": 8331,
+      "end": 8339,
       "loc": {
         "start": {
-          "line": 308,
+          "line": 310,
           "column": 14
         },
         "end": {
-          "line": 308,
+          "line": 310,
           "column": 22
         }
       }
@@ -26668,15 +26668,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8294,
-      "end": 8295,
+      "start": 8339,
+      "end": 8340,
       "loc": {
         "start": {
-          "line": 308,
+          "line": 310,
           "column": 22
         },
         "end": {
-          "line": 308,
+          "line": 310,
           "column": 23
         }
       }
@@ -26694,15 +26694,15 @@
         "binop": null
       },
       "value": "set",
-      "start": 8295,
-      "end": 8298,
+      "start": 8340,
+      "end": 8343,
       "loc": {
         "start": {
-          "line": 308,
+          "line": 310,
           "column": 23
         },
         "end": {
-          "line": 308,
+          "line": 310,
           "column": 26
         }
       }
@@ -26719,15 +26719,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8298,
-      "end": 8299,
+      "start": 8343,
+      "end": 8344,
       "loc": {
         "start": {
-          "line": 308,
+          "line": 310,
           "column": 26
         },
         "end": {
-          "line": 308,
+          "line": 310,
           "column": 27
         }
       }
@@ -26747,15 +26747,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 8299,
-      "end": 8303,
+      "start": 8344,
+      "end": 8348,
       "loc": {
         "start": {
-          "line": 308,
+          "line": 310,
           "column": 27
         },
         "end": {
-          "line": 308,
+          "line": 310,
           "column": 31
         }
       }
@@ -26773,15 +26773,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8303,
-      "end": 8304,
+      "start": 8348,
+      "end": 8349,
       "loc": {
         "start": {
-          "line": 308,
+          "line": 310,
           "column": 31
         },
         "end": {
-          "line": 308,
+          "line": 310,
           "column": 32
         }
       }
@@ -26799,15 +26799,15 @@
         "binop": null
       },
       "value": "_id",
-      "start": 8304,
-      "end": 8307,
+      "start": 8349,
+      "end": 8352,
       "loc": {
         "start": {
-          "line": 308,
+          "line": 310,
           "column": 32
         },
         "end": {
-          "line": 308,
+          "line": 310,
           "column": 35
         }
       }
@@ -26825,15 +26825,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8307,
-      "end": 8308,
+      "start": 8352,
+      "end": 8353,
       "loc": {
         "start": {
-          "line": 308,
+          "line": 310,
           "column": 35
         },
         "end": {
-          "line": 308,
+          "line": 310,
           "column": 36
         }
       }
@@ -26853,15 +26853,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 8309,
-      "end": 8313,
+      "start": 8354,
+      "end": 8358,
       "loc": {
         "start": {
-          "line": 308,
+          "line": 310,
           "column": 37
         },
         "end": {
-          "line": 308,
+          "line": 310,
           "column": 41
         }
       }
@@ -26878,15 +26878,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8313,
-      "end": 8314,
+      "start": 8358,
+      "end": 8359,
       "loc": {
         "start": {
-          "line": 308,
+          "line": 310,
           "column": 41
         },
         "end": {
-          "line": 308,
+          "line": 310,
           "column": 42
         }
       }
@@ -26906,15 +26906,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 8318,
-      "end": 8322,
+      "start": 8363,
+      "end": 8367,
       "loc": {
         "start": {
-          "line": 309,
+          "line": 311,
           "column": 3
         },
         "end": {
-          "line": 309,
+          "line": 311,
           "column": 7
         }
       }
@@ -26932,15 +26932,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8322,
-      "end": 8323,
+      "start": 8367,
+      "end": 8368,
       "loc": {
         "start": {
-          "line": 309,
+          "line": 311,
           "column": 7
         },
         "end": {
-          "line": 309,
+          "line": 311,
           "column": 8
         }
       }
@@ -26958,15 +26958,15 @@
         "binop": null
       },
       "value": "world",
-      "start": 8323,
-      "end": 8328,
+      "start": 8368,
+      "end": 8373,
       "loc": {
         "start": {
-          "line": 309,
+          "line": 311,
           "column": 8
         },
         "end": {
-          "line": 309,
+          "line": 311,
           "column": 13
         }
       }
@@ -26984,15 +26984,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8328,
-      "end": 8329,
+      "start": 8373,
+      "end": 8374,
       "loc": {
         "start": {
-          "line": 309,
+          "line": 311,
           "column": 13
         },
         "end": {
-          "line": 309,
+          "line": 311,
           "column": 14
         }
       }
@@ -27010,15 +27010,15 @@
         "binop": null
       },
       "value": "index",
-      "start": 8329,
-      "end": 8334,
+      "start": 8374,
+      "end": 8379,
       "loc": {
         "start": {
-          "line": 309,
+          "line": 311,
           "column": 14
         },
         "end": {
-          "line": 309,
+          "line": 311,
           "column": 19
         }
       }
@@ -27036,15 +27036,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8334,
-      "end": 8335,
+      "start": 8379,
+      "end": 8380,
       "loc": {
         "start": {
-          "line": 309,
+          "line": 311,
           "column": 19
         },
         "end": {
-          "line": 309,
+          "line": 311,
           "column": 20
         }
       }
@@ -27062,15 +27062,15 @@
         "binop": null
       },
       "value": "addEntity",
-      "start": 8335,
-      "end": 8344,
+      "start": 8380,
+      "end": 8389,
       "loc": {
         "start": {
-          "line": 309,
+          "line": 311,
           "column": 20
         },
         "end": {
-          "line": 309,
+          "line": 311,
           "column": 29
         }
       }
@@ -27087,15 +27087,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8344,
-      "end": 8345,
+      "start": 8389,
+      "end": 8390,
       "loc": {
         "start": {
-          "line": 309,
+          "line": 311,
           "column": 29
         },
         "end": {
-          "line": 309,
+          "line": 311,
           "column": 30
         }
       }
@@ -27115,15 +27115,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 8345,
-      "end": 8349,
+      "start": 8390,
+      "end": 8394,
       "loc": {
         "start": {
-          "line": 309,
+          "line": 311,
           "column": 30
         },
         "end": {
-          "line": 309,
+          "line": 311,
           "column": 34
         }
       }
@@ -27140,15 +27140,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8349,
-      "end": 8350,
+      "start": 8394,
+      "end": 8395,
       "loc": {
         "start": {
-          "line": 309,
+          "line": 311,
           "column": 34
         },
         "end": {
-          "line": 309,
+          "line": 311,
           "column": 35
         }
       }
@@ -27165,15 +27165,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8353,
-      "end": 8354,
+      "start": 8398,
+      "end": 8399,
       "loc": {
         "start": {
-          "line": 310,
+          "line": 312,
           "column": 2
         },
         "end": {
-          "line": 310,
+          "line": 312,
           "column": 3
         }
       }
@@ -27190,15 +27190,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8356,
-      "end": 8357,
+      "start": 8401,
+      "end": 8402,
       "loc": {
         "start": {
-          "line": 311,
+          "line": 313,
           "column": 1
         },
         "end": {
-          "line": 311,
+          "line": 313,
           "column": 2
         }
       }
@@ -27206,15 +27206,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Removes this entity from the current world, without removing any components or data.\n\t * It can be re-attached to another world (or the same world), using the attach() method.\n\t * Note: Do not use detached entities, get() may be safe, but avoid calling other methods\n\t * Note: The ID will be reassigned, so do not rely on this\n\t *\n\t * @example\n\t * entity.detach()\n\t ",
-      "start": 8360,
-      "end": 8736,
+      "start": 8405,
+      "end": 8781,
       "loc": {
         "start": {
-          "line": 313,
+          "line": 315,
           "column": 1
         },
         "end": {
-          "line": 321,
+          "line": 323,
           "column": 4
         }
       }
@@ -27232,15 +27232,15 @@
         "binop": null
       },
       "value": "detach",
-      "start": 8738,
-      "end": 8744,
+      "start": 8783,
+      "end": 8789,
       "loc": {
         "start": {
-          "line": 322,
+          "line": 324,
           "column": 1
         },
         "end": {
-          "line": 322,
+          "line": 324,
           "column": 7
         }
       }
@@ -27257,15 +27257,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8744,
-      "end": 8745,
+      "start": 8789,
+      "end": 8790,
       "loc": {
         "start": {
-          "line": 322,
+          "line": 324,
           "column": 7
         },
         "end": {
-          "line": 322,
+          "line": 324,
           "column": 8
         }
       }
@@ -27282,15 +27282,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8745,
-      "end": 8746,
+      "start": 8790,
+      "end": 8791,
       "loc": {
         "start": {
-          "line": 322,
+          "line": 324,
           "column": 8
         },
         "end": {
-          "line": 322,
+          "line": 324,
           "column": 9
         }
       }
@@ -27307,15 +27307,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8747,
-      "end": 8748,
+      "start": 8792,
+      "end": 8793,
       "loc": {
         "start": {
-          "line": 322,
+          "line": 324,
           "column": 10
         },
         "end": {
-          "line": 322,
+          "line": 324,
           "column": 11
         }
       }
@@ -27335,15 +27335,15 @@
         "updateContext": null
       },
       "value": "if",
-      "start": 8751,
-      "end": 8753,
+      "start": 8796,
+      "end": 8798,
       "loc": {
         "start": {
-          "line": 323,
+          "line": 325,
           "column": 2
         },
         "end": {
-          "line": 323,
+          "line": 325,
           "column": 4
         }
       }
@@ -27360,15 +27360,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8754,
-      "end": 8755,
+      "start": 8799,
+      "end": 8800,
       "loc": {
         "start": {
-          "line": 323,
+          "line": 325,
           "column": 5
         },
         "end": {
-          "line": 323,
+          "line": 325,
           "column": 6
         }
       }
@@ -27388,15 +27388,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 8755,
-      "end": 8759,
+      "start": 8800,
+      "end": 8804,
       "loc": {
         "start": {
-          "line": 323,
+          "line": 325,
           "column": 6
         },
         "end": {
-          "line": 323,
+          "line": 325,
           "column": 10
         }
       }
@@ -27414,15 +27414,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8759,
-      "end": 8760,
+      "start": 8804,
+      "end": 8805,
       "loc": {
         "start": {
-          "line": 323,
+          "line": 325,
           "column": 10
         },
         "end": {
-          "line": 323,
+          "line": 325,
           "column": 11
         }
       }
@@ -27440,15 +27440,15 @@
         "binop": null
       },
       "value": "valid",
-      "start": 8760,
-      "end": 8765,
+      "start": 8805,
+      "end": 8810,
       "loc": {
         "start": {
-          "line": 323,
+          "line": 325,
           "column": 11
         },
         "end": {
-          "line": 323,
+          "line": 325,
           "column": 16
         }
       }
@@ -27465,15 +27465,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8765,
-      "end": 8766,
+      "start": 8810,
+      "end": 8811,
       "loc": {
         "start": {
-          "line": 323,
+          "line": 325,
           "column": 16
         },
         "end": {
-          "line": 323,
+          "line": 325,
           "column": 17
         }
       }
@@ -27490,15 +27490,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8766,
-      "end": 8767,
+      "start": 8811,
+      "end": 8812,
       "loc": {
         "start": {
-          "line": 323,
+          "line": 325,
           "column": 17
         },
         "end": {
-          "line": 323,
+          "line": 325,
           "column": 18
         }
       }
@@ -27515,15 +27515,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8767,
-      "end": 8768,
+      "start": 8812,
+      "end": 8813,
       "loc": {
         "start": {
-          "line": 323,
+          "line": 325,
           "column": 18
         },
         "end": {
-          "line": 323,
+          "line": 325,
           "column": 19
         }
       }
@@ -27540,15 +27540,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8769,
-      "end": 8770,
+      "start": 8814,
+      "end": 8815,
       "loc": {
         "start": {
-          "line": 323,
+          "line": 325,
           "column": 20
         },
         "end": {
-          "line": 323,
+          "line": 325,
           "column": 21
         }
       }
@@ -27556,15 +27556,15 @@
     {
       "type": "CommentLine",
       "value": " Remove from current world",
-      "start": 8774,
-      "end": 8802,
+      "start": 8819,
+      "end": 8847,
       "loc": {
         "start": {
-          "line": 324,
+          "line": 326,
           "column": 3
         },
         "end": {
-          "line": 324,
+          "line": 326,
           "column": 31
         }
       }
@@ -27584,15 +27584,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 8806,
-      "end": 8810,
+      "start": 8851,
+      "end": 8855,
       "loc": {
         "start": {
-          "line": 325,
+          "line": 327,
           "column": 3
         },
         "end": {
-          "line": 325,
+          "line": 327,
           "column": 7
         }
       }
@@ -27610,15 +27610,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8810,
-      "end": 8811,
+      "start": 8855,
+      "end": 8856,
       "loc": {
         "start": {
-          "line": 325,
+          "line": 327,
           "column": 7
         },
         "end": {
-          "line": 325,
+          "line": 327,
           "column": 8
         }
       }
@@ -27636,15 +27636,15 @@
         "binop": null
       },
       "value": "world",
-      "start": 8811,
-      "end": 8816,
+      "start": 8856,
+      "end": 8861,
       "loc": {
         "start": {
-          "line": 325,
+          "line": 327,
           "column": 8
         },
         "end": {
-          "line": 325,
+          "line": 327,
           "column": 13
         }
       }
@@ -27662,15 +27662,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8816,
-      "end": 8817,
+      "start": 8861,
+      "end": 8862,
       "loc": {
         "start": {
-          "line": 325,
+          "line": 327,
           "column": 13
         },
         "end": {
-          "line": 325,
+          "line": 327,
           "column": 14
         }
       }
@@ -27688,15 +27688,15 @@
         "binop": null
       },
       "value": "index",
-      "start": 8817,
-      "end": 8822,
+      "start": 8862,
+      "end": 8867,
       "loc": {
         "start": {
-          "line": 325,
+          "line": 327,
           "column": 14
         },
         "end": {
-          "line": 325,
+          "line": 327,
           "column": 19
         }
       }
@@ -27714,15 +27714,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8822,
-      "end": 8823,
+      "start": 8867,
+      "end": 8868,
       "loc": {
         "start": {
-          "line": 325,
+          "line": 327,
           "column": 19
         },
         "end": {
-          "line": 325,
+          "line": 327,
           "column": 20
         }
       }
@@ -27740,15 +27740,15 @@
         "binop": null
       },
       "value": "removeEntity",
-      "start": 8823,
-      "end": 8835,
+      "start": 8868,
+      "end": 8880,
       "loc": {
         "start": {
-          "line": 325,
+          "line": 327,
           "column": 20
         },
         "end": {
-          "line": 325,
+          "line": 327,
           "column": 32
         }
       }
@@ -27765,15 +27765,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8835,
-      "end": 8836,
+      "start": 8880,
+      "end": 8881,
       "loc": {
         "start": {
-          "line": 325,
+          "line": 327,
           "column": 32
         },
         "end": {
-          "line": 325,
+          "line": 327,
           "column": 33
         }
       }
@@ -27793,15 +27793,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 8836,
-      "end": 8840,
+      "start": 8881,
+      "end": 8885,
       "loc": {
         "start": {
-          "line": 325,
+          "line": 327,
           "column": 33
         },
         "end": {
-          "line": 325,
+          "line": 327,
           "column": 37
         }
       }
@@ -27818,15 +27818,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8840,
-      "end": 8841,
+      "start": 8885,
+      "end": 8886,
       "loc": {
         "start": {
-          "line": 325,
+          "line": 327,
           "column": 37
         },
         "end": {
-          "line": 325,
+          "line": 327,
           "column": 38
         }
       }
@@ -27846,15 +27846,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 8845,
-      "end": 8849,
+      "start": 8890,
+      "end": 8894,
       "loc": {
         "start": {
-          "line": 326,
+          "line": 328,
           "column": 3
         },
         "end": {
-          "line": 326,
+          "line": 328,
           "column": 7
         }
       }
@@ -27872,15 +27872,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8849,
-      "end": 8850,
+      "start": 8894,
+      "end": 8895,
       "loc": {
         "start": {
-          "line": 326,
+          "line": 328,
           "column": 7
         },
         "end": {
-          "line": 326,
+          "line": 328,
           "column": 8
         }
       }
@@ -27898,15 +27898,15 @@
         "binop": null
       },
       "value": "world",
-      "start": 8850,
-      "end": 8855,
+      "start": 8895,
+      "end": 8900,
       "loc": {
         "start": {
-          "line": 326,
+          "line": 328,
           "column": 8
         },
         "end": {
-          "line": 326,
+          "line": 328,
           "column": 13
         }
       }
@@ -27924,15 +27924,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8855,
-      "end": 8856,
+      "start": 8900,
+      "end": 8901,
       "loc": {
         "start": {
-          "line": 326,
+          "line": 328,
           "column": 13
         },
         "end": {
-          "line": 326,
+          "line": 328,
           "column": 14
         }
       }
@@ -27950,15 +27950,15 @@
         "binop": null
       },
       "value": "entities",
-      "start": 8856,
-      "end": 8864,
+      "start": 8901,
+      "end": 8909,
       "loc": {
         "start": {
-          "line": 326,
+          "line": 328,
           "column": 14
         },
         "end": {
-          "line": 326,
+          "line": 328,
           "column": 22
         }
       }
@@ -27976,15 +27976,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8864,
-      "end": 8865,
+      "start": 8909,
+      "end": 8910,
       "loc": {
         "start": {
-          "line": 326,
+          "line": 328,
           "column": 22
         },
         "end": {
-          "line": 326,
+          "line": 328,
           "column": 23
         }
       }
@@ -28004,15 +28004,15 @@
         "updateContext": null
       },
       "value": "delete",
-      "start": 8865,
-      "end": 8871,
+      "start": 8910,
+      "end": 8916,
       "loc": {
         "start": {
-          "line": 326,
+          "line": 328,
           "column": 23
         },
         "end": {
-          "line": 326,
+          "line": 328,
           "column": 29
         }
       }
@@ -28029,15 +28029,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8871,
-      "end": 8872,
+      "start": 8916,
+      "end": 8917,
       "loc": {
         "start": {
-          "line": 326,
+          "line": 328,
           "column": 29
         },
         "end": {
-          "line": 326,
+          "line": 328,
           "column": 30
         }
       }
@@ -28057,15 +28057,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 8872,
-      "end": 8876,
+      "start": 8917,
+      "end": 8921,
       "loc": {
         "start": {
-          "line": 326,
+          "line": 328,
           "column": 30
         },
         "end": {
-          "line": 326,
+          "line": 328,
           "column": 34
         }
       }
@@ -28083,15 +28083,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8876,
-      "end": 8877,
+      "start": 8921,
+      "end": 8922,
       "loc": {
         "start": {
-          "line": 326,
+          "line": 328,
           "column": 34
         },
         "end": {
-          "line": 326,
+          "line": 328,
           "column": 35
         }
       }
@@ -28109,15 +28109,15 @@
         "binop": null
       },
       "value": "_id",
-      "start": 8877,
-      "end": 8880,
+      "start": 8922,
+      "end": 8925,
       "loc": {
         "start": {
-          "line": 326,
+          "line": 328,
           "column": 35
         },
         "end": {
-          "line": 326,
+          "line": 328,
           "column": 38
         }
       }
@@ -28134,15 +28134,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8880,
-      "end": 8881,
+      "start": 8925,
+      "end": 8926,
       "loc": {
         "start": {
-          "line": 326,
+          "line": 328,
           "column": 38
         },
         "end": {
-          "line": 326,
+          "line": 328,
           "column": 39
         }
       }
@@ -28162,15 +28162,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 8885,
-      "end": 8889,
+      "start": 8930,
+      "end": 8934,
       "loc": {
         "start": {
-          "line": 327,
+          "line": 329,
           "column": 3
         },
         "end": {
-          "line": 327,
+          "line": 329,
           "column": 7
         }
       }
@@ -28188,15 +28188,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8889,
-      "end": 8890,
+      "start": 8934,
+      "end": 8935,
       "loc": {
         "start": {
-          "line": 327,
+          "line": 329,
           "column": 7
         },
         "end": {
-          "line": 327,
+          "line": 329,
           "column": 8
         }
       }
@@ -28214,15 +28214,15 @@
         "binop": null
       },
       "value": "_id",
-      "start": 8890,
-      "end": 8893,
+      "start": 8935,
+      "end": 8938,
       "loc": {
         "start": {
-          "line": 327,
+          "line": 329,
           "column": 8
         },
         "end": {
-          "line": 327,
+          "line": 329,
           "column": 11
         }
       }
@@ -28241,15 +28241,15 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 8894,
-      "end": 8895,
+      "start": 8939,
+      "end": 8940,
       "loc": {
         "start": {
-          "line": 327,
+          "line": 329,
           "column": 12
         },
         "end": {
-          "line": 327,
+          "line": 329,
           "column": 13
         }
       }
@@ -28267,15 +28267,15 @@
         "binop": null
       },
       "value": "undefined",
-      "start": 8896,
-      "end": 8905,
+      "start": 8941,
+      "end": 8950,
       "loc": {
         "start": {
-          "line": 327,
+          "line": 329,
           "column": 14
         },
         "end": {
-          "line": 327,
+          "line": 329,
           "column": 23
         }
       }
@@ -28295,15 +28295,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 8909,
-      "end": 8913,
+      "start": 8954,
+      "end": 8958,
       "loc": {
         "start": {
-          "line": 328,
+          "line": 330,
           "column": 3
         },
         "end": {
-          "line": 328,
+          "line": 330,
           "column": 7
         }
       }
@@ -28321,15 +28321,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8913,
-      "end": 8914,
+      "start": 8958,
+      "end": 8959,
       "loc": {
         "start": {
-          "line": 328,
+          "line": 330,
           "column": 7
         },
         "end": {
-          "line": 328,
+          "line": 330,
           "column": 8
         }
       }
@@ -28347,15 +28347,15 @@
         "binop": null
       },
       "value": "world",
-      "start": 8914,
-      "end": 8919,
+      "start": 8959,
+      "end": 8964,
       "loc": {
         "start": {
-          "line": 328,
+          "line": 330,
           "column": 8
         },
         "end": {
-          "line": 328,
+          "line": 330,
           "column": 13
         }
       }
@@ -28374,15 +28374,15 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 8920,
-      "end": 8921,
+      "start": 8965,
+      "end": 8966,
       "loc": {
         "start": {
-          "line": 328,
+          "line": 330,
           "column": 14
         },
         "end": {
-          "line": 328,
+          "line": 330,
           "column": 15
         }
       }
@@ -28400,15 +28400,15 @@
         "binop": null
       },
       "value": "undefined",
-      "start": 8922,
-      "end": 8931,
+      "start": 8967,
+      "end": 8976,
       "loc": {
         "start": {
-          "line": 328,
+          "line": 330,
           "column": 16
         },
         "end": {
-          "line": 328,
+          "line": 330,
           "column": 25
         }
       }
@@ -28425,15 +28425,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8934,
-      "end": 8935,
+      "start": 8979,
+      "end": 8980,
       "loc": {
         "start": {
-          "line": 329,
+          "line": 331,
           "column": 2
         },
         "end": {
-          "line": 329,
+          "line": 331,
           "column": 3
         }
       }
@@ -28450,15 +28450,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8937,
-      "end": 8938,
+      "start": 8982,
+      "end": 8983,
       "loc": {
         "start": {
-          "line": 330,
+          "line": 332,
           "column": 1
         },
         "end": {
-          "line": 330,
+          "line": 332,
           "column": 2
         }
       }
@@ -28475,15 +28475,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8939,
-      "end": 8940,
+      "start": 8984,
+      "end": 8985,
       "loc": {
         "start": {
-          "line": 331,
+          "line": 333,
           "column": 0
         },
         "end": {
-          "line": 331,
+          "line": 333,
           "column": 1
         }
       }
@@ -28501,15 +28501,15 @@
         "binop": null
       },
       "value": "exports",
-      "start": 8942,
-      "end": 8949,
+      "start": 8987,
+      "end": 8994,
       "loc": {
         "start": {
-          "line": 333,
+          "line": 335,
           "column": 0
         },
         "end": {
-          "line": 333,
+          "line": 335,
           "column": 7
         }
       }
@@ -28527,15 +28527,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8949,
-      "end": 8950,
+      "start": 8994,
+      "end": 8995,
       "loc": {
         "start": {
-          "line": 333,
+          "line": 335,
           "column": 7
         },
         "end": {
-          "line": 333,
+          "line": 335,
           "column": 8
         }
       }
@@ -28553,15 +28553,15 @@
         "binop": null
       },
       "value": "Entity",
-      "start": 8950,
-      "end": 8956,
+      "start": 8995,
+      "end": 9001,
       "loc": {
         "start": {
-          "line": 333,
+          "line": 335,
           "column": 8
         },
         "end": {
-          "line": 333,
+          "line": 335,
           "column": 14
         }
       }
@@ -28580,15 +28580,15 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 8957,
-      "end": 8958,
+      "start": 9002,
+      "end": 9003,
       "loc": {
         "start": {
-          "line": 333,
+          "line": 335,
           "column": 15
         },
         "end": {
-          "line": 333,
+          "line": 335,
           "column": 16
         }
       }
@@ -28606,15 +28606,15 @@
         "binop": null
       },
       "value": "Entity",
-      "start": 8959,
-      "end": 8965,
+      "start": 9004,
+      "end": 9010,
       "loc": {
         "start": {
-          "line": 333,
+          "line": 335,
           "column": 17
         },
         "end": {
-          "line": 333,
+          "line": 335,
           "column": 23
         }
       }
@@ -28632,15 +28632,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8966,
-      "end": 8966,
+      "start": 9011,
+      "end": 9011,
       "loc": {
         "start": {
-          "line": 334,
+          "line": 336,
           "column": 0
         },
         "end": {
-          "line": 334,
+          "line": 336,
           "column": 0
         }
       }
diff --git a/docs/ast/source/world.js.json b/docs/ast/source/world.js.json
index bd26954..88d4d59 100644
--- a/docs/ast/source/world.js.json
+++ b/docs/ast/source/world.js.json
@@ -1,28 +1,28 @@
 {
   "type": "File",
   "start": 0,
-  "end": 8816,
+  "end": 9513,
   "loc": {
     "start": {
       "line": 1,
       "column": 0
     },
     "end": {
-      "line": 316,
+      "line": 345,
       "column": 0
     }
   },
   "program": {
     "type": "Program",
     "start": 0,
-    "end": 8816,
+    "end": 9513,
     "loc": {
       "start": {
         "line": 1,
         "column": 0
       },
       "end": {
-        "line": 316,
+        "line": 345,
         "column": 0
       }
     },
@@ -689,14 +689,14 @@
       {
         "type": "ClassDeclaration",
         "start": 265,
-        "end": 8792,
+        "end": 9489,
         "loc": {
           "start": {
             "line": 15,
             "column": 0
           },
           "end": {
-            "line": 313,
+            "line": 342,
             "column": 1
           }
         },
@@ -722,14 +722,14 @@
         "body": {
           "type": "ClassBody",
           "start": 277,
-          "end": 8792,
+          "end": 9489,
           "loc": {
             "start": {
               "line": 15,
               "column": 12
             },
             "end": {
-              "line": 313,
+              "line": 342,
               "column": 1
             }
           },
@@ -4335,16 +4335,16 @@
               "trailingComments": [
                 {
                   "type": "CommentBlock",
-                  "value": "*\n\t * Registers a system to the world.\n\t * The order the systems get registered, is the order then run in.\n\t *\n\t * @example\n\t * // Movement system\n\t * world.system(['position', 'velocity'], class {\n\t *      every(position, velocity, entity) {\n\t *          position.x += velocity.x\n\t *          position.y += velocity.y\n\t *      }\n\t *  })\n\t *\n\t * @param {Array}     components  - The list of components the system will process in every(). This follows the same logic as entity.has() and world.every().\n\t * @param {Function}  systemClass - The system class to instantiate. Can contain the following methods: constructor, initialize,\n\t * pre, every, post. Pre() and post() get called before and after every(), for each of the independent systems. See world.run()\n\t * for an example of the call order.\n\t * @param {...Object} [args]      - The arguments to forward to the system's constructors\n\t *\n\t * @return {number} Unique ID of the system on success or undefined on failure\n\t ",
+                  "value": "*\n\t * Registers a system to the world.\n\t * The order the systems get registered, is the order then run in.\n\t *\n\t * @example\n\t * // Movement system\n\t * world.system(['position', 'velocity'], class {\n\t *      constructor(context) {\n\t *          // This is showing how you can optionally pass parameters to the system's constructor\n\t *          this.context = context\n\t *      }\n\t *      every(position, velocity, entity) {\n\t *          position.x += velocity.x\n\t *          position.y += velocity.y\n\t *      }\n\t *  }, context)\n\t *\n\t * @example\n\t * // System that doesn't use every()\n\t * world.system(class {\n\t *      constructor(context) {\n\t *          this.context = context\n\t *      }\n\t *      pre() {\n\t *          // Handle events or something\n\t *      }\n\t *  }, context)\n\t *\n\t * @param {...Object} args - Both signatures are accepted: (components, systemClass, ...args) or (systemClass, ...args).\n\t *\n\t * **[components]**: The list of components the system will process in every(). This follows the same logic as entity.has() and world.every().\n\t *\n\t * **{systemClass}**: The system class to instantiate. Can contain the following methods: constructor, initialize, pre, every, post. Pre() and post() get called before and after every(), for each of the independent systems. See world.run() for an example of the call order.\n\t *\n\t * **[...args]**: The arguments to forward to the system's constructors.\n\t *\n\t * @return {number} Unique ID of the system on success or undefined on failure\n\t ",
                   "start": 3066,
-                  "end": 4045,
+                  "end": 4560,
                   "loc": {
                     "start": {
                       "line": 129,
                       "column": 1
                     },
                     "end": {
-                      "line": 149,
+                      "line": 166,
                       "column": 4
                     }
                   }
@@ -4353,15 +4353,15 @@
             },
             {
               "type": "ClassMethod",
-              "start": 4047,
-              "end": 4455,
+              "start": 4562,
+              "end": 5160,
               "loc": {
                 "start": {
-                  "line": 150,
+                  "line": 167,
                   "column": 1
                 },
                 "end": {
-                  "line": 161,
+                  "line": 190,
                   "column": 2
                 }
               },
@@ -4369,15 +4369,15 @@
               "computed": false,
               "key": {
                 "type": "Identifier",
-                "start": 4047,
-                "end": 4053,
+                "start": 4562,
+                "end": 4568,
                 "loc": {
                   "start": {
-                    "line": 150,
+                    "line": 167,
                     "column": 1
                   },
                   "end": {
-                    "line": 150,
+                    "line": 167,
                     "column": 7
                   },
                   "identifierName": "system"
@@ -4391,66 +4391,32 @@
               "expression": false,
               "async": false,
               "params": [
-                {
-                  "type": "Identifier",
-                  "start": 4054,
-                  "end": 4064,
-                  "loc": {
-                    "start": {
-                      "line": 150,
-                      "column": 8
-                    },
-                    "end": {
-                      "line": 150,
-                      "column": 18
-                    },
-                    "identifierName": "components"
-                  },
-                  "name": "components"
-                },
-                {
-                  "type": "Identifier",
-                  "start": 4066,
-                  "end": 4077,
-                  "loc": {
-                    "start": {
-                      "line": 150,
-                      "column": 20
-                    },
-                    "end": {
-                      "line": 150,
-                      "column": 31
-                    },
-                    "identifierName": "systemClass"
-                  },
-                  "name": "systemClass"
-                },
                 {
                   "type": "RestElement",
-                  "start": 4079,
-                  "end": 4086,
+                  "start": 4569,
+                  "end": 4576,
                   "loc": {
                     "start": {
-                      "line": 150,
-                      "column": 33
+                      "line": 167,
+                      "column": 8
                     },
                     "end": {
-                      "line": 150,
-                      "column": 40
+                      "line": 167,
+                      "column": 15
                     }
                   },
                   "argument": {
                     "type": "Identifier",
-                    "start": 4082,
-                    "end": 4086,
+                    "start": 4572,
+                    "end": 4576,
                     "loc": {
                       "start": {
-                        "line": 150,
-                        "column": 36
+                        "line": 167,
+                        "column": 11
                       },
                       "end": {
-                        "line": 150,
-                        "column": 40
+                        "line": 167,
+                        "column": 15
                       },
                       "identifierName": "args"
                     },
@@ -4460,1964 +4426,1585 @@
               ],
               "body": {
                 "type": "BlockStatement",
-                "start": 4088,
-                "end": 4455,
+                "start": 4578,
+                "end": 5160,
                 "loc": {
                   "start": {
-                    "line": 150,
-                    "column": 42
+                    "line": 167,
+                    "column": 17
                   },
                   "end": {
-                    "line": 161,
+                    "line": 190,
                     "column": 2
                   }
                 },
                 "body": [
+                  {
+                    "type": "VariableDeclaration",
+                    "start": 4633,
+                    "end": 4652,
+                    "loc": {
+                      "start": {
+                        "line": 169,
+                        "column": 2
+                      },
+                      "end": {
+                        "line": 169,
+                        "column": 21
+                      }
+                    },
+                    "declarations": [
+                      {
+                        "type": "VariableDeclarator",
+                        "start": 4637,
+                        "end": 4652,
+                        "loc": {
+                          "start": {
+                            "line": 169,
+                            "column": 6
+                          },
+                          "end": {
+                            "line": 169,
+                            "column": 21
+                          }
+                        },
+                        "id": {
+                          "type": "Identifier",
+                          "start": 4637,
+                          "end": 4647,
+                          "loc": {
+                            "start": {
+                              "line": 169,
+                              "column": 6
+                            },
+                            "end": {
+                              "line": 169,
+                              "column": 16
+                            },
+                            "identifierName": "components"
+                          },
+                          "name": "components",
+                          "leadingComments": null
+                        },
+                        "init": {
+                          "type": "ArrayExpression",
+                          "start": 4650,
+                          "end": 4652,
+                          "loc": {
+                            "start": {
+                              "line": 169,
+                              "column": 19
+                            },
+                            "end": {
+                              "line": 169,
+                              "column": 21
+                            }
+                          },
+                          "elements": []
+                        },
+                        "leadingComments": null
+                      }
+                    ],
+                    "kind": "let",
+                    "leadingComments": [
+                      {
+                        "type": "CommentLine",
+                        "value": " Get components and systemClass from arguments",
+                        "start": 4582,
+                        "end": 4630,
+                        "loc": {
+                          "start": {
+                            "line": 168,
+                            "column": 2
+                          },
+                          "end": {
+                            "line": 168,
+                            "column": 50
+                          }
+                        }
+                      }
+                    ]
+                  },
+                  {
+                    "type": "VariableDeclaration",
+                    "start": 4655,
+                    "end": 4676,
+                    "loc": {
+                      "start": {
+                        "line": 170,
+                        "column": 2
+                      },
+                      "end": {
+                        "line": 170,
+                        "column": 23
+                      }
+                    },
+                    "declarations": [
+                      {
+                        "type": "VariableDeclarator",
+                        "start": 4659,
+                        "end": 4670,
+                        "loc": {
+                          "start": {
+                            "line": 170,
+                            "column": 6
+                          },
+                          "end": {
+                            "line": 170,
+                            "column": 17
+                          }
+                        },
+                        "id": {
+                          "type": "Identifier",
+                          "start": 4659,
+                          "end": 4670,
+                          "loc": {
+                            "start": {
+                              "line": 170,
+                              "column": 6
+                            },
+                            "end": {
+                              "line": 170,
+                              "column": 17
+                            },
+                            "identifierName": "systemClass"
+                          },
+                          "name": "systemClass"
+                        },
+                        "init": null
+                      },
+                      {
+                        "type": "VariableDeclarator",
+                        "start": 4672,
+                        "end": 4676,
+                        "loc": {
+                          "start": {
+                            "line": 170,
+                            "column": 19
+                          },
+                          "end": {
+                            "line": 170,
+                            "column": 23
+                          }
+                        },
+                        "id": {
+                          "type": "Identifier",
+                          "start": 4672,
+                          "end": 4676,
+                          "loc": {
+                            "start": {
+                              "line": 170,
+                              "column": 19
+                            },
+                            "end": {
+                              "line": 170,
+                              "column": 23
+                            },
+                            "identifierName": "rest"
+                          },
+                          "name": "rest"
+                        },
+                        "init": null
+                      }
+                    ],
+                    "kind": "let"
+                  },
                   {
                     "type": "IfStatement",
-                    "start": 4179,
-                    "end": 4433,
+                    "start": 4679,
+                    "end": 4845,
                     "loc": {
                       "start": {
-                        "line": 152,
+                        "line": 171,
                         "column": 2
                       },
                       "end": {
-                        "line": 159,
+                        "line": 178,
                         "column": 3
                       }
                     },
                     "test": {
                       "type": "CallExpression",
-                      "start": 4183,
-                      "end": 4206,
+                      "start": 4683,
+                      "end": 4705,
                       "loc": {
                         "start": {
-                          "line": 152,
+                          "line": 171,
                           "column": 6
                         },
                         "end": {
-                          "line": 152,
-                          "column": 29
+                          "line": 171,
+                          "column": 28
                         }
                       },
                       "callee": {
-                        "type": "Identifier",
-                        "start": 4183,
-                        "end": 4193,
+                        "type": "MemberExpression",
+                        "start": 4683,
+                        "end": 4696,
                         "loc": {
                           "start": {
-                            "line": 152,
+                            "line": 171,
                             "column": 6
                           },
                           "end": {
-                            "line": 152,
-                            "column": 16
+                            "line": 171,
+                            "column": 19
+                          }
+                        },
+                        "object": {
+                          "type": "Identifier",
+                          "start": 4683,
+                          "end": 4688,
+                          "loc": {
+                            "start": {
+                              "line": 171,
+                              "column": 6
+                            },
+                            "end": {
+                              "line": 171,
+                              "column": 11
+                            },
+                            "identifierName": "Array"
                           },
-                          "identifierName": "isFunction"
+                          "name": "Array"
                         },
-                        "name": "isFunction",
-                        "leadingComments": null
+                        "property": {
+                          "type": "Identifier",
+                          "start": 4689,
+                          "end": 4696,
+                          "loc": {
+                            "start": {
+                              "line": 171,
+                              "column": 12
+                            },
+                            "end": {
+                              "line": 171,
+                              "column": 19
+                            },
+                            "identifierName": "isArray"
+                          },
+                          "name": "isArray"
+                        },
+                        "computed": false
                       },
                       "arguments": [
                         {
-                          "type": "Identifier",
-                          "start": 4194,
-                          "end": 4205,
+                          "type": "MemberExpression",
+                          "start": 4697,
+                          "end": 4704,
                           "loc": {
                             "start": {
-                              "line": 152,
-                              "column": 17
+                              "line": 171,
+                              "column": 20
                             },
                             "end": {
-                              "line": 152,
-                              "column": 28
+                              "line": 171,
+                              "column": 27
+                            }
+                          },
+                          "object": {
+                            "type": "Identifier",
+                            "start": 4697,
+                            "end": 4701,
+                            "loc": {
+                              "start": {
+                                "line": 171,
+                                "column": 20
+                              },
+                              "end": {
+                                "line": 171,
+                                "column": 24
+                              },
+                              "identifierName": "args"
                             },
-                            "identifierName": "systemClass"
+                            "name": "args"
                           },
-                          "name": "systemClass"
+                          "property": {
+                            "type": "NumericLiteral",
+                            "start": 4702,
+                            "end": 4703,
+                            "loc": {
+                              "start": {
+                                "line": 171,
+                                "column": 25
+                              },
+                              "end": {
+                                "line": 171,
+                                "column": 26
+                              }
+                            },
+                            "extra": {
+                              "rawValue": 0,
+                              "raw": "0"
+                            },
+                            "value": 0
+                          },
+                          "computed": true
                         }
-                      ],
-                      "leadingComments": null
+                      ]
                     },
                     "consequent": {
                       "type": "BlockStatement",
-                      "start": 4208,
-                      "end": 4433,
+                      "start": 4707,
+                      "end": 4785,
                       "loc": {
                         "start": {
-                          "line": 152,
-                          "column": 31
+                          "line": 171,
+                          "column": 30
                         },
                         "end": {
-                          "line": 159,
+                          "line": 175,
                           "column": 3
                         }
                       },
                       "body": [
                         {
-                          "type": "VariableDeclaration",
-                          "start": 4272,
-                          "end": 4312,
+                          "type": "ExpressionStatement",
+                          "start": 4712,
+                          "end": 4732,
                           "loc": {
                             "start": {
-                              "line": 154,
+                              "line": 172,
                               "column": 3
                             },
                             "end": {
-                              "line": 154,
-                              "column": 43
+                              "line": 172,
+                              "column": 23
                             }
                           },
-                          "declarations": [
-                            {
-                              "type": "VariableDeclarator",
-                              "start": 4276,
-                              "end": 4312,
+                          "expression": {
+                            "type": "AssignmentExpression",
+                            "start": 4712,
+                            "end": 4732,
+                            "loc": {
+                              "start": {
+                                "line": 172,
+                                "column": 3
+                              },
+                              "end": {
+                                "line": 172,
+                                "column": 23
+                              }
+                            },
+                            "operator": "=",
+                            "left": {
+                              "type": "Identifier",
+                              "start": 4712,
+                              "end": 4722,
                               "loc": {
                                 "start": {
-                                  "line": 154,
-                                  "column": 7
+                                  "line": 172,
+                                  "column": 3
                                 },
                                 "end": {
-                                  "line": 154,
-                                  "column": 43
+                                  "line": 172,
+                                  "column": 13
+                                },
+                                "identifierName": "components"
+                              },
+                              "name": "components"
+                            },
+                            "right": {
+                              "type": "MemberExpression",
+                              "start": 4725,
+                              "end": 4732,
+                              "loc": {
+                                "start": {
+                                  "line": 172,
+                                  "column": 16
+                                },
+                                "end": {
+                                  "line": 172,
+                                  "column": 23
                                 }
                               },
-                              "id": {
+                              "object": {
                                 "type": "Identifier",
-                                "start": 4276,
-                                "end": 4285,
+                                "start": 4725,
+                                "end": 4729,
                                 "loc": {
                                   "start": {
-                                    "line": 154,
-                                    "column": 7
+                                    "line": 172,
+                                    "column": 16
                                   },
                                   "end": {
-                                    "line": 154,
-                                    "column": 16
+                                    "line": 172,
+                                    "column": 20
                                   },
-                                  "identifierName": "newSystem"
+                                  "identifierName": "args"
                                 },
-                                "name": "newSystem",
-                                "leadingComments": null
+                                "name": "args"
                               },
-                              "init": {
-                                "type": "NewExpression",
-                                "start": 4288,
-                                "end": 4312,
+                              "property": {
+                                "type": "NumericLiteral",
+                                "start": 4730,
+                                "end": 4731,
                                 "loc": {
                                   "start": {
-                                    "line": 154,
-                                    "column": 19
+                                    "line": 172,
+                                    "column": 21
                                   },
                                   "end": {
-                                    "line": 154,
-                                    "column": 43
+                                    "line": 172,
+                                    "column": 22
                                   }
                                 },
-                                "callee": {
-                                  "type": "Identifier",
-                                  "start": 4292,
-                                  "end": 4303,
-                                  "loc": {
-                                    "start": {
-                                      "line": 154,
-                                      "column": 23
-                                    },
-                                    "end": {
-                                      "line": 154,
-                                      "column": 34
-                                    },
-                                    "identifierName": "systemClass"
-                                  },
-                                  "name": "systemClass"
+                                "extra": {
+                                  "rawValue": 0,
+                                  "raw": "0"
                                 },
-                                "arguments": [
-                                  {
-                                    "type": "SpreadElement",
-                                    "start": 4304,
-                                    "end": 4311,
-                                    "loc": {
-                                      "start": {
-                                        "line": 154,
-                                        "column": 35
-                                      },
-                                      "end": {
-                                        "line": 154,
-                                        "column": 42
-                                      }
-                                    },
-                                    "argument": {
-                                      "type": "Identifier",
-                                      "start": 4307,
-                                      "end": 4311,
-                                      "loc": {
-                                        "start": {
-                                          "line": 154,
-                                          "column": 38
-                                        },
-                                        "end": {
-                                          "line": 154,
-                                          "column": 42
-                                        },
-                                        "identifierName": "args"
-                                      },
-                                      "name": "args"
-                                    }
-                                  }
-                                ]
+                                "value": 0
                               },
-                              "leadingComments": null
-                            }
-                          ],
-                          "kind": "let",
-                          "leadingComments": [
-                            {
-                              "type": "CommentLine",
-                              "value": " Create the system, and set the component array query",
-                              "start": 4213,
-                              "end": 4268,
-                              "loc": {
-                                "start": {
-                                  "line": 153,
-                                  "column": 3
-                                },
-                                "end": {
-                                  "line": 153,
-                                  "column": 58
-                                }
-                              }
+                              "computed": true
                             }
-                          ]
+                          }
                         },
                         {
                           "type": "ExpressionStatement",
-                          "start": 4316,
-                          "end": 4349,
+                          "start": 4736,
+                          "end": 4757,
                           "loc": {
                             "start": {
-                              "line": 155,
+                              "line": 173,
                               "column": 3
                             },
                             "end": {
-                              "line": 155,
-                              "column": 36
+                              "line": 173,
+                              "column": 24
                             }
                           },
                           "expression": {
                             "type": "AssignmentExpression",
-                            "start": 4316,
-                            "end": 4349,
+                            "start": 4736,
+                            "end": 4757,
                             "loc": {
                               "start": {
-                                "line": 155,
+                                "line": 173,
                                 "column": 3
                               },
                               "end": {
-                                "line": 155,
-                                "column": 36
+                                "line": 173,
+                                "column": 24
                               }
                             },
                             "operator": "=",
                             "left": {
-                              "type": "MemberExpression",
-                              "start": 4316,
-                              "end": 4336,
+                              "type": "Identifier",
+                              "start": 4736,
+                              "end": 4747,
                               "loc": {
                                 "start": {
-                                  "line": 155,
+                                  "line": 173,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 155,
-                                  "column": 23
+                                  "line": 173,
+                                  "column": 14
+                                },
+                                "identifierName": "systemClass"
+                              },
+                              "name": "systemClass"
+                            },
+                            "right": {
+                              "type": "MemberExpression",
+                              "start": 4750,
+                              "end": 4757,
+                              "loc": {
+                                "start": {
+                                  "line": 173,
+                                  "column": 17
+                                },
+                                "end": {
+                                  "line": 173,
+                                  "column": 24
                                 }
                               },
                               "object": {
                                 "type": "Identifier",
-                                "start": 4316,
-                                "end": 4325,
+                                "start": 4750,
+                                "end": 4754,
                                 "loc": {
                                   "start": {
-                                    "line": 155,
-                                    "column": 3
+                                    "line": 173,
+                                    "column": 17
                                   },
                                   "end": {
-                                    "line": 155,
-                                    "column": 12
+                                    "line": 173,
+                                    "column": 21
                                   },
-                                  "identifierName": "newSystem"
+                                  "identifierName": "args"
                                 },
-                                "name": "newSystem"
+                                "name": "args"
                               },
                               "property": {
-                                "type": "Identifier",
-                                "start": 4326,
-                                "end": 4336,
+                                "type": "NumericLiteral",
+                                "start": 4755,
+                                "end": 4756,
                                 "loc": {
                                   "start": {
-                                    "line": 155,
-                                    "column": 13
+                                    "line": 173,
+                                    "column": 22
                                   },
                                   "end": {
-                                    "line": 155,
+                                    "line": 173,
                                     "column": 23
-                                  },
-                                  "identifierName": "components"
-                                },
-                                "name": "components"
-                              },
-                              "computed": false
-                            },
-                            "right": {
-                              "type": "Identifier",
-                              "start": 4339,
-                              "end": 4349,
-                              "loc": {
-                                "start": {
-                                  "line": 155,
-                                  "column": 26
+                                  }
                                 },
-                                "end": {
-                                  "line": 155,
-                                  "column": 36
+                                "extra": {
+                                  "rawValue": 1,
+                                  "raw": "1"
                                 },
-                                "identifierName": "components"
+                                "value": 1
                               },
-                              "name": "components",
-                              "leadingComments": null,
-                              "trailingComments": null
-                            },
-                            "trailingComments": null
-                          },
-                          "trailingComments": [
-                            {
-                              "type": "CommentLine",
-                              "value": " Add the system, return its ID",
-                              "start": 4354,
-                              "end": 4386,
-                              "loc": {
-                                "start": {
-                                  "line": 157,
-                                  "column": 3
-                                },
-                                "end": {
-                                  "line": 157,
-                                  "column": 35
-                                }
-                              }
+                              "computed": true
                             }
-                          ]
+                          }
                         },
                         {
-                          "type": "ReturnStatement",
-                          "start": 4390,
-                          "end": 4429,
+                          "type": "ExpressionStatement",
+                          "start": 4761,
+                          "end": 4781,
                           "loc": {
                             "start": {
-                              "line": 158,
+                              "line": 174,
                               "column": 3
                             },
                             "end": {
-                              "line": 158,
-                              "column": 42
+                              "line": 174,
+                              "column": 23
                             }
                           },
-                          "argument": {
-                            "type": "BinaryExpression",
-                            "start": 4397,
-                            "end": 4429,
+                          "expression": {
+                            "type": "AssignmentExpression",
+                            "start": 4761,
+                            "end": 4781,
                             "loc": {
                               "start": {
-                                "line": 158,
-                                "column": 10
+                                "line": 174,
+                                "column": 3
                               },
                               "end": {
-                                "line": 158,
-                                "column": 42
+                                "line": 174,
+                                "column": 23
                               }
                             },
+                            "operator": "=",
                             "left": {
+                              "type": "Identifier",
+                              "start": 4761,
+                              "end": 4765,
+                              "loc": {
+                                "start": {
+                                  "line": 174,
+                                  "column": 3
+                                },
+                                "end": {
+                                  "line": 174,
+                                  "column": 7
+                                },
+                                "identifierName": "rest"
+                              },
+                              "name": "rest"
+                            },
+                            "right": {
                               "type": "CallExpression",
-                              "start": 4397,
-                              "end": 4425,
+                              "start": 4768,
+                              "end": 4781,
                               "loc": {
                                 "start": {
-                                  "line": 158,
+                                  "line": 174,
                                   "column": 10
                                 },
                                 "end": {
-                                  "line": 158,
-                                  "column": 38
+                                  "line": 174,
+                                  "column": 23
                                 }
                               },
                               "callee": {
                                 "type": "MemberExpression",
-                                "start": 4397,
-                                "end": 4414,
+                                "start": 4768,
+                                "end": 4778,
                                 "loc": {
                                   "start": {
-                                    "line": 158,
+                                    "line": 174,
                                     "column": 10
                                   },
                                   "end": {
-                                    "line": 158,
-                                    "column": 27
+                                    "line": 174,
+                                    "column": 20
                                   }
                                 },
                                 "object": {
-                                  "type": "MemberExpression",
-                                  "start": 4397,
-                                  "end": 4409,
+                                  "type": "Identifier",
+                                  "start": 4768,
+                                  "end": 4772,
                                   "loc": {
                                     "start": {
-                                      "line": 158,
+                                      "line": 174,
                                       "column": 10
                                     },
                                     "end": {
-                                      "line": 158,
-                                      "column": 22
-                                    }
-                                  },
-                                  "object": {
-                                    "type": "ThisExpression",
-                                    "start": 4397,
-                                    "end": 4401,
-                                    "loc": {
-                                      "start": {
-                                        "line": 158,
-                                        "column": 10
-                                      },
-                                      "end": {
-                                        "line": 158,
-                                        "column": 14
-                                      }
-                                    },
-                                    "leadingComments": null
-                                  },
-                                  "property": {
-                                    "type": "Identifier",
-                                    "start": 4402,
-                                    "end": 4409,
-                                    "loc": {
-                                      "start": {
-                                        "line": 158,
-                                        "column": 15
-                                      },
-                                      "end": {
-                                        "line": 158,
-                                        "column": 22
-                                      },
-                                      "identifierName": "systems"
+                                      "line": 174,
+                                      "column": 14
                                     },
-                                    "name": "systems"
+                                    "identifierName": "args"
                                   },
-                                  "computed": false,
-                                  "leadingComments": null
+                                  "name": "args"
                                 },
                                 "property": {
                                   "type": "Identifier",
-                                  "start": 4410,
-                                  "end": 4414,
+                                  "start": 4773,
+                                  "end": 4778,
                                   "loc": {
                                     "start": {
-                                      "line": 158,
-                                      "column": 23
+                                      "line": 174,
+                                      "column": 15
                                     },
                                     "end": {
-                                      "line": 158,
-                                      "column": 27
+                                      "line": 174,
+                                      "column": 20
                                     },
-                                    "identifierName": "push"
+                                    "identifierName": "slice"
                                   },
-                                  "name": "push"
+                                  "name": "slice"
                                 },
-                                "computed": false,
-                                "leadingComments": null
+                                "computed": false
                               },
                               "arguments": [
                                 {
-                                  "type": "Identifier",
-                                  "start": 4415,
-                                  "end": 4424,
+                                  "type": "NumericLiteral",
+                                  "start": 4779,
+                                  "end": 4780,
                                   "loc": {
                                     "start": {
-                                      "line": 158,
-                                      "column": 28
+                                      "line": 174,
+                                      "column": 21
                                     },
                                     "end": {
-                                      "line": 158,
-                                      "column": 37
-                                    },
-                                    "identifierName": "newSystem"
+                                      "line": 174,
+                                      "column": 22
+                                    }
                                   },
-                                  "name": "newSystem"
+                                  "extra": {
+                                    "rawValue": 2,
+                                    "raw": "2"
+                                  },
+                                  "value": 2
                                 }
-                              ],
-                              "leadingComments": null
+                              ]
+                            }
+                          }
+                        }
+                      ],
+                      "directives": []
+                    },
+                    "alternate": {
+                      "type": "BlockStatement",
+                      "start": 4791,
+                      "end": 4845,
+                      "loc": {
+                        "start": {
+                          "line": 175,
+                          "column": 9
+                        },
+                        "end": {
+                          "line": 178,
+                          "column": 3
+                        }
+                      },
+                      "body": [
+                        {
+                          "type": "ExpressionStatement",
+                          "start": 4796,
+                          "end": 4817,
+                          "loc": {
+                            "start": {
+                              "line": 176,
+                              "column": 3
                             },
-                            "operator": "-",
-                            "right": {
-                              "type": "NumericLiteral",
-                              "start": 4428,
-                              "end": 4429,
-                              "loc": {
-                                "start": {
-                                  "line": 158,
-                                  "column": 41
-                                },
-                                "end": {
-                                  "line": 158,
-                                  "column": 42
+                            "end": {
+                              "line": 176,
+                              "column": 24
+                            }
+                          },
+                          "expression": {
+                            "type": "AssignmentExpression",
+                            "start": 4796,
+                            "end": 4817,
+                            "loc": {
+                              "start": {
+                                "line": 176,
+                                "column": 3
+                              },
+                              "end": {
+                                "line": 176,
+                                "column": 24
+                              }
+                            },
+                            "operator": "=",
+                            "left": {
+                              "type": "Identifier",
+                              "start": 4796,
+                              "end": 4807,
+                              "loc": {
+                                "start": {
+                                  "line": 176,
+                                  "column": 3
+                                },
+                                "end": {
+                                  "line": 176,
+                                  "column": 14
+                                },
+                                "identifierName": "systemClass"
+                              },
+                              "name": "systemClass"
+                            },
+                            "right": {
+                              "type": "MemberExpression",
+                              "start": 4810,
+                              "end": 4817,
+                              "loc": {
+                                "start": {
+                                  "line": 176,
+                                  "column": 17
+                                },
+                                "end": {
+                                  "line": 176,
+                                  "column": 24
                                 }
                               },
-                              "extra": {
-                                "rawValue": 1,
-                                "raw": "1"
+                              "object": {
+                                "type": "Identifier",
+                                "start": 4810,
+                                "end": 4814,
+                                "loc": {
+                                  "start": {
+                                    "line": 176,
+                                    "column": 17
+                                  },
+                                  "end": {
+                                    "line": 176,
+                                    "column": 21
+                                  },
+                                  "identifierName": "args"
+                                },
+                                "name": "args"
                               },
-                              "value": 1
+                              "property": {
+                                "type": "NumericLiteral",
+                                "start": 4815,
+                                "end": 4816,
+                                "loc": {
+                                  "start": {
+                                    "line": 176,
+                                    "column": 22
+                                  },
+                                  "end": {
+                                    "line": 176,
+                                    "column": 23
+                                  }
+                                },
+                                "extra": {
+                                  "rawValue": 0,
+                                  "raw": "0"
+                                },
+                                "value": 0
+                              },
+                              "computed": true
+                            }
+                          }
+                        },
+                        {
+                          "type": "ExpressionStatement",
+                          "start": 4821,
+                          "end": 4841,
+                          "loc": {
+                            "start": {
+                              "line": 177,
+                              "column": 3
                             },
-                            "leadingComments": null
+                            "end": {
+                              "line": 177,
+                              "column": 23
+                            }
                           },
-                          "leadingComments": [
-                            {
-                              "type": "CommentLine",
-                              "value": " Add the system, return its ID",
-                              "start": 4354,
-                              "end": 4386,
+                          "expression": {
+                            "type": "AssignmentExpression",
+                            "start": 4821,
+                            "end": 4841,
+                            "loc": {
+                              "start": {
+                                "line": 177,
+                                "column": 3
+                              },
+                              "end": {
+                                "line": 177,
+                                "column": 23
+                              }
+                            },
+                            "operator": "=",
+                            "left": {
+                              "type": "Identifier",
+                              "start": 4821,
+                              "end": 4825,
                               "loc": {
                                 "start": {
-                                  "line": 157,
+                                  "line": 177,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 157,
-                                  "column": 35
+                                  "line": 177,
+                                  "column": 7
+                                },
+                                "identifierName": "rest"
+                              },
+                              "name": "rest"
+                            },
+                            "right": {
+                              "type": "CallExpression",
+                              "start": 4828,
+                              "end": 4841,
+                              "loc": {
+                                "start": {
+                                  "line": 177,
+                                  "column": 10
+                                },
+                                "end": {
+                                  "line": 177,
+                                  "column": 23
                                 }
-                              }
+                              },
+                              "callee": {
+                                "type": "MemberExpression",
+                                "start": 4828,
+                                "end": 4838,
+                                "loc": {
+                                  "start": {
+                                    "line": 177,
+                                    "column": 10
+                                  },
+                                  "end": {
+                                    "line": 177,
+                                    "column": 20
+                                  }
+                                },
+                                "object": {
+                                  "type": "Identifier",
+                                  "start": 4828,
+                                  "end": 4832,
+                                  "loc": {
+                                    "start": {
+                                      "line": 177,
+                                      "column": 10
+                                    },
+                                    "end": {
+                                      "line": 177,
+                                      "column": 14
+                                    },
+                                    "identifierName": "args"
+                                  },
+                                  "name": "args"
+                                },
+                                "property": {
+                                  "type": "Identifier",
+                                  "start": 4833,
+                                  "end": 4838,
+                                  "loc": {
+                                    "start": {
+                                      "line": 177,
+                                      "column": 15
+                                    },
+                                    "end": {
+                                      "line": 177,
+                                      "column": 20
+                                    },
+                                    "identifierName": "slice"
+                                  },
+                                  "name": "slice"
+                                },
+                                "computed": false
+                              },
+                              "arguments": [
+                                {
+                                  "type": "NumericLiteral",
+                                  "start": 4839,
+                                  "end": 4840,
+                                  "loc": {
+                                    "start": {
+                                      "line": 177,
+                                      "column": 21
+                                    },
+                                    "end": {
+                                      "line": 177,
+                                      "column": 22
+                                    }
+                                  },
+                                  "extra": {
+                                    "rawValue": 1,
+                                    "raw": "1"
+                                  },
+                                  "value": 1
+                                }
+                              ]
                             }
-                          ]
+                          }
                         }
                       ],
-                      "directives": []
+                      "directives": [],
+                      "trailingComments": null
                     },
-                    "alternate": null,
-                    "leadingComments": [
+                    "trailingComments": [
                       {
                         "type": "CommentLine",
-                        "value": " TODO: Make components optional, and parameters more dynamic by only using ...args",
-                        "start": 4092,
-                        "end": 4176,
+                        "value": " Make sure the system is valid",
+                        "start": 4849,
+                        "end": 4881,
                         "loc": {
                           "start": {
-                            "line": 151,
+                            "line": 180,
                             "column": 2
                           },
                           "end": {
-                            "line": 151,
-                            "column": 86
+                            "line": 180,
+                            "column": 34
                           }
                         }
                       }
                     ]
                   },
                   {
-                    "type": "ReturnStatement",
-                    "start": 4436,
-                    "end": 4452,
+                    "type": "IfStatement",
+                    "start": 4884,
+                    "end": 5138,
                     "loc": {
                       "start": {
-                        "line": 160,
+                        "line": 181,
                         "column": 2
                       },
                       "end": {
-                        "line": 160,
-                        "column": 18
+                        "line": 188,
+                        "column": 3
                       }
                     },
-                    "argument": {
-                      "type": "Identifier",
-                      "start": 4443,
-                      "end": 4452,
+                    "test": {
+                      "type": "CallExpression",
+                      "start": 4888,
+                      "end": 4911,
                       "loc": {
                         "start": {
-                          "line": 160,
-                          "column": 9
+                          "line": 181,
+                          "column": 6
                         },
                         "end": {
-                          "line": 160,
-                          "column": 18
+                          "line": 181,
+                          "column": 29
+                        }
+                      },
+                      "callee": {
+                        "type": "Identifier",
+                        "start": 4888,
+                        "end": 4898,
+                        "loc": {
+                          "start": {
+                            "line": 181,
+                            "column": 6
+                          },
+                          "end": {
+                            "line": 181,
+                            "column": 16
+                          },
+                          "identifierName": "isFunction"
                         },
-                        "identifierName": "undefined"
+                        "name": "isFunction",
+                        "leadingComments": null
                       },
-                      "name": "undefined"
-                    }
-                  }
-                ],
-                "directives": [],
-                "trailingComments": null
-              },
-              "leadingComments": [
-                {
-                  "type": "CommentBlock",
-                  "value": "*\n\t * Registers a system to the world.\n\t * The order the systems get registered, is the order then run in.\n\t *\n\t * @example\n\t * // Movement system\n\t * world.system(['position', 'velocity'], class {\n\t *      every(position, velocity, entity) {\n\t *          position.x += velocity.x\n\t *          position.y += velocity.y\n\t *      }\n\t *  })\n\t *\n\t * @param {Array}     components  - The list of components the system will process in every(). This follows the same logic as entity.has() and world.every().\n\t * @param {Function}  systemClass - The system class to instantiate. Can contain the following methods: constructor, initialize,\n\t * pre, every, post. Pre() and post() get called before and after every(), for each of the independent systems. See world.run()\n\t * for an example of the call order.\n\t * @param {...Object} [args]      - The arguments to forward to the system's constructors\n\t *\n\t * @return {number} Unique ID of the system on success or undefined on failure\n\t ",
-                  "start": 3066,
-                  "end": 4045,
-                  "loc": {
-                    "start": {
-                      "line": 129,
-                      "column": 1
-                    },
-                    "end": {
-                      "line": 149,
-                      "column": 4
-                    }
-                  }
-                }
-              ],
-              "trailingComments": [
-                {
-                  "type": "CommentBlock",
-                  "value": "*\n\t * Calls initialize() on all systems\n\t *\n\t * @example\n\t * world.initialize(renderContext)\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' initialize() methods\n\t ",
-                  "start": 4458,
-                  "end": 4655,
-                  "loc": {
-                    "start": {
-                      "line": 163,
-                      "column": 1
+                      "arguments": [
+                        {
+                          "type": "Identifier",
+                          "start": 4899,
+                          "end": 4910,
+                          "loc": {
+                            "start": {
+                              "line": 181,
+                              "column": 17
+                            },
+                            "end": {
+                              "line": 181,
+                              "column": 28
+                            },
+                            "identifierName": "systemClass"
+                          },
+                          "name": "systemClass"
+                        }
+                      ],
+                      "leadingComments": null
                     },
-                    "end": {
-                      "line": 170,
-                      "column": 4
-                    }
-                  }
-                }
-              ]
-            },
-            {
-              "type": "ClassMethod",
-              "start": 4657,
-              "end": 4763,
-              "loc": {
-                "start": {
-                  "line": 171,
-                  "column": 1
-                },
-                "end": {
-                  "line": 175,
-                  "column": 2
-                }
-              },
-              "static": false,
-              "computed": false,
-              "key": {
-                "type": "Identifier",
-                "start": 4657,
-                "end": 4667,
-                "loc": {
-                  "start": {
-                    "line": 171,
-                    "column": 1
-                  },
-                  "end": {
-                    "line": 171,
-                    "column": 11
-                  },
-                  "identifierName": "initialize"
-                },
-                "name": "initialize",
-                "leadingComments": null
-              },
-              "kind": "method",
-              "id": null,
-              "generator": false,
-              "expression": false,
-              "async": false,
-              "params": [
-                {
-                  "type": "RestElement",
-                  "start": 4668,
-                  "end": 4675,
-                  "loc": {
-                    "start": {
-                      "line": 171,
-                      "column": 12
-                    },
-                    "end": {
-                      "line": 171,
-                      "column": 19
-                    }
-                  },
-                  "argument": {
-                    "type": "Identifier",
-                    "start": 4671,
-                    "end": 4675,
-                    "loc": {
-                      "start": {
-                        "line": 171,
-                        "column": 15
-                      },
-                      "end": {
-                        "line": 171,
-                        "column": 19
-                      },
-                      "identifierName": "args"
-                    },
-                    "name": "args"
-                  }
-                }
-              ],
-              "body": {
-                "type": "BlockStatement",
-                "start": 4677,
-                "end": 4763,
-                "loc": {
-                  "start": {
-                    "line": 171,
-                    "column": 21
-                  },
-                  "end": {
-                    "line": 175,
-                    "column": 2
-                  }
-                },
-                "body": [
-                  {
-                    "type": "ForOfStatement",
-                    "start": 4681,
-                    "end": 4760,
-                    "loc": {
-                      "start": {
-                        "line": 172,
-                        "column": 2
-                      },
-                      "end": {
-                        "line": 174,
-                        "column": 3
-                      }
-                    },
-                    "left": {
-                      "type": "VariableDeclaration",
-                      "start": 4686,
-                      "end": 4696,
-                      "loc": {
-                        "start": {
-                          "line": 172,
-                          "column": 7
-                        },
-                        "end": {
-                          "line": 172,
-                          "column": 17
-                        }
-                      },
-                      "declarations": [
-                        {
-                          "type": "VariableDeclarator",
-                          "start": 4690,
-                          "end": 4696,
-                          "loc": {
-                            "start": {
-                              "line": 172,
-                              "column": 11
-                            },
-                            "end": {
-                              "line": 172,
-                              "column": 17
-                            }
-                          },
-                          "id": {
-                            "type": "Identifier",
-                            "start": 4690,
-                            "end": 4696,
-                            "loc": {
-                              "start": {
-                                "line": 172,
-                                "column": 11
-                              },
-                              "end": {
-                                "line": 172,
-                                "column": 17
-                              },
-                              "identifierName": "system"
-                            },
-                            "name": "system"
-                          },
-                          "init": null
-                        }
-                      ],
-                      "kind": "let"
-                    },
-                    "right": {
-                      "type": "MemberExpression",
-                      "start": 4700,
-                      "end": 4712,
-                      "loc": {
-                        "start": {
-                          "line": 172,
-                          "column": 21
-                        },
-                        "end": {
-                          "line": 172,
-                          "column": 33
-                        }
-                      },
-                      "object": {
-                        "type": "ThisExpression",
-                        "start": 4700,
-                        "end": 4704,
-                        "loc": {
-                          "start": {
-                            "line": 172,
-                            "column": 21
-                          },
-                          "end": {
-                            "line": 172,
-                            "column": 25
-                          }
-                        }
-                      },
-                      "property": {
-                        "type": "Identifier",
-                        "start": 4705,
-                        "end": 4712,
-                        "loc": {
-                          "start": {
-                            "line": 172,
-                            "column": 26
-                          },
-                          "end": {
-                            "line": 172,
-                            "column": 33
-                          },
-                          "identifierName": "systems"
-                        },
-                        "name": "systems"
-                      },
-                      "computed": false
-                    },
-                    "body": {
+                    "consequent": {
                       "type": "BlockStatement",
-                      "start": 4714,
-                      "end": 4760,
+                      "start": 4913,
+                      "end": 5138,
                       "loc": {
                         "start": {
-                          "line": 172,
-                          "column": 35
+                          "line": 181,
+                          "column": 31
                         },
                         "end": {
-                          "line": 174,
+                          "line": 188,
                           "column": 3
                         }
                       },
                       "body": [
                         {
-                          "type": "ExpressionStatement",
-                          "start": 4719,
-                          "end": 4756,
+                          "type": "VariableDeclaration",
+                          "start": 4977,
+                          "end": 5017,
                           "loc": {
                             "start": {
-                              "line": 173,
+                              "line": 183,
                               "column": 3
                             },
                             "end": {
-                              "line": 173,
-                              "column": 40
+                              "line": 183,
+                              "column": 43
                             }
                           },
-                          "expression": {
-                            "type": "CallExpression",
-                            "start": 4719,
-                            "end": 4756,
-                            "loc": {
-                              "start": {
-                                "line": 173,
-                                "column": 3
-                              },
-                              "end": {
-                                "line": 173,
-                                "column": 40
-                              }
-                            },
-                            "callee": {
-                              "type": "Identifier",
-                              "start": 4719,
-                              "end": 4725,
+                          "declarations": [
+                            {
+                              "type": "VariableDeclarator",
+                              "start": 4981,
+                              "end": 5017,
                               "loc": {
                                 "start": {
-                                  "line": 173,
-                                  "column": 3
+                                  "line": 183,
+                                  "column": 7
                                 },
                                 "end": {
-                                  "line": 173,
-                                  "column": 9
-                                },
-                                "identifierName": "invoke"
+                                  "line": 183,
+                                  "column": 43
+                                }
                               },
-                              "name": "invoke"
-                            },
-                            "arguments": [
-                              {
+                              "id": {
                                 "type": "Identifier",
-                                "start": 4726,
-                                "end": 4732,
+                                "start": 4981,
+                                "end": 4990,
                                 "loc": {
                                   "start": {
-                                    "line": 173,
-                                    "column": 10
+                                    "line": 183,
+                                    "column": 7
                                   },
                                   "end": {
-                                    "line": 173,
+                                    "line": 183,
                                     "column": 16
                                   },
-                                  "identifierName": "system"
-                                },
-                                "name": "system"
-                              },
-                              {
-                                "type": "StringLiteral",
-                                "start": 4734,
-                                "end": 4746,
-                                "loc": {
-                                  "start": {
-                                    "line": 173,
-                                    "column": 18
-                                  },
-                                  "end": {
-                                    "line": 173,
-                                    "column": 30
-                                  }
-                                },
-                                "extra": {
-                                  "rawValue": "initialize",
-                                  "raw": "'initialize'"
+                                  "identifierName": "newSystem"
                                 },
-                                "value": "initialize"
+                                "name": "newSystem",
+                                "leadingComments": null
                               },
-                              {
-                                "type": "SpreadElement",
-                                "start": 4748,
-                                "end": 4755,
+                              "init": {
+                                "type": "NewExpression",
+                                "start": 4993,
+                                "end": 5017,
                                 "loc": {
                                   "start": {
-                                    "line": 173,
-                                    "column": 32
+                                    "line": 183,
+                                    "column": 19
                                   },
                                   "end": {
-                                    "line": 173,
-                                    "column": 39
+                                    "line": 183,
+                                    "column": 43
                                   }
                                 },
-                                "argument": {
+                                "callee": {
                                   "type": "Identifier",
-                                  "start": 4751,
-                                  "end": 4755,
+                                  "start": 4997,
+                                  "end": 5008,
                                   "loc": {
                                     "start": {
-                                      "line": 173,
-                                      "column": 35
+                                      "line": 183,
+                                      "column": 23
                                     },
                                     "end": {
-                                      "line": 173,
-                                      "column": 39
+                                      "line": 183,
+                                      "column": 34
                                     },
-                                    "identifierName": "args"
+                                    "identifierName": "systemClass"
                                   },
-                                  "name": "args"
-                                }
-                              }
-                            ]
-                          }
-                        }
-                      ],
-                      "directives": []
-                    }
-                  }
-                ],
-                "directives": [],
-                "trailingComments": null
-              },
-              "leadingComments": [
-                {
-                  "type": "CommentBlock",
-                  "value": "*\n\t * Calls initialize() on all systems\n\t *\n\t * @example\n\t * world.initialize(renderContext)\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' initialize() methods\n\t ",
-                  "start": 4458,
-                  "end": 4655,
-                  "loc": {
-                    "start": {
-                      "line": 163,
-                      "column": 1
-                    },
-                    "end": {
-                      "line": 170,
-                      "column": 4
-                    }
-                  }
-                }
-              ],
-              "trailingComments": [
-                {
-                  "type": "CommentBlock",
-                  "value": "*\n\t * Calls pre(), every(), and post() on all systems\n\t *\n\t * @example\n\t * world.run(deltaTime)\n\t *\n\t * @example\n\t * // Example flow of method call order:\n\t * // Setup systems:\n\t * world.system([], systemA)\n\t * world.system([], systemB)\n\t * // During world.run():\n\t * // systemA.pre()\n\t * // systemA.every() * number of entities\n\t * // systemA.post()\n\t * // systemB.pre()\n\t * // systemB.every() * number of entities\n\t * // systemB.post()\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' methods\n\t ",
-                  "start": 4766,
-                  "end": 5295,
-                  "loc": {
-                    "start": {
-                      "line": 177,
-                      "column": 1
-                    },
-                    "end": {
-                      "line": 197,
-                      "column": 4
-                    }
-                  }
-                }
-              ]
-            },
-            {
-              "type": "ClassMethod",
-              "start": 5297,
-              "end": 5579,
-              "loc": {
-                "start": {
-                  "line": 198,
-                  "column": 1
-                },
-                "end": {
-                  "line": 209,
-                  "column": 2
-                }
-              },
-              "static": false,
-              "computed": false,
-              "key": {
-                "type": "Identifier",
-                "start": 5297,
-                "end": 5300,
-                "loc": {
-                  "start": {
-                    "line": 198,
-                    "column": 1
-                  },
-                  "end": {
-                    "line": 198,
-                    "column": 4
-                  },
-                  "identifierName": "run"
-                },
-                "name": "run",
-                "leadingComments": null
-              },
-              "kind": "method",
-              "id": null,
-              "generator": false,
-              "expression": false,
-              "async": false,
-              "params": [
-                {
-                  "type": "RestElement",
-                  "start": 5301,
-                  "end": 5308,
-                  "loc": {
-                    "start": {
-                      "line": 198,
-                      "column": 5
-                    },
-                    "end": {
-                      "line": 198,
-                      "column": 12
-                    }
-                  },
-                  "argument": {
-                    "type": "Identifier",
-                    "start": 5304,
-                    "end": 5308,
-                    "loc": {
-                      "start": {
-                        "line": 198,
-                        "column": 8
-                      },
-                      "end": {
-                        "line": 198,
-                        "column": 12
-                      },
-                      "identifierName": "args"
-                    },
-                    "name": "args"
-                  }
-                }
-              ],
-              "body": {
-                "type": "BlockStatement",
-                "start": 5310,
-                "end": 5579,
-                "loc": {
-                  "start": {
-                    "line": 198,
-                    "column": 14
-                  },
-                  "end": {
-                    "line": 209,
-                    "column": 2
-                  }
-                },
-                "body": [
-                  {
-                    "type": "ForOfStatement",
-                    "start": 5314,
-                    "end": 5576,
-                    "loc": {
-                      "start": {
-                        "line": 199,
-                        "column": 2
-                      },
-                      "end": {
-                        "line": 208,
-                        "column": 3
-                      }
-                    },
-                    "left": {
-                      "type": "VariableDeclaration",
-                      "start": 5319,
-                      "end": 5329,
-                      "loc": {
-                        "start": {
-                          "line": 199,
-                          "column": 7
-                        },
-                        "end": {
-                          "line": 199,
-                          "column": 17
-                        }
-                      },
-                      "declarations": [
-                        {
-                          "type": "VariableDeclarator",
-                          "start": 5323,
-                          "end": 5329,
-                          "loc": {
-                            "start": {
-                              "line": 199,
-                              "column": 11
-                            },
-                            "end": {
-                              "line": 199,
-                              "column": 17
-                            }
-                          },
-                          "id": {
-                            "type": "Identifier",
-                            "start": 5323,
-                            "end": 5329,
-                            "loc": {
-                              "start": {
-                                "line": 199,
-                                "column": 11
-                              },
-                              "end": {
-                                "line": 199,
-                                "column": 17
+                                  "name": "systemClass"
+                                },
+                                "arguments": [
+                                  {
+                                    "type": "SpreadElement",
+                                    "start": 5009,
+                                    "end": 5016,
+                                    "loc": {
+                                      "start": {
+                                        "line": 183,
+                                        "column": 35
+                                      },
+                                      "end": {
+                                        "line": 183,
+                                        "column": 42
+                                      }
+                                    },
+                                    "argument": {
+                                      "type": "Identifier",
+                                      "start": 5012,
+                                      "end": 5016,
+                                      "loc": {
+                                        "start": {
+                                          "line": 183,
+                                          "column": 38
+                                        },
+                                        "end": {
+                                          "line": 183,
+                                          "column": 42
+                                        },
+                                        "identifierName": "rest"
+                                      },
+                                      "name": "rest"
+                                    }
+                                  }
+                                ]
                               },
-                              "identifierName": "system"
-                            },
-                            "name": "system"
-                          },
-                          "init": null
-                        }
-                      ],
-                      "kind": "let"
-                    },
-                    "right": {
-                      "type": "MemberExpression",
-                      "start": 5333,
-                      "end": 5345,
-                      "loc": {
-                        "start": {
-                          "line": 199,
-                          "column": 21
-                        },
-                        "end": {
-                          "line": 199,
-                          "column": 33
-                        }
-                      },
-                      "object": {
-                        "type": "ThisExpression",
-                        "start": 5333,
-                        "end": 5337,
-                        "loc": {
-                          "start": {
-                            "line": 199,
-                            "column": 21
-                          },
-                          "end": {
-                            "line": 199,
-                            "column": 25
-                          }
-                        }
-                      },
-                      "property": {
-                        "type": "Identifier",
-                        "start": 5338,
-                        "end": 5345,
-                        "loc": {
-                          "start": {
-                            "line": 199,
-                            "column": 26
-                          },
-                          "end": {
-                            "line": 199,
-                            "column": 33
-                          },
-                          "identifierName": "systems"
-                        },
-                        "name": "systems"
-                      },
-                      "computed": false
-                    },
-                    "body": {
-                      "type": "BlockStatement",
-                      "start": 5347,
-                      "end": 5576,
-                      "loc": {
-                        "start": {
-                          "line": 199,
-                          "column": 35
+                              "leadingComments": null
+                            }
+                          ],
+                          "kind": "let",
+                          "leadingComments": [
+                            {
+                              "type": "CommentLine",
+                              "value": " Create the system, and set the component array query",
+                              "start": 4918,
+                              "end": 4973,
+                              "loc": {
+                                "start": {
+                                  "line": 182,
+                                  "column": 3
+                                },
+                                "end": {
+                                  "line": 182,
+                                  "column": 58
+                                }
+                              }
+                            }
+                          ]
                         },
-                        "end": {
-                          "line": 208,
-                          "column": 3
-                        }
-                      },
-                      "body": [
                         {
                           "type": "ExpressionStatement",
-                          "start": 5352,
-                          "end": 5382,
+                          "start": 5021,
+                          "end": 5054,
                           "loc": {
                             "start": {
-                              "line": 200,
+                              "line": 184,
                               "column": 3
                             },
                             "end": {
-                              "line": 200,
-                              "column": 33
+                              "line": 184,
+                              "column": 36
                             }
                           },
                           "expression": {
-                            "type": "CallExpression",
-                            "start": 5352,
-                            "end": 5382,
+                            "type": "AssignmentExpression",
+                            "start": 5021,
+                            "end": 5054,
                             "loc": {
                               "start": {
-                                "line": 200,
+                                "line": 184,
                                 "column": 3
                               },
                               "end": {
-                                "line": 200,
-                                "column": 33
+                                "line": 184,
+                                "column": 36
                               }
                             },
-                            "callee": {
-                              "type": "Identifier",
-                              "start": 5352,
-                              "end": 5358,
+                            "operator": "=",
+                            "left": {
+                              "type": "MemberExpression",
+                              "start": 5021,
+                              "end": 5041,
                               "loc": {
                                 "start": {
-                                  "line": 200,
+                                  "line": 184,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 200,
-                                  "column": 9
-                                },
-                                "identifierName": "invoke"
+                                  "line": 184,
+                                  "column": 23
+                                }
                               },
-                              "name": "invoke"
-                            },
-                            "arguments": [
-                              {
+                              "object": {
                                 "type": "Identifier",
-                                "start": 5359,
-                                "end": 5365,
+                                "start": 5021,
+                                "end": 5030,
                                 "loc": {
                                   "start": {
-                                    "line": 200,
-                                    "column": 10
+                                    "line": 184,
+                                    "column": 3
                                   },
                                   "end": {
-                                    "line": 200,
-                                    "column": 16
+                                    "line": 184,
+                                    "column": 12
                                   },
-                                  "identifierName": "system"
+                                  "identifierName": "newSystem"
                                 },
-                                "name": "system"
+                                "name": "newSystem"
                               },
-                              {
-                                "type": "StringLiteral",
-                                "start": 5367,
-                                "end": 5372,
+                              "property": {
+                                "type": "Identifier",
+                                "start": 5031,
+                                "end": 5041,
                                 "loc": {
                                   "start": {
-                                    "line": 200,
-                                    "column": 18
+                                    "line": 184,
+                                    "column": 13
                                   },
                                   "end": {
-                                    "line": 200,
+                                    "line": 184,
                                     "column": 23
-                                  }
-                                },
-                                "extra": {
-                                  "rawValue": "pre",
-                                  "raw": "'pre'"
+                                  },
+                                  "identifierName": "components"
                                 },
-                                "value": "pre"
+                                "name": "components"
                               },
-                              {
-                                "type": "SpreadElement",
-                                "start": 5374,
-                                "end": 5381,
-                                "loc": {
-                                  "start": {
-                                    "line": 200,
-                                    "column": 25
-                                  },
-                                  "end": {
-                                    "line": 200,
-                                    "column": 32
-                                  }
+                              "computed": false
+                            },
+                            "right": {
+                              "type": "Identifier",
+                              "start": 5044,
+                              "end": 5054,
+                              "loc": {
+                                "start": {
+                                  "line": 184,
+                                  "column": 26
                                 },
-                                "argument": {
-                                  "type": "Identifier",
-                                  "start": 5377,
-                                  "end": 5381,
-                                  "loc": {
-                                    "start": {
-                                      "line": 200,
-                                      "column": 28
-                                    },
-                                    "end": {
-                                      "line": 200,
-                                      "column": 32
-                                    },
-                                    "identifierName": "args"
-                                  },
-                                  "name": "args"
-                                }
-                              }
-                            ],
+                                "end": {
+                                  "line": 184,
+                                  "column": 36
+                                },
+                                "identifierName": "components"
+                              },
+                              "name": "components",
+                              "leadingComments": null,
+                              "trailingComments": null
+                            },
                             "trailingComments": null
                           },
                           "trailingComments": [
                             {
                               "type": "CommentLine",
-                              "value": " Run the \"every\" method in the system",
-                              "start": 5387,
-                              "end": 5426,
+                              "value": " Add the system, return its ID",
+                              "start": 5059,
+                              "end": 5091,
                               "loc": {
                                 "start": {
-                                  "line": 202,
+                                  "line": 186,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 202,
-                                  "column": 42
+                                  "line": 186,
+                                  "column": 35
                                 }
                               }
                             }
                           ]
                         },
                         {
-                          "type": "IfStatement",
-                          "start": 5430,
-                          "end": 5536,
+                          "type": "ReturnStatement",
+                          "start": 5095,
+                          "end": 5134,
                           "loc": {
                             "start": {
-                              "line": 203,
+                              "line": 187,
                               "column": 3
                             },
                             "end": {
-                              "line": 205,
-                              "column": 4
+                              "line": 187,
+                              "column": 42
                             }
                           },
-                          "test": {
-                            "type": "CallExpression",
-                            "start": 5434,
-                            "end": 5458,
+                          "argument": {
+                            "type": "BinaryExpression",
+                            "start": 5102,
+                            "end": 5134,
                             "loc": {
                               "start": {
-                                "line": 203,
-                                "column": 7
+                                "line": 187,
+                                "column": 10
                               },
                               "end": {
-                                "line": 203,
-                                "column": 31
+                                "line": 187,
+                                "column": 42
                               }
                             },
-                            "callee": {
-                              "type": "Identifier",
-                              "start": 5434,
-                              "end": 5444,
+                            "left": {
+                              "type": "CallExpression",
+                              "start": 5102,
+                              "end": 5130,
                               "loc": {
                                 "start": {
-                                  "line": 203,
-                                  "column": 7
+                                  "line": 187,
+                                  "column": 10
                                 },
                                 "end": {
-                                  "line": 203,
-                                  "column": 17
-                                },
-                                "identifierName": "isFunction"
+                                  "line": 187,
+                                  "column": 38
+                                }
                               },
-                              "name": "isFunction",
-                              "leadingComments": null
-                            },
-                            "arguments": [
-                              {
+                              "callee": {
                                 "type": "MemberExpression",
-                                "start": 5445,
-                                "end": 5457,
+                                "start": 5102,
+                                "end": 5119,
                                 "loc": {
                                   "start": {
-                                    "line": 203,
-                                    "column": 18
+                                    "line": 187,
+                                    "column": 10
                                   },
                                   "end": {
-                                    "line": 203,
-                                    "column": 30
+                                    "line": 187,
+                                    "column": 27
                                   }
                                 },
                                 "object": {
-                                  "type": "Identifier",
-                                  "start": 5445,
-                                  "end": 5451,
+                                  "type": "MemberExpression",
+                                  "start": 5102,
+                                  "end": 5114,
                                   "loc": {
                                     "start": {
-                                      "line": 203,
-                                      "column": 18
+                                      "line": 187,
+                                      "column": 10
                                     },
                                     "end": {
-                                      "line": 203,
-                                      "column": 24
+                                      "line": 187,
+                                      "column": 22
+                                    }
+                                  },
+                                  "object": {
+                                    "type": "ThisExpression",
+                                    "start": 5102,
+                                    "end": 5106,
+                                    "loc": {
+                                      "start": {
+                                        "line": 187,
+                                        "column": 10
+                                      },
+                                      "end": {
+                                        "line": 187,
+                                        "column": 14
+                                      }
                                     },
-                                    "identifierName": "system"
+                                    "leadingComments": null
                                   },
-                                  "name": "system"
+                                  "property": {
+                                    "type": "Identifier",
+                                    "start": 5107,
+                                    "end": 5114,
+                                    "loc": {
+                                      "start": {
+                                        "line": 187,
+                                        "column": 15
+                                      },
+                                      "end": {
+                                        "line": 187,
+                                        "column": 22
+                                      },
+                                      "identifierName": "systems"
+                                    },
+                                    "name": "systems"
+                                  },
+                                  "computed": false,
+                                  "leadingComments": null
                                 },
                                 "property": {
                                   "type": "Identifier",
-                                  "start": 5452,
-                                  "end": 5457,
+                                  "start": 5115,
+                                  "end": 5119,
                                   "loc": {
                                     "start": {
-                                      "line": 203,
-                                      "column": 25
+                                      "line": 187,
+                                      "column": 23
                                     },
                                     "end": {
-                                      "line": 203,
-                                      "column": 30
+                                      "line": 187,
+                                      "column": 27
                                     },
-                                    "identifierName": "every"
+                                    "identifierName": "push"
                                   },
-                                  "name": "every"
+                                  "name": "push"
                                 },
-                                "computed": false
-                              }
-                            ],
-                            "leadingComments": null
-                          },
-                          "consequent": {
-                            "type": "BlockStatement",
-                            "start": 5460,
-                            "end": 5536,
-                            "loc": {
-                              "start": {
-                                "line": 203,
-                                "column": 33
+                                "computed": false,
+                                "leadingComments": null
                               },
-                              "end": {
-                                "line": 205,
-                                "column": 4
-                              }
-                            },
-                            "body": [
-                              {
-                                "type": "ExpressionStatement",
-                                "start": 5466,
-                                "end": 5531,
-                                "loc": {
-                                  "start": {
-                                    "line": 204,
-                                    "column": 4
-                                  },
-                                  "end": {
-                                    "line": 204,
-                                    "column": 69
-                                  }
-                                },
-                                "expression": {
-                                  "type": "CallExpression",
-                                  "start": 5466,
-                                  "end": 5531,
+                              "arguments": [
+                                {
+                                  "type": "Identifier",
+                                  "start": 5120,
+                                  "end": 5129,
                                   "loc": {
                                     "start": {
-                                      "line": 204,
-                                      "column": 4
+                                      "line": 187,
+                                      "column": 28
                                     },
                                     "end": {
-                                      "line": 204,
-                                      "column": 69
-                                    }
-                                  },
-                                  "callee": {
-                                    "type": "MemberExpression",
-                                    "start": 5466,
-                                    "end": 5476,
-                                    "loc": {
-                                      "start": {
-                                        "line": 204,
-                                        "column": 4
-                                      },
-                                      "end": {
-                                        "line": 204,
-                                        "column": 14
-                                      }
-                                    },
-                                    "object": {
-                                      "type": "ThisExpression",
-                                      "start": 5466,
-                                      "end": 5470,
-                                      "loc": {
-                                        "start": {
-                                          "line": 204,
-                                          "column": 4
-                                        },
-                                        "end": {
-                                          "line": 204,
-                                          "column": 8
-                                        }
-                                      }
-                                    },
-                                    "property": {
-                                      "type": "Identifier",
-                                      "start": 5471,
-                                      "end": 5476,
-                                      "loc": {
-                                        "start": {
-                                          "line": 204,
-                                          "column": 9
-                                        },
-                                        "end": {
-                                          "line": 204,
-                                          "column": 14
-                                        },
-                                        "identifierName": "every"
-                                      },
-                                      "name": "every"
+                                      "line": 187,
+                                      "column": 37
                                     },
-                                    "computed": false
+                                    "identifierName": "newSystem"
                                   },
-                                  "arguments": [
-                                    {
-                                      "type": "MemberExpression",
-                                      "start": 5477,
-                                      "end": 5494,
-                                      "loc": {
-                                        "start": {
-                                          "line": 204,
-                                          "column": 15
-                                        },
-                                        "end": {
-                                          "line": 204,
-                                          "column": 32
-                                        }
-                                      },
-                                      "object": {
-                                        "type": "Identifier",
-                                        "start": 5477,
-                                        "end": 5483,
-                                        "loc": {
-                                          "start": {
-                                            "line": 204,
-                                            "column": 15
-                                          },
-                                          "end": {
-                                            "line": 204,
-                                            "column": 21
-                                          },
-                                          "identifierName": "system"
-                                        },
-                                        "name": "system"
-                                      },
-                                      "property": {
-                                        "type": "Identifier",
-                                        "start": 5484,
-                                        "end": 5494,
-                                        "loc": {
-                                          "start": {
-                                            "line": 204,
-                                            "column": 22
-                                          },
-                                          "end": {
-                                            "line": 204,
-                                            "column": 32
-                                          },
-                                          "identifierName": "components"
-                                        },
-                                        "name": "components"
-                                      },
-                                      "computed": false
-                                    },
-                                    {
-                                      "type": "CallExpression",
-                                      "start": 5496,
-                                      "end": 5521,
-                                      "loc": {
-                                        "start": {
-                                          "line": 204,
-                                          "column": 34
-                                        },
-                                        "end": {
-                                          "line": 204,
-                                          "column": 59
-                                        }
-                                      },
-                                      "callee": {
-                                        "type": "MemberExpression",
-                                        "start": 5496,
-                                        "end": 5513,
-                                        "loc": {
-                                          "start": {
-                                            "line": 204,
-                                            "column": 34
-                                          },
-                                          "end": {
-                                            "line": 204,
-                                            "column": 51
-                                          }
-                                        },
-                                        "object": {
-                                          "type": "MemberExpression",
-                                          "start": 5496,
-                                          "end": 5508,
-                                          "loc": {
-                                            "start": {
-                                              "line": 204,
-                                              "column": 34
-                                            },
-                                            "end": {
-                                              "line": 204,
-                                              "column": 46
-                                            }
-                                          },
-                                          "object": {
-                                            "type": "Identifier",
-                                            "start": 5496,
-                                            "end": 5502,
-                                            "loc": {
-                                              "start": {
-                                                "line": 204,
-                                                "column": 34
-                                              },
-                                              "end": {
-                                                "line": 204,
-                                                "column": 40
-                                              },
-                                              "identifierName": "system"
-                                            },
-                                            "name": "system"
-                                          },
-                                          "property": {
-                                            "type": "Identifier",
-                                            "start": 5503,
-                                            "end": 5508,
-                                            "loc": {
-                                              "start": {
-                                                "line": 204,
-                                                "column": 41
-                                              },
-                                              "end": {
-                                                "line": 204,
-                                                "column": 46
-                                              },
-                                              "identifierName": "every"
-                                            },
-                                            "name": "every"
-                                          },
-                                          "computed": false
-                                        },
-                                        "property": {
-                                          "type": "Identifier",
-                                          "start": 5509,
-                                          "end": 5513,
-                                          "loc": {
-                                            "start": {
-                                              "line": 204,
-                                              "column": 47
-                                            },
-                                            "end": {
-                                              "line": 204,
-                                              "column": 51
-                                            },
-                                            "identifierName": "bind"
-                                          },
-                                          "name": "bind"
-                                        },
-                                        "computed": false
-                                      },
-                                      "arguments": [
-                                        {
-                                          "type": "Identifier",
-                                          "start": 5514,
-                                          "end": 5520,
-                                          "loc": {
-                                            "start": {
-                                              "line": 204,
-                                              "column": 52
-                                            },
-                                            "end": {
-                                              "line": 204,
-                                              "column": 58
-                                            },
-                                            "identifierName": "system"
-                                          },
-                                          "name": "system"
-                                        }
-                                      ]
-                                    },
-                                    {
-                                      "type": "SpreadElement",
-                                      "start": 5523,
-                                      "end": 5530,
-                                      "loc": {
-                                        "start": {
-                                          "line": 204,
-                                          "column": 61
-                                        },
-                                        "end": {
-                                          "line": 204,
-                                          "column": 68
-                                        }
-                                      },
-                                      "argument": {
-                                        "type": "Identifier",
-                                        "start": 5526,
-                                        "end": 5530,
-                                        "loc": {
-                                          "start": {
-                                            "line": 204,
-                                            "column": 64
-                                          },
-                                          "end": {
-                                            "line": 204,
-                                            "column": 68
-                                          },
-                                          "identifierName": "args"
-                                        },
-                                        "name": "args"
-                                      }
-                                    }
-                                  ]
+                                  "name": "newSystem"
                                 }
-                              }
-                            ],
-                            "directives": []
-                          },
-                          "alternate": null,
-                          "leadingComments": [
-                            {
-                              "type": "CommentLine",
-                              "value": " Run the \"every\" method in the system",
-                              "start": 5387,
-                              "end": 5426,
+                              ],
+                              "leadingComments": null
+                            },
+                            "operator": "-",
+                            "right": {
+                              "type": "NumericLiteral",
+                              "start": 5133,
+                              "end": 5134,
                               "loc": {
                                 "start": {
-                                  "line": 202,
-                                  "column": 3
+                                  "line": 187,
+                                  "column": 41
                                 },
                                 "end": {
-                                  "line": 202,
+                                  "line": 187,
                                   "column": 42
                                 }
-                              }
-                            }
-                          ]
-                        },
-                        {
-                          "type": "ExpressionStatement",
-                          "start": 5541,
-                          "end": 5572,
-                          "loc": {
-                            "start": {
-                              "line": 207,
-                              "column": 3
-                            },
-                            "end": {
-                              "line": 207,
-                              "column": 34
-                            }
-                          },
-                          "expression": {
-                            "type": "CallExpression",
-                            "start": 5541,
-                            "end": 5572,
-                            "loc": {
-                              "start": {
-                                "line": 207,
-                                "column": 3
                               },
-                              "end": {
-                                "line": 207,
-                                "column": 34
-                              }
+                              "extra": {
+                                "rawValue": 1,
+                                "raw": "1"
+                              },
+                              "value": 1
                             },
-                            "callee": {
-                              "type": "Identifier",
-                              "start": 5541,
-                              "end": 5547,
+                            "leadingComments": null
+                          },
+                          "leadingComments": [
+                            {
+                              "type": "CommentLine",
+                              "value": " Add the system, return its ID",
+                              "start": 5059,
+                              "end": 5091,
                               "loc": {
                                 "start": {
-                                  "line": 207,
+                                  "line": 186,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 207,
-                                  "column": 9
-                                },
-                                "identifierName": "invoke"
-                              },
-                              "name": "invoke"
-                            },
-                            "arguments": [
-                              {
-                                "type": "Identifier",
-                                "start": 5548,
-                                "end": 5554,
-                                "loc": {
-                                  "start": {
-                                    "line": 207,
-                                    "column": 10
-                                  },
-                                  "end": {
-                                    "line": 207,
-                                    "column": 16
-                                  },
-                                  "identifierName": "system"
-                                },
-                                "name": "system"
-                              },
-                              {
-                                "type": "StringLiteral",
-                                "start": 5556,
-                                "end": 5562,
-                                "loc": {
-                                  "start": {
-                                    "line": 207,
-                                    "column": 18
-                                  },
-                                  "end": {
-                                    "line": 207,
-                                    "column": 24
-                                  }
-                                },
-                                "extra": {
-                                  "rawValue": "post",
-                                  "raw": "'post'"
-                                },
-                                "value": "post"
-                              },
-                              {
-                                "type": "SpreadElement",
-                                "start": 5564,
-                                "end": 5571,
-                                "loc": {
-                                  "start": {
-                                    "line": 207,
-                                    "column": 26
-                                  },
-                                  "end": {
-                                    "line": 207,
-                                    "column": 33
-                                  }
-                                },
-                                "argument": {
-                                  "type": "Identifier",
-                                  "start": 5567,
-                                  "end": 5571,
-                                  "loc": {
-                                    "start": {
-                                      "line": 207,
-                                      "column": 29
-                                    },
-                                    "end": {
-                                      "line": 207,
-                                      "column": 33
-                                    },
-                                    "identifierName": "args"
-                                  },
-                                  "name": "args"
+                                  "line": 186,
+                                  "column": 35
                                 }
                               }
-                            ]
-                          }
+                            }
+                          ]
                         }
                       ],
                       "directives": []
-                    }
-                  }
-                ],
-                "directives": [],
-                "trailingComments": null
-              },
-              "leadingComments": [
-                {
-                  "type": "CommentBlock",
-                  "value": "*\n\t * Calls pre(), every(), and post() on all systems\n\t *\n\t * @example\n\t * world.run(deltaTime)\n\t *\n\t * @example\n\t * // Example flow of method call order:\n\t * // Setup systems:\n\t * world.system([], systemA)\n\t * world.system([], systemB)\n\t * // During world.run():\n\t * // systemA.pre()\n\t * // systemA.every() * number of entities\n\t * // systemA.post()\n\t * // systemB.pre()\n\t * // systemB.every() * number of entities\n\t * // systemB.post()\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' methods\n\t ",
-                  "start": 4766,
-                  "end": 5295,
-                  "loc": {
-                    "start": {
-                      "line": 177,
-                      "column": 1
-                    },
-                    "end": {
-                      "line": 197,
-                      "column": 4
-                    }
-                  }
-                }
-              ],
-              "trailingComments": [
-                {
-                  "type": "CommentBlock",
-                  "value": "*\n\t * Iterate through entities with the specified components\n\t *\n\t * @example\n\t * // Use a callback to process entities one-by-one\n\t * world.every(['comp'], comp => {comp.value = 0})\n\t *\n\t * @example\n\t * // Get an iterator for the entities\n\t * let it = world.every(['comp'])\n\t * for (let entity of it) {...}\n\t *\n\t * @param {Array}     componentNames - The component names to match entites with. This checks if the entity\n\t * has ALL of the specified components, but does not check for additional components.\n\t * @param {Function}  callback       - The callback to call for each entity. Takes (...components, entity, ...args).\n\t * @param {...Object} [args]         - Any additional arguments to pass to the callback.\n\t *\n\t * @return {MapIterator} An iterator to the entities themselves\n\t ",
-                  "start": 5582,
-                  "end": 6373,
-                  "loc": {
-                    "start": {
-                      "line": 211,
-                      "column": 1
                     },
-                    "end": {
-                      "line": 229,
-                      "column": 4
-                    }
-                  }
-                }
-              ]
-            },
-            {
-              "type": "ClassMethod",
-              "start": 6375,
-              "end": 7188,
-              "loc": {
+                    "alternate": null,
+                    "leadingComments": [
+                      {
+                        "type": "CommentLine",
+                        "value": " Make sure the system is valid",
+                        "start": 4849,
+                        "end": 4881,
+                        "loc": {
+                          "start": {
+                            "line": 180,
+                            "column": 2
+                          },
+                          "end": {
+                            "line": 180,
+                            "column": 34
+                          }
+                        }
+                      }
+                    ]
+                  },
+                  {
+                    "type": "ReturnStatement",
+                    "start": 5141,
+                    "end": 5157,
+                    "loc": {
+                      "start": {
+                        "line": 189,
+                        "column": 2
+                      },
+                      "end": {
+                        "line": 189,
+                        "column": 18
+                      }
+                    },
+                    "argument": {
+                      "type": "Identifier",
+                      "start": 5148,
+                      "end": 5157,
+                      "loc": {
+                        "start": {
+                          "line": 189,
+                          "column": 9
+                        },
+                        "end": {
+                          "line": 189,
+                          "column": 18
+                        },
+                        "identifierName": "undefined"
+                      },
+                      "name": "undefined"
+                    }
+                  }
+                ],
+                "directives": [],
+                "trailingComments": null
+              },
+              "leadingComments": [
+                {
+                  "type": "CommentBlock",
+                  "value": "*\n\t * Registers a system to the world.\n\t * The order the systems get registered, is the order then run in.\n\t *\n\t * @example\n\t * // Movement system\n\t * world.system(['position', 'velocity'], class {\n\t *      constructor(context) {\n\t *          // This is showing how you can optionally pass parameters to the system's constructor\n\t *          this.context = context\n\t *      }\n\t *      every(position, velocity, entity) {\n\t *          position.x += velocity.x\n\t *          position.y += velocity.y\n\t *      }\n\t *  }, context)\n\t *\n\t * @example\n\t * // System that doesn't use every()\n\t * world.system(class {\n\t *      constructor(context) {\n\t *          this.context = context\n\t *      }\n\t *      pre() {\n\t *          // Handle events or something\n\t *      }\n\t *  }, context)\n\t *\n\t * @param {...Object} args - Both signatures are accepted: (components, systemClass, ...args) or (systemClass, ...args).\n\t *\n\t * **[components]**: The list of components the system will process in every(). This follows the same logic as entity.has() and world.every().\n\t *\n\t * **{systemClass}**: The system class to instantiate. Can contain the following methods: constructor, initialize, pre, every, post. Pre() and post() get called before and after every(), for each of the independent systems. See world.run() for an example of the call order.\n\t *\n\t * **[...args]**: The arguments to forward to the system's constructors.\n\t *\n\t * @return {number} Unique ID of the system on success or undefined on failure\n\t ",
+                  "start": 3066,
+                  "end": 4560,
+                  "loc": {
+                    "start": {
+                      "line": 129,
+                      "column": 1
+                    },
+                    "end": {
+                      "line": 166,
+                      "column": 4
+                    }
+                  }
+                }
+              ],
+              "trailingComments": [
+                {
+                  "type": "CommentBlock",
+                  "value": "*\n\t * Calls initialize() on all systems\n\t *\n\t * @example\n\t * world.initialize(renderContext)\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' initialize() methods\n\t ",
+                  "start": 5163,
+                  "end": 5360,
+                  "loc": {
+                    "start": {
+                      "line": 192,
+                      "column": 1
+                    },
+                    "end": {
+                      "line": 199,
+                      "column": 4
+                    }
+                  }
+                }
+              ]
+            },
+            {
+              "type": "ClassMethod",
+              "start": 5362,
+              "end": 5468,
+              "loc": {
                 "start": {
-                  "line": 230,
+                  "line": 200,
                   "column": 1
                 },
                 "end": {
-                  "line": 254,
+                  "line": 204,
                   "column": 2
                 }
               },
@@ -6425,20 +6012,20 @@
               "computed": false,
               "key": {
                 "type": "Identifier",
-                "start": 6375,
-                "end": 6380,
+                "start": 5362,
+                "end": 5372,
                 "loc": {
                   "start": {
-                    "line": 230,
+                    "line": 200,
                     "column": 1
                   },
                   "end": {
-                    "line": 230,
-                    "column": 6
+                    "line": 200,
+                    "column": 11
                   },
-                  "identifierName": "every"
+                  "identifierName": "initialize"
                 },
-                "name": "every",
+                "name": "initialize",
                 "leadingComments": null
               },
               "kind": "method",
@@ -6447,66 +6034,32 @@
               "expression": false,
               "async": false,
               "params": [
-                {
-                  "type": "Identifier",
-                  "start": 6381,
-                  "end": 6395,
-                  "loc": {
-                    "start": {
-                      "line": 230,
-                      "column": 7
-                    },
-                    "end": {
-                      "line": 230,
-                      "column": 21
-                    },
-                    "identifierName": "componentNames"
-                  },
-                  "name": "componentNames"
-                },
-                {
-                  "type": "Identifier",
-                  "start": 6397,
-                  "end": 6405,
-                  "loc": {
-                    "start": {
-                      "line": 230,
-                      "column": 23
-                    },
-                    "end": {
-                      "line": 230,
-                      "column": 31
-                    },
-                    "identifierName": "callback"
-                  },
-                  "name": "callback"
-                },
                 {
                   "type": "RestElement",
-                  "start": 6407,
-                  "end": 6414,
+                  "start": 5373,
+                  "end": 5380,
                   "loc": {
                     "start": {
-                      "line": 230,
-                      "column": 33
+                      "line": 200,
+                      "column": 12
                     },
                     "end": {
-                      "line": 230,
-                      "column": 40
+                      "line": 200,
+                      "column": 19
                     }
                   },
                   "argument": {
                     "type": "Identifier",
-                    "start": 6410,
-                    "end": 6414,
+                    "start": 5376,
+                    "end": 5380,
                     "loc": {
                       "start": {
-                        "line": 230,
-                        "column": 36
+                        "line": 200,
+                        "column": 15
                       },
                       "end": {
-                        "line": 230,
-                        "column": 40
+                        "line": 200,
+                        "column": 19
                       },
                       "identifierName": "args"
                     },
@@ -6516,1174 +6069,1200 @@
               ],
               "body": {
                 "type": "BlockStatement",
-                "start": 6416,
-                "end": 7188,
+                "start": 5382,
+                "end": 5468,
                 "loc": {
                   "start": {
-                    "line": 230,
-                    "column": 42
+                    "line": 200,
+                    "column": 21
                   },
                   "end": {
-                    "line": 254,
+                    "line": 204,
                     "column": 2
                   }
                 },
                 "body": [
                   {
-                    "type": "VariableDeclaration",
-                    "start": 6453,
-                    "end": 6500,
+                    "type": "ForOfStatement",
+                    "start": 5386,
+                    "end": 5465,
                     "loc": {
                       "start": {
-                        "line": 232,
+                        "line": 201,
                         "column": 2
                       },
                       "end": {
-                        "line": 232,
-                        "column": 49
+                        "line": 203,
+                        "column": 3
                       }
                     },
-                    "declarations": [
-                      {
-                        "type": "VariableDeclarator",
-                        "start": 6457,
-                        "end": 6500,
-                        "loc": {
-                          "start": {
-                            "line": 232,
-                            "column": 6
-                          },
-                          "end": {
-                            "line": 232,
-                            "column": 49
-                          }
+                    "left": {
+                      "type": "VariableDeclaration",
+                      "start": 5391,
+                      "end": 5401,
+                      "loc": {
+                        "start": {
+                          "line": 201,
+                          "column": 7
                         },
-                        "id": {
-                          "type": "Identifier",
-                          "start": 6457,
-                          "end": 6465,
+                        "end": {
+                          "line": 201,
+                          "column": 17
+                        }
+                      },
+                      "declarations": [
+                        {
+                          "type": "VariableDeclarator",
+                          "start": 5395,
+                          "end": 5401,
                           "loc": {
                             "start": {
-                              "line": 232,
-                              "column": 6
+                              "line": 201,
+                              "column": 11
                             },
                             "end": {
-                              "line": 232,
-                              "column": 14
+                              "line": 201,
+                              "column": 17
+                            }
+                          },
+                          "id": {
+                            "type": "Identifier",
+                            "start": 5395,
+                            "end": 5401,
+                            "loc": {
+                              "start": {
+                                "line": 201,
+                                "column": 11
+                              },
+                              "end": {
+                                "line": 201,
+                                "column": 17
+                              },
+                              "identifierName": "system"
                             },
-                            "identifierName": "entities"
+                            "name": "system"
                           },
-                          "name": "entities",
-                          "leadingComments": null
+                          "init": null
+                        }
+                      ],
+                      "kind": "let"
+                    },
+                    "right": {
+                      "type": "MemberExpression",
+                      "start": 5405,
+                      "end": 5417,
+                      "loc": {
+                        "start": {
+                          "line": 201,
+                          "column": 21
                         },
-                        "init": {
-                          "type": "CallExpression",
-                          "start": 6468,
-                          "end": 6500,
+                        "end": {
+                          "line": 201,
+                          "column": 33
+                        }
+                      },
+                      "object": {
+                        "type": "ThisExpression",
+                        "start": 5405,
+                        "end": 5409,
+                        "loc": {
+                          "start": {
+                            "line": 201,
+                            "column": 21
+                          },
+                          "end": {
+                            "line": 201,
+                            "column": 25
+                          }
+                        }
+                      },
+                      "property": {
+                        "type": "Identifier",
+                        "start": 5410,
+                        "end": 5417,
+                        "loc": {
+                          "start": {
+                            "line": 201,
+                            "column": 26
+                          },
+                          "end": {
+                            "line": 201,
+                            "column": 33
+                          },
+                          "identifierName": "systems"
+                        },
+                        "name": "systems"
+                      },
+                      "computed": false
+                    },
+                    "body": {
+                      "type": "BlockStatement",
+                      "start": 5419,
+                      "end": 5465,
+                      "loc": {
+                        "start": {
+                          "line": 201,
+                          "column": 35
+                        },
+                        "end": {
+                          "line": 203,
+                          "column": 3
+                        }
+                      },
+                      "body": [
+                        {
+                          "type": "ExpressionStatement",
+                          "start": 5424,
+                          "end": 5461,
                           "loc": {
                             "start": {
-                              "line": 232,
-                              "column": 17
+                              "line": 202,
+                              "column": 3
                             },
                             "end": {
-                              "line": 232,
-                              "column": 49
+                              "line": 202,
+                              "column": 40
                             }
                           },
-                          "callee": {
-                            "type": "MemberExpression",
-                            "start": 6468,
-                            "end": 6484,
+                          "expression": {
+                            "type": "CallExpression",
+                            "start": 5424,
+                            "end": 5461,
                             "loc": {
                               "start": {
-                                "line": 232,
-                                "column": 17
+                                "line": 202,
+                                "column": 3
                               },
                               "end": {
-                                "line": 232,
-                                "column": 33
+                                "line": 202,
+                                "column": 40
                               }
                             },
-                            "object": {
-                              "type": "MemberExpression",
-                              "start": 6468,
-                              "end": 6478,
+                            "callee": {
+                              "type": "Identifier",
+                              "start": 5424,
+                              "end": 5430,
                               "loc": {
                                 "start": {
-                                  "line": 232,
-                                  "column": 17
+                                  "line": 202,
+                                  "column": 3
                                 },
                                 "end": {
-                                  "line": 232,
-                                  "column": 27
-                                }
+                                  "line": 202,
+                                  "column": 9
+                                },
+                                "identifierName": "invoke"
                               },
-                              "object": {
-                                "type": "ThisExpression",
-                                "start": 6468,
-                                "end": 6472,
-                                "loc": {
-                                  "start": {
-                                    "line": 232,
-                                    "column": 17
-                                  },
-                                  "end": {
-                                    "line": 232,
-                                    "column": 21
-                                  }
-                                }
-                              },
-                              "property": {
+                              "name": "invoke"
+                            },
+                            "arguments": [
+                              {
                                 "type": "Identifier",
-                                "start": 6473,
-                                "end": 6478,
+                                "start": 5431,
+                                "end": 5437,
                                 "loc": {
                                   "start": {
-                                    "line": 232,
-                                    "column": 22
+                                    "line": 202,
+                                    "column": 10
                                   },
                                   "end": {
-                                    "line": 232,
-                                    "column": 27
+                                    "line": 202,
+                                    "column": 16
                                   },
-                                  "identifierName": "index"
+                                  "identifierName": "system"
                                 },
-                                "name": "index"
+                                "name": "system"
                               },
-                              "computed": false
-                            },
-                            "property": {
-                              "type": "Identifier",
-                              "start": 6479,
-                              "end": 6484,
-                              "loc": {
-                                "start": {
-                                  "line": 232,
-                                  "column": 28
+                              {
+                                "type": "StringLiteral",
+                                "start": 5439,
+                                "end": 5451,
+                                "loc": {
+                                  "start": {
+                                    "line": 202,
+                                    "column": 18
+                                  },
+                                  "end": {
+                                    "line": 202,
+                                    "column": 30
+                                  }
                                 },
-                                "end": {
-                                  "line": 232,
-                                  "column": 33
+                                "extra": {
+                                  "rawValue": "initialize",
+                                  "raw": "'initialize'"
                                 },
-                                "identifierName": "query"
+                                "value": "initialize"
                               },
-                              "name": "query"
-                            },
-                            "computed": false
-                          },
-                          "arguments": [
-                            {
-                              "type": "Identifier",
-                              "start": 6485,
-                              "end": 6499,
-                              "loc": {
-                                "start": {
-                                  "line": 232,
-                                  "column": 34
-                                },
-                                "end": {
-                                  "line": 232,
-                                  "column": 48
+                              {
+                                "type": "SpreadElement",
+                                "start": 5453,
+                                "end": 5460,
+                                "loc": {
+                                  "start": {
+                                    "line": 202,
+                                    "column": 32
+                                  },
+                                  "end": {
+                                    "line": 202,
+                                    "column": 39
+                                  }
                                 },
-                                "identifierName": "componentNames"
-                              },
-                              "name": "componentNames"
-                            }
-                          ]
-                        },
-                        "leadingComments": null
-                      }
-                    ],
-                    "kind": "let",
-                    "leadingComments": [
-                      {
-                        "type": "CommentLine",
-                        "value": " Get indexed map of entities",
-                        "start": 6420,
-                        "end": 6450,
-                        "loc": {
-                          "start": {
-                            "line": 231,
-                            "column": 2
-                          },
-                          "end": {
-                            "line": 231,
-                            "column": 32
+                                "argument": {
+                                  "type": "Identifier",
+                                  "start": 5456,
+                                  "end": 5460,
+                                  "loc": {
+                                    "start": {
+                                      "line": 202,
+                                      "column": 35
+                                    },
+                                    "end": {
+                                      "line": 202,
+                                      "column": 39
+                                    },
+                                    "identifierName": "args"
+                                  },
+                                  "name": "args"
+                                }
+                              }
+                            ]
                           }
                         }
-                      }
-                    ]
+                      ],
+                      "directives": []
+                    }
+                  }
+                ],
+                "directives": [],
+                "trailingComments": null
+              },
+              "leadingComments": [
+                {
+                  "type": "CommentBlock",
+                  "value": "*\n\t * Calls initialize() on all systems\n\t *\n\t * @example\n\t * world.initialize(renderContext)\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' initialize() methods\n\t ",
+                  "start": 5163,
+                  "end": 5360,
+                  "loc": {
+                    "start": {
+                      "line": 192,
+                      "column": 1
+                    },
+                    "end": {
+                      "line": 199,
+                      "column": 4
+                    }
+                  }
+                }
+              ],
+              "trailingComments": [
+                {
+                  "type": "CommentBlock",
+                  "value": "*\n\t * Calls pre(), every(), and post() on all systems\n\t *\n\t * @example\n\t * world.run(deltaTime)\n\t *\n\t * @example\n\t * // Example flow of method call order:\n\t * // Setup systems:\n\t * world.system(systemA)\n\t * world.system(systemB)\n\t * // During world.run():\n\t * // systemA.pre()\n\t * // systemA.every() * number of entities\n\t * // systemA.post()\n\t * // systemB.pre()\n\t * // systemB.every() * number of entities\n\t * // systemB.post()\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' methods\n\t ",
+                  "start": 5471,
+                  "end": 5992,
+                  "loc": {
+                    "start": {
+                      "line": 206,
+                      "column": 1
+                    },
+                    "end": {
+                      "line": 226,
+                      "column": 4
+                    }
+                  }
+                }
+              ]
+            },
+            {
+              "type": "ClassMethod",
+              "start": 5994,
+              "end": 6276,
+              "loc": {
+                "start": {
+                  "line": 227,
+                  "column": 1
+                },
+                "end": {
+                  "line": 238,
+                  "column": 2
+                }
+              },
+              "static": false,
+              "computed": false,
+              "key": {
+                "type": "Identifier",
+                "start": 5994,
+                "end": 5997,
+                "loc": {
+                  "start": {
+                    "line": 227,
+                    "column": 1
+                  },
+                  "end": {
+                    "line": 227,
+                    "column": 4
+                  },
+                  "identifierName": "run"
+                },
+                "name": "run",
+                "leadingComments": null
+              },
+              "kind": "method",
+              "id": null,
+              "generator": false,
+              "expression": false,
+              "async": false,
+              "params": [
+                {
+                  "type": "RestElement",
+                  "start": 5998,
+                  "end": 6005,
+                  "loc": {
+                    "start": {
+                      "line": 227,
+                      "column": 5
+                    },
+                    "end": {
+                      "line": 227,
+                      "column": 12
+                    }
+                  },
+                  "argument": {
+                    "type": "Identifier",
+                    "start": 6001,
+                    "end": 6005,
+                    "loc": {
+                      "start": {
+                        "line": 227,
+                        "column": 8
+                      },
+                      "end": {
+                        "line": 227,
+                        "column": 12
+                      },
+                      "identifierName": "args"
+                    },
+                    "name": "args"
+                  }
+                }
+              ],
+              "body": {
+                "type": "BlockStatement",
+                "start": 6007,
+                "end": 6276,
+                "loc": {
+                  "start": {
+                    "line": 227,
+                    "column": 14
                   },
+                  "end": {
+                    "line": 238,
+                    "column": 2
+                  }
+                },
+                "body": [
                   {
-                    "type": "IfStatement",
-                    "start": 6504,
-                    "end": 7157,
+                    "type": "ForOfStatement",
+                    "start": 6011,
+                    "end": 6273,
                     "loc": {
                       "start": {
-                        "line": 234,
+                        "line": 228,
                         "column": 2
                       },
                       "end": {
-                        "line": 251,
+                        "line": 237,
                         "column": 3
                       }
                     },
-                    "test": {
-                      "type": "CallExpression",
-                      "start": 6508,
-                      "end": 6528,
+                    "left": {
+                      "type": "VariableDeclaration",
+                      "start": 6016,
+                      "end": 6026,
                       "loc": {
                         "start": {
-                          "line": 234,
-                          "column": 6
+                          "line": 228,
+                          "column": 7
                         },
                         "end": {
-                          "line": 234,
-                          "column": 26
+                          "line": 228,
+                          "column": 17
                         }
                       },
-                      "callee": {
-                        "type": "Identifier",
-                        "start": 6508,
-                        "end": 6518,
-                        "loc": {
-                          "start": {
-                            "line": 234,
-                            "column": 6
-                          },
-                          "end": {
-                            "line": 234,
-                            "column": 16
-                          },
-                          "identifierName": "isFunction"
-                        },
-                        "name": "isFunction"
-                      },
-                      "arguments": [
+                      "declarations": [
                         {
-                          "type": "Identifier",
-                          "start": 6519,
-                          "end": 6527,
+                          "type": "VariableDeclarator",
+                          "start": 6020,
+                          "end": 6026,
                           "loc": {
                             "start": {
-                              "line": 234,
-                              "column": 17
+                              "line": 228,
+                              "column": 11
                             },
                             "end": {
-                              "line": 234,
-                              "column": 25
-                            },
-                            "identifierName": "callback"
+                              "line": 228,
+                              "column": 17
+                            }
                           },
-                          "name": "callback"
-                        }
-                      ]
-                    },
-                    "consequent": {
-                      "type": "BlockStatement",
-                      "start": 6530,
-                      "end": 7157,
+                          "id": {
+                            "type": "Identifier",
+                            "start": 6020,
+                            "end": 6026,
+                            "loc": {
+                              "start": {
+                                "line": 228,
+                                "column": 11
+                              },
+                              "end": {
+                                "line": 228,
+                                "column": 17
+                              },
+                              "identifierName": "system"
+                            },
+                            "name": "system"
+                          },
+                          "init": null
+                        }
+                      ],
+                      "kind": "let"
+                    },
+                    "right": {
+                      "type": "MemberExpression",
+                      "start": 6030,
+                      "end": 6042,
                       "loc": {
                         "start": {
-                          "line": 234,
-                          "column": 28
+                          "line": 228,
+                          "column": 21
+                        },
+                        "end": {
+                          "line": 228,
+                          "column": 33
+                        }
+                      },
+                      "object": {
+                        "type": "ThisExpression",
+                        "start": 6030,
+                        "end": 6034,
+                        "loc": {
+                          "start": {
+                            "line": 228,
+                            "column": 21
+                          },
+                          "end": {
+                            "line": 228,
+                            "column": 25
+                          }
+                        }
+                      },
+                      "property": {
+                        "type": "Identifier",
+                        "start": 6035,
+                        "end": 6042,
+                        "loc": {
+                          "start": {
+                            "line": 228,
+                            "column": 26
+                          },
+                          "end": {
+                            "line": 228,
+                            "column": 33
+                          },
+                          "identifierName": "systems"
+                        },
+                        "name": "systems"
+                      },
+                      "computed": false
+                    },
+                    "body": {
+                      "type": "BlockStatement",
+                      "start": 6044,
+                      "end": 6273,
+                      "loc": {
+                        "start": {
+                          "line": 228,
+                          "column": 35
                         },
                         "end": {
-                          "line": 251,
+                          "line": 237,
                           "column": 3
                         }
                       },
                       "body": [
                         {
-                          "type": "ForOfStatement",
-                          "start": 6572,
-                          "end": 7153,
+                          "type": "ExpressionStatement",
+                          "start": 6049,
+                          "end": 6079,
                           "loc": {
                             "start": {
-                              "line": 236,
+                              "line": 229,
                               "column": 3
                             },
                             "end": {
-                              "line": 250,
-                              "column": 4
+                              "line": 229,
+                              "column": 33
                             }
                           },
-                          "left": {
-                            "type": "VariableDeclaration",
-                            "start": 6577,
-                            "end": 6587,
+                          "expression": {
+                            "type": "CallExpression",
+                            "start": 6049,
+                            "end": 6079,
                             "loc": {
                               "start": {
-                                "line": 236,
-                                "column": 8
+                                "line": 229,
+                                "column": 3
                               },
                               "end": {
-                                "line": 236,
-                                "column": 18
+                                "line": 229,
+                                "column": 33
                               }
                             },
-                            "declarations": [
+                            "callee": {
+                              "type": "Identifier",
+                              "start": 6049,
+                              "end": 6055,
+                              "loc": {
+                                "start": {
+                                  "line": 229,
+                                  "column": 3
+                                },
+                                "end": {
+                                  "line": 229,
+                                  "column": 9
+                                },
+                                "identifierName": "invoke"
+                              },
+                              "name": "invoke"
+                            },
+                            "arguments": [
                               {
-                                "type": "VariableDeclarator",
-                                "start": 6581,
-                                "end": 6587,
+                                "type": "Identifier",
+                                "start": 6056,
+                                "end": 6062,
                                 "loc": {
                                   "start": {
-                                    "line": 236,
-                                    "column": 12
+                                    "line": 229,
+                                    "column": 10
                                   },
                                   "end": {
-                                    "line": 236,
+                                    "line": 229,
+                                    "column": 16
+                                  },
+                                  "identifierName": "system"
+                                },
+                                "name": "system"
+                              },
+                              {
+                                "type": "StringLiteral",
+                                "start": 6064,
+                                "end": 6069,
+                                "loc": {
+                                  "start": {
+                                    "line": 229,
                                     "column": 18
+                                  },
+                                  "end": {
+                                    "line": 229,
+                                    "column": 23
                                   }
                                 },
-                                "id": {
+                                "extra": {
+                                  "rawValue": "pre",
+                                  "raw": "'pre'"
+                                },
+                                "value": "pre"
+                              },
+                              {
+                                "type": "SpreadElement",
+                                "start": 6071,
+                                "end": 6078,
+                                "loc": {
+                                  "start": {
+                                    "line": 229,
+                                    "column": 25
+                                  },
+                                  "end": {
+                                    "line": 229,
+                                    "column": 32
+                                  }
+                                },
+                                "argument": {
                                   "type": "Identifier",
-                                  "start": 6581,
-                                  "end": 6587,
+                                  "start": 6074,
+                                  "end": 6078,
                                   "loc": {
                                     "start": {
-                                      "line": 236,
-                                      "column": 12
+                                      "line": 229,
+                                      "column": 28
                                     },
                                     "end": {
-                                      "line": 236,
-                                      "column": 18
+                                      "line": 229,
+                                      "column": 32
                                     },
-                                    "identifierName": "entity"
+                                    "identifierName": "args"
                                   },
-                                  "name": "entity",
-                                  "leadingComments": null
-                                },
-                                "init": null,
-                                "leadingComments": null
+                                  "name": "args"
+                                }
                               }
                             ],
-                            "kind": "let",
-                            "leadingComments": null
+                            "trailingComments": null
                           },
-                          "right": {
+                          "trailingComments": [
+                            {
+                              "type": "CommentLine",
+                              "value": " Run the \"every\" method in the system",
+                              "start": 6084,
+                              "end": 6123,
+                              "loc": {
+                                "start": {
+                                  "line": 231,
+                                  "column": 3
+                                },
+                                "end": {
+                                  "line": 231,
+                                  "column": 42
+                                }
+                              }
+                            }
+                          ]
+                        },
+                        {
+                          "type": "IfStatement",
+                          "start": 6127,
+                          "end": 6233,
+                          "loc": {
+                            "start": {
+                              "line": 232,
+                              "column": 3
+                            },
+                            "end": {
+                              "line": 234,
+                              "column": 4
+                            }
+                          },
+                          "test": {
                             "type": "CallExpression",
-                            "start": 6591,
-                            "end": 6608,
+                            "start": 6131,
+                            "end": 6155,
                             "loc": {
                               "start": {
-                                "line": 236,
-                                "column": 22
+                                "line": 232,
+                                "column": 7
                               },
                               "end": {
-                                "line": 236,
-                                "column": 39
+                                "line": 232,
+                                "column": 31
                               }
                             },
                             "callee": {
-                              "type": "MemberExpression",
-                              "start": 6591,
-                              "end": 6606,
+                              "type": "Identifier",
+                              "start": 6131,
+                              "end": 6141,
                               "loc": {
                                 "start": {
-                                  "line": 236,
-                                  "column": 22
+                                  "line": 232,
+                                  "column": 7
                                 },
                                 "end": {
-                                  "line": 236,
-                                  "column": 37
-                                }
+                                  "line": 232,
+                                  "column": 17
+                                },
+                                "identifierName": "isFunction"
                               },
-                              "object": {
-                                "type": "Identifier",
-                                "start": 6591,
-                                "end": 6599,
+                              "name": "isFunction",
+                              "leadingComments": null
+                            },
+                            "arguments": [
+                              {
+                                "type": "MemberExpression",
+                                "start": 6142,
+                                "end": 6154,
                                 "loc": {
                                   "start": {
-                                    "line": 236,
-                                    "column": 22
+                                    "line": 232,
+                                    "column": 18
                                   },
                                   "end": {
-                                    "line": 236,
+                                    "line": 232,
                                     "column": 30
-                                  },
-                                  "identifierName": "entities"
+                                  }
                                 },
-                                "name": "entities"
-                              },
-                              "property": {
-                                "type": "Identifier",
-                                "start": 6600,
-                                "end": 6606,
-                                "loc": {
-                                  "start": {
-                                    "line": 236,
-                                    "column": 31
+                                "object": {
+                                  "type": "Identifier",
+                                  "start": 6142,
+                                  "end": 6148,
+                                  "loc": {
+                                    "start": {
+                                      "line": 232,
+                                      "column": 18
+                                    },
+                                    "end": {
+                                      "line": 232,
+                                      "column": 24
+                                    },
+                                    "identifierName": "system"
                                   },
-                                  "end": {
-                                    "line": 236,
-                                    "column": 37
+                                  "name": "system"
+                                },
+                                "property": {
+                                  "type": "Identifier",
+                                  "start": 6149,
+                                  "end": 6154,
+                                  "loc": {
+                                    "start": {
+                                      "line": 232,
+                                      "column": 25
+                                    },
+                                    "end": {
+                                      "line": 232,
+                                      "column": 30
+                                    },
+                                    "identifierName": "every"
                                   },
-                                  "identifierName": "values"
+                                  "name": "every"
                                 },
-                                "name": "values"
-                              },
-                              "computed": false
-                            },
-                            "arguments": []
+                                "computed": false
+                              }
+                            ],
+                            "leadingComments": null
                           },
-                          "body": {
+                          "consequent": {
                             "type": "BlockStatement",
-                            "start": 6610,
-                            "end": 7153,
+                            "start": 6157,
+                            "end": 6233,
                             "loc": {
                               "start": {
-                                "line": 236,
-                                "column": 41
+                                "line": 232,
+                                "column": 33
                               },
                               "end": {
-                                "line": 250,
+                                "line": 234,
                                 "column": 4
                               }
                             },
                             "body": [
                               {
-                                "type": "VariableDeclaration",
-                                "start": 6848,
-                                "end": 6909,
+                                "type": "ExpressionStatement",
+                                "start": 6163,
+                                "end": 6228,
                                 "loc": {
                                   "start": {
-                                    "line": 241,
+                                    "line": 233,
                                     "column": 4
                                   },
                                   "end": {
-                                    "line": 241,
-                                    "column": 65
+                                    "line": 233,
+                                    "column": 69
                                   }
                                 },
-                                "declarations": [
-                                  {
-                                    "type": "VariableDeclarator",
-                                    "start": 6852,
-                                    "end": 6909,
+                                "expression": {
+                                  "type": "CallExpression",
+                                  "start": 6163,
+                                  "end": 6228,
+                                  "loc": {
+                                    "start": {
+                                      "line": 233,
+                                      "column": 4
+                                    },
+                                    "end": {
+                                      "line": 233,
+                                      "column": 69
+                                    }
+                                  },
+                                  "callee": {
+                                    "type": "MemberExpression",
+                                    "start": 6163,
+                                    "end": 6173,
                                     "loc": {
                                       "start": {
-                                        "line": 241,
-                                        "column": 8
+                                        "line": 233,
+                                        "column": 4
                                       },
                                       "end": {
-                                        "line": 241,
-                                        "column": 65
+                                        "line": 233,
+                                        "column": 14
                                       }
                                     },
-                                    "id": {
-                                      "type": "Identifier",
-                                      "start": 6852,
-                                      "end": 6862,
+                                    "object": {
+                                      "type": "ThisExpression",
+                                      "start": 6163,
+                                      "end": 6167,
                                       "loc": {
                                         "start": {
-                                          "line": 241,
+                                          "line": 233,
+                                          "column": 4
+                                        },
+                                        "end": {
+                                          "line": 233,
                                           "column": 8
+                                        }
+                                      }
+                                    },
+                                    "property": {
+                                      "type": "Identifier",
+                                      "start": 6168,
+                                      "end": 6173,
+                                      "loc": {
+                                        "start": {
+                                          "line": 233,
+                                          "column": 9
                                         },
                                         "end": {
-                                          "line": 241,
-                                          "column": 18
+                                          "line": 233,
+                                          "column": 14
                                         },
-                                        "identifierName": "components"
+                                        "identifierName": "every"
                                       },
-                                      "name": "components",
-                                      "leadingComments": null
+                                      "name": "every"
                                     },
-                                    "init": {
+                                    "computed": false
+                                  },
+                                  "arguments": [
+                                    {
+                                      "type": "MemberExpression",
+                                      "start": 6174,
+                                      "end": 6191,
+                                      "loc": {
+                                        "start": {
+                                          "line": 233,
+                                          "column": 15
+                                        },
+                                        "end": {
+                                          "line": 233,
+                                          "column": 32
+                                        }
+                                      },
+                                      "object": {
+                                        "type": "Identifier",
+                                        "start": 6174,
+                                        "end": 6180,
+                                        "loc": {
+                                          "start": {
+                                            "line": 233,
+                                            "column": 15
+                                          },
+                                          "end": {
+                                            "line": 233,
+                                            "column": 21
+                                          },
+                                          "identifierName": "system"
+                                        },
+                                        "name": "system"
+                                      },
+                                      "property": {
+                                        "type": "Identifier",
+                                        "start": 6181,
+                                        "end": 6191,
+                                        "loc": {
+                                          "start": {
+                                            "line": 233,
+                                            "column": 22
+                                          },
+                                          "end": {
+                                            "line": 233,
+                                            "column": 32
+                                          },
+                                          "identifierName": "components"
+                                        },
+                                        "name": "components"
+                                      },
+                                      "computed": false
+                                    },
+                                    {
                                       "type": "CallExpression",
-                                      "start": 6865,
-                                      "end": 6909,
+                                      "start": 6193,
+                                      "end": 6218,
                                       "loc": {
                                         "start": {
-                                          "line": 241,
-                                          "column": 21
+                                          "line": 233,
+                                          "column": 34
                                         },
                                         "end": {
-                                          "line": 241,
-                                          "column": 65
+                                          "line": 233,
+                                          "column": 59
                                         }
                                       },
                                       "callee": {
                                         "type": "MemberExpression",
-                                        "start": 6865,
-                                        "end": 6883,
+                                        "start": 6193,
+                                        "end": 6210,
                                         "loc": {
                                           "start": {
-                                            "line": 241,
-                                            "column": 21
+                                            "line": 233,
+                                            "column": 34
                                           },
                                           "end": {
-                                            "line": 241,
-                                            "column": 39
+                                            "line": 233,
+                                            "column": 51
                                           }
                                         },
                                         "object": {
-                                          "type": "Identifier",
-                                          "start": 6865,
-                                          "end": 6879,
+                                          "type": "MemberExpression",
+                                          "start": 6193,
+                                          "end": 6205,
                                           "loc": {
                                             "start": {
-                                              "line": 241,
-                                              "column": 21
+                                              "line": 233,
+                                              "column": 34
                                             },
                                             "end": {
-                                              "line": 241,
-                                              "column": 35
+                                              "line": 233,
+                                              "column": 46
+                                            }
+                                          },
+                                          "object": {
+                                            "type": "Identifier",
+                                            "start": 6193,
+                                            "end": 6199,
+                                            "loc": {
+                                              "start": {
+                                                "line": 233,
+                                                "column": 34
+                                              },
+                                              "end": {
+                                                "line": 233,
+                                                "column": 40
+                                              },
+                                              "identifierName": "system"
                                             },
-                                            "identifierName": "componentNames"
+                                            "name": "system"
                                           },
-                                          "name": "componentNames"
+                                          "property": {
+                                            "type": "Identifier",
+                                            "start": 6200,
+                                            "end": 6205,
+                                            "loc": {
+                                              "start": {
+                                                "line": 233,
+                                                "column": 41
+                                              },
+                                              "end": {
+                                                "line": 233,
+                                                "column": 46
+                                              },
+                                              "identifierName": "every"
+                                            },
+                                            "name": "every"
+                                          },
+                                          "computed": false
                                         },
                                         "property": {
                                           "type": "Identifier",
-                                          "start": 6880,
-                                          "end": 6883,
+                                          "start": 6206,
+                                          "end": 6210,
                                           "loc": {
                                             "start": {
-                                              "line": 241,
-                                              "column": 36
+                                              "line": 233,
+                                              "column": 47
                                             },
                                             "end": {
-                                              "line": 241,
-                                              "column": 39
+                                              "line": 233,
+                                              "column": 51
                                             },
-                                            "identifierName": "map"
+                                            "identifierName": "bind"
                                           },
-                                          "name": "map"
+                                          "name": "bind"
                                         },
                                         "computed": false
                                       },
                                       "arguments": [
                                         {
-                                          "type": "ArrowFunctionExpression",
-                                          "start": 6884,
-                                          "end": 6908,
+                                          "type": "Identifier",
+                                          "start": 6211,
+                                          "end": 6217,
                                           "loc": {
                                             "start": {
-                                              "line": 241,
-                                              "column": 40
+                                              "line": 233,
+                                              "column": 52
                                             },
                                             "end": {
-                                              "line": 241,
-                                              "column": 64
-                                            }
-                                          },
-                                          "id": null,
-                                          "generator": false,
-                                          "expression": true,
-                                          "async": false,
-                                          "params": [
-                                            {
-                                              "type": "Identifier",
-                                              "start": 6884,
-                                              "end": 6888,
-                                              "loc": {
-                                                "start": {
-                                                  "line": 241,
-                                                  "column": 40
-                                                },
-                                                "end": {
-                                                  "line": 241,
-                                                  "column": 44
-                                                },
-                                                "identifierName": "name"
-                                              },
-                                              "name": "name"
-                                            }
-                                          ],
-                                          "body": {
-                                            "type": "CallExpression",
-                                            "start": 6892,
-                                            "end": 6908,
-                                            "loc": {
-                                              "start": {
-                                                "line": 241,
-                                                "column": 48
-                                              },
-                                              "end": {
-                                                "line": 241,
-                                                "column": 64
-                                              }
-                                            },
-                                            "callee": {
-                                              "type": "MemberExpression",
-                                              "start": 6892,
-                                              "end": 6902,
-                                              "loc": {
-                                                "start": {
-                                                  "line": 241,
-                                                  "column": 48
-                                                },
-                                                "end": {
-                                                  "line": 241,
-                                                  "column": 58
-                                                }
-                                              },
-                                              "object": {
-                                                "type": "Identifier",
-                                                "start": 6892,
-                                                "end": 6898,
-                                                "loc": {
-                                                  "start": {
-                                                    "line": 241,
-                                                    "column": 48
-                                                  },
-                                                  "end": {
-                                                    "line": 241,
-                                                    "column": 54
-                                                  },
-                                                  "identifierName": "entity"
-                                                },
-                                                "name": "entity"
-                                              },
-                                              "property": {
-                                                "type": "Identifier",
-                                                "start": 6899,
-                                                "end": 6902,
-                                                "loc": {
-                                                  "start": {
-                                                    "line": 241,
-                                                    "column": 55
-                                                  },
-                                                  "end": {
-                                                    "line": 241,
-                                                    "column": 58
-                                                  },
-                                                  "identifierName": "get"
-                                                },
-                                                "name": "get"
-                                              },
-                                              "computed": false
+                                              "line": 233,
+                                              "column": 58
                                             },
-                                            "arguments": [
-                                              {
-                                                "type": "Identifier",
-                                                "start": 6903,
-                                                "end": 6907,
-                                                "loc": {
-                                                  "start": {
-                                                    "line": 241,
-                                                    "column": 59
-                                                  },
-                                                  "end": {
-                                                    "line": 241,
-                                                    "column": 63
-                                                  },
-                                                  "identifierName": "name"
-                                                },
-                                                "name": "name"
-                                              }
-                                            ]
-                                          }
+                                            "identifierName": "system"
+                                          },
+                                          "name": "system"
                                         }
-                                      ],
-                                      "trailingComments": null
+                                      ]
                                     },
-                                    "leadingComments": null,
-                                    "trailingComments": null
-                                  }
-                                ],
-                                "kind": "let",
-                                "leadingComments": [
-                                  {
-                                    "type": "CommentLine",
-                                    "value": " At this point, we can safely assume that all components exist, even if entities/components",
-                                    "start": 6616,
-                                    "end": 6709,
-                                    "loc": {
-                                      "start": {
-                                        "line": 237,
-                                        "column": 4
-                                      },
-                                      "end": {
-                                        "line": 237,
-                                        "column": 97
-                                      }
-                                    }
-                                  },
-                                  {
-                                    "type": "CommentLine",
-                                    "value": " are deleted/modified during the loop, because JavaScript's MapIterator is smart enough.",
-                                    "start": 6714,
-                                    "end": 6804,
-                                    "loc": {
-                                      "start": {
-                                        "line": 238,
-                                        "column": 4
-                                      },
-                                      "end": {
-                                        "line": 238,
-                                        "column": 94
-                                      }
-                                    }
-                                  },
-                                  {
-                                    "type": "CommentLine",
-                                    "value": " Get all components as an array",
-                                    "start": 6810,
-                                    "end": 6843,
-                                    "loc": {
-                                      "start": {
-                                        "line": 240,
-                                        "column": 4
-                                      },
-                                      "end": {
-                                        "line": 240,
-                                        "column": 37
-                                      }
-                                    }
-                                  }
-                                ],
-                                "trailingComments": [
-                                  {
-                                    "type": "CommentLine",
-                                    "value": " Pass components, then the main entity, then any additional arguments",
-                                    "start": 6915,
-                                    "end": 6986,
-                                    "loc": {
-                                      "start": {
-                                        "line": 243,
-                                        "column": 4
-                                      },
-                                      "end": {
-                                        "line": 243,
-                                        "column": 75
-                                      }
-                                    }
-                                  }
-                                ]
-                              },
-                              {
-                                "type": "VariableDeclaration",
-                                "start": 6991,
-                                "end": 7044,
-                                "loc": {
-                                  "start": {
-                                    "line": 244,
-                                    "column": 4
-                                  },
-                                  "end": {
-                                    "line": 244,
-                                    "column": 57
-                                  }
-                                },
-                                "declarations": [
-                                  {
-                                    "type": "VariableDeclarator",
-                                    "start": 6995,
-                                    "end": 7044,
-                                    "loc": {
-                                      "start": {
-                                        "line": 244,
-                                        "column": 8
-                                      },
-                                      "end": {
-                                        "line": 244,
-                                        "column": 57
-                                      }
-                                    },
-                                    "id": {
-                                      "type": "Identifier",
-                                      "start": 6995,
-                                      "end": 7001,
-                                      "loc": {
-                                        "start": {
-                                          "line": 244,
-                                          "column": 8
-                                        },
-                                        "end": {
-                                          "line": 244,
-                                          "column": 14
-                                        },
-                                        "identifierName": "status"
-                                      },
-                                      "name": "status",
-                                      "leadingComments": null
-                                    },
-                                    "init": {
-                                      "type": "CallExpression",
-                                      "start": 7004,
-                                      "end": 7044,
+                                    {
+                                      "type": "SpreadElement",
+                                      "start": 6220,
+                                      "end": 6227,
                                       "loc": {
                                         "start": {
-                                          "line": 244,
-                                          "column": 17
+                                          "line": 233,
+                                          "column": 61
                                         },
                                         "end": {
-                                          "line": 244,
-                                          "column": 57
+                                          "line": 233,
+                                          "column": 68
                                         }
                                       },
-                                      "callee": {
+                                      "argument": {
                                         "type": "Identifier",
-                                        "start": 7004,
-                                        "end": 7012,
+                                        "start": 6223,
+                                        "end": 6227,
                                         "loc": {
                                           "start": {
-                                            "line": 244,
-                                            "column": 17
+                                            "line": 233,
+                                            "column": 64
                                           },
                                           "end": {
-                                            "line": 244,
-                                            "column": 25
-                                          },
-                                          "identifierName": "callback"
-                                        },
-                                        "name": "callback"
-                                      },
-                                      "arguments": [
-                                        {
-                                          "type": "SpreadElement",
-                                          "start": 7013,
-                                          "end": 7026,
-                                          "loc": {
-                                            "start": {
-                                              "line": 244,
-                                              "column": 26
-                                            },
-                                            "end": {
-                                              "line": 244,
-                                              "column": 39
-                                            }
-                                          },
-                                          "argument": {
-                                            "type": "Identifier",
-                                            "start": 7016,
-                                            "end": 7026,
-                                            "loc": {
-                                              "start": {
-                                                "line": 244,
-                                                "column": 29
-                                              },
-                                              "end": {
-                                                "line": 244,
-                                                "column": 39
-                                              },
-                                              "identifierName": "components"
-                                            },
-                                            "name": "components"
-                                          }
-                                        },
-                                        {
-                                          "type": "Identifier",
-                                          "start": 7028,
-                                          "end": 7034,
-                                          "loc": {
-                                            "start": {
-                                              "line": 244,
-                                              "column": 41
-                                            },
-                                            "end": {
-                                              "line": 244,
-                                              "column": 47
-                                            },
-                                            "identifierName": "entity"
+                                            "line": 233,
+                                            "column": 68
                                           },
-                                          "name": "entity"
+                                          "identifierName": "args"
                                         },
-                                        {
-                                          "type": "SpreadElement",
-                                          "start": 7036,
-                                          "end": 7043,
-                                          "loc": {
-                                            "start": {
-                                              "line": 244,
-                                              "column": 49
-                                            },
-                                            "end": {
-                                              "line": 244,
-                                              "column": 56
-                                            }
-                                          },
-                                          "argument": {
-                                            "type": "Identifier",
-                                            "start": 7039,
-                                            "end": 7043,
-                                            "loc": {
-                                              "start": {
-                                                "line": 244,
-                                                "column": 52
-                                              },
-                                              "end": {
-                                                "line": 244,
-                                                "column": 56
-                                              },
-                                              "identifierName": "args"
-                                            },
-                                            "name": "args"
-                                          }
-                                        }
-                                      ],
-                                      "trailingComments": null
-                                    },
-                                    "leadingComments": null,
-                                    "trailingComments": null
-                                  }
-                                ],
-                                "kind": "let",
-                                "leadingComments": [
-                                  {
-                                    "type": "CommentLine",
-                                    "value": " Pass components, then the main entity, then any additional arguments",
-                                    "start": 6915,
-                                    "end": 6986,
-                                    "loc": {
-                                      "start": {
-                                        "line": 243,
-                                        "column": 4
-                                      },
-                                      "end": {
-                                        "line": 243,
-                                        "column": 75
-                                      }
-                                    }
-                                  }
-                                ],
-                                "trailingComments": [
-                                  {
-                                    "type": "CommentLine",
-                                    "value": " Stop the iteration when the callback returns false",
-                                    "start": 7050,
-                                    "end": 7103,
-                                    "loc": {
-                                      "start": {
-                                        "line": 246,
-                                        "column": 4
-                                      },
-                                      "end": {
-                                        "line": 246,
-                                        "column": 57
+                                        "name": "args"
                                       }
                                     }
-                                  }
-                                ]
+                                  ]
+                                }
+                              }
+                            ],
+                            "directives": []
+                          },
+                          "alternate": null,
+                          "leadingComments": [
+                            {
+                              "type": "CommentLine",
+                              "value": " Run the \"every\" method in the system",
+                              "start": 6084,
+                              "end": 6123,
+                              "loc": {
+                                "start": {
+                                  "line": 231,
+                                  "column": 3
+                                },
+                                "end": {
+                                  "line": 231,
+                                  "column": 42
+                                }
+                              }
+                            }
+                          ]
+                        },
+                        {
+                          "type": "ExpressionStatement",
+                          "start": 6238,
+                          "end": 6269,
+                          "loc": {
+                            "start": {
+                              "line": 236,
+                              "column": 3
+                            },
+                            "end": {
+                              "line": 236,
+                              "column": 34
+                            }
+                          },
+                          "expression": {
+                            "type": "CallExpression",
+                            "start": 6238,
+                            "end": 6269,
+                            "loc": {
+                              "start": {
+                                "line": 236,
+                                "column": 3
+                              },
+                              "end": {
+                                "line": 236,
+                                "column": 34
+                              }
+                            },
+                            "callee": {
+                              "type": "Identifier",
+                              "start": 6238,
+                              "end": 6244,
+                              "loc": {
+                                "start": {
+                                  "line": 236,
+                                  "column": 3
+                                },
+                                "end": {
+                                  "line": 236,
+                                  "column": 9
+                                },
+                                "identifierName": "invoke"
                               },
+                              "name": "invoke"
+                            },
+                            "arguments": [
                               {
-                                "type": "IfStatement",
-                                "start": 7108,
-                                "end": 7148,
+                                "type": "Identifier",
+                                "start": 6245,
+                                "end": 6251,
                                 "loc": {
                                   "start": {
-                                    "line": 247,
-                                    "column": 4
-                                  },
+                                    "line": 236,
+                                    "column": 10
+                                  },
                                   "end": {
-                                    "line": 249,
-                                    "column": 5
-                                  }
-                                },
-                                "test": {
-                                  "type": "BinaryExpression",
-                                  "start": 7112,
-                                  "end": 7128,
-                                  "loc": {
-                                    "start": {
-                                      "line": 247,
-                                      "column": 8
-                                    },
-                                    "end": {
-                                      "line": 247,
-                                      "column": 24
-                                    }
+                                    "line": 236,
+                                    "column": 16
                                   },
-                                  "left": {
-                                    "type": "Identifier",
-                                    "start": 7112,
-                                    "end": 7118,
-                                    "loc": {
-                                      "start": {
-                                        "line": 247,
-                                        "column": 8
-                                      },
-                                      "end": {
-                                        "line": 247,
-                                        "column": 14
-                                      },
-                                      "identifierName": "status"
-                                    },
-                                    "name": "status",
-                                    "leadingComments": null
+                                  "identifierName": "system"
+                                },
+                                "name": "system"
+                              },
+                              {
+                                "type": "StringLiteral",
+                                "start": 6253,
+                                "end": 6259,
+                                "loc": {
+                                  "start": {
+                                    "line": 236,
+                                    "column": 18
                                   },
-                                  "operator": "===",
-                                  "right": {
-                                    "type": "BooleanLiteral",
-                                    "start": 7123,
-                                    "end": 7128,
-                                    "loc": {
-                                      "start": {
-                                        "line": 247,
-                                        "column": 19
-                                      },
-                                      "end": {
-                                        "line": 247,
-                                        "column": 24
-                                      }
-                                    },
-                                    "value": false
+                                  "end": {
+                                    "line": 236,
+                                    "column": 24
+                                  }
+                                },
+                                "extra": {
+                                  "rawValue": "post",
+                                  "raw": "'post'"
+                                },
+                                "value": "post"
+                              },
+                              {
+                                "type": "SpreadElement",
+                                "start": 6261,
+                                "end": 6268,
+                                "loc": {
+                                  "start": {
+                                    "line": 236,
+                                    "column": 26
                                   },
-                                  "leadingComments": null
+                                  "end": {
+                                    "line": 236,
+                                    "column": 33
+                                  }
                                 },
-                                "consequent": {
-                                  "type": "BlockStatement",
-                                  "start": 7130,
-                                  "end": 7148,
+                                "argument": {
+                                  "type": "Identifier",
+                                  "start": 6264,
+                                  "end": 6268,
                                   "loc": {
                                     "start": {
-                                      "line": 247,
-                                      "column": 26
+                                      "line": 236,
+                                      "column": 29
                                     },
                                     "end": {
-                                      "line": 249,
-                                      "column": 5
-                                    }
+                                      "line": 236,
+                                      "column": 33
+                                    },
+                                    "identifierName": "args"
                                   },
-                                  "body": [
-                                    {
-                                      "type": "BreakStatement",
-                                      "start": 7137,
-                                      "end": 7142,
-                                      "loc": {
-                                        "start": {
-                                          "line": 248,
-                                          "column": 5
-                                        },
-                                        "end": {
-                                          "line": 248,
-                                          "column": 10
-                                        }
-                                      },
-                                      "label": null
-                                    }
-                                  ],
-                                  "directives": []
-                                },
-                                "alternate": null,
-                                "leadingComments": [
-                                  {
-                                    "type": "CommentLine",
-                                    "value": " Stop the iteration when the callback returns false",
-                                    "start": 7050,
-                                    "end": 7103,
-                                    "loc": {
-                                      "start": {
-                                        "line": 246,
-                                        "column": 4
-                                      },
-                                      "end": {
-                                        "line": 246,
-                                        "column": 57
-                                      }
-                                    }
-                                  }
-                                ]
-                              }
-                            ],
-                            "directives": []
-                          },
-                          "leadingComments": [
-                            {
-                              "type": "CommentLine",
-                              "value": " Go through the map of entities",
-                              "start": 6535,
-                              "end": 6568,
-                              "loc": {
-                                "start": {
-                                  "line": 235,
-                                  "column": 3
-                                },
-                                "end": {
-                                  "line": 235,
-                                  "column": 36
+                                  "name": "args"
                                 }
                               }
-                            }
-                          ]
+                            ]
+                          }
                         }
                       ],
                       "directives": []
-                    },
-                    "alternate": null
-                  },
-                  {
-                    "type": "ReturnStatement",
-                    "start": 7161,
-                    "end": 7185,
-                    "loc": {
-                      "start": {
-                        "line": 253,
-                        "column": 2
-                      },
-                      "end": {
-                        "line": 253,
-                        "column": 26
-                      }
-                    },
-                    "argument": {
-                      "type": "CallExpression",
-                      "start": 7168,
-                      "end": 7185,
-                      "loc": {
-                        "start": {
-                          "line": 253,
-                          "column": 9
-                        },
-                        "end": {
-                          "line": 253,
-                          "column": 26
-                        }
-                      },
-                      "callee": {
-                        "type": "MemberExpression",
-                        "start": 7168,
-                        "end": 7183,
-                        "loc": {
-                          "start": {
-                            "line": 253,
-                            "column": 9
-                          },
-                          "end": {
-                            "line": 253,
-                            "column": 24
-                          }
-                        },
-                        "object": {
-                          "type": "Identifier",
-                          "start": 7168,
-                          "end": 7176,
-                          "loc": {
-                            "start": {
-                              "line": 253,
-                              "column": 9
-                            },
-                            "end": {
-                              "line": 253,
-                              "column": 17
-                            },
-                            "identifierName": "entities"
-                          },
-                          "name": "entities"
-                        },
-                        "property": {
-                          "type": "Identifier",
-                          "start": 7177,
-                          "end": 7183,
-                          "loc": {
-                            "start": {
-                              "line": 253,
-                              "column": 18
-                            },
-                            "end": {
-                              "line": 253,
-                              "column": 24
-                            },
-                            "identifierName": "values"
-                          },
-                          "name": "values"
-                        },
-                        "computed": false
-                      },
-                      "arguments": []
                     }
                   }
                 ],
@@ -7693,16 +7272,16 @@
               "leadingComments": [
                 {
                   "type": "CommentBlock",
-                  "value": "*\n\t * Iterate through entities with the specified components\n\t *\n\t * @example\n\t * // Use a callback to process entities one-by-one\n\t * world.every(['comp'], comp => {comp.value = 0})\n\t *\n\t * @example\n\t * // Get an iterator for the entities\n\t * let it = world.every(['comp'])\n\t * for (let entity of it) {...}\n\t *\n\t * @param {Array}     componentNames - The component names to match entites with. This checks if the entity\n\t * has ALL of the specified components, but does not check for additional components.\n\t * @param {Function}  callback       - The callback to call for each entity. Takes (...components, entity, ...args).\n\t * @param {...Object} [args]         - Any additional arguments to pass to the callback.\n\t *\n\t * @return {MapIterator} An iterator to the entities themselves\n\t ",
-                  "start": 5582,
-                  "end": 6373,
+                  "value": "*\n\t * Calls pre(), every(), and post() on all systems\n\t *\n\t * @example\n\t * world.run(deltaTime)\n\t *\n\t * @example\n\t * // Example flow of method call order:\n\t * // Setup systems:\n\t * world.system(systemA)\n\t * world.system(systemB)\n\t * // During world.run():\n\t * // systemA.pre()\n\t * // systemA.every() * number of entities\n\t * // systemA.post()\n\t * // systemB.pre()\n\t * // systemB.every() * number of entities\n\t * // systemB.post()\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' methods\n\t ",
+                  "start": 5471,
+                  "end": 5992,
                   "loc": {
                     "start": {
-                      "line": 211,
+                      "line": 206,
                       "column": 1
                     },
                     "end": {
-                      "line": 229,
+                      "line": 226,
                       "column": 4
                     }
                   }
@@ -7711,16 +7290,16 @@
               "trailingComments": [
                 {
                   "type": "CommentBlock",
-                  "value": "*\n\t * Returns an array of entities with matching components\n\t * Simplified version of every(), returns an actual array, and only takes component names as arguments.\n\t *\n\t * @example\n\t * world.get('player', 'sprite')\n\t *\n\t * @param {Array} componentNames - The component names to match on. See every() for how this matches.\n\t *\n\t * @return {Array} Array of entities, instead of iterator like every().\n\t ",
-                  "start": 7191,
-                  "end": 7597,
+                  "value": "*\n\t * Iterate through entities with the specified components\n\t *\n\t * @example\n\t * // Use a callback to process entities one-by-one\n\t * world.every(['comp'], comp => {comp.value = 0})\n\t *\n\t * @example\n\t * // Get an iterator for the entities\n\t * let it = world.every(['comp'])\n\t * for (let entity of it) {...}\n\t *\n\t * @param {Array}     componentNames - The component names to match entites with. This checks if the entity\n\t * has ALL of the specified components, but does not check for additional components.\n\t * @param {Function}  callback       - The callback to call for each entity. Takes (...components, entity, ...args).\n\t * @param {...Object} [args]         - Any additional arguments to pass to the callback.\n\t *\n\t * @return {MapIterator} An iterator to the entities themselves\n\t ",
+                  "start": 6279,
+                  "end": 7070,
                   "loc": {
                     "start": {
-                      "line": 256,
+                      "line": 240,
                       "column": 1
                     },
                     "end": {
-                      "line": 266,
+                      "line": 258,
                       "column": 4
                     }
                   }
@@ -7729,15 +7308,15 @@
             },
             {
               "type": "ClassMethod",
-              "start": 7599,
-              "end": 7667,
+              "start": 7072,
+              "end": 7885,
               "loc": {
                 "start": {
-                  "line": 267,
+                  "line": 259,
                   "column": 1
                 },
                 "end": {
-                  "line": 269,
+                  "line": 283,
                   "column": 2
                 }
               },
@@ -7745,20 +7324,20 @@
               "computed": false,
               "key": {
                 "type": "Identifier",
-                "start": 7599,
-                "end": 7602,
+                "start": 7072,
+                "end": 7077,
                 "loc": {
                   "start": {
-                    "line": 267,
+                    "line": 259,
                     "column": 1
                   },
                   "end": {
-                    "line": 267,
-                    "column": 4
+                    "line": 259,
+                    "column": 6
                   },
-                  "identifierName": "get"
+                  "identifierName": "every"
                 },
-                "name": "get",
+                "name": "every",
                 "leadingComments": null
               },
               "kind": "method",
@@ -7767,383 +7346,268 @@
               "expression": false,
               "async": false,
               "params": [
+                {
+                  "type": "Identifier",
+                  "start": 7078,
+                  "end": 7092,
+                  "loc": {
+                    "start": {
+                      "line": 259,
+                      "column": 7
+                    },
+                    "end": {
+                      "line": 259,
+                      "column": 21
+                    },
+                    "identifierName": "componentNames"
+                  },
+                  "name": "componentNames"
+                },
+                {
+                  "type": "Identifier",
+                  "start": 7094,
+                  "end": 7102,
+                  "loc": {
+                    "start": {
+                      "line": 259,
+                      "column": 23
+                    },
+                    "end": {
+                      "line": 259,
+                      "column": 31
+                    },
+                    "identifierName": "callback"
+                  },
+                  "name": "callback"
+                },
                 {
                   "type": "RestElement",
-                  "start": 7603,
-                  "end": 7620,
+                  "start": 7104,
+                  "end": 7111,
                   "loc": {
                     "start": {
-                      "line": 267,
-                      "column": 5
+                      "line": 259,
+                      "column": 33
                     },
                     "end": {
-                      "line": 267,
-                      "column": 22
+                      "line": 259,
+                      "column": 40
                     }
                   },
                   "argument": {
                     "type": "Identifier",
-                    "start": 7606,
-                    "end": 7620,
+                    "start": 7107,
+                    "end": 7111,
                     "loc": {
                       "start": {
-                        "line": 267,
-                        "column": 8
+                        "line": 259,
+                        "column": 36
                       },
                       "end": {
-                        "line": 267,
-                        "column": 22
+                        "line": 259,
+                        "column": 40
                       },
-                      "identifierName": "componentNames"
+                      "identifierName": "args"
                     },
-                    "name": "componentNames"
+                    "name": "args"
                   }
                 }
               ],
               "body": {
                 "type": "BlockStatement",
-                "start": 7622,
-                "end": 7667,
+                "start": 7113,
+                "end": 7885,
                 "loc": {
                   "start": {
-                    "line": 267,
-                    "column": 24
+                    "line": 259,
+                    "column": 42
                   },
                   "end": {
-                    "line": 269,
+                    "line": 283,
                     "column": 2
                   }
                 },
                 "body": [
                   {
-                    "type": "ReturnStatement",
-                    "start": 7626,
-                    "end": 7664,
+                    "type": "VariableDeclaration",
+                    "start": 7150,
+                    "end": 7197,
                     "loc": {
                       "start": {
-                        "line": 268,
+                        "line": 261,
                         "column": 2
                       },
                       "end": {
-                        "line": 268,
-                        "column": 40
+                        "line": 261,
+                        "column": 49
                       }
                     },
-                    "argument": {
-                      "type": "ArrayExpression",
-                      "start": 7633,
-                      "end": 7664,
-                      "loc": {
-                        "start": {
-                          "line": 268,
-                          "column": 9
+                    "declarations": [
+                      {
+                        "type": "VariableDeclarator",
+                        "start": 7154,
+                        "end": 7197,
+                        "loc": {
+                          "start": {
+                            "line": 261,
+                            "column": 6
+                          },
+                          "end": {
+                            "line": 261,
+                            "column": 49
+                          }
                         },
-                        "end": {
-                          "line": 268,
-                          "column": 40
-                        }
-                      },
-                      "elements": [
-                        {
-                          "type": "SpreadElement",
-                          "start": 7634,
-                          "end": 7663,
+                        "id": {
+                          "type": "Identifier",
+                          "start": 7154,
+                          "end": 7162,
                           "loc": {
                             "start": {
-                              "line": 268,
-                              "column": 10
+                              "line": 261,
+                              "column": 6
                             },
                             "end": {
-                              "line": 268,
-                              "column": 39
+                              "line": 261,
+                              "column": 14
+                            },
+                            "identifierName": "entities"
+                          },
+                          "name": "entities",
+                          "leadingComments": null
+                        },
+                        "init": {
+                          "type": "CallExpression",
+                          "start": 7165,
+                          "end": 7197,
+                          "loc": {
+                            "start": {
+                              "line": 261,
+                              "column": 17
+                            },
+                            "end": {
+                              "line": 261,
+                              "column": 49
                             }
                           },
-                          "argument": {
-                            "type": "CallExpression",
-                            "start": 7637,
-                            "end": 7663,
+                          "callee": {
+                            "type": "MemberExpression",
+                            "start": 7165,
+                            "end": 7181,
                             "loc": {
                               "start": {
-                                "line": 268,
-                                "column": 13
+                                "line": 261,
+                                "column": 17
                               },
                               "end": {
-                                "line": 268,
-                                "column": 39
+                                "line": 261,
+                                "column": 33
                               }
                             },
-                            "callee": {
+                            "object": {
                               "type": "MemberExpression",
-                              "start": 7637,
-                              "end": 7647,
+                              "start": 7165,
+                              "end": 7175,
                               "loc": {
                                 "start": {
-                                  "line": 268,
-                                  "column": 13
+                                  "line": 261,
+                                  "column": 17
                                 },
                                 "end": {
-                                  "line": 268,
-                                  "column": 23
+                                  "line": 261,
+                                  "column": 27
                                 }
                               },
                               "object": {
                                 "type": "ThisExpression",
-                                "start": 7637,
-                                "end": 7641,
+                                "start": 7165,
+                                "end": 7169,
                                 "loc": {
                                   "start": {
-                                    "line": 268,
-                                    "column": 13
+                                    "line": 261,
+                                    "column": 17
                                   },
                                   "end": {
-                                    "line": 268,
-                                    "column": 17
+                                    "line": 261,
+                                    "column": 21
                                   }
                                 }
                               },
                               "property": {
                                 "type": "Identifier",
-                                "start": 7642,
-                                "end": 7647,
+                                "start": 7170,
+                                "end": 7175,
                                 "loc": {
                                   "start": {
-                                    "line": 268,
-                                    "column": 18
+                                    "line": 261,
+                                    "column": 22
                                   },
                                   "end": {
-                                    "line": 268,
-                                    "column": 23
+                                    "line": 261,
+                                    "column": 27
                                   },
-                                  "identifierName": "every"
+                                  "identifierName": "index"
                                 },
-                                "name": "every"
+                                "name": "index"
                               },
                               "computed": false
                             },
-                            "arguments": [
-                              {
-                                "type": "Identifier",
-                                "start": 7648,
-                                "end": 7662,
-                                "loc": {
-                                  "start": {
-                                    "line": 268,
-                                    "column": 24
-                                  },
-                                  "end": {
-                                    "line": 268,
-                                    "column": 38
-                                  },
-                                  "identifierName": "componentNames"
+                            "property": {
+                              "type": "Identifier",
+                              "start": 7176,
+                              "end": 7181,
+                              "loc": {
+                                "start": {
+                                  "line": 261,
+                                  "column": 28
                                 },
-                                "name": "componentNames"
-                              }
-                            ]
-                          }
-                        }
-                      ]
-                    }
-                  }
-                ],
-                "directives": [],
-                "trailingComments": null
-              },
-              "leadingComments": [
-                {
-                  "type": "CommentBlock",
-                  "value": "*\n\t * Returns an array of entities with matching components\n\t * Simplified version of every(), returns an actual array, and only takes component names as arguments.\n\t *\n\t * @example\n\t * world.get('player', 'sprite')\n\t *\n\t * @param {Array} componentNames - The component names to match on. See every() for how this matches.\n\t *\n\t * @return {Array} Array of entities, instead of iterator like every().\n\t ",
-                  "start": 7191,
-                  "end": 7597,
-                  "loc": {
-                    "start": {
-                      "line": 256,
-                      "column": 1
-                    },
-                    "end": {
-                      "line": 266,
-                      "column": 4
-                    }
-                  }
-                }
-              ],
-              "trailingComments": [
-                {
-                  "type": "CommentBlock",
-                  "value": "*\n\t * Registers entity prototype(s). Any existing prototype names that are the same will be overwritten\n\t *\n\t * @example\n\t * world.prototype({\n\t *     Movable: {\n\t *         position: {},\n\t *         velocity: {}\n\t *     }\n\t * })\n\t *\n\t * @param {Object} data - Object structure to register as a prototype. Should be a dictionary with the top level keys\n\t * being the prototype names. Can also be a JSON formatted string.\n\t *\n\t * @return {number} Number of prototypes added.\n\t ",
-                  "start": 7670,
-                  "end": 8150,
-                  "loc": {
-                    "start": {
-                      "line": 271,
-                      "column": 1
-                    },
-                    "end": {
-                      "line": 286,
-                      "column": 4
-                    }
-                  }
-                }
-              ]
-            },
-            {
-              "type": "ClassMethod",
-              "start": 8152,
-              "end": 8790,
-              "loc": {
-                "start": {
-                  "line": 287,
-                  "column": 1
-                },
-                "end": {
-                  "line": 312,
-                  "column": 2
-                }
-              },
-              "static": false,
-              "computed": false,
-              "key": {
-                "type": "Identifier",
-                "start": 8152,
-                "end": 8161,
-                "loc": {
-                  "start": {
-                    "line": 287,
-                    "column": 1
-                  },
-                  "end": {
-                    "line": 287,
-                    "column": 10
-                  },
-                  "identifierName": "prototype"
-                },
-                "name": "prototype",
-                "leadingComments": null
-              },
-              "kind": "method",
-              "id": null,
-              "generator": false,
-              "expression": false,
-              "async": false,
-              "params": [
-                {
-                  "type": "Identifier",
-                  "start": 8162,
-                  "end": 8166,
-                  "loc": {
-                    "start": {
-                      "line": 287,
-                      "column": 11
-                    },
-                    "end": {
-                      "line": 287,
-                      "column": 15
-                    },
-                    "identifierName": "data"
-                  },
-                  "name": "data"
-                }
-              ],
-              "body": {
-                "type": "BlockStatement",
-                "start": 8168,
-                "end": 8790,
-                "loc": {
-                  "start": {
-                    "line": 287,
-                    "column": 17
-                  },
-                  "end": {
-                    "line": 312,
-                    "column": 2
-                  }
-                },
-                "body": [
-                  {
-                    "type": "VariableDeclaration",
-                    "start": 8172,
-                    "end": 8185,
-                    "loc": {
-                      "start": {
-                        "line": 288,
-                        "column": 2
-                      },
-                      "end": {
-                        "line": 288,
-                        "column": 15
-                      }
-                    },
-                    "declarations": [
-                      {
-                        "type": "VariableDeclarator",
-                        "start": 8176,
-                        "end": 8185,
-                        "loc": {
-                          "start": {
-                            "line": 288,
-                            "column": 6
-                          },
-                          "end": {
-                            "line": 288,
-                            "column": 15
-                          }
-                        },
-                        "id": {
-                          "type": "Identifier",
-                          "start": 8176,
-                          "end": 8181,
-                          "loc": {
-                            "start": {
-                              "line": 288,
-                              "column": 6
-                            },
-                            "end": {
-                              "line": 288,
-                              "column": 11
+                                "end": {
+                                  "line": 261,
+                                  "column": 33
+                                },
+                                "identifierName": "query"
+                              },
+                              "name": "query"
                             },
-                            "identifierName": "count"
+                            "computed": false
                           },
-                          "name": "count"
-                        },
-                        "init": {
-                          "type": "NumericLiteral",
-                          "start": 8184,
-                          "end": 8185,
-                          "loc": {
-                            "start": {
-                              "line": 288,
-                              "column": 14
-                            },
-                            "end": {
-                              "line": 288,
-                              "column": 15
+                          "arguments": [
+                            {
+                              "type": "Identifier",
+                              "start": 7182,
+                              "end": 7196,
+                              "loc": {
+                                "start": {
+                                  "line": 261,
+                                  "column": 34
+                                },
+                                "end": {
+                                  "line": 261,
+                                  "column": 48
+                                },
+                                "identifierName": "componentNames"
+                              },
+                              "name": "componentNames"
                             }
-                          },
-                          "extra": {
-                            "rawValue": 0,
-                            "raw": "0"
-                          },
-                          "value": 0,
-                          "leadingComments": null,
-                          "trailingComments": null
+                          ]
                         },
-                        "trailingComments": null
+                        "leadingComments": null
                       }
                     ],
                     "kind": "let",
-                    "trailingComments": [
+                    "leadingComments": [
                       {
                         "type": "CommentLine",
-                        "value": " Convert to an object when given a string",
-                        "start": 8189,
-                        "end": 8232,
+                        "value": " Get indexed map of entities",
+                        "start": 7117,
+                        "end": 7147,
                         "loc": {
                           "start": {
-                            "line": 290,
+                            "line": 260,
                             "column": 2
                           },
                           "end": {
-                            "line": 290,
-                            "column": 45
+                            "line": 260,
+                            "column": 32
                           }
                         }
                       }
@@ -8151,1196 +7615,867 @@
                   },
                   {
                     "type": "IfStatement",
-                    "start": 8235,
-                    "end": 8297,
+                    "start": 7201,
+                    "end": 7854,
                     "loc": {
                       "start": {
-                        "line": 291,
+                        "line": 263,
                         "column": 2
                       },
                       "end": {
-                        "line": 293,
+                        "line": 280,
                         "column": 3
                       }
                     },
                     "test": {
-                      "type": "BinaryExpression",
-                      "start": 8239,
-                      "end": 8263,
+                      "type": "CallExpression",
+                      "start": 7205,
+                      "end": 7225,
                       "loc": {
                         "start": {
-                          "line": 291,
+                          "line": 263,
                           "column": 6
                         },
                         "end": {
-                          "line": 291,
-                          "column": 30
+                          "line": 263,
+                          "column": 26
                         }
                       },
-                      "left": {
-                        "type": "UnaryExpression",
-                        "start": 8239,
-                        "end": 8250,
+                      "callee": {
+                        "type": "Identifier",
+                        "start": 7205,
+                        "end": 7215,
                         "loc": {
                           "start": {
-                            "line": 291,
+                            "line": 263,
                             "column": 6
                           },
                           "end": {
-                            "line": 291,
-                            "column": 17
-                          }
+                            "line": 263,
+                            "column": 16
+                          },
+                          "identifierName": "isFunction"
                         },
-                        "operator": "typeof",
-                        "prefix": true,
-                        "argument": {
+                        "name": "isFunction"
+                      },
+                      "arguments": [
+                        {
                           "type": "Identifier",
-                          "start": 8246,
-                          "end": 8250,
+                          "start": 7216,
+                          "end": 7224,
                           "loc": {
                             "start": {
-                              "line": 291,
-                              "column": 13
+                              "line": 263,
+                              "column": 17
                             },
                             "end": {
-                              "line": 291,
-                              "column": 17
+                              "line": 263,
+                              "column": 25
                             },
-                            "identifierName": "data"
-                          },
-                          "name": "data",
-                          "leadingComments": null
-                        },
-                        "extra": {
-                          "parenthesizedArgument": false
-                        },
-                        "leadingComments": null
-                      },
-                      "operator": "===",
-                      "right": {
-                        "type": "StringLiteral",
-                        "start": 8255,
-                        "end": 8263,
-                        "loc": {
-                          "start": {
-                            "line": 291,
-                            "column": 22
+                            "identifierName": "callback"
                           },
-                          "end": {
-                            "line": 291,
-                            "column": 30
-                          }
-                        },
-                        "extra": {
-                          "rawValue": "string",
-                          "raw": "'string'"
-                        },
-                        "value": "string"
-                      },
-                      "leadingComments": null
+                          "name": "callback"
+                        }
+                      ]
                     },
                     "consequent": {
                       "type": "BlockStatement",
-                      "start": 8265,
-                      "end": 8297,
+                      "start": 7227,
+                      "end": 7854,
                       "loc": {
                         "start": {
-                          "line": 291,
-                          "column": 32
+                          "line": 263,
+                          "column": 28
                         },
                         "end": {
-                          "line": 293,
+                          "line": 280,
                           "column": 3
                         }
                       },
                       "body": [
                         {
-                          "type": "ExpressionStatement",
-                          "start": 8270,
-                          "end": 8293,
+                          "type": "ForOfStatement",
+                          "start": 7269,
+                          "end": 7850,
                           "loc": {
                             "start": {
-                              "line": 292,
+                              "line": 265,
                               "column": 3
                             },
                             "end": {
-                              "line": 292,
-                              "column": 26
+                              "line": 279,
+                              "column": 4
                             }
                           },
-                          "expression": {
-                            "type": "AssignmentExpression",
-                            "start": 8270,
-                            "end": 8293,
+                          "left": {
+                            "type": "VariableDeclaration",
+                            "start": 7274,
+                            "end": 7284,
                             "loc": {
                               "start": {
-                                "line": 292,
-                                "column": 3
+                                "line": 265,
+                                "column": 8
                               },
                               "end": {
-                                "line": 292,
-                                "column": 26
+                                "line": 265,
+                                "column": 18
                               }
                             },
-                            "operator": "=",
-                            "left": {
-                              "type": "Identifier",
-                              "start": 8270,
-                              "end": 8274,
-                              "loc": {
-                                "start": {
-                                  "line": 292,
-                                  "column": 3
+                            "declarations": [
+                              {
+                                "type": "VariableDeclarator",
+                                "start": 7278,
+                                "end": 7284,
+                                "loc": {
+                                  "start": {
+                                    "line": 265,
+                                    "column": 12
+                                  },
+                                  "end": {
+                                    "line": 265,
+                                    "column": 18
+                                  }
                                 },
-                                "end": {
-                                  "line": 292,
-                                  "column": 7
+                                "id": {
+                                  "type": "Identifier",
+                                  "start": 7278,
+                                  "end": 7284,
+                                  "loc": {
+                                    "start": {
+                                      "line": 265,
+                                      "column": 12
+                                    },
+                                    "end": {
+                                      "line": 265,
+                                      "column": 18
+                                    },
+                                    "identifierName": "entity"
+                                  },
+                                  "name": "entity",
+                                  "leadingComments": null
                                 },
-                                "identifierName": "data"
+                                "init": null,
+                                "leadingComments": null
+                              }
+                            ],
+                            "kind": "let",
+                            "leadingComments": null
+                          },
+                          "right": {
+                            "type": "CallExpression",
+                            "start": 7288,
+                            "end": 7305,
+                            "loc": {
+                              "start": {
+                                "line": 265,
+                                "column": 22
                               },
-                              "name": "data"
+                              "end": {
+                                "line": 265,
+                                "column": 39
+                              }
                             },
-                            "right": {
-                              "type": "CallExpression",
-                              "start": 8277,
-                              "end": 8293,
+                            "callee": {
+                              "type": "MemberExpression",
+                              "start": 7288,
+                              "end": 7303,
                               "loc": {
                                 "start": {
-                                  "line": 292,
-                                  "column": 10
+                                  "line": 265,
+                                  "column": 22
                                 },
                                 "end": {
-                                  "line": 292,
-                                  "column": 26
+                                  "line": 265,
+                                  "column": 37
                                 }
                               },
-                              "callee": {
-                                "type": "MemberExpression",
-                                "start": 8277,
-                                "end": 8287,
+                              "object": {
+                                "type": "Identifier",
+                                "start": 7288,
+                                "end": 7296,
                                 "loc": {
                                   "start": {
-                                    "line": 292,
-                                    "column": 10
+                                    "line": 265,
+                                    "column": 22
                                   },
                                   "end": {
-                                    "line": 292,
-                                    "column": 20
-                                  }
-                                },
-                                "object": {
-                                  "type": "Identifier",
-                                  "start": 8277,
-                                  "end": 8281,
-                                  "loc": {
-                                    "start": {
-                                      "line": 292,
-                                      "column": 10
-                                    },
-                                    "end": {
-                                      "line": 292,
-                                      "column": 14
-                                    },
-                                    "identifierName": "JSON"
+                                    "line": 265,
+                                    "column": 30
                                   },
-                                  "name": "JSON"
+                                  "identifierName": "entities"
                                 },
-                                "property": {
-                                  "type": "Identifier",
-                                  "start": 8282,
-                                  "end": 8287,
-                                  "loc": {
-                                    "start": {
-                                      "line": 292,
-                                      "column": 15
-                                    },
-                                    "end": {
-                                      "line": 292,
-                                      "column": 20
-                                    },
-                                    "identifierName": "parse"
+                                "name": "entities"
+                              },
+                              "property": {
+                                "type": "Identifier",
+                                "start": 7297,
+                                "end": 7303,
+                                "loc": {
+                                  "start": {
+                                    "line": 265,
+                                    "column": 31
                                   },
-                                  "name": "parse"
+                                  "end": {
+                                    "line": 265,
+                                    "column": 37
+                                  },
+                                  "identifierName": "values"
                                 },
-                                "computed": false
+                                "name": "values"
                               },
-                              "arguments": [
-                                {
-                                  "type": "Identifier",
-                                  "start": 8288,
-                                  "end": 8292,
-                                  "loc": {
-                                    "start": {
-                                      "line": 292,
-                                      "column": 21
+                              "computed": false
+                            },
+                            "arguments": []
+                          },
+                          "body": {
+                            "type": "BlockStatement",
+                            "start": 7307,
+                            "end": 7850,
+                            "loc": {
+                              "start": {
+                                "line": 265,
+                                "column": 41
+                              },
+                              "end": {
+                                "line": 279,
+                                "column": 4
+                              }
+                            },
+                            "body": [
+                              {
+                                "type": "VariableDeclaration",
+                                "start": 7545,
+                                "end": 7606,
+                                "loc": {
+                                  "start": {
+                                    "line": 270,
+                                    "column": 4
+                                  },
+                                  "end": {
+                                    "line": 270,
+                                    "column": 65
+                                  }
+                                },
+                                "declarations": [
+                                  {
+                                    "type": "VariableDeclarator",
+                                    "start": 7549,
+                                    "end": 7606,
+                                    "loc": {
+                                      "start": {
+                                        "line": 270,
+                                        "column": 8
+                                      },
+                                      "end": {
+                                        "line": 270,
+                                        "column": 65
+                                      }
                                     },
-                                    "end": {
-                                      "line": 292,
-                                      "column": 25
-                                    },
-                                    "identifierName": "data"
-                                  },
-                                  "name": "data"
-                                }
-                              ]
-                            }
-                          }
-                        }
-                      ],
-                      "directives": [],
-                      "trailingComments": null
-                    },
-                    "alternate": null,
-                    "leadingComments": [
-                      {
-                        "type": "CommentLine",
-                        "value": " Convert to an object when given a string",
-                        "start": 8189,
-                        "end": 8232,
-                        "loc": {
-                          "start": {
-                            "line": 290,
-                            "column": 2
-                          },
-                          "end": {
-                            "line": 290,
-                            "column": 45
-                          }
-                        }
-                      }
-                    ],
-                    "trailingComments": [
-                      {
-                        "type": "CommentLine",
-                        "value": " Data must be an object at this point",
-                        "start": 8301,
-                        "end": 8340,
-                        "loc": {
-                          "start": {
-                            "line": 295,
-                            "column": 2
-                          },
-                          "end": {
-                            "line": 295,
-                            "column": 41
-                          }
-                        }
-                      }
-                    ]
-                  },
-                  {
-                    "type": "IfStatement",
-                    "start": 8343,
-                    "end": 8771,
-                    "loc": {
-                      "start": {
-                        "line": 296,
-                        "column": 2
-                      },
-                      "end": {
-                        "line": 309,
-                        "column": 3
-                      }
-                    },
-                    "test": {
-                      "type": "BinaryExpression",
-                      "start": 8347,
-                      "end": 8371,
-                      "loc": {
-                        "start": {
-                          "line": 296,
-                          "column": 6
-                        },
-                        "end": {
-                          "line": 296,
-                          "column": 30
-                        }
-                      },
-                      "left": {
-                        "type": "UnaryExpression",
-                        "start": 8347,
-                        "end": 8358,
-                        "loc": {
-                          "start": {
-                            "line": 296,
-                            "column": 6
-                          },
-                          "end": {
-                            "line": 296,
-                            "column": 17
-                          }
-                        },
-                        "operator": "typeof",
-                        "prefix": true,
-                        "argument": {
-                          "type": "Identifier",
-                          "start": 8354,
-                          "end": 8358,
-                          "loc": {
-                            "start": {
-                              "line": 296,
-                              "column": 13
-                            },
-                            "end": {
-                              "line": 296,
-                              "column": 17
-                            },
-                            "identifierName": "data"
-                          },
-                          "name": "data",
-                          "leadingComments": null
-                        },
-                        "extra": {
-                          "parenthesizedArgument": false
-                        },
-                        "leadingComments": null
-                      },
-                      "operator": "===",
-                      "right": {
-                        "type": "StringLiteral",
-                        "start": 8363,
-                        "end": 8371,
-                        "loc": {
-                          "start": {
-                            "line": 296,
-                            "column": 22
-                          },
-                          "end": {
-                            "line": 296,
-                            "column": 30
-                          }
-                        },
-                        "extra": {
-                          "rawValue": "object",
-                          "raw": "'object'"
-                        },
-                        "value": "object"
-                      },
-                      "leadingComments": null
-                    },
-                    "consequent": {
-                      "type": "BlockStatement",
-                      "start": 8373,
-                      "end": 8771,
-                      "loc": {
-                        "start": {
-                          "line": 296,
-                          "column": 32
-                        },
-                        "end": {
-                          "line": 309,
-                          "column": 3
-                        }
-                      },
-                      "body": [
-                        {
-                          "type": "ForInStatement",
-                          "start": 8416,
-                          "end": 8767,
-                          "loc": {
-                            "start": {
-                              "line": 298,
-                              "column": 3
-                            },
-                            "end": {
-                              "line": 308,
-                              "column": 4
-                            }
-                          },
-                          "left": {
-                            "type": "VariableDeclaration",
-                            "start": 8421,
-                            "end": 8434,
-                            "loc": {
-                              "start": {
-                                "line": 298,
-                                "column": 8
-                              },
-                              "end": {
-                                "line": 298,
-                                "column": 21
-                              }
-                            },
-                            "declarations": [
-                              {
-                                "type": "VariableDeclarator",
-                                "start": 8425,
-                                "end": 8434,
-                                "loc": {
-                                  "start": {
-                                    "line": 298,
-                                    "column": 12
-                                  },
-                                  "end": {
-                                    "line": 298,
-                                    "column": 21
-                                  }
-                                },
-                                "id": {
-                                  "type": "Identifier",
-                                  "start": 8425,
-                                  "end": 8434,
-                                  "loc": {
-                                    "start": {
-                                      "line": 298,
-                                      "column": 12
-                                    },
-                                    "end": {
-                                      "line": 298,
-                                      "column": 21
-                                    },
-                                    "identifierName": "protoName"
-                                  },
-                                  "name": "protoName",
-                                  "leadingComments": null
-                                },
-                                "init": null,
-                                "leadingComments": null
-                              }
-                            ],
-                            "kind": "let",
-                            "leadingComments": null
-                          },
-                          "right": {
-                            "type": "Identifier",
-                            "start": 8438,
-                            "end": 8442,
-                            "loc": {
-                              "start": {
-                                "line": 298,
-                                "column": 25
-                              },
-                              "end": {
-                                "line": 298,
-                                "column": 29
-                              },
-                              "identifierName": "data"
-                            },
-                            "name": "data"
-                          },
-                          "body": {
-                            "type": "BlockStatement",
-                            "start": 8444,
-                            "end": 8767,
-                            "loc": {
-                              "start": {
-                                "line": 298,
-                                "column": 31
-                              },
-                              "end": {
-                                "line": 308,
-                                "column": 4
-                              }
-                            },
-                            "body": [
-                              {
-                                "type": "VariableDeclaration",
-                                "start": 8450,
-                                "end": 8483,
-                                "loc": {
-                                  "start": {
-                                    "line": 299,
-                                    "column": 4
-                                  },
-                                  "end": {
-                                    "line": 299,
-                                    "column": 37
-                                  }
-                                },
-                                "declarations": [
-                                  {
-                                    "type": "VariableDeclarator",
-                                    "start": 8454,
-                                    "end": 8483,
-                                    "loc": {
-                                      "start": {
-                                        "line": 299,
-                                        "column": 8
-                                      },
-                                      "end": {
-                                        "line": 299,
-                                        "column": 37
-                                      }
-                                    },
-                                    "id": {
-                                      "type": "Identifier",
-                                      "start": 8454,
-                                      "end": 8465,
-                                      "loc": {
-                                        "start": {
-                                          "line": 299,
-                                          "column": 8
-                                        },
-                                        "end": {
-                                          "line": 299,
-                                          "column": 19
-                                        },
-                                        "identifierName": "inputObject"
-                                      },
-                                      "name": "inputObject"
+                                    "id": {
+                                      "type": "Identifier",
+                                      "start": 7549,
+                                      "end": 7559,
+                                      "loc": {
+                                        "start": {
+                                          "line": 270,
+                                          "column": 8
+                                        },
+                                        "end": {
+                                          "line": 270,
+                                          "column": 18
+                                        },
+                                        "identifierName": "components"
+                                      },
+                                      "name": "components",
+                                      "leadingComments": null
                                     },
                                     "init": {
-                                      "type": "MemberExpression",
-                                      "start": 8468,
-                                      "end": 8483,
+                                      "type": "CallExpression",
+                                      "start": 7562,
+                                      "end": 7606,
                                       "loc": {
                                         "start": {
-                                          "line": 299,
-                                          "column": 22
+                                          "line": 270,
+                                          "column": 21
                                         },
                                         "end": {
-                                          "line": 299,
-                                          "column": 37
+                                          "line": 270,
+                                          "column": 65
                                         }
                                       },
-                                      "object": {
-                                        "type": "Identifier",
-                                        "start": 8468,
-                                        "end": 8472,
+                                      "callee": {
+                                        "type": "MemberExpression",
+                                        "start": 7562,
+                                        "end": 7580,
                                         "loc": {
                                           "start": {
-                                            "line": 299,
-                                            "column": 22
+                                            "line": 270,
+                                            "column": 21
                                           },
                                           "end": {
-                                            "line": 299,
-                                            "column": 26
-                                          },
-                                          "identifierName": "data"
+                                            "line": 270,
+                                            "column": 39
+                                          }
                                         },
-                                        "name": "data"
-                                      },
-                                      "property": {
-                                        "type": "Identifier",
-                                        "start": 8473,
-                                        "end": 8482,
-                                        "loc": {
-                                          "start": {
-                                            "line": 299,
-                                            "column": 27
+                                        "object": {
+                                          "type": "Identifier",
+                                          "start": 7562,
+                                          "end": 7576,
+                                          "loc": {
+                                            "start": {
+                                              "line": 270,
+                                              "column": 21
+                                            },
+                                            "end": {
+                                              "line": 270,
+                                              "column": 35
+                                            },
+                                            "identifierName": "componentNames"
                                           },
-                                          "end": {
-                                            "line": 299,
-                                            "column": 36
+                                          "name": "componentNames"
+                                        },
+                                        "property": {
+                                          "type": "Identifier",
+                                          "start": 7577,
+                                          "end": 7580,
+                                          "loc": {
+                                            "start": {
+                                              "line": 270,
+                                              "column": 36
+                                            },
+                                            "end": {
+                                              "line": 270,
+                                              "column": 39
+                                            },
+                                            "identifierName": "map"
                                           },
-                                          "identifierName": "protoName"
+                                          "name": "map"
                                         },
-                                        "name": "protoName"
+                                        "computed": false
                                       },
-                                      "computed": true
+                                      "arguments": [
+                                        {
+                                          "type": "ArrowFunctionExpression",
+                                          "start": 7581,
+                                          "end": 7605,
+                                          "loc": {
+                                            "start": {
+                                              "line": 270,
+                                              "column": 40
+                                            },
+                                            "end": {
+                                              "line": 270,
+                                              "column": 64
+                                            }
+                                          },
+                                          "id": null,
+                                          "generator": false,
+                                          "expression": true,
+                                          "async": false,
+                                          "params": [
+                                            {
+                                              "type": "Identifier",
+                                              "start": 7581,
+                                              "end": 7585,
+                                              "loc": {
+                                                "start": {
+                                                  "line": 270,
+                                                  "column": 40
+                                                },
+                                                "end": {
+                                                  "line": 270,
+                                                  "column": 44
+                                                },
+                                                "identifierName": "name"
+                                              },
+                                              "name": "name"
+                                            }
+                                          ],
+                                          "body": {
+                                            "type": "CallExpression",
+                                            "start": 7589,
+                                            "end": 7605,
+                                            "loc": {
+                                              "start": {
+                                                "line": 270,
+                                                "column": 48
+                                              },
+                                              "end": {
+                                                "line": 270,
+                                                "column": 64
+                                              }
+                                            },
+                                            "callee": {
+                                              "type": "MemberExpression",
+                                              "start": 7589,
+                                              "end": 7599,
+                                              "loc": {
+                                                "start": {
+                                                  "line": 270,
+                                                  "column": 48
+                                                },
+                                                "end": {
+                                                  "line": 270,
+                                                  "column": 58
+                                                }
+                                              },
+                                              "object": {
+                                                "type": "Identifier",
+                                                "start": 7589,
+                                                "end": 7595,
+                                                "loc": {
+                                                  "start": {
+                                                    "line": 270,
+                                                    "column": 48
+                                                  },
+                                                  "end": {
+                                                    "line": 270,
+                                                    "column": 54
+                                                  },
+                                                  "identifierName": "entity"
+                                                },
+                                                "name": "entity"
+                                              },
+                                              "property": {
+                                                "type": "Identifier",
+                                                "start": 7596,
+                                                "end": 7599,
+                                                "loc": {
+                                                  "start": {
+                                                    "line": 270,
+                                                    "column": 55
+                                                  },
+                                                  "end": {
+                                                    "line": 270,
+                                                    "column": 58
+                                                  },
+                                                  "identifierName": "get"
+                                                },
+                                                "name": "get"
+                                              },
+                                              "computed": false
+                                            },
+                                            "arguments": [
+                                              {
+                                                "type": "Identifier",
+                                                "start": 7600,
+                                                "end": 7604,
+                                                "loc": {
+                                                  "start": {
+                                                    "line": 270,
+                                                    "column": 59
+                                                  },
+                                                  "end": {
+                                                    "line": 270,
+                                                    "column": 63
+                                                  },
+                                                  "identifierName": "name"
+                                                },
+                                                "name": "name"
+                                              }
+                                            ]
+                                          }
+                                        }
+                                      ],
+                                      "trailingComments": null
+                                    },
+                                    "leadingComments": null,
+                                    "trailingComments": null
+                                  }
+                                ],
+                                "kind": "let",
+                                "leadingComments": [
+                                  {
+                                    "type": "CommentLine",
+                                    "value": " At this point, we can safely assume that all components exist, even if entities/components",
+                                    "start": 7313,
+                                    "end": 7406,
+                                    "loc": {
+                                      "start": {
+                                        "line": 266,
+                                        "column": 4
+                                      },
+                                      "end": {
+                                        "line": 266,
+                                        "column": 97
+                                      }
+                                    }
+                                  },
+                                  {
+                                    "type": "CommentLine",
+                                    "value": " are deleted/modified during the loop, because JavaScript's MapIterator is smart enough.",
+                                    "start": 7411,
+                                    "end": 7501,
+                                    "loc": {
+                                      "start": {
+                                        "line": 267,
+                                        "column": 4
+                                      },
+                                      "end": {
+                                        "line": 267,
+                                        "column": 94
+                                      }
+                                    }
+                                  },
+                                  {
+                                    "type": "CommentLine",
+                                    "value": " Get all components as an array",
+                                    "start": 7507,
+                                    "end": 7540,
+                                    "loc": {
+                                      "start": {
+                                        "line": 269,
+                                        "column": 4
+                                      },
+                                      "end": {
+                                        "line": 269,
+                                        "column": 37
+                                      }
                                     }
                                   }
                                 ],
-                                "kind": "let"
+                                "trailingComments": [
+                                  {
+                                    "type": "CommentLine",
+                                    "value": " Pass components, then the main entity, then any additional arguments",
+                                    "start": 7612,
+                                    "end": 7683,
+                                    "loc": {
+                                      "start": {
+                                        "line": 272,
+                                        "column": 4
+                                      },
+                                      "end": {
+                                        "line": 272,
+                                        "column": 75
+                                      }
+                                    }
+                                  }
+                                ]
                               },
                               {
                                 "type": "VariableDeclaration",
-                                "start": 8488,
-                                "end": 8508,
+                                "start": 7688,
+                                "end": 7741,
                                 "loc": {
                                   "start": {
-                                    "line": 300,
+                                    "line": 273,
                                     "column": 4
                                   },
                                   "end": {
-                                    "line": 300,
-                                    "column": 24
+                                    "line": 273,
+                                    "column": 57
                                   }
                                 },
                                 "declarations": [
                                   {
                                     "type": "VariableDeclarator",
-                                    "start": 8492,
-                                    "end": 8508,
+                                    "start": 7692,
+                                    "end": 7741,
                                     "loc": {
                                       "start": {
-                                        "line": 300,
+                                        "line": 273,
                                         "column": 8
                                       },
                                       "end": {
-                                        "line": 300,
-                                        "column": 24
+                                        "line": 273,
+                                        "column": 57
                                       }
                                     },
                                     "id": {
                                       "type": "Identifier",
-                                      "start": 8492,
-                                      "end": 8503,
+                                      "start": 7692,
+                                      "end": 7698,
                                       "loc": {
                                         "start": {
-                                          "line": 300,
+                                          "line": 273,
                                           "column": 8
                                         },
                                         "end": {
-                                          "line": 300,
-                                          "column": 19
+                                          "line": 273,
+                                          "column": 14
                                         },
-                                        "identifierName": "protoObject"
+                                        "identifierName": "status"
                                       },
-                                      "name": "protoObject"
+                                      "name": "status",
+                                      "leadingComments": null
                                     },
                                     "init": {
-                                      "type": "ObjectExpression",
-                                      "start": 8506,
-                                      "end": 8508,
+                                      "type": "CallExpression",
+                                      "start": 7701,
+                                      "end": 7741,
                                       "loc": {
                                         "start": {
-                                          "line": 300,
-                                          "column": 22
+                                          "line": 273,
+                                          "column": 17
                                         },
                                         "end": {
-                                          "line": 300,
-                                          "column": 24
+                                          "line": 273,
+                                          "column": 57
                                         }
                                       },
-                                      "properties": [],
-                                      "leadingComments": null,
+                                      "callee": {
+                                        "type": "Identifier",
+                                        "start": 7701,
+                                        "end": 7709,
+                                        "loc": {
+                                          "start": {
+                                            "line": 273,
+                                            "column": 17
+                                          },
+                                          "end": {
+                                            "line": 273,
+                                            "column": 25
+                                          },
+                                          "identifierName": "callback"
+                                        },
+                                        "name": "callback"
+                                      },
+                                      "arguments": [
+                                        {
+                                          "type": "SpreadElement",
+                                          "start": 7710,
+                                          "end": 7723,
+                                          "loc": {
+                                            "start": {
+                                              "line": 273,
+                                              "column": 26
+                                            },
+                                            "end": {
+                                              "line": 273,
+                                              "column": 39
+                                            }
+                                          },
+                                          "argument": {
+                                            "type": "Identifier",
+                                            "start": 7713,
+                                            "end": 7723,
+                                            "loc": {
+                                              "start": {
+                                                "line": 273,
+                                                "column": 29
+                                              },
+                                              "end": {
+                                                "line": 273,
+                                                "column": 39
+                                              },
+                                              "identifierName": "components"
+                                            },
+                                            "name": "components"
+                                          }
+                                        },
+                                        {
+                                          "type": "Identifier",
+                                          "start": 7725,
+                                          "end": 7731,
+                                          "loc": {
+                                            "start": {
+                                              "line": 273,
+                                              "column": 41
+                                            },
+                                            "end": {
+                                              "line": 273,
+                                              "column": 47
+                                            },
+                                            "identifierName": "entity"
+                                          },
+                                          "name": "entity"
+                                        },
+                                        {
+                                          "type": "SpreadElement",
+                                          "start": 7733,
+                                          "end": 7740,
+                                          "loc": {
+                                            "start": {
+                                              "line": 273,
+                                              "column": 49
+                                            },
+                                            "end": {
+                                              "line": 273,
+                                              "column": 56
+                                            }
+                                          },
+                                          "argument": {
+                                            "type": "Identifier",
+                                            "start": 7736,
+                                            "end": 7740,
+                                            "loc": {
+                                              "start": {
+                                                "line": 273,
+                                                "column": 52
+                                              },
+                                              "end": {
+                                                "line": 273,
+                                                "column": 56
+                                              },
+                                              "identifierName": "args"
+                                            },
+                                            "name": "args"
+                                          }
+                                        }
+                                      ],
                                       "trailingComments": null
                                     },
+                                    "leadingComments": null,
                                     "trailingComments": null
                                   }
                                 ],
                                 "kind": "let",
-                                "trailingComments": [
+                                "leadingComments": [
                                   {
                                     "type": "CommentLine",
-                                    "value": " Iterate through component names",
-                                    "start": 8513,
-                                    "end": 8547,
+                                    "value": " Pass components, then the main entity, then any additional arguments",
+                                    "start": 7612,
+                                    "end": 7683,
                                     "loc": {
                                       "start": {
-                                        "line": 301,
+                                        "line": 272,
                                         "column": 4
                                       },
                                       "end": {
-                                        "line": 301,
-                                        "column": 38
+                                        "line": 272,
+                                        "column": 75
+                                      }
+                                    }
+                                  }
+                                ],
+                                "trailingComments": [
+                                  {
+                                    "type": "CommentLine",
+                                    "value": " Stop the iteration when the callback returns false",
+                                    "start": 7747,
+                                    "end": 7800,
+                                    "loc": {
+                                      "start": {
+                                        "line": 275,
+                                        "column": 4
+                                      },
+                                      "end": {
+                                        "line": 275,
+                                        "column": 57
                                       }
                                     }
                                   }
                                 ]
                               },
                               {
-                                "type": "ForInStatement",
-                                "start": 8552,
-                                "end": 8700,
+                                "type": "IfStatement",
+                                "start": 7805,
+                                "end": 7845,
                                 "loc": {
                                   "start": {
-                                    "line": 302,
+                                    "line": 276,
                                     "column": 4
                                   },
                                   "end": {
-                                    "line": 305,
+                                    "line": 278,
                                     "column": 5
                                   }
                                 },
-                                "left": {
-                                  "type": "VariableDeclaration",
-                                  "start": 8557,
-                                  "end": 8569,
+                                "test": {
+                                  "type": "BinaryExpression",
+                                  "start": 7809,
+                                  "end": 7825,
                                   "loc": {
                                     "start": {
-                                      "line": 302,
-                                      "column": 9
+                                      "line": 276,
+                                      "column": 8
                                     },
                                     "end": {
-                                      "line": 302,
-                                      "column": 21
+                                      "line": 276,
+                                      "column": 24
                                     }
                                   },
-                                  "declarations": [
-                                    {
-                                      "type": "VariableDeclarator",
-                                      "start": 8561,
-                                      "end": 8569,
-                                      "loc": {
-                                        "start": {
-                                          "line": 302,
-                                          "column": 13
-                                        },
-                                        "end": {
-                                          "line": 302,
-                                          "column": 21
-                                        }
+                                  "left": {
+                                    "type": "Identifier",
+                                    "start": 7809,
+                                    "end": 7815,
+                                    "loc": {
+                                      "start": {
+                                        "line": 276,
+                                        "column": 8
                                       },
-                                      "id": {
-                                        "type": "Identifier",
-                                        "start": 8561,
-                                        "end": 8569,
-                                        "loc": {
-                                          "start": {
-                                            "line": 302,
-                                            "column": 13
-                                          },
-                                          "end": {
-                                            "line": 302,
-                                            "column": 21
-                                          },
-                                          "identifierName": "compName"
-                                        },
-                                        "name": "compName",
-                                        "leadingComments": null
+                                      "end": {
+                                        "line": 276,
+                                        "column": 14
                                       },
-                                      "init": null,
-                                      "leadingComments": null
-                                    }
-                                  ],
-                                  "kind": "let",
-                                  "leadingComments": null
-                                },
-                                "right": {
-                                  "type": "Identifier",
-                                  "start": 8573,
-                                  "end": 8584,
-                                  "loc": {
-                                    "start": {
-                                      "line": 302,
-                                      "column": 25
+                                      "identifierName": "status"
                                     },
-                                    "end": {
-                                      "line": 302,
-                                      "column": 36
+                                    "name": "status",
+                                    "leadingComments": null
+                                  },
+                                  "operator": "===",
+                                  "right": {
+                                    "type": "BooleanLiteral",
+                                    "start": 7820,
+                                    "end": 7825,
+                                    "loc": {
+                                      "start": {
+                                        "line": 276,
+                                        "column": 19
+                                      },
+                                      "end": {
+                                        "line": 276,
+                                        "column": 24
+                                      }
                                     },
-                                    "identifierName": "inputObject"
+                                    "value": false
                                   },
-                                  "name": "inputObject"
+                                  "leadingComments": null
                                 },
-                                "body": {
+                                "consequent": {
                                   "type": "BlockStatement",
-                                  "start": 8586,
-                                  "end": 8700,
+                                  "start": 7827,
+                                  "end": 7845,
                                   "loc": {
                                     "start": {
-                                      "line": 302,
-                                      "column": 38
+                                      "line": 276,
+                                      "column": 26
                                     },
                                     "end": {
-                                      "line": 305,
+                                      "line": 278,
                                       "column": 5
                                     }
                                   },
                                   "body": [
                                     {
-                                      "type": "ExpressionStatement",
-                                      "start": 8633,
-                                      "end": 8694,
+                                      "type": "BreakStatement",
+                                      "start": 7834,
+                                      "end": 7839,
                                       "loc": {
                                         "start": {
-                                          "line": 304,
+                                          "line": 277,
                                           "column": 5
                                         },
                                         "end": {
-                                          "line": 304,
-                                          "column": 66
+                                          "line": 277,
+                                          "column": 10
                                         }
                                       },
-                                      "expression": {
-                                        "type": "AssignmentExpression",
-                                        "start": 8633,
-                                        "end": 8694,
-                                        "loc": {
-                                          "start": {
-                                            "line": 304,
-                                            "column": 5
-                                          },
-                                          "end": {
-                                            "line": 304,
-                                            "column": 66
-                                          }
-                                        },
-                                        "operator": "=",
-                                        "left": {
-                                          "type": "MemberExpression",
-                                          "start": 8633,
-                                          "end": 8654,
-                                          "loc": {
-                                            "start": {
-                                              "line": 304,
-                                              "column": 5
-                                            },
-                                            "end": {
-                                              "line": 304,
-                                              "column": 26
-                                            }
-                                          },
-                                          "object": {
-                                            "type": "Identifier",
-                                            "start": 8633,
-                                            "end": 8644,
-                                            "loc": {
-                                              "start": {
-                                                "line": 304,
-                                                "column": 5
-                                              },
-                                              "end": {
-                                                "line": 304,
-                                                "column": 16
-                                              },
-                                              "identifierName": "protoObject"
-                                            },
-                                            "name": "protoObject",
-                                            "leadingComments": null
-                                          },
-                                          "property": {
-                                            "type": "Identifier",
-                                            "start": 8645,
-                                            "end": 8653,
-                                            "loc": {
-                                              "start": {
-                                                "line": 304,
-                                                "column": 17
-                                              },
-                                              "end": {
-                                                "line": 304,
-                                                "column": 25
-                                              },
-                                              "identifierName": "compName"
-                                            },
-                                            "name": "compName"
-                                          },
-                                          "computed": true,
-                                          "leadingComments": null
-                                        },
-                                        "right": {
-                                          "type": "CallExpression",
-                                          "start": 8657,
-                                          "end": 8694,
-                                          "loc": {
-                                            "start": {
-                                              "line": 304,
-                                              "column": 29
-                                            },
-                                            "end": {
-                                              "line": 304,
-                                              "column": 66
-                                            }
-                                          },
-                                          "callee": {
-                                            "type": "MemberExpression",
-                                            "start": 8657,
-                                            "end": 8671,
-                                            "loc": {
-                                              "start": {
-                                                "line": 304,
-                                                "column": 29
-                                              },
-                                              "end": {
-                                                "line": 304,
-                                                "column": 43
-                                              }
-                                            },
-                                            "object": {
-                                              "type": "Identifier",
-                                              "start": 8657,
-                                              "end": 8661,
-                                              "loc": {
-                                                "start": {
-                                                  "line": 304,
-                                                  "column": 29
-                                                },
-                                                "end": {
-                                                  "line": 304,
-                                                  "column": 33
-                                                },
-                                                "identifierName": "JSON"
-                                              },
-                                              "name": "JSON"
-                                            },
-                                            "property": {
-                                              "type": "Identifier",
-                                              "start": 8662,
-                                              "end": 8671,
-                                              "loc": {
-                                                "start": {
-                                                  "line": 304,
-                                                  "column": 34
-                                                },
-                                                "end": {
-                                                  "line": 304,
-                                                  "column": 43
-                                                },
-                                                "identifierName": "stringify"
-                                              },
-                                              "name": "stringify"
-                                            },
-                                            "computed": false
-                                          },
-                                          "arguments": [
-                                            {
-                                              "type": "MemberExpression",
-                                              "start": 8672,
-                                              "end": 8693,
-                                              "loc": {
-                                                "start": {
-                                                  "line": 304,
-                                                  "column": 44
-                                                },
-                                                "end": {
-                                                  "line": 304,
-                                                  "column": 65
-                                                }
-                                              },
-                                              "object": {
-                                                "type": "Identifier",
-                                                "start": 8672,
-                                                "end": 8683,
-                                                "loc": {
-                                                  "start": {
-                                                    "line": 304,
-                                                    "column": 44
-                                                  },
-                                                  "end": {
-                                                    "line": 304,
-                                                    "column": 55
-                                                  },
-                                                  "identifierName": "inputObject"
-                                                },
-                                                "name": "inputObject"
-                                              },
-                                              "property": {
-                                                "type": "Identifier",
-                                                "start": 8684,
-                                                "end": 8692,
-                                                "loc": {
-                                                  "start": {
-                                                    "line": 304,
-                                                    "column": 56
-                                                  },
-                                                  "end": {
-                                                    "line": 304,
-                                                    "column": 64
-                                                  },
-                                                  "identifierName": "compName"
-                                                },
-                                                "name": "compName"
-                                              },
-                                              "computed": true
-                                            }
-                                          ]
-                                        },
-                                        "leadingComments": null
-                                      },
-                                      "leadingComments": [
-                                        {
-                                          "type": "CommentLine",
-                                          "value": " Store strings of each component",
-                                          "start": 8593,
-                                          "end": 8627,
-                                          "loc": {
-                                            "start": {
-                                              "line": 303,
-                                              "column": 5
-                                            },
-                                            "end": {
-                                              "line": 303,
-                                              "column": 39
-                                            }
-                                          }
-                                        }
-                                      ]
+                                      "label": null
                                     }
                                   ],
                                   "directives": []
                                 },
+                                "alternate": null,
                                 "leadingComments": [
                                   {
                                     "type": "CommentLine",
-                                    "value": " Iterate through component names",
-                                    "start": 8513,
-                                    "end": 8547,
+                                    "value": " Stop the iteration when the callback returns false",
+                                    "start": 7747,
+                                    "end": 7800,
                                     "loc": {
                                       "start": {
-                                        "line": 301,
+                                        "line": 275,
                                         "column": 4
                                       },
                                       "end": {
-                                        "line": 301,
-                                        "column": 38
+                                        "line": 275,
+                                        "column": 57
                                       }
                                     }
                                   }
                                 ]
-                              },
-                              {
-                                "type": "ExpressionStatement",
-                                "start": 8705,
-                                "end": 8750,
-                                "loc": {
-                                  "start": {
-                                    "line": 306,
-                                    "column": 4
-                                  },
-                                  "end": {
-                                    "line": 306,
-                                    "column": 49
-                                  }
-                                },
-                                "expression": {
-                                  "type": "AssignmentExpression",
-                                  "start": 8705,
-                                  "end": 8750,
-                                  "loc": {
-                                    "start": {
-                                      "line": 306,
-                                      "column": 4
-                                    },
-                                    "end": {
-                                      "line": 306,
-                                      "column": 49
-                                    }
-                                  },
-                                  "operator": "=",
-                                  "left": {
-                                    "type": "MemberExpression",
-                                    "start": 8705,
-                                    "end": 8736,
-                                    "loc": {
-                                      "start": {
-                                        "line": 306,
-                                        "column": 4
-                                      },
-                                      "end": {
-                                        "line": 306,
-                                        "column": 35
-                                      }
-                                    },
-                                    "object": {
-                                      "type": "MemberExpression",
-                                      "start": 8705,
-                                      "end": 8725,
-                                      "loc": {
-                                        "start": {
-                                          "line": 306,
-                                          "column": 4
-                                        },
-                                        "end": {
-                                          "line": 306,
-                                          "column": 24
-                                        }
-                                      },
-                                      "object": {
-                                        "type": "ThisExpression",
-                                        "start": 8705,
-                                        "end": 8709,
-                                        "loc": {
-                                          "start": {
-                                            "line": 306,
-                                            "column": 4
-                                          },
-                                          "end": {
-                                            "line": 306,
-                                            "column": 8
-                                          }
-                                        }
-                                      },
-                                      "property": {
-                                        "type": "Identifier",
-                                        "start": 8710,
-                                        "end": 8725,
-                                        "loc": {
-                                          "start": {
-                                            "line": 306,
-                                            "column": 9
-                                          },
-                                          "end": {
-                                            "line": 306,
-                                            "column": 24
-                                          },
-                                          "identifierName": "entityTemplates"
-                                        },
-                                        "name": "entityTemplates"
-                                      },
-                                      "computed": false
-                                    },
-                                    "property": {
-                                      "type": "Identifier",
-                                      "start": 8726,
-                                      "end": 8735,
-                                      "loc": {
-                                        "start": {
-                                          "line": 306,
-                                          "column": 25
-                                        },
-                                        "end": {
-                                          "line": 306,
-                                          "column": 34
-                                        },
-                                        "identifierName": "protoName"
-                                      },
-                                      "name": "protoName"
-                                    },
-                                    "computed": true
-                                  },
-                                  "right": {
-                                    "type": "Identifier",
-                                    "start": 8739,
-                                    "end": 8750,
-                                    "loc": {
-                                      "start": {
-                                        "line": 306,
-                                        "column": 38
-                                      },
-                                      "end": {
-                                        "line": 306,
-                                        "column": 49
-                                      },
-                                      "identifierName": "protoObject"
-                                    },
-                                    "name": "protoObject"
-                                  }
-                                }
-                              },
-                              {
-                                "type": "ExpressionStatement",
-                                "start": 8755,
-                                "end": 8762,
-                                "loc": {
-                                  "start": {
-                                    "line": 307,
-                                    "column": 4
-                                  },
-                                  "end": {
-                                    "line": 307,
-                                    "column": 11
-                                  }
-                                },
-                                "expression": {
-                                  "type": "UpdateExpression",
-                                  "start": 8755,
-                                  "end": 8762,
-                                  "loc": {
-                                    "start": {
-                                      "line": 307,
-                                      "column": 4
-                                    },
-                                    "end": {
-                                      "line": 307,
-                                      "column": 11
-                                    }
-                                  },
-                                  "operator": "++",
-                                  "prefix": true,
-                                  "argument": {
-                                    "type": "Identifier",
-                                    "start": 8757,
-                                    "end": 8762,
-                                    "loc": {
-                                      "start": {
-                                        "line": 307,
-                                        "column": 6
-                                      },
-                                      "end": {
-                                        "line": 307,
-                                        "column": 11
-                                      },
-                                      "identifierName": "count"
-                                    },
-                                    "name": "count"
-                                  },
-                                  "extra": {
-                                    "parenthesizedArgument": false
-                                  }
-                                }
                               }
                             ],
                             "directives": []
@@ -9348,17 +8483,17 @@
                           "leadingComments": [
                             {
                               "type": "CommentLine",
-                              "value": " Iterate through prototype names",
-                              "start": 8378,
-                              "end": 8412,
+                              "value": " Go through the map of entities",
+                              "start": 7232,
+                              "end": 7265,
                               "loc": {
                                 "start": {
-                                  "line": 297,
+                                  "line": 264,
                                   "column": 3
                                 },
                                 "end": {
-                                  "line": 297,
-                                  "column": 37
+                                  "line": 264,
+                                  "column": 36
                                 }
                               }
                             }
@@ -9367,232 +8502,3222 @@
                       ],
                       "directives": []
                     },
-                    "alternate": null,
-                    "leadingComments": [
-                      {
-                        "type": "CommentLine",
-                        "value": " Data must be an object at this point",
-                        "start": 8301,
-                        "end": 8340,
-                        "loc": {
-                          "start": {
-                            "line": 295,
-                            "column": 2
-                          },
-                          "end": {
-                            "line": 295,
-                            "column": 41
-                          }
-                        }
-                      }
-                    ]
+                    "alternate": null
                   },
                   {
                     "type": "ReturnStatement",
-                    "start": 8775,
-                    "end": 8787,
+                    "start": 7858,
+                    "end": 7882,
                     "loc": {
                       "start": {
-                        "line": 311,
+                        "line": 282,
                         "column": 2
                       },
                       "end": {
-                        "line": 311,
-                        "column": 14
+                        "line": 282,
+                        "column": 26
                       }
                     },
                     "argument": {
-                      "type": "Identifier",
-                      "start": 8782,
-                      "end": 8787,
+                      "type": "CallExpression",
+                      "start": 7865,
+                      "end": 7882,
                       "loc": {
                         "start": {
-                          "line": 311,
+                          "line": 282,
                           "column": 9
                         },
                         "end": {
-                          "line": 311,
-                          "column": 14
+                          "line": 282,
+                          "column": 26
+                        }
+                      },
+                      "callee": {
+                        "type": "MemberExpression",
+                        "start": 7865,
+                        "end": 7880,
+                        "loc": {
+                          "start": {
+                            "line": 282,
+                            "column": 9
+                          },
+                          "end": {
+                            "line": 282,
+                            "column": 24
+                          }
                         },
-                        "identifierName": "count"
+                        "object": {
+                          "type": "Identifier",
+                          "start": 7865,
+                          "end": 7873,
+                          "loc": {
+                            "start": {
+                              "line": 282,
+                              "column": 9
+                            },
+                            "end": {
+                              "line": 282,
+                              "column": 17
+                            },
+                            "identifierName": "entities"
+                          },
+                          "name": "entities"
+                        },
+                        "property": {
+                          "type": "Identifier",
+                          "start": 7874,
+                          "end": 7880,
+                          "loc": {
+                            "start": {
+                              "line": 282,
+                              "column": 18
+                            },
+                            "end": {
+                              "line": 282,
+                              "column": 24
+                            },
+                            "identifierName": "values"
+                          },
+                          "name": "values"
+                        },
+                        "computed": false
                       },
-                      "name": "count"
+                      "arguments": []
                     }
                   }
                 ],
-                "directives": []
+                "directives": [],
+                "trailingComments": null
               },
               "leadingComments": [
                 {
                   "type": "CommentBlock",
-                  "value": "*\n\t * Registers entity prototype(s). Any existing prototype names that are the same will be overwritten\n\t *\n\t * @example\n\t * world.prototype({\n\t *     Movable: {\n\t *         position: {},\n\t *         velocity: {}\n\t *     }\n\t * })\n\t *\n\t * @param {Object} data - Object structure to register as a prototype. Should be a dictionary with the top level keys\n\t * being the prototype names. Can also be a JSON formatted string.\n\t *\n\t * @return {number} Number of prototypes added.\n\t ",
-                  "start": 7670,
-                  "end": 8150,
+                  "value": "*\n\t * Iterate through entities with the specified components\n\t *\n\t * @example\n\t * // Use a callback to process entities one-by-one\n\t * world.every(['comp'], comp => {comp.value = 0})\n\t *\n\t * @example\n\t * // Get an iterator for the entities\n\t * let it = world.every(['comp'])\n\t * for (let entity of it) {...}\n\t *\n\t * @param {Array}     componentNames - The component names to match entites with. This checks if the entity\n\t * has ALL of the specified components, but does not check for additional components.\n\t * @param {Function}  callback       - The callback to call for each entity. Takes (...components, entity, ...args).\n\t * @param {...Object} [args]         - Any additional arguments to pass to the callback.\n\t *\n\t * @return {MapIterator} An iterator to the entities themselves\n\t ",
+                  "start": 6279,
+                  "end": 7070,
+                  "loc": {
+                    "start": {
+                      "line": 240,
+                      "column": 1
+                    },
+                    "end": {
+                      "line": 258,
+                      "column": 4
+                    }
+                  }
+                }
+              ],
+              "trailingComments": [
+                {
+                  "type": "CommentBlock",
+                  "value": "*\n\t * Returns an array of entities with matching components\n\t * Simplified version of every(), returns an actual array, and only takes component names as arguments.\n\t *\n\t * @example\n\t * world.get('player', 'sprite')\n\t *\n\t * @param {Array} componentNames - The component names to match on. See every() for how this matches.\n\t *\n\t * @return {Array} Array of entities, instead of iterator like every().\n\t ",
+                  "start": 7888,
+                  "end": 8294,
                   "loc": {
                     "start": {
-                      "line": 271,
+                      "line": 285,
                       "column": 1
                     },
                     "end": {
-                      "line": 286,
+                      "line": 295,
                       "column": 4
                     }
                   }
                 }
               ]
-            }
-          ]
+            },
+            {
+              "type": "ClassMethod",
+              "start": 8296,
+              "end": 8364,
+              "loc": {
+                "start": {
+                  "line": 296,
+                  "column": 1
+                },
+                "end": {
+                  "line": 298,
+                  "column": 2
+                }
+              },
+              "static": false,
+              "computed": false,
+              "key": {
+                "type": "Identifier",
+                "start": 8296,
+                "end": 8299,
+                "loc": {
+                  "start": {
+                    "line": 296,
+                    "column": 1
+                  },
+                  "end": {
+                    "line": 296,
+                    "column": 4
+                  },
+                  "identifierName": "get"
+                },
+                "name": "get",
+                "leadingComments": null
+              },
+              "kind": "method",
+              "id": null,
+              "generator": false,
+              "expression": false,
+              "async": false,
+              "params": [
+                {
+                  "type": "RestElement",
+                  "start": 8300,
+                  "end": 8317,
+                  "loc": {
+                    "start": {
+                      "line": 296,
+                      "column": 5
+                    },
+                    "end": {
+                      "line": 296,
+                      "column": 22
+                    }
+                  },
+                  "argument": {
+                    "type": "Identifier",
+                    "start": 8303,
+                    "end": 8317,
+                    "loc": {
+                      "start": {
+                        "line": 296,
+                        "column": 8
+                      },
+                      "end": {
+                        "line": 296,
+                        "column": 22
+                      },
+                      "identifierName": "componentNames"
+                    },
+                    "name": "componentNames"
+                  }
+                }
+              ],
+              "body": {
+                "type": "BlockStatement",
+                "start": 8319,
+                "end": 8364,
+                "loc": {
+                  "start": {
+                    "line": 296,
+                    "column": 24
+                  },
+                  "end": {
+                    "line": 298,
+                    "column": 2
+                  }
+                },
+                "body": [
+                  {
+                    "type": "ReturnStatement",
+                    "start": 8323,
+                    "end": 8361,
+                    "loc": {
+                      "start": {
+                        "line": 297,
+                        "column": 2
+                      },
+                      "end": {
+                        "line": 297,
+                        "column": 40
+                      }
+                    },
+                    "argument": {
+                      "type": "ArrayExpression",
+                      "start": 8330,
+                      "end": 8361,
+                      "loc": {
+                        "start": {
+                          "line": 297,
+                          "column": 9
+                        },
+                        "end": {
+                          "line": 297,
+                          "column": 40
+                        }
+                      },
+                      "elements": [
+                        {
+                          "type": "SpreadElement",
+                          "start": 8331,
+                          "end": 8360,
+                          "loc": {
+                            "start": {
+                              "line": 297,
+                              "column": 10
+                            },
+                            "end": {
+                              "line": 297,
+                              "column": 39
+                            }
+                          },
+                          "argument": {
+                            "type": "CallExpression",
+                            "start": 8334,
+                            "end": 8360,
+                            "loc": {
+                              "start": {
+                                "line": 297,
+                                "column": 13
+                              },
+                              "end": {
+                                "line": 297,
+                                "column": 39
+                              }
+                            },
+                            "callee": {
+                              "type": "MemberExpression",
+                              "start": 8334,
+                              "end": 8344,
+                              "loc": {
+                                "start": {
+                                  "line": 297,
+                                  "column": 13
+                                },
+                                "end": {
+                                  "line": 297,
+                                  "column": 23
+                                }
+                              },
+                              "object": {
+                                "type": "ThisExpression",
+                                "start": 8334,
+                                "end": 8338,
+                                "loc": {
+                                  "start": {
+                                    "line": 297,
+                                    "column": 13
+                                  },
+                                  "end": {
+                                    "line": 297,
+                                    "column": 17
+                                  }
+                                }
+                              },
+                              "property": {
+                                "type": "Identifier",
+                                "start": 8339,
+                                "end": 8344,
+                                "loc": {
+                                  "start": {
+                                    "line": 297,
+                                    "column": 18
+                                  },
+                                  "end": {
+                                    "line": 297,
+                                    "column": 23
+                                  },
+                                  "identifierName": "every"
+                                },
+                                "name": "every"
+                              },
+                              "computed": false
+                            },
+                            "arguments": [
+                              {
+                                "type": "Identifier",
+                                "start": 8345,
+                                "end": 8359,
+                                "loc": {
+                                  "start": {
+                                    "line": 297,
+                                    "column": 24
+                                  },
+                                  "end": {
+                                    "line": 297,
+                                    "column": 38
+                                  },
+                                  "identifierName": "componentNames"
+                                },
+                                "name": "componentNames"
+                              }
+                            ]
+                          }
+                        }
+                      ]
+                    }
+                  }
+                ],
+                "directives": [],
+                "trailingComments": null
+              },
+              "leadingComments": [
+                {
+                  "type": "CommentBlock",
+                  "value": "*\n\t * Returns an array of entities with matching components\n\t * Simplified version of every(), returns an actual array, and only takes component names as arguments.\n\t *\n\t * @example\n\t * world.get('player', 'sprite')\n\t *\n\t * @param {Array} componentNames - The component names to match on. See every() for how this matches.\n\t *\n\t * @return {Array} Array of entities, instead of iterator like every().\n\t ",
+                  "start": 7888,
+                  "end": 8294,
+                  "loc": {
+                    "start": {
+                      "line": 285,
+                      "column": 1
+                    },
+                    "end": {
+                      "line": 295,
+                      "column": 4
+                    }
+                  }
+                }
+              ],
+              "trailingComments": [
+                {
+                  "type": "CommentBlock",
+                  "value": "*\n\t * Registers entity prototype(s). Any existing prototype names that are the same will be overwritten\n\t *\n\t * @example\n\t * world.prototype({\n\t *     Movable: {\n\t *         position: {},\n\t *         velocity: {}\n\t *     }\n\t * })\n\t *\n\t * @param {Object} data - Object structure to register as a prototype. Should be a dictionary with the top level keys\n\t * being the prototype names. Can also be a JSON formatted string.\n\t *\n\t * @return {number} Number of prototypes added.\n\t ",
+                  "start": 8367,
+                  "end": 8847,
+                  "loc": {
+                    "start": {
+                      "line": 300,
+                      "column": 1
+                    },
+                    "end": {
+                      "line": 315,
+                      "column": 4
+                    }
+                  }
+                }
+              ]
+            },
+            {
+              "type": "ClassMethod",
+              "start": 8849,
+              "end": 9487,
+              "loc": {
+                "start": {
+                  "line": 316,
+                  "column": 1
+                },
+                "end": {
+                  "line": 341,
+                  "column": 2
+                }
+              },
+              "static": false,
+              "computed": false,
+              "key": {
+                "type": "Identifier",
+                "start": 8849,
+                "end": 8858,
+                "loc": {
+                  "start": {
+                    "line": 316,
+                    "column": 1
+                  },
+                  "end": {
+                    "line": 316,
+                    "column": 10
+                  },
+                  "identifierName": "prototype"
+                },
+                "name": "prototype",
+                "leadingComments": null
+              },
+              "kind": "method",
+              "id": null,
+              "generator": false,
+              "expression": false,
+              "async": false,
+              "params": [
+                {
+                  "type": "Identifier",
+                  "start": 8859,
+                  "end": 8863,
+                  "loc": {
+                    "start": {
+                      "line": 316,
+                      "column": 11
+                    },
+                    "end": {
+                      "line": 316,
+                      "column": 15
+                    },
+                    "identifierName": "data"
+                  },
+                  "name": "data"
+                }
+              ],
+              "body": {
+                "type": "BlockStatement",
+                "start": 8865,
+                "end": 9487,
+                "loc": {
+                  "start": {
+                    "line": 316,
+                    "column": 17
+                  },
+                  "end": {
+                    "line": 341,
+                    "column": 2
+                  }
+                },
+                "body": [
+                  {
+                    "type": "VariableDeclaration",
+                    "start": 8869,
+                    "end": 8882,
+                    "loc": {
+                      "start": {
+                        "line": 317,
+                        "column": 2
+                      },
+                      "end": {
+                        "line": 317,
+                        "column": 15
+                      }
+                    },
+                    "declarations": [
+                      {
+                        "type": "VariableDeclarator",
+                        "start": 8873,
+                        "end": 8882,
+                        "loc": {
+                          "start": {
+                            "line": 317,
+                            "column": 6
+                          },
+                          "end": {
+                            "line": 317,
+                            "column": 15
+                          }
+                        },
+                        "id": {
+                          "type": "Identifier",
+                          "start": 8873,
+                          "end": 8878,
+                          "loc": {
+                            "start": {
+                              "line": 317,
+                              "column": 6
+                            },
+                            "end": {
+                              "line": 317,
+                              "column": 11
+                            },
+                            "identifierName": "count"
+                          },
+                          "name": "count"
+                        },
+                        "init": {
+                          "type": "NumericLiteral",
+                          "start": 8881,
+                          "end": 8882,
+                          "loc": {
+                            "start": {
+                              "line": 317,
+                              "column": 14
+                            },
+                            "end": {
+                              "line": 317,
+                              "column": 15
+                            }
+                          },
+                          "extra": {
+                            "rawValue": 0,
+                            "raw": "0"
+                          },
+                          "value": 0,
+                          "leadingComments": null,
+                          "trailingComments": null
+                        },
+                        "trailingComments": null
+                      }
+                    ],
+                    "kind": "let",
+                    "trailingComments": [
+                      {
+                        "type": "CommentLine",
+                        "value": " Convert to an object when given a string",
+                        "start": 8886,
+                        "end": 8929,
+                        "loc": {
+                          "start": {
+                            "line": 319,
+                            "column": 2
+                          },
+                          "end": {
+                            "line": 319,
+                            "column": 45
+                          }
+                        }
+                      }
+                    ]
+                  },
+                  {
+                    "type": "IfStatement",
+                    "start": 8932,
+                    "end": 8994,
+                    "loc": {
+                      "start": {
+                        "line": 320,
+                        "column": 2
+                      },
+                      "end": {
+                        "line": 322,
+                        "column": 3
+                      }
+                    },
+                    "test": {
+                      "type": "BinaryExpression",
+                      "start": 8936,
+                      "end": 8960,
+                      "loc": {
+                        "start": {
+                          "line": 320,
+                          "column": 6
+                        },
+                        "end": {
+                          "line": 320,
+                          "column": 30
+                        }
+                      },
+                      "left": {
+                        "type": "UnaryExpression",
+                        "start": 8936,
+                        "end": 8947,
+                        "loc": {
+                          "start": {
+                            "line": 320,
+                            "column": 6
+                          },
+                          "end": {
+                            "line": 320,
+                            "column": 17
+                          }
+                        },
+                        "operator": "typeof",
+                        "prefix": true,
+                        "argument": {
+                          "type": "Identifier",
+                          "start": 8943,
+                          "end": 8947,
+                          "loc": {
+                            "start": {
+                              "line": 320,
+                              "column": 13
+                            },
+                            "end": {
+                              "line": 320,
+                              "column": 17
+                            },
+                            "identifierName": "data"
+                          },
+                          "name": "data",
+                          "leadingComments": null
+                        },
+                        "extra": {
+                          "parenthesizedArgument": false
+                        },
+                        "leadingComments": null
+                      },
+                      "operator": "===",
+                      "right": {
+                        "type": "StringLiteral",
+                        "start": 8952,
+                        "end": 8960,
+                        "loc": {
+                          "start": {
+                            "line": 320,
+                            "column": 22
+                          },
+                          "end": {
+                            "line": 320,
+                            "column": 30
+                          }
+                        },
+                        "extra": {
+                          "rawValue": "string",
+                          "raw": "'string'"
+                        },
+                        "value": "string"
+                      },
+                      "leadingComments": null
+                    },
+                    "consequent": {
+                      "type": "BlockStatement",
+                      "start": 8962,
+                      "end": 8994,
+                      "loc": {
+                        "start": {
+                          "line": 320,
+                          "column": 32
+                        },
+                        "end": {
+                          "line": 322,
+                          "column": 3
+                        }
+                      },
+                      "body": [
+                        {
+                          "type": "ExpressionStatement",
+                          "start": 8967,
+                          "end": 8990,
+                          "loc": {
+                            "start": {
+                              "line": 321,
+                              "column": 3
+                            },
+                            "end": {
+                              "line": 321,
+                              "column": 26
+                            }
+                          },
+                          "expression": {
+                            "type": "AssignmentExpression",
+                            "start": 8967,
+                            "end": 8990,
+                            "loc": {
+                              "start": {
+                                "line": 321,
+                                "column": 3
+                              },
+                              "end": {
+                                "line": 321,
+                                "column": 26
+                              }
+                            },
+                            "operator": "=",
+                            "left": {
+                              "type": "Identifier",
+                              "start": 8967,
+                              "end": 8971,
+                              "loc": {
+                                "start": {
+                                  "line": 321,
+                                  "column": 3
+                                },
+                                "end": {
+                                  "line": 321,
+                                  "column": 7
+                                },
+                                "identifierName": "data"
+                              },
+                              "name": "data"
+                            },
+                            "right": {
+                              "type": "CallExpression",
+                              "start": 8974,
+                              "end": 8990,
+                              "loc": {
+                                "start": {
+                                  "line": 321,
+                                  "column": 10
+                                },
+                                "end": {
+                                  "line": 321,
+                                  "column": 26
+                                }
+                              },
+                              "callee": {
+                                "type": "MemberExpression",
+                                "start": 8974,
+                                "end": 8984,
+                                "loc": {
+                                  "start": {
+                                    "line": 321,
+                                    "column": 10
+                                  },
+                                  "end": {
+                                    "line": 321,
+                                    "column": 20
+                                  }
+                                },
+                                "object": {
+                                  "type": "Identifier",
+                                  "start": 8974,
+                                  "end": 8978,
+                                  "loc": {
+                                    "start": {
+                                      "line": 321,
+                                      "column": 10
+                                    },
+                                    "end": {
+                                      "line": 321,
+                                      "column": 14
+                                    },
+                                    "identifierName": "JSON"
+                                  },
+                                  "name": "JSON"
+                                },
+                                "property": {
+                                  "type": "Identifier",
+                                  "start": 8979,
+                                  "end": 8984,
+                                  "loc": {
+                                    "start": {
+                                      "line": 321,
+                                      "column": 15
+                                    },
+                                    "end": {
+                                      "line": 321,
+                                      "column": 20
+                                    },
+                                    "identifierName": "parse"
+                                  },
+                                  "name": "parse"
+                                },
+                                "computed": false
+                              },
+                              "arguments": [
+                                {
+                                  "type": "Identifier",
+                                  "start": 8985,
+                                  "end": 8989,
+                                  "loc": {
+                                    "start": {
+                                      "line": 321,
+                                      "column": 21
+                                    },
+                                    "end": {
+                                      "line": 321,
+                                      "column": 25
+                                    },
+                                    "identifierName": "data"
+                                  },
+                                  "name": "data"
+                                }
+                              ]
+                            }
+                          }
+                        }
+                      ],
+                      "directives": [],
+                      "trailingComments": null
+                    },
+                    "alternate": null,
+                    "leadingComments": [
+                      {
+                        "type": "CommentLine",
+                        "value": " Convert to an object when given a string",
+                        "start": 8886,
+                        "end": 8929,
+                        "loc": {
+                          "start": {
+                            "line": 319,
+                            "column": 2
+                          },
+                          "end": {
+                            "line": 319,
+                            "column": 45
+                          }
+                        }
+                      }
+                    ],
+                    "trailingComments": [
+                      {
+                        "type": "CommentLine",
+                        "value": " Data must be an object at this point",
+                        "start": 8998,
+                        "end": 9037,
+                        "loc": {
+                          "start": {
+                            "line": 324,
+                            "column": 2
+                          },
+                          "end": {
+                            "line": 324,
+                            "column": 41
+                          }
+                        }
+                      }
+                    ]
+                  },
+                  {
+                    "type": "IfStatement",
+                    "start": 9040,
+                    "end": 9468,
+                    "loc": {
+                      "start": {
+                        "line": 325,
+                        "column": 2
+                      },
+                      "end": {
+                        "line": 338,
+                        "column": 3
+                      }
+                    },
+                    "test": {
+                      "type": "BinaryExpression",
+                      "start": 9044,
+                      "end": 9068,
+                      "loc": {
+                        "start": {
+                          "line": 325,
+                          "column": 6
+                        },
+                        "end": {
+                          "line": 325,
+                          "column": 30
+                        }
+                      },
+                      "left": {
+                        "type": "UnaryExpression",
+                        "start": 9044,
+                        "end": 9055,
+                        "loc": {
+                          "start": {
+                            "line": 325,
+                            "column": 6
+                          },
+                          "end": {
+                            "line": 325,
+                            "column": 17
+                          }
+                        },
+                        "operator": "typeof",
+                        "prefix": true,
+                        "argument": {
+                          "type": "Identifier",
+                          "start": 9051,
+                          "end": 9055,
+                          "loc": {
+                            "start": {
+                              "line": 325,
+                              "column": 13
+                            },
+                            "end": {
+                              "line": 325,
+                              "column": 17
+                            },
+                            "identifierName": "data"
+                          },
+                          "name": "data",
+                          "leadingComments": null
+                        },
+                        "extra": {
+                          "parenthesizedArgument": false
+                        },
+                        "leadingComments": null
+                      },
+                      "operator": "===",
+                      "right": {
+                        "type": "StringLiteral",
+                        "start": 9060,
+                        "end": 9068,
+                        "loc": {
+                          "start": {
+                            "line": 325,
+                            "column": 22
+                          },
+                          "end": {
+                            "line": 325,
+                            "column": 30
+                          }
+                        },
+                        "extra": {
+                          "rawValue": "object",
+                          "raw": "'object'"
+                        },
+                        "value": "object"
+                      },
+                      "leadingComments": null
+                    },
+                    "consequent": {
+                      "type": "BlockStatement",
+                      "start": 9070,
+                      "end": 9468,
+                      "loc": {
+                        "start": {
+                          "line": 325,
+                          "column": 32
+                        },
+                        "end": {
+                          "line": 338,
+                          "column": 3
+                        }
+                      },
+                      "body": [
+                        {
+                          "type": "ForInStatement",
+                          "start": 9113,
+                          "end": 9464,
+                          "loc": {
+                            "start": {
+                              "line": 327,
+                              "column": 3
+                            },
+                            "end": {
+                              "line": 337,
+                              "column": 4
+                            }
+                          },
+                          "left": {
+                            "type": "VariableDeclaration",
+                            "start": 9118,
+                            "end": 9131,
+                            "loc": {
+                              "start": {
+                                "line": 327,
+                                "column": 8
+                              },
+                              "end": {
+                                "line": 327,
+                                "column": 21
+                              }
+                            },
+                            "declarations": [
+                              {
+                                "type": "VariableDeclarator",
+                                "start": 9122,
+                                "end": 9131,
+                                "loc": {
+                                  "start": {
+                                    "line": 327,
+                                    "column": 12
+                                  },
+                                  "end": {
+                                    "line": 327,
+                                    "column": 21
+                                  }
+                                },
+                                "id": {
+                                  "type": "Identifier",
+                                  "start": 9122,
+                                  "end": 9131,
+                                  "loc": {
+                                    "start": {
+                                      "line": 327,
+                                      "column": 12
+                                    },
+                                    "end": {
+                                      "line": 327,
+                                      "column": 21
+                                    },
+                                    "identifierName": "protoName"
+                                  },
+                                  "name": "protoName",
+                                  "leadingComments": null
+                                },
+                                "init": null,
+                                "leadingComments": null
+                              }
+                            ],
+                            "kind": "let",
+                            "leadingComments": null
+                          },
+                          "right": {
+                            "type": "Identifier",
+                            "start": 9135,
+                            "end": 9139,
+                            "loc": {
+                              "start": {
+                                "line": 327,
+                                "column": 25
+                              },
+                              "end": {
+                                "line": 327,
+                                "column": 29
+                              },
+                              "identifierName": "data"
+                            },
+                            "name": "data"
+                          },
+                          "body": {
+                            "type": "BlockStatement",
+                            "start": 9141,
+                            "end": 9464,
+                            "loc": {
+                              "start": {
+                                "line": 327,
+                                "column": 31
+                              },
+                              "end": {
+                                "line": 337,
+                                "column": 4
+                              }
+                            },
+                            "body": [
+                              {
+                                "type": "VariableDeclaration",
+                                "start": 9147,
+                                "end": 9180,
+                                "loc": {
+                                  "start": {
+                                    "line": 328,
+                                    "column": 4
+                                  },
+                                  "end": {
+                                    "line": 328,
+                                    "column": 37
+                                  }
+                                },
+                                "declarations": [
+                                  {
+                                    "type": "VariableDeclarator",
+                                    "start": 9151,
+                                    "end": 9180,
+                                    "loc": {
+                                      "start": {
+                                        "line": 328,
+                                        "column": 8
+                                      },
+                                      "end": {
+                                        "line": 328,
+                                        "column": 37
+                                      }
+                                    },
+                                    "id": {
+                                      "type": "Identifier",
+                                      "start": 9151,
+                                      "end": 9162,
+                                      "loc": {
+                                        "start": {
+                                          "line": 328,
+                                          "column": 8
+                                        },
+                                        "end": {
+                                          "line": 328,
+                                          "column": 19
+                                        },
+                                        "identifierName": "inputObject"
+                                      },
+                                      "name": "inputObject"
+                                    },
+                                    "init": {
+                                      "type": "MemberExpression",
+                                      "start": 9165,
+                                      "end": 9180,
+                                      "loc": {
+                                        "start": {
+                                          "line": 328,
+                                          "column": 22
+                                        },
+                                        "end": {
+                                          "line": 328,
+                                          "column": 37
+                                        }
+                                      },
+                                      "object": {
+                                        "type": "Identifier",
+                                        "start": 9165,
+                                        "end": 9169,
+                                        "loc": {
+                                          "start": {
+                                            "line": 328,
+                                            "column": 22
+                                          },
+                                          "end": {
+                                            "line": 328,
+                                            "column": 26
+                                          },
+                                          "identifierName": "data"
+                                        },
+                                        "name": "data"
+                                      },
+                                      "property": {
+                                        "type": "Identifier",
+                                        "start": 9170,
+                                        "end": 9179,
+                                        "loc": {
+                                          "start": {
+                                            "line": 328,
+                                            "column": 27
+                                          },
+                                          "end": {
+                                            "line": 328,
+                                            "column": 36
+                                          },
+                                          "identifierName": "protoName"
+                                        },
+                                        "name": "protoName"
+                                      },
+                                      "computed": true
+                                    }
+                                  }
+                                ],
+                                "kind": "let"
+                              },
+                              {
+                                "type": "VariableDeclaration",
+                                "start": 9185,
+                                "end": 9205,
+                                "loc": {
+                                  "start": {
+                                    "line": 329,
+                                    "column": 4
+                                  },
+                                  "end": {
+                                    "line": 329,
+                                    "column": 24
+                                  }
+                                },
+                                "declarations": [
+                                  {
+                                    "type": "VariableDeclarator",
+                                    "start": 9189,
+                                    "end": 9205,
+                                    "loc": {
+                                      "start": {
+                                        "line": 329,
+                                        "column": 8
+                                      },
+                                      "end": {
+                                        "line": 329,
+                                        "column": 24
+                                      }
+                                    },
+                                    "id": {
+                                      "type": "Identifier",
+                                      "start": 9189,
+                                      "end": 9200,
+                                      "loc": {
+                                        "start": {
+                                          "line": 329,
+                                          "column": 8
+                                        },
+                                        "end": {
+                                          "line": 329,
+                                          "column": 19
+                                        },
+                                        "identifierName": "protoObject"
+                                      },
+                                      "name": "protoObject"
+                                    },
+                                    "init": {
+                                      "type": "ObjectExpression",
+                                      "start": 9203,
+                                      "end": 9205,
+                                      "loc": {
+                                        "start": {
+                                          "line": 329,
+                                          "column": 22
+                                        },
+                                        "end": {
+                                          "line": 329,
+                                          "column": 24
+                                        }
+                                      },
+                                      "properties": [],
+                                      "leadingComments": null,
+                                      "trailingComments": null
+                                    },
+                                    "trailingComments": null
+                                  }
+                                ],
+                                "kind": "let",
+                                "trailingComments": [
+                                  {
+                                    "type": "CommentLine",
+                                    "value": " Iterate through component names",
+                                    "start": 9210,
+                                    "end": 9244,
+                                    "loc": {
+                                      "start": {
+                                        "line": 330,
+                                        "column": 4
+                                      },
+                                      "end": {
+                                        "line": 330,
+                                        "column": 38
+                                      }
+                                    }
+                                  }
+                                ]
+                              },
+                              {
+                                "type": "ForInStatement",
+                                "start": 9249,
+                                "end": 9397,
+                                "loc": {
+                                  "start": {
+                                    "line": 331,
+                                    "column": 4
+                                  },
+                                  "end": {
+                                    "line": 334,
+                                    "column": 5
+                                  }
+                                },
+                                "left": {
+                                  "type": "VariableDeclaration",
+                                  "start": 9254,
+                                  "end": 9266,
+                                  "loc": {
+                                    "start": {
+                                      "line": 331,
+                                      "column": 9
+                                    },
+                                    "end": {
+                                      "line": 331,
+                                      "column": 21
+                                    }
+                                  },
+                                  "declarations": [
+                                    {
+                                      "type": "VariableDeclarator",
+                                      "start": 9258,
+                                      "end": 9266,
+                                      "loc": {
+                                        "start": {
+                                          "line": 331,
+                                          "column": 13
+                                        },
+                                        "end": {
+                                          "line": 331,
+                                          "column": 21
+                                        }
+                                      },
+                                      "id": {
+                                        "type": "Identifier",
+                                        "start": 9258,
+                                        "end": 9266,
+                                        "loc": {
+                                          "start": {
+                                            "line": 331,
+                                            "column": 13
+                                          },
+                                          "end": {
+                                            "line": 331,
+                                            "column": 21
+                                          },
+                                          "identifierName": "compName"
+                                        },
+                                        "name": "compName",
+                                        "leadingComments": null
+                                      },
+                                      "init": null,
+                                      "leadingComments": null
+                                    }
+                                  ],
+                                  "kind": "let",
+                                  "leadingComments": null
+                                },
+                                "right": {
+                                  "type": "Identifier",
+                                  "start": 9270,
+                                  "end": 9281,
+                                  "loc": {
+                                    "start": {
+                                      "line": 331,
+                                      "column": 25
+                                    },
+                                    "end": {
+                                      "line": 331,
+                                      "column": 36
+                                    },
+                                    "identifierName": "inputObject"
+                                  },
+                                  "name": "inputObject"
+                                },
+                                "body": {
+                                  "type": "BlockStatement",
+                                  "start": 9283,
+                                  "end": 9397,
+                                  "loc": {
+                                    "start": {
+                                      "line": 331,
+                                      "column": 38
+                                    },
+                                    "end": {
+                                      "line": 334,
+                                      "column": 5
+                                    }
+                                  },
+                                  "body": [
+                                    {
+                                      "type": "ExpressionStatement",
+                                      "start": 9330,
+                                      "end": 9391,
+                                      "loc": {
+                                        "start": {
+                                          "line": 333,
+                                          "column": 5
+                                        },
+                                        "end": {
+                                          "line": 333,
+                                          "column": 66
+                                        }
+                                      },
+                                      "expression": {
+                                        "type": "AssignmentExpression",
+                                        "start": 9330,
+                                        "end": 9391,
+                                        "loc": {
+                                          "start": {
+                                            "line": 333,
+                                            "column": 5
+                                          },
+                                          "end": {
+                                            "line": 333,
+                                            "column": 66
+                                          }
+                                        },
+                                        "operator": "=",
+                                        "left": {
+                                          "type": "MemberExpression",
+                                          "start": 9330,
+                                          "end": 9351,
+                                          "loc": {
+                                            "start": {
+                                              "line": 333,
+                                              "column": 5
+                                            },
+                                            "end": {
+                                              "line": 333,
+                                              "column": 26
+                                            }
+                                          },
+                                          "object": {
+                                            "type": "Identifier",
+                                            "start": 9330,
+                                            "end": 9341,
+                                            "loc": {
+                                              "start": {
+                                                "line": 333,
+                                                "column": 5
+                                              },
+                                              "end": {
+                                                "line": 333,
+                                                "column": 16
+                                              },
+                                              "identifierName": "protoObject"
+                                            },
+                                            "name": "protoObject",
+                                            "leadingComments": null
+                                          },
+                                          "property": {
+                                            "type": "Identifier",
+                                            "start": 9342,
+                                            "end": 9350,
+                                            "loc": {
+                                              "start": {
+                                                "line": 333,
+                                                "column": 17
+                                              },
+                                              "end": {
+                                                "line": 333,
+                                                "column": 25
+                                              },
+                                              "identifierName": "compName"
+                                            },
+                                            "name": "compName"
+                                          },
+                                          "computed": true,
+                                          "leadingComments": null
+                                        },
+                                        "right": {
+                                          "type": "CallExpression",
+                                          "start": 9354,
+                                          "end": 9391,
+                                          "loc": {
+                                            "start": {
+                                              "line": 333,
+                                              "column": 29
+                                            },
+                                            "end": {
+                                              "line": 333,
+                                              "column": 66
+                                            }
+                                          },
+                                          "callee": {
+                                            "type": "MemberExpression",
+                                            "start": 9354,
+                                            "end": 9368,
+                                            "loc": {
+                                              "start": {
+                                                "line": 333,
+                                                "column": 29
+                                              },
+                                              "end": {
+                                                "line": 333,
+                                                "column": 43
+                                              }
+                                            },
+                                            "object": {
+                                              "type": "Identifier",
+                                              "start": 9354,
+                                              "end": 9358,
+                                              "loc": {
+                                                "start": {
+                                                  "line": 333,
+                                                  "column": 29
+                                                },
+                                                "end": {
+                                                  "line": 333,
+                                                  "column": 33
+                                                },
+                                                "identifierName": "JSON"
+                                              },
+                                              "name": "JSON"
+                                            },
+                                            "property": {
+                                              "type": "Identifier",
+                                              "start": 9359,
+                                              "end": 9368,
+                                              "loc": {
+                                                "start": {
+                                                  "line": 333,
+                                                  "column": 34
+                                                },
+                                                "end": {
+                                                  "line": 333,
+                                                  "column": 43
+                                                },
+                                                "identifierName": "stringify"
+                                              },
+                                              "name": "stringify"
+                                            },
+                                            "computed": false
+                                          },
+                                          "arguments": [
+                                            {
+                                              "type": "MemberExpression",
+                                              "start": 9369,
+                                              "end": 9390,
+                                              "loc": {
+                                                "start": {
+                                                  "line": 333,
+                                                  "column": 44
+                                                },
+                                                "end": {
+                                                  "line": 333,
+                                                  "column": 65
+                                                }
+                                              },
+                                              "object": {
+                                                "type": "Identifier",
+                                                "start": 9369,
+                                                "end": 9380,
+                                                "loc": {
+                                                  "start": {
+                                                    "line": 333,
+                                                    "column": 44
+                                                  },
+                                                  "end": {
+                                                    "line": 333,
+                                                    "column": 55
+                                                  },
+                                                  "identifierName": "inputObject"
+                                                },
+                                                "name": "inputObject"
+                                              },
+                                              "property": {
+                                                "type": "Identifier",
+                                                "start": 9381,
+                                                "end": 9389,
+                                                "loc": {
+                                                  "start": {
+                                                    "line": 333,
+                                                    "column": 56
+                                                  },
+                                                  "end": {
+                                                    "line": 333,
+                                                    "column": 64
+                                                  },
+                                                  "identifierName": "compName"
+                                                },
+                                                "name": "compName"
+                                              },
+                                              "computed": true
+                                            }
+                                          ]
+                                        },
+                                        "leadingComments": null
+                                      },
+                                      "leadingComments": [
+                                        {
+                                          "type": "CommentLine",
+                                          "value": " Store strings of each component",
+                                          "start": 9290,
+                                          "end": 9324,
+                                          "loc": {
+                                            "start": {
+                                              "line": 332,
+                                              "column": 5
+                                            },
+                                            "end": {
+                                              "line": 332,
+                                              "column": 39
+                                            }
+                                          }
+                                        }
+                                      ]
+                                    }
+                                  ],
+                                  "directives": []
+                                },
+                                "leadingComments": [
+                                  {
+                                    "type": "CommentLine",
+                                    "value": " Iterate through component names",
+                                    "start": 9210,
+                                    "end": 9244,
+                                    "loc": {
+                                      "start": {
+                                        "line": 330,
+                                        "column": 4
+                                      },
+                                      "end": {
+                                        "line": 330,
+                                        "column": 38
+                                      }
+                                    }
+                                  }
+                                ]
+                              },
+                              {
+                                "type": "ExpressionStatement",
+                                "start": 9402,
+                                "end": 9447,
+                                "loc": {
+                                  "start": {
+                                    "line": 335,
+                                    "column": 4
+                                  },
+                                  "end": {
+                                    "line": 335,
+                                    "column": 49
+                                  }
+                                },
+                                "expression": {
+                                  "type": "AssignmentExpression",
+                                  "start": 9402,
+                                  "end": 9447,
+                                  "loc": {
+                                    "start": {
+                                      "line": 335,
+                                      "column": 4
+                                    },
+                                    "end": {
+                                      "line": 335,
+                                      "column": 49
+                                    }
+                                  },
+                                  "operator": "=",
+                                  "left": {
+                                    "type": "MemberExpression",
+                                    "start": 9402,
+                                    "end": 9433,
+                                    "loc": {
+                                      "start": {
+                                        "line": 335,
+                                        "column": 4
+                                      },
+                                      "end": {
+                                        "line": 335,
+                                        "column": 35
+                                      }
+                                    },
+                                    "object": {
+                                      "type": "MemberExpression",
+                                      "start": 9402,
+                                      "end": 9422,
+                                      "loc": {
+                                        "start": {
+                                          "line": 335,
+                                          "column": 4
+                                        },
+                                        "end": {
+                                          "line": 335,
+                                          "column": 24
+                                        }
+                                      },
+                                      "object": {
+                                        "type": "ThisExpression",
+                                        "start": 9402,
+                                        "end": 9406,
+                                        "loc": {
+                                          "start": {
+                                            "line": 335,
+                                            "column": 4
+                                          },
+                                          "end": {
+                                            "line": 335,
+                                            "column": 8
+                                          }
+                                        }
+                                      },
+                                      "property": {
+                                        "type": "Identifier",
+                                        "start": 9407,
+                                        "end": 9422,
+                                        "loc": {
+                                          "start": {
+                                            "line": 335,
+                                            "column": 9
+                                          },
+                                          "end": {
+                                            "line": 335,
+                                            "column": 24
+                                          },
+                                          "identifierName": "entityTemplates"
+                                        },
+                                        "name": "entityTemplates"
+                                      },
+                                      "computed": false
+                                    },
+                                    "property": {
+                                      "type": "Identifier",
+                                      "start": 9423,
+                                      "end": 9432,
+                                      "loc": {
+                                        "start": {
+                                          "line": 335,
+                                          "column": 25
+                                        },
+                                        "end": {
+                                          "line": 335,
+                                          "column": 34
+                                        },
+                                        "identifierName": "protoName"
+                                      },
+                                      "name": "protoName"
+                                    },
+                                    "computed": true
+                                  },
+                                  "right": {
+                                    "type": "Identifier",
+                                    "start": 9436,
+                                    "end": 9447,
+                                    "loc": {
+                                      "start": {
+                                        "line": 335,
+                                        "column": 38
+                                      },
+                                      "end": {
+                                        "line": 335,
+                                        "column": 49
+                                      },
+                                      "identifierName": "protoObject"
+                                    },
+                                    "name": "protoObject"
+                                  }
+                                }
+                              },
+                              {
+                                "type": "ExpressionStatement",
+                                "start": 9452,
+                                "end": 9459,
+                                "loc": {
+                                  "start": {
+                                    "line": 336,
+                                    "column": 4
+                                  },
+                                  "end": {
+                                    "line": 336,
+                                    "column": 11
+                                  }
+                                },
+                                "expression": {
+                                  "type": "UpdateExpression",
+                                  "start": 9452,
+                                  "end": 9459,
+                                  "loc": {
+                                    "start": {
+                                      "line": 336,
+                                      "column": 4
+                                    },
+                                    "end": {
+                                      "line": 336,
+                                      "column": 11
+                                    }
+                                  },
+                                  "operator": "++",
+                                  "prefix": true,
+                                  "argument": {
+                                    "type": "Identifier",
+                                    "start": 9454,
+                                    "end": 9459,
+                                    "loc": {
+                                      "start": {
+                                        "line": 336,
+                                        "column": 6
+                                      },
+                                      "end": {
+                                        "line": 336,
+                                        "column": 11
+                                      },
+                                      "identifierName": "count"
+                                    },
+                                    "name": "count"
+                                  },
+                                  "extra": {
+                                    "parenthesizedArgument": false
+                                  }
+                                }
+                              }
+                            ],
+                            "directives": []
+                          },
+                          "leadingComments": [
+                            {
+                              "type": "CommentLine",
+                              "value": " Iterate through prototype names",
+                              "start": 9075,
+                              "end": 9109,
+                              "loc": {
+                                "start": {
+                                  "line": 326,
+                                  "column": 3
+                                },
+                                "end": {
+                                  "line": 326,
+                                  "column": 37
+                                }
+                              }
+                            }
+                          ]
+                        }
+                      ],
+                      "directives": []
+                    },
+                    "alternate": null,
+                    "leadingComments": [
+                      {
+                        "type": "CommentLine",
+                        "value": " Data must be an object at this point",
+                        "start": 8998,
+                        "end": 9037,
+                        "loc": {
+                          "start": {
+                            "line": 324,
+                            "column": 2
+                          },
+                          "end": {
+                            "line": 324,
+                            "column": 41
+                          }
+                        }
+                      }
+                    ]
+                  },
+                  {
+                    "type": "ReturnStatement",
+                    "start": 9472,
+                    "end": 9484,
+                    "loc": {
+                      "start": {
+                        "line": 340,
+                        "column": 2
+                      },
+                      "end": {
+                        "line": 340,
+                        "column": 14
+                      }
+                    },
+                    "argument": {
+                      "type": "Identifier",
+                      "start": 9479,
+                      "end": 9484,
+                      "loc": {
+                        "start": {
+                          "line": 340,
+                          "column": 9
+                        },
+                        "end": {
+                          "line": 340,
+                          "column": 14
+                        },
+                        "identifierName": "count"
+                      },
+                      "name": "count"
+                    }
+                  }
+                ],
+                "directives": []
+              },
+              "leadingComments": [
+                {
+                  "type": "CommentBlock",
+                  "value": "*\n\t * Registers entity prototype(s). Any existing prototype names that are the same will be overwritten\n\t *\n\t * @example\n\t * world.prototype({\n\t *     Movable: {\n\t *         position: {},\n\t *         velocity: {}\n\t *     }\n\t * })\n\t *\n\t * @param {Object} data - Object structure to register as a prototype. Should be a dictionary with the top level keys\n\t * being the prototype names. Can also be a JSON formatted string.\n\t *\n\t * @return {number} Number of prototypes added.\n\t ",
+                  "start": 8367,
+                  "end": 8847,
+                  "loc": {
+                    "start": {
+                      "line": 300,
+                      "column": 1
+                    },
+                    "end": {
+                      "line": 315,
+                      "column": 4
+                    }
+                  }
+                }
+              ]
+            }
+          ]
+        },
+        "leadingComments": [
+          {
+            "type": "CommentBlock",
+            "value": "*\n * Class for world.\n *\n * @class      World (name)\n ",
+            "start": 206,
+            "end": 264,
+            "loc": {
+              "start": {
+                "line": 10,
+                "column": 0
+              },
+              "end": {
+                "line": 14,
+                "column": 3
+              }
+            }
+          }
+        ]
+      },
+      {
+        "type": "ExpressionStatement",
+        "start": 9491,
+        "end": 9512,
+        "loc": {
+          "start": {
+            "line": 344,
+            "column": 0
+          },
+          "end": {
+            "line": 344,
+            "column": 21
+          }
+        },
+        "expression": {
+          "type": "AssignmentExpression",
+          "start": 9491,
+          "end": 9512,
+          "loc": {
+            "start": {
+              "line": 344,
+              "column": 0
+            },
+            "end": {
+              "line": 344,
+              "column": 21
+            }
+          },
+          "operator": "=",
+          "left": {
+            "type": "MemberExpression",
+            "start": 9491,
+            "end": 9504,
+            "loc": {
+              "start": {
+                "line": 344,
+                "column": 0
+              },
+              "end": {
+                "line": 344,
+                "column": 13
+              }
+            },
+            "object": {
+              "type": "Identifier",
+              "start": 9491,
+              "end": 9498,
+              "loc": {
+                "start": {
+                  "line": 344,
+                  "column": 0
+                },
+                "end": {
+                  "line": 344,
+                  "column": 7
+                },
+                "identifierName": "exports"
+              },
+              "name": "exports"
+            },
+            "property": {
+              "type": "Identifier",
+              "start": 9499,
+              "end": 9504,
+              "loc": {
+                "start": {
+                  "line": 344,
+                  "column": 8
+                },
+                "end": {
+                  "line": 344,
+                  "column": 13
+                },
+                "identifierName": "World"
+              },
+              "name": "World"
+            },
+            "computed": false
+          },
+          "right": {
+            "type": "Identifier",
+            "start": 9507,
+            "end": 9512,
+            "loc": {
+              "start": {
+                "line": 344,
+                "column": 16
+              },
+              "end": {
+                "line": 344,
+                "column": 21
+              },
+              "identifierName": "World"
+            },
+            "name": "World"
+          }
+        }
+      }
+    ],
+    "directives": []
+  },
+  "comments": [
+    {
+      "type": "CommentBlock",
+      "value": "* @ignore ",
+      "start": 0,
+      "end": 14,
+      "loc": {
+        "start": {
+          "line": 1,
+          "column": 0
+        },
+        "end": {
+          "line": 1,
+          "column": 14
+        }
+      }
+    },
+    {
+      "type": "CommentBlock",
+      "value": "* @ignore ",
+      "start": 73,
+      "end": 87,
+      "loc": {
+        "start": {
+          "line": 4,
+          "column": 0
+        },
+        "end": {
+          "line": 4,
+          "column": 14
+        }
+      }
+    },
+    {
+      "type": "CommentBlock",
+      "value": "* @ignore ",
+      "start": 131,
+      "end": 145,
+      "loc": {
+        "start": {
+          "line": 7,
+          "column": 0
+        },
+        "end": {
+          "line": 7,
+          "column": 14
+        }
+      }
+    },
+    {
+      "type": "CommentBlock",
+      "value": "*\n * Class for world.\n *\n * @class      World (name)\n ",
+      "start": 206,
+      "end": 264,
+      "loc": {
+        "start": {
+          "line": 10,
+          "column": 0
+        },
+        "end": {
+          "line": 14,
+          "column": 3
+        }
+      }
+    },
+    {
+      "type": "CommentBlock",
+      "value": "*\n\t * Constructs an instance of the world.\n\t ",
+      "start": 280,
+      "end": 329,
+      "loc": {
+        "start": {
+          "line": 16,
+          "column": 1
+        },
+        "end": {
+          "line": 18,
+          "column": 4
+        }
+      }
+    },
+    {
+      "type": "CommentBlock",
+      "value": "* @ignore ",
+      "start": 349,
+      "end": 363,
+      "loc": {
+        "start": {
+          "line": 20,
+          "column": 2
+        },
+        "end": {
+          "line": 20,
+          "column": 16
+        }
+      }
+    },
+    {
+      "type": "CommentBlock",
+      "value": "*\n\t\t * Maps entity IDs to entities\n\t\t * @ignore\n\t\t ",
+      "start": 387,
+      "end": 442,
+      "loc": {
+        "start": {
+          "line": 23,
+          "column": 2
+        },
+        "end": {
+          "line": 26,
+          "column": 5
+        }
+      }
+    },
+    {
+      "type": "CommentBlock",
+      "value": "* @ignore ",
+      "start": 474,
+      "end": 488,
+      "loc": {
+        "start": {
+          "line": 29,
+          "column": 2
+        },
+        "end": {
+          "line": 29,
+          "column": 16
+        }
+      }
+    },
+    {
+      "type": "CommentBlock",
+      "value": "* @ignore ",
+      "start": 515,
+      "end": 529,
+      "loc": {
+        "start": {
+          "line": 32,
+          "column": 2
+        },
+        "end": {
+          "line": 32,
+          "column": 16
+        }
+      }
+    },
+    {
+      "type": "CommentBlock",
+      "value": "* @ignore ",
+      "start": 561,
+      "end": 575,
+      "loc": {
+        "start": {
+          "line": 35,
+          "column": 2
+        },
+        "end": {
+          "line": 35,
+          "column": 16
+        }
+      }
+    },
+    {
+      "type": "CommentBlock",
+      "value": "*\n\t\t * Maps entire queries to arrays of entities\n\t\t * @ignore\n\t\t ",
+      "start": 600,
+      "end": 669,
+      "loc": {
+        "start": {
+          "line": 38,
+          "column": 2
+        },
+        "end": {
+          "line": 41,
+          "column": 5
+        }
+      }
+    },
+    {
+      "type": "CommentBlock",
+      "value": "*\n\t * Removes all entities from the world.\n\t * Does not affect registered systems, components, or prototypes.\n\t *\n\t * @example\n\t * world.clear()\n\t ",
+      "start": 724,
+      "end": 875,
+      "loc": {
+        "start": {
+          "line": 45,
+          "column": 1
+        },
+        "end": {
+          "line": 51,
+          "column": 4
+        }
+      }
+    },
+    {
+      "type": "CommentLine",
+      "value": " Call onRemove on all components of all entities",
+      "start": 889,
+      "end": 939,
+      "loc": {
+        "start": {
+          "line": 53,
+          "column": 2
+        },
+        "end": {
+          "line": 53,
+          "column": 52
+        }
+      }
+    },
+    {
+      "type": "CommentLine",
+      "value": " Get component, and call onRemove if it exists as a function",
+      "start": 1040,
+      "end": 1102,
+      "loc": {
+        "start": {
+          "line": 56,
+          "column": 4
+        },
+        "end": {
+          "line": 56,
+          "column": 66
+        }
+      }
+    },
+    {
+      "type": "CommentLine",
+      "value": " Clear entities",
+      "start": 1196,
+      "end": 1213,
+      "loc": {
+        "start": {
+          "line": 62,
+          "column": 2
+        },
+        "end": {
+          "line": 62,
+          "column": 19
+        }
+      }
+    },
+    {
+      "type": "CommentBlock",
+      "value": "*\n\t * Registers a component type to the world. Components must be constructable. They are passed the entity first,\n\t * then the rest of the arguments from methods like entity.set(). Components also can have an onRemove() method.\n\t *\n\t * @param {string}   name           - The name\n\t * @param {function} componentClass - The component class, must be a constructable class or function\n\t *\n\t * @example\n\t * world.component('myComponent', class {\n\t *     constructor(entity, some, args) {\n\t *         this.entity = entity\n\t *         this.some = some\n\t *         this.args = args\n\t *     }\n\t * })\n\t * // entity === the new entity object\n\t * // some === 10\n\t * // args === 500\n\t * world.entity().set('myComponent', 10, 500)\n\t *\n\t * @return {string} Registered component name on success, undefined on failure\n\t ",
+      "start": 1281,
+      "end": 2090,
+      "loc": {
+        "start": {
+          "line": 67,
+          "column": 1
+        },
+        "end": {
+          "line": 88,
+          "column": 4
+        }
+      }
+    },
+    {
+      "type": "CommentLine",
+      "value": " Only allow functions and classes to be components",
+      "start": 2128,
+      "end": 2180,
+      "loc": {
+        "start": {
+          "line": 90,
+          "column": 2
+        },
+        "end": {
+          "line": 90,
+          "column": 54
+        }
+      }
+    },
+    {
+      "type": "CommentBlock",
+      "value": "*\n\t * Creates a new entity in the world\n\t *\n\t * @param {string} [name] - The prototype name to use\n\t *\n\t * @example\n\t * world.entity()\n\t *\n\t * @example\n\t * world.entity('Player')\n\t *\n\t * @return {Entity} The new entity created\n\t ",
+      "start": 2283,
+      "end": 2516,
+      "loc": {
+        "start": {
+          "line": 97,
+          "column": 1
+        },
+        "end": {
+          "line": 109,
+          "column": 4
+        }
+      }
+    },
+    {
+      "type": "CommentLine",
+      "value": " Use 'name' to get prototype data (if specified)",
+      "start": 2612,
+      "end": 2662,
+      "loc": {
+        "start": {
+          "line": 114,
+          "column": 2
+        },
+        "end": {
+          "line": 114,
+          "column": 52
+        }
+      }
+    },
+    {
+      "type": "CommentLine",
+      "value": " Add all components from prototype",
+      "start": 2712,
+      "end": 2748,
+      "loc": {
+        "start": {
+          "line": 116,
+          "column": 3
+        },
+        "end": {
+          "line": 116,
+          "column": 39
+        }
+      }
+    },
+    {
+      "type": "CommentLine",
+      "value": " Update component with data from template",
+      "start": 2839,
+      "end": 2882,
+      "loc": {
+        "start": {
+          "line": 119,
+          "column": 4
+        },
+        "end": {
+          "line": 119,
+          "column": 47
+        }
+      }
+    },
+    {
+      "type": "CommentBlock",
+      "value": "*\n\t * Registers a system to the world.\n\t * The order the systems get registered, is the order then run in.\n\t *\n\t * @example\n\t * // Movement system\n\t * world.system(['position', 'velocity'], class {\n\t *      constructor(context) {\n\t *          // This is showing how you can optionally pass parameters to the system's constructor\n\t *          this.context = context\n\t *      }\n\t *      every(position, velocity, entity) {\n\t *          position.x += velocity.x\n\t *          position.y += velocity.y\n\t *      }\n\t *  }, context)\n\t *\n\t * @example\n\t * // System that doesn't use every()\n\t * world.system(class {\n\t *      constructor(context) {\n\t *          this.context = context\n\t *      }\n\t *      pre() {\n\t *          // Handle events or something\n\t *      }\n\t *  }, context)\n\t *\n\t * @param {...Object} args - Both signatures are accepted: (components, systemClass, ...args) or (systemClass, ...args).\n\t *\n\t * **[components]**: The list of components the system will process in every(). This follows the same logic as entity.has() and world.every().\n\t *\n\t * **{systemClass}**: The system class to instantiate. Can contain the following methods: constructor, initialize, pre, every, post. Pre() and post() get called before and after every(), for each of the independent systems. See world.run() for an example of the call order.\n\t *\n\t * **[...args]**: The arguments to forward to the system's constructors.\n\t *\n\t * @return {number} Unique ID of the system on success or undefined on failure\n\t ",
+      "start": 3066,
+      "end": 4560,
+      "loc": {
+        "start": {
+          "line": 129,
+          "column": 1
+        },
+        "end": {
+          "line": 166,
+          "column": 4
+        }
+      }
+    },
+    {
+      "type": "CommentLine",
+      "value": " Get components and systemClass from arguments",
+      "start": 4582,
+      "end": 4630,
+      "loc": {
+        "start": {
+          "line": 168,
+          "column": 2
+        },
+        "end": {
+          "line": 168,
+          "column": 50
+        }
+      }
+    },
+    {
+      "type": "CommentLine",
+      "value": " Make sure the system is valid",
+      "start": 4849,
+      "end": 4881,
+      "loc": {
+        "start": {
+          "line": 180,
+          "column": 2
+        },
+        "end": {
+          "line": 180,
+          "column": 34
+        }
+      }
+    },
+    {
+      "type": "CommentLine",
+      "value": " Create the system, and set the component array query",
+      "start": 4918,
+      "end": 4973,
+      "loc": {
+        "start": {
+          "line": 182,
+          "column": 3
+        },
+        "end": {
+          "line": 182,
+          "column": 58
+        }
+      }
+    },
+    {
+      "type": "CommentLine",
+      "value": " Add the system, return its ID",
+      "start": 5059,
+      "end": 5091,
+      "loc": {
+        "start": {
+          "line": 186,
+          "column": 3
+        },
+        "end": {
+          "line": 186,
+          "column": 35
+        }
+      }
+    },
+    {
+      "type": "CommentBlock",
+      "value": "*\n\t * Calls initialize() on all systems\n\t *\n\t * @example\n\t * world.initialize(renderContext)\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' initialize() methods\n\t ",
+      "start": 5163,
+      "end": 5360,
+      "loc": {
+        "start": {
+          "line": 192,
+          "column": 1
+        },
+        "end": {
+          "line": 199,
+          "column": 4
+        }
+      }
+    },
+    {
+      "type": "CommentBlock",
+      "value": "*\n\t * Calls pre(), every(), and post() on all systems\n\t *\n\t * @example\n\t * world.run(deltaTime)\n\t *\n\t * @example\n\t * // Example flow of method call order:\n\t * // Setup systems:\n\t * world.system(systemA)\n\t * world.system(systemB)\n\t * // During world.run():\n\t * // systemA.pre()\n\t * // systemA.every() * number of entities\n\t * // systemA.post()\n\t * // systemB.pre()\n\t * // systemB.every() * number of entities\n\t * // systemB.post()\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' methods\n\t ",
+      "start": 5471,
+      "end": 5992,
+      "loc": {
+        "start": {
+          "line": 206,
+          "column": 1
+        },
+        "end": {
+          "line": 226,
+          "column": 4
+        }
+      }
+    },
+    {
+      "type": "CommentLine",
+      "value": " Run the \"every\" method in the system",
+      "start": 6084,
+      "end": 6123,
+      "loc": {
+        "start": {
+          "line": 231,
+          "column": 3
+        },
+        "end": {
+          "line": 231,
+          "column": 42
+        }
+      }
+    },
+    {
+      "type": "CommentBlock",
+      "value": "*\n\t * Iterate through entities with the specified components\n\t *\n\t * @example\n\t * // Use a callback to process entities one-by-one\n\t * world.every(['comp'], comp => {comp.value = 0})\n\t *\n\t * @example\n\t * // Get an iterator for the entities\n\t * let it = world.every(['comp'])\n\t * for (let entity of it) {...}\n\t *\n\t * @param {Array}     componentNames - The component names to match entites with. This checks if the entity\n\t * has ALL of the specified components, but does not check for additional components.\n\t * @param {Function}  callback       - The callback to call for each entity. Takes (...components, entity, ...args).\n\t * @param {...Object} [args]         - Any additional arguments to pass to the callback.\n\t *\n\t * @return {MapIterator} An iterator to the entities themselves\n\t ",
+      "start": 6279,
+      "end": 7070,
+      "loc": {
+        "start": {
+          "line": 240,
+          "column": 1
+        },
+        "end": {
+          "line": 258,
+          "column": 4
+        }
+      }
+    },
+    {
+      "type": "CommentLine",
+      "value": " Get indexed map of entities",
+      "start": 7117,
+      "end": 7147,
+      "loc": {
+        "start": {
+          "line": 260,
+          "column": 2
+        },
+        "end": {
+          "line": 260,
+          "column": 32
+        }
+      }
+    },
+    {
+      "type": "CommentLine",
+      "value": " Go through the map of entities",
+      "start": 7232,
+      "end": 7265,
+      "loc": {
+        "start": {
+          "line": 264,
+          "column": 3
+        },
+        "end": {
+          "line": 264,
+          "column": 36
+        }
+      }
+    },
+    {
+      "type": "CommentLine",
+      "value": " At this point, we can safely assume that all components exist, even if entities/components",
+      "start": 7313,
+      "end": 7406,
+      "loc": {
+        "start": {
+          "line": 266,
+          "column": 4
+        },
+        "end": {
+          "line": 266,
+          "column": 97
+        }
+      }
+    },
+    {
+      "type": "CommentLine",
+      "value": " are deleted/modified during the loop, because JavaScript's MapIterator is smart enough.",
+      "start": 7411,
+      "end": 7501,
+      "loc": {
+        "start": {
+          "line": 267,
+          "column": 4
+        },
+        "end": {
+          "line": 267,
+          "column": 94
+        }
+      }
+    },
+    {
+      "type": "CommentLine",
+      "value": " Get all components as an array",
+      "start": 7507,
+      "end": 7540,
+      "loc": {
+        "start": {
+          "line": 269,
+          "column": 4
+        },
+        "end": {
+          "line": 269,
+          "column": 37
+        }
+      }
+    },
+    {
+      "type": "CommentLine",
+      "value": " Pass components, then the main entity, then any additional arguments",
+      "start": 7612,
+      "end": 7683,
+      "loc": {
+        "start": {
+          "line": 272,
+          "column": 4
+        },
+        "end": {
+          "line": 272,
+          "column": 75
+        }
+      }
+    },
+    {
+      "type": "CommentLine",
+      "value": " Stop the iteration when the callback returns false",
+      "start": 7747,
+      "end": 7800,
+      "loc": {
+        "start": {
+          "line": 275,
+          "column": 4
+        },
+        "end": {
+          "line": 275,
+          "column": 57
+        }
+      }
+    },
+    {
+      "type": "CommentBlock",
+      "value": "*\n\t * Returns an array of entities with matching components\n\t * Simplified version of every(), returns an actual array, and only takes component names as arguments.\n\t *\n\t * @example\n\t * world.get('player', 'sprite')\n\t *\n\t * @param {Array} componentNames - The component names to match on. See every() for how this matches.\n\t *\n\t * @return {Array} Array of entities, instead of iterator like every().\n\t ",
+      "start": 7888,
+      "end": 8294,
+      "loc": {
+        "start": {
+          "line": 285,
+          "column": 1
+        },
+        "end": {
+          "line": 295,
+          "column": 4
+        }
+      }
+    },
+    {
+      "type": "CommentBlock",
+      "value": "*\n\t * Registers entity prototype(s). Any existing prototype names that are the same will be overwritten\n\t *\n\t * @example\n\t * world.prototype({\n\t *     Movable: {\n\t *         position: {},\n\t *         velocity: {}\n\t *     }\n\t * })\n\t *\n\t * @param {Object} data - Object structure to register as a prototype. Should be a dictionary with the top level keys\n\t * being the prototype names. Can also be a JSON formatted string.\n\t *\n\t * @return {number} Number of prototypes added.\n\t ",
+      "start": 8367,
+      "end": 8847,
+      "loc": {
+        "start": {
+          "line": 300,
+          "column": 1
+        },
+        "end": {
+          "line": 315,
+          "column": 4
+        }
+      }
+    },
+    {
+      "type": "CommentLine",
+      "value": " Convert to an object when given a string",
+      "start": 8886,
+      "end": 8929,
+      "loc": {
+        "start": {
+          "line": 319,
+          "column": 2
+        },
+        "end": {
+          "line": 319,
+          "column": 45
+        }
+      }
+    },
+    {
+      "type": "CommentLine",
+      "value": " Data must be an object at this point",
+      "start": 8998,
+      "end": 9037,
+      "loc": {
+        "start": {
+          "line": 324,
+          "column": 2
+        },
+        "end": {
+          "line": 324,
+          "column": 41
+        }
+      }
+    },
+    {
+      "type": "CommentLine",
+      "value": " Iterate through prototype names",
+      "start": 9075,
+      "end": 9109,
+      "loc": {
+        "start": {
+          "line": 326,
+          "column": 3
+        },
+        "end": {
+          "line": 326,
+          "column": 37
+        }
+      }
+    },
+    {
+      "type": "CommentLine",
+      "value": " Iterate through component names",
+      "start": 9210,
+      "end": 9244,
+      "loc": {
+        "start": {
+          "line": 330,
+          "column": 4
+        },
+        "end": {
+          "line": 330,
+          "column": 38
+        }
+      }
+    },
+    {
+      "type": "CommentLine",
+      "value": " Store strings of each component",
+      "start": 9290,
+      "end": 9324,
+      "loc": {
+        "start": {
+          "line": 332,
+          "column": 5
+        },
+        "end": {
+          "line": 332,
+          "column": 39
+        }
+      }
+    }
+  ],
+  "tokens": [
+    {
+      "type": "CommentBlock",
+      "value": "* @ignore ",
+      "start": 0,
+      "end": 14,
+      "loc": {
+        "start": {
+          "line": 1,
+          "column": 0
+        },
+        "end": {
+          "line": 1,
+          "column": 14
+        }
+      }
+    },
+    {
+      "type": {
+        "label": "const",
+        "keyword": "const",
+        "beforeExpr": false,
+        "startsExpr": false,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "value": "const",
+      "start": 15,
+      "end": 20,
+      "loc": {
+        "start": {
+          "line": 2,
+          "column": 0
+        },
+        "end": {
+          "line": 2,
+          "column": 5
+        }
+      }
+    },
+    {
+      "type": {
+        "label": "{",
+        "beforeExpr": true,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "start": 21,
+      "end": 22,
+      "loc": {
+        "start": {
+          "line": 2,
+          "column": 6
+        },
+        "end": {
+          "line": 2,
+          "column": 7
+        }
+      }
+    },
+    {
+      "type": {
+        "label": "name",
+        "beforeExpr": false,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "value": "invoke",
+      "start": 23,
+      "end": 29,
+      "loc": {
+        "start": {
+          "line": 2,
+          "column": 8
+        },
+        "end": {
+          "line": 2,
+          "column": 14
+        }
+      }
+    },
+    {
+      "type": {
+        "label": ",",
+        "beforeExpr": true,
+        "startsExpr": false,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "start": 29,
+      "end": 30,
+      "loc": {
+        "start": {
+          "line": 2,
+          "column": 14
+        },
+        "end": {
+          "line": 2,
+          "column": 15
+        }
+      }
+    },
+    {
+      "type": {
+        "label": "name",
+        "beforeExpr": false,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "value": "isFunction",
+      "start": 31,
+      "end": 41,
+      "loc": {
+        "start": {
+          "line": 2,
+          "column": 16
+        },
+        "end": {
+          "line": 2,
+          "column": 26
+        }
+      }
+    },
+    {
+      "type": {
+        "label": "}",
+        "beforeExpr": false,
+        "startsExpr": false,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "start": 42,
+      "end": 43,
+      "loc": {
+        "start": {
+          "line": 2,
+          "column": 27
+        },
+        "end": {
+          "line": 2,
+          "column": 28
+        }
+      }
+    },
+    {
+      "type": {
+        "label": "=",
+        "beforeExpr": true,
+        "startsExpr": false,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": true,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "value": "=",
+      "start": 44,
+      "end": 45,
+      "loc": {
+        "start": {
+          "line": 2,
+          "column": 29
+        },
+        "end": {
+          "line": 2,
+          "column": 30
+        }
+      }
+    },
+    {
+      "type": {
+        "label": "name",
+        "beforeExpr": false,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "value": "require",
+      "start": 46,
+      "end": 53,
+      "loc": {
+        "start": {
+          "line": 2,
+          "column": 31
+        },
+        "end": {
+          "line": 2,
+          "column": 38
+        }
+      }
+    },
+    {
+      "type": {
+        "label": "(",
+        "beforeExpr": true,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "start": 53,
+      "end": 54,
+      "loc": {
+        "start": {
+          "line": 2,
+          "column": 38
+        },
+        "end": {
+          "line": 2,
+          "column": 39
+        }
+      }
+    },
+    {
+      "type": {
+        "label": "string",
+        "beforeExpr": false,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "value": "./utilities.js",
+      "start": 54,
+      "end": 70,
+      "loc": {
+        "start": {
+          "line": 2,
+          "column": 39
+        },
+        "end": {
+          "line": 2,
+          "column": 55
+        }
+      }
+    },
+    {
+      "type": {
+        "label": ")",
+        "beforeExpr": false,
+        "startsExpr": false,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "start": 70,
+      "end": 71,
+      "loc": {
+        "start": {
+          "line": 2,
+          "column": 55
+        },
+        "end": {
+          "line": 2,
+          "column": 56
+        }
+      }
+    },
+    {
+      "type": "CommentBlock",
+      "value": "* @ignore ",
+      "start": 73,
+      "end": 87,
+      "loc": {
+        "start": {
+          "line": 4,
+          "column": 0
+        },
+        "end": {
+          "line": 4,
+          "column": 14
+        }
+      }
+    },
+    {
+      "type": {
+        "label": "const",
+        "keyword": "const",
+        "beforeExpr": false,
+        "startsExpr": false,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "value": "const",
+      "start": 88,
+      "end": 93,
+      "loc": {
+        "start": {
+          "line": 5,
+          "column": 0
+        },
+        "end": {
+          "line": 5,
+          "column": 5
+        }
+      }
+    },
+    {
+      "type": {
+        "label": "{",
+        "beforeExpr": true,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "start": 94,
+      "end": 95,
+      "loc": {
+        "start": {
+          "line": 5,
+          "column": 6
+        },
+        "end": {
+          "line": 5,
+          "column": 7
+        }
+      }
+    },
+    {
+      "type": {
+        "label": "name",
+        "beforeExpr": false,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "value": "Entity",
+      "start": 96,
+      "end": 102,
+      "loc": {
+        "start": {
+          "line": 5,
+          "column": 8
+        },
+        "end": {
+          "line": 5,
+          "column": 14
+        }
+      }
+    },
+    {
+      "type": {
+        "label": "}",
+        "beforeExpr": false,
+        "startsExpr": false,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "start": 103,
+      "end": 104,
+      "loc": {
+        "start": {
+          "line": 5,
+          "column": 15
+        },
+        "end": {
+          "line": 5,
+          "column": 16
+        }
+      }
+    },
+    {
+      "type": {
+        "label": "=",
+        "beforeExpr": true,
+        "startsExpr": false,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": true,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "value": "=",
+      "start": 105,
+      "end": 106,
+      "loc": {
+        "start": {
+          "line": 5,
+          "column": 17
+        },
+        "end": {
+          "line": 5,
+          "column": 18
+        }
+      }
+    },
+    {
+      "type": {
+        "label": "name",
+        "beforeExpr": false,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "value": "require",
+      "start": 107,
+      "end": 114,
+      "loc": {
+        "start": {
+          "line": 5,
+          "column": 19
         },
-        "leadingComments": [
-          {
-            "type": "CommentBlock",
-            "value": "*\n * Class for world.\n *\n * @class      World (name)\n ",
-            "start": 206,
-            "end": 264,
-            "loc": {
-              "start": {
-                "line": 10,
-                "column": 0
-              },
-              "end": {
-                "line": 14,
-                "column": 3
-              }
-            }
-          }
-        ]
+        "end": {
+          "line": 5,
+          "column": 26
+        }
+      }
+    },
+    {
+      "type": {
+        "label": "(",
+        "beforeExpr": true,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
       },
-      {
-        "type": "ExpressionStatement",
-        "start": 8794,
-        "end": 8815,
-        "loc": {
-          "start": {
-            "line": 315,
-            "column": 0
-          },
-          "end": {
-            "line": 315,
-            "column": 21
-          }
+      "start": 114,
+      "end": 115,
+      "loc": {
+        "start": {
+          "line": 5,
+          "column": 26
         },
-        "expression": {
-          "type": "AssignmentExpression",
-          "start": 8794,
-          "end": 8815,
-          "loc": {
-            "start": {
-              "line": 315,
-              "column": 0
-            },
-            "end": {
-              "line": 315,
-              "column": 21
-            }
-          },
-          "operator": "=",
-          "left": {
-            "type": "MemberExpression",
-            "start": 8794,
-            "end": 8807,
-            "loc": {
-              "start": {
-                "line": 315,
-                "column": 0
-              },
-              "end": {
-                "line": 315,
-                "column": 13
-              }
-            },
-            "object": {
-              "type": "Identifier",
-              "start": 8794,
-              "end": 8801,
-              "loc": {
-                "start": {
-                  "line": 315,
-                  "column": 0
-                },
-                "end": {
-                  "line": 315,
-                  "column": 7
-                },
-                "identifierName": "exports"
-              },
-              "name": "exports"
-            },
-            "property": {
-              "type": "Identifier",
-              "start": 8802,
-              "end": 8807,
-              "loc": {
-                "start": {
-                  "line": 315,
-                  "column": 8
-                },
-                "end": {
-                  "line": 315,
-                  "column": 13
-                },
-                "identifierName": "World"
-              },
-              "name": "World"
-            },
-            "computed": false
-          },
-          "right": {
-            "type": "Identifier",
-            "start": 8810,
-            "end": 8815,
-            "loc": {
-              "start": {
-                "line": 315,
-                "column": 16
-              },
-              "end": {
-                "line": 315,
-                "column": 21
-              },
-              "identifierName": "World"
-            },
-            "name": "World"
-          }
+        "end": {
+          "line": 5,
+          "column": 27
         }
       }
-    ],
-    "directives": []
-  },
-  "comments": [
+    },
     {
-      "type": "CommentBlock",
-      "value": "* @ignore ",
-      "start": 0,
-      "end": 14,
+      "type": {
+        "label": "string",
+        "beforeExpr": false,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "value": "./entity.js",
+      "start": 115,
+      "end": 128,
       "loc": {
         "start": {
-          "line": 1,
-          "column": 0
+          "line": 5,
+          "column": 27
         },
         "end": {
-          "line": 1,
-          "column": 14
+          "line": 5,
+          "column": 40
         }
       }
     },
     {
-      "type": "CommentBlock",
-      "value": "* @ignore ",
-      "start": 73,
-      "end": 87,
+      "type": {
+        "label": ")",
+        "beforeExpr": false,
+        "startsExpr": false,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "start": 128,
+      "end": 129,
       "loc": {
         "start": {
-          "line": 4,
-          "column": 0
+          "line": 5,
+          "column": 40
         },
         "end": {
-          "line": 4,
-          "column": 14
+          "line": 5,
+          "column": 41
         }
       }
     },
@@ -9613,669 +11738,1048 @@
       }
     },
     {
-      "type": "CommentBlock",
-      "value": "*\n * Class for world.\n *\n * @class      World (name)\n ",
-      "start": 206,
-      "end": 264,
+      "type": {
+        "label": "const",
+        "keyword": "const",
+        "beforeExpr": false,
+        "startsExpr": false,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "value": "const",
+      "start": 146,
+      "end": 151,
       "loc": {
         "start": {
-          "line": 10,
+          "line": 8,
           "column": 0
         },
         "end": {
-          "line": 14,
-          "column": 3
+          "line": 8,
+          "column": 5
         }
       }
     },
     {
-      "type": "CommentBlock",
-      "value": "*\n\t * Constructs an instance of the world.\n\t ",
-      "start": 280,
-      "end": 329,
+      "type": {
+        "label": "{",
+        "beforeExpr": true,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "start": 152,
+      "end": 153,
+      "loc": {
+        "start": {
+          "line": 8,
+          "column": 6
+        },
+        "end": {
+          "line": 8,
+          "column": 7
+        }
+      }
+    },
+    {
+      "type": {
+        "label": "name",
+        "beforeExpr": false,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "value": "ComponentIndex",
+      "start": 154,
+      "end": 168,
+      "loc": {
+        "start": {
+          "line": 8,
+          "column": 8
+        },
+        "end": {
+          "line": 8,
+          "column": 22
+        }
+      }
+    },
+    {
+      "type": {
+        "label": "}",
+        "beforeExpr": false,
+        "startsExpr": false,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "start": 169,
+      "end": 170,
       "loc": {
         "start": {
-          "line": 16,
-          "column": 1
+          "line": 8,
+          "column": 23
         },
         "end": {
-          "line": 18,
-          "column": 4
+          "line": 8,
+          "column": 24
         }
       }
     },
     {
-      "type": "CommentBlock",
-      "value": "* @ignore ",
-      "start": 349,
-      "end": 363,
+      "type": {
+        "label": "=",
+        "beforeExpr": true,
+        "startsExpr": false,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": true,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "value": "=",
+      "start": 171,
+      "end": 172,
       "loc": {
         "start": {
-          "line": 20,
-          "column": 2
+          "line": 8,
+          "column": 25
         },
         "end": {
-          "line": 20,
-          "column": 16
+          "line": 8,
+          "column": 26
         }
       }
     },
     {
-      "type": "CommentBlock",
-      "value": "*\n\t\t * Maps entity IDs to entities\n\t\t * @ignore\n\t\t ",
-      "start": 387,
-      "end": 442,
+      "type": {
+        "label": "name",
+        "beforeExpr": false,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "value": "require",
+      "start": 173,
+      "end": 180,
       "loc": {
         "start": {
-          "line": 23,
-          "column": 2
+          "line": 8,
+          "column": 27
         },
         "end": {
-          "line": 26,
-          "column": 5
+          "line": 8,
+          "column": 34
         }
       }
     },
     {
-      "type": "CommentBlock",
-      "value": "* @ignore ",
-      "start": 474,
-      "end": 488,
+      "type": {
+        "label": "(",
+        "beforeExpr": true,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "start": 180,
+      "end": 181,
       "loc": {
         "start": {
-          "line": 29,
-          "column": 2
+          "line": 8,
+          "column": 34
         },
         "end": {
-          "line": 29,
-          "column": 16
+          "line": 8,
+          "column": 35
         }
       }
     },
     {
-      "type": "CommentBlock",
-      "value": "* @ignore ",
-      "start": 515,
-      "end": 529,
+      "type": {
+        "label": "string",
+        "beforeExpr": false,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "value": "./component_index.js",
+      "start": 181,
+      "end": 203,
       "loc": {
         "start": {
-          "line": 32,
-          "column": 2
+          "line": 8,
+          "column": 35
         },
         "end": {
-          "line": 32,
-          "column": 16
+          "line": 8,
+          "column": 57
         }
       }
     },
     {
-      "type": "CommentBlock",
-      "value": "* @ignore ",
-      "start": 561,
-      "end": 575,
+      "type": {
+        "label": ")",
+        "beforeExpr": false,
+        "startsExpr": false,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "start": 203,
+      "end": 204,
       "loc": {
         "start": {
-          "line": 35,
-          "column": 2
+          "line": 8,
+          "column": 57
         },
         "end": {
-          "line": 35,
-          "column": 16
+          "line": 8,
+          "column": 58
         }
       }
     },
     {
       "type": "CommentBlock",
-      "value": "*\n\t\t * Maps entire queries to arrays of entities\n\t\t * @ignore\n\t\t ",
-      "start": 600,
-      "end": 669,
+      "value": "*\n * Class for world.\n *\n * @class      World (name)\n ",
+      "start": 206,
+      "end": 264,
       "loc": {
         "start": {
-          "line": 38,
-          "column": 2
+          "line": 10,
+          "column": 0
         },
         "end": {
-          "line": 41,
-          "column": 5
+          "line": 14,
+          "column": 3
         }
       }
     },
     {
-      "type": "CommentBlock",
-      "value": "*\n\t * Removes all entities from the world.\n\t * Does not affect registered systems, components, or prototypes.\n\t *\n\t * @example\n\t * world.clear()\n\t ",
-      "start": 724,
-      "end": 875,
+      "type": {
+        "label": "class",
+        "keyword": "class",
+        "beforeExpr": false,
+        "startsExpr": false,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "value": "class",
+      "start": 265,
+      "end": 270,
       "loc": {
         "start": {
-          "line": 45,
-          "column": 1
+          "line": 15,
+          "column": 0
         },
         "end": {
-          "line": 51,
-          "column": 4
+          "line": 15,
+          "column": 5
         }
       }
     },
     {
-      "type": "CommentLine",
-      "value": " Call onRemove on all components of all entities",
-      "start": 889,
-      "end": 939,
+      "type": {
+        "label": "name",
+        "beforeExpr": false,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "value": "World",
+      "start": 271,
+      "end": 276,
       "loc": {
         "start": {
-          "line": 53,
-          "column": 2
+          "line": 15,
+          "column": 6
         },
         "end": {
-          "line": 53,
-          "column": 52
+          "line": 15,
+          "column": 11
         }
       }
     },
     {
-      "type": "CommentLine",
-      "value": " Get component, and call onRemove if it exists as a function",
-      "start": 1040,
-      "end": 1102,
+      "type": {
+        "label": "{",
+        "beforeExpr": true,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "start": 277,
+      "end": 278,
       "loc": {
         "start": {
-          "line": 56,
-          "column": 4
+          "line": 15,
+          "column": 12
         },
         "end": {
-          "line": 56,
-          "column": 66
+          "line": 15,
+          "column": 13
         }
       }
     },
     {
-      "type": "CommentLine",
-      "value": " Clear entities",
-      "start": 1196,
-      "end": 1213,
+      "type": "CommentBlock",
+      "value": "*\n\t * Constructs an instance of the world.\n\t ",
+      "start": 280,
+      "end": 329,
       "loc": {
         "start": {
-          "line": 62,
-          "column": 2
+          "line": 16,
+          "column": 1
         },
         "end": {
-          "line": 62,
-          "column": 19
+          "line": 18,
+          "column": 4
         }
       }
     },
     {
-      "type": "CommentBlock",
-      "value": "*\n\t * Registers a component type to the world. Components must be constructable. They are passed the entity first,\n\t * then the rest of the arguments from methods like entity.set(). Components also can have an onRemove() method.\n\t *\n\t * @param {string}   name           - The name\n\t * @param {function} componentClass - The component class, must be a constructable class or function\n\t *\n\t * @example\n\t * world.component('myComponent', class {\n\t *     constructor(entity, some, args) {\n\t *         this.entity = entity\n\t *         this.some = some\n\t *         this.args = args\n\t *     }\n\t * })\n\t * // entity === the new entity object\n\t * // some === 10\n\t * // args === 500\n\t * world.entity().set('myComponent', 10, 500)\n\t *\n\t * @return {string} Registered component name on success, undefined on failure\n\t ",
-      "start": 1281,
-      "end": 2090,
+      "type": {
+        "label": "name",
+        "beforeExpr": false,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "value": "constructor",
+      "start": 331,
+      "end": 342,
       "loc": {
         "start": {
-          "line": 67,
+          "line": 19,
           "column": 1
         },
         "end": {
-          "line": 88,
-          "column": 4
+          "line": 19,
+          "column": 12
         }
       }
     },
     {
-      "type": "CommentLine",
-      "value": " Only allow functions and classes to be components",
-      "start": 2128,
-      "end": 2180,
+      "type": {
+        "label": "(",
+        "beforeExpr": true,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "start": 342,
+      "end": 343,
       "loc": {
         "start": {
-          "line": 90,
-          "column": 2
+          "line": 19,
+          "column": 12
         },
         "end": {
-          "line": 90,
-          "column": 54
+          "line": 19,
+          "column": 13
         }
       }
     },
     {
-      "type": "CommentBlock",
-      "value": "*\n\t * Creates a new entity in the world\n\t *\n\t * @param {string} [name] - The prototype name to use\n\t *\n\t * @example\n\t * world.entity()\n\t *\n\t * @example\n\t * world.entity('Player')\n\t *\n\t * @return {Entity} The new entity created\n\t ",
-      "start": 2283,
-      "end": 2516,
+      "type": {
+        "label": ")",
+        "beforeExpr": false,
+        "startsExpr": false,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "start": 343,
+      "end": 344,
       "loc": {
         "start": {
-          "line": 97,
-          "column": 1
+          "line": 19,
+          "column": 13
         },
         "end": {
-          "line": 109,
-          "column": 4
+          "line": 19,
+          "column": 14
         }
       }
     },
     {
-      "type": "CommentLine",
-      "value": " Use 'name' to get prototype data (if specified)",
-      "start": 2612,
-      "end": 2662,
+      "type": {
+        "label": "{",
+        "beforeExpr": true,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "start": 345,
+      "end": 346,
       "loc": {
         "start": {
-          "line": 114,
-          "column": 2
+          "line": 19,
+          "column": 15
         },
         "end": {
-          "line": 114,
-          "column": 52
+          "line": 19,
+          "column": 16
         }
       }
     },
     {
-      "type": "CommentLine",
-      "value": " Add all components from prototype",
-      "start": 2712,
-      "end": 2748,
+      "type": "CommentBlock",
+      "value": "* @ignore ",
+      "start": 349,
+      "end": 363,
       "loc": {
         "start": {
-          "line": 116,
-          "column": 3
+          "line": 20,
+          "column": 2
         },
         "end": {
-          "line": 116,
-          "column": 39
+          "line": 20,
+          "column": 16
         }
       }
     },
     {
-      "type": "CommentLine",
-      "value": " Update component with data from template",
-      "start": 2839,
-      "end": 2882,
+      "type": {
+        "label": "this",
+        "keyword": "this",
+        "beforeExpr": false,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "value": "this",
+      "start": 366,
+      "end": 370,
       "loc": {
         "start": {
-          "line": 119,
-          "column": 4
+          "line": 21,
+          "column": 2
         },
         "end": {
-          "line": 119,
-          "column": 47
+          "line": 21,
+          "column": 6
         }
       }
     },
     {
-      "type": "CommentBlock",
-      "value": "*\n\t * Registers a system to the world.\n\t * The order the systems get registered, is the order then run in.\n\t *\n\t * @example\n\t * // Movement system\n\t * world.system(['position', 'velocity'], class {\n\t *      every(position, velocity, entity) {\n\t *          position.x += velocity.x\n\t *          position.y += velocity.y\n\t *      }\n\t *  })\n\t *\n\t * @param {Array}     components  - The list of components the system will process in every(). This follows the same logic as entity.has() and world.every().\n\t * @param {Function}  systemClass - The system class to instantiate. Can contain the following methods: constructor, initialize,\n\t * pre, every, post. Pre() and post() get called before and after every(), for each of the independent systems. See world.run()\n\t * for an example of the call order.\n\t * @param {...Object} [args]      - The arguments to forward to the system's constructors\n\t *\n\t * @return {number} Unique ID of the system on success or undefined on failure\n\t ",
-      "start": 3066,
-      "end": 4045,
+      "type": {
+        "label": ".",
+        "beforeExpr": false,
+        "startsExpr": false,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "start": 370,
+      "end": 371,
       "loc": {
         "start": {
-          "line": 129,
-          "column": 1
+          "line": 21,
+          "column": 6
         },
         "end": {
-          "line": 149,
-          "column": 4
+          "line": 21,
+          "column": 7
         }
       }
     },
     {
-      "type": "CommentLine",
-      "value": " TODO: Make components optional, and parameters more dynamic by only using ...args",
-      "start": 4092,
-      "end": 4176,
+      "type": {
+        "label": "name",
+        "beforeExpr": false,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "value": "systems",
+      "start": 371,
+      "end": 378,
       "loc": {
         "start": {
-          "line": 151,
-          "column": 2
+          "line": 21,
+          "column": 7
         },
         "end": {
-          "line": 151,
-          "column": 86
+          "line": 21,
+          "column": 14
         }
       }
     },
     {
-      "type": "CommentLine",
-      "value": " Create the system, and set the component array query",
-      "start": 4213,
-      "end": 4268,
+      "type": {
+        "label": "=",
+        "beforeExpr": true,
+        "startsExpr": false,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": true,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "value": "=",
+      "start": 379,
+      "end": 380,
       "loc": {
         "start": {
-          "line": 153,
-          "column": 3
+          "line": 21,
+          "column": 15
         },
         "end": {
-          "line": 153,
-          "column": 58
+          "line": 21,
+          "column": 16
         }
       }
     },
     {
-      "type": "CommentLine",
-      "value": " Add the system, return its ID",
-      "start": 4354,
-      "end": 4386,
+      "type": {
+        "label": "[",
+        "beforeExpr": true,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "start": 381,
+      "end": 382,
       "loc": {
         "start": {
-          "line": 157,
-          "column": 3
+          "line": 21,
+          "column": 17
         },
         "end": {
-          "line": 157,
-          "column": 35
+          "line": 21,
+          "column": 18
         }
       }
     },
     {
-      "type": "CommentBlock",
-      "value": "*\n\t * Calls initialize() on all systems\n\t *\n\t * @example\n\t * world.initialize(renderContext)\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' initialize() methods\n\t ",
-      "start": 4458,
-      "end": 4655,
+      "type": {
+        "label": "]",
+        "beforeExpr": false,
+        "startsExpr": false,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "start": 382,
+      "end": 383,
       "loc": {
         "start": {
-          "line": 163,
-          "column": 1
+          "line": 21,
+          "column": 18
         },
         "end": {
-          "line": 170,
-          "column": 4
+          "line": 21,
+          "column": 19
         }
       }
     },
     {
       "type": "CommentBlock",
-      "value": "*\n\t * Calls pre(), every(), and post() on all systems\n\t *\n\t * @example\n\t * world.run(deltaTime)\n\t *\n\t * @example\n\t * // Example flow of method call order:\n\t * // Setup systems:\n\t * world.system([], systemA)\n\t * world.system([], systemB)\n\t * // During world.run():\n\t * // systemA.pre()\n\t * // systemA.every() * number of entities\n\t * // systemA.post()\n\t * // systemB.pre()\n\t * // systemB.every() * number of entities\n\t * // systemB.post()\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' methods\n\t ",
-      "start": 4766,
-      "end": 5295,
+      "value": "*\n\t\t * Maps entity IDs to entities\n\t\t * @ignore\n\t\t ",
+      "start": 387,
+      "end": 442,
       "loc": {
         "start": {
-          "line": 177,
-          "column": 1
+          "line": 23,
+          "column": 2
         },
         "end": {
-          "line": 197,
-          "column": 4
+          "line": 26,
+          "column": 5
         }
       }
     },
     {
-      "type": "CommentLine",
-      "value": " Run the \"every\" method in the system",
-      "start": 5387,
-      "end": 5426,
+      "type": {
+        "label": "this",
+        "keyword": "this",
+        "beforeExpr": false,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "value": "this",
+      "start": 445,
+      "end": 449,
       "loc": {
         "start": {
-          "line": 202,
-          "column": 3
+          "line": 27,
+          "column": 2
         },
         "end": {
-          "line": 202,
-          "column": 42
+          "line": 27,
+          "column": 6
         }
       }
     },
     {
-      "type": "CommentBlock",
-      "value": "*\n\t * Iterate through entities with the specified components\n\t *\n\t * @example\n\t * // Use a callback to process entities one-by-one\n\t * world.every(['comp'], comp => {comp.value = 0})\n\t *\n\t * @example\n\t * // Get an iterator for the entities\n\t * let it = world.every(['comp'])\n\t * for (let entity of it) {...}\n\t *\n\t * @param {Array}     componentNames - The component names to match entites with. This checks if the entity\n\t * has ALL of the specified components, but does not check for additional components.\n\t * @param {Function}  callback       - The callback to call for each entity. Takes (...components, entity, ...args).\n\t * @param {...Object} [args]         - Any additional arguments to pass to the callback.\n\t *\n\t * @return {MapIterator} An iterator to the entities themselves\n\t ",
-      "start": 5582,
-      "end": 6373,
+      "type": {
+        "label": ".",
+        "beforeExpr": false,
+        "startsExpr": false,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "start": 449,
+      "end": 450,
       "loc": {
         "start": {
-          "line": 211,
-          "column": 1
+          "line": 27,
+          "column": 6
         },
         "end": {
-          "line": 229,
-          "column": 4
+          "line": 27,
+          "column": 7
         }
       }
     },
     {
-      "type": "CommentLine",
-      "value": " Get indexed map of entities",
-      "start": 6420,
-      "end": 6450,
+      "type": {
+        "label": "name",
+        "beforeExpr": false,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "value": "entities",
+      "start": 450,
+      "end": 458,
       "loc": {
         "start": {
-          "line": 231,
-          "column": 2
+          "line": 27,
+          "column": 7
         },
         "end": {
-          "line": 231,
-          "column": 32
+          "line": 27,
+          "column": 15
         }
       }
     },
     {
-      "type": "CommentLine",
-      "value": " Go through the map of entities",
-      "start": 6535,
-      "end": 6568,
+      "type": {
+        "label": "=",
+        "beforeExpr": true,
+        "startsExpr": false,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": true,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "value": "=",
+      "start": 459,
+      "end": 460,
       "loc": {
         "start": {
-          "line": 235,
-          "column": 3
+          "line": 27,
+          "column": 16
         },
         "end": {
-          "line": 235,
-          "column": 36
+          "line": 27,
+          "column": 17
         }
       }
     },
     {
-      "type": "CommentLine",
-      "value": " At this point, we can safely assume that all components exist, even if entities/components",
-      "start": 6616,
-      "end": 6709,
+      "type": {
+        "label": "new",
+        "keyword": "new",
+        "beforeExpr": true,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "value": "new",
+      "start": 461,
+      "end": 464,
       "loc": {
         "start": {
-          "line": 237,
-          "column": 4
+          "line": 27,
+          "column": 18
         },
         "end": {
-          "line": 237,
-          "column": 97
+          "line": 27,
+          "column": 21
         }
       }
     },
     {
-      "type": "CommentLine",
-      "value": " are deleted/modified during the loop, because JavaScript's MapIterator is smart enough.",
-      "start": 6714,
-      "end": 6804,
+      "type": {
+        "label": "name",
+        "beforeExpr": false,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "value": "Map",
+      "start": 465,
+      "end": 468,
       "loc": {
         "start": {
-          "line": 238,
-          "column": 4
+          "line": 27,
+          "column": 22
         },
         "end": {
-          "line": 238,
-          "column": 94
+          "line": 27,
+          "column": 25
         }
       }
     },
     {
-      "type": "CommentLine",
-      "value": " Get all components as an array",
-      "start": 6810,
-      "end": 6843,
+      "type": {
+        "label": "(",
+        "beforeExpr": true,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "start": 468,
+      "end": 469,
       "loc": {
         "start": {
-          "line": 240,
-          "column": 4
+          "line": 27,
+          "column": 25
         },
         "end": {
-          "line": 240,
-          "column": 37
+          "line": 27,
+          "column": 26
         }
       }
     },
     {
-      "type": "CommentLine",
-      "value": " Pass components, then the main entity, then any additional arguments",
-      "start": 6915,
-      "end": 6986,
+      "type": {
+        "label": ")",
+        "beforeExpr": false,
+        "startsExpr": false,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "start": 469,
+      "end": 470,
       "loc": {
         "start": {
-          "line": 243,
-          "column": 4
+          "line": 27,
+          "column": 26
         },
         "end": {
-          "line": 243,
-          "column": 75
+          "line": 27,
+          "column": 27
         }
       }
     },
     {
-      "type": "CommentLine",
-      "value": " Stop the iteration when the callback returns false",
-      "start": 7050,
-      "end": 7103,
+      "type": "CommentBlock",
+      "value": "* @ignore ",
+      "start": 474,
+      "end": 488,
       "loc": {
         "start": {
-          "line": 246,
-          "column": 4
+          "line": 29,
+          "column": 2
         },
         "end": {
-          "line": 246,
-          "column": 57
+          "line": 29,
+          "column": 16
         }
       }
     },
     {
-      "type": "CommentBlock",
-      "value": "*\n\t * Returns an array of entities with matching components\n\t * Simplified version of every(), returns an actual array, and only takes component names as arguments.\n\t *\n\t * @example\n\t * world.get('player', 'sprite')\n\t *\n\t * @param {Array} componentNames - The component names to match on. See every() for how this matches.\n\t *\n\t * @return {Array} Array of entities, instead of iterator like every().\n\t ",
-      "start": 7191,
-      "end": 7597,
+      "type": {
+        "label": "this",
+        "keyword": "this",
+        "beforeExpr": false,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "value": "this",
+      "start": 491,
+      "end": 495,
       "loc": {
         "start": {
-          "line": 256,
-          "column": 1
+          "line": 30,
+          "column": 2
         },
         "end": {
-          "line": 266,
-          "column": 4
+          "line": 30,
+          "column": 6
         }
       }
     },
     {
-      "type": "CommentBlock",
-      "value": "*\n\t * Registers entity prototype(s). Any existing prototype names that are the same will be overwritten\n\t *\n\t * @example\n\t * world.prototype({\n\t *     Movable: {\n\t *         position: {},\n\t *         velocity: {}\n\t *     }\n\t * })\n\t *\n\t * @param {Object} data - Object structure to register as a prototype. Should be a dictionary with the top level keys\n\t * being the prototype names. Can also be a JSON formatted string.\n\t *\n\t * @return {number} Number of prototypes added.\n\t ",
-      "start": 7670,
-      "end": 8150,
+      "type": {
+        "label": ".",
+        "beforeExpr": false,
+        "startsExpr": false,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "start": 495,
+      "end": 496,
       "loc": {
         "start": {
-          "line": 271,
-          "column": 1
+          "line": 30,
+          "column": 6
         },
         "end": {
-          "line": 286,
-          "column": 4
+          "line": 30,
+          "column": 7
         }
       }
     },
     {
-      "type": "CommentLine",
-      "value": " Convert to an object when given a string",
-      "start": 8189,
-      "end": 8232,
+      "type": {
+        "label": "name",
+        "beforeExpr": false,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "value": "components",
+      "start": 496,
+      "end": 506,
       "loc": {
         "start": {
-          "line": 290,
-          "column": 2
+          "line": 30,
+          "column": 7
         },
         "end": {
-          "line": 290,
-          "column": 45
+          "line": 30,
+          "column": 17
         }
       }
     },
     {
-      "type": "CommentLine",
-      "value": " Data must be an object at this point",
-      "start": 8301,
-      "end": 8340,
+      "type": {
+        "label": "=",
+        "beforeExpr": true,
+        "startsExpr": false,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": true,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "value": "=",
+      "start": 507,
+      "end": 508,
       "loc": {
         "start": {
-          "line": 295,
-          "column": 2
+          "line": 30,
+          "column": 18
         },
         "end": {
-          "line": 295,
-          "column": 41
+          "line": 30,
+          "column": 19
         }
       }
     },
     {
-      "type": "CommentLine",
-      "value": " Iterate through prototype names",
-      "start": 8378,
-      "end": 8412,
+      "type": {
+        "label": "{",
+        "beforeExpr": true,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "start": 509,
+      "end": 510,
       "loc": {
         "start": {
-          "line": 297,
-          "column": 3
+          "line": 30,
+          "column": 20
         },
         "end": {
-          "line": 297,
-          "column": 37
+          "line": 30,
+          "column": 21
         }
       }
     },
     {
-      "type": "CommentLine",
-      "value": " Iterate through component names",
-      "start": 8513,
-      "end": 8547,
+      "type": {
+        "label": "}",
+        "beforeExpr": false,
+        "startsExpr": false,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "start": 510,
+      "end": 511,
       "loc": {
         "start": {
-          "line": 301,
-          "column": 4
+          "line": 30,
+          "column": 21
         },
         "end": {
-          "line": 301,
-          "column": 38
+          "line": 30,
+          "column": 22
         }
       }
     },
-    {
-      "type": "CommentLine",
-      "value": " Store strings of each component",
-      "start": 8593,
-      "end": 8627,
-      "loc": {
-        "start": {
-          "line": 303,
-          "column": 5
-        },
-        "end": {
-          "line": 303,
-          "column": 39
-        }
-      }
-    }
-  ],
-  "tokens": [
     {
       "type": "CommentBlock",
       "value": "* @ignore ",
-      "start": 0,
-      "end": 14,
+      "start": 515,
+      "end": 529,
       "loc": {
         "start": {
-          "line": 1,
-          "column": 0
+          "line": 32,
+          "column": 2
         },
         "end": {
-          "line": 1,
-          "column": 14
+          "line": 32,
+          "column": 16
         }
       }
     },
     {
       "type": {
-        "label": "const",
-        "keyword": "const",
+        "label": "this",
+        "keyword": "this",
         "beforeExpr": false,
-        "startsExpr": false,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -10284,41 +12788,42 @@
         "binop": null,
         "updateContext": null
       },
-      "value": "const",
-      "start": 15,
-      "end": 20,
+      "value": "this",
+      "start": 532,
+      "end": 536,
       "loc": {
         "start": {
-          "line": 2,
-          "column": 0
+          "line": 33,
+          "column": 2
         },
         "end": {
-          "line": 2,
-          "column": 5
+          "line": 33,
+          "column": 6
         }
       }
     },
     {
       "type": {
-        "label": "{",
-        "beforeExpr": true,
-        "startsExpr": true,
+        "label": ".",
+        "beforeExpr": false,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "start": 21,
-      "end": 22,
+      "start": 536,
+      "end": 537,
       "loc": {
         "start": {
-          "line": 2,
+          "line": 33,
           "column": 6
         },
         "end": {
-          "line": 2,
+          "line": 33,
           "column": 7
         }
       }
@@ -10335,50 +12840,51 @@
         "postfix": false,
         "binop": null
       },
-      "value": "invoke",
-      "start": 23,
-      "end": 29,
+      "value": "entityTemplates",
+      "start": 537,
+      "end": 552,
       "loc": {
         "start": {
-          "line": 2,
-          "column": 8
+          "line": 33,
+          "column": 7
         },
         "end": {
-          "line": 2,
-          "column": 14
+          "line": 33,
+          "column": 22
         }
       }
     },
     {
       "type": {
-        "label": ",",
+        "label": "=",
         "beforeExpr": true,
         "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
-        "isAssign": false,
+        "isAssign": true,
         "prefix": false,
         "postfix": false,
         "binop": null,
         "updateContext": null
       },
-      "start": 29,
-      "end": 30,
+      "value": "=",
+      "start": 553,
+      "end": 554,
       "loc": {
         "start": {
-          "line": 2,
-          "column": 14
+          "line": 33,
+          "column": 23
         },
         "end": {
-          "line": 2,
-          "column": 15
+          "line": 33,
+          "column": 24
         }
       }
     },
     {
       "type": {
-        "label": "name",
-        "beforeExpr": false,
+        "label": "{",
+        "beforeExpr": true,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
@@ -10387,16 +12893,15 @@
         "postfix": false,
         "binop": null
       },
-      "value": "isFunction",
-      "start": 31,
-      "end": 41,
+      "start": 555,
+      "end": 556,
       "loc": {
         "start": {
-          "line": 2,
-          "column": 16
+          "line": 33,
+          "column": 25
         },
         "end": {
-          "line": 2,
+          "line": 33,
           "column": 26
         }
       }
@@ -10413,76 +12918,93 @@
         "postfix": false,
         "binop": null
       },
-      "start": 42,
-      "end": 43,
+      "start": 556,
+      "end": 557,
       "loc": {
         "start": {
-          "line": 2,
+          "line": 33,
+          "column": 26
+        },
+        "end": {
+          "line": 33,
           "column": 27
+        }
+      }
+    },
+    {
+      "type": "CommentBlock",
+      "value": "* @ignore ",
+      "start": 561,
+      "end": 575,
+      "loc": {
+        "start": {
+          "line": 35,
+          "column": 2
         },
         "end": {
-          "line": 2,
-          "column": 28
+          "line": 35,
+          "column": 16
         }
       }
     },
     {
       "type": {
-        "label": "=",
-        "beforeExpr": true,
-        "startsExpr": false,
+        "label": "this",
+        "keyword": "this",
+        "beforeExpr": false,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
-        "isAssign": true,
+        "isAssign": false,
         "prefix": false,
         "postfix": false,
         "binop": null,
         "updateContext": null
       },
-      "value": "=",
-      "start": 44,
-      "end": 45,
+      "value": "this",
+      "start": 578,
+      "end": 582,
       "loc": {
         "start": {
-          "line": 2,
-          "column": 29
+          "line": 36,
+          "column": 2
         },
         "end": {
-          "line": 2,
-          "column": 30
+          "line": 36,
+          "column": 6
         }
       }
     },
     {
       "type": {
-        "label": "name",
+        "label": ".",
         "beforeExpr": false,
-        "startsExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "value": "require",
-      "start": 46,
-      "end": 53,
+      "start": 582,
+      "end": 583,
       "loc": {
         "start": {
-          "line": 2,
-          "column": 31
+          "line": 36,
+          "column": 6
         },
         "end": {
-          "line": 2,
-          "column": 38
+          "line": 36,
+          "column": 7
         }
       }
     },
     {
       "type": {
-        "label": "(",
-        "beforeExpr": true,
+        "label": "name",
+        "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
@@ -10491,93 +13013,96 @@
         "postfix": false,
         "binop": null
       },
-      "start": 53,
-      "end": 54,
+      "value": "idCounter",
+      "start": 583,
+      "end": 592,
       "loc": {
         "start": {
-          "line": 2,
-          "column": 38
+          "line": 36,
+          "column": 7
         },
         "end": {
-          "line": 2,
-          "column": 39
+          "line": 36,
+          "column": 16
         }
       }
     },
     {
       "type": {
-        "label": "string",
-        "beforeExpr": false,
-        "startsExpr": true,
+        "label": "=",
+        "beforeExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
-        "isAssign": false,
+        "isAssign": true,
         "prefix": false,
         "postfix": false,
         "binop": null,
         "updateContext": null
       },
-      "value": "./utilities.js",
-      "start": 54,
-      "end": 70,
+      "value": "=",
+      "start": 593,
+      "end": 594,
       "loc": {
         "start": {
-          "line": 2,
-          "column": 39
+          "line": 36,
+          "column": 17
         },
         "end": {
-          "line": 2,
-          "column": 55
+          "line": 36,
+          "column": 18
         }
       }
     },
     {
       "type": {
-        "label": ")",
+        "label": "num",
         "beforeExpr": false,
-        "startsExpr": false,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "start": 70,
-      "end": 71,
+      "value": 1,
+      "start": 595,
+      "end": 596,
       "loc": {
         "start": {
-          "line": 2,
-          "column": 55
+          "line": 36,
+          "column": 19
         },
         "end": {
-          "line": 2,
-          "column": 56
+          "line": 36,
+          "column": 20
         }
       }
     },
     {
       "type": "CommentBlock",
-      "value": "* @ignore ",
-      "start": 73,
-      "end": 87,
+      "value": "*\n\t\t * Maps entire queries to arrays of entities\n\t\t * @ignore\n\t\t ",
+      "start": 600,
+      "end": 669,
       "loc": {
         "start": {
-          "line": 4,
-          "column": 0
+          "line": 38,
+          "column": 2
         },
         "end": {
-          "line": 4,
-          "column": 14
+          "line": 41,
+          "column": 5
         }
       }
     },
     {
       "type": {
-        "label": "const",
-        "keyword": "const",
+        "label": "this",
+        "keyword": "this",
         "beforeExpr": false,
-        "startsExpr": false,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -10586,41 +13111,42 @@
         "binop": null,
         "updateContext": null
       },
-      "value": "const",
-      "start": 88,
-      "end": 93,
+      "value": "this",
+      "start": 672,
+      "end": 676,
       "loc": {
         "start": {
-          "line": 5,
-          "column": 0
+          "line": 42,
+          "column": 2
         },
         "end": {
-          "line": 5,
-          "column": 5
+          "line": 42,
+          "column": 6
         }
       }
     },
     {
       "type": {
-        "label": "{",
-        "beforeExpr": true,
-        "startsExpr": true,
+        "label": ".",
+        "beforeExpr": false,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "start": 94,
-      "end": 95,
+      "start": 676,
+      "end": 677,
       "loc": {
         "start": {
-          "line": 5,
+          "line": 42,
           "column": 6
         },
         "end": {
-          "line": 5,
+          "line": 42,
           "column": 7
         }
       }
@@ -10637,68 +13163,71 @@
         "postfix": false,
         "binop": null
       },
-      "value": "Entity",
-      "start": 96,
-      "end": 102,
+      "value": "index",
+      "start": 677,
+      "end": 682,
       "loc": {
         "start": {
-          "line": 5,
-          "column": 8
+          "line": 42,
+          "column": 7
         },
         "end": {
-          "line": 5,
-          "column": 14
+          "line": 42,
+          "column": 12
         }
       }
     },
     {
       "type": {
-        "label": "}",
-        "beforeExpr": false,
+        "label": "=",
+        "beforeExpr": true,
         "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
-        "isAssign": false,
+        "isAssign": true,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "start": 103,
-      "end": 104,
+      "value": "=",
+      "start": 683,
+      "end": 684,
       "loc": {
         "start": {
-          "line": 5,
-          "column": 15
+          "line": 42,
+          "column": 13
         },
         "end": {
-          "line": 5,
-          "column": 16
+          "line": 42,
+          "column": 14
         }
       }
     },
     {
       "type": {
-        "label": "=",
+        "label": "new",
+        "keyword": "new",
         "beforeExpr": true,
-        "startsExpr": false,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
-        "isAssign": true,
+        "isAssign": false,
         "prefix": false,
         "postfix": false,
         "binop": null,
         "updateContext": null
       },
-      "value": "=",
-      "start": 105,
-      "end": 106,
+      "value": "new",
+      "start": 685,
+      "end": 688,
       "loc": {
         "start": {
-          "line": 5,
-          "column": 17
+          "line": 42,
+          "column": 15
         },
         "end": {
-          "line": 5,
+          "line": 42,
           "column": 18
         }
       }
@@ -10715,17 +13244,17 @@
         "postfix": false,
         "binop": null
       },
-      "value": "require",
-      "start": 107,
-      "end": 114,
+      "value": "ComponentIndex",
+      "start": 689,
+      "end": 703,
       "loc": {
         "start": {
-          "line": 5,
+          "line": 42,
           "column": 19
         },
         "end": {
-          "line": 5,
-          "column": 26
+          "line": 42,
+          "column": 33
         }
       }
     },
@@ -10741,91 +13270,50 @@
         "postfix": false,
         "binop": null
       },
-      "start": 114,
-      "end": 115,
-      "loc": {
-        "start": {
-          "line": 5,
-          "column": 26
-        },
-        "end": {
-          "line": 5,
-          "column": 27
-        }
-      }
-    },
-    {
-      "type": {
-        "label": "string",
-        "beforeExpr": false,
-        "startsExpr": true,
-        "rightAssociative": false,
-        "isLoop": false,
-        "isAssign": false,
-        "prefix": false,
-        "postfix": false,
-        "binop": null,
-        "updateContext": null
-      },
-      "value": "./entity.js",
-      "start": 115,
-      "end": 128,
-      "loc": {
-        "start": {
-          "line": 5,
-          "column": 27
-        },
-        "end": {
-          "line": 5,
-          "column": 40
-        }
-      }
-    },
-    {
-      "type": {
-        "label": ")",
-        "beforeExpr": false,
-        "startsExpr": false,
-        "rightAssociative": false,
-        "isLoop": false,
-        "isAssign": false,
-        "prefix": false,
-        "postfix": false,
-        "binop": null
-      },
-      "start": 128,
-      "end": 129,
+      "start": 703,
+      "end": 704,
       "loc": {
         "start": {
-          "line": 5,
-          "column": 40
+          "line": 42,
+          "column": 33
         },
         "end": {
-          "line": 5,
-          "column": 41
+          "line": 42,
+          "column": 34
         }
       }
     },
     {
-      "type": "CommentBlock",
-      "value": "* @ignore ",
-      "start": 131,
-      "end": 145,
+      "type": {
+        "label": "this",
+        "keyword": "this",
+        "beforeExpr": false,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "value": "this",
+      "start": 704,
+      "end": 708,
       "loc": {
         "start": {
-          "line": 7,
-          "column": 0
+          "line": 42,
+          "column": 34
         },
         "end": {
-          "line": 7,
-          "column": 14
+          "line": 42,
+          "column": 38
         }
       }
     },
     {
       "type": {
-        "label": "const",
-        "keyword": "const",
+        "label": ".",
         "beforeExpr": false,
         "startsExpr": false,
         "rightAssociative": false,
@@ -10836,24 +13324,23 @@
         "binop": null,
         "updateContext": null
       },
-      "value": "const",
-      "start": 146,
-      "end": 151,
+      "start": 708,
+      "end": 709,
       "loc": {
         "start": {
-          "line": 8,
-          "column": 0
+          "line": 42,
+          "column": 38
         },
         "end": {
-          "line": 8,
-          "column": 5
+          "line": 42,
+          "column": 39
         }
       }
     },
     {
       "type": {
-        "label": "{",
-        "beforeExpr": true,
+        "label": "name",
+        "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
@@ -10862,24 +13349,25 @@
         "postfix": false,
         "binop": null
       },
-      "start": 152,
-      "end": 153,
+      "value": "entities",
+      "start": 709,
+      "end": 717,
       "loc": {
         "start": {
-          "line": 8,
-          "column": 6
+          "line": 42,
+          "column": 39
         },
         "end": {
-          "line": 8,
-          "column": 7
+          "line": 42,
+          "column": 47
         }
       }
     },
     {
       "type": {
-        "label": "name",
+        "label": ")",
         "beforeExpr": false,
-        "startsExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -10887,17 +13375,16 @@
         "postfix": false,
         "binop": null
       },
-      "value": "ComponentIndex",
-      "start": 154,
-      "end": 168,
+      "start": 717,
+      "end": 718,
       "loc": {
         "start": {
-          "line": 8,
-          "column": 8
+          "line": 42,
+          "column": 47
         },
         "end": {
-          "line": 8,
-          "column": 22
+          "line": 42,
+          "column": 48
         }
       }
     },
@@ -10913,43 +13400,32 @@
         "postfix": false,
         "binop": null
       },
-      "start": 169,
-      "end": 170,
+      "start": 720,
+      "end": 721,
       "loc": {
         "start": {
-          "line": 8,
-          "column": 23
+          "line": 43,
+          "column": 1
         },
         "end": {
-          "line": 8,
-          "column": 24
+          "line": 43,
+          "column": 2
         }
       }
     },
     {
-      "type": {
-        "label": "=",
-        "beforeExpr": true,
-        "startsExpr": false,
-        "rightAssociative": false,
-        "isLoop": false,
-        "isAssign": true,
-        "prefix": false,
-        "postfix": false,
-        "binop": null,
-        "updateContext": null
-      },
-      "value": "=",
-      "start": 171,
-      "end": 172,
+      "type": "CommentBlock",
+      "value": "*\n\t * Removes all entities from the world.\n\t * Does not affect registered systems, components, or prototypes.\n\t *\n\t * @example\n\t * world.clear()\n\t ",
+      "start": 724,
+      "end": 875,
       "loc": {
         "start": {
-          "line": 8,
-          "column": 25
+          "line": 45,
+          "column": 1
         },
         "end": {
-          "line": 8,
-          "column": 26
+          "line": 51,
+          "column": 4
         }
       }
     },
@@ -10965,17 +13441,17 @@
         "postfix": false,
         "binop": null
       },
-      "value": "require",
-      "start": 173,
-      "end": 180,
+      "value": "clear",
+      "start": 877,
+      "end": 882,
       "loc": {
         "start": {
-          "line": 8,
-          "column": 27
+          "line": 52,
+          "column": 1
         },
         "end": {
-          "line": 8,
-          "column": 34
+          "line": 52,
+          "column": 6
         }
       }
     },
@@ -10991,51 +13467,49 @@
         "postfix": false,
         "binop": null
       },
-      "start": 180,
-      "end": 181,
+      "start": 882,
+      "end": 883,
       "loc": {
         "start": {
-          "line": 8,
-          "column": 34
+          "line": 52,
+          "column": 6
         },
         "end": {
-          "line": 8,
-          "column": 35
+          "line": 52,
+          "column": 7
         }
       }
     },
     {
       "type": {
-        "label": "string",
+        "label": ")",
         "beforeExpr": false,
-        "startsExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "value": "./component_index.js",
-      "start": 181,
-      "end": 203,
+      "start": 883,
+      "end": 884,
       "loc": {
         "start": {
-          "line": 8,
-          "column": 35
+          "line": 52,
+          "column": 7
         },
         "end": {
-          "line": 8,
-          "column": 57
+          "line": 52,
+          "column": 8
         }
       }
     },
     {
       "type": {
-        "label": ")",
-        "beforeExpr": false,
-        "startsExpr": false,
+        "label": "{",
+        "beforeExpr": true,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -11043,67 +13517,67 @@
         "postfix": false,
         "binop": null
       },
-      "start": 203,
-      "end": 204,
+      "start": 885,
+      "end": 886,
       "loc": {
         "start": {
-          "line": 8,
-          "column": 57
+          "line": 52,
+          "column": 9
         },
         "end": {
-          "line": 8,
-          "column": 58
+          "line": 52,
+          "column": 10
         }
       }
     },
     {
-      "type": "CommentBlock",
-      "value": "*\n * Class for world.\n *\n * @class      World (name)\n ",
-      "start": 206,
-      "end": 264,
+      "type": "CommentLine",
+      "value": " Call onRemove on all components of all entities",
+      "start": 889,
+      "end": 939,
       "loc": {
         "start": {
-          "line": 10,
-          "column": 0
+          "line": 53,
+          "column": 2
         },
         "end": {
-          "line": 14,
-          "column": 3
+          "line": 53,
+          "column": 52
         }
       }
     },
     {
       "type": {
-        "label": "class",
-        "keyword": "class",
+        "label": "for",
+        "keyword": "for",
         "beforeExpr": false,
         "startsExpr": false,
         "rightAssociative": false,
-        "isLoop": false,
+        "isLoop": true,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
         "binop": null,
         "updateContext": null
       },
-      "value": "class",
-      "start": 265,
-      "end": 270,
+      "value": "for",
+      "start": 942,
+      "end": 945,
       "loc": {
         "start": {
-          "line": 15,
-          "column": 0
+          "line": 54,
+          "column": 2
         },
         "end": {
-          "line": 15,
+          "line": 54,
           "column": 5
         }
       }
     },
     {
       "type": {
-        "label": "name",
-        "beforeExpr": false,
+        "label": "(",
+        "beforeExpr": true,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
@@ -11112,58 +13586,70 @@
         "postfix": false,
         "binop": null
       },
-      "value": "World",
-      "start": 271,
-      "end": 276,
+      "start": 946,
+      "end": 947,
       "loc": {
         "start": {
-          "line": 15,
+          "line": 54,
           "column": 6
         },
         "end": {
-          "line": 15,
-          "column": 11
+          "line": 54,
+          "column": 7
         }
       }
     },
     {
       "type": {
-        "label": "{",
-        "beforeExpr": true,
-        "startsExpr": true,
+        "label": "const",
+        "keyword": "const",
+        "beforeExpr": false,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "start": 277,
-      "end": 278,
+      "value": "const",
+      "start": 947,
+      "end": 952,
       "loc": {
         "start": {
-          "line": 15,
-          "column": 12
+          "line": 54,
+          "column": 7
         },
         "end": {
-          "line": 15,
-          "column": 13
+          "line": 54,
+          "column": 12
         }
       }
     },
     {
-      "type": "CommentBlock",
-      "value": "*\n\t * Constructs an instance of the world.\n\t ",
-      "start": 280,
-      "end": 329,
+      "type": {
+        "label": "[",
+        "beforeExpr": true,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "start": 953,
+      "end": 954,
       "loc": {
         "start": {
-          "line": 16,
-          "column": 1
+          "line": 54,
+          "column": 13
         },
         "end": {
-          "line": 18,
-          "column": 4
+          "line": 54,
+          "column": 14
         }
       }
     },
@@ -11179,50 +13665,51 @@
         "postfix": false,
         "binop": null
       },
-      "value": "constructor",
-      "start": 331,
-      "end": 342,
+      "value": "entityId",
+      "start": 954,
+      "end": 962,
       "loc": {
         "start": {
-          "line": 19,
-          "column": 1
+          "line": 54,
+          "column": 14
         },
         "end": {
-          "line": 19,
-          "column": 12
+          "line": 54,
+          "column": 22
         }
       }
     },
     {
       "type": {
-        "label": "(",
+        "label": ",",
         "beforeExpr": true,
-        "startsExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "start": 342,
-      "end": 343,
+      "start": 962,
+      "end": 963,
       "loc": {
         "start": {
-          "line": 19,
-          "column": 12
+          "line": 54,
+          "column": 22
         },
         "end": {
-          "line": 19,
-          "column": 13
+          "line": 54,
+          "column": 23
         }
       }
     },
     {
       "type": {
-        "label": ")",
+        "label": "name",
         "beforeExpr": false,
-        "startsExpr": false,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -11230,57 +13717,69 @@
         "postfix": false,
         "binop": null
       },
-      "start": 343,
-      "end": 344,
+      "value": "entity",
+      "start": 964,
+      "end": 970,
       "loc": {
         "start": {
-          "line": 19,
-          "column": 13
+          "line": 54,
+          "column": 24
         },
         "end": {
-          "line": 19,
-          "column": 14
+          "line": 54,
+          "column": 30
         }
       }
     },
     {
       "type": {
-        "label": "{",
-        "beforeExpr": true,
-        "startsExpr": true,
+        "label": "]",
+        "beforeExpr": false,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "start": 345,
-      "end": 346,
+      "start": 970,
+      "end": 971,
       "loc": {
         "start": {
-          "line": 19,
-          "column": 15
+          "line": 54,
+          "column": 30
         },
         "end": {
-          "line": 19,
-          "column": 16
+          "line": 54,
+          "column": 31
         }
       }
     },
     {
-      "type": "CommentBlock",
-      "value": "* @ignore ",
-      "start": 349,
-      "end": 363,
+      "type": {
+        "label": "name",
+        "beforeExpr": false,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "value": "of",
+      "start": 972,
+      "end": 974,
       "loc": {
         "start": {
-          "line": 20,
-          "column": 2
+          "line": 54,
+          "column": 32
         },
         "end": {
-          "line": 20,
-          "column": 16
+          "line": 54,
+          "column": 34
         }
       }
     },
@@ -11299,16 +13798,16 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 366,
-      "end": 370,
+      "start": 975,
+      "end": 979,
       "loc": {
         "start": {
-          "line": 21,
-          "column": 2
+          "line": 54,
+          "column": 35
         },
         "end": {
-          "line": 21,
-          "column": 6
+          "line": 54,
+          "column": 39
         }
       }
     },
@@ -11325,16 +13824,16 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 370,
-      "end": 371,
+      "start": 979,
+      "end": 980,
       "loc": {
         "start": {
-          "line": 21,
-          "column": 6
+          "line": 54,
+          "column": 39
         },
         "end": {
-          "line": 21,
-          "column": 7
+          "line": 54,
+          "column": 40
         }
       }
     },
@@ -11350,50 +13849,48 @@
         "postfix": false,
         "binop": null
       },
-      "value": "systems",
-      "start": 371,
-      "end": 378,
+      "value": "entities",
+      "start": 980,
+      "end": 988,
       "loc": {
         "start": {
-          "line": 21,
-          "column": 7
+          "line": 54,
+          "column": 40
         },
         "end": {
-          "line": 21,
-          "column": 14
+          "line": 54,
+          "column": 48
         }
       }
     },
     {
       "type": {
-        "label": "=",
-        "beforeExpr": true,
+        "label": ")",
+        "beforeExpr": false,
         "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
-        "isAssign": true,
+        "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "value": "=",
-      "start": 379,
-      "end": 380,
+      "start": 988,
+      "end": 989,
       "loc": {
         "start": {
-          "line": 21,
-          "column": 15
+          "line": 54,
+          "column": 48
         },
         "end": {
-          "line": 21,
-          "column": 16
+          "line": 54,
+          "column": 49
         }
       }
     },
     {
       "type": {
-        "label": "[",
+        "label": "{",
         "beforeExpr": true,
         "startsExpr": true,
         "rightAssociative": false,
@@ -11401,95 +13898,78 @@
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "start": 381,
-      "end": 382,
+      "start": 990,
+      "end": 991,
       "loc": {
         "start": {
-          "line": 21,
-          "column": 17
+          "line": 54,
+          "column": 50
         },
         "end": {
-          "line": 21,
-          "column": 18
+          "line": 54,
+          "column": 51
         }
       }
     },
     {
       "type": {
-        "label": "]",
+        "label": "for",
+        "keyword": "for",
         "beforeExpr": false,
         "startsExpr": false,
         "rightAssociative": false,
-        "isLoop": false,
+        "isLoop": true,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
         "binop": null,
         "updateContext": null
       },
-      "start": 382,
-      "end": 383,
-      "loc": {
-        "start": {
-          "line": 21,
-          "column": 18
-        },
-        "end": {
-          "line": 21,
-          "column": 19
-        }
-      }
-    },
-    {
-      "type": "CommentBlock",
-      "value": "*\n\t\t * Maps entity IDs to entities\n\t\t * @ignore\n\t\t ",
-      "start": 387,
-      "end": 442,
+      "value": "for",
+      "start": 995,
+      "end": 998,
       "loc": {
         "start": {
-          "line": 23,
-          "column": 2
+          "line": 55,
+          "column": 3
         },
         "end": {
-          "line": 26,
-          "column": 5
+          "line": 55,
+          "column": 6
         }
       }
     },
     {
       "type": {
-        "label": "this",
-        "keyword": "this",
-        "beforeExpr": false,
+        "label": "(",
+        "beforeExpr": true,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "value": "this",
-      "start": 445,
-      "end": 449,
+      "start": 999,
+      "end": 1000,
       "loc": {
         "start": {
-          "line": 27,
-          "column": 2
+          "line": 55,
+          "column": 7
         },
-        "end": {
-          "line": 27,
-          "column": 6
+        "end": {
+          "line": 55,
+          "column": 8
         }
       }
     },
     {
       "type": {
-        "label": ".",
+        "label": "let",
+        "keyword": "let",
         "beforeExpr": false,
         "startsExpr": false,
         "rightAssociative": false,
@@ -11500,16 +13980,17 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 449,
-      "end": 450,
+      "value": "let",
+      "start": 1000,
+      "end": 1003,
       "loc": {
         "start": {
-          "line": 27,
-          "column": 6
+          "line": 55,
+          "column": 8
         },
         "end": {
-          "line": 27,
-          "column": 7
+          "line": 55,
+          "column": 11
         }
       }
     },
@@ -11525,105 +14006,104 @@
         "postfix": false,
         "binop": null
       },
-      "value": "entities",
-      "start": 450,
-      "end": 458,
+      "value": "componentName",
+      "start": 1004,
+      "end": 1017,
       "loc": {
         "start": {
-          "line": 27,
-          "column": 7
+          "line": 55,
+          "column": 12
         },
         "end": {
-          "line": 27,
-          "column": 15
+          "line": 55,
+          "column": 25
         }
       }
     },
     {
       "type": {
-        "label": "=",
+        "label": "in",
+        "keyword": "in",
         "beforeExpr": true,
         "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
-        "isAssign": true,
+        "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
+        "binop": 7,
         "updateContext": null
       },
-      "value": "=",
-      "start": 459,
-      "end": 460,
+      "value": "in",
+      "start": 1018,
+      "end": 1020,
       "loc": {
         "start": {
-          "line": 27,
-          "column": 16
+          "line": 55,
+          "column": 26
         },
         "end": {
-          "line": 27,
-          "column": 17
+          "line": 55,
+          "column": 28
         }
       }
     },
     {
       "type": {
-        "label": "new",
-        "keyword": "new",
-        "beforeExpr": true,
+        "label": "name",
+        "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "value": "new",
-      "start": 461,
-      "end": 464,
+      "value": "entity",
+      "start": 1021,
+      "end": 1027,
       "loc": {
         "start": {
-          "line": 27,
-          "column": 18
+          "line": 55,
+          "column": 29
         },
         "end": {
-          "line": 27,
-          "column": 21
+          "line": 55,
+          "column": 35
         }
       }
     },
     {
       "type": {
-        "label": "name",
+        "label": ".",
         "beforeExpr": false,
-        "startsExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "value": "Map",
-      "start": 465,
-      "end": 468,
+      "start": 1027,
+      "end": 1028,
       "loc": {
         "start": {
-          "line": 27,
-          "column": 22
+          "line": 55,
+          "column": 35
         },
         "end": {
-          "line": 27,
-          "column": 25
+          "line": 55,
+          "column": 36
         }
       }
     },
     {
       "type": {
-        "label": "(",
-        "beforeExpr": true,
+        "label": "name",
+        "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
@@ -11632,16 +14112,17 @@
         "postfix": false,
         "binop": null
       },
-      "start": 468,
-      "end": 469,
+      "value": "data",
+      "start": 1028,
+      "end": 1032,
       "loc": {
         "start": {
-          "line": 27,
-          "column": 25
+          "line": 55,
+          "column": 36
         },
         "end": {
-          "line": 27,
-          "column": 26
+          "line": 55,
+          "column": 40
         }
       }
     },
@@ -11657,66 +14138,64 @@
         "postfix": false,
         "binop": null
       },
-      "start": 469,
-      "end": 470,
-      "loc": {
-        "start": {
-          "line": 27,
-          "column": 26
-        },
-        "end": {
-          "line": 27,
-          "column": 27
-        }
-      }
-    },
-    {
-      "type": "CommentBlock",
-      "value": "* @ignore ",
-      "start": 474,
-      "end": 488,
+      "start": 1032,
+      "end": 1033,
       "loc": {
         "start": {
-          "line": 29,
-          "column": 2
+          "line": 55,
+          "column": 40
         },
         "end": {
-          "line": 29,
-          "column": 16
+          "line": 55,
+          "column": 41
         }
       }
     },
     {
       "type": {
-        "label": "this",
-        "keyword": "this",
-        "beforeExpr": false,
+        "label": "{",
+        "beforeExpr": true,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "value": "this",
-      "start": 491,
-      "end": 495,
+      "start": 1034,
+      "end": 1035,
       "loc": {
         "start": {
-          "line": 30,
-          "column": 2
+          "line": 55,
+          "column": 42
         },
         "end": {
-          "line": 30,
-          "column": 6
+          "line": 55,
+          "column": 43
+        }
+      }
+    },
+    {
+      "type": "CommentLine",
+      "value": " Get component, and call onRemove if it exists as a function",
+      "start": 1040,
+      "end": 1102,
+      "loc": {
+        "start": {
+          "line": 56,
+          "column": 4
+        },
+        "end": {
+          "line": 56,
+          "column": 66
         }
       }
     },
     {
       "type": {
-        "label": ".",
+        "label": "let",
+        "keyword": "let",
         "beforeExpr": false,
         "startsExpr": false,
         "rightAssociative": false,
@@ -11727,15 +14206,16 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 495,
-      "end": 496,
+      "value": "let",
+      "start": 1107,
+      "end": 1110,
       "loc": {
         "start": {
-          "line": 30,
-          "column": 6
+          "line": 57,
+          "column": 4
         },
         "end": {
-          "line": 30,
+          "line": 57,
           "column": 7
         }
       }
@@ -11752,16 +14232,16 @@
         "postfix": false,
         "binop": null
       },
-      "value": "components",
-      "start": 496,
-      "end": 506,
+      "value": "component",
+      "start": 1111,
+      "end": 1120,
       "loc": {
         "start": {
-          "line": 30,
-          "column": 7
+          "line": 57,
+          "column": 8
         },
         "end": {
-          "line": 30,
+          "line": 57,
           "column": 17
         }
       }
@@ -11780,23 +14260,23 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 507,
-      "end": 508,
+      "start": 1121,
+      "end": 1122,
       "loc": {
         "start": {
-          "line": 30,
+          "line": 57,
           "column": 18
         },
         "end": {
-          "line": 30,
+          "line": 57,
           "column": 19
         }
       }
     },
     {
       "type": {
-        "label": "{",
-        "beforeExpr": true,
+        "label": "name",
+        "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
@@ -11805,64 +14285,49 @@
         "postfix": false,
         "binop": null
       },
-      "start": 509,
-      "end": 510,
+      "value": "entity",
+      "start": 1123,
+      "end": 1129,
       "loc": {
         "start": {
-          "line": 30,
+          "line": 57,
           "column": 20
         },
         "end": {
-          "line": 30,
-          "column": 21
-        }
-      }
-    },
-    {
-      "type": {
-        "label": "}",
-        "beforeExpr": false,
-        "startsExpr": false,
-        "rightAssociative": false,
-        "isLoop": false,
-        "isAssign": false,
-        "prefix": false,
-        "postfix": false,
-        "binop": null
-      },
-      "start": 510,
-      "end": 511,
-      "loc": {
-        "start": {
-          "line": 30,
-          "column": 21
-        },
-        "end": {
-          "line": 30,
-          "column": 22
+          "line": 57,
+          "column": 26
         }
       }
     },
     {
-      "type": "CommentBlock",
-      "value": "* @ignore ",
-      "start": 515,
-      "end": 529,
+      "type": {
+        "label": ".",
+        "beforeExpr": false,
+        "startsExpr": false,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "start": 1129,
+      "end": 1130,
       "loc": {
         "start": {
-          "line": 32,
-          "column": 2
+          "line": 57,
+          "column": 26
         },
         "end": {
-          "line": 32,
-          "column": 16
+          "line": 57,
+          "column": 27
         }
       }
     },
     {
       "type": {
-        "label": "this",
-        "keyword": "this",
+        "label": "name",
         "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
@@ -11870,28 +14335,27 @@
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "value": "this",
-      "start": 532,
-      "end": 536,
+      "value": "data",
+      "start": 1130,
+      "end": 1134,
       "loc": {
         "start": {
-          "line": 33,
-          "column": 2
+          "line": 57,
+          "column": 27
         },
         "end": {
-          "line": 33,
-          "column": 6
+          "line": 57,
+          "column": 31
         }
       }
     },
     {
       "type": {
-        "label": ".",
-        "beforeExpr": false,
-        "startsExpr": false,
+        "label": "[",
+        "beforeExpr": true,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -11900,16 +14364,16 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 536,
-      "end": 537,
+      "start": 1134,
+      "end": 1135,
       "loc": {
         "start": {
-          "line": 33,
-          "column": 6
+          "line": 57,
+          "column": 31
         },
         "end": {
-          "line": 33,
-          "column": 7
+          "line": 57,
+          "column": 32
         }
       }
     },
@@ -11925,51 +14389,50 @@
         "postfix": false,
         "binop": null
       },
-      "value": "entityTemplates",
-      "start": 537,
-      "end": 552,
+      "value": "componentName",
+      "start": 1135,
+      "end": 1148,
       "loc": {
         "start": {
-          "line": 33,
-          "column": 7
+          "line": 57,
+          "column": 32
         },
         "end": {
-          "line": 33,
-          "column": 22
+          "line": 57,
+          "column": 45
         }
       }
     },
     {
       "type": {
-        "label": "=",
-        "beforeExpr": true,
+        "label": "]",
+        "beforeExpr": false,
         "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
-        "isAssign": true,
+        "isAssign": false,
         "prefix": false,
         "postfix": false,
         "binop": null,
         "updateContext": null
       },
-      "value": "=",
-      "start": 553,
-      "end": 554,
+      "start": 1148,
+      "end": 1149,
       "loc": {
         "start": {
-          "line": 33,
-          "column": 23
+          "line": 57,
+          "column": 45
         },
         "end": {
-          "line": 33,
-          "column": 24
+          "line": 57,
+          "column": 46
         }
       }
     },
     {
       "type": {
-        "label": "{",
-        "beforeExpr": true,
+        "label": "name",
+        "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
@@ -11978,24 +14441,25 @@
         "postfix": false,
         "binop": null
       },
-      "start": 555,
-      "end": 556,
+      "value": "invoke",
+      "start": 1154,
+      "end": 1160,
       "loc": {
         "start": {
-          "line": 33,
-          "column": 25
+          "line": 58,
+          "column": 4
         },
         "end": {
-          "line": 33,
-          "column": 26
+          "line": 58,
+          "column": 10
         }
       }
     },
     {
       "type": {
-        "label": "}",
-        "beforeExpr": false,
-        "startsExpr": false,
+        "label": "(",
+        "beforeExpr": true,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -12003,41 +14467,50 @@
         "postfix": false,
         "binop": null
       },
-      "start": 556,
-      "end": 557,
+      "start": 1160,
+      "end": 1161,
       "loc": {
         "start": {
-          "line": 33,
-          "column": 26
+          "line": 58,
+          "column": 10
         },
         "end": {
-          "line": 33,
-          "column": 27
+          "line": 58,
+          "column": 11
         }
       }
     },
     {
-      "type": "CommentBlock",
-      "value": "* @ignore ",
-      "start": 561,
-      "end": 575,
+      "type": {
+        "label": "name",
+        "beforeExpr": false,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "value": "component",
+      "start": 1161,
+      "end": 1170,
       "loc": {
         "start": {
-          "line": 35,
-          "column": 2
+          "line": 58,
+          "column": 11
         },
         "end": {
-          "line": 35,
-          "column": 16
+          "line": 58,
+          "column": 20
         }
       }
     },
     {
       "type": {
-        "label": "this",
-        "keyword": "this",
-        "beforeExpr": false,
-        "startsExpr": true,
+        "label": ",",
+        "beforeExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -12046,25 +14519,24 @@
         "binop": null,
         "updateContext": null
       },
-      "value": "this",
-      "start": 578,
-      "end": 582,
+      "start": 1170,
+      "end": 1171,
       "loc": {
         "start": {
-          "line": 36,
-          "column": 2
+          "line": 58,
+          "column": 20
         },
         "end": {
-          "line": 36,
-          "column": 6
+          "line": 58,
+          "column": 21
         }
       }
     },
     {
       "type": {
-        "label": ".",
+        "label": "string",
         "beforeExpr": false,
-        "startsExpr": false,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -12073,24 +14545,25 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 582,
-      "end": 583,
+      "value": "onRemove",
+      "start": 1172,
+      "end": 1182,
       "loc": {
         "start": {
-          "line": 36,
-          "column": 6
+          "line": 58,
+          "column": 22
         },
         "end": {
-          "line": 36,
-          "column": 7
+          "line": 58,
+          "column": 32
         }
       }
     },
     {
       "type": {
-        "label": "name",
+        "label": ")",
         "beforeExpr": false,
-        "startsExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -12098,87 +14571,82 @@
         "postfix": false,
         "binop": null
       },
-      "value": "idCounter",
-      "start": 583,
-      "end": 592,
+      "start": 1182,
+      "end": 1183,
       "loc": {
         "start": {
-          "line": 36,
-          "column": 7
+          "line": 58,
+          "column": 32
         },
         "end": {
-          "line": 36,
-          "column": 16
+          "line": 58,
+          "column": 33
         }
       }
     },
     {
       "type": {
-        "label": "=",
-        "beforeExpr": true,
+        "label": "}",
+        "beforeExpr": false,
         "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
-        "isAssign": true,
+        "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "value": "=",
-      "start": 593,
-      "end": 594,
+      "start": 1187,
+      "end": 1188,
       "loc": {
         "start": {
-          "line": 36,
-          "column": 17
+          "line": 59,
+          "column": 3
         },
         "end": {
-          "line": 36,
-          "column": 18
+          "line": 59,
+          "column": 4
         }
       }
     },
     {
       "type": {
-        "label": "num",
+        "label": "}",
         "beforeExpr": false,
-        "startsExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "value": 1,
-      "start": 595,
-      "end": 596,
+      "start": 1191,
+      "end": 1192,
       "loc": {
         "start": {
-          "line": 36,
-          "column": 19
+          "line": 60,
+          "column": 2
         },
         "end": {
-          "line": 36,
-          "column": 20
+          "line": 60,
+          "column": 3
         }
       }
     },
     {
-      "type": "CommentBlock",
-      "value": "*\n\t\t * Maps entire queries to arrays of entities\n\t\t * @ignore\n\t\t ",
-      "start": 600,
-      "end": 669,
+      "type": "CommentLine",
+      "value": " Clear entities",
+      "start": 1196,
+      "end": 1213,
       "loc": {
         "start": {
-          "line": 38,
+          "line": 62,
           "column": 2
         },
         "end": {
-          "line": 41,
-          "column": 5
+          "line": 62,
+          "column": 19
         }
       }
     },
@@ -12197,15 +14665,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 672,
-      "end": 676,
+      "start": 1216,
+      "end": 1220,
       "loc": {
         "start": {
-          "line": 42,
+          "line": 63,
           "column": 2
         },
         "end": {
-          "line": 42,
+          "line": 63,
           "column": 6
         }
       }
@@ -12223,15 +14691,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 676,
-      "end": 677,
+      "start": 1220,
+      "end": 1221,
       "loc": {
         "start": {
-          "line": 42,
+          "line": 63,
           "column": 6
         },
         "end": {
-          "line": 42,
+          "line": 63,
           "column": 7
         }
       }
@@ -12248,17 +14716,17 @@
         "postfix": false,
         "binop": null
       },
-      "value": "index",
-      "start": 677,
-      "end": 682,
+      "value": "entities",
+      "start": 1221,
+      "end": 1229,
       "loc": {
         "start": {
-          "line": 42,
+          "line": 63,
           "column": 7
         },
         "end": {
-          "line": 42,
-          "column": 12
+          "line": 63,
+          "column": 15
         }
       }
     },
@@ -12276,16 +14744,16 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 683,
-      "end": 684,
+      "start": 1230,
+      "end": 1231,
       "loc": {
         "start": {
-          "line": 42,
-          "column": 13
+          "line": 63,
+          "column": 16
         },
         "end": {
-          "line": 42,
-          "column": 14
+          "line": 63,
+          "column": 17
         }
       }
     },
@@ -12304,16 +14772,16 @@
         "updateContext": null
       },
       "value": "new",
-      "start": 685,
-      "end": 688,
+      "start": 1232,
+      "end": 1235,
       "loc": {
         "start": {
-          "line": 42,
-          "column": 15
+          "line": 63,
+          "column": 18
         },
         "end": {
-          "line": 42,
-          "column": 18
+          "line": 63,
+          "column": 21
         }
       }
     },
@@ -12329,17 +14797,17 @@
         "postfix": false,
         "binop": null
       },
-      "value": "ComponentIndex",
-      "start": 689,
-      "end": 703,
+      "value": "Map",
+      "start": 1236,
+      "end": 1239,
       "loc": {
         "start": {
-          "line": 42,
-          "column": 19
+          "line": 63,
+          "column": 22
         },
         "end": {
-          "line": 42,
-          "column": 33
+          "line": 63,
+          "column": 25
         }
       }
     },
@@ -12355,16 +14823,41 @@
         "postfix": false,
         "binop": null
       },
-      "start": 703,
-      "end": 704,
+      "start": 1239,
+      "end": 1240,
       "loc": {
         "start": {
-          "line": 42,
-          "column": 33
+          "line": 63,
+          "column": 25
         },
         "end": {
-          "line": 42,
-          "column": 34
+          "line": 63,
+          "column": 26
+        }
+      }
+    },
+    {
+      "type": {
+        "label": ")",
+        "beforeExpr": false,
+        "startsExpr": false,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "start": 1240,
+      "end": 1241,
+      "loc": {
+        "start": {
+          "line": 63,
+          "column": 26
+        },
+        "end": {
+          "line": 63,
+          "column": 27
         }
       }
     },
@@ -12383,16 +14876,16 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 704,
-      "end": 708,
+      "start": 1244,
+      "end": 1248,
       "loc": {
         "start": {
-          "line": 42,
-          "column": 34
+          "line": 64,
+          "column": 2
         },
         "end": {
-          "line": 42,
-          "column": 38
+          "line": 64,
+          "column": 6
         }
       }
     },
@@ -12409,16 +14902,16 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 708,
-      "end": 709,
+      "start": 1248,
+      "end": 1249,
       "loc": {
         "start": {
-          "line": 42,
-          "column": 38
+          "line": 64,
+          "column": 6
         },
         "end": {
-          "line": 42,
-          "column": 39
+          "line": 64,
+          "column": 7
         }
       }
     },
@@ -12434,23 +14927,23 @@
         "postfix": false,
         "binop": null
       },
-      "value": "entities",
-      "start": 709,
-      "end": 717,
+      "value": "index",
+      "start": 1249,
+      "end": 1254,
       "loc": {
         "start": {
-          "line": 42,
-          "column": 39
+          "line": 64,
+          "column": 7
         },
         "end": {
-          "line": 42,
-          "column": 47
+          "line": 64,
+          "column": 12
         }
       }
     },
     {
       "type": {
-        "label": ")",
+        "label": ".",
         "beforeExpr": false,
         "startsExpr": false,
         "rightAssociative": false,
@@ -12458,26 +14951,27 @@
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "start": 717,
-      "end": 718,
+      "start": 1254,
+      "end": 1255,
       "loc": {
         "start": {
-          "line": 42,
-          "column": 47
+          "line": 64,
+          "column": 12
         },
         "end": {
-          "line": 42,
-          "column": 48
+          "line": 64,
+          "column": 13
         }
       }
     },
     {
       "type": {
-        "label": "}",
+        "label": "name",
         "beforeExpr": false,
-        "startsExpr": false,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -12485,38 +14979,49 @@
         "postfix": false,
         "binop": null
       },
-      "start": 720,
-      "end": 721,
+      "value": "clear",
+      "start": 1255,
+      "end": 1260,
       "loc": {
         "start": {
-          "line": 43,
-          "column": 1
+          "line": 64,
+          "column": 13
         },
         "end": {
-          "line": 43,
-          "column": 2
+          "line": 64,
+          "column": 18
         }
       }
     },
     {
-      "type": "CommentBlock",
-      "value": "*\n\t * Removes all entities from the world.\n\t * Does not affect registered systems, components, or prototypes.\n\t *\n\t * @example\n\t * world.clear()\n\t ",
-      "start": 724,
-      "end": 875,
+      "type": {
+        "label": "(",
+        "beforeExpr": true,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "start": 1260,
+      "end": 1261,
       "loc": {
         "start": {
-          "line": 45,
-          "column": 1
+          "line": 64,
+          "column": 18
         },
         "end": {
-          "line": 51,
-          "column": 4
+          "line": 64,
+          "column": 19
         }
       }
     },
     {
       "type": {
-        "label": "name",
+        "label": "this",
+        "keyword": "this",
         "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
@@ -12524,26 +15029,53 @@
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "value": "clear",
-      "start": 877,
-      "end": 882,
+      "value": "this",
+      "start": 1261,
+      "end": 1265,
       "loc": {
         "start": {
-          "line": 52,
-          "column": 1
+          "line": 64,
+          "column": 19
         },
         "end": {
-          "line": 52,
-          "column": 6
+          "line": 64,
+          "column": 23
         }
       }
     },
     {
       "type": {
-        "label": "(",
-        "beforeExpr": true,
+        "label": ".",
+        "beforeExpr": false,
+        "startsExpr": false,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "start": 1265,
+      "end": 1266,
+      "loc": {
+        "start": {
+          "line": 64,
+          "column": 23
+        },
+        "end": {
+          "line": 64,
+          "column": 24
+        }
+      }
+    },
+    {
+      "type": {
+        "label": "name",
+        "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
@@ -12552,16 +15084,17 @@
         "postfix": false,
         "binop": null
       },
-      "start": 882,
-      "end": 883,
+      "value": "entities",
+      "start": 1266,
+      "end": 1274,
       "loc": {
         "start": {
-          "line": 52,
-          "column": 6
+          "line": 64,
+          "column": 24
         },
         "end": {
-          "line": 52,
-          "column": 7
+          "line": 64,
+          "column": 32
         }
       }
     },
@@ -12577,24 +15110,24 @@
         "postfix": false,
         "binop": null
       },
-      "start": 883,
-      "end": 884,
+      "start": 1274,
+      "end": 1275,
       "loc": {
         "start": {
-          "line": 52,
-          "column": 7
+          "line": 64,
+          "column": 32
         },
         "end": {
-          "line": 52,
-          "column": 8
+          "line": 64,
+          "column": 33
         }
       }
     },
     {
       "type": {
-        "label": "{",
-        "beforeExpr": true,
-        "startsExpr": true,
+        "label": "}",
+        "beforeExpr": false,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -12602,60 +15135,58 @@
         "postfix": false,
         "binop": null
       },
-      "start": 885,
-      "end": 886,
+      "start": 1277,
+      "end": 1278,
       "loc": {
         "start": {
-          "line": 52,
-          "column": 9
+          "line": 65,
+          "column": 1
         },
         "end": {
-          "line": 52,
-          "column": 10
+          "line": 65,
+          "column": 2
         }
       }
     },
     {
-      "type": "CommentLine",
-      "value": " Call onRemove on all components of all entities",
-      "start": 889,
-      "end": 939,
+      "type": "CommentBlock",
+      "value": "*\n\t * Registers a component type to the world. Components must be constructable. They are passed the entity first,\n\t * then the rest of the arguments from methods like entity.set(). Components also can have an onRemove() method.\n\t *\n\t * @param {string}   name           - The name\n\t * @param {function} componentClass - The component class, must be a constructable class or function\n\t *\n\t * @example\n\t * world.component('myComponent', class {\n\t *     constructor(entity, some, args) {\n\t *         this.entity = entity\n\t *         this.some = some\n\t *         this.args = args\n\t *     }\n\t * })\n\t * // entity === the new entity object\n\t * // some === 10\n\t * // args === 500\n\t * world.entity().set('myComponent', 10, 500)\n\t *\n\t * @return {string} Registered component name on success, undefined on failure\n\t ",
+      "start": 1281,
+      "end": 2090,
       "loc": {
         "start": {
-          "line": 53,
-          "column": 2
+          "line": 67,
+          "column": 1
         },
         "end": {
-          "line": 53,
-          "column": 52
+          "line": 88,
+          "column": 4
         }
       }
     },
     {
       "type": {
-        "label": "for",
-        "keyword": "for",
+        "label": "name",
         "beforeExpr": false,
-        "startsExpr": false,
+        "startsExpr": true,
         "rightAssociative": false,
-        "isLoop": true,
+        "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "value": "for",
-      "start": 942,
-      "end": 945,
+      "value": "component",
+      "start": 2092,
+      "end": 2101,
       "loc": {
         "start": {
-          "line": 54,
-          "column": 2
+          "line": 89,
+          "column": 1
         },
         "end": {
-          "line": 54,
-          "column": 5
+          "line": 89,
+          "column": 10
         }
       }
     },
@@ -12671,52 +15202,50 @@
         "postfix": false,
         "binop": null
       },
-      "start": 946,
-      "end": 947,
+      "start": 2101,
+      "end": 2102,
       "loc": {
         "start": {
-          "line": 54,
-          "column": 6
+          "line": 89,
+          "column": 10
         },
         "end": {
-          "line": 54,
-          "column": 7
+          "line": 89,
+          "column": 11
         }
       }
     },
     {
       "type": {
-        "label": "const",
-        "keyword": "const",
+        "label": "name",
         "beforeExpr": false,
-        "startsExpr": false,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "value": "const",
-      "start": 947,
-      "end": 952,
+      "value": "name",
+      "start": 2102,
+      "end": 2106,
       "loc": {
         "start": {
-          "line": 54,
-          "column": 7
+          "line": 89,
+          "column": 11
         },
         "end": {
-          "line": 54,
-          "column": 12
+          "line": 89,
+          "column": 15
         }
       }
     },
     {
       "type": {
-        "label": "[",
+        "label": ",",
         "beforeExpr": true,
-        "startsExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -12725,16 +15254,16 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 953,
-      "end": 954,
+      "start": 2106,
+      "end": 2107,
       "loc": {
         "start": {
-          "line": 54,
-          "column": 13
+          "line": 89,
+          "column": 15
         },
         "end": {
-          "line": 54,
-          "column": 14
+          "line": 89,
+          "column": 16
         }
       }
     },
@@ -12750,50 +15279,49 @@
         "postfix": false,
         "binop": null
       },
-      "value": "entityId",
-      "start": 954,
-      "end": 962,
+      "value": "componentClass",
+      "start": 2108,
+      "end": 2122,
       "loc": {
         "start": {
-          "line": 54,
-          "column": 14
+          "line": 89,
+          "column": 17
         },
         "end": {
-          "line": 54,
-          "column": 22
+          "line": 89,
+          "column": 31
         }
       }
     },
     {
       "type": {
-        "label": ",",
-        "beforeExpr": true,
+        "label": ")",
+        "beforeExpr": false,
         "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "start": 962,
-      "end": 963,
+      "start": 2122,
+      "end": 2123,
       "loc": {
         "start": {
-          "line": 54,
-          "column": 22
+          "line": 89,
+          "column": 31
         },
         "end": {
-          "line": 54,
-          "column": 23
+          "line": 89,
+          "column": 32
         }
       }
     },
     {
       "type": {
-        "label": "name",
-        "beforeExpr": false,
+        "label": "{",
+        "beforeExpr": true,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
@@ -12802,23 +15330,39 @@
         "postfix": false,
         "binop": null
       },
-      "value": "entity",
-      "start": 964,
-      "end": 970,
+      "start": 2124,
+      "end": 2125,
       "loc": {
         "start": {
-          "line": 54,
-          "column": 24
+          "line": 89,
+          "column": 33
         },
         "end": {
-          "line": 54,
-          "column": 30
+          "line": 89,
+          "column": 34
+        }
+      }
+    },
+    {
+      "type": "CommentLine",
+      "value": " Only allow functions and classes to be components",
+      "start": 2128,
+      "end": 2180,
+      "loc": {
+        "start": {
+          "line": 90,
+          "column": 2
+        },
+        "end": {
+          "line": 90,
+          "column": 54
         }
       }
     },
     {
       "type": {
-        "label": "]",
+        "label": "if",
+        "keyword": "if",
         "beforeExpr": false,
         "startsExpr": false,
         "rightAssociative": false,
@@ -12829,16 +15373,42 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 970,
-      "end": 971,
+      "value": "if",
+      "start": 2183,
+      "end": 2185,
       "loc": {
         "start": {
-          "line": 54,
-          "column": 30
+          "line": 91,
+          "column": 2
         },
         "end": {
-          "line": 54,
-          "column": 31
+          "line": 91,
+          "column": 4
+        }
+      }
+    },
+    {
+      "type": {
+        "label": "(",
+        "beforeExpr": true,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "start": 2186,
+      "end": 2187,
+      "loc": {
+        "start": {
+          "line": 91,
+          "column": 5
+        },
+        "end": {
+          "line": 91,
+          "column": 6
         }
       }
     },
@@ -12854,79 +15424,76 @@
         "postfix": false,
         "binop": null
       },
-      "value": "of",
-      "start": 972,
-      "end": 974,
+      "value": "isFunction",
+      "start": 2187,
+      "end": 2197,
       "loc": {
         "start": {
-          "line": 54,
-          "column": 32
+          "line": 91,
+          "column": 6
         },
         "end": {
-          "line": 54,
-          "column": 34
+          "line": 91,
+          "column": 16
         }
       }
     },
     {
       "type": {
-        "label": "this",
-        "keyword": "this",
-        "beforeExpr": false,
+        "label": "(",
+        "beforeExpr": true,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "value": "this",
-      "start": 975,
-      "end": 979,
+      "start": 2197,
+      "end": 2198,
       "loc": {
         "start": {
-          "line": 54,
-          "column": 35
+          "line": 91,
+          "column": 16
         },
         "end": {
-          "line": 54,
-          "column": 39
+          "line": 91,
+          "column": 17
         }
       }
     },
     {
       "type": {
-        "label": ".",
+        "label": "name",
         "beforeExpr": false,
-        "startsExpr": false,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "start": 979,
-      "end": 980,
+      "value": "componentClass",
+      "start": 2198,
+      "end": 2212,
       "loc": {
         "start": {
-          "line": 54,
-          "column": 39
+          "line": 91,
+          "column": 17
         },
         "end": {
-          "line": 54,
-          "column": 40
+          "line": 91,
+          "column": 31
         }
       }
     },
     {
       "type": {
-        "label": "name",
+        "label": ")",
         "beforeExpr": false,
-        "startsExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -12934,17 +15501,16 @@
         "postfix": false,
         "binop": null
       },
-      "value": "entities",
-      "start": 980,
-      "end": 988,
+      "start": 2212,
+      "end": 2213,
       "loc": {
         "start": {
-          "line": 54,
-          "column": 40
+          "line": 91,
+          "column": 31
         },
         "end": {
-          "line": 54,
-          "column": 48
+          "line": 91,
+          "column": 32
         }
       }
     },
@@ -12960,16 +15526,16 @@
         "postfix": false,
         "binop": null
       },
-      "start": 988,
-      "end": 989,
+      "start": 2213,
+      "end": 2214,
       "loc": {
         "start": {
-          "line": 54,
-          "column": 48
+          "line": 91,
+          "column": 32
         },
         "end": {
-          "line": 54,
-          "column": 49
+          "line": 91,
+          "column": 33
         }
       }
     },
@@ -12985,203 +15551,201 @@
         "postfix": false,
         "binop": null
       },
-      "start": 990,
-      "end": 991,
+      "start": 2215,
+      "end": 2216,
       "loc": {
         "start": {
-          "line": 54,
-          "column": 50
+          "line": 91,
+          "column": 34
         },
         "end": {
-          "line": 54,
-          "column": 51
+          "line": 91,
+          "column": 35
         }
       }
     },
     {
       "type": {
-        "label": "for",
-        "keyword": "for",
+        "label": "this",
+        "keyword": "this",
         "beforeExpr": false,
-        "startsExpr": false,
+        "startsExpr": true,
         "rightAssociative": false,
-        "isLoop": true,
+        "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
         "binop": null,
         "updateContext": null
       },
-      "value": "for",
-      "start": 995,
-      "end": 998,
+      "value": "this",
+      "start": 2220,
+      "end": 2224,
       "loc": {
         "start": {
-          "line": 55,
+          "line": 92,
           "column": 3
         },
         "end": {
-          "line": 55,
-          "column": 6
+          "line": 92,
+          "column": 7
         }
       }
     },
     {
       "type": {
-        "label": "(",
-        "beforeExpr": true,
-        "startsExpr": true,
+        "label": ".",
+        "beforeExpr": false,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "start": 999,
-      "end": 1000,
+      "start": 2224,
+      "end": 2225,
       "loc": {
         "start": {
-          "line": 55,
+          "line": 92,
           "column": 7
         },
         "end": {
-          "line": 55,
+          "line": 92,
           "column": 8
         }
       }
     },
     {
       "type": {
-        "label": "let",
-        "keyword": "let",
+        "label": "name",
         "beforeExpr": false,
-        "startsExpr": false,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "value": "let",
-      "start": 1000,
-      "end": 1003,
+      "value": "components",
+      "start": 2225,
+      "end": 2235,
       "loc": {
         "start": {
-          "line": 55,
+          "line": 92,
           "column": 8
         },
         "end": {
-          "line": 55,
-          "column": 11
+          "line": 92,
+          "column": 18
         }
       }
     },
     {
       "type": {
-        "label": "name",
-        "beforeExpr": false,
+        "label": "[",
+        "beforeExpr": true,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "value": "componentName",
-      "start": 1004,
-      "end": 1017,
+      "start": 2235,
+      "end": 2236,
       "loc": {
         "start": {
-          "line": 55,
-          "column": 12
+          "line": 92,
+          "column": 18
         },
         "end": {
-          "line": 55,
-          "column": 25
+          "line": 92,
+          "column": 19
         }
       }
     },
     {
       "type": {
-        "label": "in",
-        "keyword": "in",
-        "beforeExpr": true,
-        "startsExpr": false,
+        "label": "name",
+        "beforeExpr": false,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": 7,
-        "updateContext": null
+        "binop": null
       },
-      "value": "in",
-      "start": 1018,
-      "end": 1020,
+      "value": "name",
+      "start": 2236,
+      "end": 2240,
       "loc": {
         "start": {
-          "line": 55,
-          "column": 26
+          "line": 92,
+          "column": 19
         },
         "end": {
-          "line": 55,
-          "column": 28
+          "line": 92,
+          "column": 23
         }
       }
     },
     {
       "type": {
-        "label": "name",
+        "label": "]",
         "beforeExpr": false,
-        "startsExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "value": "entity",
-      "start": 1021,
-      "end": 1027,
+      "start": 2240,
+      "end": 2241,
       "loc": {
         "start": {
-          "line": 55,
-          "column": 29
+          "line": 92,
+          "column": 23
         },
         "end": {
-          "line": 55,
-          "column": 35
+          "line": 92,
+          "column": 24
         }
       }
     },
     {
       "type": {
-        "label": ".",
-        "beforeExpr": false,
+        "label": "=",
+        "beforeExpr": true,
         "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
-        "isAssign": false,
+        "isAssign": true,
         "prefix": false,
         "postfix": false,
         "binop": null,
         "updateContext": null
       },
-      "start": 1027,
-      "end": 1028,
+      "value": "=",
+      "start": 2242,
+      "end": 2243,
       "loc": {
         "start": {
-          "line": 55,
-          "column": 35
+          "line": 92,
+          "column": 25
         },
         "end": {
-          "line": 55,
-          "column": 36
+          "line": 92,
+          "column": 26
         }
       }
     },
@@ -13197,49 +15761,52 @@
         "postfix": false,
         "binop": null
       },
-      "value": "data",
-      "start": 1028,
-      "end": 1032,
+      "value": "componentClass",
+      "start": 2244,
+      "end": 2258,
       "loc": {
         "start": {
-          "line": 55,
-          "column": 36
+          "line": 92,
+          "column": 27
         },
         "end": {
-          "line": 55,
-          "column": 40
+          "line": 92,
+          "column": 41
         }
       }
     },
     {
       "type": {
-        "label": ")",
-        "beforeExpr": false,
+        "label": "return",
+        "keyword": "return",
+        "beforeExpr": true,
         "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "start": 1032,
-      "end": 1033,
+      "value": "return",
+      "start": 2262,
+      "end": 2268,
       "loc": {
         "start": {
-          "line": 55,
-          "column": 40
+          "line": 93,
+          "column": 3
         },
         "end": {
-          "line": 55,
-          "column": 41
+          "line": 93,
+          "column": 9
         }
       }
     },
     {
       "type": {
-        "label": "{",
-        "beforeExpr": true,
+        "label": "name",
+        "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
@@ -13248,39 +15815,23 @@
         "postfix": false,
         "binop": null
       },
-      "start": 1034,
-      "end": 1035,
-      "loc": {
-        "start": {
-          "line": 55,
-          "column": 42
-        },
-        "end": {
-          "line": 55,
-          "column": 43
-        }
-      }
-    },
-    {
-      "type": "CommentLine",
-      "value": " Get component, and call onRemove if it exists as a function",
-      "start": 1040,
-      "end": 1102,
+      "value": "name",
+      "start": 2269,
+      "end": 2273,
       "loc": {
         "start": {
-          "line": 56,
-          "column": 4
+          "line": 93,
+          "column": 10
         },
         "end": {
-          "line": 56,
-          "column": 66
+          "line": 93,
+          "column": 14
         }
       }
     },
     {
       "type": {
-        "label": "let",
-        "keyword": "let",
+        "label": "}",
         "beforeExpr": false,
         "startsExpr": false,
         "rightAssociative": false,
@@ -13288,28 +15839,26 @@
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "value": "let",
-      "start": 1107,
-      "end": 1110,
+      "start": 2276,
+      "end": 2277,
       "loc": {
         "start": {
-          "line": 57,
-          "column": 4
+          "line": 94,
+          "column": 2
         },
         "end": {
-          "line": 57,
-          "column": 7
+          "line": 94,
+          "column": 3
         }
       }
     },
     {
       "type": {
-        "label": "name",
+        "label": "}",
         "beforeExpr": false,
-        "startsExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -13317,44 +15866,32 @@
         "postfix": false,
         "binop": null
       },
-      "value": "component",
-      "start": 1111,
-      "end": 1120,
+      "start": 2279,
+      "end": 2280,
       "loc": {
         "start": {
-          "line": 57,
-          "column": 8
+          "line": 95,
+          "column": 1
         },
         "end": {
-          "line": 57,
-          "column": 17
+          "line": 95,
+          "column": 2
         }
       }
     },
     {
-      "type": {
-        "label": "=",
-        "beforeExpr": true,
-        "startsExpr": false,
-        "rightAssociative": false,
-        "isLoop": false,
-        "isAssign": true,
-        "prefix": false,
-        "postfix": false,
-        "binop": null,
-        "updateContext": null
-      },
-      "value": "=",
-      "start": 1121,
-      "end": 1122,
+      "type": "CommentBlock",
+      "value": "*\n\t * Creates a new entity in the world\n\t *\n\t * @param {string} [name] - The prototype name to use\n\t *\n\t * @example\n\t * world.entity()\n\t *\n\t * @example\n\t * world.entity('Player')\n\t *\n\t * @return {Entity} The new entity created\n\t ",
+      "start": 2283,
+      "end": 2516,
       "loc": {
         "start": {
-          "line": 57,
-          "column": 18
+          "line": 97,
+          "column": 1
         },
         "end": {
-          "line": 57,
-          "column": 19
+          "line": 109,
+          "column": 4
         }
       }
     },
@@ -13371,42 +15908,41 @@
         "binop": null
       },
       "value": "entity",
-      "start": 1123,
-      "end": 1129,
+      "start": 2518,
+      "end": 2524,
       "loc": {
         "start": {
-          "line": 57,
-          "column": 20
+          "line": 110,
+          "column": 1
         },
         "end": {
-          "line": 57,
-          "column": 26
+          "line": 110,
+          "column": 7
         }
       }
     },
     {
       "type": {
-        "label": ".",
-        "beforeExpr": false,
-        "startsExpr": false,
+        "label": "(",
+        "beforeExpr": true,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "start": 1129,
-      "end": 1130,
+      "start": 2524,
+      "end": 2525,
       "loc": {
         "start": {
-          "line": 57,
-          "column": 26
+          "line": 110,
+          "column": 7
         },
         "end": {
-          "line": 57,
-          "column": 27
+          "line": 110,
+          "column": 8
         }
       }
     },
@@ -13422,50 +15958,49 @@
         "postfix": false,
         "binop": null
       },
-      "value": "data",
-      "start": 1130,
-      "end": 1134,
+      "value": "name",
+      "start": 2525,
+      "end": 2529,
       "loc": {
         "start": {
-          "line": 57,
-          "column": 27
+          "line": 110,
+          "column": 8
         },
         "end": {
-          "line": 57,
-          "column": 31
+          "line": 110,
+          "column": 12
         }
       }
     },
     {
       "type": {
-        "label": "[",
-        "beforeExpr": true,
-        "startsExpr": true,
+        "label": ")",
+        "beforeExpr": false,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "start": 1134,
-      "end": 1135,
+      "start": 2529,
+      "end": 2530,
       "loc": {
         "start": {
-          "line": 57,
-          "column": 31
+          "line": 110,
+          "column": 12
         },
         "end": {
-          "line": 57,
-          "column": 32
+          "line": 110,
+          "column": 13
         }
       }
     },
     {
       "type": {
-        "label": "name",
-        "beforeExpr": false,
+        "label": "{",
+        "beforeExpr": true,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
@@ -13474,23 +16009,23 @@
         "postfix": false,
         "binop": null
       },
-      "value": "componentName",
-      "start": 1135,
-      "end": 1148,
+      "start": 2531,
+      "end": 2532,
       "loc": {
         "start": {
-          "line": 57,
-          "column": 32
+          "line": 110,
+          "column": 14
         },
         "end": {
-          "line": 57,
-          "column": 45
+          "line": 110,
+          "column": 15
         }
       }
     },
     {
       "type": {
-        "label": "]",
+        "label": "let",
+        "keyword": "let",
         "beforeExpr": false,
         "startsExpr": false,
         "rightAssociative": false,
@@ -13501,16 +16036,17 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 1148,
-      "end": 1149,
+      "value": "let",
+      "start": 2535,
+      "end": 2538,
       "loc": {
         "start": {
-          "line": 57,
-          "column": 45
+          "line": 111,
+          "column": 2
         },
         "end": {
-          "line": 57,
-          "column": 46
+          "line": 111,
+          "column": 5
         }
       }
     },
@@ -13526,48 +16062,51 @@
         "postfix": false,
         "binop": null
       },
-      "value": "invoke",
-      "start": 1154,
-      "end": 1160,
+      "value": "entityId",
+      "start": 2539,
+      "end": 2547,
       "loc": {
         "start": {
-          "line": 58,
-          "column": 4
+          "line": 111,
+          "column": 6
         },
         "end": {
-          "line": 58,
-          "column": 10
+          "line": 111,
+          "column": 14
         }
       }
     },
     {
       "type": {
-        "label": "(",
+        "label": "=",
         "beforeExpr": true,
-        "startsExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
-        "isAssign": false,
+        "isAssign": true,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "start": 1160,
-      "end": 1161,
+      "value": "=",
+      "start": 2548,
+      "end": 2549,
       "loc": {
         "start": {
-          "line": 58,
-          "column": 10
+          "line": 111,
+          "column": 15
         },
         "end": {
-          "line": 58,
-          "column": 11
+          "line": 111,
+          "column": 16
         }
       }
     },
     {
       "type": {
-        "label": "name",
+        "label": "this",
+        "keyword": "this",
         "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
@@ -13575,26 +16114,27 @@
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "value": "component",
-      "start": 1161,
-      "end": 1170,
+      "value": "this",
+      "start": 2550,
+      "end": 2554,
       "loc": {
         "start": {
-          "line": 58,
-          "column": 11
+          "line": 111,
+          "column": 17
         },
         "end": {
-          "line": 58,
-          "column": 20
+          "line": 111,
+          "column": 21
         }
       }
     },
     {
       "type": {
-        "label": ",",
-        "beforeExpr": true,
+        "label": ".",
+        "beforeExpr": false,
         "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
@@ -13604,22 +16144,22 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 1170,
-      "end": 1171,
+      "start": 2554,
+      "end": 2555,
       "loc": {
         "start": {
-          "line": 58,
-          "column": 20
+          "line": 111,
+          "column": 21
         },
         "end": {
-          "line": 58,
-          "column": 21
+          "line": 111,
+          "column": 22
         }
       }
     },
     {
       "type": {
-        "label": "string",
+        "label": "name",
         "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
@@ -13627,51 +16167,52 @@
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "value": "onRemove",
-      "start": 1172,
-      "end": 1182,
+      "value": "idCounter",
+      "start": 2555,
+      "end": 2564,
       "loc": {
         "start": {
-          "line": 58,
+          "line": 111,
           "column": 22
         },
         "end": {
-          "line": 58,
-          "column": 32
+          "line": 111,
+          "column": 31
         }
       }
     },
     {
       "type": {
-        "label": ")",
+        "label": "++/--",
         "beforeExpr": false,
-        "startsExpr": false,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
-        "prefix": false,
-        "postfix": false,
+        "prefix": true,
+        "postfix": true,
         "binop": null
       },
-      "start": 1182,
-      "end": 1183,
+      "value": "++",
+      "start": 2564,
+      "end": 2566,
       "loc": {
         "start": {
-          "line": 58,
-          "column": 32
+          "line": 111,
+          "column": 31
         },
         "end": {
-          "line": 58,
+          "line": 111,
           "column": 33
         }
       }
     },
     {
       "type": {
-        "label": "}",
+        "label": "let",
+        "keyword": "let",
         "beforeExpr": false,
         "startsExpr": false,
         "rightAssociative": false,
@@ -13679,26 +16220,28 @@
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "start": 1187,
-      "end": 1188,
+      "value": "let",
+      "start": 2569,
+      "end": 2572,
       "loc": {
         "start": {
-          "line": 59,
-          "column": 3
+          "line": 112,
+          "column": 2
         },
         "end": {
-          "line": 59,
-          "column": 4
+          "line": 112,
+          "column": 5
         }
       }
     },
     {
       "type": {
-        "label": "}",
+        "label": "name",
         "beforeExpr": false,
-        "startsExpr": false,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -13706,68 +16249,53 @@
         "postfix": false,
         "binop": null
       },
-      "start": 1191,
-      "end": 1192,
-      "loc": {
-        "start": {
-          "line": 60,
-          "column": 2
-        },
-        "end": {
-          "line": 60,
-          "column": 3
-        }
-      }
-    },
-    {
-      "type": "CommentLine",
-      "value": " Clear entities",
-      "start": 1196,
-      "end": 1213,
+      "value": "entity",
+      "start": 2573,
+      "end": 2579,
       "loc": {
         "start": {
-          "line": 62,
-          "column": 2
+          "line": 112,
+          "column": 6
         },
         "end": {
-          "line": 62,
-          "column": 19
+          "line": 112,
+          "column": 12
         }
       }
     },
     {
       "type": {
-        "label": "this",
-        "keyword": "this",
-        "beforeExpr": false,
-        "startsExpr": true,
+        "label": "=",
+        "beforeExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
-        "isAssign": false,
+        "isAssign": true,
         "prefix": false,
         "postfix": false,
         "binop": null,
         "updateContext": null
       },
-      "value": "this",
-      "start": 1216,
-      "end": 1220,
+      "value": "=",
+      "start": 2580,
+      "end": 2581,
       "loc": {
         "start": {
-          "line": 63,
-          "column": 2
+          "line": 112,
+          "column": 13
         },
         "end": {
-          "line": 63,
-          "column": 6
+          "line": 112,
+          "column": 14
         }
       }
     },
     {
       "type": {
-        "label": ".",
-        "beforeExpr": false,
-        "startsExpr": false,
+        "label": "new",
+        "keyword": "new",
+        "beforeExpr": true,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -13776,16 +16304,17 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 1220,
-      "end": 1221,
+      "value": "new",
+      "start": 2582,
+      "end": 2585,
       "loc": {
         "start": {
-          "line": 63,
-          "column": 6
+          "line": 112,
+          "column": 15
         },
         "end": {
-          "line": 63,
-          "column": 7
+          "line": 112,
+          "column": 18
         }
       }
     },
@@ -13801,52 +16330,50 @@
         "postfix": false,
         "binop": null
       },
-      "value": "entities",
-      "start": 1221,
-      "end": 1229,
+      "value": "Entity",
+      "start": 2586,
+      "end": 2592,
       "loc": {
         "start": {
-          "line": 63,
-          "column": 7
+          "line": 112,
+          "column": 19
         },
         "end": {
-          "line": 63,
-          "column": 15
+          "line": 112,
+          "column": 25
         }
       }
     },
     {
       "type": {
-        "label": "=",
+        "label": "(",
         "beforeExpr": true,
-        "startsExpr": false,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
-        "isAssign": true,
+        "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "value": "=",
-      "start": 1230,
-      "end": 1231,
+      "start": 2592,
+      "end": 2593,
       "loc": {
         "start": {
-          "line": 63,
-          "column": 16
+          "line": 112,
+          "column": 25
         },
         "end": {
-          "line": 63,
-          "column": 17
+          "line": 112,
+          "column": 26
         }
       }
     },
     {
       "type": {
-        "label": "new",
-        "keyword": "new",
-        "beforeExpr": true,
+        "label": "this",
+        "keyword": "this",
+        "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
@@ -13856,50 +16383,50 @@
         "binop": null,
         "updateContext": null
       },
-      "value": "new",
-      "start": 1232,
-      "end": 1235,
+      "value": "this",
+      "start": 2593,
+      "end": 2597,
       "loc": {
         "start": {
-          "line": 63,
-          "column": 18
+          "line": 112,
+          "column": 26
         },
         "end": {
-          "line": 63,
-          "column": 21
+          "line": 112,
+          "column": 30
         }
       }
     },
     {
       "type": {
-        "label": "name",
-        "beforeExpr": false,
-        "startsExpr": true,
+        "label": ",",
+        "beforeExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "value": "Map",
-      "start": 1236,
-      "end": 1239,
+      "start": 2597,
+      "end": 2598,
       "loc": {
         "start": {
-          "line": 63,
-          "column": 22
+          "line": 112,
+          "column": 30
         },
         "end": {
-          "line": 63,
-          "column": 25
+          "line": 112,
+          "column": 31
         }
       }
     },
     {
       "type": {
-        "label": "(",
-        "beforeExpr": true,
+        "label": "name",
+        "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
@@ -13908,16 +16435,17 @@
         "postfix": false,
         "binop": null
       },
-      "start": 1239,
-      "end": 1240,
+      "value": "entityId",
+      "start": 2599,
+      "end": 2607,
       "loc": {
         "start": {
-          "line": 63,
-          "column": 25
+          "line": 112,
+          "column": 32
         },
         "end": {
-          "line": 63,
-          "column": 26
+          "line": 112,
+          "column": 40
         }
       }
     },
@@ -13933,25 +16461,41 @@
         "postfix": false,
         "binop": null
       },
-      "start": 1240,
-      "end": 1241,
+      "start": 2607,
+      "end": 2608,
+      "loc": {
+        "start": {
+          "line": 112,
+          "column": 40
+        },
+        "end": {
+          "line": 112,
+          "column": 41
+        }
+      }
+    },
+    {
+      "type": "CommentLine",
+      "value": " Use 'name' to get prototype data (if specified)",
+      "start": 2612,
+      "end": 2662,
       "loc": {
         "start": {
-          "line": 63,
-          "column": 26
+          "line": 114,
+          "column": 2
         },
         "end": {
-          "line": 63,
-          "column": 27
+          "line": 114,
+          "column": 52
         }
       }
     },
     {
       "type": {
-        "label": "this",
-        "keyword": "this",
+        "label": "if",
+        "keyword": "if",
         "beforeExpr": false,
-        "startsExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -13960,43 +16504,42 @@
         "binop": null,
         "updateContext": null
       },
-      "value": "this",
-      "start": 1244,
-      "end": 1248,
+      "value": "if",
+      "start": 2665,
+      "end": 2667,
       "loc": {
         "start": {
-          "line": 64,
+          "line": 115,
           "column": 2
         },
         "end": {
-          "line": 64,
-          "column": 6
+          "line": 115,
+          "column": 4
         }
       }
     },
     {
       "type": {
-        "label": ".",
-        "beforeExpr": false,
-        "startsExpr": false,
+        "label": "(",
+        "beforeExpr": true,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "start": 1248,
-      "end": 1249,
+      "start": 2668,
+      "end": 2669,
       "loc": {
         "start": {
-          "line": 64,
-          "column": 6
+          "line": 115,
+          "column": 5
         },
         "end": {
-          "line": 64,
-          "column": 7
+          "line": 115,
+          "column": 6
         }
       }
     },
@@ -14012,42 +16555,43 @@
         "postfix": false,
         "binop": null
       },
-      "value": "index",
-      "start": 1249,
-      "end": 1254,
+      "value": "name",
+      "start": 2669,
+      "end": 2673,
       "loc": {
         "start": {
-          "line": 64,
-          "column": 7
+          "line": 115,
+          "column": 6
         },
         "end": {
-          "line": 64,
-          "column": 12
+          "line": 115,
+          "column": 10
         }
       }
     },
     {
       "type": {
-        "label": ".",
-        "beforeExpr": false,
+        "label": "&&",
+        "beforeExpr": true,
         "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
+        "binop": 2,
         "updateContext": null
       },
-      "start": 1254,
-      "end": 1255,
+      "value": "&&",
+      "start": 2674,
+      "end": 2676,
       "loc": {
         "start": {
-          "line": 64,
-          "column": 12
+          "line": 115,
+          "column": 11
         },
         "end": {
-          "line": 64,
+          "line": 115,
           "column": 13
         }
       }
@@ -14064,42 +16608,45 @@
         "postfix": false,
         "binop": null
       },
-      "value": "clear",
-      "start": 1255,
-      "end": 1260,
+      "value": "name",
+      "start": 2677,
+      "end": 2681,
       "loc": {
         "start": {
-          "line": 64,
-          "column": 13
+          "line": 115,
+          "column": 14
         },
         "end": {
-          "line": 64,
+          "line": 115,
           "column": 18
         }
       }
     },
     {
       "type": {
-        "label": "(",
+        "label": "in",
+        "keyword": "in",
         "beforeExpr": true,
-        "startsExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": 7,
+        "updateContext": null
       },
-      "start": 1260,
-      "end": 1261,
+      "value": "in",
+      "start": 2682,
+      "end": 2684,
       "loc": {
         "start": {
-          "line": 64,
-          "column": 18
+          "line": 115,
+          "column": 19
         },
         "end": {
-          "line": 64,
-          "column": 19
+          "line": 115,
+          "column": 21
         }
       }
     },
@@ -14118,16 +16665,16 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 1261,
-      "end": 1265,
+      "start": 2685,
+      "end": 2689,
       "loc": {
         "start": {
-          "line": 64,
-          "column": 19
+          "line": 115,
+          "column": 22
         },
         "end": {
-          "line": 64,
-          "column": 23
+          "line": 115,
+          "column": 26
         }
       }
     },
@@ -14144,16 +16691,16 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 1265,
-      "end": 1266,
+      "start": 2689,
+      "end": 2690,
       "loc": {
         "start": {
-          "line": 64,
-          "column": 23
+          "line": 115,
+          "column": 26
         },
         "end": {
-          "line": 64,
-          "column": 24
+          "line": 115,
+          "column": 27
         }
       }
     },
@@ -14169,17 +16716,17 @@
         "postfix": false,
         "binop": null
       },
-      "value": "entities",
-      "start": 1266,
-      "end": 1274,
+      "value": "entityTemplates",
+      "start": 2690,
+      "end": 2705,
       "loc": {
         "start": {
-          "line": 64,
-          "column": 24
+          "line": 115,
+          "column": 27
         },
         "end": {
-          "line": 64,
-          "column": 32
+          "line": 115,
+          "column": 42
         }
       }
     },
@@ -14195,24 +16742,24 @@
         "postfix": false,
         "binop": null
       },
-      "start": 1274,
-      "end": 1275,
+      "start": 2705,
+      "end": 2706,
       "loc": {
         "start": {
-          "line": 64,
-          "column": 32
+          "line": 115,
+          "column": 42
         },
         "end": {
-          "line": 64,
-          "column": 33
+          "line": 115,
+          "column": 43
         }
       }
     },
     {
       "type": {
-        "label": "}",
-        "beforeExpr": false,
-        "startsExpr": false,
+        "label": "{",
+        "beforeExpr": true,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -14220,83 +16767,60 @@
         "postfix": false,
         "binop": null
       },
-      "start": 1277,
-      "end": 1278,
+      "start": 2707,
+      "end": 2708,
       "loc": {
         "start": {
-          "line": 65,
-          "column": 1
+          "line": 115,
+          "column": 44
         },
         "end": {
-          "line": 65,
-          "column": 2
+          "line": 115,
+          "column": 45
         }
       }
     },
     {
-      "type": "CommentBlock",
-      "value": "*\n\t * Registers a component type to the world. Components must be constructable. They are passed the entity first,\n\t * then the rest of the arguments from methods like entity.set(). Components also can have an onRemove() method.\n\t *\n\t * @param {string}   name           - The name\n\t * @param {function} componentClass - The component class, must be a constructable class or function\n\t *\n\t * @example\n\t * world.component('myComponent', class {\n\t *     constructor(entity, some, args) {\n\t *         this.entity = entity\n\t *         this.some = some\n\t *         this.args = args\n\t *     }\n\t * })\n\t * // entity === the new entity object\n\t * // some === 10\n\t * // args === 500\n\t * world.entity().set('myComponent', 10, 500)\n\t *\n\t * @return {string} Registered component name on success, undefined on failure\n\t ",
-      "start": 1281,
-      "end": 2090,
+      "type": "CommentLine",
+      "value": " Add all components from prototype",
+      "start": 2712,
+      "end": 2748,
       "loc": {
         "start": {
-          "line": 67,
-          "column": 1
+          "line": 116,
+          "column": 3
         },
         "end": {
-          "line": 88,
-          "column": 4
+          "line": 116,
+          "column": 39
         }
       }
     },
     {
       "type": {
-        "label": "name",
+        "label": "let",
+        "keyword": "let",
         "beforeExpr": false,
-        "startsExpr": true,
-        "rightAssociative": false,
-        "isLoop": false,
-        "isAssign": false,
-        "prefix": false,
-        "postfix": false,
-        "binop": null
-      },
-      "value": "component",
-      "start": 2092,
-      "end": 2101,
-      "loc": {
-        "start": {
-          "line": 89,
-          "column": 1
-        },
-        "end": {
-          "line": 89,
-          "column": 10
-        }
-      }
-    },
-    {
-      "type": {
-        "label": "(",
-        "beforeExpr": true,
-        "startsExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "start": 2101,
-      "end": 2102,
+      "value": "let",
+      "start": 2752,
+      "end": 2755,
       "loc": {
         "start": {
-          "line": 89,
-          "column": 10
+          "line": 117,
+          "column": 3
         },
         "end": {
-          "line": 89,
-          "column": 11
+          "line": 117,
+          "column": 6
         }
       }
     },
@@ -14312,49 +16836,51 @@
         "postfix": false,
         "binop": null
       },
-      "value": "name",
-      "start": 2102,
-      "end": 2106,
+      "value": "template",
+      "start": 2756,
+      "end": 2764,
       "loc": {
         "start": {
-          "line": 89,
-          "column": 11
+          "line": 117,
+          "column": 7
         },
         "end": {
-          "line": 89,
+          "line": 117,
           "column": 15
         }
       }
     },
     {
       "type": {
-        "label": ",",
+        "label": "=",
         "beforeExpr": true,
         "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
-        "isAssign": false,
+        "isAssign": true,
         "prefix": false,
         "postfix": false,
         "binop": null,
         "updateContext": null
       },
-      "start": 2106,
-      "end": 2107,
+      "value": "=",
+      "start": 2765,
+      "end": 2766,
       "loc": {
         "start": {
-          "line": 89,
-          "column": 15
+          "line": 117,
+          "column": 16
         },
         "end": {
-          "line": 89,
-          "column": 16
+          "line": 117,
+          "column": 17
         }
       }
     },
     {
       "type": {
-        "label": "name",
+        "label": "this",
+        "keyword": "this",
         "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
@@ -14362,25 +16888,26 @@
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "value": "componentClass",
-      "start": 2108,
-      "end": 2122,
+      "value": "this",
+      "start": 2767,
+      "end": 2771,
       "loc": {
         "start": {
-          "line": 89,
-          "column": 17
+          "line": 117,
+          "column": 18
         },
         "end": {
-          "line": 89,
-          "column": 31
+          "line": 117,
+          "column": 22
         }
       }
     },
     {
       "type": {
-        "label": ")",
+        "label": ".",
         "beforeExpr": false,
         "startsExpr": false,
         "rightAssociative": false,
@@ -14388,25 +16915,26 @@
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "start": 2122,
-      "end": 2123,
+      "start": 2771,
+      "end": 2772,
       "loc": {
         "start": {
-          "line": 89,
-          "column": 31
+          "line": 117,
+          "column": 22
         },
         "end": {
-          "line": 89,
-          "column": 32
+          "line": 117,
+          "column": 23
         }
       }
     },
     {
       "type": {
-        "label": "{",
-        "beforeExpr": true,
+        "label": "name",
+        "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
@@ -14415,41 +16943,25 @@
         "postfix": false,
         "binop": null
       },
-      "start": 2124,
-      "end": 2125,
-      "loc": {
-        "start": {
-          "line": 89,
-          "column": 33
-        },
-        "end": {
-          "line": 89,
-          "column": 34
-        }
-      }
-    },
-    {
-      "type": "CommentLine",
-      "value": " Only allow functions and classes to be components",
-      "start": 2128,
-      "end": 2180,
+      "value": "entityTemplates",
+      "start": 2772,
+      "end": 2787,
       "loc": {
         "start": {
-          "line": 90,
-          "column": 2
+          "line": 117,
+          "column": 23
         },
         "end": {
-          "line": 90,
-          "column": 54
+          "line": 117,
+          "column": 38
         }
       }
     },
     {
       "type": {
-        "label": "if",
-        "keyword": "if",
-        "beforeExpr": false,
-        "startsExpr": false,
+        "label": "[",
+        "beforeExpr": true,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -14458,24 +16970,23 @@
         "binop": null,
         "updateContext": null
       },
-      "value": "if",
-      "start": 2183,
-      "end": 2185,
+      "start": 2787,
+      "end": 2788,
       "loc": {
         "start": {
-          "line": 91,
-          "column": 2
+          "line": 117,
+          "column": 38
         },
         "end": {
-          "line": 91,
-          "column": 4
+          "line": 117,
+          "column": 39
         }
       }
     },
     {
       "type": {
-        "label": "(",
-        "beforeExpr": true,
+        "label": "name",
+        "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
@@ -14484,74 +16995,78 @@
         "postfix": false,
         "binop": null
       },
-      "start": 2186,
-      "end": 2187,
+      "value": "name",
+      "start": 2788,
+      "end": 2792,
       "loc": {
         "start": {
-          "line": 91,
-          "column": 5
+          "line": 117,
+          "column": 39
         },
         "end": {
-          "line": 91,
-          "column": 6
+          "line": 117,
+          "column": 43
         }
       }
     },
     {
       "type": {
-        "label": "name",
+        "label": "]",
         "beforeExpr": false,
-        "startsExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "value": "isFunction",
-      "start": 2187,
-      "end": 2197,
+      "start": 2792,
+      "end": 2793,
       "loc": {
         "start": {
-          "line": 91,
-          "column": 6
+          "line": 117,
+          "column": 43
         },
         "end": {
-          "line": 91,
-          "column": 16
+          "line": 117,
+          "column": 44
         }
       }
     },
     {
       "type": {
-        "label": "(",
-        "beforeExpr": true,
-        "startsExpr": true,
+        "label": "for",
+        "keyword": "for",
+        "beforeExpr": false,
+        "startsExpr": false,
         "rightAssociative": false,
-        "isLoop": false,
+        "isLoop": true,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "start": 2197,
-      "end": 2198,
+      "value": "for",
+      "start": 2797,
+      "end": 2800,
       "loc": {
         "start": {
-          "line": 91,
-          "column": 16
+          "line": 118,
+          "column": 3
         },
         "end": {
-          "line": 91,
-          "column": 17
+          "line": 118,
+          "column": 6
         }
       }
     },
     {
       "type": {
-        "label": "name",
-        "beforeExpr": false,
+        "label": "(",
+        "beforeExpr": true,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
@@ -14560,23 +17075,23 @@
         "postfix": false,
         "binop": null
       },
-      "value": "componentClass",
-      "start": 2198,
-      "end": 2212,
+      "start": 2801,
+      "end": 2802,
       "loc": {
         "start": {
-          "line": 91,
-          "column": 17
+          "line": 118,
+          "column": 7
         },
         "end": {
-          "line": 91,
-          "column": 31
+          "line": 118,
+          "column": 8
         }
       }
     },
     {
       "type": {
-        "label": ")",
+        "label": "let",
+        "keyword": "let",
         "beforeExpr": false,
         "startsExpr": false,
         "rightAssociative": false,
@@ -14584,26 +17099,28 @@
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "start": 2212,
-      "end": 2213,
+      "value": "let",
+      "start": 2802,
+      "end": 2805,
       "loc": {
         "start": {
-          "line": 91,
-          "column": 31
+          "line": 118,
+          "column": 8
         },
         "end": {
-          "line": 91,
-          "column": 32
+          "line": 118,
+          "column": 11
         }
       }
     },
     {
       "type": {
-        "label": ")",
+        "label": "name",
         "beforeExpr": false,
-        "startsExpr": false,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -14611,48 +17128,51 @@
         "postfix": false,
         "binop": null
       },
-      "start": 2213,
-      "end": 2214,
+      "value": "componentName",
+      "start": 2806,
+      "end": 2819,
       "loc": {
         "start": {
-          "line": 91,
-          "column": 32
+          "line": 118,
+          "column": 12
         },
         "end": {
-          "line": 91,
-          "column": 33
+          "line": 118,
+          "column": 25
         }
       }
     },
     {
       "type": {
-        "label": "{",
+        "label": "in",
+        "keyword": "in",
         "beforeExpr": true,
-        "startsExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": 7,
+        "updateContext": null
       },
-      "start": 2215,
-      "end": 2216,
+      "value": "in",
+      "start": 2820,
+      "end": 2822,
       "loc": {
         "start": {
-          "line": 91,
-          "column": 34
+          "line": 118,
+          "column": 26
         },
         "end": {
-          "line": 91,
-          "column": 35
+          "line": 118,
+          "column": 28
         }
       }
     },
     {
       "type": {
-        "label": "this",
-        "keyword": "this",
+        "label": "name",
         "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
@@ -14660,26 +17180,25 @@
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "value": "this",
-      "start": 2220,
-      "end": 2224,
+      "value": "template",
+      "start": 2823,
+      "end": 2831,
       "loc": {
         "start": {
-          "line": 92,
-          "column": 3
+          "line": 118,
+          "column": 29
         },
         "end": {
-          "line": 92,
-          "column": 7
+          "line": 118,
+          "column": 37
         }
       }
     },
     {
       "type": {
-        "label": ".",
+        "label": ")",
         "beforeExpr": false,
         "startsExpr": false,
         "rightAssociative": false,
@@ -14687,26 +17206,25 @@
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "start": 2224,
-      "end": 2225,
+      "start": 2831,
+      "end": 2832,
       "loc": {
         "start": {
-          "line": 92,
-          "column": 7
+          "line": 118,
+          "column": 37
         },
         "end": {
-          "line": 92,
-          "column": 8
+          "line": 118,
+          "column": 38
         }
       }
     },
     {
       "type": {
-        "label": "name",
-        "beforeExpr": false,
+        "label": "{",
+        "beforeExpr": true,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
@@ -14715,94 +17233,85 @@
         "postfix": false,
         "binop": null
       },
-      "value": "components",
-      "start": 2225,
-      "end": 2235,
+      "start": 2833,
+      "end": 2834,
       "loc": {
         "start": {
-          "line": 92,
-          "column": 8
+          "line": 118,
+          "column": 39
         },
         "end": {
-          "line": 92,
-          "column": 18
+          "line": 118,
+          "column": 40
         }
       }
     },
     {
-      "type": {
-        "label": "[",
-        "beforeExpr": true,
-        "startsExpr": true,
-        "rightAssociative": false,
-        "isLoop": false,
-        "isAssign": false,
-        "prefix": false,
-        "postfix": false,
-        "binop": null,
-        "updateContext": null
-      },
-      "start": 2235,
-      "end": 2236,
+      "type": "CommentLine",
+      "value": " Update component with data from template",
+      "start": 2839,
+      "end": 2882,
       "loc": {
         "start": {
-          "line": 92,
-          "column": 18
+          "line": 119,
+          "column": 4
         },
         "end": {
-          "line": 92,
-          "column": 19
+          "line": 119,
+          "column": 47
         }
       }
     },
     {
       "type": {
-        "label": "name",
+        "label": "let",
+        "keyword": "let",
         "beforeExpr": false,
-        "startsExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "value": "name",
-      "start": 2236,
-      "end": 2240,
+      "value": "let",
+      "start": 2887,
+      "end": 2890,
       "loc": {
         "start": {
-          "line": 92,
-          "column": 19
+          "line": 120,
+          "column": 4
         },
         "end": {
-          "line": 92,
-          "column": 23
+          "line": 120,
+          "column": 7
         }
       }
     },
     {
       "type": {
-        "label": "]",
+        "label": "name",
         "beforeExpr": false,
-        "startsExpr": false,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "start": 2240,
-      "end": 2241,
+      "value": "newComponentData",
+      "start": 2891,
+      "end": 2907,
       "loc": {
         "start": {
-          "line": 92,
-          "column": 23
+          "line": 120,
+          "column": 8
         },
         "end": {
-          "line": 92,
+          "line": 120,
           "column": 24
         }
       }
@@ -14821,15 +17330,15 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 2242,
-      "end": 2243,
+      "start": 2908,
+      "end": 2909,
       "loc": {
         "start": {
-          "line": 92,
+          "line": 120,
           "column": 25
         },
         "end": {
-          "line": 92,
+          "line": 120,
           "column": 26
         }
       }
@@ -14846,25 +17355,24 @@
         "postfix": false,
         "binop": null
       },
-      "value": "componentClass",
-      "start": 2244,
-      "end": 2258,
+      "value": "JSON",
+      "start": 2910,
+      "end": 2914,
       "loc": {
         "start": {
-          "line": 92,
+          "line": 120,
           "column": 27
         },
         "end": {
-          "line": 92,
-          "column": 41
+          "line": 120,
+          "column": 31
         }
       }
     },
     {
       "type": {
-        "label": "return",
-        "keyword": "return",
-        "beforeExpr": true,
+        "label": ".",
+        "beforeExpr": false,
         "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
@@ -14874,17 +17382,16 @@
         "binop": null,
         "updateContext": null
       },
-      "value": "return",
-      "start": 2262,
-      "end": 2268,
+      "start": 2914,
+      "end": 2915,
       "loc": {
         "start": {
-          "line": 93,
-          "column": 3
+          "line": 120,
+          "column": 31
         },
         "end": {
-          "line": 93,
-          "column": 9
+          "line": 120,
+          "column": 32
         }
       }
     },
@@ -14900,25 +17407,25 @@
         "postfix": false,
         "binop": null
       },
-      "value": "name",
-      "start": 2269,
-      "end": 2273,
+      "value": "parse",
+      "start": 2915,
+      "end": 2920,
       "loc": {
         "start": {
-          "line": 93,
-          "column": 10
+          "line": 120,
+          "column": 32
         },
         "end": {
-          "line": 93,
-          "column": 14
+          "line": 120,
+          "column": 37
         }
       }
     },
     {
       "type": {
-        "label": "}",
-        "beforeExpr": false,
-        "startsExpr": false,
+        "label": "(",
+        "beforeExpr": true,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -14926,24 +17433,24 @@
         "postfix": false,
         "binop": null
       },
-      "start": 2276,
-      "end": 2277,
+      "start": 2920,
+      "end": 2921,
       "loc": {
         "start": {
-          "line": 94,
-          "column": 2
+          "line": 120,
+          "column": 37
         },
         "end": {
-          "line": 94,
-          "column": 3
+          "line": 120,
+          "column": 38
         }
       }
     },
     {
       "type": {
-        "label": "}",
+        "label": "name",
         "beforeExpr": false,
-        "startsExpr": false,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -14951,32 +17458,43 @@
         "postfix": false,
         "binop": null
       },
-      "start": 2279,
-      "end": 2280,
+      "value": "template",
+      "start": 2921,
+      "end": 2929,
       "loc": {
         "start": {
-          "line": 95,
-          "column": 1
+          "line": 120,
+          "column": 38
         },
         "end": {
-          "line": 95,
-          "column": 2
+          "line": 120,
+          "column": 46
         }
       }
     },
     {
-      "type": "CommentBlock",
-      "value": "*\n\t * Creates a new entity in the world\n\t *\n\t * @param {string} [name] - The prototype name to use\n\t *\n\t * @example\n\t * world.entity()\n\t *\n\t * @example\n\t * world.entity('Player')\n\t *\n\t * @return {Entity} The new entity created\n\t ",
-      "start": 2283,
-      "end": 2516,
+      "type": {
+        "label": "[",
+        "beforeExpr": true,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "start": 2929,
+      "end": 2930,
       "loc": {
         "start": {
-          "line": 97,
-          "column": 1
+          "line": 120,
+          "column": 46
         },
         "end": {
-          "line": 109,
-          "column": 4
+          "line": 120,
+          "column": 47
         }
       }
     },
@@ -14992,25 +17510,51 @@
         "postfix": false,
         "binop": null
       },
-      "value": "entity",
-      "start": 2518,
-      "end": 2524,
+      "value": "componentName",
+      "start": 2930,
+      "end": 2943,
       "loc": {
         "start": {
-          "line": 110,
-          "column": 1
+          "line": 120,
+          "column": 47
+        },
+        "end": {
+          "line": 120,
+          "column": 60
+        }
+      }
+    },
+    {
+      "type": {
+        "label": "]",
+        "beforeExpr": false,
+        "startsExpr": false,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null,
+        "updateContext": null
+      },
+      "start": 2943,
+      "end": 2944,
+      "loc": {
+        "start": {
+          "line": 120,
+          "column": 60
         },
         "end": {
-          "line": 110,
-          "column": 7
+          "line": 120,
+          "column": 61
         }
       }
     },
     {
       "type": {
-        "label": "(",
-        "beforeExpr": true,
-        "startsExpr": true,
+        "label": ")",
+        "beforeExpr": false,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -15018,16 +17562,16 @@
         "postfix": false,
         "binop": null
       },
-      "start": 2524,
-      "end": 2525,
+      "start": 2944,
+      "end": 2945,
       "loc": {
         "start": {
-          "line": 110,
-          "column": 7
+          "line": 120,
+          "column": 61
         },
         "end": {
-          "line": 110,
-          "column": 8
+          "line": 120,
+          "column": 62
         }
       }
     },
@@ -15043,23 +17587,23 @@
         "postfix": false,
         "binop": null
       },
-      "value": "name",
-      "start": 2525,
-      "end": 2529,
+      "value": "entity",
+      "start": 2950,
+      "end": 2956,
       "loc": {
         "start": {
-          "line": 110,
-          "column": 8
+          "line": 121,
+          "column": 4
         },
         "end": {
-          "line": 110,
-          "column": 12
+          "line": 121,
+          "column": 10
         }
       }
     },
     {
       "type": {
-        "label": ")",
+        "label": ".",
         "beforeExpr": false,
         "startsExpr": false,
         "rightAssociative": false,
@@ -15067,25 +17611,26 @@
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "start": 2529,
-      "end": 2530,
+      "start": 2956,
+      "end": 2957,
       "loc": {
         "start": {
-          "line": 110,
-          "column": 12
+          "line": 121,
+          "column": 10
         },
         "end": {
-          "line": 110,
-          "column": 13
+          "line": 121,
+          "column": 11
         }
       }
     },
     {
       "type": {
-        "label": "{",
-        "beforeExpr": true,
+        "label": "name",
+        "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
@@ -15094,44 +17639,42 @@
         "postfix": false,
         "binop": null
       },
-      "start": 2531,
-      "end": 2532,
+      "value": "update",
+      "start": 2957,
+      "end": 2963,
       "loc": {
         "start": {
-          "line": 110,
-          "column": 14
+          "line": 121,
+          "column": 11
         },
         "end": {
-          "line": 110,
-          "column": 15
+          "line": 121,
+          "column": 17
         }
       }
     },
     {
       "type": {
-        "label": "let",
-        "keyword": "let",
-        "beforeExpr": false,
-        "startsExpr": false,
+        "label": "(",
+        "beforeExpr": true,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "value": "let",
-      "start": 2535,
-      "end": 2538,
+      "start": 2963,
+      "end": 2964,
       "loc": {
         "start": {
-          "line": 111,
-          "column": 2
+          "line": 121,
+          "column": 17
         },
         "end": {
-          "line": 111,
-          "column": 5
+          "line": 121,
+          "column": 18
         }
       }
     },
@@ -15147,51 +17690,49 @@
         "postfix": false,
         "binop": null
       },
-      "value": "entityId",
-      "start": 2539,
-      "end": 2547,
+      "value": "componentName",
+      "start": 2964,
+      "end": 2977,
       "loc": {
         "start": {
-          "line": 111,
-          "column": 6
+          "line": 121,
+          "column": 18
         },
         "end": {
-          "line": 111,
-          "column": 14
+          "line": 121,
+          "column": 31
         }
       }
     },
     {
       "type": {
-        "label": "=",
+        "label": ",",
         "beforeExpr": true,
         "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
-        "isAssign": true,
+        "isAssign": false,
         "prefix": false,
         "postfix": false,
         "binop": null,
         "updateContext": null
       },
-      "value": "=",
-      "start": 2548,
-      "end": 2549,
+      "start": 2977,
+      "end": 2978,
       "loc": {
         "start": {
-          "line": 111,
-          "column": 15
+          "line": 121,
+          "column": 31
         },
         "end": {
-          "line": 111,
-          "column": 16
+          "line": 121,
+          "column": 32
         }
       }
     },
     {
       "type": {
-        "label": "this",
-        "keyword": "this",
+        "label": "name",
         "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
@@ -15199,26 +17740,25 @@
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "value": "this",
-      "start": 2550,
-      "end": 2554,
+      "value": "newComponentData",
+      "start": 2979,
+      "end": 2995,
       "loc": {
         "start": {
-          "line": 111,
-          "column": 17
+          "line": 121,
+          "column": 33
         },
         "end": {
-          "line": 111,
-          "column": 21
+          "line": 121,
+          "column": 49
         }
       }
     },
     {
       "type": {
-        "label": ".",
+        "label": ")",
         "beforeExpr": false,
         "startsExpr": false,
         "rightAssociative": false,
@@ -15226,27 +17766,26 @@
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "start": 2554,
-      "end": 2555,
+      "start": 2995,
+      "end": 2996,
       "loc": {
         "start": {
-          "line": 111,
-          "column": 21
+          "line": 121,
+          "column": 49
         },
         "end": {
-          "line": 111,
-          "column": 22
+          "line": 121,
+          "column": 50
         }
       }
     },
     {
       "type": {
-        "label": "name",
+        "label": "}",
         "beforeExpr": false,
-        "startsExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -15254,52 +17793,50 @@
         "postfix": false,
         "binop": null
       },
-      "value": "idCounter",
-      "start": 2555,
-      "end": 2564,
+      "start": 3000,
+      "end": 3001,
       "loc": {
         "start": {
-          "line": 111,
-          "column": 22
+          "line": 122,
+          "column": 3
         },
         "end": {
-          "line": 111,
-          "column": 31
+          "line": 122,
+          "column": 4
         }
       }
     },
     {
       "type": {
-        "label": "++/--",
+        "label": "}",
         "beforeExpr": false,
-        "startsExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
-        "prefix": true,
-        "postfix": true,
+        "prefix": false,
+        "postfix": false,
         "binop": null
       },
-      "value": "++",
-      "start": 2564,
-      "end": 2566,
+      "start": 3004,
+      "end": 3005,
       "loc": {
         "start": {
-          "line": 111,
-          "column": 31
+          "line": 123,
+          "column": 2
         },
         "end": {
-          "line": 111,
-          "column": 33
+          "line": 123,
+          "column": 3
         }
       }
     },
     {
       "type": {
-        "label": "let",
-        "keyword": "let",
+        "label": "this",
+        "keyword": "this",
         "beforeExpr": false,
-        "startsExpr": false,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -15308,79 +17845,77 @@
         "binop": null,
         "updateContext": null
       },
-      "value": "let",
-      "start": 2569,
-      "end": 2572,
+      "value": "this",
+      "start": 3009,
+      "end": 3013,
       "loc": {
         "start": {
-          "line": 112,
+          "line": 125,
           "column": 2
         },
         "end": {
-          "line": 112,
-          "column": 5
+          "line": 125,
+          "column": 6
         }
       }
     },
     {
       "type": {
-        "label": "name",
+        "label": ".",
         "beforeExpr": false,
-        "startsExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "value": "entity",
-      "start": 2573,
-      "end": 2579,
+      "start": 3013,
+      "end": 3014,
       "loc": {
         "start": {
-          "line": 112,
+          "line": 125,
           "column": 6
         },
         "end": {
-          "line": 112,
-          "column": 12
+          "line": 125,
+          "column": 7
         }
       }
     },
     {
       "type": {
-        "label": "=",
-        "beforeExpr": true,
-        "startsExpr": false,
+        "label": "name",
+        "beforeExpr": false,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
-        "isAssign": true,
+        "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "value": "=",
-      "start": 2580,
-      "end": 2581,
+      "value": "entities",
+      "start": 3014,
+      "end": 3022,
       "loc": {
         "start": {
-          "line": 112,
-          "column": 13
+          "line": 125,
+          "column": 7
         },
         "end": {
-          "line": 112,
-          "column": 14
+          "line": 125,
+          "column": 15
         }
       }
     },
     {
       "type": {
-        "label": "new",
-        "keyword": "new",
-        "beforeExpr": true,
-        "startsExpr": true,
+        "label": ".",
+        "beforeExpr": false,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -15389,17 +17924,16 @@
         "binop": null,
         "updateContext": null
       },
-      "value": "new",
-      "start": 2582,
-      "end": 2585,
+      "start": 3022,
+      "end": 3023,
       "loc": {
         "start": {
-          "line": 112,
+          "line": 125,
           "column": 15
         },
         "end": {
-          "line": 112,
-          "column": 18
+          "line": 125,
+          "column": 16
         }
       }
     },
@@ -15415,17 +17949,17 @@
         "postfix": false,
         "binop": null
       },
-      "value": "Entity",
-      "start": 2586,
-      "end": 2592,
+      "value": "set",
+      "start": 3023,
+      "end": 3026,
       "loc": {
         "start": {
-          "line": 112,
-          "column": 19
+          "line": 125,
+          "column": 16
         },
         "end": {
-          "line": 112,
-          "column": 25
+          "line": 125,
+          "column": 19
         }
       }
     },
@@ -15441,23 +17975,22 @@
         "postfix": false,
         "binop": null
       },
-      "start": 2592,
-      "end": 2593,
+      "start": 3026,
+      "end": 3027,
       "loc": {
         "start": {
-          "line": 112,
-          "column": 25
+          "line": 125,
+          "column": 19
         },
         "end": {
-          "line": 112,
-          "column": 26
+          "line": 125,
+          "column": 20
         }
       }
     },
     {
       "type": {
-        "label": "this",
-        "keyword": "this",
+        "label": "name",
         "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
@@ -15465,20 +17998,19 @@
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "value": "this",
-      "start": 2593,
-      "end": 2597,
+      "value": "entityId",
+      "start": 3027,
+      "end": 3035,
       "loc": {
         "start": {
-          "line": 112,
-          "column": 26
+          "line": 125,
+          "column": 20
         },
         "end": {
-          "line": 112,
-          "column": 30
+          "line": 125,
+          "column": 28
         }
       }
     },
@@ -15495,16 +18027,16 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 2597,
-      "end": 2598,
+      "start": 3035,
+      "end": 3036,
       "loc": {
         "start": {
-          "line": 112,
-          "column": 30
+          "line": 125,
+          "column": 28
         },
         "end": {
-          "line": 112,
-          "column": 31
+          "line": 125,
+          "column": 29
         }
       }
     },
@@ -15520,17 +18052,17 @@
         "postfix": false,
         "binop": null
       },
-      "value": "entityId",
-      "start": 2599,
-      "end": 2607,
+      "value": "entity",
+      "start": 3037,
+      "end": 3043,
       "loc": {
         "start": {
-          "line": 112,
-          "column": 32
+          "line": 125,
+          "column": 30
         },
         "end": {
-          "line": 112,
-          "column": 40
+          "line": 125,
+          "column": 36
         }
       }
     },
@@ -15546,40 +18078,24 @@
         "postfix": false,
         "binop": null
       },
-      "start": 2607,
-      "end": 2608,
-      "loc": {
-        "start": {
-          "line": 112,
-          "column": 40
-        },
-        "end": {
-          "line": 112,
-          "column": 41
-        }
-      }
-    },
-    {
-      "type": "CommentLine",
-      "value": " Use 'name' to get prototype data (if specified)",
-      "start": 2612,
-      "end": 2662,
+      "start": 3043,
+      "end": 3044,
       "loc": {
         "start": {
-          "line": 114,
-          "column": 2
+          "line": 125,
+          "column": 36
         },
         "end": {
-          "line": 114,
-          "column": 52
+          "line": 125,
+          "column": 37
         }
       }
     },
     {
       "type": {
-        "label": "if",
-        "keyword": "if",
-        "beforeExpr": false,
+        "label": "return",
+        "keyword": "return",
+        "beforeExpr": true,
         "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
@@ -15589,24 +18105,24 @@
         "binop": null,
         "updateContext": null
       },
-      "value": "if",
-      "start": 2665,
-      "end": 2667,
+      "value": "return",
+      "start": 3047,
+      "end": 3053,
       "loc": {
         "start": {
-          "line": 115,
+          "line": 126,
           "column": 2
         },
         "end": {
-          "line": 115,
-          "column": 4
+          "line": 126,
+          "column": 8
         }
       }
     },
     {
       "type": {
-        "label": "(",
-        "beforeExpr": true,
+        "label": "name",
+        "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
@@ -15615,24 +18131,25 @@
         "postfix": false,
         "binop": null
       },
-      "start": 2668,
-      "end": 2669,
+      "value": "entity",
+      "start": 3054,
+      "end": 3060,
       "loc": {
         "start": {
-          "line": 115,
-          "column": 5
+          "line": 126,
+          "column": 9
         },
         "end": {
-          "line": 115,
-          "column": 6
+          "line": 126,
+          "column": 15
         }
       }
     },
     {
       "type": {
-        "label": "name",
+        "label": "}",
         "beforeExpr": false,
-        "startsExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -15640,44 +18157,32 @@
         "postfix": false,
         "binop": null
       },
-      "value": "name",
-      "start": 2669,
-      "end": 2673,
+      "start": 3062,
+      "end": 3063,
       "loc": {
         "start": {
-          "line": 115,
-          "column": 6
+          "line": 127,
+          "column": 1
         },
         "end": {
-          "line": 115,
-          "column": 10
+          "line": 127,
+          "column": 2
         }
       }
     },
     {
-      "type": {
-        "label": "&&",
-        "beforeExpr": true,
-        "startsExpr": false,
-        "rightAssociative": false,
-        "isLoop": false,
-        "isAssign": false,
-        "prefix": false,
-        "postfix": false,
-        "binop": 2,
-        "updateContext": null
-      },
-      "value": "&&",
-      "start": 2674,
-      "end": 2676,
+      "type": "CommentBlock",
+      "value": "*\n\t * Registers a system to the world.\n\t * The order the systems get registered, is the order then run in.\n\t *\n\t * @example\n\t * // Movement system\n\t * world.system(['position', 'velocity'], class {\n\t *      constructor(context) {\n\t *          // This is showing how you can optionally pass parameters to the system's constructor\n\t *          this.context = context\n\t *      }\n\t *      every(position, velocity, entity) {\n\t *          position.x += velocity.x\n\t *          position.y += velocity.y\n\t *      }\n\t *  }, context)\n\t *\n\t * @example\n\t * // System that doesn't use every()\n\t * world.system(class {\n\t *      constructor(context) {\n\t *          this.context = context\n\t *      }\n\t *      pre() {\n\t *          // Handle events or something\n\t *      }\n\t *  }, context)\n\t *\n\t * @param {...Object} args - Both signatures are accepted: (components, systemClass, ...args) or (systemClass, ...args).\n\t *\n\t * **[components]**: The list of components the system will process in every(). This follows the same logic as entity.has() and world.every().\n\t *\n\t * **{systemClass}**: The system class to instantiate. Can contain the following methods: constructor, initialize, pre, every, post. Pre() and post() get called before and after every(), for each of the independent systems. See world.run() for an example of the call order.\n\t *\n\t * **[...args]**: The arguments to forward to the system's constructors.\n\t *\n\t * @return {number} Unique ID of the system on success or undefined on failure\n\t ",
+      "start": 3066,
+      "end": 4560,
       "loc": {
         "start": {
-          "line": 115,
-          "column": 11
+          "line": 129,
+          "column": 1
         },
         "end": {
-          "line": 115,
-          "column": 13
+          "line": 166,
+          "column": 4
         }
       }
     },
@@ -15693,80 +18198,49 @@
         "postfix": false,
         "binop": null
       },
-      "value": "name",
-      "start": 2677,
-      "end": 2681,
+      "value": "system",
+      "start": 4562,
+      "end": 4568,
       "loc": {
         "start": {
-          "line": 115,
-          "column": 14
+          "line": 167,
+          "column": 1
         },
         "end": {
-          "line": 115,
-          "column": 18
+          "line": 167,
+          "column": 7
         }
       }
     },
     {
       "type": {
-        "label": "in",
-        "keyword": "in",
+        "label": "(",
         "beforeExpr": true,
-        "startsExpr": false,
-        "rightAssociative": false,
-        "isLoop": false,
-        "isAssign": false,
-        "prefix": false,
-        "postfix": false,
-        "binop": 7,
-        "updateContext": null
-      },
-      "value": "in",
-      "start": 2682,
-      "end": 2684,
-      "loc": {
-        "start": {
-          "line": 115,
-          "column": 19
-        },
-        "end": {
-          "line": 115,
-          "column": 21
-        }
-      }
-    },
-    {
-      "type": {
-        "label": "this",
-        "keyword": "this",
-        "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "value": "this",
-      "start": 2685,
-      "end": 2689,
+      "start": 4568,
+      "end": 4569,
       "loc": {
         "start": {
-          "line": 115,
-          "column": 22
+          "line": 167,
+          "column": 7
         },
         "end": {
-          "line": 115,
-          "column": 26
+          "line": 167,
+          "column": 8
         }
       }
     },
     {
       "type": {
-        "label": ".",
-        "beforeExpr": false,
+        "label": "...",
+        "beforeExpr": true,
         "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
@@ -15776,16 +18250,16 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 2689,
-      "end": 2690,
+      "start": 4569,
+      "end": 4572,
       "loc": {
         "start": {
-          "line": 115,
-          "column": 26
+          "line": 167,
+          "column": 8
         },
         "end": {
-          "line": 115,
-          "column": 27
+          "line": 167,
+          "column": 11
         }
       }
     },
@@ -15801,17 +18275,17 @@
         "postfix": false,
         "binop": null
       },
-      "value": "entityTemplates",
-      "start": 2690,
-      "end": 2705,
+      "value": "args",
+      "start": 4572,
+      "end": 4576,
       "loc": {
         "start": {
-          "line": 115,
-          "column": 27
+          "line": 167,
+          "column": 11
         },
         "end": {
-          "line": 115,
-          "column": 42
+          "line": 167,
+          "column": 15
         }
       }
     },
@@ -15827,16 +18301,16 @@
         "postfix": false,
         "binop": null
       },
-      "start": 2705,
-      "end": 2706,
+      "start": 4576,
+      "end": 4577,
       "loc": {
         "start": {
-          "line": 115,
-          "column": 42
+          "line": 167,
+          "column": 15
         },
         "end": {
-          "line": 115,
-          "column": 43
+          "line": 167,
+          "column": 16
         }
       }
     },
@@ -15852,32 +18326,32 @@
         "postfix": false,
         "binop": null
       },
-      "start": 2707,
-      "end": 2708,
+      "start": 4578,
+      "end": 4579,
       "loc": {
         "start": {
-          "line": 115,
-          "column": 44
+          "line": 167,
+          "column": 17
         },
         "end": {
-          "line": 115,
-          "column": 45
+          "line": 167,
+          "column": 18
         }
       }
     },
     {
       "type": "CommentLine",
-      "value": " Add all components from prototype",
-      "start": 2712,
-      "end": 2748,
+      "value": " Get components and systemClass from arguments",
+      "start": 4582,
+      "end": 4630,
       "loc": {
         "start": {
-          "line": 116,
-          "column": 3
+          "line": 168,
+          "column": 2
         },
         "end": {
-          "line": 116,
-          "column": 39
+          "line": 168,
+          "column": 50
         }
       }
     },
@@ -15896,16 +18370,16 @@
         "updateContext": null
       },
       "value": "let",
-      "start": 2752,
-      "end": 2755,
+      "start": 4633,
+      "end": 4636,
       "loc": {
         "start": {
-          "line": 117,
-          "column": 3
+          "line": 169,
+          "column": 2
         },
         "end": {
-          "line": 117,
-          "column": 6
+          "line": 169,
+          "column": 5
         }
       }
     },
@@ -15921,17 +18395,17 @@
         "postfix": false,
         "binop": null
       },
-      "value": "template",
-      "start": 2756,
-      "end": 2764,
+      "value": "components",
+      "start": 4637,
+      "end": 4647,
       "loc": {
         "start": {
-          "line": 117,
-          "column": 7
+          "line": 169,
+          "column": 6
         },
         "end": {
-          "line": 117,
-          "column": 15
+          "line": 169,
+          "column": 16
         }
       }
     },
@@ -15949,24 +18423,23 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 2765,
-      "end": 2766,
+      "start": 4648,
+      "end": 4649,
       "loc": {
         "start": {
-          "line": 117,
-          "column": 16
+          "line": 169,
+          "column": 17
         },
         "end": {
-          "line": 117,
-          "column": 17
+          "line": 169,
+          "column": 18
         }
       }
     },
     {
       "type": {
-        "label": "this",
-        "keyword": "this",
-        "beforeExpr": false,
+        "label": "[",
+        "beforeExpr": true,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
@@ -15976,23 +18449,22 @@
         "binop": null,
         "updateContext": null
       },
-      "value": "this",
-      "start": 2767,
-      "end": 2771,
+      "start": 4650,
+      "end": 4651,
       "loc": {
         "start": {
-          "line": 117,
-          "column": 18
+          "line": 169,
+          "column": 19
         },
         "end": {
-          "line": 117,
-          "column": 22
+          "line": 169,
+          "column": 20
         }
       }
     },
     {
       "type": {
-        "label": ".",
+        "label": "]",
         "beforeExpr": false,
         "startsExpr": false,
         "rightAssociative": false,
@@ -16003,50 +18475,25 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 2771,
-      "end": 2772,
+      "start": 4651,
+      "end": 4652,
       "loc": {
         "start": {
-          "line": 117,
-          "column": 22
+          "line": 169,
+          "column": 20
         },
         "end": {
-          "line": 117,
-          "column": 23
+          "line": 169,
+          "column": 21
         }
       }
     },
     {
       "type": {
-        "label": "name",
+        "label": "let",
+        "keyword": "let",
         "beforeExpr": false,
-        "startsExpr": true,
-        "rightAssociative": false,
-        "isLoop": false,
-        "isAssign": false,
-        "prefix": false,
-        "postfix": false,
-        "binop": null
-      },
-      "value": "entityTemplates",
-      "start": 2772,
-      "end": 2787,
-      "loc": {
-        "start": {
-          "line": 117,
-          "column": 23
-        },
-        "end": {
-          "line": 117,
-          "column": 38
-        }
-      }
-    },
-    {
-      "type": {
-        "label": "[",
-        "beforeExpr": true,
-        "startsExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -16055,16 +18502,17 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 2787,
-      "end": 2788,
+      "value": "let",
+      "start": 4655,
+      "end": 4658,
       "loc": {
         "start": {
-          "line": 117,
-          "column": 38
+          "line": 170,
+          "column": 2
         },
         "end": {
-          "line": 117,
-          "column": 39
+          "line": 170,
+          "column": 5
         }
       }
     },
@@ -16080,24 +18528,24 @@
         "postfix": false,
         "binop": null
       },
-      "value": "name",
-      "start": 2788,
-      "end": 2792,
+      "value": "systemClass",
+      "start": 4659,
+      "end": 4670,
       "loc": {
         "start": {
-          "line": 117,
-          "column": 39
+          "line": 170,
+          "column": 6
         },
         "end": {
-          "line": 117,
-          "column": 43
+          "line": 170,
+          "column": 17
         }
       }
     },
     {
       "type": {
-        "label": "]",
-        "beforeExpr": false,
+        "label": ",",
+        "beforeExpr": true,
         "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
@@ -16107,51 +18555,23 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 2792,
-      "end": 2793,
+      "start": 4670,
+      "end": 4671,
       "loc": {
         "start": {
-          "line": 117,
-          "column": 43
+          "line": 170,
+          "column": 17
         },
         "end": {
-          "line": 117,
-          "column": 44
+          "line": 170,
+          "column": 18
         }
       }
     },
     {
       "type": {
-        "label": "for",
-        "keyword": "for",
+        "label": "name",
         "beforeExpr": false,
-        "startsExpr": false,
-        "rightAssociative": false,
-        "isLoop": true,
-        "isAssign": false,
-        "prefix": false,
-        "postfix": false,
-        "binop": null,
-        "updateContext": null
-      },
-      "value": "for",
-      "start": 2797,
-      "end": 2800,
-      "loc": {
-        "start": {
-          "line": 118,
-          "column": 3
-        },
-        "end": {
-          "line": 118,
-          "column": 6
-        }
-      }
-    },
-    {
-      "type": {
-        "label": "(",
-        "beforeExpr": true,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
@@ -16160,23 +18580,24 @@
         "postfix": false,
         "binop": null
       },
-      "start": 2801,
-      "end": 2802,
+      "value": "rest",
+      "start": 4672,
+      "end": 4676,
       "loc": {
         "start": {
-          "line": 118,
-          "column": 7
+          "line": 170,
+          "column": 19
         },
         "end": {
-          "line": 118,
-          "column": 8
+          "line": 170,
+          "column": 23
         }
       }
     },
     {
       "type": {
-        "label": "let",
-        "keyword": "let",
+        "label": "if",
+        "keyword": "if",
         "beforeExpr": false,
         "startsExpr": false,
         "rightAssociative": false,
@@ -16187,24 +18608,24 @@
         "binop": null,
         "updateContext": null
       },
-      "value": "let",
-      "start": 2802,
-      "end": 2805,
+      "value": "if",
+      "start": 4679,
+      "end": 4681,
       "loc": {
         "start": {
-          "line": 118,
-          "column": 8
+          "line": 171,
+          "column": 2
         },
         "end": {
-          "line": 118,
-          "column": 11
+          "line": 171,
+          "column": 4
         }
       }
     },
     {
       "type": {
-        "label": "name",
-        "beforeExpr": false,
+        "label": "(",
+        "beforeExpr": true,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
@@ -16212,46 +18633,17 @@
         "prefix": false,
         "postfix": false,
         "binop": null
-      },
-      "value": "componentName",
-      "start": 2806,
-      "end": 2819,
-      "loc": {
-        "start": {
-          "line": 118,
-          "column": 12
-        },
-        "end": {
-          "line": 118,
-          "column": 25
-        }
-      }
-    },
-    {
-      "type": {
-        "label": "in",
-        "keyword": "in",
-        "beforeExpr": true,
-        "startsExpr": false,
-        "rightAssociative": false,
-        "isLoop": false,
-        "isAssign": false,
-        "prefix": false,
-        "postfix": false,
-        "binop": 7,
-        "updateContext": null
-      },
-      "value": "in",
-      "start": 2820,
-      "end": 2822,
+      },
+      "start": 4682,
+      "end": 4683,
       "loc": {
         "start": {
-          "line": 118,
-          "column": 26
+          "line": 171,
+          "column": 5
         },
         "end": {
-          "line": 118,
-          "column": 28
+          "line": 171,
+          "column": 6
         }
       }
     },
@@ -16267,23 +18659,23 @@
         "postfix": false,
         "binop": null
       },
-      "value": "template",
-      "start": 2823,
-      "end": 2831,
+      "value": "Array",
+      "start": 4683,
+      "end": 4688,
       "loc": {
         "start": {
-          "line": 118,
-          "column": 29
+          "line": 171,
+          "column": 6
         },
         "end": {
-          "line": 118,
-          "column": 37
+          "line": 171,
+          "column": 11
         }
       }
     },
     {
       "type": {
-        "label": ")",
+        "label": ".",
         "beforeExpr": false,
         "startsExpr": false,
         "rightAssociative": false,
@@ -16291,25 +18683,26 @@
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "start": 2831,
-      "end": 2832,
+      "start": 4688,
+      "end": 4689,
       "loc": {
         "start": {
-          "line": 118,
-          "column": 37
+          "line": 171,
+          "column": 11
         },
         "end": {
-          "line": 118,
-          "column": 38
+          "line": 171,
+          "column": 12
         }
       }
     },
     {
       "type": {
-        "label": "{",
-        "beforeExpr": true,
+        "label": "name",
+        "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
@@ -16318,60 +18711,42 @@
         "postfix": false,
         "binop": null
       },
-      "start": 2833,
-      "end": 2834,
-      "loc": {
-        "start": {
-          "line": 118,
-          "column": 39
-        },
-        "end": {
-          "line": 118,
-          "column": 40
-        }
-      }
-    },
-    {
-      "type": "CommentLine",
-      "value": " Update component with data from template",
-      "start": 2839,
-      "end": 2882,
+      "value": "isArray",
+      "start": 4689,
+      "end": 4696,
       "loc": {
         "start": {
-          "line": 119,
-          "column": 4
+          "line": 171,
+          "column": 12
         },
         "end": {
-          "line": 119,
-          "column": 47
+          "line": 171,
+          "column": 19
         }
       }
     },
     {
       "type": {
-        "label": "let",
-        "keyword": "let",
-        "beforeExpr": false,
-        "startsExpr": false,
+        "label": "(",
+        "beforeExpr": true,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "value": "let",
-      "start": 2887,
-      "end": 2890,
+      "start": 4696,
+      "end": 4697,
       "loc": {
         "start": {
-          "line": 120,
-          "column": 4
+          "line": 171,
+          "column": 19
         },
         "end": {
-          "line": 120,
-          "column": 7
+          "line": 171,
+          "column": 20
         }
       }
     },
@@ -16387,50 +18762,49 @@
         "postfix": false,
         "binop": null
       },
-      "value": "newComponentData",
-      "start": 2891,
-      "end": 2907,
+      "value": "args",
+      "start": 4697,
+      "end": 4701,
       "loc": {
         "start": {
-          "line": 120,
-          "column": 8
+          "line": 171,
+          "column": 20
         },
         "end": {
-          "line": 120,
+          "line": 171,
           "column": 24
         }
       }
     },
     {
       "type": {
-        "label": "=",
+        "label": "[",
         "beforeExpr": true,
-        "startsExpr": false,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
-        "isAssign": true,
+        "isAssign": false,
         "prefix": false,
         "postfix": false,
         "binop": null,
         "updateContext": null
       },
-      "value": "=",
-      "start": 2908,
-      "end": 2909,
+      "start": 4701,
+      "end": 4702,
       "loc": {
         "start": {
-          "line": 120,
-          "column": 25
+          "line": 171,
+          "column": 24
         },
         "end": {
-          "line": 120,
-          "column": 26
+          "line": 171,
+          "column": 25
         }
       }
     },
     {
       "type": {
-        "label": "name",
+        "label": "num",
         "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
@@ -16438,25 +18812,26 @@
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "value": "JSON",
-      "start": 2910,
-      "end": 2914,
+      "value": 0,
+      "start": 4702,
+      "end": 4703,
       "loc": {
         "start": {
-          "line": 120,
-          "column": 27
+          "line": 171,
+          "column": 25
         },
         "end": {
-          "line": 120,
-          "column": 31
+          "line": 171,
+          "column": 26
         }
       }
     },
     {
       "type": {
-        "label": ".",
+        "label": "]",
         "beforeExpr": false,
         "startsExpr": false,
         "rightAssociative": false,
@@ -16467,24 +18842,24 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 2914,
-      "end": 2915,
+      "start": 4703,
+      "end": 4704,
       "loc": {
         "start": {
-          "line": 120,
-          "column": 31
+          "line": 171,
+          "column": 26
         },
         "end": {
-          "line": 120,
-          "column": 32
+          "line": 171,
+          "column": 27
         }
       }
     },
     {
       "type": {
-        "label": "name",
+        "label": ")",
         "beforeExpr": false,
-        "startsExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -16492,25 +18867,24 @@
         "postfix": false,
         "binop": null
       },
-      "value": "parse",
-      "start": 2915,
-      "end": 2920,
+      "start": 4704,
+      "end": 4705,
       "loc": {
         "start": {
-          "line": 120,
-          "column": 32
+          "line": 171,
+          "column": 27
         },
         "end": {
-          "line": 120,
-          "column": 37
+          "line": 171,
+          "column": 28
         }
       }
     },
     {
       "type": {
-        "label": "(",
-        "beforeExpr": true,
-        "startsExpr": true,
+        "label": ")",
+        "beforeExpr": false,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -16518,23 +18892,23 @@
         "postfix": false,
         "binop": null
       },
-      "start": 2920,
-      "end": 2921,
+      "start": 4705,
+      "end": 4706,
       "loc": {
         "start": {
-          "line": 120,
-          "column": 37
+          "line": 171,
+          "column": 28
         },
         "end": {
-          "line": 120,
-          "column": 38
+          "line": 171,
+          "column": 29
         }
       }
     },
     {
       "type": {
-        "label": "name",
-        "beforeExpr": false,
+        "label": "{",
+        "beforeExpr": true,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
@@ -16543,126 +18917,127 @@
         "postfix": false,
         "binop": null
       },
-      "value": "template",
-      "start": 2921,
-      "end": 2929,
+      "start": 4707,
+      "end": 4708,
       "loc": {
         "start": {
-          "line": 120,
-          "column": 38
+          "line": 171,
+          "column": 30
         },
         "end": {
-          "line": 120,
-          "column": 46
+          "line": 171,
+          "column": 31
         }
       }
     },
     {
       "type": {
-        "label": "[",
-        "beforeExpr": true,
+        "label": "name",
+        "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "start": 2929,
-      "end": 2930,
+      "value": "components",
+      "start": 4712,
+      "end": 4722,
       "loc": {
         "start": {
-          "line": 120,
-          "column": 46
+          "line": 172,
+          "column": 3
         },
         "end": {
-          "line": 120,
-          "column": 47
+          "line": 172,
+          "column": 13
         }
       }
     },
     {
       "type": {
-        "label": "name",
-        "beforeExpr": false,
-        "startsExpr": true,
+        "label": "=",
+        "beforeExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
-        "isAssign": false,
+        "isAssign": true,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "value": "componentName",
-      "start": 2930,
-      "end": 2943,
+      "value": "=",
+      "start": 4723,
+      "end": 4724,
       "loc": {
         "start": {
-          "line": 120,
-          "column": 47
+          "line": 172,
+          "column": 14
         },
         "end": {
-          "line": 120,
-          "column": 60
+          "line": 172,
+          "column": 15
         }
       }
     },
     {
       "type": {
-        "label": "]",
+        "label": "name",
         "beforeExpr": false,
-        "startsExpr": false,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "start": 2943,
-      "end": 2944,
+      "value": "args",
+      "start": 4725,
+      "end": 4729,
       "loc": {
         "start": {
-          "line": 120,
-          "column": 60
+          "line": 172,
+          "column": 16
         },
         "end": {
-          "line": 120,
-          "column": 61
+          "line": 172,
+          "column": 20
         }
       }
     },
     {
       "type": {
-        "label": ")",
-        "beforeExpr": false,
-        "startsExpr": false,
+        "label": "[",
+        "beforeExpr": true,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "start": 2944,
-      "end": 2945,
+      "start": 4729,
+      "end": 4730,
       "loc": {
         "start": {
-          "line": 120,
-          "column": 61
+          "line": 172,
+          "column": 20
         },
         "end": {
-          "line": 120,
-          "column": 62
+          "line": 172,
+          "column": 21
         }
       }
     },
     {
       "type": {
-        "label": "name",
+        "label": "num",
         "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
@@ -16670,25 +19045,26 @@
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "value": "entity",
-      "start": 2950,
-      "end": 2956,
+      "value": 0,
+      "start": 4730,
+      "end": 4731,
       "loc": {
         "start": {
-          "line": 121,
-          "column": 4
+          "line": 172,
+          "column": 21
         },
         "end": {
-          "line": 121,
-          "column": 10
+          "line": 172,
+          "column": 22
         }
       }
     },
     {
       "type": {
-        "label": ".",
+        "label": "]",
         "beforeExpr": false,
         "startsExpr": false,
         "rightAssociative": false,
@@ -16699,16 +19075,16 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 2956,
-      "end": 2957,
+      "start": 4731,
+      "end": 4732,
       "loc": {
         "start": {
-          "line": 121,
-          "column": 10
+          "line": 172,
+          "column": 22
         },
         "end": {
-          "line": 121,
-          "column": 11
+          "line": 172,
+          "column": 23
         }
       }
     },
@@ -16724,42 +19100,44 @@
         "postfix": false,
         "binop": null
       },
-      "value": "update",
-      "start": 2957,
-      "end": 2963,
+      "value": "systemClass",
+      "start": 4736,
+      "end": 4747,
       "loc": {
         "start": {
-          "line": 121,
-          "column": 11
+          "line": 173,
+          "column": 3
         },
         "end": {
-          "line": 121,
-          "column": 17
+          "line": 173,
+          "column": 14
         }
       }
     },
     {
       "type": {
-        "label": "(",
+        "label": "=",
         "beforeExpr": true,
-        "startsExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
-        "isAssign": false,
+        "isAssign": true,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "start": 2963,
-      "end": 2964,
+      "value": "=",
+      "start": 4748,
+      "end": 4749,
       "loc": {
         "start": {
-          "line": 121,
-          "column": 17
+          "line": 173,
+          "column": 15
         },
         "end": {
-          "line": 121,
-          "column": 18
+          "line": 173,
+          "column": 16
         }
       }
     },
@@ -16775,25 +19153,25 @@
         "postfix": false,
         "binop": null
       },
-      "value": "componentName",
-      "start": 2964,
-      "end": 2977,
+      "value": "args",
+      "start": 4750,
+      "end": 4754,
       "loc": {
         "start": {
-          "line": 121,
-          "column": 18
+          "line": 173,
+          "column": 17
         },
         "end": {
-          "line": 121,
-          "column": 31
+          "line": 173,
+          "column": 21
         }
       }
     },
     {
       "type": {
-        "label": ",",
+        "label": "[",
         "beforeExpr": true,
-        "startsExpr": false,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -16802,22 +19180,22 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 2977,
-      "end": 2978,
+      "start": 4754,
+      "end": 4755,
       "loc": {
         "start": {
-          "line": 121,
-          "column": 31
+          "line": 173,
+          "column": 21
         },
         "end": {
-          "line": 121,
-          "column": 32
+          "line": 173,
+          "column": 22
         }
       }
     },
     {
       "type": {
-        "label": "name",
+        "label": "num",
         "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
@@ -16825,25 +19203,26 @@
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "value": "newComponentData",
-      "start": 2979,
-      "end": 2995,
+      "value": 1,
+      "start": 4755,
+      "end": 4756,
       "loc": {
         "start": {
-          "line": 121,
-          "column": 33
+          "line": 173,
+          "column": 22
         },
         "end": {
-          "line": 121,
-          "column": 49
+          "line": 173,
+          "column": 23
         }
       }
     },
     {
       "type": {
-        "label": ")",
+        "label": "]",
         "beforeExpr": false,
         "startsExpr": false,
         "rightAssociative": false,
@@ -16851,26 +19230,27 @@
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "start": 2995,
-      "end": 2996,
+      "start": 4756,
+      "end": 4757,
       "loc": {
         "start": {
-          "line": 121,
-          "column": 49
+          "line": 173,
+          "column": 23
         },
         "end": {
-          "line": 121,
-          "column": 50
+          "line": 173,
+          "column": 24
         }
       }
     },
     {
       "type": {
-        "label": "}",
+        "label": "name",
         "beforeExpr": false,
-        "startsExpr": false,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -16878,48 +19258,50 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3000,
-      "end": 3001,
+      "value": "rest",
+      "start": 4761,
+      "end": 4765,
       "loc": {
         "start": {
-          "line": 122,
+          "line": 174,
           "column": 3
         },
         "end": {
-          "line": 122,
-          "column": 4
+          "line": 174,
+          "column": 7
         }
       }
     },
     {
       "type": {
-        "label": "}",
-        "beforeExpr": false,
+        "label": "=",
+        "beforeExpr": true,
         "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
-        "isAssign": false,
+        "isAssign": true,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "start": 3004,
-      "end": 3005,
+      "value": "=",
+      "start": 4766,
+      "end": 4767,
       "loc": {
         "start": {
-          "line": 123,
-          "column": 2
+          "line": 174,
+          "column": 8
         },
         "end": {
-          "line": 123,
-          "column": 3
+          "line": 174,
+          "column": 9
         }
       }
     },
     {
       "type": {
-        "label": "this",
-        "keyword": "this",
+        "label": "name",
         "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
@@ -16927,20 +19309,19 @@
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "value": "this",
-      "start": 3009,
-      "end": 3013,
+      "value": "args",
+      "start": 4768,
+      "end": 4772,
       "loc": {
         "start": {
-          "line": 125,
-          "column": 2
+          "line": 174,
+          "column": 10
         },
         "end": {
-          "line": 125,
-          "column": 6
+          "line": 174,
+          "column": 14
         }
       }
     },
@@ -16957,16 +19338,16 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3013,
-      "end": 3014,
+      "start": 4772,
+      "end": 4773,
       "loc": {
         "start": {
-          "line": 125,
-          "column": 6
+          "line": 174,
+          "column": 14
         },
         "end": {
-          "line": 125,
-          "column": 7
+          "line": 174,
+          "column": 15
         }
       }
     },
@@ -16982,49 +19363,48 @@
         "postfix": false,
         "binop": null
       },
-      "value": "entities",
-      "start": 3014,
-      "end": 3022,
+      "value": "slice",
+      "start": 4773,
+      "end": 4778,
       "loc": {
         "start": {
-          "line": 125,
-          "column": 7
+          "line": 174,
+          "column": 15
         },
         "end": {
-          "line": 125,
-          "column": 15
+          "line": 174,
+          "column": 20
         }
       }
     },
     {
       "type": {
-        "label": ".",
-        "beforeExpr": false,
-        "startsExpr": false,
+        "label": "(",
+        "beforeExpr": true,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "start": 3022,
-      "end": 3023,
+      "start": 4778,
+      "end": 4779,
       "loc": {
         "start": {
-          "line": 125,
-          "column": 15
+          "line": 174,
+          "column": 20
         },
         "end": {
-          "line": 125,
-          "column": 16
+          "line": 174,
+          "column": 21
         }
       }
     },
     {
       "type": {
-        "label": "name",
+        "label": "num",
         "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
@@ -17032,27 +19412,28 @@
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "value": "set",
-      "start": 3023,
-      "end": 3026,
+      "value": 2,
+      "start": 4779,
+      "end": 4780,
       "loc": {
         "start": {
-          "line": 125,
-          "column": 16
+          "line": 174,
+          "column": 21
         },
         "end": {
-          "line": 125,
-          "column": 19
+          "line": 174,
+          "column": 22
         }
       }
     },
-    {
-      "type": {
-        "label": "(",
-        "beforeExpr": true,
-        "startsExpr": true,
+    {
+      "type": {
+        "label": ")",
+        "beforeExpr": false,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -17060,24 +19441,24 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3026,
-      "end": 3027,
+      "start": 4780,
+      "end": 4781,
       "loc": {
         "start": {
-          "line": 125,
-          "column": 19
+          "line": 174,
+          "column": 22
         },
         "end": {
-          "line": 125,
-          "column": 20
+          "line": 174,
+          "column": 23
         }
       }
     },
     {
       "type": {
-        "label": "name",
+        "label": "}",
         "beforeExpr": false,
-        "startsExpr": true,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -17085,23 +19466,23 @@
         "postfix": false,
         "binop": null
       },
-      "value": "entityId",
-      "start": 3027,
-      "end": 3035,
+      "start": 4784,
+      "end": 4785,
       "loc": {
         "start": {
-          "line": 125,
-          "column": 20
+          "line": 175,
+          "column": 2
         },
         "end": {
-          "line": 125,
-          "column": 28
+          "line": 175,
+          "column": 3
         }
       }
     },
     {
       "type": {
-        "label": ",",
+        "label": "else",
+        "keyword": "else",
         "beforeExpr": true,
         "startsExpr": false,
         "rightAssociative": false,
@@ -17112,23 +19493,24 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 3035,
-      "end": 3036,
+      "value": "else",
+      "start": 4786,
+      "end": 4790,
       "loc": {
         "start": {
-          "line": 125,
-          "column": 28
+          "line": 175,
+          "column": 4
         },
         "end": {
-          "line": 125,
-          "column": 29
+          "line": 175,
+          "column": 8
         }
       }
     },
     {
       "type": {
-        "label": "name",
-        "beforeExpr": false,
+        "label": "{",
+        "beforeExpr": true,
         "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
@@ -17137,25 +19519,24 @@
         "postfix": false,
         "binop": null
       },
-      "value": "entity",
-      "start": 3037,
-      "end": 3043,
+      "start": 4791,
+      "end": 4792,
       "loc": {
         "start": {
-          "line": 125,
-          "column": 30
+          "line": 175,
+          "column": 9
         },
         "end": {
-          "line": 125,
-          "column": 36
+          "line": 175,
+          "column": 10
         }
       }
     },
     {
       "type": {
-        "label": ")",
+        "label": "name",
         "beforeExpr": false,
-        "startsExpr": false,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -17163,44 +19544,44 @@
         "postfix": false,
         "binop": null
       },
-      "start": 3043,
-      "end": 3044,
+      "value": "systemClass",
+      "start": 4796,
+      "end": 4807,
       "loc": {
         "start": {
-          "line": 125,
-          "column": 36
+          "line": 176,
+          "column": 3
         },
         "end": {
-          "line": 125,
-          "column": 37
+          "line": 176,
+          "column": 14
         }
       }
     },
     {
       "type": {
-        "label": "return",
-        "keyword": "return",
+        "label": "=",
         "beforeExpr": true,
         "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
-        "isAssign": false,
+        "isAssign": true,
         "prefix": false,
         "postfix": false,
         "binop": null,
         "updateContext": null
       },
-      "value": "return",
-      "start": 3047,
-      "end": 3053,
+      "value": "=",
+      "start": 4808,
+      "end": 4809,
       "loc": {
         "start": {
-          "line": 126,
-          "column": 2
+          "line": 176,
+          "column": 15
         },
         "end": {
-          "line": 126,
-          "column": 8
+          "line": 176,
+          "column": 16
         }
       }
     },
@@ -17216,64 +19597,49 @@
         "postfix": false,
         "binop": null
       },
-      "value": "entity",
-      "start": 3054,
-      "end": 3060,
+      "value": "args",
+      "start": 4810,
+      "end": 4814,
       "loc": {
         "start": {
-          "line": 126,
-          "column": 9
+          "line": 176,
+          "column": 17
         },
         "end": {
-          "line": 126,
-          "column": 15
+          "line": 176,
+          "column": 21
         }
       }
     },
     {
       "type": {
-        "label": "}",
-        "beforeExpr": false,
-        "startsExpr": false,
+        "label": "[",
+        "beforeExpr": true,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "start": 3062,
-      "end": 3063,
-      "loc": {
-        "start": {
-          "line": 127,
-          "column": 1
-        },
-        "end": {
-          "line": 127,
-          "column": 2
-        }
-      }
-    },
-    {
-      "type": "CommentBlock",
-      "value": "*\n\t * Registers a system to the world.\n\t * The order the systems get registered, is the order then run in.\n\t *\n\t * @example\n\t * // Movement system\n\t * world.system(['position', 'velocity'], class {\n\t *      every(position, velocity, entity) {\n\t *          position.x += velocity.x\n\t *          position.y += velocity.y\n\t *      }\n\t *  })\n\t *\n\t * @param {Array}     components  - The list of components the system will process in every(). This follows the same logic as entity.has() and world.every().\n\t * @param {Function}  systemClass - The system class to instantiate. Can contain the following methods: constructor, initialize,\n\t * pre, every, post. Pre() and post() get called before and after every(), for each of the independent systems. See world.run()\n\t * for an example of the call order.\n\t * @param {...Object} [args]      - The arguments to forward to the system's constructors\n\t *\n\t * @return {number} Unique ID of the system on success or undefined on failure\n\t ",
-      "start": 3066,
-      "end": 4045,
+      "start": 4814,
+      "end": 4815,
       "loc": {
         "start": {
-          "line": 129,
-          "column": 1
+          "line": 176,
+          "column": 21
         },
         "end": {
-          "line": 149,
-          "column": 4
+          "line": 176,
+          "column": 22
         }
       }
     },
     {
       "type": {
-        "label": "name",
+        "label": "num",
         "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
@@ -17281,44 +19647,46 @@
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "value": "system",
-      "start": 4047,
-      "end": 4053,
+      "value": 0,
+      "start": 4815,
+      "end": 4816,
       "loc": {
         "start": {
-          "line": 150,
-          "column": 1
+          "line": 176,
+          "column": 22
         },
         "end": {
-          "line": 150,
-          "column": 7
+          "line": 176,
+          "column": 23
         }
       }
     },
     {
       "type": {
-        "label": "(",
-        "beforeExpr": true,
-        "startsExpr": true,
+        "label": "]",
+        "beforeExpr": false,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "start": 4053,
-      "end": 4054,
+      "start": 4816,
+      "end": 4817,
       "loc": {
         "start": {
-          "line": 150,
-          "column": 7
+          "line": 176,
+          "column": 23
         },
         "end": {
-          "line": 150,
-          "column": 8
+          "line": 176,
+          "column": 24
         }
       }
     },
@@ -17334,43 +19702,44 @@
         "postfix": false,
         "binop": null
       },
-      "value": "components",
-      "start": 4054,
-      "end": 4064,
+      "value": "rest",
+      "start": 4821,
+      "end": 4825,
       "loc": {
         "start": {
-          "line": 150,
-          "column": 8
+          "line": 177,
+          "column": 3
         },
         "end": {
-          "line": 150,
-          "column": 18
+          "line": 177,
+          "column": 7
         }
       }
     },
     {
       "type": {
-        "label": ",",
+        "label": "=",
         "beforeExpr": true,
         "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
-        "isAssign": false,
+        "isAssign": true,
         "prefix": false,
         "postfix": false,
         "binop": null,
         "updateContext": null
       },
-      "start": 4064,
-      "end": 4065,
+      "value": "=",
+      "start": 4826,
+      "end": 4827,
       "loc": {
         "start": {
-          "line": 150,
-          "column": 18
+          "line": 177,
+          "column": 8
         },
         "end": {
-          "line": 150,
-          "column": 19
+          "line": 177,
+          "column": 9
         }
       }
     },
@@ -17386,24 +19755,24 @@
         "postfix": false,
         "binop": null
       },
-      "value": "systemClass",
-      "start": 4066,
-      "end": 4077,
+      "value": "args",
+      "start": 4828,
+      "end": 4832,
       "loc": {
         "start": {
-          "line": 150,
-          "column": 20
+          "line": 177,
+          "column": 10
         },
         "end": {
-          "line": 150,
-          "column": 31
+          "line": 177,
+          "column": 14
         }
       }
     },
     {
       "type": {
-        "label": ",",
-        "beforeExpr": true,
+        "label": ".",
+        "beforeExpr": false,
         "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
@@ -17413,48 +19782,73 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 4077,
-      "end": 4078,
+      "start": 4832,
+      "end": 4833,
       "loc": {
         "start": {
-          "line": 150,
-          "column": 31
+          "line": 177,
+          "column": 14
         },
         "end": {
-          "line": 150,
-          "column": 32
+          "line": 177,
+          "column": 15
         }
       }
     },
     {
       "type": {
-        "label": "...",
+        "label": "name",
+        "beforeExpr": false,
+        "startsExpr": true,
+        "rightAssociative": false,
+        "isLoop": false,
+        "isAssign": false,
+        "prefix": false,
+        "postfix": false,
+        "binop": null
+      },
+      "value": "slice",
+      "start": 4833,
+      "end": 4838,
+      "loc": {
+        "start": {
+          "line": 177,
+          "column": 15
+        },
+        "end": {
+          "line": 177,
+          "column": 20
+        }
+      }
+    },
+    {
+      "type": {
+        "label": "(",
         "beforeExpr": true,
-        "startsExpr": false,
+        "startsExpr": true,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null,
-        "updateContext": null
+        "binop": null
       },
-      "start": 4079,
-      "end": 4082,
+      "start": 4838,
+      "end": 4839,
       "loc": {
         "start": {
-          "line": 150,
-          "column": 33
+          "line": 177,
+          "column": 20
         },
         "end": {
-          "line": 150,
-          "column": 36
+          "line": 177,
+          "column": 21
         }
       }
     },
     {
       "type": {
-        "label": "name",
+        "label": "num",
         "beforeExpr": false,
         "startsExpr": true,
         "rightAssociative": false,
@@ -17462,19 +19856,20 @@
         "isAssign": false,
         "prefix": false,
         "postfix": false,
-        "binop": null
+        "binop": null,
+        "updateContext": null
       },
-      "value": "args",
-      "start": 4082,
-      "end": 4086,
+      "value": 1,
+      "start": 4839,
+      "end": 4840,
       "loc": {
         "start": {
-          "line": 150,
-          "column": 36
+          "line": 177,
+          "column": 21
         },
         "end": {
-          "line": 150,
-          "column": 40
+          "line": 177,
+          "column": 22
         }
       }
     },
@@ -17490,24 +19885,24 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4086,
-      "end": 4087,
+      "start": 4840,
+      "end": 4841,
       "loc": {
         "start": {
-          "line": 150,
-          "column": 40
+          "line": 177,
+          "column": 22
         },
         "end": {
-          "line": 150,
-          "column": 41
+          "line": 177,
+          "column": 23
         }
       }
     },
     {
       "type": {
-        "label": "{",
-        "beforeExpr": true,
-        "startsExpr": true,
+        "label": "}",
+        "beforeExpr": false,
+        "startsExpr": false,
         "rightAssociative": false,
         "isLoop": false,
         "isAssign": false,
@@ -17515,32 +19910,32 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4088,
-      "end": 4089,
+      "start": 4844,
+      "end": 4845,
       "loc": {
         "start": {
-          "line": 150,
-          "column": 42
+          "line": 178,
+          "column": 2
         },
         "end": {
-          "line": 150,
-          "column": 43
+          "line": 178,
+          "column": 3
         }
       }
     },
     {
       "type": "CommentLine",
-      "value": " TODO: Make components optional, and parameters more dynamic by only using ...args",
-      "start": 4092,
-      "end": 4176,
+      "value": " Make sure the system is valid",
+      "start": 4849,
+      "end": 4881,
       "loc": {
         "start": {
-          "line": 151,
+          "line": 180,
           "column": 2
         },
         "end": {
-          "line": 151,
-          "column": 86
+          "line": 180,
+          "column": 34
         }
       }
     },
@@ -17559,15 +19954,15 @@
         "updateContext": null
       },
       "value": "if",
-      "start": 4179,
-      "end": 4181,
+      "start": 4884,
+      "end": 4886,
       "loc": {
         "start": {
-          "line": 152,
+          "line": 181,
           "column": 2
         },
         "end": {
-          "line": 152,
+          "line": 181,
           "column": 4
         }
       }
@@ -17584,15 +19979,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4182,
-      "end": 4183,
+      "start": 4887,
+      "end": 4888,
       "loc": {
         "start": {
-          "line": 152,
+          "line": 181,
           "column": 5
         },
         "end": {
-          "line": 152,
+          "line": 181,
           "column": 6
         }
       }
@@ -17610,15 +20005,15 @@
         "binop": null
       },
       "value": "isFunction",
-      "start": 4183,
-      "end": 4193,
+      "start": 4888,
+      "end": 4898,
       "loc": {
         "start": {
-          "line": 152,
+          "line": 181,
           "column": 6
         },
         "end": {
-          "line": 152,
+          "line": 181,
           "column": 16
         }
       }
@@ -17635,15 +20030,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4193,
-      "end": 4194,
+      "start": 4898,
+      "end": 4899,
       "loc": {
         "start": {
-          "line": 152,
+          "line": 181,
           "column": 16
         },
         "end": {
-          "line": 152,
+          "line": 181,
           "column": 17
         }
       }
@@ -17661,15 +20056,15 @@
         "binop": null
       },
       "value": "systemClass",
-      "start": 4194,
-      "end": 4205,
+      "start": 4899,
+      "end": 4910,
       "loc": {
         "start": {
-          "line": 152,
+          "line": 181,
           "column": 17
         },
         "end": {
-          "line": 152,
+          "line": 181,
           "column": 28
         }
       }
@@ -17686,15 +20081,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4205,
-      "end": 4206,
+      "start": 4910,
+      "end": 4911,
       "loc": {
         "start": {
-          "line": 152,
+          "line": 181,
           "column": 28
         },
         "end": {
-          "line": 152,
+          "line": 181,
           "column": 29
         }
       }
@@ -17711,15 +20106,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4206,
-      "end": 4207,
+      "start": 4911,
+      "end": 4912,
       "loc": {
         "start": {
-          "line": 152,
+          "line": 181,
           "column": 29
         },
         "end": {
-          "line": 152,
+          "line": 181,
           "column": 30
         }
       }
@@ -17736,15 +20131,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4208,
-      "end": 4209,
+      "start": 4913,
+      "end": 4914,
       "loc": {
         "start": {
-          "line": 152,
+          "line": 181,
           "column": 31
         },
         "end": {
-          "line": 152,
+          "line": 181,
           "column": 32
         }
       }
@@ -17752,15 +20147,15 @@
     {
       "type": "CommentLine",
       "value": " Create the system, and set the component array query",
-      "start": 4213,
-      "end": 4268,
+      "start": 4918,
+      "end": 4973,
       "loc": {
         "start": {
-          "line": 153,
+          "line": 182,
           "column": 3
         },
         "end": {
-          "line": 153,
+          "line": 182,
           "column": 58
         }
       }
@@ -17780,15 +20175,15 @@
         "updateContext": null
       },
       "value": "let",
-      "start": 4272,
-      "end": 4275,
+      "start": 4977,
+      "end": 4980,
       "loc": {
         "start": {
-          "line": 154,
+          "line": 183,
           "column": 3
         },
         "end": {
-          "line": 154,
+          "line": 183,
           "column": 6
         }
       }
@@ -17806,15 +20201,15 @@
         "binop": null
       },
       "value": "newSystem",
-      "start": 4276,
-      "end": 4285,
+      "start": 4981,
+      "end": 4990,
       "loc": {
         "start": {
-          "line": 154,
+          "line": 183,
           "column": 7
         },
         "end": {
-          "line": 154,
+          "line": 183,
           "column": 16
         }
       }
@@ -17833,15 +20228,15 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 4286,
-      "end": 4287,
+      "start": 4991,
+      "end": 4992,
       "loc": {
         "start": {
-          "line": 154,
+          "line": 183,
           "column": 17
         },
         "end": {
-          "line": 154,
+          "line": 183,
           "column": 18
         }
       }
@@ -17861,15 +20256,15 @@
         "updateContext": null
       },
       "value": "new",
-      "start": 4288,
-      "end": 4291,
+      "start": 4993,
+      "end": 4996,
       "loc": {
         "start": {
-          "line": 154,
+          "line": 183,
           "column": 19
         },
         "end": {
-          "line": 154,
+          "line": 183,
           "column": 22
         }
       }
@@ -17887,15 +20282,15 @@
         "binop": null
       },
       "value": "systemClass",
-      "start": 4292,
-      "end": 4303,
+      "start": 4997,
+      "end": 5008,
       "loc": {
         "start": {
-          "line": 154,
+          "line": 183,
           "column": 23
         },
         "end": {
-          "line": 154,
+          "line": 183,
           "column": 34
         }
       }
@@ -17912,15 +20307,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4303,
-      "end": 4304,
+      "start": 5008,
+      "end": 5009,
       "loc": {
         "start": {
-          "line": 154,
+          "line": 183,
           "column": 34
         },
         "end": {
-          "line": 154,
+          "line": 183,
           "column": 35
         }
       }
@@ -17938,15 +20333,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 4304,
-      "end": 4307,
+      "start": 5009,
+      "end": 5012,
       "loc": {
         "start": {
-          "line": 154,
+          "line": 183,
           "column": 35
         },
         "end": {
-          "line": 154,
+          "line": 183,
           "column": 38
         }
       }
@@ -17963,16 +20358,16 @@
         "postfix": false,
         "binop": null
       },
-      "value": "args",
-      "start": 4307,
-      "end": 4311,
+      "value": "rest",
+      "start": 5012,
+      "end": 5016,
       "loc": {
         "start": {
-          "line": 154,
+          "line": 183,
           "column": 38
         },
         "end": {
-          "line": 154,
+          "line": 183,
           "column": 42
         }
       }
@@ -17989,15 +20384,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4311,
-      "end": 4312,
+      "start": 5016,
+      "end": 5017,
       "loc": {
         "start": {
-          "line": 154,
+          "line": 183,
           "column": 42
         },
         "end": {
-          "line": 154,
+          "line": 183,
           "column": 43
         }
       }
@@ -18015,15 +20410,15 @@
         "binop": null
       },
       "value": "newSystem",
-      "start": 4316,
-      "end": 4325,
+      "start": 5021,
+      "end": 5030,
       "loc": {
         "start": {
-          "line": 155,
+          "line": 184,
           "column": 3
         },
         "end": {
-          "line": 155,
+          "line": 184,
           "column": 12
         }
       }
@@ -18041,15 +20436,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 4325,
-      "end": 4326,
+      "start": 5030,
+      "end": 5031,
       "loc": {
         "start": {
-          "line": 155,
+          "line": 184,
           "column": 12
         },
         "end": {
-          "line": 155,
+          "line": 184,
           "column": 13
         }
       }
@@ -18067,15 +20462,15 @@
         "binop": null
       },
       "value": "components",
-      "start": 4326,
-      "end": 4336,
+      "start": 5031,
+      "end": 5041,
       "loc": {
         "start": {
-          "line": 155,
+          "line": 184,
           "column": 13
         },
         "end": {
-          "line": 155,
+          "line": 184,
           "column": 23
         }
       }
@@ -18094,15 +20489,15 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 4337,
-      "end": 4338,
+      "start": 5042,
+      "end": 5043,
       "loc": {
         "start": {
-          "line": 155,
+          "line": 184,
           "column": 24
         },
         "end": {
-          "line": 155,
+          "line": 184,
           "column": 25
         }
       }
@@ -18120,15 +20515,15 @@
         "binop": null
       },
       "value": "components",
-      "start": 4339,
-      "end": 4349,
+      "start": 5044,
+      "end": 5054,
       "loc": {
         "start": {
-          "line": 155,
+          "line": 184,
           "column": 26
         },
         "end": {
-          "line": 155,
+          "line": 184,
           "column": 36
         }
       }
@@ -18136,15 +20531,15 @@
     {
       "type": "CommentLine",
       "value": " Add the system, return its ID",
-      "start": 4354,
-      "end": 4386,
+      "start": 5059,
+      "end": 5091,
       "loc": {
         "start": {
-          "line": 157,
+          "line": 186,
           "column": 3
         },
         "end": {
-          "line": 157,
+          "line": 186,
           "column": 35
         }
       }
@@ -18164,15 +20559,15 @@
         "updateContext": null
       },
       "value": "return",
-      "start": 4390,
-      "end": 4396,
+      "start": 5095,
+      "end": 5101,
       "loc": {
         "start": {
-          "line": 158,
+          "line": 187,
           "column": 3
         },
         "end": {
-          "line": 158,
+          "line": 187,
           "column": 9
         }
       }
@@ -18192,15 +20587,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 4397,
-      "end": 4401,
+      "start": 5102,
+      "end": 5106,
       "loc": {
         "start": {
-          "line": 158,
+          "line": 187,
           "column": 10
         },
         "end": {
-          "line": 158,
+          "line": 187,
           "column": 14
         }
       }
@@ -18218,15 +20613,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 4401,
-      "end": 4402,
+      "start": 5106,
+      "end": 5107,
       "loc": {
         "start": {
-          "line": 158,
+          "line": 187,
           "column": 14
         },
         "end": {
-          "line": 158,
+          "line": 187,
           "column": 15
         }
       }
@@ -18244,15 +20639,15 @@
         "binop": null
       },
       "value": "systems",
-      "start": 4402,
-      "end": 4409,
+      "start": 5107,
+      "end": 5114,
       "loc": {
         "start": {
-          "line": 158,
+          "line": 187,
           "column": 15
         },
         "end": {
-          "line": 158,
+          "line": 187,
           "column": 22
         }
       }
@@ -18270,15 +20665,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 4409,
-      "end": 4410,
+      "start": 5114,
+      "end": 5115,
       "loc": {
         "start": {
-          "line": 158,
+          "line": 187,
           "column": 22
         },
         "end": {
-          "line": 158,
+          "line": 187,
           "column": 23
         }
       }
@@ -18296,15 +20691,15 @@
         "binop": null
       },
       "value": "push",
-      "start": 4410,
-      "end": 4414,
+      "start": 5115,
+      "end": 5119,
       "loc": {
         "start": {
-          "line": 158,
+          "line": 187,
           "column": 23
         },
         "end": {
-          "line": 158,
+          "line": 187,
           "column": 27
         }
       }
@@ -18321,15 +20716,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4414,
-      "end": 4415,
+      "start": 5119,
+      "end": 5120,
       "loc": {
         "start": {
-          "line": 158,
+          "line": 187,
           "column": 27
         },
         "end": {
-          "line": 158,
+          "line": 187,
           "column": 28
         }
       }
@@ -18347,15 +20742,15 @@
         "binop": null
       },
       "value": "newSystem",
-      "start": 4415,
-      "end": 4424,
+      "start": 5120,
+      "end": 5129,
       "loc": {
         "start": {
-          "line": 158,
+          "line": 187,
           "column": 28
         },
         "end": {
-          "line": 158,
+          "line": 187,
           "column": 37
         }
       }
@@ -18372,15 +20767,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4424,
-      "end": 4425,
+      "start": 5129,
+      "end": 5130,
       "loc": {
         "start": {
-          "line": 158,
+          "line": 187,
           "column": 37
         },
         "end": {
-          "line": 158,
+          "line": 187,
           "column": 38
         }
       }
@@ -18399,15 +20794,15 @@
         "updateContext": null
       },
       "value": "-",
-      "start": 4426,
-      "end": 4427,
+      "start": 5131,
+      "end": 5132,
       "loc": {
         "start": {
-          "line": 158,
+          "line": 187,
           "column": 39
         },
         "end": {
-          "line": 158,
+          "line": 187,
           "column": 40
         }
       }
@@ -18426,15 +20821,15 @@
         "updateContext": null
       },
       "value": 1,
-      "start": 4428,
-      "end": 4429,
+      "start": 5133,
+      "end": 5134,
       "loc": {
         "start": {
-          "line": 158,
+          "line": 187,
           "column": 41
         },
         "end": {
-          "line": 158,
+          "line": 187,
           "column": 42
         }
       }
@@ -18451,15 +20846,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4432,
-      "end": 4433,
+      "start": 5137,
+      "end": 5138,
       "loc": {
         "start": {
-          "line": 159,
+          "line": 188,
           "column": 2
         },
         "end": {
-          "line": 159,
+          "line": 188,
           "column": 3
         }
       }
@@ -18479,15 +20874,15 @@
         "updateContext": null
       },
       "value": "return",
-      "start": 4436,
-      "end": 4442,
+      "start": 5141,
+      "end": 5147,
       "loc": {
         "start": {
-          "line": 160,
+          "line": 189,
           "column": 2
         },
         "end": {
-          "line": 160,
+          "line": 189,
           "column": 8
         }
       }
@@ -18505,15 +20900,15 @@
         "binop": null
       },
       "value": "undefined",
-      "start": 4443,
-      "end": 4452,
+      "start": 5148,
+      "end": 5157,
       "loc": {
         "start": {
-          "line": 160,
+          "line": 189,
           "column": 9
         },
         "end": {
-          "line": 160,
+          "line": 189,
           "column": 18
         }
       }
@@ -18530,15 +20925,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4454,
-      "end": 4455,
+      "start": 5159,
+      "end": 5160,
       "loc": {
         "start": {
-          "line": 161,
+          "line": 190,
           "column": 1
         },
         "end": {
-          "line": 161,
+          "line": 190,
           "column": 2
         }
       }
@@ -18546,15 +20941,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Calls initialize() on all systems\n\t *\n\t * @example\n\t * world.initialize(renderContext)\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' initialize() methods\n\t ",
-      "start": 4458,
-      "end": 4655,
+      "start": 5163,
+      "end": 5360,
       "loc": {
         "start": {
-          "line": 163,
+          "line": 192,
           "column": 1
         },
         "end": {
-          "line": 170,
+          "line": 199,
           "column": 4
         }
       }
@@ -18572,15 +20967,15 @@
         "binop": null
       },
       "value": "initialize",
-      "start": 4657,
-      "end": 4667,
+      "start": 5362,
+      "end": 5372,
       "loc": {
         "start": {
-          "line": 171,
+          "line": 200,
           "column": 1
         },
         "end": {
-          "line": 171,
+          "line": 200,
           "column": 11
         }
       }
@@ -18597,15 +20992,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4667,
-      "end": 4668,
+      "start": 5372,
+      "end": 5373,
       "loc": {
         "start": {
-          "line": 171,
+          "line": 200,
           "column": 11
         },
         "end": {
-          "line": 171,
+          "line": 200,
           "column": 12
         }
       }
@@ -18623,15 +21018,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 4668,
-      "end": 4671,
+      "start": 5373,
+      "end": 5376,
       "loc": {
         "start": {
-          "line": 171,
+          "line": 200,
           "column": 12
         },
         "end": {
-          "line": 171,
+          "line": 200,
           "column": 15
         }
       }
@@ -18649,15 +21044,15 @@
         "binop": null
       },
       "value": "args",
-      "start": 4671,
-      "end": 4675,
+      "start": 5376,
+      "end": 5380,
       "loc": {
         "start": {
-          "line": 171,
+          "line": 200,
           "column": 15
         },
         "end": {
-          "line": 171,
+          "line": 200,
           "column": 19
         }
       }
@@ -18674,15 +21069,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4675,
-      "end": 4676,
+      "start": 5380,
+      "end": 5381,
       "loc": {
         "start": {
-          "line": 171,
+          "line": 200,
           "column": 19
         },
         "end": {
-          "line": 171,
+          "line": 200,
           "column": 20
         }
       }
@@ -18699,15 +21094,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4677,
-      "end": 4678,
+      "start": 5382,
+      "end": 5383,
       "loc": {
         "start": {
-          "line": 171,
+          "line": 200,
           "column": 21
         },
         "end": {
-          "line": 171,
+          "line": 200,
           "column": 22
         }
       }
@@ -18727,15 +21122,15 @@
         "updateContext": null
       },
       "value": "for",
-      "start": 4681,
-      "end": 4684,
+      "start": 5386,
+      "end": 5389,
       "loc": {
         "start": {
-          "line": 172,
+          "line": 201,
           "column": 2
         },
         "end": {
-          "line": 172,
+          "line": 201,
           "column": 5
         }
       }
@@ -18752,15 +21147,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4685,
-      "end": 4686,
+      "start": 5390,
+      "end": 5391,
       "loc": {
         "start": {
-          "line": 172,
+          "line": 201,
           "column": 6
         },
         "end": {
-          "line": 172,
+          "line": 201,
           "column": 7
         }
       }
@@ -18780,15 +21175,15 @@
         "updateContext": null
       },
       "value": "let",
-      "start": 4686,
-      "end": 4689,
+      "start": 5391,
+      "end": 5394,
       "loc": {
         "start": {
-          "line": 172,
+          "line": 201,
           "column": 7
         },
         "end": {
-          "line": 172,
+          "line": 201,
           "column": 10
         }
       }
@@ -18806,15 +21201,15 @@
         "binop": null
       },
       "value": "system",
-      "start": 4690,
-      "end": 4696,
+      "start": 5395,
+      "end": 5401,
       "loc": {
         "start": {
-          "line": 172,
+          "line": 201,
           "column": 11
         },
         "end": {
-          "line": 172,
+          "line": 201,
           "column": 17
         }
       }
@@ -18832,15 +21227,15 @@
         "binop": null
       },
       "value": "of",
-      "start": 4697,
-      "end": 4699,
+      "start": 5402,
+      "end": 5404,
       "loc": {
         "start": {
-          "line": 172,
+          "line": 201,
           "column": 18
         },
         "end": {
-          "line": 172,
+          "line": 201,
           "column": 20
         }
       }
@@ -18860,15 +21255,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 4700,
-      "end": 4704,
+      "start": 5405,
+      "end": 5409,
       "loc": {
         "start": {
-          "line": 172,
+          "line": 201,
           "column": 21
         },
         "end": {
-          "line": 172,
+          "line": 201,
           "column": 25
         }
       }
@@ -18886,15 +21281,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 4704,
-      "end": 4705,
+      "start": 5409,
+      "end": 5410,
       "loc": {
         "start": {
-          "line": 172,
+          "line": 201,
           "column": 25
         },
         "end": {
-          "line": 172,
+          "line": 201,
           "column": 26
         }
       }
@@ -18912,15 +21307,15 @@
         "binop": null
       },
       "value": "systems",
-      "start": 4705,
-      "end": 4712,
+      "start": 5410,
+      "end": 5417,
       "loc": {
         "start": {
-          "line": 172,
+          "line": 201,
           "column": 26
         },
         "end": {
-          "line": 172,
+          "line": 201,
           "column": 33
         }
       }
@@ -18937,15 +21332,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4712,
-      "end": 4713,
+      "start": 5417,
+      "end": 5418,
       "loc": {
         "start": {
-          "line": 172,
+          "line": 201,
           "column": 33
         },
         "end": {
-          "line": 172,
+          "line": 201,
           "column": 34
         }
       }
@@ -18962,15 +21357,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4714,
-      "end": 4715,
+      "start": 5419,
+      "end": 5420,
       "loc": {
         "start": {
-          "line": 172,
+          "line": 201,
           "column": 35
         },
         "end": {
-          "line": 172,
+          "line": 201,
           "column": 36
         }
       }
@@ -18988,15 +21383,15 @@
         "binop": null
       },
       "value": "invoke",
-      "start": 4719,
-      "end": 4725,
+      "start": 5424,
+      "end": 5430,
       "loc": {
         "start": {
-          "line": 173,
+          "line": 202,
           "column": 3
         },
         "end": {
-          "line": 173,
+          "line": 202,
           "column": 9
         }
       }
@@ -19013,15 +21408,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4725,
-      "end": 4726,
+      "start": 5430,
+      "end": 5431,
       "loc": {
         "start": {
-          "line": 173,
+          "line": 202,
           "column": 9
         },
         "end": {
-          "line": 173,
+          "line": 202,
           "column": 10
         }
       }
@@ -19039,15 +21434,15 @@
         "binop": null
       },
       "value": "system",
-      "start": 4726,
-      "end": 4732,
+      "start": 5431,
+      "end": 5437,
       "loc": {
         "start": {
-          "line": 173,
+          "line": 202,
           "column": 10
         },
         "end": {
-          "line": 173,
+          "line": 202,
           "column": 16
         }
       }
@@ -19065,15 +21460,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 4732,
-      "end": 4733,
+      "start": 5437,
+      "end": 5438,
       "loc": {
         "start": {
-          "line": 173,
+          "line": 202,
           "column": 16
         },
         "end": {
-          "line": 173,
+          "line": 202,
           "column": 17
         }
       }
@@ -19092,15 +21487,15 @@
         "updateContext": null
       },
       "value": "initialize",
-      "start": 4734,
-      "end": 4746,
+      "start": 5439,
+      "end": 5451,
       "loc": {
         "start": {
-          "line": 173,
+          "line": 202,
           "column": 18
         },
         "end": {
-          "line": 173,
+          "line": 202,
           "column": 30
         }
       }
@@ -19118,15 +21513,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 4746,
-      "end": 4747,
+      "start": 5451,
+      "end": 5452,
       "loc": {
         "start": {
-          "line": 173,
+          "line": 202,
           "column": 30
         },
         "end": {
-          "line": 173,
+          "line": 202,
           "column": 31
         }
       }
@@ -19144,15 +21539,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 4748,
-      "end": 4751,
+      "start": 5453,
+      "end": 5456,
       "loc": {
         "start": {
-          "line": 173,
+          "line": 202,
           "column": 32
         },
         "end": {
-          "line": 173,
+          "line": 202,
           "column": 35
         }
       }
@@ -19170,15 +21565,15 @@
         "binop": null
       },
       "value": "args",
-      "start": 4751,
-      "end": 4755,
+      "start": 5456,
+      "end": 5460,
       "loc": {
         "start": {
-          "line": 173,
+          "line": 202,
           "column": 35
         },
         "end": {
-          "line": 173,
+          "line": 202,
           "column": 39
         }
       }
@@ -19195,15 +21590,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4755,
-      "end": 4756,
+      "start": 5460,
+      "end": 5461,
       "loc": {
         "start": {
-          "line": 173,
+          "line": 202,
           "column": 39
         },
         "end": {
-          "line": 173,
+          "line": 202,
           "column": 40
         }
       }
@@ -19220,15 +21615,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4759,
-      "end": 4760,
+      "start": 5464,
+      "end": 5465,
       "loc": {
         "start": {
-          "line": 174,
+          "line": 203,
           "column": 2
         },
         "end": {
-          "line": 174,
+          "line": 203,
           "column": 3
         }
       }
@@ -19245,31 +21640,31 @@
         "postfix": false,
         "binop": null
       },
-      "start": 4762,
-      "end": 4763,
+      "start": 5467,
+      "end": 5468,
       "loc": {
         "start": {
-          "line": 175,
+          "line": 204,
           "column": 1
         },
         "end": {
-          "line": 175,
+          "line": 204,
           "column": 2
         }
       }
     },
     {
       "type": "CommentBlock",
-      "value": "*\n\t * Calls pre(), every(), and post() on all systems\n\t *\n\t * @example\n\t * world.run(deltaTime)\n\t *\n\t * @example\n\t * // Example flow of method call order:\n\t * // Setup systems:\n\t * world.system([], systemA)\n\t * world.system([], systemB)\n\t * // During world.run():\n\t * // systemA.pre()\n\t * // systemA.every() * number of entities\n\t * // systemA.post()\n\t * // systemB.pre()\n\t * // systemB.every() * number of entities\n\t * // systemB.post()\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' methods\n\t ",
-      "start": 4766,
-      "end": 5295,
+      "value": "*\n\t * Calls pre(), every(), and post() on all systems\n\t *\n\t * @example\n\t * world.run(deltaTime)\n\t *\n\t * @example\n\t * // Example flow of method call order:\n\t * // Setup systems:\n\t * world.system(systemA)\n\t * world.system(systemB)\n\t * // During world.run():\n\t * // systemA.pre()\n\t * // systemA.every() * number of entities\n\t * // systemA.post()\n\t * // systemB.pre()\n\t * // systemB.every() * number of entities\n\t * // systemB.post()\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' methods\n\t ",
+      "start": 5471,
+      "end": 5992,
       "loc": {
         "start": {
-          "line": 177,
+          "line": 206,
           "column": 1
         },
         "end": {
-          "line": 197,
+          "line": 226,
           "column": 4
         }
       }
@@ -19287,15 +21682,15 @@
         "binop": null
       },
       "value": "run",
-      "start": 5297,
-      "end": 5300,
+      "start": 5994,
+      "end": 5997,
       "loc": {
         "start": {
-          "line": 198,
+          "line": 227,
           "column": 1
         },
         "end": {
-          "line": 198,
+          "line": 227,
           "column": 4
         }
       }
@@ -19312,15 +21707,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5300,
-      "end": 5301,
+      "start": 5997,
+      "end": 5998,
       "loc": {
         "start": {
-          "line": 198,
+          "line": 227,
           "column": 4
         },
         "end": {
-          "line": 198,
+          "line": 227,
           "column": 5
         }
       }
@@ -19338,15 +21733,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5301,
-      "end": 5304,
+      "start": 5998,
+      "end": 6001,
       "loc": {
         "start": {
-          "line": 198,
+          "line": 227,
           "column": 5
         },
         "end": {
-          "line": 198,
+          "line": 227,
           "column": 8
         }
       }
@@ -19364,15 +21759,15 @@
         "binop": null
       },
       "value": "args",
-      "start": 5304,
-      "end": 5308,
+      "start": 6001,
+      "end": 6005,
       "loc": {
         "start": {
-          "line": 198,
+          "line": 227,
           "column": 8
         },
         "end": {
-          "line": 198,
+          "line": 227,
           "column": 12
         }
       }
@@ -19389,15 +21784,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5308,
-      "end": 5309,
+      "start": 6005,
+      "end": 6006,
       "loc": {
         "start": {
-          "line": 198,
+          "line": 227,
           "column": 12
         },
         "end": {
-          "line": 198,
+          "line": 227,
           "column": 13
         }
       }
@@ -19414,15 +21809,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5310,
-      "end": 5311,
+      "start": 6007,
+      "end": 6008,
       "loc": {
         "start": {
-          "line": 198,
+          "line": 227,
           "column": 14
         },
         "end": {
-          "line": 198,
+          "line": 227,
           "column": 15
         }
       }
@@ -19442,15 +21837,15 @@
         "updateContext": null
       },
       "value": "for",
-      "start": 5314,
-      "end": 5317,
+      "start": 6011,
+      "end": 6014,
       "loc": {
         "start": {
-          "line": 199,
+          "line": 228,
           "column": 2
         },
         "end": {
-          "line": 199,
+          "line": 228,
           "column": 5
         }
       }
@@ -19467,15 +21862,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5318,
-      "end": 5319,
+      "start": 6015,
+      "end": 6016,
       "loc": {
         "start": {
-          "line": 199,
+          "line": 228,
           "column": 6
         },
         "end": {
-          "line": 199,
+          "line": 228,
           "column": 7
         }
       }
@@ -19495,15 +21890,15 @@
         "updateContext": null
       },
       "value": "let",
-      "start": 5319,
-      "end": 5322,
+      "start": 6016,
+      "end": 6019,
       "loc": {
         "start": {
-          "line": 199,
+          "line": 228,
           "column": 7
         },
         "end": {
-          "line": 199,
+          "line": 228,
           "column": 10
         }
       }
@@ -19521,15 +21916,15 @@
         "binop": null
       },
       "value": "system",
-      "start": 5323,
-      "end": 5329,
+      "start": 6020,
+      "end": 6026,
       "loc": {
         "start": {
-          "line": 199,
+          "line": 228,
           "column": 11
         },
         "end": {
-          "line": 199,
+          "line": 228,
           "column": 17
         }
       }
@@ -19547,15 +21942,15 @@
         "binop": null
       },
       "value": "of",
-      "start": 5330,
-      "end": 5332,
+      "start": 6027,
+      "end": 6029,
       "loc": {
         "start": {
-          "line": 199,
+          "line": 228,
           "column": 18
         },
         "end": {
-          "line": 199,
+          "line": 228,
           "column": 20
         }
       }
@@ -19575,15 +21970,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 5333,
-      "end": 5337,
+      "start": 6030,
+      "end": 6034,
       "loc": {
         "start": {
-          "line": 199,
+          "line": 228,
           "column": 21
         },
         "end": {
-          "line": 199,
+          "line": 228,
           "column": 25
         }
       }
@@ -19601,15 +21996,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5337,
-      "end": 5338,
+      "start": 6034,
+      "end": 6035,
       "loc": {
         "start": {
-          "line": 199,
+          "line": 228,
           "column": 25
         },
         "end": {
-          "line": 199,
+          "line": 228,
           "column": 26
         }
       }
@@ -19627,15 +22022,15 @@
         "binop": null
       },
       "value": "systems",
-      "start": 5338,
-      "end": 5345,
+      "start": 6035,
+      "end": 6042,
       "loc": {
         "start": {
-          "line": 199,
+          "line": 228,
           "column": 26
         },
         "end": {
-          "line": 199,
+          "line": 228,
           "column": 33
         }
       }
@@ -19652,15 +22047,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5345,
-      "end": 5346,
+      "start": 6042,
+      "end": 6043,
       "loc": {
         "start": {
-          "line": 199,
+          "line": 228,
           "column": 33
         },
         "end": {
-          "line": 199,
+          "line": 228,
           "column": 34
         }
       }
@@ -19677,15 +22072,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5347,
-      "end": 5348,
+      "start": 6044,
+      "end": 6045,
       "loc": {
         "start": {
-          "line": 199,
+          "line": 228,
           "column": 35
         },
         "end": {
-          "line": 199,
+          "line": 228,
           "column": 36
         }
       }
@@ -19703,15 +22098,15 @@
         "binop": null
       },
       "value": "invoke",
-      "start": 5352,
-      "end": 5358,
+      "start": 6049,
+      "end": 6055,
       "loc": {
         "start": {
-          "line": 200,
+          "line": 229,
           "column": 3
         },
         "end": {
-          "line": 200,
+          "line": 229,
           "column": 9
         }
       }
@@ -19728,15 +22123,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5358,
-      "end": 5359,
+      "start": 6055,
+      "end": 6056,
       "loc": {
         "start": {
-          "line": 200,
+          "line": 229,
           "column": 9
         },
         "end": {
-          "line": 200,
+          "line": 229,
           "column": 10
         }
       }
@@ -19754,15 +22149,15 @@
         "binop": null
       },
       "value": "system",
-      "start": 5359,
-      "end": 5365,
+      "start": 6056,
+      "end": 6062,
       "loc": {
         "start": {
-          "line": 200,
+          "line": 229,
           "column": 10
         },
         "end": {
-          "line": 200,
+          "line": 229,
           "column": 16
         }
       }
@@ -19780,15 +22175,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5365,
-      "end": 5366,
+      "start": 6062,
+      "end": 6063,
       "loc": {
         "start": {
-          "line": 200,
+          "line": 229,
           "column": 16
         },
         "end": {
-          "line": 200,
+          "line": 229,
           "column": 17
         }
       }
@@ -19807,15 +22202,15 @@
         "updateContext": null
       },
       "value": "pre",
-      "start": 5367,
-      "end": 5372,
+      "start": 6064,
+      "end": 6069,
       "loc": {
         "start": {
-          "line": 200,
+          "line": 229,
           "column": 18
         },
         "end": {
-          "line": 200,
+          "line": 229,
           "column": 23
         }
       }
@@ -19833,15 +22228,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5372,
-      "end": 5373,
+      "start": 6069,
+      "end": 6070,
       "loc": {
         "start": {
-          "line": 200,
+          "line": 229,
           "column": 23
         },
         "end": {
-          "line": 200,
+          "line": 229,
           "column": 24
         }
       }
@@ -19859,15 +22254,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5374,
-      "end": 5377,
+      "start": 6071,
+      "end": 6074,
       "loc": {
         "start": {
-          "line": 200,
+          "line": 229,
           "column": 25
         },
         "end": {
-          "line": 200,
+          "line": 229,
           "column": 28
         }
       }
@@ -19885,15 +22280,15 @@
         "binop": null
       },
       "value": "args",
-      "start": 5377,
-      "end": 5381,
+      "start": 6074,
+      "end": 6078,
       "loc": {
         "start": {
-          "line": 200,
+          "line": 229,
           "column": 28
         },
         "end": {
-          "line": 200,
+          "line": 229,
           "column": 32
         }
       }
@@ -19910,15 +22305,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5381,
-      "end": 5382,
+      "start": 6078,
+      "end": 6079,
       "loc": {
         "start": {
-          "line": 200,
+          "line": 229,
           "column": 32
         },
         "end": {
-          "line": 200,
+          "line": 229,
           "column": 33
         }
       }
@@ -19926,15 +22321,15 @@
     {
       "type": "CommentLine",
       "value": " Run the \"every\" method in the system",
-      "start": 5387,
-      "end": 5426,
+      "start": 6084,
+      "end": 6123,
       "loc": {
         "start": {
-          "line": 202,
+          "line": 231,
           "column": 3
         },
         "end": {
-          "line": 202,
+          "line": 231,
           "column": 42
         }
       }
@@ -19954,15 +22349,15 @@
         "updateContext": null
       },
       "value": "if",
-      "start": 5430,
-      "end": 5432,
+      "start": 6127,
+      "end": 6129,
       "loc": {
         "start": {
-          "line": 203,
+          "line": 232,
           "column": 3
         },
         "end": {
-          "line": 203,
+          "line": 232,
           "column": 5
         }
       }
@@ -19979,15 +22374,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5433,
-      "end": 5434,
+      "start": 6130,
+      "end": 6131,
       "loc": {
         "start": {
-          "line": 203,
+          "line": 232,
           "column": 6
         },
         "end": {
-          "line": 203,
+          "line": 232,
           "column": 7
         }
       }
@@ -20005,15 +22400,15 @@
         "binop": null
       },
       "value": "isFunction",
-      "start": 5434,
-      "end": 5444,
+      "start": 6131,
+      "end": 6141,
       "loc": {
         "start": {
-          "line": 203,
+          "line": 232,
           "column": 7
         },
         "end": {
-          "line": 203,
+          "line": 232,
           "column": 17
         }
       }
@@ -20030,15 +22425,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5444,
-      "end": 5445,
+      "start": 6141,
+      "end": 6142,
       "loc": {
         "start": {
-          "line": 203,
+          "line": 232,
           "column": 17
         },
         "end": {
-          "line": 203,
+          "line": 232,
           "column": 18
         }
       }
@@ -20056,15 +22451,15 @@
         "binop": null
       },
       "value": "system",
-      "start": 5445,
-      "end": 5451,
+      "start": 6142,
+      "end": 6148,
       "loc": {
         "start": {
-          "line": 203,
+          "line": 232,
           "column": 18
         },
         "end": {
-          "line": 203,
+          "line": 232,
           "column": 24
         }
       }
@@ -20082,15 +22477,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5451,
-      "end": 5452,
+      "start": 6148,
+      "end": 6149,
       "loc": {
         "start": {
-          "line": 203,
+          "line": 232,
           "column": 24
         },
         "end": {
-          "line": 203,
+          "line": 232,
           "column": 25
         }
       }
@@ -20108,15 +22503,15 @@
         "binop": null
       },
       "value": "every",
-      "start": 5452,
-      "end": 5457,
+      "start": 6149,
+      "end": 6154,
       "loc": {
         "start": {
-          "line": 203,
+          "line": 232,
           "column": 25
         },
         "end": {
-          "line": 203,
+          "line": 232,
           "column": 30
         }
       }
@@ -20133,15 +22528,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5457,
-      "end": 5458,
+      "start": 6154,
+      "end": 6155,
       "loc": {
         "start": {
-          "line": 203,
+          "line": 232,
           "column": 30
         },
         "end": {
-          "line": 203,
+          "line": 232,
           "column": 31
         }
       }
@@ -20158,15 +22553,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5458,
-      "end": 5459,
+      "start": 6155,
+      "end": 6156,
       "loc": {
         "start": {
-          "line": 203,
+          "line": 232,
           "column": 31
         },
         "end": {
-          "line": 203,
+          "line": 232,
           "column": 32
         }
       }
@@ -20183,15 +22578,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5460,
-      "end": 5461,
+      "start": 6157,
+      "end": 6158,
       "loc": {
         "start": {
-          "line": 203,
+          "line": 232,
           "column": 33
         },
         "end": {
-          "line": 203,
+          "line": 232,
           "column": 34
         }
       }
@@ -20211,15 +22606,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 5466,
-      "end": 5470,
+      "start": 6163,
+      "end": 6167,
       "loc": {
         "start": {
-          "line": 204,
+          "line": 233,
           "column": 4
         },
         "end": {
-          "line": 204,
+          "line": 233,
           "column": 8
         }
       }
@@ -20237,15 +22632,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5470,
-      "end": 5471,
+      "start": 6167,
+      "end": 6168,
       "loc": {
         "start": {
-          "line": 204,
+          "line": 233,
           "column": 8
         },
         "end": {
-          "line": 204,
+          "line": 233,
           "column": 9
         }
       }
@@ -20263,15 +22658,15 @@
         "binop": null
       },
       "value": "every",
-      "start": 5471,
-      "end": 5476,
+      "start": 6168,
+      "end": 6173,
       "loc": {
         "start": {
-          "line": 204,
+          "line": 233,
           "column": 9
         },
         "end": {
-          "line": 204,
+          "line": 233,
           "column": 14
         }
       }
@@ -20288,15 +22683,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5476,
-      "end": 5477,
+      "start": 6173,
+      "end": 6174,
       "loc": {
         "start": {
-          "line": 204,
+          "line": 233,
           "column": 14
         },
         "end": {
-          "line": 204,
+          "line": 233,
           "column": 15
         }
       }
@@ -20314,15 +22709,15 @@
         "binop": null
       },
       "value": "system",
-      "start": 5477,
-      "end": 5483,
+      "start": 6174,
+      "end": 6180,
       "loc": {
         "start": {
-          "line": 204,
+          "line": 233,
           "column": 15
         },
         "end": {
-          "line": 204,
+          "line": 233,
           "column": 21
         }
       }
@@ -20340,15 +22735,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5483,
-      "end": 5484,
+      "start": 6180,
+      "end": 6181,
       "loc": {
         "start": {
-          "line": 204,
+          "line": 233,
           "column": 21
         },
         "end": {
-          "line": 204,
+          "line": 233,
           "column": 22
         }
       }
@@ -20366,15 +22761,15 @@
         "binop": null
       },
       "value": "components",
-      "start": 5484,
-      "end": 5494,
+      "start": 6181,
+      "end": 6191,
       "loc": {
         "start": {
-          "line": 204,
+          "line": 233,
           "column": 22
         },
         "end": {
-          "line": 204,
+          "line": 233,
           "column": 32
         }
       }
@@ -20392,15 +22787,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5494,
-      "end": 5495,
+      "start": 6191,
+      "end": 6192,
       "loc": {
         "start": {
-          "line": 204,
+          "line": 233,
           "column": 32
         },
         "end": {
-          "line": 204,
+          "line": 233,
           "column": 33
         }
       }
@@ -20418,15 +22813,15 @@
         "binop": null
       },
       "value": "system",
-      "start": 5496,
-      "end": 5502,
+      "start": 6193,
+      "end": 6199,
       "loc": {
         "start": {
-          "line": 204,
+          "line": 233,
           "column": 34
         },
         "end": {
-          "line": 204,
+          "line": 233,
           "column": 40
         }
       }
@@ -20444,15 +22839,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5502,
-      "end": 5503,
+      "start": 6199,
+      "end": 6200,
       "loc": {
         "start": {
-          "line": 204,
+          "line": 233,
           "column": 40
         },
         "end": {
-          "line": 204,
+          "line": 233,
           "column": 41
         }
       }
@@ -20470,15 +22865,15 @@
         "binop": null
       },
       "value": "every",
-      "start": 5503,
-      "end": 5508,
+      "start": 6200,
+      "end": 6205,
       "loc": {
         "start": {
-          "line": 204,
+          "line": 233,
           "column": 41
         },
         "end": {
-          "line": 204,
+          "line": 233,
           "column": 46
         }
       }
@@ -20496,15 +22891,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5508,
-      "end": 5509,
+      "start": 6205,
+      "end": 6206,
       "loc": {
         "start": {
-          "line": 204,
+          "line": 233,
           "column": 46
         },
         "end": {
-          "line": 204,
+          "line": 233,
           "column": 47
         }
       }
@@ -20522,15 +22917,15 @@
         "binop": null
       },
       "value": "bind",
-      "start": 5509,
-      "end": 5513,
+      "start": 6206,
+      "end": 6210,
       "loc": {
         "start": {
-          "line": 204,
+          "line": 233,
           "column": 47
         },
         "end": {
-          "line": 204,
+          "line": 233,
           "column": 51
         }
       }
@@ -20547,15 +22942,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5513,
-      "end": 5514,
+      "start": 6210,
+      "end": 6211,
       "loc": {
         "start": {
-          "line": 204,
+          "line": 233,
           "column": 51
         },
         "end": {
-          "line": 204,
+          "line": 233,
           "column": 52
         }
       }
@@ -20573,15 +22968,15 @@
         "binop": null
       },
       "value": "system",
-      "start": 5514,
-      "end": 5520,
+      "start": 6211,
+      "end": 6217,
       "loc": {
         "start": {
-          "line": 204,
+          "line": 233,
           "column": 52
         },
         "end": {
-          "line": 204,
+          "line": 233,
           "column": 58
         }
       }
@@ -20598,15 +22993,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5520,
-      "end": 5521,
+      "start": 6217,
+      "end": 6218,
       "loc": {
         "start": {
-          "line": 204,
+          "line": 233,
           "column": 58
         },
         "end": {
-          "line": 204,
+          "line": 233,
           "column": 59
         }
       }
@@ -20624,15 +23019,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5521,
-      "end": 5522,
+      "start": 6218,
+      "end": 6219,
       "loc": {
         "start": {
-          "line": 204,
+          "line": 233,
           "column": 59
         },
         "end": {
-          "line": 204,
+          "line": 233,
           "column": 60
         }
       }
@@ -20650,15 +23045,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5523,
-      "end": 5526,
+      "start": 6220,
+      "end": 6223,
       "loc": {
         "start": {
-          "line": 204,
+          "line": 233,
           "column": 61
         },
         "end": {
-          "line": 204,
+          "line": 233,
           "column": 64
         }
       }
@@ -20676,15 +23071,15 @@
         "binop": null
       },
       "value": "args",
-      "start": 5526,
-      "end": 5530,
+      "start": 6223,
+      "end": 6227,
       "loc": {
         "start": {
-          "line": 204,
+          "line": 233,
           "column": 64
         },
         "end": {
-          "line": 204,
+          "line": 233,
           "column": 68
         }
       }
@@ -20701,15 +23096,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5530,
-      "end": 5531,
+      "start": 6227,
+      "end": 6228,
       "loc": {
         "start": {
-          "line": 204,
+          "line": 233,
           "column": 68
         },
         "end": {
-          "line": 204,
+          "line": 233,
           "column": 69
         }
       }
@@ -20726,15 +23121,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5535,
-      "end": 5536,
+      "start": 6232,
+      "end": 6233,
       "loc": {
         "start": {
-          "line": 205,
+          "line": 234,
           "column": 3
         },
         "end": {
-          "line": 205,
+          "line": 234,
           "column": 4
         }
       }
@@ -20752,15 +23147,15 @@
         "binop": null
       },
       "value": "invoke",
-      "start": 5541,
-      "end": 5547,
+      "start": 6238,
+      "end": 6244,
       "loc": {
         "start": {
-          "line": 207,
+          "line": 236,
           "column": 3
         },
         "end": {
-          "line": 207,
+          "line": 236,
           "column": 9
         }
       }
@@ -20777,15 +23172,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5547,
-      "end": 5548,
+      "start": 6244,
+      "end": 6245,
       "loc": {
         "start": {
-          "line": 207,
+          "line": 236,
           "column": 9
         },
         "end": {
-          "line": 207,
+          "line": 236,
           "column": 10
         }
       }
@@ -20803,15 +23198,15 @@
         "binop": null
       },
       "value": "system",
-      "start": 5548,
-      "end": 5554,
+      "start": 6245,
+      "end": 6251,
       "loc": {
         "start": {
-          "line": 207,
+          "line": 236,
           "column": 10
         },
         "end": {
-          "line": 207,
+          "line": 236,
           "column": 16
         }
       }
@@ -20829,15 +23224,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5554,
-      "end": 5555,
+      "start": 6251,
+      "end": 6252,
       "loc": {
         "start": {
-          "line": 207,
+          "line": 236,
           "column": 16
         },
         "end": {
-          "line": 207,
+          "line": 236,
           "column": 17
         }
       }
@@ -20856,15 +23251,15 @@
         "updateContext": null
       },
       "value": "post",
-      "start": 5556,
-      "end": 5562,
+      "start": 6253,
+      "end": 6259,
       "loc": {
         "start": {
-          "line": 207,
+          "line": 236,
           "column": 18
         },
         "end": {
-          "line": 207,
+          "line": 236,
           "column": 24
         }
       }
@@ -20882,15 +23277,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5562,
-      "end": 5563,
+      "start": 6259,
+      "end": 6260,
       "loc": {
         "start": {
-          "line": 207,
+          "line": 236,
           "column": 24
         },
         "end": {
-          "line": 207,
+          "line": 236,
           "column": 25
         }
       }
@@ -20908,15 +23303,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 5564,
-      "end": 5567,
+      "start": 6261,
+      "end": 6264,
       "loc": {
         "start": {
-          "line": 207,
+          "line": 236,
           "column": 26
         },
         "end": {
-          "line": 207,
+          "line": 236,
           "column": 29
         }
       }
@@ -20934,15 +23329,15 @@
         "binop": null
       },
       "value": "args",
-      "start": 5567,
-      "end": 5571,
+      "start": 6264,
+      "end": 6268,
       "loc": {
         "start": {
-          "line": 207,
+          "line": 236,
           "column": 29
         },
         "end": {
-          "line": 207,
+          "line": 236,
           "column": 33
         }
       }
@@ -20959,15 +23354,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5571,
-      "end": 5572,
+      "start": 6268,
+      "end": 6269,
       "loc": {
         "start": {
-          "line": 207,
+          "line": 236,
           "column": 33
         },
         "end": {
-          "line": 207,
+          "line": 236,
           "column": 34
         }
       }
@@ -20984,15 +23379,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5575,
-      "end": 5576,
+      "start": 6272,
+      "end": 6273,
       "loc": {
         "start": {
-          "line": 208,
+          "line": 237,
           "column": 2
         },
         "end": {
-          "line": 208,
+          "line": 237,
           "column": 3
         }
       }
@@ -21009,15 +23404,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 5578,
-      "end": 5579,
+      "start": 6275,
+      "end": 6276,
       "loc": {
         "start": {
-          "line": 209,
+          "line": 238,
           "column": 1
         },
         "end": {
-          "line": 209,
+          "line": 238,
           "column": 2
         }
       }
@@ -21025,15 +23420,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Iterate through entities with the specified components\n\t *\n\t * @example\n\t * // Use a callback to process entities one-by-one\n\t * world.every(['comp'], comp => {comp.value = 0})\n\t *\n\t * @example\n\t * // Get an iterator for the entities\n\t * let it = world.every(['comp'])\n\t * for (let entity of it) {...}\n\t *\n\t * @param {Array}     componentNames - The component names to match entites with. This checks if the entity\n\t * has ALL of the specified components, but does not check for additional components.\n\t * @param {Function}  callback       - The callback to call for each entity. Takes (...components, entity, ...args).\n\t * @param {...Object} [args]         - Any additional arguments to pass to the callback.\n\t *\n\t * @return {MapIterator} An iterator to the entities themselves\n\t ",
-      "start": 5582,
-      "end": 6373,
+      "start": 6279,
+      "end": 7070,
       "loc": {
         "start": {
-          "line": 211,
+          "line": 240,
           "column": 1
         },
         "end": {
-          "line": 229,
+          "line": 258,
           "column": 4
         }
       }
@@ -21051,15 +23446,15 @@
         "binop": null
       },
       "value": "every",
-      "start": 6375,
-      "end": 6380,
+      "start": 7072,
+      "end": 7077,
       "loc": {
         "start": {
-          "line": 230,
+          "line": 259,
           "column": 1
         },
         "end": {
-          "line": 230,
+          "line": 259,
           "column": 6
         }
       }
@@ -21076,15 +23471,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6380,
-      "end": 6381,
+      "start": 7077,
+      "end": 7078,
       "loc": {
         "start": {
-          "line": 230,
+          "line": 259,
           "column": 6
         },
         "end": {
-          "line": 230,
+          "line": 259,
           "column": 7
         }
       }
@@ -21102,15 +23497,15 @@
         "binop": null
       },
       "value": "componentNames",
-      "start": 6381,
-      "end": 6395,
+      "start": 7078,
+      "end": 7092,
       "loc": {
         "start": {
-          "line": 230,
+          "line": 259,
           "column": 7
         },
         "end": {
-          "line": 230,
+          "line": 259,
           "column": 21
         }
       }
@@ -21128,15 +23523,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 6395,
-      "end": 6396,
+      "start": 7092,
+      "end": 7093,
       "loc": {
         "start": {
-          "line": 230,
+          "line": 259,
           "column": 21
         },
         "end": {
-          "line": 230,
+          "line": 259,
           "column": 22
         }
       }
@@ -21154,15 +23549,15 @@
         "binop": null
       },
       "value": "callback",
-      "start": 6397,
-      "end": 6405,
+      "start": 7094,
+      "end": 7102,
       "loc": {
         "start": {
-          "line": 230,
+          "line": 259,
           "column": 23
         },
         "end": {
-          "line": 230,
+          "line": 259,
           "column": 31
         }
       }
@@ -21180,15 +23575,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 6405,
-      "end": 6406,
+      "start": 7102,
+      "end": 7103,
       "loc": {
         "start": {
-          "line": 230,
+          "line": 259,
           "column": 31
         },
         "end": {
-          "line": 230,
+          "line": 259,
           "column": 32
         }
       }
@@ -21206,15 +23601,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 6407,
-      "end": 6410,
+      "start": 7104,
+      "end": 7107,
       "loc": {
         "start": {
-          "line": 230,
+          "line": 259,
           "column": 33
         },
         "end": {
-          "line": 230,
+          "line": 259,
           "column": 36
         }
       }
@@ -21232,15 +23627,15 @@
         "binop": null
       },
       "value": "args",
-      "start": 6410,
-      "end": 6414,
+      "start": 7107,
+      "end": 7111,
       "loc": {
         "start": {
-          "line": 230,
+          "line": 259,
           "column": 36
         },
         "end": {
-          "line": 230,
+          "line": 259,
           "column": 40
         }
       }
@@ -21257,15 +23652,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6414,
-      "end": 6415,
+      "start": 7111,
+      "end": 7112,
       "loc": {
         "start": {
-          "line": 230,
+          "line": 259,
           "column": 40
         },
         "end": {
-          "line": 230,
+          "line": 259,
           "column": 41
         }
       }
@@ -21282,15 +23677,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6416,
-      "end": 6417,
+      "start": 7113,
+      "end": 7114,
       "loc": {
         "start": {
-          "line": 230,
+          "line": 259,
           "column": 42
         },
         "end": {
-          "line": 230,
+          "line": 259,
           "column": 43
         }
       }
@@ -21298,15 +23693,15 @@
     {
       "type": "CommentLine",
       "value": " Get indexed map of entities",
-      "start": 6420,
-      "end": 6450,
+      "start": 7117,
+      "end": 7147,
       "loc": {
         "start": {
-          "line": 231,
+          "line": 260,
           "column": 2
         },
         "end": {
-          "line": 231,
+          "line": 260,
           "column": 32
         }
       }
@@ -21326,15 +23721,15 @@
         "updateContext": null
       },
       "value": "let",
-      "start": 6453,
-      "end": 6456,
+      "start": 7150,
+      "end": 7153,
       "loc": {
         "start": {
-          "line": 232,
+          "line": 261,
           "column": 2
         },
         "end": {
-          "line": 232,
+          "line": 261,
           "column": 5
         }
       }
@@ -21352,15 +23747,15 @@
         "binop": null
       },
       "value": "entities",
-      "start": 6457,
-      "end": 6465,
+      "start": 7154,
+      "end": 7162,
       "loc": {
         "start": {
-          "line": 232,
+          "line": 261,
           "column": 6
         },
         "end": {
-          "line": 232,
+          "line": 261,
           "column": 14
         }
       }
@@ -21379,15 +23774,15 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 6466,
-      "end": 6467,
+      "start": 7163,
+      "end": 7164,
       "loc": {
         "start": {
-          "line": 232,
+          "line": 261,
           "column": 15
         },
         "end": {
-          "line": 232,
+          "line": 261,
           "column": 16
         }
       }
@@ -21407,15 +23802,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 6468,
-      "end": 6472,
+      "start": 7165,
+      "end": 7169,
       "loc": {
         "start": {
-          "line": 232,
+          "line": 261,
           "column": 17
         },
         "end": {
-          "line": 232,
+          "line": 261,
           "column": 21
         }
       }
@@ -21433,15 +23828,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 6472,
-      "end": 6473,
+      "start": 7169,
+      "end": 7170,
       "loc": {
         "start": {
-          "line": 232,
+          "line": 261,
           "column": 21
         },
         "end": {
-          "line": 232,
+          "line": 261,
           "column": 22
         }
       }
@@ -21459,15 +23854,15 @@
         "binop": null
       },
       "value": "index",
-      "start": 6473,
-      "end": 6478,
+      "start": 7170,
+      "end": 7175,
       "loc": {
         "start": {
-          "line": 232,
+          "line": 261,
           "column": 22
         },
         "end": {
-          "line": 232,
+          "line": 261,
           "column": 27
         }
       }
@@ -21485,15 +23880,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 6478,
-      "end": 6479,
+      "start": 7175,
+      "end": 7176,
       "loc": {
         "start": {
-          "line": 232,
+          "line": 261,
           "column": 27
         },
         "end": {
-          "line": 232,
+          "line": 261,
           "column": 28
         }
       }
@@ -21511,15 +23906,15 @@
         "binop": null
       },
       "value": "query",
-      "start": 6479,
-      "end": 6484,
+      "start": 7176,
+      "end": 7181,
       "loc": {
         "start": {
-          "line": 232,
+          "line": 261,
           "column": 28
         },
         "end": {
-          "line": 232,
+          "line": 261,
           "column": 33
         }
       }
@@ -21536,15 +23931,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6484,
-      "end": 6485,
+      "start": 7181,
+      "end": 7182,
       "loc": {
         "start": {
-          "line": 232,
+          "line": 261,
           "column": 33
         },
         "end": {
-          "line": 232,
+          "line": 261,
           "column": 34
         }
       }
@@ -21562,15 +23957,15 @@
         "binop": null
       },
       "value": "componentNames",
-      "start": 6485,
-      "end": 6499,
+      "start": 7182,
+      "end": 7196,
       "loc": {
         "start": {
-          "line": 232,
+          "line": 261,
           "column": 34
         },
         "end": {
-          "line": 232,
+          "line": 261,
           "column": 48
         }
       }
@@ -21587,15 +23982,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6499,
-      "end": 6500,
+      "start": 7196,
+      "end": 7197,
       "loc": {
         "start": {
-          "line": 232,
+          "line": 261,
           "column": 48
         },
         "end": {
-          "line": 232,
+          "line": 261,
           "column": 49
         }
       }
@@ -21615,15 +24010,15 @@
         "updateContext": null
       },
       "value": "if",
-      "start": 6504,
-      "end": 6506,
+      "start": 7201,
+      "end": 7203,
       "loc": {
         "start": {
-          "line": 234,
+          "line": 263,
           "column": 2
         },
         "end": {
-          "line": 234,
+          "line": 263,
           "column": 4
         }
       }
@@ -21640,15 +24035,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6507,
-      "end": 6508,
+      "start": 7204,
+      "end": 7205,
       "loc": {
         "start": {
-          "line": 234,
+          "line": 263,
           "column": 5
         },
         "end": {
-          "line": 234,
+          "line": 263,
           "column": 6
         }
       }
@@ -21666,15 +24061,15 @@
         "binop": null
       },
       "value": "isFunction",
-      "start": 6508,
-      "end": 6518,
+      "start": 7205,
+      "end": 7215,
       "loc": {
         "start": {
-          "line": 234,
+          "line": 263,
           "column": 6
         },
         "end": {
-          "line": 234,
+          "line": 263,
           "column": 16
         }
       }
@@ -21691,15 +24086,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6518,
-      "end": 6519,
+      "start": 7215,
+      "end": 7216,
       "loc": {
         "start": {
-          "line": 234,
+          "line": 263,
           "column": 16
         },
         "end": {
-          "line": 234,
+          "line": 263,
           "column": 17
         }
       }
@@ -21717,15 +24112,15 @@
         "binop": null
       },
       "value": "callback",
-      "start": 6519,
-      "end": 6527,
+      "start": 7216,
+      "end": 7224,
       "loc": {
         "start": {
-          "line": 234,
+          "line": 263,
           "column": 17
         },
         "end": {
-          "line": 234,
+          "line": 263,
           "column": 25
         }
       }
@@ -21742,15 +24137,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6527,
-      "end": 6528,
+      "start": 7224,
+      "end": 7225,
       "loc": {
         "start": {
-          "line": 234,
+          "line": 263,
           "column": 25
         },
         "end": {
-          "line": 234,
+          "line": 263,
           "column": 26
         }
       }
@@ -21767,15 +24162,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6528,
-      "end": 6529,
+      "start": 7225,
+      "end": 7226,
       "loc": {
         "start": {
-          "line": 234,
+          "line": 263,
           "column": 26
         },
         "end": {
-          "line": 234,
+          "line": 263,
           "column": 27
         }
       }
@@ -21792,15 +24187,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6530,
-      "end": 6531,
+      "start": 7227,
+      "end": 7228,
       "loc": {
         "start": {
-          "line": 234,
+          "line": 263,
           "column": 28
         },
         "end": {
-          "line": 234,
+          "line": 263,
           "column": 29
         }
       }
@@ -21808,15 +24203,15 @@
     {
       "type": "CommentLine",
       "value": " Go through the map of entities",
-      "start": 6535,
-      "end": 6568,
+      "start": 7232,
+      "end": 7265,
       "loc": {
         "start": {
-          "line": 235,
+          "line": 264,
           "column": 3
         },
         "end": {
-          "line": 235,
+          "line": 264,
           "column": 36
         }
       }
@@ -21836,15 +24231,15 @@
         "updateContext": null
       },
       "value": "for",
-      "start": 6572,
-      "end": 6575,
+      "start": 7269,
+      "end": 7272,
       "loc": {
         "start": {
-          "line": 236,
+          "line": 265,
           "column": 3
         },
         "end": {
-          "line": 236,
+          "line": 265,
           "column": 6
         }
       }
@@ -21861,15 +24256,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6576,
-      "end": 6577,
+      "start": 7273,
+      "end": 7274,
       "loc": {
         "start": {
-          "line": 236,
+          "line": 265,
           "column": 7
         },
         "end": {
-          "line": 236,
+          "line": 265,
           "column": 8
         }
       }
@@ -21889,15 +24284,15 @@
         "updateContext": null
       },
       "value": "let",
-      "start": 6577,
-      "end": 6580,
+      "start": 7274,
+      "end": 7277,
       "loc": {
         "start": {
-          "line": 236,
+          "line": 265,
           "column": 8
         },
         "end": {
-          "line": 236,
+          "line": 265,
           "column": 11
         }
       }
@@ -21915,15 +24310,15 @@
         "binop": null
       },
       "value": "entity",
-      "start": 6581,
-      "end": 6587,
+      "start": 7278,
+      "end": 7284,
       "loc": {
         "start": {
-          "line": 236,
+          "line": 265,
           "column": 12
         },
         "end": {
-          "line": 236,
+          "line": 265,
           "column": 18
         }
       }
@@ -21941,15 +24336,15 @@
         "binop": null
       },
       "value": "of",
-      "start": 6588,
-      "end": 6590,
+      "start": 7285,
+      "end": 7287,
       "loc": {
         "start": {
-          "line": 236,
+          "line": 265,
           "column": 19
         },
         "end": {
-          "line": 236,
+          "line": 265,
           "column": 21
         }
       }
@@ -21967,15 +24362,15 @@
         "binop": null
       },
       "value": "entities",
-      "start": 6591,
-      "end": 6599,
+      "start": 7288,
+      "end": 7296,
       "loc": {
         "start": {
-          "line": 236,
+          "line": 265,
           "column": 22
         },
         "end": {
-          "line": 236,
+          "line": 265,
           "column": 30
         }
       }
@@ -21993,15 +24388,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 6599,
-      "end": 6600,
+      "start": 7296,
+      "end": 7297,
       "loc": {
         "start": {
-          "line": 236,
+          "line": 265,
           "column": 30
         },
         "end": {
-          "line": 236,
+          "line": 265,
           "column": 31
         }
       }
@@ -22019,15 +24414,15 @@
         "binop": null
       },
       "value": "values",
-      "start": 6600,
-      "end": 6606,
+      "start": 7297,
+      "end": 7303,
       "loc": {
         "start": {
-          "line": 236,
+          "line": 265,
           "column": 31
         },
         "end": {
-          "line": 236,
+          "line": 265,
           "column": 37
         }
       }
@@ -22044,15 +24439,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6606,
-      "end": 6607,
+      "start": 7303,
+      "end": 7304,
       "loc": {
         "start": {
-          "line": 236,
+          "line": 265,
           "column": 37
         },
         "end": {
-          "line": 236,
+          "line": 265,
           "column": 38
         }
       }
@@ -22069,15 +24464,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6607,
-      "end": 6608,
+      "start": 7304,
+      "end": 7305,
       "loc": {
         "start": {
-          "line": 236,
+          "line": 265,
           "column": 38
         },
         "end": {
-          "line": 236,
+          "line": 265,
           "column": 39
         }
       }
@@ -22094,15 +24489,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6608,
-      "end": 6609,
+      "start": 7305,
+      "end": 7306,
       "loc": {
         "start": {
-          "line": 236,
+          "line": 265,
           "column": 39
         },
         "end": {
-          "line": 236,
+          "line": 265,
           "column": 40
         }
       }
@@ -22119,15 +24514,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6610,
-      "end": 6611,
+      "start": 7307,
+      "end": 7308,
       "loc": {
         "start": {
-          "line": 236,
+          "line": 265,
           "column": 41
         },
         "end": {
-          "line": 236,
+          "line": 265,
           "column": 42
         }
       }
@@ -22135,15 +24530,15 @@
     {
       "type": "CommentLine",
       "value": " At this point, we can safely assume that all components exist, even if entities/components",
-      "start": 6616,
-      "end": 6709,
+      "start": 7313,
+      "end": 7406,
       "loc": {
         "start": {
-          "line": 237,
+          "line": 266,
           "column": 4
         },
         "end": {
-          "line": 237,
+          "line": 266,
           "column": 97
         }
       }
@@ -22151,15 +24546,15 @@
     {
       "type": "CommentLine",
       "value": " are deleted/modified during the loop, because JavaScript's MapIterator is smart enough.",
-      "start": 6714,
-      "end": 6804,
+      "start": 7411,
+      "end": 7501,
       "loc": {
         "start": {
-          "line": 238,
+          "line": 267,
           "column": 4
         },
         "end": {
-          "line": 238,
+          "line": 267,
           "column": 94
         }
       }
@@ -22167,15 +24562,15 @@
     {
       "type": "CommentLine",
       "value": " Get all components as an array",
-      "start": 6810,
-      "end": 6843,
+      "start": 7507,
+      "end": 7540,
       "loc": {
         "start": {
-          "line": 240,
+          "line": 269,
           "column": 4
         },
         "end": {
-          "line": 240,
+          "line": 269,
           "column": 37
         }
       }
@@ -22195,15 +24590,15 @@
         "updateContext": null
       },
       "value": "let",
-      "start": 6848,
-      "end": 6851,
+      "start": 7545,
+      "end": 7548,
       "loc": {
         "start": {
-          "line": 241,
+          "line": 270,
           "column": 4
         },
         "end": {
-          "line": 241,
+          "line": 270,
           "column": 7
         }
       }
@@ -22221,15 +24616,15 @@
         "binop": null
       },
       "value": "components",
-      "start": 6852,
-      "end": 6862,
+      "start": 7549,
+      "end": 7559,
       "loc": {
         "start": {
-          "line": 241,
+          "line": 270,
           "column": 8
         },
         "end": {
-          "line": 241,
+          "line": 270,
           "column": 18
         }
       }
@@ -22248,15 +24643,15 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 6863,
-      "end": 6864,
+      "start": 7560,
+      "end": 7561,
       "loc": {
         "start": {
-          "line": 241,
+          "line": 270,
           "column": 19
         },
         "end": {
-          "line": 241,
+          "line": 270,
           "column": 20
         }
       }
@@ -22274,15 +24669,15 @@
         "binop": null
       },
       "value": "componentNames",
-      "start": 6865,
-      "end": 6879,
+      "start": 7562,
+      "end": 7576,
       "loc": {
         "start": {
-          "line": 241,
+          "line": 270,
           "column": 21
         },
         "end": {
-          "line": 241,
+          "line": 270,
           "column": 35
         }
       }
@@ -22300,15 +24695,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 6879,
-      "end": 6880,
+      "start": 7576,
+      "end": 7577,
       "loc": {
         "start": {
-          "line": 241,
+          "line": 270,
           "column": 35
         },
         "end": {
-          "line": 241,
+          "line": 270,
           "column": 36
         }
       }
@@ -22326,15 +24721,15 @@
         "binop": null
       },
       "value": "map",
-      "start": 6880,
-      "end": 6883,
+      "start": 7577,
+      "end": 7580,
       "loc": {
         "start": {
-          "line": 241,
+          "line": 270,
           "column": 36
         },
         "end": {
-          "line": 241,
+          "line": 270,
           "column": 39
         }
       }
@@ -22351,15 +24746,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6883,
-      "end": 6884,
+      "start": 7580,
+      "end": 7581,
       "loc": {
         "start": {
-          "line": 241,
+          "line": 270,
           "column": 39
         },
         "end": {
-          "line": 241,
+          "line": 270,
           "column": 40
         }
       }
@@ -22377,15 +24772,15 @@
         "binop": null
       },
       "value": "name",
-      "start": 6884,
-      "end": 6888,
+      "start": 7581,
+      "end": 7585,
       "loc": {
         "start": {
-          "line": 241,
+          "line": 270,
           "column": 40
         },
         "end": {
-          "line": 241,
+          "line": 270,
           "column": 44
         }
       }
@@ -22403,15 +24798,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 6889,
-      "end": 6891,
+      "start": 7586,
+      "end": 7588,
       "loc": {
         "start": {
-          "line": 241,
+          "line": 270,
           "column": 45
         },
         "end": {
-          "line": 241,
+          "line": 270,
           "column": 47
         }
       }
@@ -22429,15 +24824,15 @@
         "binop": null
       },
       "value": "entity",
-      "start": 6892,
-      "end": 6898,
+      "start": 7589,
+      "end": 7595,
       "loc": {
         "start": {
-          "line": 241,
+          "line": 270,
           "column": 48
         },
         "end": {
-          "line": 241,
+          "line": 270,
           "column": 54
         }
       }
@@ -22455,15 +24850,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 6898,
-      "end": 6899,
+      "start": 7595,
+      "end": 7596,
       "loc": {
         "start": {
-          "line": 241,
+          "line": 270,
           "column": 54
         },
         "end": {
-          "line": 241,
+          "line": 270,
           "column": 55
         }
       }
@@ -22481,15 +24876,15 @@
         "binop": null
       },
       "value": "get",
-      "start": 6899,
-      "end": 6902,
+      "start": 7596,
+      "end": 7599,
       "loc": {
         "start": {
-          "line": 241,
+          "line": 270,
           "column": 55
         },
         "end": {
-          "line": 241,
+          "line": 270,
           "column": 58
         }
       }
@@ -22506,15 +24901,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6902,
-      "end": 6903,
+      "start": 7599,
+      "end": 7600,
       "loc": {
         "start": {
-          "line": 241,
+          "line": 270,
           "column": 58
         },
         "end": {
-          "line": 241,
+          "line": 270,
           "column": 59
         }
       }
@@ -22532,15 +24927,15 @@
         "binop": null
       },
       "value": "name",
-      "start": 6903,
-      "end": 6907,
+      "start": 7600,
+      "end": 7604,
       "loc": {
         "start": {
-          "line": 241,
+          "line": 270,
           "column": 59
         },
         "end": {
-          "line": 241,
+          "line": 270,
           "column": 63
         }
       }
@@ -22557,15 +24952,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6907,
-      "end": 6908,
+      "start": 7604,
+      "end": 7605,
       "loc": {
         "start": {
-          "line": 241,
+          "line": 270,
           "column": 63
         },
         "end": {
-          "line": 241,
+          "line": 270,
           "column": 64
         }
       }
@@ -22582,15 +24977,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 6908,
-      "end": 6909,
+      "start": 7605,
+      "end": 7606,
       "loc": {
         "start": {
-          "line": 241,
+          "line": 270,
           "column": 64
         },
         "end": {
-          "line": 241,
+          "line": 270,
           "column": 65
         }
       }
@@ -22598,15 +24993,15 @@
     {
       "type": "CommentLine",
       "value": " Pass components, then the main entity, then any additional arguments",
-      "start": 6915,
-      "end": 6986,
+      "start": 7612,
+      "end": 7683,
       "loc": {
         "start": {
-          "line": 243,
+          "line": 272,
           "column": 4
         },
         "end": {
-          "line": 243,
+          "line": 272,
           "column": 75
         }
       }
@@ -22626,15 +25021,15 @@
         "updateContext": null
       },
       "value": "let",
-      "start": 6991,
-      "end": 6994,
+      "start": 7688,
+      "end": 7691,
       "loc": {
         "start": {
-          "line": 244,
+          "line": 273,
           "column": 4
         },
         "end": {
-          "line": 244,
+          "line": 273,
           "column": 7
         }
       }
@@ -22652,15 +25047,15 @@
         "binop": null
       },
       "value": "status",
-      "start": 6995,
-      "end": 7001,
+      "start": 7692,
+      "end": 7698,
       "loc": {
         "start": {
-          "line": 244,
+          "line": 273,
           "column": 8
         },
         "end": {
-          "line": 244,
+          "line": 273,
           "column": 14
         }
       }
@@ -22679,15 +25074,15 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 7002,
-      "end": 7003,
+      "start": 7699,
+      "end": 7700,
       "loc": {
         "start": {
-          "line": 244,
+          "line": 273,
           "column": 15
         },
         "end": {
-          "line": 244,
+          "line": 273,
           "column": 16
         }
       }
@@ -22705,15 +25100,15 @@
         "binop": null
       },
       "value": "callback",
-      "start": 7004,
-      "end": 7012,
+      "start": 7701,
+      "end": 7709,
       "loc": {
         "start": {
-          "line": 244,
+          "line": 273,
           "column": 17
         },
         "end": {
-          "line": 244,
+          "line": 273,
           "column": 25
         }
       }
@@ -22730,15 +25125,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7012,
-      "end": 7013,
+      "start": 7709,
+      "end": 7710,
       "loc": {
         "start": {
-          "line": 244,
+          "line": 273,
           "column": 25
         },
         "end": {
-          "line": 244,
+          "line": 273,
           "column": 26
         }
       }
@@ -22756,15 +25151,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 7013,
-      "end": 7016,
+      "start": 7710,
+      "end": 7713,
       "loc": {
         "start": {
-          "line": 244,
+          "line": 273,
           "column": 26
         },
         "end": {
-          "line": 244,
+          "line": 273,
           "column": 29
         }
       }
@@ -22782,15 +25177,15 @@
         "binop": null
       },
       "value": "components",
-      "start": 7016,
-      "end": 7026,
+      "start": 7713,
+      "end": 7723,
       "loc": {
         "start": {
-          "line": 244,
+          "line": 273,
           "column": 29
         },
         "end": {
-          "line": 244,
+          "line": 273,
           "column": 39
         }
       }
@@ -22808,15 +25203,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 7026,
-      "end": 7027,
+      "start": 7723,
+      "end": 7724,
       "loc": {
         "start": {
-          "line": 244,
+          "line": 273,
           "column": 39
         },
         "end": {
-          "line": 244,
+          "line": 273,
           "column": 40
         }
       }
@@ -22834,15 +25229,15 @@
         "binop": null
       },
       "value": "entity",
-      "start": 7028,
-      "end": 7034,
+      "start": 7725,
+      "end": 7731,
       "loc": {
         "start": {
-          "line": 244,
+          "line": 273,
           "column": 41
         },
         "end": {
-          "line": 244,
+          "line": 273,
           "column": 47
         }
       }
@@ -22860,15 +25255,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 7034,
-      "end": 7035,
+      "start": 7731,
+      "end": 7732,
       "loc": {
         "start": {
-          "line": 244,
+          "line": 273,
           "column": 47
         },
         "end": {
-          "line": 244,
+          "line": 273,
           "column": 48
         }
       }
@@ -22886,15 +25281,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 7036,
-      "end": 7039,
+      "start": 7733,
+      "end": 7736,
       "loc": {
         "start": {
-          "line": 244,
+          "line": 273,
           "column": 49
         },
         "end": {
-          "line": 244,
+          "line": 273,
           "column": 52
         }
       }
@@ -22912,15 +25307,15 @@
         "binop": null
       },
       "value": "args",
-      "start": 7039,
-      "end": 7043,
+      "start": 7736,
+      "end": 7740,
       "loc": {
         "start": {
-          "line": 244,
+          "line": 273,
           "column": 52
         },
         "end": {
-          "line": 244,
+          "line": 273,
           "column": 56
         }
       }
@@ -22937,15 +25332,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7043,
-      "end": 7044,
+      "start": 7740,
+      "end": 7741,
       "loc": {
         "start": {
-          "line": 244,
+          "line": 273,
           "column": 56
         },
         "end": {
-          "line": 244,
+          "line": 273,
           "column": 57
         }
       }
@@ -22953,15 +25348,15 @@
     {
       "type": "CommentLine",
       "value": " Stop the iteration when the callback returns false",
-      "start": 7050,
-      "end": 7103,
+      "start": 7747,
+      "end": 7800,
       "loc": {
         "start": {
-          "line": 246,
+          "line": 275,
           "column": 4
         },
         "end": {
-          "line": 246,
+          "line": 275,
           "column": 57
         }
       }
@@ -22981,15 +25376,15 @@
         "updateContext": null
       },
       "value": "if",
-      "start": 7108,
-      "end": 7110,
+      "start": 7805,
+      "end": 7807,
       "loc": {
         "start": {
-          "line": 247,
+          "line": 276,
           "column": 4
         },
         "end": {
-          "line": 247,
+          "line": 276,
           "column": 6
         }
       }
@@ -23006,15 +25401,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7111,
-      "end": 7112,
+      "start": 7808,
+      "end": 7809,
       "loc": {
         "start": {
-          "line": 247,
+          "line": 276,
           "column": 7
         },
         "end": {
-          "line": 247,
+          "line": 276,
           "column": 8
         }
       }
@@ -23032,15 +25427,15 @@
         "binop": null
       },
       "value": "status",
-      "start": 7112,
-      "end": 7118,
+      "start": 7809,
+      "end": 7815,
       "loc": {
         "start": {
-          "line": 247,
+          "line": 276,
           "column": 8
         },
         "end": {
-          "line": 247,
+          "line": 276,
           "column": 14
         }
       }
@@ -23059,15 +25454,15 @@
         "updateContext": null
       },
       "value": "===",
-      "start": 7119,
-      "end": 7122,
+      "start": 7816,
+      "end": 7819,
       "loc": {
         "start": {
-          "line": 247,
+          "line": 276,
           "column": 15
         },
         "end": {
-          "line": 247,
+          "line": 276,
           "column": 18
         }
       }
@@ -23087,15 +25482,15 @@
         "updateContext": null
       },
       "value": "false",
-      "start": 7123,
-      "end": 7128,
+      "start": 7820,
+      "end": 7825,
       "loc": {
         "start": {
-          "line": 247,
+          "line": 276,
           "column": 19
         },
         "end": {
-          "line": 247,
+          "line": 276,
           "column": 24
         }
       }
@@ -23112,15 +25507,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7128,
-      "end": 7129,
+      "start": 7825,
+      "end": 7826,
       "loc": {
         "start": {
-          "line": 247,
+          "line": 276,
           "column": 24
         },
         "end": {
-          "line": 247,
+          "line": 276,
           "column": 25
         }
       }
@@ -23137,15 +25532,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7130,
-      "end": 7131,
+      "start": 7827,
+      "end": 7828,
       "loc": {
         "start": {
-          "line": 247,
+          "line": 276,
           "column": 26
         },
         "end": {
-          "line": 247,
+          "line": 276,
           "column": 27
         }
       }
@@ -23165,15 +25560,15 @@
         "updateContext": null
       },
       "value": "break",
-      "start": 7137,
-      "end": 7142,
+      "start": 7834,
+      "end": 7839,
       "loc": {
         "start": {
-          "line": 248,
+          "line": 277,
           "column": 5
         },
         "end": {
-          "line": 248,
+          "line": 277,
           "column": 10
         }
       }
@@ -23190,15 +25585,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7147,
-      "end": 7148,
+      "start": 7844,
+      "end": 7845,
       "loc": {
         "start": {
-          "line": 249,
+          "line": 278,
           "column": 4
         },
         "end": {
-          "line": 249,
+          "line": 278,
           "column": 5
         }
       }
@@ -23215,15 +25610,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7152,
-      "end": 7153,
+      "start": 7849,
+      "end": 7850,
       "loc": {
         "start": {
-          "line": 250,
+          "line": 279,
           "column": 3
         },
         "end": {
-          "line": 250,
+          "line": 279,
           "column": 4
         }
       }
@@ -23240,15 +25635,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7156,
-      "end": 7157,
+      "start": 7853,
+      "end": 7854,
       "loc": {
         "start": {
-          "line": 251,
+          "line": 280,
           "column": 2
         },
         "end": {
-          "line": 251,
+          "line": 280,
           "column": 3
         }
       }
@@ -23268,15 +25663,15 @@
         "updateContext": null
       },
       "value": "return",
-      "start": 7161,
-      "end": 7167,
+      "start": 7858,
+      "end": 7864,
       "loc": {
         "start": {
-          "line": 253,
+          "line": 282,
           "column": 2
         },
         "end": {
-          "line": 253,
+          "line": 282,
           "column": 8
         }
       }
@@ -23294,15 +25689,15 @@
         "binop": null
       },
       "value": "entities",
-      "start": 7168,
-      "end": 7176,
+      "start": 7865,
+      "end": 7873,
       "loc": {
         "start": {
-          "line": 253,
+          "line": 282,
           "column": 9
         },
         "end": {
-          "line": 253,
+          "line": 282,
           "column": 17
         }
       }
@@ -23320,15 +25715,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 7176,
-      "end": 7177,
+      "start": 7873,
+      "end": 7874,
       "loc": {
         "start": {
-          "line": 253,
+          "line": 282,
           "column": 17
         },
         "end": {
-          "line": 253,
+          "line": 282,
           "column": 18
         }
       }
@@ -23346,15 +25741,15 @@
         "binop": null
       },
       "value": "values",
-      "start": 7177,
-      "end": 7183,
+      "start": 7874,
+      "end": 7880,
       "loc": {
         "start": {
-          "line": 253,
+          "line": 282,
           "column": 18
         },
         "end": {
-          "line": 253,
+          "line": 282,
           "column": 24
         }
       }
@@ -23371,15 +25766,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7183,
-      "end": 7184,
+      "start": 7880,
+      "end": 7881,
       "loc": {
         "start": {
-          "line": 253,
+          "line": 282,
           "column": 24
         },
         "end": {
-          "line": 253,
+          "line": 282,
           "column": 25
         }
       }
@@ -23396,15 +25791,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7184,
-      "end": 7185,
+      "start": 7881,
+      "end": 7882,
       "loc": {
         "start": {
-          "line": 253,
+          "line": 282,
           "column": 25
         },
         "end": {
-          "line": 253,
+          "line": 282,
           "column": 26
         }
       }
@@ -23421,15 +25816,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7187,
-      "end": 7188,
+      "start": 7884,
+      "end": 7885,
       "loc": {
         "start": {
-          "line": 254,
+          "line": 283,
           "column": 1
         },
         "end": {
-          "line": 254,
+          "line": 283,
           "column": 2
         }
       }
@@ -23437,15 +25832,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Returns an array of entities with matching components\n\t * Simplified version of every(), returns an actual array, and only takes component names as arguments.\n\t *\n\t * @example\n\t * world.get('player', 'sprite')\n\t *\n\t * @param {Array} componentNames - The component names to match on. See every() for how this matches.\n\t *\n\t * @return {Array} Array of entities, instead of iterator like every().\n\t ",
-      "start": 7191,
-      "end": 7597,
+      "start": 7888,
+      "end": 8294,
       "loc": {
         "start": {
-          "line": 256,
+          "line": 285,
           "column": 1
         },
         "end": {
-          "line": 266,
+          "line": 295,
           "column": 4
         }
       }
@@ -23463,15 +25858,15 @@
         "binop": null
       },
       "value": "get",
-      "start": 7599,
-      "end": 7602,
+      "start": 8296,
+      "end": 8299,
       "loc": {
         "start": {
-          "line": 267,
+          "line": 296,
           "column": 1
         },
         "end": {
-          "line": 267,
+          "line": 296,
           "column": 4
         }
       }
@@ -23488,15 +25883,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7602,
-      "end": 7603,
+      "start": 8299,
+      "end": 8300,
       "loc": {
         "start": {
-          "line": 267,
+          "line": 296,
           "column": 4
         },
         "end": {
-          "line": 267,
+          "line": 296,
           "column": 5
         }
       }
@@ -23514,15 +25909,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 7603,
-      "end": 7606,
+      "start": 8300,
+      "end": 8303,
       "loc": {
         "start": {
-          "line": 267,
+          "line": 296,
           "column": 5
         },
         "end": {
-          "line": 267,
+          "line": 296,
           "column": 8
         }
       }
@@ -23540,15 +25935,15 @@
         "binop": null
       },
       "value": "componentNames",
-      "start": 7606,
-      "end": 7620,
+      "start": 8303,
+      "end": 8317,
       "loc": {
         "start": {
-          "line": 267,
+          "line": 296,
           "column": 8
         },
         "end": {
-          "line": 267,
+          "line": 296,
           "column": 22
         }
       }
@@ -23565,15 +25960,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7620,
-      "end": 7621,
+      "start": 8317,
+      "end": 8318,
       "loc": {
         "start": {
-          "line": 267,
+          "line": 296,
           "column": 22
         },
         "end": {
-          "line": 267,
+          "line": 296,
           "column": 23
         }
       }
@@ -23590,15 +25985,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7622,
-      "end": 7623,
+      "start": 8319,
+      "end": 8320,
       "loc": {
         "start": {
-          "line": 267,
+          "line": 296,
           "column": 24
         },
         "end": {
-          "line": 267,
+          "line": 296,
           "column": 25
         }
       }
@@ -23618,15 +26013,15 @@
         "updateContext": null
       },
       "value": "return",
-      "start": 7626,
-      "end": 7632,
+      "start": 8323,
+      "end": 8329,
       "loc": {
         "start": {
-          "line": 268,
+          "line": 297,
           "column": 2
         },
         "end": {
-          "line": 268,
+          "line": 297,
           "column": 8
         }
       }
@@ -23644,15 +26039,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 7633,
-      "end": 7634,
+      "start": 8330,
+      "end": 8331,
       "loc": {
         "start": {
-          "line": 268,
+          "line": 297,
           "column": 9
         },
         "end": {
-          "line": 268,
+          "line": 297,
           "column": 10
         }
       }
@@ -23670,15 +26065,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 7634,
-      "end": 7637,
+      "start": 8331,
+      "end": 8334,
       "loc": {
         "start": {
-          "line": 268,
+          "line": 297,
           "column": 10
         },
         "end": {
-          "line": 268,
+          "line": 297,
           "column": 13
         }
       }
@@ -23698,15 +26093,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 7637,
-      "end": 7641,
+      "start": 8334,
+      "end": 8338,
       "loc": {
         "start": {
-          "line": 268,
+          "line": 297,
           "column": 13
         },
         "end": {
-          "line": 268,
+          "line": 297,
           "column": 17
         }
       }
@@ -23724,15 +26119,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 7641,
-      "end": 7642,
+      "start": 8338,
+      "end": 8339,
       "loc": {
         "start": {
-          "line": 268,
+          "line": 297,
           "column": 17
         },
         "end": {
-          "line": 268,
+          "line": 297,
           "column": 18
         }
       }
@@ -23750,15 +26145,15 @@
         "binop": null
       },
       "value": "every",
-      "start": 7642,
-      "end": 7647,
+      "start": 8339,
+      "end": 8344,
       "loc": {
         "start": {
-          "line": 268,
+          "line": 297,
           "column": 18
         },
         "end": {
-          "line": 268,
+          "line": 297,
           "column": 23
         }
       }
@@ -23775,15 +26170,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7647,
-      "end": 7648,
+      "start": 8344,
+      "end": 8345,
       "loc": {
         "start": {
-          "line": 268,
+          "line": 297,
           "column": 23
         },
         "end": {
-          "line": 268,
+          "line": 297,
           "column": 24
         }
       }
@@ -23801,15 +26196,15 @@
         "binop": null
       },
       "value": "componentNames",
-      "start": 7648,
-      "end": 7662,
+      "start": 8345,
+      "end": 8359,
       "loc": {
         "start": {
-          "line": 268,
+          "line": 297,
           "column": 24
         },
         "end": {
-          "line": 268,
+          "line": 297,
           "column": 38
         }
       }
@@ -23826,15 +26221,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7662,
-      "end": 7663,
+      "start": 8359,
+      "end": 8360,
       "loc": {
         "start": {
-          "line": 268,
+          "line": 297,
           "column": 38
         },
         "end": {
-          "line": 268,
+          "line": 297,
           "column": 39
         }
       }
@@ -23852,15 +26247,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 7663,
-      "end": 7664,
+      "start": 8360,
+      "end": 8361,
       "loc": {
         "start": {
-          "line": 268,
+          "line": 297,
           "column": 39
         },
         "end": {
-          "line": 268,
+          "line": 297,
           "column": 40
         }
       }
@@ -23877,15 +26272,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 7666,
-      "end": 7667,
+      "start": 8363,
+      "end": 8364,
       "loc": {
         "start": {
-          "line": 269,
+          "line": 298,
           "column": 1
         },
         "end": {
-          "line": 269,
+          "line": 298,
           "column": 2
         }
       }
@@ -23893,15 +26288,15 @@
     {
       "type": "CommentBlock",
       "value": "*\n\t * Registers entity prototype(s). Any existing prototype names that are the same will be overwritten\n\t *\n\t * @example\n\t * world.prototype({\n\t *     Movable: {\n\t *         position: {},\n\t *         velocity: {}\n\t *     }\n\t * })\n\t *\n\t * @param {Object} data - Object structure to register as a prototype. Should be a dictionary with the top level keys\n\t * being the prototype names. Can also be a JSON formatted string.\n\t *\n\t * @return {number} Number of prototypes added.\n\t ",
-      "start": 7670,
-      "end": 8150,
+      "start": 8367,
+      "end": 8847,
       "loc": {
         "start": {
-          "line": 271,
+          "line": 300,
           "column": 1
         },
         "end": {
-          "line": 286,
+          "line": 315,
           "column": 4
         }
       }
@@ -23919,15 +26314,15 @@
         "binop": null
       },
       "value": "prototype",
-      "start": 8152,
-      "end": 8161,
+      "start": 8849,
+      "end": 8858,
       "loc": {
         "start": {
-          "line": 287,
+          "line": 316,
           "column": 1
         },
         "end": {
-          "line": 287,
+          "line": 316,
           "column": 10
         }
       }
@@ -23944,15 +26339,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8161,
-      "end": 8162,
+      "start": 8858,
+      "end": 8859,
       "loc": {
         "start": {
-          "line": 287,
+          "line": 316,
           "column": 10
         },
         "end": {
-          "line": 287,
+          "line": 316,
           "column": 11
         }
       }
@@ -23970,15 +26365,15 @@
         "binop": null
       },
       "value": "data",
-      "start": 8162,
-      "end": 8166,
+      "start": 8859,
+      "end": 8863,
       "loc": {
         "start": {
-          "line": 287,
+          "line": 316,
           "column": 11
         },
         "end": {
-          "line": 287,
+          "line": 316,
           "column": 15
         }
       }
@@ -23995,15 +26390,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8166,
-      "end": 8167,
+      "start": 8863,
+      "end": 8864,
       "loc": {
         "start": {
-          "line": 287,
+          "line": 316,
           "column": 15
         },
         "end": {
-          "line": 287,
+          "line": 316,
           "column": 16
         }
       }
@@ -24020,15 +26415,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8168,
-      "end": 8169,
+      "start": 8865,
+      "end": 8866,
       "loc": {
         "start": {
-          "line": 287,
+          "line": 316,
           "column": 17
         },
         "end": {
-          "line": 287,
+          "line": 316,
           "column": 18
         }
       }
@@ -24048,15 +26443,15 @@
         "updateContext": null
       },
       "value": "let",
-      "start": 8172,
-      "end": 8175,
+      "start": 8869,
+      "end": 8872,
       "loc": {
         "start": {
-          "line": 288,
+          "line": 317,
           "column": 2
         },
         "end": {
-          "line": 288,
+          "line": 317,
           "column": 5
         }
       }
@@ -24074,15 +26469,15 @@
         "binop": null
       },
       "value": "count",
-      "start": 8176,
-      "end": 8181,
+      "start": 8873,
+      "end": 8878,
       "loc": {
         "start": {
-          "line": 288,
+          "line": 317,
           "column": 6
         },
         "end": {
-          "line": 288,
+          "line": 317,
           "column": 11
         }
       }
@@ -24101,15 +26496,15 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 8182,
-      "end": 8183,
+      "start": 8879,
+      "end": 8880,
       "loc": {
         "start": {
-          "line": 288,
+          "line": 317,
           "column": 12
         },
         "end": {
-          "line": 288,
+          "line": 317,
           "column": 13
         }
       }
@@ -24128,15 +26523,15 @@
         "updateContext": null
       },
       "value": 0,
-      "start": 8184,
-      "end": 8185,
+      "start": 8881,
+      "end": 8882,
       "loc": {
         "start": {
-          "line": 288,
+          "line": 317,
           "column": 14
         },
         "end": {
-          "line": 288,
+          "line": 317,
           "column": 15
         }
       }
@@ -24144,15 +26539,15 @@
     {
       "type": "CommentLine",
       "value": " Convert to an object when given a string",
-      "start": 8189,
-      "end": 8232,
+      "start": 8886,
+      "end": 8929,
       "loc": {
         "start": {
-          "line": 290,
+          "line": 319,
           "column": 2
         },
         "end": {
-          "line": 290,
+          "line": 319,
           "column": 45
         }
       }
@@ -24172,15 +26567,15 @@
         "updateContext": null
       },
       "value": "if",
-      "start": 8235,
-      "end": 8237,
+      "start": 8932,
+      "end": 8934,
       "loc": {
         "start": {
-          "line": 291,
+          "line": 320,
           "column": 2
         },
         "end": {
-          "line": 291,
+          "line": 320,
           "column": 4
         }
       }
@@ -24197,15 +26592,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8238,
-      "end": 8239,
+      "start": 8935,
+      "end": 8936,
       "loc": {
         "start": {
-          "line": 291,
+          "line": 320,
           "column": 5
         },
         "end": {
-          "line": 291,
+          "line": 320,
           "column": 6
         }
       }
@@ -24225,15 +26620,15 @@
         "updateContext": null
       },
       "value": "typeof",
-      "start": 8239,
-      "end": 8245,
+      "start": 8936,
+      "end": 8942,
       "loc": {
         "start": {
-          "line": 291,
+          "line": 320,
           "column": 6
         },
         "end": {
-          "line": 291,
+          "line": 320,
           "column": 12
         }
       }
@@ -24251,15 +26646,15 @@
         "binop": null
       },
       "value": "data",
-      "start": 8246,
-      "end": 8250,
+      "start": 8943,
+      "end": 8947,
       "loc": {
         "start": {
-          "line": 291,
+          "line": 320,
           "column": 13
         },
         "end": {
-          "line": 291,
+          "line": 320,
           "column": 17
         }
       }
@@ -24278,15 +26673,15 @@
         "updateContext": null
       },
       "value": "===",
-      "start": 8251,
-      "end": 8254,
+      "start": 8948,
+      "end": 8951,
       "loc": {
         "start": {
-          "line": 291,
+          "line": 320,
           "column": 18
         },
         "end": {
-          "line": 291,
+          "line": 320,
           "column": 21
         }
       }
@@ -24305,15 +26700,15 @@
         "updateContext": null
       },
       "value": "string",
-      "start": 8255,
-      "end": 8263,
+      "start": 8952,
+      "end": 8960,
       "loc": {
         "start": {
-          "line": 291,
+          "line": 320,
           "column": 22
         },
         "end": {
-          "line": 291,
+          "line": 320,
           "column": 30
         }
       }
@@ -24330,15 +26725,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8263,
-      "end": 8264,
+      "start": 8960,
+      "end": 8961,
       "loc": {
         "start": {
-          "line": 291,
+          "line": 320,
           "column": 30
         },
         "end": {
-          "line": 291,
+          "line": 320,
           "column": 31
         }
       }
@@ -24355,15 +26750,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8265,
-      "end": 8266,
+      "start": 8962,
+      "end": 8963,
       "loc": {
         "start": {
-          "line": 291,
+          "line": 320,
           "column": 32
         },
         "end": {
-          "line": 291,
+          "line": 320,
           "column": 33
         }
       }
@@ -24381,15 +26776,15 @@
         "binop": null
       },
       "value": "data",
-      "start": 8270,
-      "end": 8274,
+      "start": 8967,
+      "end": 8971,
       "loc": {
         "start": {
-          "line": 292,
+          "line": 321,
           "column": 3
         },
         "end": {
-          "line": 292,
+          "line": 321,
           "column": 7
         }
       }
@@ -24408,15 +26803,15 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 8275,
-      "end": 8276,
+      "start": 8972,
+      "end": 8973,
       "loc": {
         "start": {
-          "line": 292,
+          "line": 321,
           "column": 8
         },
         "end": {
-          "line": 292,
+          "line": 321,
           "column": 9
         }
       }
@@ -24434,15 +26829,15 @@
         "binop": null
       },
       "value": "JSON",
-      "start": 8277,
-      "end": 8281,
+      "start": 8974,
+      "end": 8978,
       "loc": {
         "start": {
-          "line": 292,
+          "line": 321,
           "column": 10
         },
         "end": {
-          "line": 292,
+          "line": 321,
           "column": 14
         }
       }
@@ -24460,15 +26855,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8281,
-      "end": 8282,
+      "start": 8978,
+      "end": 8979,
       "loc": {
         "start": {
-          "line": 292,
+          "line": 321,
           "column": 14
         },
         "end": {
-          "line": 292,
+          "line": 321,
           "column": 15
         }
       }
@@ -24486,15 +26881,15 @@
         "binop": null
       },
       "value": "parse",
-      "start": 8282,
-      "end": 8287,
+      "start": 8979,
+      "end": 8984,
       "loc": {
         "start": {
-          "line": 292,
+          "line": 321,
           "column": 15
         },
         "end": {
-          "line": 292,
+          "line": 321,
           "column": 20
         }
       }
@@ -24511,15 +26906,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8287,
-      "end": 8288,
+      "start": 8984,
+      "end": 8985,
       "loc": {
         "start": {
-          "line": 292,
+          "line": 321,
           "column": 20
         },
         "end": {
-          "line": 292,
+          "line": 321,
           "column": 21
         }
       }
@@ -24537,15 +26932,15 @@
         "binop": null
       },
       "value": "data",
-      "start": 8288,
-      "end": 8292,
+      "start": 8985,
+      "end": 8989,
       "loc": {
         "start": {
-          "line": 292,
+          "line": 321,
           "column": 21
         },
         "end": {
-          "line": 292,
+          "line": 321,
           "column": 25
         }
       }
@@ -24562,15 +26957,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8292,
-      "end": 8293,
+      "start": 8989,
+      "end": 8990,
       "loc": {
         "start": {
-          "line": 292,
+          "line": 321,
           "column": 25
         },
         "end": {
-          "line": 292,
+          "line": 321,
           "column": 26
         }
       }
@@ -24587,15 +26982,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8296,
-      "end": 8297,
+      "start": 8993,
+      "end": 8994,
       "loc": {
         "start": {
-          "line": 293,
+          "line": 322,
           "column": 2
         },
         "end": {
-          "line": 293,
+          "line": 322,
           "column": 3
         }
       }
@@ -24603,15 +26998,15 @@
     {
       "type": "CommentLine",
       "value": " Data must be an object at this point",
-      "start": 8301,
-      "end": 8340,
+      "start": 8998,
+      "end": 9037,
       "loc": {
         "start": {
-          "line": 295,
+          "line": 324,
           "column": 2
         },
         "end": {
-          "line": 295,
+          "line": 324,
           "column": 41
         }
       }
@@ -24631,15 +27026,15 @@
         "updateContext": null
       },
       "value": "if",
-      "start": 8343,
-      "end": 8345,
+      "start": 9040,
+      "end": 9042,
       "loc": {
         "start": {
-          "line": 296,
+          "line": 325,
           "column": 2
         },
         "end": {
-          "line": 296,
+          "line": 325,
           "column": 4
         }
       }
@@ -24656,15 +27051,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8346,
-      "end": 8347,
+      "start": 9043,
+      "end": 9044,
       "loc": {
         "start": {
-          "line": 296,
+          "line": 325,
           "column": 5
         },
         "end": {
-          "line": 296,
+          "line": 325,
           "column": 6
         }
       }
@@ -24684,15 +27079,15 @@
         "updateContext": null
       },
       "value": "typeof",
-      "start": 8347,
-      "end": 8353,
+      "start": 9044,
+      "end": 9050,
       "loc": {
         "start": {
-          "line": 296,
+          "line": 325,
           "column": 6
         },
         "end": {
-          "line": 296,
+          "line": 325,
           "column": 12
         }
       }
@@ -24710,15 +27105,15 @@
         "binop": null
       },
       "value": "data",
-      "start": 8354,
-      "end": 8358,
+      "start": 9051,
+      "end": 9055,
       "loc": {
         "start": {
-          "line": 296,
+          "line": 325,
           "column": 13
         },
         "end": {
-          "line": 296,
+          "line": 325,
           "column": 17
         }
       }
@@ -24737,15 +27132,15 @@
         "updateContext": null
       },
       "value": "===",
-      "start": 8359,
-      "end": 8362,
+      "start": 9056,
+      "end": 9059,
       "loc": {
         "start": {
-          "line": 296,
+          "line": 325,
           "column": 18
         },
         "end": {
-          "line": 296,
+          "line": 325,
           "column": 21
         }
       }
@@ -24764,15 +27159,15 @@
         "updateContext": null
       },
       "value": "object",
-      "start": 8363,
-      "end": 8371,
+      "start": 9060,
+      "end": 9068,
       "loc": {
         "start": {
-          "line": 296,
+          "line": 325,
           "column": 22
         },
         "end": {
-          "line": 296,
+          "line": 325,
           "column": 30
         }
       }
@@ -24789,15 +27184,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8371,
-      "end": 8372,
+      "start": 9068,
+      "end": 9069,
       "loc": {
         "start": {
-          "line": 296,
+          "line": 325,
           "column": 30
         },
         "end": {
-          "line": 296,
+          "line": 325,
           "column": 31
         }
       }
@@ -24814,15 +27209,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8373,
-      "end": 8374,
+      "start": 9070,
+      "end": 9071,
       "loc": {
         "start": {
-          "line": 296,
+          "line": 325,
           "column": 32
         },
         "end": {
-          "line": 296,
+          "line": 325,
           "column": 33
         }
       }
@@ -24830,15 +27225,15 @@
     {
       "type": "CommentLine",
       "value": " Iterate through prototype names",
-      "start": 8378,
-      "end": 8412,
+      "start": 9075,
+      "end": 9109,
       "loc": {
         "start": {
-          "line": 297,
+          "line": 326,
           "column": 3
         },
         "end": {
-          "line": 297,
+          "line": 326,
           "column": 37
         }
       }
@@ -24858,15 +27253,15 @@
         "updateContext": null
       },
       "value": "for",
-      "start": 8416,
-      "end": 8419,
+      "start": 9113,
+      "end": 9116,
       "loc": {
         "start": {
-          "line": 298,
+          "line": 327,
           "column": 3
         },
         "end": {
-          "line": 298,
+          "line": 327,
           "column": 6
         }
       }
@@ -24883,15 +27278,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8420,
-      "end": 8421,
+      "start": 9117,
+      "end": 9118,
       "loc": {
         "start": {
-          "line": 298,
+          "line": 327,
           "column": 7
         },
         "end": {
-          "line": 298,
+          "line": 327,
           "column": 8
         }
       }
@@ -24911,15 +27306,15 @@
         "updateContext": null
       },
       "value": "let",
-      "start": 8421,
-      "end": 8424,
+      "start": 9118,
+      "end": 9121,
       "loc": {
         "start": {
-          "line": 298,
+          "line": 327,
           "column": 8
         },
         "end": {
-          "line": 298,
+          "line": 327,
           "column": 11
         }
       }
@@ -24937,15 +27332,15 @@
         "binop": null
       },
       "value": "protoName",
-      "start": 8425,
-      "end": 8434,
+      "start": 9122,
+      "end": 9131,
       "loc": {
         "start": {
-          "line": 298,
+          "line": 327,
           "column": 12
         },
         "end": {
-          "line": 298,
+          "line": 327,
           "column": 21
         }
       }
@@ -24965,15 +27360,15 @@
         "updateContext": null
       },
       "value": "in",
-      "start": 8435,
-      "end": 8437,
+      "start": 9132,
+      "end": 9134,
       "loc": {
         "start": {
-          "line": 298,
+          "line": 327,
           "column": 22
         },
         "end": {
-          "line": 298,
+          "line": 327,
           "column": 24
         }
       }
@@ -24991,15 +27386,15 @@
         "binop": null
       },
       "value": "data",
-      "start": 8438,
-      "end": 8442,
+      "start": 9135,
+      "end": 9139,
       "loc": {
         "start": {
-          "line": 298,
+          "line": 327,
           "column": 25
         },
         "end": {
-          "line": 298,
+          "line": 327,
           "column": 29
         }
       }
@@ -25016,15 +27411,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8442,
-      "end": 8443,
+      "start": 9139,
+      "end": 9140,
       "loc": {
         "start": {
-          "line": 298,
+          "line": 327,
           "column": 29
         },
         "end": {
-          "line": 298,
+          "line": 327,
           "column": 30
         }
       }
@@ -25041,15 +27436,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8444,
-      "end": 8445,
+      "start": 9141,
+      "end": 9142,
       "loc": {
         "start": {
-          "line": 298,
+          "line": 327,
           "column": 31
         },
         "end": {
-          "line": 298,
+          "line": 327,
           "column": 32
         }
       }
@@ -25069,15 +27464,15 @@
         "updateContext": null
       },
       "value": "let",
-      "start": 8450,
-      "end": 8453,
+      "start": 9147,
+      "end": 9150,
       "loc": {
         "start": {
-          "line": 299,
+          "line": 328,
           "column": 4
         },
         "end": {
-          "line": 299,
+          "line": 328,
           "column": 7
         }
       }
@@ -25095,15 +27490,15 @@
         "binop": null
       },
       "value": "inputObject",
-      "start": 8454,
-      "end": 8465,
+      "start": 9151,
+      "end": 9162,
       "loc": {
         "start": {
-          "line": 299,
+          "line": 328,
           "column": 8
         },
         "end": {
-          "line": 299,
+          "line": 328,
           "column": 19
         }
       }
@@ -25122,15 +27517,15 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 8466,
-      "end": 8467,
+      "start": 9163,
+      "end": 9164,
       "loc": {
         "start": {
-          "line": 299,
+          "line": 328,
           "column": 20
         },
         "end": {
-          "line": 299,
+          "line": 328,
           "column": 21
         }
       }
@@ -25148,15 +27543,15 @@
         "binop": null
       },
       "value": "data",
-      "start": 8468,
-      "end": 8472,
+      "start": 9165,
+      "end": 9169,
       "loc": {
         "start": {
-          "line": 299,
+          "line": 328,
           "column": 22
         },
         "end": {
-          "line": 299,
+          "line": 328,
           "column": 26
         }
       }
@@ -25174,15 +27569,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8472,
-      "end": 8473,
+      "start": 9169,
+      "end": 9170,
       "loc": {
         "start": {
-          "line": 299,
+          "line": 328,
           "column": 26
         },
         "end": {
-          "line": 299,
+          "line": 328,
           "column": 27
         }
       }
@@ -25200,15 +27595,15 @@
         "binop": null
       },
       "value": "protoName",
-      "start": 8473,
-      "end": 8482,
+      "start": 9170,
+      "end": 9179,
       "loc": {
         "start": {
-          "line": 299,
+          "line": 328,
           "column": 27
         },
         "end": {
-          "line": 299,
+          "line": 328,
           "column": 36
         }
       }
@@ -25226,15 +27621,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8482,
-      "end": 8483,
+      "start": 9179,
+      "end": 9180,
       "loc": {
         "start": {
-          "line": 299,
+          "line": 328,
           "column": 36
         },
         "end": {
-          "line": 299,
+          "line": 328,
           "column": 37
         }
       }
@@ -25254,15 +27649,15 @@
         "updateContext": null
       },
       "value": "let",
-      "start": 8488,
-      "end": 8491,
+      "start": 9185,
+      "end": 9188,
       "loc": {
         "start": {
-          "line": 300,
+          "line": 329,
           "column": 4
         },
         "end": {
-          "line": 300,
+          "line": 329,
           "column": 7
         }
       }
@@ -25280,15 +27675,15 @@
         "binop": null
       },
       "value": "protoObject",
-      "start": 8492,
-      "end": 8503,
+      "start": 9189,
+      "end": 9200,
       "loc": {
         "start": {
-          "line": 300,
+          "line": 329,
           "column": 8
         },
         "end": {
-          "line": 300,
+          "line": 329,
           "column": 19
         }
       }
@@ -25307,15 +27702,15 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 8504,
-      "end": 8505,
+      "start": 9201,
+      "end": 9202,
       "loc": {
         "start": {
-          "line": 300,
+          "line": 329,
           "column": 20
         },
         "end": {
-          "line": 300,
+          "line": 329,
           "column": 21
         }
       }
@@ -25332,15 +27727,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8506,
-      "end": 8507,
+      "start": 9203,
+      "end": 9204,
       "loc": {
         "start": {
-          "line": 300,
+          "line": 329,
           "column": 22
         },
         "end": {
-          "line": 300,
+          "line": 329,
           "column": 23
         }
       }
@@ -25357,15 +27752,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8507,
-      "end": 8508,
+      "start": 9204,
+      "end": 9205,
       "loc": {
         "start": {
-          "line": 300,
+          "line": 329,
           "column": 23
         },
         "end": {
-          "line": 300,
+          "line": 329,
           "column": 24
         }
       }
@@ -25373,15 +27768,15 @@
     {
       "type": "CommentLine",
       "value": " Iterate through component names",
-      "start": 8513,
-      "end": 8547,
+      "start": 9210,
+      "end": 9244,
       "loc": {
         "start": {
-          "line": 301,
+          "line": 330,
           "column": 4
         },
         "end": {
-          "line": 301,
+          "line": 330,
           "column": 38
         }
       }
@@ -25401,15 +27796,15 @@
         "updateContext": null
       },
       "value": "for",
-      "start": 8552,
-      "end": 8555,
+      "start": 9249,
+      "end": 9252,
       "loc": {
         "start": {
-          "line": 302,
+          "line": 331,
           "column": 4
         },
         "end": {
-          "line": 302,
+          "line": 331,
           "column": 7
         }
       }
@@ -25426,15 +27821,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8556,
-      "end": 8557,
+      "start": 9253,
+      "end": 9254,
       "loc": {
         "start": {
-          "line": 302,
+          "line": 331,
           "column": 8
         },
         "end": {
-          "line": 302,
+          "line": 331,
           "column": 9
         }
       }
@@ -25454,15 +27849,15 @@
         "updateContext": null
       },
       "value": "let",
-      "start": 8557,
-      "end": 8560,
+      "start": 9254,
+      "end": 9257,
       "loc": {
         "start": {
-          "line": 302,
+          "line": 331,
           "column": 9
         },
         "end": {
-          "line": 302,
+          "line": 331,
           "column": 12
         }
       }
@@ -25480,15 +27875,15 @@
         "binop": null
       },
       "value": "compName",
-      "start": 8561,
-      "end": 8569,
+      "start": 9258,
+      "end": 9266,
       "loc": {
         "start": {
-          "line": 302,
+          "line": 331,
           "column": 13
         },
         "end": {
-          "line": 302,
+          "line": 331,
           "column": 21
         }
       }
@@ -25508,15 +27903,15 @@
         "updateContext": null
       },
       "value": "in",
-      "start": 8570,
-      "end": 8572,
+      "start": 9267,
+      "end": 9269,
       "loc": {
         "start": {
-          "line": 302,
+          "line": 331,
           "column": 22
         },
         "end": {
-          "line": 302,
+          "line": 331,
           "column": 24
         }
       }
@@ -25534,15 +27929,15 @@
         "binop": null
       },
       "value": "inputObject",
-      "start": 8573,
-      "end": 8584,
+      "start": 9270,
+      "end": 9281,
       "loc": {
         "start": {
-          "line": 302,
+          "line": 331,
           "column": 25
         },
         "end": {
-          "line": 302,
+          "line": 331,
           "column": 36
         }
       }
@@ -25559,15 +27954,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8584,
-      "end": 8585,
+      "start": 9281,
+      "end": 9282,
       "loc": {
         "start": {
-          "line": 302,
+          "line": 331,
           "column": 36
         },
         "end": {
-          "line": 302,
+          "line": 331,
           "column": 37
         }
       }
@@ -25584,15 +27979,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8586,
-      "end": 8587,
+      "start": 9283,
+      "end": 9284,
       "loc": {
         "start": {
-          "line": 302,
+          "line": 331,
           "column": 38
         },
         "end": {
-          "line": 302,
+          "line": 331,
           "column": 39
         }
       }
@@ -25600,15 +27995,15 @@
     {
       "type": "CommentLine",
       "value": " Store strings of each component",
-      "start": 8593,
-      "end": 8627,
+      "start": 9290,
+      "end": 9324,
       "loc": {
         "start": {
-          "line": 303,
+          "line": 332,
           "column": 5
         },
         "end": {
-          "line": 303,
+          "line": 332,
           "column": 39
         }
       }
@@ -25626,15 +28021,15 @@
         "binop": null
       },
       "value": "protoObject",
-      "start": 8633,
-      "end": 8644,
+      "start": 9330,
+      "end": 9341,
       "loc": {
         "start": {
-          "line": 304,
+          "line": 333,
           "column": 5
         },
         "end": {
-          "line": 304,
+          "line": 333,
           "column": 16
         }
       }
@@ -25652,15 +28047,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8644,
-      "end": 8645,
+      "start": 9341,
+      "end": 9342,
       "loc": {
         "start": {
-          "line": 304,
+          "line": 333,
           "column": 16
         },
         "end": {
-          "line": 304,
+          "line": 333,
           "column": 17
         }
       }
@@ -25678,15 +28073,15 @@
         "binop": null
       },
       "value": "compName",
-      "start": 8645,
-      "end": 8653,
+      "start": 9342,
+      "end": 9350,
       "loc": {
         "start": {
-          "line": 304,
+          "line": 333,
           "column": 17
         },
         "end": {
-          "line": 304,
+          "line": 333,
           "column": 25
         }
       }
@@ -25704,15 +28099,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8653,
-      "end": 8654,
+      "start": 9350,
+      "end": 9351,
       "loc": {
         "start": {
-          "line": 304,
+          "line": 333,
           "column": 25
         },
         "end": {
-          "line": 304,
+          "line": 333,
           "column": 26
         }
       }
@@ -25731,15 +28126,15 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 8655,
-      "end": 8656,
+      "start": 9352,
+      "end": 9353,
       "loc": {
         "start": {
-          "line": 304,
+          "line": 333,
           "column": 27
         },
         "end": {
-          "line": 304,
+          "line": 333,
           "column": 28
         }
       }
@@ -25757,15 +28152,15 @@
         "binop": null
       },
       "value": "JSON",
-      "start": 8657,
-      "end": 8661,
+      "start": 9354,
+      "end": 9358,
       "loc": {
         "start": {
-          "line": 304,
+          "line": 333,
           "column": 29
         },
         "end": {
-          "line": 304,
+          "line": 333,
           "column": 33
         }
       }
@@ -25783,15 +28178,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8661,
-      "end": 8662,
+      "start": 9358,
+      "end": 9359,
       "loc": {
         "start": {
-          "line": 304,
+          "line": 333,
           "column": 33
         },
         "end": {
-          "line": 304,
+          "line": 333,
           "column": 34
         }
       }
@@ -25809,15 +28204,15 @@
         "binop": null
       },
       "value": "stringify",
-      "start": 8662,
-      "end": 8671,
+      "start": 9359,
+      "end": 9368,
       "loc": {
         "start": {
-          "line": 304,
+          "line": 333,
           "column": 34
         },
         "end": {
-          "line": 304,
+          "line": 333,
           "column": 43
         }
       }
@@ -25834,15 +28229,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8671,
-      "end": 8672,
+      "start": 9368,
+      "end": 9369,
       "loc": {
         "start": {
-          "line": 304,
+          "line": 333,
           "column": 43
         },
         "end": {
-          "line": 304,
+          "line": 333,
           "column": 44
         }
       }
@@ -25860,15 +28255,15 @@
         "binop": null
       },
       "value": "inputObject",
-      "start": 8672,
-      "end": 8683,
+      "start": 9369,
+      "end": 9380,
       "loc": {
         "start": {
-          "line": 304,
+          "line": 333,
           "column": 44
         },
         "end": {
-          "line": 304,
+          "line": 333,
           "column": 55
         }
       }
@@ -25886,15 +28281,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8683,
-      "end": 8684,
+      "start": 9380,
+      "end": 9381,
       "loc": {
         "start": {
-          "line": 304,
+          "line": 333,
           "column": 55
         },
         "end": {
-          "line": 304,
+          "line": 333,
           "column": 56
         }
       }
@@ -25912,15 +28307,15 @@
         "binop": null
       },
       "value": "compName",
-      "start": 8684,
-      "end": 8692,
+      "start": 9381,
+      "end": 9389,
       "loc": {
         "start": {
-          "line": 304,
+          "line": 333,
           "column": 56
         },
         "end": {
-          "line": 304,
+          "line": 333,
           "column": 64
         }
       }
@@ -25938,15 +28333,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8692,
-      "end": 8693,
+      "start": 9389,
+      "end": 9390,
       "loc": {
         "start": {
-          "line": 304,
+          "line": 333,
           "column": 64
         },
         "end": {
-          "line": 304,
+          "line": 333,
           "column": 65
         }
       }
@@ -25963,15 +28358,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8693,
-      "end": 8694,
+      "start": 9390,
+      "end": 9391,
       "loc": {
         "start": {
-          "line": 304,
+          "line": 333,
           "column": 65
         },
         "end": {
-          "line": 304,
+          "line": 333,
           "column": 66
         }
       }
@@ -25988,15 +28383,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8699,
-      "end": 8700,
+      "start": 9396,
+      "end": 9397,
       "loc": {
         "start": {
-          "line": 305,
+          "line": 334,
           "column": 4
         },
         "end": {
-          "line": 305,
+          "line": 334,
           "column": 5
         }
       }
@@ -26016,15 +28411,15 @@
         "updateContext": null
       },
       "value": "this",
-      "start": 8705,
-      "end": 8709,
+      "start": 9402,
+      "end": 9406,
       "loc": {
         "start": {
-          "line": 306,
+          "line": 335,
           "column": 4
         },
         "end": {
-          "line": 306,
+          "line": 335,
           "column": 8
         }
       }
@@ -26042,15 +28437,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8709,
-      "end": 8710,
+      "start": 9406,
+      "end": 9407,
       "loc": {
         "start": {
-          "line": 306,
+          "line": 335,
           "column": 8
         },
         "end": {
-          "line": 306,
+          "line": 335,
           "column": 9
         }
       }
@@ -26068,15 +28463,15 @@
         "binop": null
       },
       "value": "entityTemplates",
-      "start": 8710,
-      "end": 8725,
+      "start": 9407,
+      "end": 9422,
       "loc": {
         "start": {
-          "line": 306,
+          "line": 335,
           "column": 9
         },
         "end": {
-          "line": 306,
+          "line": 335,
           "column": 24
         }
       }
@@ -26094,15 +28489,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8725,
-      "end": 8726,
+      "start": 9422,
+      "end": 9423,
       "loc": {
         "start": {
-          "line": 306,
+          "line": 335,
           "column": 24
         },
         "end": {
-          "line": 306,
+          "line": 335,
           "column": 25
         }
       }
@@ -26120,15 +28515,15 @@
         "binop": null
       },
       "value": "protoName",
-      "start": 8726,
-      "end": 8735,
+      "start": 9423,
+      "end": 9432,
       "loc": {
         "start": {
-          "line": 306,
+          "line": 335,
           "column": 25
         },
         "end": {
-          "line": 306,
+          "line": 335,
           "column": 34
         }
       }
@@ -26146,15 +28541,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8735,
-      "end": 8736,
+      "start": 9432,
+      "end": 9433,
       "loc": {
         "start": {
-          "line": 306,
+          "line": 335,
           "column": 34
         },
         "end": {
-          "line": 306,
+          "line": 335,
           "column": 35
         }
       }
@@ -26173,15 +28568,15 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 8737,
-      "end": 8738,
+      "start": 9434,
+      "end": 9435,
       "loc": {
         "start": {
-          "line": 306,
+          "line": 335,
           "column": 36
         },
         "end": {
-          "line": 306,
+          "line": 335,
           "column": 37
         }
       }
@@ -26199,15 +28594,15 @@
         "binop": null
       },
       "value": "protoObject",
-      "start": 8739,
-      "end": 8750,
+      "start": 9436,
+      "end": 9447,
       "loc": {
         "start": {
-          "line": 306,
+          "line": 335,
           "column": 38
         },
         "end": {
-          "line": 306,
+          "line": 335,
           "column": 49
         }
       }
@@ -26225,15 +28620,15 @@
         "binop": null
       },
       "value": "++",
-      "start": 8755,
-      "end": 8757,
+      "start": 9452,
+      "end": 9454,
       "loc": {
         "start": {
-          "line": 307,
+          "line": 336,
           "column": 4
         },
         "end": {
-          "line": 307,
+          "line": 336,
           "column": 6
         }
       }
@@ -26251,15 +28646,15 @@
         "binop": null
       },
       "value": "count",
-      "start": 8757,
-      "end": 8762,
+      "start": 9454,
+      "end": 9459,
       "loc": {
         "start": {
-          "line": 307,
+          "line": 336,
           "column": 6
         },
         "end": {
-          "line": 307,
+          "line": 336,
           "column": 11
         }
       }
@@ -26276,15 +28671,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8766,
-      "end": 8767,
+      "start": 9463,
+      "end": 9464,
       "loc": {
         "start": {
-          "line": 308,
+          "line": 337,
           "column": 3
         },
         "end": {
-          "line": 308,
+          "line": 337,
           "column": 4
         }
       }
@@ -26301,15 +28696,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8770,
-      "end": 8771,
+      "start": 9467,
+      "end": 9468,
       "loc": {
         "start": {
-          "line": 309,
+          "line": 338,
           "column": 2
         },
         "end": {
-          "line": 309,
+          "line": 338,
           "column": 3
         }
       }
@@ -26329,15 +28724,15 @@
         "updateContext": null
       },
       "value": "return",
-      "start": 8775,
-      "end": 8781,
+      "start": 9472,
+      "end": 9478,
       "loc": {
         "start": {
-          "line": 311,
+          "line": 340,
           "column": 2
         },
         "end": {
-          "line": 311,
+          "line": 340,
           "column": 8
         }
       }
@@ -26355,15 +28750,15 @@
         "binop": null
       },
       "value": "count",
-      "start": 8782,
-      "end": 8787,
+      "start": 9479,
+      "end": 9484,
       "loc": {
         "start": {
-          "line": 311,
+          "line": 340,
           "column": 9
         },
         "end": {
-          "line": 311,
+          "line": 340,
           "column": 14
         }
       }
@@ -26380,15 +28775,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8789,
-      "end": 8790,
+      "start": 9486,
+      "end": 9487,
       "loc": {
         "start": {
-          "line": 312,
+          "line": 341,
           "column": 1
         },
         "end": {
-          "line": 312,
+          "line": 341,
           "column": 2
         }
       }
@@ -26405,15 +28800,15 @@
         "postfix": false,
         "binop": null
       },
-      "start": 8791,
-      "end": 8792,
+      "start": 9488,
+      "end": 9489,
       "loc": {
         "start": {
-          "line": 313,
+          "line": 342,
           "column": 0
         },
         "end": {
-          "line": 313,
+          "line": 342,
           "column": 1
         }
       }
@@ -26431,15 +28826,15 @@
         "binop": null
       },
       "value": "exports",
-      "start": 8794,
-      "end": 8801,
+      "start": 9491,
+      "end": 9498,
       "loc": {
         "start": {
-          "line": 315,
+          "line": 344,
           "column": 0
         },
         "end": {
-          "line": 315,
+          "line": 344,
           "column": 7
         }
       }
@@ -26457,15 +28852,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8801,
-      "end": 8802,
+      "start": 9498,
+      "end": 9499,
       "loc": {
         "start": {
-          "line": 315,
+          "line": 344,
           "column": 7
         },
         "end": {
-          "line": 315,
+          "line": 344,
           "column": 8
         }
       }
@@ -26483,15 +28878,15 @@
         "binop": null
       },
       "value": "World",
-      "start": 8802,
-      "end": 8807,
+      "start": 9499,
+      "end": 9504,
       "loc": {
         "start": {
-          "line": 315,
+          "line": 344,
           "column": 8
         },
         "end": {
-          "line": 315,
+          "line": 344,
           "column": 13
         }
       }
@@ -26510,15 +28905,15 @@
         "updateContext": null
       },
       "value": "=",
-      "start": 8808,
-      "end": 8809,
+      "start": 9505,
+      "end": 9506,
       "loc": {
         "start": {
-          "line": 315,
+          "line": 344,
           "column": 14
         },
         "end": {
-          "line": 315,
+          "line": 344,
           "column": 15
         }
       }
@@ -26536,15 +28931,15 @@
         "binop": null
       },
       "value": "World",
-      "start": 8810,
-      "end": 8815,
+      "start": 9507,
+      "end": 9512,
       "loc": {
         "start": {
-          "line": 315,
+          "line": 344,
           "column": 16
         },
         "end": {
-          "line": 315,
+          "line": 344,
           "column": 21
         }
       }
@@ -26562,15 +28957,15 @@
         "binop": null,
         "updateContext": null
       },
-      "start": 8816,
-      "end": 8816,
+      "start": 9513,
+      "end": 9513,
       "loc": {
         "start": {
-          "line": 316,
+          "line": 345,
           "column": 0
         },
         "end": {
-          "line": 316,
+          "line": 345,
           "column": 0
         }
       }
diff --git a/docs/class/src/entity.js~Entity.html b/docs/class/src/entity.js~Entity.html
index d9e2807..83b7b12 100644
--- a/docs/class/src/entity.js~Entity.html
+++ b/docs/class/src/entity.js~Entity.html
@@ -749,7 +749,7 @@ 

- source + source

@@ -770,7 +770,19 @@

- +
+

Throw:

+ + + + + + + + +

Error

Cannot set entity id

+
+
@@ -796,7 +808,7 @@

- source + source

@@ -884,7 +896,7 @@

- source + source

@@ -954,7 +966,7 @@

- source + source

@@ -1006,7 +1018,7 @@

- source + source

@@ -1060,7 +1072,7 @@

- source + source

@@ -1142,7 +1154,7 @@

- source + source

@@ -1223,7 +1235,7 @@

- source + source

@@ -1306,7 +1318,7 @@

- source + source

@@ -1389,7 +1401,7 @@

- source + source

@@ -1453,7 +1465,7 @@

- source + source

@@ -1551,7 +1563,7 @@

- source + source

@@ -1616,7 +1628,7 @@

- source + source

@@ -1680,7 +1692,7 @@

- source + source

@@ -1768,7 +1780,7 @@

- source + source

diff --git a/docs/class/src/world.js~World.html b/docs/class/src/world.js~World.html index 918d859..767b2f8 100644 --- a/docs/class/src/world.js~World.html +++ b/docs/class/src/world.js~World.html @@ -365,7 +365,7 @@

World

- system(components: Array, systemClass: Function, args: ...Object): number + system(args: ...Object): number

@@ -686,7 +686,7 @@

- source + source

@@ -789,7 +789,7 @@

- source + source

@@ -871,7 +871,7 @@

- source + source

@@ -939,7 +939,7 @@

- source + source

@@ -1026,7 +1026,7 @@

- source + source

@@ -1079,8 +1079,8 @@

Example:

// Example flow of method call order:
 // Setup systems:
-world.system([], systemA)
-world.system([], systemB)
+world.system(systemA)
+world.system(systemB)
 // During world.run():
 // systemA.pre()
 // systemA.every() * number of entities
@@ -1104,11 +1104,11 @@ 

- system(components: Array, systemClass: Function, args: ...Object): number + system(args: ...Object): number - source + source

@@ -1130,26 +1130,13 @@

Params:

- components - Array - -

The list of components the system will process in every(). This follows the same logic as entity.has() and world.every().

- - - - systemClass - Function - -

The system class to instantiate. Can contain the following methods: constructor, initialize, -pre, every, post. Pre() and post() get called before and after every(), for each of the independent systems. See world.run() -for an example of the call order.

- - - args ...Object -
  • optional
-

The arguments to forward to the system's constructors

+ +

Both signatures are accepted: (components, systemClass, ...args) or (systemClass, ...args).

+

[components]: The list of components the system will process in every(). This follows the same logic as entity.has() and world.every().

+

{systemClass}: The system class to instantiate. Can contain the following methods: constructor, initialize, pre, every, post. Pre() and post() get called before and after every(), for each of the independent systems. See world.run() for an example of the call order.

+

[...args]: The arguments to forward to the system's constructors.

@@ -1187,11 +1174,27 @@

Example:

// Movement system
 world.system(['position', 'velocity'], class {
+     constructor(context) {
+         // This is showing how you can optionally pass parameters to the system's constructor
+         this.context = context
+     }
      every(position, velocity, entity) {
          position.x += velocity.x
          position.y += velocity.y
      }
- })
+ }, context)
+
+
+ +
// System that doesn't use every()
+world.system(class {
+     constructor(context) {
+         this.context = context
+     }
+     pre() {
+         // Handle events or something
+     }
+ }, context)
diff --git a/docs/file/src/entity.js.html b/docs/file/src/entity.js.html index 64f29e5..c71dea0 100644 --- a/docs/file/src/entity.js.html +++ b/docs/file/src/entity.js.html @@ -83,6 +83,8 @@ * ID is read-only, attempting to set it will throw an error. * * @private + * + * @throws {Error} Cannot set entity id */ set id(id) { throw new Error('Cannot set entity id') diff --git a/docs/file/src/world.js.html b/docs/file/src/world.js.html index a0c373d..97c2b1f 100644 --- a/docs/file/src/world.js.html +++ b/docs/file/src/world.js.html @@ -171,25 +171,54 @@ * @example * // Movement system * world.system(['position', 'velocity'], class { + * constructor(context) { + * // This is showing how you can optionally pass parameters to the system's constructor + * this.context = context + * } * every(position, velocity, entity) { * position.x += velocity.x * position.y += velocity.y * } - * }) + * }, context) + * + * @example + * // System that doesn't use every() + * world.system(class { + * constructor(context) { + * this.context = context + * } + * pre() { + * // Handle events or something + * } + * }, context) * - * @param {Array} components - The list of components the system will process in every(). This follows the same logic as entity.has() and world.every(). - * @param {Function} systemClass - The system class to instantiate. Can contain the following methods: constructor, initialize, - * pre, every, post. Pre() and post() get called before and after every(), for each of the independent systems. See world.run() - * for an example of the call order. - * @param {...Object} [args] - The arguments to forward to the system's constructors + * @param {...Object} args - Both signatures are accepted: (components, systemClass, ...args) or (systemClass, ...args). + * + * **[components]**: The list of components the system will process in every(). This follows the same logic as entity.has() and world.every(). + * + * **{systemClass}**: The system class to instantiate. Can contain the following methods: constructor, initialize, pre, every, post. Pre() and post() get called before and after every(), for each of the independent systems. See world.run() for an example of the call order. + * + * **[...args]**: The arguments to forward to the system's constructors. * * @return {number} Unique ID of the system on success or undefined on failure */ - system(components, systemClass, ...args) { - // TODO: Make components optional, and parameters more dynamic by only using ...args + system(...args) { + // Get components and systemClass from arguments + let components = [] + let systemClass, rest + if (Array.isArray(args[0])) { + components = args[0] + systemClass = args[1] + rest = args.slice(2) + } else { + systemClass = args[0] + rest = args.slice(1) + } + + // Make sure the system is valid if (isFunction(systemClass)) { // Create the system, and set the component array query - let newSystem = new systemClass(...args) + let newSystem = new systemClass(...rest) newSystem.components = components // Add the system, return its ID @@ -221,8 +250,8 @@ * @example * // Example flow of method call order: * // Setup systems: - * world.system([], systemA) - * world.system([], systemB) + * world.system(systemA) + * world.system(systemB) * // During world.run(): * // systemA.pre() * // systemA.every() * number of entities diff --git a/docs/index.json b/docs/index.json index 9b15697..7e69cb8 100644 --- a/docs/index.json +++ b/docs/index.json @@ -887,7 +887,7 @@ "__docId__": 62, "kind": "file", "name": "src/entity.js", - "content": "/** @ignore */\nconst { invoke } = require('./utilities.js')\n\n/**\n * Entity class used for storing components.\n *\n * @class Entity (name)\n */\nclass Entity {\n\t/**\n\t * Do not construct an Entity yourself - use the entity() method in World instead.\n\t * Also, do not shallow/deep copy entity objects, only pass around references.\n\t *\n\t * @private\n\t *\n\t * @param {World} world - The world\n\t * @param {number} id - The identifier\n\t */\n\tconstructor(world, id) {\n\t\t/** @ignore */\n\t\tthis.world = world\n\n\t\t/** @ignore */\n\t\tthis._id = id\n\n\t\t/** @ignore */\n\t\tthis.data = {}\n\n\t\t// Add to the index, to update match all index\n\t\tif (this.valid()) {\n\t\t\tthis.world.index.add(this)\n\t\t}\n\t}\n\n\t/**\n\t * Return the entity ID.\n\t *\n\t * @return {number} Integer entity ID\n\t */\n\tget id() {\n\t\treturn this._id\n\t}\n\n\t/**\n\t * ID is read-only, attempting to set it will throw an error.\n\t *\n\t * @private\n\t */\n\tset id(id) {\n\t\tthrow new Error('Cannot set entity id')\n\t}\n\n\t/**\n\t * Returns true if the entity has ALL of the specified component names.\n\t * Additional components that the entity has, which are not specified in has(), will be ignored.\n\t * If no component names are specified, this method returns true.\n\t *\n\t * @example\n\t * if (entity.has('position', 'velocity')) {...}\n\t *\n\t * @param {...string} [components] - The component names to check for\n\t *\n\t * @return {boolean} true or false\n\t */\n\thas(...components) {\n\t\treturn components.every(name => name in this.data)\n\t}\n\n\t/**\n\t * Returns a component by name, or undefined if it doesn't exist\n\t *\n\t * @example\n\t * let position = entity.get('position')\n\t *\n\t * @param {string} component - The component name to get\n\t *\n\t * @return {Object} The component if defined, otherwise undefined\n\t */\n\tget(component) {\n\t\treturn this.data[component]\n\t}\n\n\t/**\n\t * Returns a component by name (automatically created if it doesn't exist)\n\t *\n\t * @example\n\t * let position = entity.access('position', 3, 4)\n\t *\n\t * @param {string} component - The component name to create/get\n\t * @param {...Object} [args] - The arguments to forward to create the new component, only if it doesn't exist.\n\t *\n\t * @return {Object} Always returns either the existing component, or the newly created one.\n\t */\n\taccess(component, ...args) {\n\t\tif (!this.has(component)) {\n\t\t\tthis.set(component, ...args)\n\t\t}\n\t\treturn this.data[component]\n\t}\n\n\t/**\n\t * Adds a new component, or re-creates and overwrites an existing component\n\t *\n\t * @example\n\t * entity.set('position', 1, 2)\n\t *\n\t * @example\n\t * entity.set('anonymousComponent', { keys: 'values' })\n\t *\n\t * @example\n\t * entity.set('anotherAnonymousComponent', 'Any type of any value')\n\t *\n\t * @param {string} component - The component name to create. If there is a registered component for this name, then\n\t * its constructor will be called and an object of that type will be created.\n\t * @param {...Object} [args] - The arguments to forward to the registered component type. If the component type is\n\t * registered, then only the first additional argument will be used as the value of the entire component.\n\t *\n\t * @return {Object} The original entity that set() was called on, so that operations can be chained.\n\t */\n\tset(component, ...args) {\n\t\tif (this.valid() && component in this.world.components) {\n\t\t\t// Use defined component template, passing entity as first parameter\n\t\t\tthis.data[component] = new this.world.components[component](this, ...args)\n\t\t} else if (args.length > 0) {\n\t\t\t// Use first argument as component value\n\t\t\tthis.data[component] = args[0]\n\t\t} else {\n\t\t\t// Make an empty object\n\t\t\tthis.data[component] = {}\n\t\t}\n\n\t\t// Update the index with this new component\n\t\tif (this.valid()) {\n\t\t\tthis.world.index.add(this, component)\n\t\t}\n\n\t\treturn this\n\t}\n\n\t/**\n\t * Updates component data from an object or other component. Similar to access() with a shallow merge applied after.\n\t *\n\t * @example\n\t * entity.update('position', { x: 1, y: 2 })\n\t *\n\t * @param {string} component - The component name to update\n\t * @param {Object} data - The object or other component to merge into the specified component.\n\t *\n\t * @return {Object} The original entity that update() was called on, so that operations can be chained.\n\t */\n\tupdate(component, data) {\n\t\tlet comp = this.access(component)\n\n\t\t// Shallow set keys of the component\n\t\tfor (let key in data) {\n\t\t\tcomp[key] = data[key]\n\t\t}\n\n\t\treturn this\n\t}\n\n\t/**\n\t * Removes a component from the entity - has no effect when it doesn't exist.\n\t * Can specify an onRemove() method in your component which gets called before it is removed.\n\t * If nothing is specified, then nothing will be removed. Use removeAll() to remove all components.\n\t *\n\t * @example\n\t * entity.remove('position')\n\t *\n\t * @param {...string} [components] - The component names to remove from the entity.\n\t *\n\t * @return {Object} The original entity that remove() was called on, so that operations can be chained.\n\t */\n\tremove(...components) {\n\t\tfor (let component of components) {\n\t\t\tif (component in this.data) {\n\n\t\t\t\t// Remove from index\n\t\t\t\tif (this.valid()) {\n\t\t\t\t\tthis.world.index.remove(this, component)\n\t\t\t\t}\n\n\t\t\t\t// Call custom onRemove\n\t\t\t\tinvoke(this.data[component], 'onRemove')\n\n\t\t\t\tdelete this.data[component]\n\t\t\t}\n\t\t}\n\t\treturn this\n\t}\n\n\t// Remove all components\n\n\t/**\n\t * Removes all components from the entity.\n\t *\n\t * @example\n\t * entity.removeAll()\n\t *\n\t * @return {Object} The original entity that removeAll() was called on, so that operations can be chained.\n\t */\n\tremoveAll() {\n\t\tthis.remove(...Object.keys(this.data))\n\t\tthis.data = {}\n\t\treturn this\n\t}\n\n\t/**\n\t * Remove this entity and all of its components from the world. After an entity is destroyed, the object should be discarded,\n\t * and it is recommended to avoid re-using it.\n\t *\n\t * @example\n\t * entity.destroy()\n\t */\n\tdestroy() {\n\t\tthis.removeAll()\n\n\t\tif (this.valid()) {\n\t\t\t// Remove from the index, to update match all index\n\t\t\tthis.world.index.remove(this)\n\n\t\t\t// Remove from world\n\t\t\tthis.world.entities.delete(this._id)\n\t\t\tthis._id = undefined\n\t\t}\n\t}\n\n\t/**\n\t * Returns true if this is a valid, existing, and usable entity, which is attached to a world.\n\t *\n\t * @example\n\t * if (entity.valid()) {...}\n\t *\n\t * @return {boolean} true or false\n\t */\n\tvalid() {\n\t\t// Note: No need to actually look in the world for the ID, if entities are only ever copied by reference.\n\t\t// If entities are ever deep/shallow copied, this function will need to check this to be more robust.\n\t\treturn this.world && this._id !== undefined\n\t}\n\n\t/**\n\t * Returns unique entity ID as a string.\n\t *\n\t * @example\n\t * let entityId = entity.toString()\n\t *\n\t * @return {string} String representation of the entity ID.\n\t */\n\ttoString() {\n\t\treturn String(this._id)\n\t}\n\n\t/**\n\t * Serializes entire entity and components to JSON.\n\t * Note: Defining toJSON methods in your components will override the built-in behavior.\n\t *\n\t * @example\n\t * let serializedEntity = entity.toJSON()\n\t *\n\t * @return {string} JSON encoded string\n\t */\n\ttoJSON() {\n\t\treturn JSON.stringify(this.data)\n\t}\n\n\t/**\n\t * Deserializes data from JSON, creating new components and overwriting existing components.\n\t * Note: Defining fromJSON methods in your components will override the built-in behavior.\n\t *\n\t * @example\n\t * entity.fromJSON(serializedEntity)\n\t *\n\t * @param {string} data - A JSON string containing component data to parse, and store in this entity.\n\t *\n\t * @return {Object} The original entity that fromJSON() was called on, so that operations can be chained.\n\t */\n\tfromJSON(data) {\n\t\tlet parsed = JSON.parse(data)\n\t\tfor (let name in parsed) {\n\t\t\tlet comp = this.access(name)\n\n\t\t\t// Either call custom method or copy all properties\n\t\t\tif (typeof comp.fromJSON === 'function') {\n\t\t\t\tcomp.fromJSON(parsed[name])\n\t\t\t} else {\n\t\t\t\tthis.update(name, parsed[name])\n\t\t\t}\n\t\t}\n\t\treturn this\n\t}\n\n\t/**\n\t * Attaches a currently detached entity back to a world.\n\t * Note: Do not use detached entities, get() may be safe, but avoid calling other methods\n\t * Note: The ID will be reassigned, so do not rely on this\n\t *\n\t * @example\n\t * entity.attach(world)\n\t *\n\t * @param {World} world - The world to attach this entity to\n\t */\n\tattach(world) {\n\t\tif (world && !this.valid()) {\n\t\t\t// Assign new id, and reattach to world\n\t\t\tthis.world = world\n\t\t\tthis._id = this.world.idCounter++\n\t\t\tthis.world.entities.set(this._id, this)\n\t\t\tthis.world.index.addEntity(this)\n\t\t}\n\t}\n\n\t/**\n\t * Removes this entity from the current world, without removing any components or data.\n\t * It can be re-attached to another world (or the same world), using the attach() method.\n\t * Note: Do not use detached entities, get() may be safe, but avoid calling other methods\n\t * Note: The ID will be reassigned, so do not rely on this\n\t *\n\t * @example\n\t * entity.detach()\n\t */\n\tdetach() {\n\t\tif (this.valid()) {\n\t\t\t// Remove from current world\n\t\t\tthis.world.index.removeEntity(this)\n\t\t\tthis.world.entities.delete(this._id)\n\t\t\tthis._id = undefined\n\t\t\tthis.world = undefined\n\t\t}\n\t}\n}\n\nexports.Entity = Entity\n", + "content": "/** @ignore */\nconst { invoke } = require('./utilities.js')\n\n/**\n * Entity class used for storing components.\n *\n * @class Entity (name)\n */\nclass Entity {\n\t/**\n\t * Do not construct an Entity yourself - use the entity() method in World instead.\n\t * Also, do not shallow/deep copy entity objects, only pass around references.\n\t *\n\t * @private\n\t *\n\t * @param {World} world - The world\n\t * @param {number} id - The identifier\n\t */\n\tconstructor(world, id) {\n\t\t/** @ignore */\n\t\tthis.world = world\n\n\t\t/** @ignore */\n\t\tthis._id = id\n\n\t\t/** @ignore */\n\t\tthis.data = {}\n\n\t\t// Add to the index, to update match all index\n\t\tif (this.valid()) {\n\t\t\tthis.world.index.add(this)\n\t\t}\n\t}\n\n\t/**\n\t * Return the entity ID.\n\t *\n\t * @return {number} Integer entity ID\n\t */\n\tget id() {\n\t\treturn this._id\n\t}\n\n\t/**\n\t * ID is read-only, attempting to set it will throw an error.\n\t *\n\t * @private\n\t *\n\t * @throws {Error} Cannot set entity id\n\t */\n\tset id(id) {\n\t\tthrow new Error('Cannot set entity id')\n\t}\n\n\t/**\n\t * Returns true if the entity has ALL of the specified component names.\n\t * Additional components that the entity has, which are not specified in has(), will be ignored.\n\t * If no component names are specified, this method returns true.\n\t *\n\t * @example\n\t * if (entity.has('position', 'velocity')) {...}\n\t *\n\t * @param {...string} [components] - The component names to check for\n\t *\n\t * @return {boolean} true or false\n\t */\n\thas(...components) {\n\t\treturn components.every(name => name in this.data)\n\t}\n\n\t/**\n\t * Returns a component by name, or undefined if it doesn't exist\n\t *\n\t * @example\n\t * let position = entity.get('position')\n\t *\n\t * @param {string} component - The component name to get\n\t *\n\t * @return {Object} The component if defined, otherwise undefined\n\t */\n\tget(component) {\n\t\treturn this.data[component]\n\t}\n\n\t/**\n\t * Returns a component by name (automatically created if it doesn't exist)\n\t *\n\t * @example\n\t * let position = entity.access('position', 3, 4)\n\t *\n\t * @param {string} component - The component name to create/get\n\t * @param {...Object} [args] - The arguments to forward to create the new component, only if it doesn't exist.\n\t *\n\t * @return {Object} Always returns either the existing component, or the newly created one.\n\t */\n\taccess(component, ...args) {\n\t\tif (!this.has(component)) {\n\t\t\tthis.set(component, ...args)\n\t\t}\n\t\treturn this.data[component]\n\t}\n\n\t/**\n\t * Adds a new component, or re-creates and overwrites an existing component\n\t *\n\t * @example\n\t * entity.set('position', 1, 2)\n\t *\n\t * @example\n\t * entity.set('anonymousComponent', { keys: 'values' })\n\t *\n\t * @example\n\t * entity.set('anotherAnonymousComponent', 'Any type of any value')\n\t *\n\t * @param {string} component - The component name to create. If there is a registered component for this name, then\n\t * its constructor will be called and an object of that type will be created.\n\t * @param {...Object} [args] - The arguments to forward to the registered component type. If the component type is\n\t * registered, then only the first additional argument will be used as the value of the entire component.\n\t *\n\t * @return {Object} The original entity that set() was called on, so that operations can be chained.\n\t */\n\tset(component, ...args) {\n\t\tif (this.valid() && component in this.world.components) {\n\t\t\t// Use defined component template, passing entity as first parameter\n\t\t\tthis.data[component] = new this.world.components[component](this, ...args)\n\t\t} else if (args.length > 0) {\n\t\t\t// Use first argument as component value\n\t\t\tthis.data[component] = args[0]\n\t\t} else {\n\t\t\t// Make an empty object\n\t\t\tthis.data[component] = {}\n\t\t}\n\n\t\t// Update the index with this new component\n\t\tif (this.valid()) {\n\t\t\tthis.world.index.add(this, component)\n\t\t}\n\n\t\treturn this\n\t}\n\n\t/**\n\t * Updates component data from an object or other component. Similar to access() with a shallow merge applied after.\n\t *\n\t * @example\n\t * entity.update('position', { x: 1, y: 2 })\n\t *\n\t * @param {string} component - The component name to update\n\t * @param {Object} data - The object or other component to merge into the specified component.\n\t *\n\t * @return {Object} The original entity that update() was called on, so that operations can be chained.\n\t */\n\tupdate(component, data) {\n\t\tlet comp = this.access(component)\n\n\t\t// Shallow set keys of the component\n\t\tfor (let key in data) {\n\t\t\tcomp[key] = data[key]\n\t\t}\n\n\t\treturn this\n\t}\n\n\t/**\n\t * Removes a component from the entity - has no effect when it doesn't exist.\n\t * Can specify an onRemove() method in your component which gets called before it is removed.\n\t * If nothing is specified, then nothing will be removed. Use removeAll() to remove all components.\n\t *\n\t * @example\n\t * entity.remove('position')\n\t *\n\t * @param {...string} [components] - The component names to remove from the entity.\n\t *\n\t * @return {Object} The original entity that remove() was called on, so that operations can be chained.\n\t */\n\tremove(...components) {\n\t\tfor (let component of components) {\n\t\t\tif (component in this.data) {\n\n\t\t\t\t// Remove from index\n\t\t\t\tif (this.valid()) {\n\t\t\t\t\tthis.world.index.remove(this, component)\n\t\t\t\t}\n\n\t\t\t\t// Call custom onRemove\n\t\t\t\tinvoke(this.data[component], 'onRemove')\n\n\t\t\t\tdelete this.data[component]\n\t\t\t}\n\t\t}\n\t\treturn this\n\t}\n\n\t// Remove all components\n\n\t/**\n\t * Removes all components from the entity.\n\t *\n\t * @example\n\t * entity.removeAll()\n\t *\n\t * @return {Object} The original entity that removeAll() was called on, so that operations can be chained.\n\t */\n\tremoveAll() {\n\t\tthis.remove(...Object.keys(this.data))\n\t\tthis.data = {}\n\t\treturn this\n\t}\n\n\t/**\n\t * Remove this entity and all of its components from the world. After an entity is destroyed, the object should be discarded,\n\t * and it is recommended to avoid re-using it.\n\t *\n\t * @example\n\t * entity.destroy()\n\t */\n\tdestroy() {\n\t\tthis.removeAll()\n\n\t\tif (this.valid()) {\n\t\t\t// Remove from the index, to update match all index\n\t\t\tthis.world.index.remove(this)\n\n\t\t\t// Remove from world\n\t\t\tthis.world.entities.delete(this._id)\n\t\t\tthis._id = undefined\n\t\t}\n\t}\n\n\t/**\n\t * Returns true if this is a valid, existing, and usable entity, which is attached to a world.\n\t *\n\t * @example\n\t * if (entity.valid()) {...}\n\t *\n\t * @return {boolean} true or false\n\t */\n\tvalid() {\n\t\t// Note: No need to actually look in the world for the ID, if entities are only ever copied by reference.\n\t\t// If entities are ever deep/shallow copied, this function will need to check this to be more robust.\n\t\treturn this.world && this._id !== undefined\n\t}\n\n\t/**\n\t * Returns unique entity ID as a string.\n\t *\n\t * @example\n\t * let entityId = entity.toString()\n\t *\n\t * @return {string} String representation of the entity ID.\n\t */\n\ttoString() {\n\t\treturn String(this._id)\n\t}\n\n\t/**\n\t * Serializes entire entity and components to JSON.\n\t * Note: Defining toJSON methods in your components will override the built-in behavior.\n\t *\n\t * @example\n\t * let serializedEntity = entity.toJSON()\n\t *\n\t * @return {string} JSON encoded string\n\t */\n\ttoJSON() {\n\t\treturn JSON.stringify(this.data)\n\t}\n\n\t/**\n\t * Deserializes data from JSON, creating new components and overwriting existing components.\n\t * Note: Defining fromJSON methods in your components will override the built-in behavior.\n\t *\n\t * @example\n\t * entity.fromJSON(serializedEntity)\n\t *\n\t * @param {string} data - A JSON string containing component data to parse, and store in this entity.\n\t *\n\t * @return {Object} The original entity that fromJSON() was called on, so that operations can be chained.\n\t */\n\tfromJSON(data) {\n\t\tlet parsed = JSON.parse(data)\n\t\tfor (let name in parsed) {\n\t\t\tlet comp = this.access(name)\n\n\t\t\t// Either call custom method or copy all properties\n\t\t\tif (typeof comp.fromJSON === 'function') {\n\t\t\t\tcomp.fromJSON(parsed[name])\n\t\t\t} else {\n\t\t\t\tthis.update(name, parsed[name])\n\t\t\t}\n\t\t}\n\t\treturn this\n\t}\n\n\t/**\n\t * Attaches a currently detached entity back to a world.\n\t * Note: Do not use detached entities, get() may be safe, but avoid calling other methods\n\t * Note: The ID will be reassigned, so do not rely on this\n\t *\n\t * @example\n\t * entity.attach(world)\n\t *\n\t * @param {World} world - The world to attach this entity to\n\t */\n\tattach(world) {\n\t\tif (world && !this.valid()) {\n\t\t\t// Assign new id, and reattach to world\n\t\t\tthis.world = world\n\t\t\tthis._id = this.world.idCounter++\n\t\t\tthis.world.entities.set(this._id, this)\n\t\t\tthis.world.index.addEntity(this)\n\t\t}\n\t}\n\n\t/**\n\t * Removes this entity from the current world, without removing any components or data.\n\t * It can be re-attached to another world (or the same world), using the attach() method.\n\t * Note: Do not use detached entities, get() may be safe, but avoid calling other methods\n\t * Note: The ID will be reassigned, so do not rely on this\n\t *\n\t * @example\n\t * entity.detach()\n\t */\n\tdetach() {\n\t\tif (this.valid()) {\n\t\t\t// Remove from current world\n\t\t\tthis.world.index.removeEntity(this)\n\t\t\tthis.world.entities.delete(this._id)\n\t\t\tthis._id = undefined\n\t\t\tthis.world = undefined\n\t\t}\n\t}\n}\n\nexports.Entity = Entity\n", "static": true, "longname": "/srv/http/picoes/src/entity.js", "access": "public", @@ -1058,7 +1058,15 @@ "longname": "src/entity.js~Entity#id", "access": "private", "description": "ID is read-only, attempting to set it will throw an error.", - "lineNumber": 49 + "lineNumber": 51, + "throws": [ + { + "types": [ + "Error" + ], + "description": "Cannot set entity id" + } + ] }, { "__docId__": 71, @@ -1074,7 +1082,7 @@ "examples": [ "if (entity.has('position', 'velocity')) {...}" ], - "lineNumber": 65, + "lineNumber": 67, "params": [ { "nullable": null, @@ -1110,7 +1118,7 @@ "examples": [ "let position = entity.get('position')" ], - "lineNumber": 79, + "lineNumber": 81, "params": [ { "nullable": null, @@ -1146,7 +1154,7 @@ "examples": [ "let position = entity.access('position', 3, 4)" ], - "lineNumber": 94, + "lineNumber": 96, "params": [ { "nullable": null, @@ -1194,7 +1202,7 @@ "entity.set('anonymousComponent', { keys: 'values' })", "entity.set('anotherAnonymousComponent', 'Any type of any value')" ], - "lineNumber": 120, + "lineNumber": 122, "params": [ { "nullable": null, @@ -1240,7 +1248,7 @@ "examples": [ "entity.update('position', { x: 1, y: 2 })" ], - "lineNumber": 151, + "lineNumber": 153, "params": [ { "nullable": null, @@ -1286,7 +1294,7 @@ "examples": [ "entity.remove('position')" ], - "lineNumber": 174, + "lineNumber": 176, "params": [ { "nullable": null, @@ -1322,7 +1330,7 @@ "examples": [ "entity.removeAll()" ], - "lineNumber": 202, + "lineNumber": 204, "return": { "nullable": null, "types": [ @@ -1347,7 +1355,7 @@ "examples": [ "entity.destroy()" ], - "lineNumber": 215, + "lineNumber": 217, "params": [], "return": null }, @@ -1365,7 +1373,7 @@ "examples": [ "if (entity.valid()) {...}" ], - "lineNumber": 236, + "lineNumber": 238, "return": { "nullable": null, "types": [ @@ -1390,7 +1398,7 @@ "examples": [ "let entityId = entity.toString()" ], - "lineNumber": 250, + "lineNumber": 252, "return": { "nullable": null, "types": [ @@ -1415,7 +1423,7 @@ "examples": [ "let serializedEntity = entity.toJSON()" ], - "lineNumber": 263, + "lineNumber": 265, "return": { "nullable": null, "types": [ @@ -1440,7 +1448,7 @@ "examples": [ "entity.fromJSON(serializedEntity)" ], - "lineNumber": 278, + "lineNumber": 280, "params": [ { "nullable": null, @@ -1476,7 +1484,7 @@ "examples": [ "entity.attach(world)" ], - "lineNumber": 303, + "lineNumber": 305, "params": [ { "nullable": null, @@ -1505,7 +1513,7 @@ "examples": [ "entity.detach()" ], - "lineNumber": 322, + "lineNumber": 324, "params": [], "return": null }, @@ -1611,7 +1619,7 @@ "__docId__": 94, "kind": "file", "name": "src/world.js", - "content": "/** @ignore */\nconst { invoke, isFunction } = require('./utilities.js')\n\n/** @ignore */\nconst { Entity } = require('./entity.js')\n\n/** @ignore */\nconst { ComponentIndex } = require('./component_index.js')\n\n/**\n * Class for world.\n *\n * @class World (name)\n */\nclass World {\n\t/**\n\t * Constructs an instance of the world.\n\t */\n\tconstructor() {\n\t\t/** @ignore */\n\t\tthis.systems = []\n\n\t\t/**\n\t\t * Maps entity IDs to entities\n\t\t * @ignore\n\t\t */\n\t\tthis.entities = new Map()\n\n\t\t/** @ignore */\n\t\tthis.components = {}\n\n\t\t/** @ignore */\n\t\tthis.entityTemplates = {}\n\n\t\t/** @ignore */\n\t\tthis.idCounter = 1\n\n\t\t/**\n\t\t * Maps entire queries to arrays of entities\n\t\t * @ignore\n\t\t */\n\t\tthis.index = new ComponentIndex(this.entities)\n\t}\n\n\t/**\n\t * Removes all entities from the world.\n\t * Does not affect registered systems, components, or prototypes.\n\t *\n\t * @example\n\t * world.clear()\n\t */\n\tclear() {\n\t\t// Call onRemove on all components of all entities\n\t\tfor (const [entityId, entity] of this.entities) {\n\t\t\tfor (let componentName in entity.data) {\n\t\t\t\t// Get component, and call onRemove if it exists as a function\n\t\t\t\tlet component = entity.data[componentName]\n\t\t\t\tinvoke(component, 'onRemove')\n\t\t\t}\n\t\t}\n\n\t\t// Clear entities\n\t\tthis.entities = new Map()\n\t\tthis.index.clear(this.entities)\n\t}\n\n\t/**\n\t * Registers a component type to the world. Components must be constructable. They are passed the entity first,\n\t * then the rest of the arguments from methods like entity.set(). Components also can have an onRemove() method.\n\t *\n\t * @param {string} name - The name\n\t * @param {function} componentClass - The component class, must be a constructable class or function\n\t *\n\t * @example\n\t * world.component('myComponent', class {\n\t * constructor(entity, some, args) {\n\t * this.entity = entity\n\t * this.some = some\n\t * this.args = args\n\t * }\n\t * })\n\t * // entity === the new entity object\n\t * // some === 10\n\t * // args === 500\n\t * world.entity().set('myComponent', 10, 500)\n\t *\n\t * @return {string} Registered component name on success, undefined on failure\n\t */\n\tcomponent(name, componentClass) {\n\t\t// Only allow functions and classes to be components\n\t\tif (isFunction(componentClass)) {\n\t\t\tthis.components[name] = componentClass\n\t\t\treturn name\n\t\t}\n\t}\n\n\t/**\n\t * Creates a new entity in the world\n\t *\n\t * @param {string} [name] - The prototype name to use\n\t *\n\t * @example\n\t * world.entity()\n\t *\n\t * @example\n\t * world.entity('Player')\n\t *\n\t * @return {Entity} The new entity created\n\t */\n\tentity(name) {\n\t\tlet entityId = this.idCounter++\n\t\tlet entity = new Entity(this, entityId)\n\n\t\t// Use 'name' to get prototype data (if specified)\n\t\tif (name && name in this.entityTemplates) {\n\t\t\t// Add all components from prototype\n\t\t\tlet template = this.entityTemplates[name]\n\t\t\tfor (let componentName in template) {\n\t\t\t\t// Update component with data from template\n\t\t\t\tlet newComponentData = JSON.parse(template[componentName])\n\t\t\t\tentity.update(componentName, newComponentData)\n\t\t\t}\n\t\t}\n\n\t\tthis.entities.set(entityId, entity)\n\t\treturn entity\n\t}\n\n\t/**\n\t * Registers a system to the world.\n\t * The order the systems get registered, is the order then run in.\n\t *\n\t * @example\n\t * // Movement system\n\t * world.system(['position', 'velocity'], class {\n\t * every(position, velocity, entity) {\n\t * position.x += velocity.x\n\t * position.y += velocity.y\n\t * }\n\t * })\n\t *\n\t * @param {Array} components - The list of components the system will process in every(). This follows the same logic as entity.has() and world.every().\n\t * @param {Function} systemClass - The system class to instantiate. Can contain the following methods: constructor, initialize,\n\t * pre, every, post. Pre() and post() get called before and after every(), for each of the independent systems. See world.run()\n\t * for an example of the call order.\n\t * @param {...Object} [args] - The arguments to forward to the system's constructors\n\t *\n\t * @return {number} Unique ID of the system on success or undefined on failure\n\t */\n\tsystem(components, systemClass, ...args) {\n\t\t// TODO: Make components optional, and parameters more dynamic by only using ...args\n\t\tif (isFunction(systemClass)) {\n\t\t\t// Create the system, and set the component array query\n\t\t\tlet newSystem = new systemClass(...args)\n\t\t\tnewSystem.components = components\n\n\t\t\t// Add the system, return its ID\n\t\t\treturn this.systems.push(newSystem) - 1\n\t\t}\n\t\treturn undefined\n\t}\n\n\t/**\n\t * Calls initialize() on all systems\n\t *\n\t * @example\n\t * world.initialize(renderContext)\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' initialize() methods\n\t */\n\tinitialize(...args) {\n\t\tfor (let system of this.systems) {\n\t\t\tinvoke(system, 'initialize', ...args)\n\t\t}\n\t}\n\n\t/**\n\t * Calls pre(), every(), and post() on all systems\n\t *\n\t * @example\n\t * world.run(deltaTime)\n\t *\n\t * @example\n\t * // Example flow of method call order:\n\t * // Setup systems:\n\t * world.system([], systemA)\n\t * world.system([], systemB)\n\t * // During world.run():\n\t * // systemA.pre()\n\t * // systemA.every() * number of entities\n\t * // systemA.post()\n\t * // systemB.pre()\n\t * // systemB.every() * number of entities\n\t * // systemB.post()\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' methods\n\t */\n\trun(...args) {\n\t\tfor (let system of this.systems) {\n\t\t\tinvoke(system, 'pre', ...args)\n\n\t\t\t// Run the \"every\" method in the system\n\t\t\tif (isFunction(system.every)) {\n\t\t\t\tthis.every(system.components, system.every.bind(system), ...args)\n\t\t\t}\n\n\t\t\tinvoke(system, 'post', ...args)\n\t\t}\n\t}\n\n\t/**\n\t * Iterate through entities with the specified components\n\t *\n\t * @example\n\t * // Use a callback to process entities one-by-one\n\t * world.every(['comp'], comp => {comp.value = 0})\n\t *\n\t * @example\n\t * // Get an iterator for the entities\n\t * let it = world.every(['comp'])\n\t * for (let entity of it) {...}\n\t *\n\t * @param {Array} componentNames - The component names to match entites with. This checks if the entity\n\t * has ALL of the specified components, but does not check for additional components.\n\t * @param {Function} callback - The callback to call for each entity. Takes (...components, entity, ...args).\n\t * @param {...Object} [args] - Any additional arguments to pass to the callback.\n\t *\n\t * @return {MapIterator} An iterator to the entities themselves\n\t */\n\tevery(componentNames, callback, ...args) {\n\t\t// Get indexed map of entities\n\t\tlet entities = this.index.query(componentNames)\n\n\t\tif (isFunction(callback)) {\n\t\t\t// Go through the map of entities\n\t\t\tfor (let entity of entities.values()) {\n\t\t\t\t// At this point, we can safely assume that all components exist, even if entities/components\n\t\t\t\t// are deleted/modified during the loop, because JavaScript's MapIterator is smart enough.\n\n\t\t\t\t// Get all components as an array\n\t\t\t\tlet components = componentNames.map(name => entity.get(name))\n\n\t\t\t\t// Pass components, then the main entity, then any additional arguments\n\t\t\t\tlet status = callback(...components, entity, ...args)\n\n\t\t\t\t// Stop the iteration when the callback returns false\n\t\t\t\tif (status === false) {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn entities.values()\n\t}\n\n\t/**\n\t * Returns an array of entities with matching components\n\t * Simplified version of every(), returns an actual array, and only takes component names as arguments.\n\t *\n\t * @example\n\t * world.get('player', 'sprite')\n\t *\n\t * @param {Array} componentNames - The component names to match on. See every() for how this matches.\n\t *\n\t * @return {Array} Array of entities, instead of iterator like every().\n\t */\n\tget(...componentNames) {\n\t\treturn [...this.every(componentNames)]\n\t}\n\n\t/**\n\t * Registers entity prototype(s). Any existing prototype names that are the same will be overwritten\n\t *\n\t * @example\n\t * world.prototype({\n\t * Movable: {\n\t * position: {},\n\t * velocity: {}\n\t * }\n\t * })\n\t *\n\t * @param {Object} data - Object structure to register as a prototype. Should be a dictionary with the top level keys\n\t * being the prototype names. Can also be a JSON formatted string.\n\t *\n\t * @return {number} Number of prototypes added.\n\t */\n\tprototype(data) {\n\t\tlet count = 0\n\n\t\t// Convert to an object when given a string\n\t\tif (typeof data === 'string') {\n\t\t\tdata = JSON.parse(data)\n\t\t}\n\n\t\t// Data must be an object at this point\n\t\tif (typeof data === 'object') {\n\t\t\t// Iterate through prototype names\n\t\t\tfor (let protoName in data) {\n\t\t\t\tlet inputObject = data[protoName]\n\t\t\t\tlet protoObject = {}\n\t\t\t\t// Iterate through component names\n\t\t\t\tfor (let compName in inputObject) {\n\t\t\t\t\t// Store strings of each component\n\t\t\t\t\tprotoObject[compName] = JSON.stringify(inputObject[compName])\n\t\t\t\t}\n\t\t\t\tthis.entityTemplates[protoName] = protoObject\n\t\t\t\t++count\n\t\t\t}\n\t\t}\n\n\t\treturn count\n\t}\n}\n\nexports.World = World\n", + "content": "/** @ignore */\nconst { invoke, isFunction } = require('./utilities.js')\n\n/** @ignore */\nconst { Entity } = require('./entity.js')\n\n/** @ignore */\nconst { ComponentIndex } = require('./component_index.js')\n\n/**\n * Class for world.\n *\n * @class World (name)\n */\nclass World {\n\t/**\n\t * Constructs an instance of the world.\n\t */\n\tconstructor() {\n\t\t/** @ignore */\n\t\tthis.systems = []\n\n\t\t/**\n\t\t * Maps entity IDs to entities\n\t\t * @ignore\n\t\t */\n\t\tthis.entities = new Map()\n\n\t\t/** @ignore */\n\t\tthis.components = {}\n\n\t\t/** @ignore */\n\t\tthis.entityTemplates = {}\n\n\t\t/** @ignore */\n\t\tthis.idCounter = 1\n\n\t\t/**\n\t\t * Maps entire queries to arrays of entities\n\t\t * @ignore\n\t\t */\n\t\tthis.index = new ComponentIndex(this.entities)\n\t}\n\n\t/**\n\t * Removes all entities from the world.\n\t * Does not affect registered systems, components, or prototypes.\n\t *\n\t * @example\n\t * world.clear()\n\t */\n\tclear() {\n\t\t// Call onRemove on all components of all entities\n\t\tfor (const [entityId, entity] of this.entities) {\n\t\t\tfor (let componentName in entity.data) {\n\t\t\t\t// Get component, and call onRemove if it exists as a function\n\t\t\t\tlet component = entity.data[componentName]\n\t\t\t\tinvoke(component, 'onRemove')\n\t\t\t}\n\t\t}\n\n\t\t// Clear entities\n\t\tthis.entities = new Map()\n\t\tthis.index.clear(this.entities)\n\t}\n\n\t/**\n\t * Registers a component type to the world. Components must be constructable. They are passed the entity first,\n\t * then the rest of the arguments from methods like entity.set(). Components also can have an onRemove() method.\n\t *\n\t * @param {string} name - The name\n\t * @param {function} componentClass - The component class, must be a constructable class or function\n\t *\n\t * @example\n\t * world.component('myComponent', class {\n\t * constructor(entity, some, args) {\n\t * this.entity = entity\n\t * this.some = some\n\t * this.args = args\n\t * }\n\t * })\n\t * // entity === the new entity object\n\t * // some === 10\n\t * // args === 500\n\t * world.entity().set('myComponent', 10, 500)\n\t *\n\t * @return {string} Registered component name on success, undefined on failure\n\t */\n\tcomponent(name, componentClass) {\n\t\t// Only allow functions and classes to be components\n\t\tif (isFunction(componentClass)) {\n\t\t\tthis.components[name] = componentClass\n\t\t\treturn name\n\t\t}\n\t}\n\n\t/**\n\t * Creates a new entity in the world\n\t *\n\t * @param {string} [name] - The prototype name to use\n\t *\n\t * @example\n\t * world.entity()\n\t *\n\t * @example\n\t * world.entity('Player')\n\t *\n\t * @return {Entity} The new entity created\n\t */\n\tentity(name) {\n\t\tlet entityId = this.idCounter++\n\t\tlet entity = new Entity(this, entityId)\n\n\t\t// Use 'name' to get prototype data (if specified)\n\t\tif (name && name in this.entityTemplates) {\n\t\t\t// Add all components from prototype\n\t\t\tlet template = this.entityTemplates[name]\n\t\t\tfor (let componentName in template) {\n\t\t\t\t// Update component with data from template\n\t\t\t\tlet newComponentData = JSON.parse(template[componentName])\n\t\t\t\tentity.update(componentName, newComponentData)\n\t\t\t}\n\t\t}\n\n\t\tthis.entities.set(entityId, entity)\n\t\treturn entity\n\t}\n\n\t/**\n\t * Registers a system to the world.\n\t * The order the systems get registered, is the order then run in.\n\t *\n\t * @example\n\t * // Movement system\n\t * world.system(['position', 'velocity'], class {\n\t * constructor(context) {\n\t * // This is showing how you can optionally pass parameters to the system's constructor\n\t * this.context = context\n\t * }\n\t * every(position, velocity, entity) {\n\t * position.x += velocity.x\n\t * position.y += velocity.y\n\t * }\n\t * }, context)\n\t *\n\t * @example\n\t * // System that doesn't use every()\n\t * world.system(class {\n\t * constructor(context) {\n\t * this.context = context\n\t * }\n\t * pre() {\n\t * // Handle events or something\n\t * }\n\t * }, context)\n\t *\n\t * @param {...Object} args - Both signatures are accepted: (components, systemClass, ...args) or (systemClass, ...args).\n\t *\n\t * **[components]**: The list of components the system will process in every(). This follows the same logic as entity.has() and world.every().\n\t *\n\t * **{systemClass}**: The system class to instantiate. Can contain the following methods: constructor, initialize, pre, every, post. Pre() and post() get called before and after every(), for each of the independent systems. See world.run() for an example of the call order.\n\t *\n\t * **[...args]**: The arguments to forward to the system's constructors.\n\t *\n\t * @return {number} Unique ID of the system on success or undefined on failure\n\t */\n\tsystem(...args) {\n\t\t// Get components and systemClass from arguments\n\t\tlet components = []\n\t\tlet systemClass, rest\n\t\tif (Array.isArray(args[0])) {\n\t\t\tcomponents = args[0]\n\t\t\tsystemClass = args[1]\n\t\t\trest = args.slice(2)\n\t\t} else {\n\t\t\tsystemClass = args[0]\n\t\t\trest = args.slice(1)\n\t\t}\n\n\t\t// Make sure the system is valid\n\t\tif (isFunction(systemClass)) {\n\t\t\t// Create the system, and set the component array query\n\t\t\tlet newSystem = new systemClass(...rest)\n\t\t\tnewSystem.components = components\n\n\t\t\t// Add the system, return its ID\n\t\t\treturn this.systems.push(newSystem) - 1\n\t\t}\n\t\treturn undefined\n\t}\n\n\t/**\n\t * Calls initialize() on all systems\n\t *\n\t * @example\n\t * world.initialize(renderContext)\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' initialize() methods\n\t */\n\tinitialize(...args) {\n\t\tfor (let system of this.systems) {\n\t\t\tinvoke(system, 'initialize', ...args)\n\t\t}\n\t}\n\n\t/**\n\t * Calls pre(), every(), and post() on all systems\n\t *\n\t * @example\n\t * world.run(deltaTime)\n\t *\n\t * @example\n\t * // Example flow of method call order:\n\t * // Setup systems:\n\t * world.system(systemA)\n\t * world.system(systemB)\n\t * // During world.run():\n\t * // systemA.pre()\n\t * // systemA.every() * number of entities\n\t * // systemA.post()\n\t * // systemB.pre()\n\t * // systemB.every() * number of entities\n\t * // systemB.post()\n\t *\n\t * @param {...Object} [args] - The arguments to forward to the systems' methods\n\t */\n\trun(...args) {\n\t\tfor (let system of this.systems) {\n\t\t\tinvoke(system, 'pre', ...args)\n\n\t\t\t// Run the \"every\" method in the system\n\t\t\tif (isFunction(system.every)) {\n\t\t\t\tthis.every(system.components, system.every.bind(system), ...args)\n\t\t\t}\n\n\t\t\tinvoke(system, 'post', ...args)\n\t\t}\n\t}\n\n\t/**\n\t * Iterate through entities with the specified components\n\t *\n\t * @example\n\t * // Use a callback to process entities one-by-one\n\t * world.every(['comp'], comp => {comp.value = 0})\n\t *\n\t * @example\n\t * // Get an iterator for the entities\n\t * let it = world.every(['comp'])\n\t * for (let entity of it) {...}\n\t *\n\t * @param {Array} componentNames - The component names to match entites with. This checks if the entity\n\t * has ALL of the specified components, but does not check for additional components.\n\t * @param {Function} callback - The callback to call for each entity. Takes (...components, entity, ...args).\n\t * @param {...Object} [args] - Any additional arguments to pass to the callback.\n\t *\n\t * @return {MapIterator} An iterator to the entities themselves\n\t */\n\tevery(componentNames, callback, ...args) {\n\t\t// Get indexed map of entities\n\t\tlet entities = this.index.query(componentNames)\n\n\t\tif (isFunction(callback)) {\n\t\t\t// Go through the map of entities\n\t\t\tfor (let entity of entities.values()) {\n\t\t\t\t// At this point, we can safely assume that all components exist, even if entities/components\n\t\t\t\t// are deleted/modified during the loop, because JavaScript's MapIterator is smart enough.\n\n\t\t\t\t// Get all components as an array\n\t\t\t\tlet components = componentNames.map(name => entity.get(name))\n\n\t\t\t\t// Pass components, then the main entity, then any additional arguments\n\t\t\t\tlet status = callback(...components, entity, ...args)\n\n\t\t\t\t// Stop the iteration when the callback returns false\n\t\t\t\tif (status === false) {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn entities.values()\n\t}\n\n\t/**\n\t * Returns an array of entities with matching components\n\t * Simplified version of every(), returns an actual array, and only takes component names as arguments.\n\t *\n\t * @example\n\t * world.get('player', 'sprite')\n\t *\n\t * @param {Array} componentNames - The component names to match on. See every() for how this matches.\n\t *\n\t * @return {Array} Array of entities, instead of iterator like every().\n\t */\n\tget(...componentNames) {\n\t\treturn [...this.every(componentNames)]\n\t}\n\n\t/**\n\t * Registers entity prototype(s). Any existing prototype names that are the same will be overwritten\n\t *\n\t * @example\n\t * world.prototype({\n\t * Movable: {\n\t * position: {},\n\t * velocity: {}\n\t * }\n\t * })\n\t *\n\t * @param {Object} data - Object structure to register as a prototype. Should be a dictionary with the top level keys\n\t * being the prototype names. Can also be a JSON formatted string.\n\t *\n\t * @return {number} Number of prototypes added.\n\t */\n\tprototype(data) {\n\t\tlet count = 0\n\n\t\t// Convert to an object when given a string\n\t\tif (typeof data === 'string') {\n\t\t\tdata = JSON.parse(data)\n\t\t}\n\n\t\t// Data must be an object at this point\n\t\tif (typeof data === 'object') {\n\t\t\t// Iterate through prototype names\n\t\t\tfor (let protoName in data) {\n\t\t\t\tlet inputObject = data[protoName]\n\t\t\t\tlet protoObject = {}\n\t\t\t\t// Iterate through component names\n\t\t\t\tfor (let compName in inputObject) {\n\t\t\t\t\t// Store strings of each component\n\t\t\t\t\tprotoObject[compName] = JSON.stringify(inputObject[compName])\n\t\t\t\t}\n\t\t\t\tthis.entityTemplates[protoName] = protoObject\n\t\t\t\t++count\n\t\t\t}\n\t\t}\n\n\t\treturn count\n\t}\n}\n\nexports.World = World\n", "static": true, "longname": "/srv/http/picoes/src/world.js", "access": "public", @@ -1927,39 +1935,20 @@ "access": "public", "description": "Registers a system to the world.\nThe order the systems get registered, is the order then run in.", "examples": [ - "// Movement system\nworld.system(['position', 'velocity'], class {\n every(position, velocity, entity) {\n position.x += velocity.x\n position.y += velocity.y\n }\n })" + "// Movement system\nworld.system(['position', 'velocity'], class {\n constructor(context) {\n // This is showing how you can optionally pass parameters to the system's constructor\n this.context = context\n }\n every(position, velocity, entity) {\n position.x += velocity.x\n position.y += velocity.y\n }\n }, context)", + "// System that doesn't use every()\nworld.system(class {\n constructor(context) {\n this.context = context\n }\n pre() {\n // Handle events or something\n }\n }, context)" ], - "lineNumber": 150, + "lineNumber": 167, "params": [ - { - "nullable": null, - "types": [ - "Array" - ], - "spread": false, - "optional": false, - "name": "components", - "description": "The list of components the system will process in every(). This follows the same logic as entity.has() and world.every()." - }, - { - "nullable": null, - "types": [ - "Function" - ], - "spread": false, - "optional": false, - "name": "systemClass", - "description": "The system class to instantiate. Can contain the following methods: constructor, initialize,\npre, every, post. Pre() and post() get called before and after every(), for each of the independent systems. See world.run()\nfor an example of the call order." - }, { "nullable": null, "types": [ "...Object" ], "spread": true, - "optional": true, + "optional": false, "name": "args", - "description": "The arguments to forward to the system's constructors" + "description": "Both signatures are accepted: (components, systemClass, ...args) or (systemClass, ...args).\n\n**[components]**: The list of components the system will process in every(). This follows the same logic as entity.has() and world.every().\n\n**{systemClass}**: The system class to instantiate. Can contain the following methods: constructor, initialize, pre, every, post. Pre() and post() get called before and after every(), for each of the independent systems. See world.run() for an example of the call order.\n\n**[...args]**: The arguments to forward to the system's constructors." } ], "return": { @@ -1985,7 +1974,7 @@ "examples": [ "world.initialize(renderContext)" ], - "lineNumber": 171, + "lineNumber": 200, "params": [ { "nullable": null, @@ -2013,9 +2002,9 @@ "description": "Calls pre(), every(), and post() on all systems", "examples": [ "world.run(deltaTime)", - "// Example flow of method call order:\n// Setup systems:\nworld.system([], systemA)\nworld.system([], systemB)\n// During world.run():\n// systemA.pre()\n// systemA.every() * number of entities\n// systemA.post()\n// systemB.pre()\n// systemB.every() * number of entities\n// systemB.post()" + "// Example flow of method call order:\n// Setup systems:\nworld.system(systemA)\nworld.system(systemB)\n// During world.run():\n// systemA.pre()\n// systemA.every() * number of entities\n// systemA.post()\n// systemB.pre()\n// systemB.every() * number of entities\n// systemB.post()" ], - "lineNumber": 198, + "lineNumber": 227, "params": [ { "nullable": null, @@ -2045,7 +2034,7 @@ "// Use a callback to process entities one-by-one\nworld.every(['comp'], comp => {comp.value = 0})", "// Get an iterator for the entities\nlet it = world.every(['comp'])\nfor (let entity of it) {...}" ], - "lineNumber": 230, + "lineNumber": 259, "params": [ { "nullable": null, @@ -2101,7 +2090,7 @@ "examples": [ "world.get('player', 'sprite')" ], - "lineNumber": 267, + "lineNumber": 296, "params": [ { "nullable": null, @@ -2137,7 +2126,7 @@ "examples": [ "world.prototype({\n Movable: {\n position: {},\n velocity: {}\n }\n})" ], - "lineNumber": 287, + "lineNumber": 316, "params": [ { "nullable": null, diff --git a/docs/source.html b/docs/source.html index 2f790a5..f62beab 100644 --- a/docs/source.html +++ b/docs/source.html @@ -62,9 +62,9 @@ src/entity.js Entity 100 %22/22 - 8966 byte - 333 - 2018-04-07 19:37:01 (UTC) + 9011 byte + 335 + 2018-04-07 20:08:04 (UTC) src/utilities.js @@ -78,9 +78,9 @@ src/world.js World 100 %20/20 - 8816 byte - 315 - 2018-04-07 19:39:12 (UTC) + 9513 byte + 344 + 2018-04-07 21:01:02 (UTC) diff --git a/src/entity.js b/src/entity.js index a6c3078..a607bcb 100644 --- a/src/entity.js +++ b/src/entity.js @@ -45,6 +45,8 @@ class Entity { * ID is read-only, attempting to set it will throw an error. * * @private + * + * @throws {Error} Cannot set entity id */ set id(id) { throw new Error('Cannot set entity id') diff --git a/src/world.js b/src/world.js index e6f010c..2e70a73 100644 --- a/src/world.js +++ b/src/world.js @@ -133,25 +133,54 @@ class World { * @example * // Movement system * world.system(['position', 'velocity'], class { + * constructor(context) { + * // This is showing how you can optionally pass parameters to the system's constructor + * this.context = context + * } * every(position, velocity, entity) { * position.x += velocity.x * position.y += velocity.y * } - * }) + * }, context) + * + * @example + * // System that doesn't use every() + * world.system(class { + * constructor(context) { + * this.context = context + * } + * pre() { + * // Handle events or something + * } + * }, context) * - * @param {Array} components - The list of components the system will process in every(). This follows the same logic as entity.has() and world.every(). - * @param {Function} systemClass - The system class to instantiate. Can contain the following methods: constructor, initialize, - * pre, every, post. Pre() and post() get called before and after every(), for each of the independent systems. See world.run() - * for an example of the call order. - * @param {...Object} [args] - The arguments to forward to the system's constructors + * @param {...Object} args - Both signatures are accepted: (components, systemClass, ...args) or (systemClass, ...args). + * + * **[components]**: The list of components the system will process in every(). This follows the same logic as entity.has() and world.every(). + * + * **{systemClass}**: The system class to instantiate. Can contain the following methods: constructor, initialize, pre, every, post. Pre() and post() get called before and after every(), for each of the independent systems. See world.run() for an example of the call order. + * + * **[...args]**: The arguments to forward to the system's constructors. * * @return {number} Unique ID of the system on success or undefined on failure */ - system(components, systemClass, ...args) { - // TODO: Make components optional, and parameters more dynamic by only using ...args + system(...args) { + // Get components and systemClass from arguments + let components = [] + let systemClass, rest + if (Array.isArray(args[0])) { + components = args[0] + systemClass = args[1] + rest = args.slice(2) + } else { + systemClass = args[0] + rest = args.slice(1) + } + + // Make sure the system is valid if (isFunction(systemClass)) { // Create the system, and set the component array query - let newSystem = new systemClass(...args) + let newSystem = new systemClass(...rest) newSystem.components = components // Add the system, return its ID @@ -183,8 +212,8 @@ class World { * @example * // Example flow of method call order: * // Setup systems: - * world.system([], systemA) - * world.system([], systemB) + * world.system(systemA) + * world.system(systemB) * // During world.run(): * // systemA.pre() * // systemA.every() * number of entities diff --git a/test/tests.js b/test/tests.js index 0943947..762f8cb 100644 --- a/test/tests.js +++ b/test/tests.js @@ -487,6 +487,31 @@ describe('World', function() { assert(entA.get('position').x == 3 && entA.get('position').y == 1) assert(entB.get('position').x == 28 && entB.get('position').y == 44) }) + it('system variadic arguments with optional components', function() { + let world = new World() + + // Test optional case + let created = false + world.system(class { + constructor(first, second) { + assert(first === 1) + assert(second === 2) + created = true + } + }, 1, 2) + assert(created) + + // Test specified case + created = false + world.system(['whatever'], class { + constructor(first, second) { + assert(first === 1) + assert(second === 2) + created = true + } + }, 1, 2) + assert(created) + }) it('use the every() method', function() { let world = new World() let ent1 = world.entity().set('position').set('"velocity"') @@ -603,7 +628,7 @@ describe('World', function() { assert(count == 3) count = 0 - world.system([], class { + world.system(class { every(ent) { ++count }