oxygen-core
Version:
Oxygen game engine (Xenon Core for browsers)
1,527 lines (1,526 loc) • 1.67 MB
JSON
{
"type": "File",
"start": 0,
"end": 9263,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 415,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 9263,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 415,
"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": 5354,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 216,
"column": 1
}
},
"specifiers": [],
"source": null,
"declaration": {
"type": "ClassDeclaration",
"start": 188,
"end": 5354,
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 216,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 194,
"end": 210,
"loc": {
"start": {
"line": 5,
"column": 13
},
"end": {
"line": 5,
"column": 29
},
"identifierName": "DeferredPipeline"
},
"name": "DeferredPipeline"
},
"superClass": {
"type": "Identifier",
"start": 219,
"end": 226,
"loc": {
"start": {
"line": 5,
"column": 38
},
"end": {
"line": 5,
"column": 45
},
"identifierName": "Command"
},
"name": "Command"
},
"body": {
"type": "ClassBody",
"start": 227,
"end": 5354,
"loc": {
"start": {
"line": 5,
"column": 46
},
"end": {
"line": 216,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 234,
"end": 285,
"loc": {
"start": {
"line": 7,
"column": 2
},
"end": {
"line": 9,
"column": 3
}
},
"static": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 238,
"end": 247,
"loc": {
"start": {
"line": 7,
"column": 6
},
"end": {
"line": 7,
"column": 15
},
"identifierName": "gBufferId"
},
"name": "gBufferId"
},
"kind": "get",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 250,
"end": 285,
"loc": {
"start": {
"line": 7,
"column": 18
},
"end": {
"line": 9,
"column": 3
}
},
"body": [
{
"type": "ReturnStatement",
"start": 257,
"end": 280,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 27
}
},
"argument": {
"type": "MemberExpression",
"start": 264,
"end": 279,
"loc": {
"start": {
"line": 8,
"column": 11
},
"end": {
"line": 8,
"column": 26
}
},
"object": {
"type": "ThisExpression",
"start": 264,
"end": 268,
"loc": {
"start": {
"line": 8,
"column": 11
},
"end": {
"line": 8,
"column": 15
}
}
},
"property": {
"type": "Identifier",
"start": 269,
"end": 279,
"loc": {
"start": {
"line": 8,
"column": 16
},
"end": {
"line": 8,
"column": 26
},
"identifierName": "_gBufferId"
},
"name": "_gBufferId"
},
"computed": false
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 291,
"end": 478,
"loc": {
"start": {
"line": 11,
"column": 2
},
"end": {
"line": 18,
"column": 3
}
},
"static": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 295,
"end": 304,
"loc": {
"start": {
"line": 11,
"column": 6
},
"end": {
"line": 11,
"column": 15
},
"identifierName": "gBufferId"
},
"name": "gBufferId"
},
"kind": "set",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 305,
"end": 310,
"loc": {
"start": {
"line": 11,
"column": 16
},
"end": {
"line": 11,
"column": 21
},
"identifierName": "value"
},
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"start": 312,
"end": 478,
"loc": {
"start": {
"line": 11,
"column": 23
},
"end": {
"line": 18,
"column": 3
}
},
"body": [
{
"type": "IfStatement",
"start": 319,
"end": 416,
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 14,
"column": 5
}
},
"test": {
"type": "BinaryExpression",
"start": 323,
"end": 348,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 33
}
},
"left": {
"type": "UnaryExpression",
"start": 323,
"end": 335,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 20
}
},
"operator": "typeof",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 330,
"end": 335,
"loc": {
"start": {
"line": 12,
"column": 15
},
"end": {
"line": 12,
"column": 20
},
"identifierName": "value"
},
"name": "value"
},
"extra": {
"parenthesizedArgument": false
}
},
"operator": "!==",
"right": {
"type": "StringLiteral",
"start": 340,
"end": 348,
"loc": {
"start": {
"line": 12,
"column": 25
},
"end": {
"line": 12,
"column": 33
}
},
"extra": {
"rawValue": "string",
"raw": "'string'"
},
"value": "string"
}
},
"consequent": {
"type": "BlockStatement",
"start": 350,
"end": 416,
"loc": {
"start": {
"line": 12,
"column": 35
},
"end": {
"line": 14,
"column": 5
}
},
"body": [
{
"type": "ThrowStatement",
"start": 359,
"end": 409,
"loc": {
"start": {
"line": 13,
"column": 6
},
"end": {
"line": 13,
"column": 56
}
},
"argument": {
"type": "NewExpression",
"start": 365,
"end": 408,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 55
}
},
"callee": {
"type": "Identifier",
"start": 369,
"end": 374,
"loc": {
"start": {
"line": 13,
"column": 16
},
"end": {
"line": 13,
"column": 21
},
"identifierName": "Error"
},
"name": "Error"
},
"arguments": [
{
"type": "StringLiteral",
"start": 375,
"end": 407,
"loc": {
"start": {
"line": 13,
"column": 22
},
"end": {
"line": 13,
"column": 54
}
},
"extra": {
"rawValue": "`value` is not type of String!",
"raw": "'`value` is not type of String!'"
},
"value": "`value` is not type of String!"
}
]
}
}
],
"directives": []
},
"alternate": null
},
{
"type": "ExpressionStatement",
"start": 424,
"end": 448,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 28
}
},
"expression": {
"type": "AssignmentExpression",
"start": 424,
"end": 447,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 27
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 424,
"end": 439,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 19
}
},
"object": {
"type": "ThisExpression",
"start": 424,
"end": 428,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 429,
"end": 439,
"loc": {
"start": {
"line": 16,
"column": 9
},
"end": {
"line": 16,
"column": 19
},
"identifierName": "_gBufferId"
},
"name": "_gBufferId"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 442,
"end": 447,
"loc": {
"start": {
"line": 16,
"column": 22
},
"end": {
"line": 16,
"column": 27
},
"identifierName": "value"
},
"name": "value"
}
}
},
{
"type": "ExpressionStatement",
"start": 454,
"end": 473,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 23
}
},
"expression": {
"type": "AssignmentExpression",
"start": 454,
"end": 472,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 22
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 454,
"end": 465,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 15
}
},
"object": {
"type": "ThisExpression",
"start": 454,
"end": 458,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 459,
"end": 465,
"loc": {
"start": {
"line": 17,
"column": 9
},
"end": {
"line": 17,
"column": 15
},
"identifierName": "_dirty"
},
"name": "_dirty"
},
"computed": false
},
"right": {
"type": "BooleanLiteral",
"start": 468,
"end": 472,
"loc": {
"start": {
"line": 17,
"column": 18
},
"end": {
"line": 17,
"column": 22
}
},
"value": true
}
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 484,
"end": 535,
"loc": {
"start": {
"line": 20,
"column": 2
},
"end": {
"line": 22,
"column": 3
}
},
"static": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 488,
"end": 497,
"loc": {
"start": {
"line": 20,
"column": 6
},
"end": {
"line": 20,
"column": 15
},
"identifierName": "lBufferId"
},
"name": "lBufferId"
},
"kind": "get",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 500,
"end": 535,
"loc": {
"start": {
"line": 20,
"column": 18
},
"end": {
"line": 22,
"column": 3
}
},
"body": [
{
"type": "ReturnStatement",
"start": 507,
"end": 530,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 21,
"column": 27
}
},
"argument": {
"type": "MemberExpression",
"start": 514,
"end": 529,
"loc": {
"start": {
"line": 21,
"column": 11
},
"end": {
"line": 21,
"column": 26
}
},
"object": {
"type": "ThisExpression",
"start": 514,
"end": 518,
"loc": {
"start": {
"line": 21,
"column": 11
},
"end": {
"line": 21,
"column": 15
}
}
},
"property": {
"type": "Identifier",
"start": 519,
"end": 529,
"loc": {
"start": {
"line": 21,
"column": 16
},
"end": {
"line": 21,
"column": 26
},
"identifierName": "_lBufferId"
},
"name": "_lBufferId"
},
"computed": false
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 541,
"end": 728,
"loc": {
"start": {
"line": 24,
"column": 2
},
"end": {
"line": 31,
"column": 3
}
},
"static": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 545,
"end": 554,
"loc": {
"start": {
"line": 24,
"column": 6
},
"end": {
"line": 24,
"column": 15
},
"identifierName": "lBufferId"
},
"name": "lBufferId"
},
"kind": "set",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 555,
"end": 560,
"loc": {
"start": {
"line": 24,
"column": 16
},
"end": {
"line": 24,
"column": 21
},
"identifierName": "value"
},
"name": "value"
}
],
"body": {
"type": "BlockStatement",
"start": 562,
"end": 728,
"loc": {
"start": {
"line": 24,
"column": 23
},
"end": {
"line": 31,
"column": 3
}
},
"body": [
{
"type": "IfStatement",
"start": 569,
"end": 666,
"loc": {
"start": {
"line": 25,
"column": 4
},
"end": {
"line": 27,
"column": 5
}
},
"test": {
"type": "BinaryExpression",
"start": 573,
"end": 598,
"loc": {
"start": {
"line": 25,
"column": 8
},
"end": {
"line": 25,
"column": 33
}
},
"left": {
"type": "UnaryExpression",
"start": 573,
"end": 585,
"loc": {
"start": {
"line": 25,
"column": 8
},
"end": {
"line": 25,
"column": 20
}
},
"operator": "typeof",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 580,
"end": 585,
"loc": {
"start": {
"line": 25,
"column": 15
},
"end": {
"line": 25,
"column": 20
},
"identifierName": "value"
},
"name": "value"
},
"extra": {
"parenthesizedArgument": false
}
},
"operator": "!==",
"right": {
"type": "StringLiteral",
"start": 590,
"end": 598,
"loc": {
"start": {
"line": 25,
"column": 25
},
"end": {
"line": 25,
"column": 33
}
},
"extra": {
"rawValue": "string",
"raw": "'string'"
},
"value": "string"
}
},
"consequent": {
"type": "BlockStatement",
"start": 600,
"end": 666,
"loc": {
"start": {
"line": 25,
"column": 35
},
"end": {
"line": 27,
"column": 5
}
},
"body": [
{
"type": "ThrowStatement",
"start": 609,
"end": 659,
"loc": {
"start": {
"line": 26,
"column": 6
},
"end": {
"line": 26,
"column": 56
}
},
"argument": {
"type": "NewExpression",
"start": 615,
"end": 658,
"loc": {
"start": {
"line": 26,
"column": 12
},
"end": {
"line": 26,
"column": 55
}
},
"callee": {
"type": "Identifier",
"start": 619,
"end": 624,
"loc": {
"start": {
"line": 26,
"column": 16
},
"end": {
"line": 26,
"column": 21
},
"identifierName": "Error"
},
"name": "Error"
},
"arguments": [
{
"type": "StringLiteral",
"start": 625,
"end": 657,
"loc": {
"start": {
"line": 26,
"column": 22
},
"end": {
"line": 26,
"column": 54
}
},
"extra": {
"rawValue": "`value` is not type of String!",
"raw": "'`value` is not type of String!'"
},
"value": "`value` is not type of String!"
}
]
}
}
],
"directives": []
},
"alternate": null
},
{
"type": "ExpressionStatement",
"start": 674,
"end": 698,
"loc": {
"start": {
"line": 29,
"column": 4
},
"end": {
"line": 29,
"column": 28
}
},
"expression": {
"type": "AssignmentExpression",
"start": 674,
"end": 697,
"loc": {
"start": {
"line": 29,
"column": 4
},
"end": {
"line": 29,
"column": 27
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 674,
"end": 689,
"loc": {
"start": {
"line": 29,
"column": 4
},
"end": {
"line": 29,
"column": 19
}
},
"object": {
"type": "ThisExpression",
"start": 674,
"end": 678,
"loc": {
"start": {
"line": 29,
"column": 4
},
"end": {
"line": 29,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 679,
"end": 689,
"loc": {
"start": {
"line": 29,
"column": 9
},
"end": {
"line": 29,
"column": 19
},
"identifierName": "_lBufferId"
},
"name": "_lBufferId"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 692,
"end": 697,
"loc": {
"start": {
"line": 29,
"column": 22
},
"end": {
"line": 29,
"column": 27
},
"identifierName": "value"
},
"name": "value"
}
}
},
{
"type": "ExpressionStatement",
"start": 704,
"end": 723,
"loc": {
"start": {
"line": 30,
"column": 4
},
"end": {
"line": 30,
"column": 23
}
},
"expression": {
"type": "AssignmentExpression",
"start": 704,
"end": 722,
"loc": {
"start": {
"line": 30,
"column": 4
},
"end": {
"line": 30,
"column": 22
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 704,
"end": 715,
"loc": {
"start": {
"line": 30,
"column": 4
},
"end": {
"line": 30,
"column": 15
}
},
"object": {
"type": "ThisExpression",
"start": 704,
"end": 708,
"loc": {
"start": {
"line": 30,
"column": 4
},
"end": {
"line": 30,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 709,
"end": 715,
"loc": {
"start": {
"line": 30,
"column": 9