UNPKG

oxygen-core

Version:

Oxygen game engine (Xenon Core for browsers)

1,540 lines (1,539 loc) 2.18 MB
{ "type": "File", "start": 0, "end": 11427, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 490, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 11427, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 490, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 39, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 39 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 7, "end": 13, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 13 } }, "local": { "type": "Identifier", "start": 7, "end": 13, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 13 }, "identifierName": "System" }, "name": "System" } } ], "source": { "type": "StringLiteral", "start": 19, "end": 38, "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 38 } }, "extra": { "rawValue": "../systems/System", "raw": "'../systems/System'" }, "value": "../systems/System" } }, { "type": "ImportDeclaration", "start": 41, "end": 99, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 58 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 48, "end": 57, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 16 } }, "local": { "type": "Identifier", "start": 48, "end": 57, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 16 }, "identifierName": "Component" }, "name": "Component" } } ], "source": { "type": "StringLiteral", "start": 63, "end": 98, "loc": { "start": { "line": 2, "column": 22 }, "end": { "line": 2, "column": 57 } }, "extra": { "rawValue": "../systems/EntitySystem/Component", "raw": "'../systems/EntitySystem/Component'" }, "value": "../systems/EntitySystem/Component" } }, { "type": "ImportDeclaration", "start": 101, "end": 152, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 51 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 108, "end": 114, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 13 } }, "local": { "type": "Identifier", "start": 108, "end": 114, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 13 }, "identifierName": "Camera" }, "name": "Camera" } }, { "type": "ImportSpecifier", "start": 118, "end": 133, "loc": { "start": { "line": 3, "column": 17 }, "end": { "line": 3, "column": 32 } }, "imported": { "type": "Identifier", "start": 118, "end": 133, "loc": { "start": { "line": 3, "column": 17 }, "end": { "line": 3, "column": 32 }, "identifierName": "PostprocessPass" }, "name": "PostprocessPass" }, "local": { "type": "Identifier", "start": 118, "end": 133, "loc": { "start": { "line": 3, "column": 17 }, "end": { "line": 3, "column": 32 }, "identifierName": "PostprocessPass" }, "name": "PostprocessPass" } } ], "source": { "type": "StringLiteral", "start": 141, "end": 151, "loc": { "start": { "line": 3, "column": 40 }, "end": { "line": 3, "column": 50 } }, "extra": { "rawValue": "./Camera", "raw": "'./Camera'" }, "value": "./Camera" } }, { "type": "ExportNamedDeclaration", "start": 156, "end": 3065, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 125, "column": 1 } }, "specifiers": [], "source": null, "declaration": { "type": "ClassDeclaration", "start": 163, "end": 3065, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 125, "column": 1 } }, "id": { "type": "Identifier", "start": 169, "end": 188, "loc": { "start": { "line": 5, "column": 13 }, "end": { "line": 5, "column": 32 }, "identifierName": "PostprocessRackPass" }, "name": "PostprocessRackPass" }, "superClass": { "type": "Identifier", "start": 197, "end": 212, "loc": { "start": { "line": 5, "column": 41 }, "end": { "line": 5, "column": 56 }, "identifierName": "PostprocessPass" }, "name": "PostprocessPass" }, "body": { "type": "ClassBody", "start": 213, "end": 3065, "loc": { "start": { "line": 5, "column": 57 }, "end": { "line": 125, "column": 1 } }, "body": [ { "type": "ClassMethod", "start": 220, "end": 275, "loc": { "start": { "line": 7, "column": 2 }, "end": { "line": 9, "column": 3 } }, "static": false, "computed": false, "key": { "type": "Identifier", "start": 224, "end": 235, "loc": { "start": { "line": 7, "column": 6 }, "end": { "line": 7, "column": 17 }, "identifierName": "connections" }, "name": "connections" }, "kind": "get", "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 238, "end": 275, "loc": { "start": { "line": 7, "column": 20 }, "end": { "line": 9, "column": 3 } }, "body": [ { "type": "ReturnStatement", "start": 245, "end": 270, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 29 } }, "argument": { "type": "MemberExpression", "start": 252, "end": 269, "loc": { "start": { "line": 8, "column": 11 }, "end": { "line": 8, "column": 28 } }, "object": { "type": "ThisExpression", "start": 252, "end": 256, "loc": { "start": { "line": 8, "column": 11 }, "end": { "line": 8, "column": 15 } } }, "property": { "type": "Identifier", "start": 257, "end": 269, "loc": { "start": { "line": 8, "column": 16 }, "end": { "line": 8, "column": 28 }, "identifierName": "_connections" }, "name": "_connections" }, "computed": false } } ], "directives": [] } }, { "type": "ClassMethod", "start": 281, "end": 342, "loc": { "start": { "line": 11, "column": 2 }, "end": { "line": 13, "column": 3 } }, "static": false, "computed": false, "key": { "type": "Identifier", "start": 285, "end": 296, "loc": { "start": { "line": 11, "column": 6 }, "end": { "line": 11, "column": 17 }, "identifierName": "connections" }, "name": "connections" }, "kind": "set", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 297, "end": 302, "loc": { "start": { "line": 11, "column": 18 }, "end": { "line": 11, "column": 23 }, "identifierName": "value" }, "name": "value" } ], "body": { "type": "BlockStatement", "start": 304, "end": 342, "loc": { "start": { "line": 11, "column": 25 }, "end": { "line": 13, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 311, "end": 337, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 30 } }, "expression": { "type": "AssignmentExpression", "start": 311, "end": 336, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 29 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 311, "end": 328, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 21 } }, "object": { "type": "ThisExpression", "start": 311, "end": 315, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 8 } } }, "property": { "type": "Identifier", "start": 316, "end": 328, "loc": { "start": { "line": 12, "column": 9 }, "end": { "line": 12, "column": 21 }, "identifierName": "_connections" }, "name": "_connections" }, "computed": false }, "right": { "type": "Identifier", "start": 331, "end": 336, "loc": { "start": { "line": 12, "column": 24 }, "end": { "line": 12, "column": 29 }, "identifierName": "value" }, "name": "value" } } } ], "directives": [] } }, { "type": "ClassMethod", "start": 348, "end": 446, "loc": { "start": { "line": 15, "column": 2 }, "end": { "line": 20, "column": 3 } }, "static": false, "computed": false, "key": { "type": "Identifier", "start": 348, "end": 359, "loc": { "start": { "line": 15, "column": 2 }, "end": { "line": 15, "column": 13 }, "identifierName": "constructor" }, "name": "constructor" }, "kind": "constructor", "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 362, "end": 446, "loc": { "start": { "line": 15, "column": 16 }, "end": { "line": 20, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 369, "end": 377, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 12 } }, "expression": { "type": "CallExpression", "start": 369, "end": 376, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 11 } }, "callee": { "type": "Super", "start": 369, "end": 374, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 9 } } }, "arguments": [] } }, { "type": "ExpressionStatement", "start": 385, "end": 410, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 29 } }, "expression": { "type": "AssignmentExpression", "start": 385, "end": 409, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 28 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 385, "end": 402, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 21 } }, "object": { "type": "ThisExpression", "start": 385, "end": 389, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 8 } } }, "property": { "type": "Identifier", "start": 390, "end": 402, "loc": { "start": { "line": 18, "column": 9 }, "end": { "line": 18, "column": 21 }, "identifierName": "_connections" }, "name": "_connections" }, "computed": false }, "right": { "type": "NullLiteral", "start": 405, "end": 409, "loc": { "start": { "line": 18, "column": 24 }, "end": { "line": 18, "column": 28 } } } } }, { "type": "ExpressionStatement", "start": 416, "end": 441, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 29 } }, "expression": { "type": "AssignmentExpression", "start": 416, "end": 440, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 28 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 416, "end": 428, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 16 } }, "object": { "type": "ThisExpression", "start": 416, "end": 420, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 8 } } }, "property": { "type": "Identifier", "start": 421, "end": 428, "loc": { "start": { "line": 19, "column": 9 }, "end": { "line": 19, "column": 16 }, "identifierName": "_passes" }, "name": "_passes" }, "computed": false }, "right": { "type": "NewExpression", "start": 431, "end": 440, "loc": { "start": { "line": 19, "column": 19 }, "end": { "line": 19, "column": 28 } }, "callee": { "type": "Identifier", "start": 435, "end": 438, "loc": { "start": { "line": 19, "column": 23 }, "end": { "line": 19, "column": 26 }, "identifierName": "Map" }, "name": "Map" }, "arguments": [] } } } ], "directives": [] } }, { "type": "ClassMethod", "start": 452, "end": 582, "loc": { "start": { "line": 22, "column": 2 }, "end": { "line": 28, "column": 3 } }, "static": false, "computed": false, "key": { "type": "Identifier", "start": 452, "end": 459, "loc": { "start": { "line": 22, "column": 2 }, "end": { "line": 22, "column": 9 }, "identifierName": "dispose" }, "name": "dispose" }, "kind": "method", "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 462, "end": 582, "loc": { "start": { "line": 22, "column": 12 }, "end": { "line": 28, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 469, "end": 496, "loc": { "start": { "line": 23, "column": 4 }, "end": { "line": 23, "column": 31 } }, "expression": { "type": "CallExpression", "start": 469, "end": 495, "loc": { "start": { "line": 23, "column": 4 }, "end": { "line": 23, "column": 30 } }, "callee": { "type": "MemberExpression", "start": 469, "end": 493, "loc": { "start": { "line": 23, "column": 4 }, "end": { "line": 23, "column": 28 } }, "object": { "type": "ThisExpression", "start": 469, "end": 473, "loc": { "start": { "line": 23, "column": 4 }, "end": { "line": 23, "column": 8 } } }, "property": { "type": "Identifier", "start": 474, "end": 493, "loc": { "start": { "line": 23, "column": 9 }, "end": { "line": 23, "column": 28 }, "identifierName": "unregisterAllPasses" }, "name": "unregisterAllPasses" }, "computed": false }, "arguments": [] } }, { "type": "ExpressionStatement", "start": 502, "end": 518, "loc": { "start": { "line": 24, "column": 4 }, "end": { "line": 24, "column": 20 } }, "expression": { "type": "CallExpression", "start": 502, "end": 517, "loc": { "start": { "line": 24, "column": 4 }, "end": { "line": 24, "column": 19 } }, "callee": { "type": "MemberExpression", "start": 502, "end": 515, "loc": { "start": { "line": 24, "column": 4 }, "end": { "line": 24, "column": 17 } }, "object": { "type": "Super", "start": 502, "end": 507, "loc": { "start": { "line": 24, "column": 4 }, "end": { "line": 24, "column": 9 } } }, "property": { "type": "Identifier", "start": 508, "end": 515, "loc": { "start": { "line": 24, "column": 10 }, "end": { "line": 24, "column": 17 }, "identifierName": "dispose" }, "name": "dispose" }, "computed": false }, "arguments": [] } }, { "type": "ExpressionStatement", "start": 526, "end": 551, "loc": { "start": { "line": 26, "column": 4 }, "end": { "line": 26, "column": 29 } }, "expression": { "type": "AssignmentExpression", "start": 526, "end": 550, "loc": { "start": { "line": 26, "column": 4 }, "end": { "line": 26, "column": 28 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 526, "end": 543, "loc": { "start": { "line": 26, "column": 4 }, "end": { "line": 26, "column": 21 } }, "object": { "type": "ThisExpression", "start": 526, "end": 530, "loc": { "start": { "line": 26, "column": 4 }, "end": { "line": 26, "column": 8 } } }, "property": { "type": "Identifier", "start": 531, "end": 543, "loc": { "start": { "line": 26, "column": 9 }, "end": { "line": 26, "column": 21 }, "identifierName": "_connections" }, "name": "_connections" }, "computed": false }, "right": { "type": "NullLiteral", "start": 546, "end": 550, "loc": { "start": { "line": 26, "column": 24 }, "end": { "line": 26, "column": 28 } } } } }, { "type": "ExpressionStatement", "start": 557, "end": 577, "loc": { "start": { "line": 27, "column": 4 }, "end": { "line": 27, "column": 24 } }, "expression": { "type": "AssignmentExpression", "start": 557, "end": 576, "loc": { "start": { "line": 27, "column": 4 }, "end": { "line": 27, "column": 23 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 557, "end": 569, "loc": { "start": { "line": 27, "column": 4 }, "end": { "line": 27, "column": 16 } }, "object": { "type": "ThisExpression", "start": 557, "end": 561, "loc": { "start": { "line": 27, "column": 4 }, "end": { "line": 27, "column": 8 } } }, "property": { "type": "Identifier", "start": 562, "end": 569, "loc": { "start": { "line": 27, "column": 9 }, "end": { "line": 27, "column": 16 }, "identifierName": "_passes" }, "name": "_passes" }, "computed": false }, "right": { "type": "NullLiteral", "start": 572, "end": 576, "loc": { "start": { "line": 27, "column": 19 }, "end": { "line": 27, "column": 23 } } } } } ], "directives": [] } }, { "type": "ClassMethod", "start": 588, "end": 1084, "loc": { "start": { "line": 30, "column": 2 }, "end": { "line": 48, "column": 3 } }, "static": false, "computed": false, "key": { "type": "Identifier", "start": 588, "end": 599, "loc": { "start": { "line": 30, "column": 2 }, "end": { "line": 30, "column": 13 }, "identifierName": "getTargetId" }, "name": "getTargetId" }, "kind": "method", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 600, "end": 602, "loc": { "start": { "line": 30, "column": 14 }, "end": { "line": 30, "column": 16 }, "identifierName": "id" }, "name": "id" } ], "body": { "type": "BlockStatement", "start": 604, "end": 1084, "loc": { "start": { "line": 30, "column": 18 }, "end": { "line": 48, "column": 3 } }, "body": [ { "type": "IfStatement", "start": 611, "end": 702, "loc": { "start": { "line": 31, "column": 4 }, "end": { "line": 33, "column": 5 } }, "test": { "type": "BinaryExpression", "start": 615, "end": 637, "loc": { "start": { "line": 31, "column": 8 }, "end": { "line": 31, "column": 30 } }, "left": { "type": "UnaryExpression", "start": 615, "end": 624, "loc": { "start": { "line": 31, "column": 8 }, "end": { "line": 31, "column": 17 } }, "operator": "typeof", "prefix": true, "argument": { "type": "Identifier", "start": 622, "end": 624, "loc": { "start": { "line": 31, "column": 15 }, "end": { "line": 31, "column": 17 }, "identifierName": "id" }, "name": "id" }, "extra": { "parenthesizedArgument": false } }, "operator": "!==", "right": { "type": "StringLiteral", "start": 629, "end": 637, "loc": { "start": { "line": 31, "column": 22 }, "end": { "line": 31, "column": 30 } }, "extra": { "rawValue": "string", "raw": "'string'" }, "value": "string" } }, "consequent": { "type": "BlockStatement", "start": 639, "end": 702, "loc": { "start": { "line": 31, "column": 32