oxygen-core
Version:
Oxygen game engine (Xenon Core for browsers)
1,535 lines (1,534 loc) • 1.05 MB
JSON
{
"type": "File",
"start": 0,
"end": 5264,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 224,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 5264,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 224,
"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": "ImportDeclaration",
"start": 60,
"end": 145,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 85
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 69,
"end": 76,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 16
}
},
"imported": {
"type": "Identifier",
"start": 69,
"end": 76,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 16
},
"identifierName": "Command"
},
"name": "Command"
},
"local": {
"type": "Identifier",
"start": 69,
"end": 76,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 16
},
"identifierName": "Command"
},
"name": "Command"
}
},
{
"type": "ImportSpecifier",
"start": 78,
"end": 86,
"loc": {
"start": {
"line": 2,
"column": 18
},
"end": {
"line": 2,
"column": 26
}
},
"imported": {
"type": "Identifier",
"start": 78,
"end": 86,
"loc": {
"start": {
"line": 2,
"column": 18
},
"end": {
"line": 2,
"column": 26
},
"identifierName": "Pipeline"
},
"name": "Pipeline"
},
"local": {
"type": "Identifier",
"start": 78,
"end": 86,
"loc": {
"start": {
"line": 2,
"column": 18
},
"end": {
"line": 2,
"column": 26
},
"identifierName": "Pipeline"
},
"name": "Pipeline"
}
},
{
"type": "ImportSpecifier",
"start": 88,
"end": 111,
"loc": {
"start": {
"line": 2,
"column": 28
},
"end": {
"line": 2,
"column": 51
}
},
"imported": {
"type": "Identifier",
"start": 88,
"end": 111,
"loc": {
"start": {
"line": 2,
"column": 28
},
"end": {
"line": 2,
"column": 51
},
"identifierName": "RenderFullscreenCommand"
},
"name": "RenderFullscreenCommand"
},
"local": {
"type": "Identifier",
"start": 88,
"end": 111,
"loc": {
"start": {
"line": 2,
"column": 28
},
"end": {
"line": 2,
"column": 51
},
"identifierName": "RenderFullscreenCommand"
},
"name": "RenderFullscreenCommand"
}
}
],
"source": {
"type": "StringLiteral",
"start": 119,
"end": 144,
"loc": {
"start": {
"line": 2,
"column": 59
},
"end": {
"line": 2,
"column": 84
}
},
"extra": {
"rawValue": "../systems/RenderSystem",
"raw": "'../systems/RenderSystem'"
},
"value": "../systems/RenderSystem"
}
},
{
"type": "ImportDeclaration",
"start": 147,
"end": 177,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 30
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 154,
"end": 160,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 13
}
},
"local": {
"type": "Identifier",
"start": 154,
"end": 160,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 13
},
"identifierName": "Camera"
},
"name": "Camera"
}
}
],
"source": {
"type": "StringLiteral",
"start": 166,
"end": 176,
"loc": {
"start": {
"line": 3,
"column": 19
},
"end": {
"line": 3,
"column": 29
}
},
"extra": {
"rawValue": "./Camera",
"raw": "'./Camera'"
},
"value": "./Camera"
}
},
{
"type": "ExportNamedDeclaration",
"start": 181,
"end": 4118,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 154,
"column": 1
}
},
"specifiers": [],
"source": null,
"declaration": {
"type": "ClassDeclaration",
"start": 188,
"end": 4118,
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 154,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 194,
"end": 211,
"loc": {
"start": {
"line": 5,
"column": 13
},
"end": {
"line": 5,
"column": 30
},
"identifierName": "MultipassPipeline"
},
"name": "MultipassPipeline"
},
"superClass": {
"type": "Identifier",
"start": 220,
"end": 227,
"loc": {
"start": {
"line": 5,
"column": 39
},
"end": {
"line": 5,
"column": 46
},
"identifierName": "Command"
},
"name": "Command"
},
"body": {
"type": "ClassBody",
"start": 228,
"end": 4118,
"loc": {
"start": {
"line": 5,
"column": 47
},
"end": {
"line": 154,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 235,
"end": 280,
"loc": {
"start": {
"line": 7,
"column": 2
},
"end": {
"line": 9,
"column": 3
}
},
"static": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 239,
"end": 245,
"loc": {
"start": {
"line": 7,
"column": 6
},
"end": {
"line": 7,
"column": 12
},
"identifierName": "passes"
},
"name": "passes"
},
"kind": "get",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 248,
"end": 280,
"loc": {
"start": {
"line": 7,
"column": 15
},
"end": {
"line": 9,
"column": 3
}
},
"body": [
{
"type": "ReturnStatement",
"start": 255,
"end": 275,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 24
}
},
"argument": {
"type": "MemberExpression",
"start": 262,
"end": 274,
"loc": {
"start": {
"line": 8,
"column": 11
},
"end": {
"line": 8,
"column": 23
}
},
"object": {
"type": "ThisExpression",
"start": 262,
"end": 266,
"loc": {
"start": {
"line": 8,
"column": 11
},
"end": {
"line": 8,
"column": 15
}
}
},
"property": {
"type": "Identifier",
"start": 267,
"end": 274,
"loc": {
"start": {
"line": 8,
"column": 16
},
"end": {
"line": 8,
"column": 23
},
"identifierName": "_passes"
},
"name": "_passes"
},
"computed": false
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 286,
"end": 466,
"loc": {
"start": {
"line": 11,
"column": 2
},
"end": {
"line": 17,
"column": 3
}
},
"static": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 290,
"end": 296,
"loc": {
"start": {
"line": 11,
"column": 6
},
"end": {
"line": 11,
"column": 12
},
"identifierName": "passes"
},
"name": "passes"
},
"kind": "set",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 297,
"end": 302,
"loc": {
"start": {
"line": 11,
"column": 13
},
"end": {
"line": 11,
"column": 18
},
"identifierName": "value"
},
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"start": 304,
"end": 466,
"loc": {
"start": {
"line": 11,
"column": 20
},
"end": {
"line": 17,
"column": 3
}
},
"body": [
{
"type": "IfStatement",
"start": 311,
"end": 403,
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 14,
"column": 5
}
},
"test": {
"type": "UnaryExpression",
"start": 315,
"end": 336,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 29
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"start": 316,
"end": 336,
"loc": {
"start": {
"line": 12,
"column": 9
},
"end": {
"line": 12,
"column": 29
}
},
"callee": {
"type": "MemberExpression",
"start": 316,
"end": 329,
"loc": {
"start": {
"line": 12,
"column": 9
},
"end": {
"line": 12,
"column": 22
}
},
"object": {
"type": "Identifier",
"start": 316,
"end": 321,
"loc": {
"start": {
"line": 12,
"column": 9
},
"end": {
"line": 12,
"column": 14
},
"identifierName": "Array"
},
"name": "Array"
},
"property": {
"type": "Identifier",
"start": 322,
"end": 329,
"loc": {
"start": {
"line": 12,
"column": 15
},
"end": {
"line": 12,
"column": 22
},
"identifierName": "isArray"
},
"name": "isArray"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 330,
"end": 335,
"loc": {
"start": {
"line": 12,
"column": 23
},
"end": {
"line": 12,
"column": 28
},
"identifierName": "value"
},
"name": "value"
}
]
},
"extra": {
"parenthesizedArgument": false
}
},
"consequent": {
"type": "BlockStatement",
"start": 338,
"end": 403,
"loc": {
"start": {
"line": 12,
"column": 31
},
"end": {
"line": 14,
"column": 5
}
},
"body": [
{
"type": "ThrowStatement",
"start": 347,
"end": 396,
"loc": {
"start": {
"line": 13,
"column": 6
},
"end": {
"line": 13,
"column": 55
}
},
"argument": {
"type": "NewExpression",
"start": 353,
"end": 395,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 54
}
},
"callee": {
"type": "Identifier",
"start": 357,
"end": 362,
"loc": {
"start": {
"line": 13,
"column": 16
},
"end": {
"line": 13,
"column": 21
},
"identifierName": "Error"
},
"name": "Error"
},
"arguments": [
{
"type": "StringLiteral",
"start": 363,
"end": 394,
"loc": {
"start": {
"line": 13,
"column": 22
},
"end": {
"line": 13,
"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": 409,
"end": 436,
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 15,
"column": 31
}
},
"expression": {
"type": "AssignmentExpression",
"start": 409,
"end": 435,
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 15,
"column": 30
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 409,
"end": 421,
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 15,
"column": 16
}
},
"object": {
"type": "ThisExpression",
"start": 409,
"end": 413,
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 15,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 414,
"end": 421,
"loc": {
"start": {
"line": 15,
"column": 9
},
"end": {
"line": 15,
"column": 16
},
"identifierName": "_passes"
},
"name": "_passes"
},
"computed": false
},
"right": {
"type": "LogicalExpression",
"start": 424,
"end": 435,
"loc": {
"start": {
"line": 15,
"column": 19
},
"end": {
"line": 15,
"column": 30
}
},
"left": {
"type": "Identifier",
"start": 424,
"end": 429,
"loc": {
"start": {
"line": 15,
"column": 19
},
"end": {
"line": 15,
"column": 24
},
"identifierName": "value"
},
"name": "value"
},
"operator": "||",
"right": {
"type": "ArrayExpression",
"start": 433,
"end": 435,
"loc": {
"start": {
"line": 15,
"column": 28
},
"end": {
"line": 15,
"column": 30
}
},
"elements": []
}
}
}
},
{
"type": "ExpressionStatement",
"start": 442,
"end": 461,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 23
}
},
"expression": {
"type": "AssignmentExpression",
"start": 442,
"end": 460,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 22
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 442,
"end": 453,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 15
}
},
"object": {
"type": "ThisExpression",
"start": 442,
"end": 446,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 447,
"end": 453,
"loc": {
"start": {
"line": 16,
"column": 9
},
"end": {
"line": 16,
"column": 15
},
"identifierName": "_dirty"
},
"name": "_dirty"
},
"computed": false
},
"right": {
"type": "BooleanLiteral",
"start": 456,
"end": 460,
"loc": {
"start": {
"line": 16,
"column": 18
},
"end": {
"line": 16,
"column": 22
}
},
"value": true
}
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 472,
"end": 525,
"loc": {
"start": {
"line": 19,
"column": 2
},
"end": {
"line": 21,
"column": 3
}
},
"static": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 476,
"end": 486,
"loc": {
"start": {
"line": 19,
"column": 6
},
"end": {
"line": 19,
"column": 16
},
"identifierName": "fullscreen"
},
"name": "fullscreen"
},
"kind": "get",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 489,
"end": 525,
"loc": {
"start": {
"line": 19,
"column": 19
},
"end": {
"line": 21,
"column": 3
}
},
"body": [
{
"type": "ReturnStatement",
"start": 496,
"end": 520,
"loc": {
"start": {
"line": 20,
"column": 4
},
"end": {
"line": 20,
"column": 28
}
},
"argument": {
"type": "MemberExpression",
"start": 503,
"end": 519,
"loc": {
"start": {
"line": 20,
"column": 11
},
"end": {
"line": 20,
"column": 27
}
},
"object": {
"type": "ThisExpression",
"start": 503,
"end": 507,
"loc": {
"start": {
"line": 20,
"column": 11
},
"end": {
"line": 20,
"column": 15
}
}
},
"property": {
"type": "Identifier",
"start": 508,
"end": 519,
"loc": {
"start": {
"line": 20,
"column": 16
},
"end": {
"line": 20,
"column": 27
},
"identifierName": "_fullscreen"
},
"name": "_fullscreen"
},
"computed": false
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 531,
"end": 768,
"loc": {
"start": {
"line": 23,
"column": 2
},
"end": {
"line": 32,
"column": 3
}
},
"static": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 531,
"end": 542,
"loc": {
"start": {
"line": 23,
"column": 2
},
"end": {
"line": 23,
"column": 13
},
"identifierName": "constructor"
},
"name": "constructor"
},
"kind": "constructor",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 543,
"end": 548,
"loc": {
"start": {
"line": 23,
"column": 14
},
"end": {
"line": 23,
"column": 19
},
"identifierName": "owner"
},
"name": "owner"
}
],
"body": {
"type": "BlockStatement",
"start": 550,
"end": 768,
"loc": {
"start": {
"line": 23,
"column": 21
},
"end": {
"line": 32,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 557,
"end": 565,
"loc": {
"start": {
"line": 24,
"column": 4
},
"end": {
"line": 24,
"column": 12
}
},
"expression": {
"type": "CallExpression",
"start": 557,
"end": 564,
"loc": {
"start": {
"line": 24,
"column": 4
},
"end": {
"line": 24,
"column": 11
}
},
"callee": {
"type": "Super",
"start": 557,
"end": 562,
"loc": {
"start": {
"line": 24,
"column": 4
},
"end": {
"line": 24,
"column": 9
}
}
},
"arguments": []
}
},
{
"type": "ExpressionStatement",
"start": 573,
"end": 593,
"loc": {
"start": {
"line": 26,
"column": 4
},
"end": {
"line": 26,
"column": 24
}
},
"expression": {
"type": "AssignmentExpression",
"start": 573,
"end": 592,
"loc": {
"start": {
"line": 26,
"column": 4
},
"end": {
"line": 26,
"column": 23
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 573,
"end": 584,
"loc": {
"start": {
"line": 26,
"column": 4
},
"end": {
"line": 26,
"column": 15
}
},
"object": {
"type": "ThisExpression",
"start": 573,
"end": 577,
"loc": {
"start": {
"line": 26,
"column": 4
},
"end": {
"line": 26,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 578,
"end": 584,
"loc": {
"start": {
"line": 26,
"column": 9
},
"end": {
"line": 26,
"column": 15
},
"identifierName": "_owner"
},
"name": "_owner"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 587,
"end": 592,
"loc": {
"start": {
"line": 26,
"column": 18
},
"end": {
"line": 26,
"column": 23
},
"identifierName": "owner"
},
"name": "owner"
}
}
},
{
"type": "ExpressionStatement",
"start": 599,
"end": 621,
"loc": {
"start": {
"line": 27,
"column": 4
},
"end": {
"line": 27,
"column": 26
}
},
"expression": {
"type": "AssignmentExpression",
"start": 599,
"end": 620,
"loc": {
"start": {
"line": 27,
"column": 4
},
"end": {
"line": 27,
"column": 25
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 599,
"end": 613,
"loc": {
"start": {
"line": 27,
"column": 4
},
"end": {
"line": 27,
"column": 18
}
},
"object": {
"type": "ThisExpression",
"start": 599,
"end": 603,
"loc": {
"start": {
"line": 27,
"column": 4
},
"end": {
"line": 27,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 604,
"end": 613,
"loc": {
"start": {
"line": 27,
"column": 9
},
"end": {
"line": 27,
"column": 18
},
"identifierName": "_renderer"
},
"name": "_renderer"
},
"computed": false
},
"right": {
"type": "NullLiteral",
"start": 616,
"end": 620,
"loc": {
"start": {
"line": 27,
"column": 21
},
"end": {
"line": 27,
"column": 25
}
}
}
}
},
{
"type": "ExpressionStatement",
"start": 627,
"end": 676,
"loc": {
"start": {
"line": 28,
"column": 4
},
"end": {
"line": 28,
"column": 53
}
},
"expression": {
"type": "AssignmentExpression",
"start": 627,
"end": 675,
"loc": {
"start": {
"line": 28,
"column": 4
},
"end": {
"line": 28,
"column": 52
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 627,
"end": 643,
"loc": {
"start": {
"line": 28,
"column": 4
},
"end": {
"line": 28,
"column": 20
}
},
"object": {
"type": "ThisExpression",
"start": 627,
"end": 631,