oxygen-core
Version:
Oxygen game engine (Xenon Core for browsers)
1,448 lines (1,447 loc) • 426 kB
JSON
{
"type": "File",
"start": 0,
"end": 2077,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 97,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 2077,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 97,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 58,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 58
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 7,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 16
}
},
"local": {
"type": "Identifier",
"start": 7,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 16
},
"identifierName": "Component"
},
"name": "Component"
}
}
],
"source": {
"type": "StringLiteral",
"start": 22,
"end": 57,
"loc": {
"start": {
"line": 1,
"column": 22
},
"end": {
"line": 1,
"column": 57
}
},
"extra": {
"rawValue": "../systems/EntitySystem/Component",
"raw": "'../systems/EntitySystem/Component'"
},
"value": "../systems/EntitySystem/Component"
}
},
{
"type": "ExportDefaultDeclaration",
"start": 62,
"end": 2075,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 96,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 77,
"end": 2075,
"loc": {
"start": {
"line": 3,
"column": 15
},
"end": {
"line": 96,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 83,
"end": 96,
"loc": {
"start": {
"line": 3,
"column": 21
},
"end": {
"line": 3,
"column": 34
},
"identifierName": "SortedActions"
},
"name": "SortedActions"
},
"superClass": {
"type": "Identifier",
"start": 105,
"end": 114,
"loc": {
"start": {
"line": 3,
"column": 43
},
"end": {
"line": 3,
"column": 52
},
"identifierName": "Component"
},
"name": "Component"
},
"body": {
"type": "ClassBody",
"start": 115,
"end": 2075,
"loc": {
"start": {
"line": 3,
"column": 53
},
"end": {
"line": 96,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 122,
"end": 178,
"loc": {
"start": {
"line": 5,
"column": 2
},
"end": {
"line": 7,
"column": 3
}
},
"static": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 129,
"end": 136,
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 16
},
"identifierName": "factory"
},
"name": "factory"
},
"kind": "method",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 139,
"end": 178,
"loc": {
"start": {
"line": 5,
"column": 19
},
"end": {
"line": 7,
"column": 3
}
},
"body": [
{
"type": "ReturnStatement",
"start": 146,
"end": 173,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 31
}
},
"argument": {
"type": "NewExpression",
"start": 153,
"end": 172,
"loc": {
"start": {
"line": 6,
"column": 11
},
"end": {
"line": 6,
"column": 30
}
},
"callee": {
"type": "Identifier",
"start": 157,
"end": 170,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 6,
"column": 28
},
"identifierName": "SortedActions"
},
"name": "SortedActions"
},
"arguments": []
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 184,
"end": 305,
"loc": {
"start": {
"line": 9,
"column": 2
},
"end": {
"line": 14,
"column": 3
}
},
"static": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 195,
"end": 205,
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 23
},
"identifierName": "propsTypes"
},
"name": "propsTypes"
},
"kind": "get",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 208,
"end": 305,
"loc": {
"start": {
"line": 9,
"column": 26
},
"end": {
"line": 14,
"column": 3
}
},
"body": [
{
"type": "ReturnStatement",
"start": 215,
"end": 300,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 13,
"column": 6
}
},
"argument": {
"type": "ObjectExpression",
"start": 222,
"end": 299,
"loc": {
"start": {
"line": 10,
"column": 11
},
"end": {
"line": 13,
"column": 5
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 231,
"end": 255,
"loc": {
"start": {
"line": 11,
"column": 6
},
"end": {
"line": 11,
"column": 30
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 231,
"end": 238,
"loc": {
"start": {
"line": 11,
"column": 6
},
"end": {
"line": 11,
"column": 13
},
"identifierName": "actions"
},
"name": "actions"
},
"value": {
"type": "StringLiteral",
"start": 240,
"end": 255,
"loc": {
"start": {
"line": 11,
"column": 15
},
"end": {
"line": 11,
"column": 30
}
},
"extra": {
"rawValue": "array(string)",
"raw": "'array(string)'"
},
"value": "array(string)"
}
},
{
"type": "ObjectProperty",
"start": 264,
"end": 292,
"loc": {
"start": {
"line": 12,
"column": 6
},
"end": {
"line": 12,
"column": 34
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 264,
"end": 277,
"loc": {
"start": {
"line": 12,
"column": 6
},
"end": {
"line": 12,
"column": 19
},
"identifierName": "metaPropOrder"
},
"name": "metaPropOrder"
},
"value": {
"type": "StringLiteral",
"start": 279,
"end": 292,
"loc": {
"start": {
"line": 12,
"column": 21
},
"end": {
"line": 12,
"column": 34
}
},
"extra": {
"rawValue": "string_null",
"raw": "'string_null'"
},
"value": "string_null"
}
}
]
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 311,
"end": 358,
"loc": {
"start": {
"line": 16,
"column": 2
},
"end": {
"line": 18,
"column": 3
}
},
"static": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 315,
"end": 322,
"loc": {
"start": {
"line": 16,
"column": 6
},
"end": {
"line": 16,
"column": 13
},
"identifierName": "actions"
},
"name": "actions"
},
"kind": "get",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 325,
"end": 358,
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 18,
"column": 3
}
},
"body": [
{
"type": "ReturnStatement",
"start": 332,
"end": 353,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 25
}
},
"argument": {
"type": "MemberExpression",
"start": 339,
"end": 352,
"loc": {
"start": {
"line": 17,
"column": 11
},
"end": {
"line": 17,
"column": 24
}
},
"object": {
"type": "ThisExpression",
"start": 339,
"end": 343,
"loc": {
"start": {
"line": 17,
"column": 11
},
"end": {
"line": 17,
"column": 15
}
}
},
"property": {
"type": "Identifier",
"start": 344,
"end": 352,
"loc": {
"start": {
"line": 17,
"column": 16
},
"end": {
"line": 17,
"column": 24
},
"identifierName": "_actions"
},
"name": "_actions"
},
"computed": false
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 364,
"end": 517,
"loc": {
"start": {
"line": 20,
"column": 2
},
"end": {
"line": 26,
"column": 3
}
},
"static": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 368,
"end": 375,
"loc": {
"start": {
"line": 20,
"column": 6
},
"end": {
"line": 20,
"column": 13
},
"identifierName": "actions"
},
"name": "actions"
},
"kind": "set",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 376,
"end": 381,
"loc": {
"start": {
"line": 20,
"column": 14
},
"end": {
"line": 20,
"column": 19
},
"identifierName": "value"
},
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"start": 383,
"end": 517,
"loc": {
"start": {
"line": 20,
"column": 21
},
"end": {
"line": 26,
"column": 3
}
},
"body": [
{
"type": "IfStatement",
"start": 390,
"end": 482,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 23,
"column": 5
}
},
"test": {
"type": "UnaryExpression",
"start": 394,
"end": 415,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 29
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"start": 395,
"end": 415,
"loc": {
"start": {
"line": 21,
"column": 9
},
"end": {
"line": 21,
"column": 29
}
},
"callee": {
"type": "MemberExpression",
"start": 395,
"end": 408,
"loc": {
"start": {
"line": 21,
"column": 9
},
"end": {
"line": 21,
"column": 22
}
},
"object": {
"type": "Identifier",
"start": 395,
"end": 400,
"loc": {
"start": {
"line": 21,
"column": 9
},
"end": {
"line": 21,
"column": 14
},
"identifierName": "Array"
},
"name": "Array"
},
"property": {
"type": "Identifier",
"start": 401,
"end": 408,
"loc": {
"start": {
"line": 21,
"column": 15
},
"end": {
"line": 21,
"column": 22
},
"identifierName": "isArray"
},
"name": "isArray"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 409,
"end": 414,
"loc": {
"start": {
"line": 21,
"column": 23
},
"end": {
"line": 21,
"column": 28
},
"identifierName": "value"
},
"name": "value"
}
]
},
"extra": {
"parenthesizedArgument": false
}
},
"consequent": {
"type": "BlockStatement",
"start": 417,
"end": 482,
"loc": {
"start": {
"line": 21,
"column": 31
},
"end": {
"line": 23,
"column": 5
}
},
"body": [
{
"type": "ThrowStatement",
"start": 426,
"end": 475,
"loc": {
"start": {
"line": 22,
"column": 6
},
"end": {
"line": 22,
"column": 55
}
},
"argument": {
"type": "NewExpression",
"start": 432,
"end": 474,
"loc": {
"start": {
"line": 22,
"column": 12
},
"end": {
"line": 22,
"column": 54
}
},
"callee": {
"type": "Identifier",
"start": 436,
"end": 441,
"loc": {
"start": {
"line": 22,
"column": 16
},
"end": {
"line": 22,
"column": 21
},
"identifierName": "Error"
},
"name": "Error"
},
"arguments": [
{
"type": "StringLiteral",
"start": 442,
"end": 473,
"loc": {
"start": {
"line": 22,
"column": 22
},
"end": {
"line": 22,
"column": 53
}
},
"extra": {
"rawValue": "`value` is not type of Array!",
"raw": "'`value` is not type of Array!'"
},
"value": "`value` is not type of Array!"
}
]
}
}
],
"directives": []
},
"alternate": null
},
{
"type": "ExpressionStatement",
"start": 490,
"end": 512,
"loc": {
"start": {
"line": 25,
"column": 4
},
"end": {
"line": 25,
"column": 26
}
},
"expression": {
"type": "AssignmentExpression",
"start": 490,
"end": 511,
"loc": {
"start": {
"line": 25,
"column": 4
},
"end": {
"line": 25,
"column": 25
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 490,
"end": 503,
"loc": {
"start": {
"line": 25,
"column": 4
},
"end": {
"line": 25,
"column": 17
}
},
"object": {
"type": "ThisExpression",
"start": 490,
"end": 494,
"loc": {
"start": {
"line": 25,
"column": 4
},
"end": {
"line": 25,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 495,
"end": 503,
"loc": {
"start": {
"line": 25,
"column": 9
},
"end": {
"line": 25,
"column": 17
},
"identifierName": "_actions"
},
"name": "_actions"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 506,
"end": 511,
"loc": {
"start": {
"line": 25,
"column": 20
},
"end": {
"line": 25,
"column": 25
},
"identifierName": "value"
},
"name": "value"
}
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 523,
"end": 582,
"loc": {
"start": {
"line": 28,
"column": 2
},
"end": {
"line": 30,
"column": 3
}
},
"static": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 527,
"end": 540,
"loc": {
"start": {
"line": 28,
"column": 6
},
"end": {
"line": 28,
"column": 19
},
"identifierName": "metaPropOrder"
},
"name": "metaPropOrder"
},
"kind": "get",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 543,
"end": 582,
"loc": {
"start": {
"line": 28,
"column": 22
},
"end": {
"line": 30,
"column": 3
}
},
"body": [
{
"type": "ReturnStatement",
"start": 550,
"end": 577,
"loc": {
"start": {
"line": 29,
"column": 4
},
"end": {
"line": 29,
"column": 31
}
},
"argument": {
"type": "MemberExpression",
"start": 557,
"end": 576,
"loc": {
"start": {
"line": 29,
"column": 11
},
"end": {
"line": 29,
"column": 30
}
},
"object": {
"type": "ThisExpression",
"start": 557,
"end": 561,
"loc": {
"start": {
"line": 29,
"column": 11
},
"end": {
"line": 29,
"column": 15
}
}
},
"property": {
"type": "Identifier",
"start": 562,
"end": 576,
"loc": {
"start": {
"line": 29,
"column": 16
},
"end": {
"line": 29,
"column": 30
},
"identifierName": "_metaPropOrder"
},
"name": "_metaPropOrder"
},
"computed": false
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 588,
"end": 834,
"loc": {
"start": {
"line": 32,
"column": 2
},
"end": {
"line": 42,
"column": 3
}
},
"static": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 592,
"end": 605,
"loc": {
"start": {
"line": 32,
"column": 6
},
"end": {
"line": 32,
"column": 19
},
"identifierName": "metaPropOrder"
},
"name": "metaPropOrder"
},
"kind": "set",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 606,
"end": 611,
"loc": {
"start": {
"line": 32,
"column": 20
},
"end": {
"line": 32,
"column": 25
},
"identifierName": "value"
},
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"start": 613,
"end": 834,
"loc": {
"start": {
"line": 32,
"column": 27
},
"end": {
"line": 42,
"column": 3
}
},
"body": [
{
"type": "IfStatement",
"start": 620,
"end": 690,
"loc": {
"start": {
"line": 33,
"column": 4
},
"end": {
"line": 36,
"column": 5
}
},
"test": {
"type": "UnaryExpression",
"start": 624,
"end": 630,
"loc": {
"start": {
"line": 33,
"column": 8
},
"end": {
"line": 33,
"column": 14
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 625,
"end": 630,
"loc": {
"start": {
"line": 33,
"column": 9
},
"end": {
"line": 33,
"column": 14
},
"identifierName": "value"
},
"name": "value"
},
"extra": {
"parenthesizedArgument": false
}
},
"consequent": {
"type": "BlockStatement",
"start": 632,
"end": 690,
"loc": {
"start": {
"line": 33,
"column": 16
},
"end": {
"line": 36,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 641,
"end": 668,
"loc": {
"start": {
"line": 34,
"column": 6
},
"end": {
"line": 34,
"column": 33
}
},
"expression": {
"type": "AssignmentExpression",
"start": 641,
"end": 667,
"loc": {
"start": {
"line": 34,
"column": 6
},
"end": {
"line": 34,
"column": 32
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 641,
"end": 660,
"loc": {
"start": {
"line": 34,
"column": 6
},
"end": {
"line": 34,
"column": 25
}
},
"object": {
"type": "ThisExpression",
"start": 641,
"end": 645,
"loc": {
"start": {
"line": 34,
"column": 6
},
"end": {
"line": 34,
"column": 10
}
}
},
"property": {
"type": "Identifier",
"start": 646,
"end": 660,
"loc": {
"start": {
"line": 34,
"column": 11
},
"end": {
"line": 34,
"column": 25
},
"identifierName": "_metaPropOrder"
},
"name": "_metaPropOrder"
},
"computed": false
},
"right": {
"type": "NullLiteral",
"start": 663,
"end": 667,
"loc": {
"start": {
"line": 34,
"column": 28
},
"end": {
"line": 34,
"column": 32
}
}
}
}
},
{
"type": "ReturnStatement",
"start": 676,
"end": 683,
"loc": {
"start": {
"line": 35,
"column": 6
},
"end": {
"line": 35,
"column": 13
}
},
"argument": null
}
],
"directives": []
},
"alternate": null
},
{
"type": "IfStatement",
"start": 696,
"end": 793,
"loc": {
"start": {
"line": 37,
"column": 4
},
"end": {
"line": 39,
"column": 5
}
},
"test": {
"type": "BinaryExpression",
"start": 700,
"end": 725,
"loc": {
"start": {
"line": 37,
"column": 8
},
"end": {
"line": 37,
"column": 33
}
},
"left": {
"type": "UnaryExpression",
"start": 700,
"end": 712,
"loc": {
"start": {
"line": 37,
"column": 8
},
"end": {
"line": 37,
"column": 20
}
},
"operator": "typeof",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 707,
"end": 712,
"loc": {
"start": {
"line": 37,
"column": 15
},
"end": {
"line": 37,
"column": 20
},
"identifierName": "value"
},
"name": "value"
},
"extra": {
"parenthesizedArgument": false
}
},
"operator": "!==",
"right": {
"type": "StringLiteral",
"start": 717,
"end": 725,
"loc": {
"start": {
"line": 37,
"column": 25
},
"end": {
"line": 37,
"column": 33
}
},
"extra": {
"rawValue": "string",
"raw": "'string'"
},
"value": "string"
}
},
"consequent": {
"type": "BlockStatement",
"start": 727,
"end": 793,