oxygen-core
Version:
Oxygen game engine (Xenon Core for browsers)
1,375 lines (1,374 loc) • 550 kB
JSON
{
"type": "File",
"start": 0,
"end": 2670,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 118,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 2670,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 118,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 30,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 30
}
},
"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": 29,
"loc": {
"start": {
"line": 1,
"column": 19
},
"end": {
"line": 1,
"column": 29
}
},
"extra": {
"rawValue": "./System",
"raw": "'./System'"
},
"value": "./System"
}
},
{
"type": "ExportDefaultDeclaration",
"start": 34,
"end": 2668,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 117,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 49,
"end": 2668,
"loc": {
"start": {
"line": 3,
"column": 15
},
"end": {
"line": 117,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 55,
"end": 69,
"loc": {
"start": {
"line": 3,
"column": 21
},
"end": {
"line": 3,
"column": 35
},
"identifierName": "AssemblySystem"
},
"name": "AssemblySystem"
},
"superClass": {
"type": "Identifier",
"start": 78,
"end": 84,
"loc": {
"start": {
"line": 3,
"column": 44
},
"end": {
"line": 3,
"column": 50
},
"identifierName": "System"
},
"name": "System"
},
"body": {
"type": "ClassBody",
"start": 85,
"end": 2668,
"loc": {
"start": {
"line": 3,
"column": 51
},
"end": {
"line": 117,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 92,
"end": 227,
"loc": {
"start": {
"line": 5,
"column": 2
},
"end": {
"line": 11,
"column": 3
}
},
"static": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 92,
"end": 103,
"loc": {
"start": {
"line": 5,
"column": 2
},
"end": {
"line": 5,
"column": 13
},
"identifierName": "constructor"
},
"name": "constructor"
},
"kind": "constructor",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 106,
"end": 227,
"loc": {
"start": {
"line": 5,
"column": 16
},
"end": {
"line": 11,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 113,
"end": 121,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 12
}
},
"expression": {
"type": "CallExpression",
"start": 113,
"end": 120,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 11
}
},
"callee": {
"type": "Super",
"start": 113,
"end": 118,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 9
}
}
},
"arguments": []
}
},
{
"type": "ExpressionStatement",
"start": 129,
"end": 158,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 33
}
},
"expression": {
"type": "AssignmentExpression",
"start": 129,
"end": 157,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 32
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 129,
"end": 145,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 20
}
},
"object": {
"type": "ThisExpression",
"start": 129,
"end": 133,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 134,
"end": 145,
"loc": {
"start": {
"line": 8,
"column": 9
},
"end": {
"line": 8,
"column": 20
},
"identifierName": "_assemblies"
},
"name": "_assemblies"
},
"computed": false
},
"right": {
"type": "NewExpression",
"start": 148,
"end": 157,
"loc": {
"start": {
"line": 8,
"column": 23
},
"end": {
"line": 8,
"column": 32
}
},
"callee": {
"type": "Identifier",
"start": 152,
"end": 155,
"loc": {
"start": {
"line": 8,
"column": 27
},
"end": {
"line": 8,
"column": 30
},
"identifierName": "Map"
},
"name": "Map"
},
"arguments": []
}
}
},
{
"type": "ExpressionStatement",
"start": 164,
"end": 190,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 30
}
},
"expression": {
"type": "AssignmentExpression",
"start": 164,
"end": 189,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 29
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 164,
"end": 177,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 17
}
},
"object": {
"type": "ThisExpression",
"start": 164,
"end": 168,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 169,
"end": 177,
"loc": {
"start": {
"line": 9,
"column": 9
},
"end": {
"line": 9,
"column": 17
},
"identifierName": "_imports"
},
"name": "_imports"
},
"computed": false
},
"right": {
"type": "NewExpression",
"start": 180,
"end": 189,
"loc": {
"start": {
"line": 9,
"column": 20
},
"end": {
"line": 9,
"column": 29
}
},
"callee": {
"type": "Identifier",
"start": 184,
"end": 187,
"loc": {
"start": {
"line": 9,
"column": 24
},
"end": {
"line": 9,
"column": 27
},
"identifierName": "Map"
},
"name": "Map"
},
"arguments": []
}
}
},
{
"type": "ExpressionStatement",
"start": 196,
"end": 222,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 30
}
},
"expression": {
"type": "CallExpression",
"start": 196,
"end": 221,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 29
}
},
"callee": {
"type": "MemberExpression",
"start": 196,
"end": 213,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 21
}
},
"object": {
"type": "MemberExpression",
"start": 196,
"end": 209,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 17
}
},
"object": {
"type": "ThisExpression",
"start": 196,
"end": 200,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 201,
"end": 209,
"loc": {
"start": {
"line": 10,
"column": 9
},
"end": {
"line": 10,
"column": 17
},
"identifierName": "_imports"
},
"name": "_imports"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 210,
"end": 213,
"loc": {
"start": {
"line": 10,
"column": 18
},
"end": {
"line": 10,
"column": 21
},
"identifierName": "set"
},
"name": "set"
},
"computed": false
},
"arguments": [
{
"type": "StringLiteral",
"start": 214,
"end": 216,
"loc": {
"start": {
"line": 10,
"column": 22
},
"end": {
"line": 10,
"column": 24
}
},
"extra": {
"rawValue": "",
"raw": "''"
},
"value": ""
},
{
"type": "ObjectExpression",
"start": 218,
"end": 220,
"loc": {
"start": {
"line": 10,
"column": 26
},
"end": {
"line": 10,
"column": 28
}
},
"properties": []
}
]
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 233,
"end": 461,
"loc": {
"start": {
"line": 13,
"column": 2
},
"end": {
"line": 24,
"column": 3
}
},
"static": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 233,
"end": 240,
"loc": {
"start": {
"line": 13,
"column": 2
},
"end": {
"line": 13,
"column": 9
},
"identifierName": "dispose"
},
"name": "dispose"
},
"kind": "method",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 243,
"end": 461,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 24,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 250,
"end": 266,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 20
}
},
"expression": {
"type": "CallExpression",
"start": 250,
"end": 265,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 19
}
},
"callee": {
"type": "MemberExpression",
"start": 250,
"end": 263,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 17
}
},
"object": {
"type": "Super",
"start": 250,
"end": 255,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 9
}
}
},
"property": {
"type": "Identifier",
"start": 256,
"end": 263,
"loc": {
"start": {
"line": 14,
"column": 10
},
"end": {
"line": 14,
"column": 17
},
"identifierName": "dispose"
},
"name": "dispose"
},
"computed": false
},
"arguments": []
}
},
{
"type": "VariableDeclaration",
"start": 274,
"end": 313,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 43
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 280,
"end": 312,
"loc": {
"start": {
"line": 16,
"column": 10
},
"end": {
"line": 16,
"column": 42
}
},
"id": {
"type": "ObjectPattern",
"start": 280,
"end": 305,
"loc": {
"start": {
"line": 16,
"column": 10
},
"end": {
"line": 16,
"column": 35
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 282,
"end": 293,
"loc": {
"start": {
"line": 16,
"column": 12
},
"end": {
"line": 16,
"column": 23
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 282,
"end": 293,
"loc": {
"start": {
"line": 16,
"column": 12
},
"end": {
"line": 16,
"column": 23
},
"identifierName": "_assemblies"
},
"name": "_assemblies"
},
"value": {
"type": "Identifier",
"start": 282,
"end": 293,
"loc": {
"start": {
"line": 16,
"column": 12
},
"end": {
"line": 16,
"column": 23
},
"identifierName": "_assemblies"
},
"name": "_assemblies"
},
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start": 295,
"end": 303,
"loc": {
"start": {
"line": 16,
"column": 25
},
"end": {
"line": 16,
"column": 33
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 295,
"end": 303,
"loc": {
"start": {
"line": 16,
"column": 25
},
"end": {
"line": 16,
"column": 33
},
"identifierName": "_imports"
},
"name": "_imports"
},
"value": {
"type": "Identifier",
"start": 295,
"end": 303,
"loc": {
"start": {
"line": 16,
"column": 25
},
"end": {
"line": 16,
"column": 33
},
"identifierName": "_imports"
},
"name": "_imports"
},
"extra": {
"shorthand": true
}
}
]
},
"init": {
"type": "ThisExpression",
"start": 308,
"end": 312,
"loc": {
"start": {
"line": 16,
"column": 38
},
"end": {
"line": 16,
"column": 42
}
}
}
}
],
"kind": "const"
},
{
"type": "IfStatement",
"start": 319,
"end": 374,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 19,
"column": 5
}
},
"test": {
"type": "UnaryExpression",
"start": 323,
"end": 336,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 21
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "UnaryExpression",
"start": 324,
"end": 336,
"loc": {
"start": {
"line": 17,
"column": 9
},
"end": {
"line": 17,
"column": 21
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 325,
"end": 336,
"loc": {
"start": {
"line": 17,
"column": 10
},
"end": {
"line": 17,
"column": 21
},
"identifierName": "_assemblies"
},
"name": "_assemblies"
},
"extra": {
"parenthesizedArgument": false
}
},
"extra": {
"parenthesizedArgument": false
}
},
"consequent": {
"type": "BlockStatement",
"start": 338,
"end": 374,
"loc": {
"start": {
"line": 17,
"column": 23
},
"end": {
"line": 19,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 347,
"end": 367,
"loc": {
"start": {
"line": 18,
"column": 6
},
"end": {
"line": 18,
"column": 26
}
},
"expression": {
"type": "CallExpression",
"start": 347,
"end": 366,
"loc": {
"start": {
"line": 18,
"column": 6
},
"end": {
"line": 18,
"column": 25
}
},
"callee": {
"type": "MemberExpression",
"start": 347,
"end": 364,
"loc": {
"start": {
"line": 18,
"column": 6
},
"end": {
"line": 18,
"column": 23
}
},
"object": {
"type": "Identifier",
"start": 347,
"end": 358,
"loc": {
"start": {
"line": 18,
"column": 6
},
"end": {
"line": 18,
"column": 17
},
"identifierName": "_assemblies"
},
"name": "_assemblies"
},
"property": {
"type": "Identifier",
"start": 359,
"end": 364,
"loc": {
"start": {
"line": 18,
"column": 18
},
"end": {
"line": 18,
"column": 23
},
"identifierName": "clear"
},
"name": "clear"
},
"computed": false
},
"arguments": []
}
}
],
"directives": []
},
"alternate": null
},
{
"type": "IfStatement",
"start": 380,
"end": 429,
"loc": {
"start": {
"line": 20,
"column": 4
},
"end": {
"line": 22,
"column": 5
}
},
"test": {
"type": "UnaryExpression",
"start": 384,
"end": 394,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 18
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "UnaryExpression",
"start": 385,
"end": 394,
"loc": {
"start": {
"line": 20,
"column": 9
},
"end": {
"line": 20,
"column": 18
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 386,
"end": 394,
"loc": {
"start": {
"line": 20,
"column": 10
},
"end": {
"line": 20,
"column": 18
},
"identifierName": "_imports"
},
"name": "_imports"
},
"extra": {
"parenthesizedArgument": false
}
},
"extra": {
"parenthesizedArgument": false
}
},
"consequent": {
"type": "BlockStatement",
"start": 396,
"end": 429,
"loc": {
"start": {
"line": 20,
"column": 20
},
"end": {
"line": 22,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 405,
"end": 422,
"loc": {
"start": {
"line": 21,
"column": 6
},
"end": {
"line": 21,
"column": 23
}
},
"expression": {
"type": "CallExpression",
"start": 405,
"end": 421,
"loc": {
"start": {
"line": 21,
"column": 6
},
"end": {
"line": 21,
"column": 22
}
},
"callee": {
"type": "MemberExpression",
"start": 405,
"end": 419,
"loc": {
"start": {
"line": 21,
"column": 6
},
"end": {
"line": 21,
"column": 20
}
},
"object": {
"type": "Identifier",
"start": 405,
"end": 413,
"loc": {
"start": {
"line": 21,
"column": 6
},
"end": {
"line": 21,
"column": 14
},
"identifierName": "_imports"
},
"name": "_imports"
},
"property": {
"type": "Identifier",
"start": 414,
"end": 419,
"loc": {
"start": {
"line": 21,
"column": 15
},
"end": {
"line": 21,
"column": 20
},
"identifierName": "clear"
},
"name": "clear"
},
"computed": false
},
"arguments": []
}
}
],
"directives": []
},
"alternate": null
},
{
"type": "ExpressionStatement",
"start": 435,
"end": 456,
"loc": {
"start": {
"line": 23,
"column": 4
},
"end": {
"line": 23,
"column": 25
}
},
"expression": {
"type": "AssignmentExpression",
"start": 435,
"end": 455,
"loc": {
"start": {
"line": 23,
"column": 4
},
"end": {
"line": 23,
"column": 24
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 435,
"end": 448,
"loc": {
"start": {
"line": 23,
"column": 4
},
"end": {
"line": 23,
"column": 17
}
},
"object": {
"type": "ThisExpression",
"start": 435,
"end": 439,
"loc": {
"start": {
"line": 23,
"column": 4
},
"end": {
"line": 23,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 440,
"end": 448,
"loc": {
"start": {
"line": 23,
"column": 9
},
"end": {
"line": 23,