oxygen-core
Version:
Oxygen game engine (Xenon Core for browsers)
1,506 lines (1,505 loc) • 3.17 MB
JSON
{
"type": "File",
"start": 0,
"end": 15504,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 659,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 15504,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 659,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 50,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 50
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 7,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 23
}
},
"local": {
"type": "Identifier",
"start": 7,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 23
},
"identifierName": "VerticesRenderer"
},
"name": "VerticesRenderer"
}
}
],
"source": {
"type": "StringLiteral",
"start": 29,
"end": 49,
"loc": {
"start": {
"line": 1,
"column": 29
},
"end": {
"line": 1,
"column": 49
}
},
"extra": {
"rawValue": "./VerticesRenderer",
"raw": "'./VerticesRenderer'"
},
"value": "./VerticesRenderer"
}
},
{
"type": "ImportDeclaration",
"start": 52,
"end": 91,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 39
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 59,
"end": 65,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 13
}
},
"local": {
"type": "Identifier",
"start": 59,
"end": 65,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 13
},
"identifierName": "System"
},
"name": "System"
}
}
],
"source": {
"type": "StringLiteral",
"start": 71,
"end": 90,
"loc": {
"start": {
"line": 2,
"column": 19
},
"end": {
"line": 2,
"column": 38
}
},
"extra": {
"rawValue": "../systems/System",
"raw": "'../systems/System'"
},
"value": "../systems/System"
}
},
{
"type": "ImportDeclaration",
"start": 93,
"end": 131,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 38
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 102,
"end": 106,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 13
}
},
"imported": {
"type": "Identifier",
"start": 102,
"end": 106,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 13
},
"identifierName": "vec2"
},
"name": "vec2"
},
"local": {
"type": "Identifier",
"start": 102,
"end": 106,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 13
},
"identifierName": "vec2"
},
"name": "vec2"
}
},
{
"type": "ImportSpecifier",
"start": 108,
"end": 112,
"loc": {
"start": {
"line": 3,
"column": 15
},
"end": {
"line": 3,
"column": 19
}
},
"imported": {
"type": "Identifier",
"start": 108,
"end": 112,
"loc": {
"start": {
"line": 3,
"column": 15
},
"end": {
"line": 3,
"column": 19
},
"identifierName": "vec4"
},
"name": "vec4"
},
"local": {
"type": "Identifier",
"start": 108,
"end": 112,
"loc": {
"start": {
"line": 3,
"column": 15
},
"end": {
"line": 3,
"column": 19
},
"identifierName": "vec4"
},
"name": "vec4"
}
}
],
"source": {
"type": "StringLiteral",
"start": 120,
"end": 130,
"loc": {
"start": {
"line": 3,
"column": 27
},
"end": {
"line": 3,
"column": 37
}
},
"extra": {
"rawValue": "../utils",
"raw": "'../utils'"
},
"value": "../utils"
}
},
{
"type": "VariableDeclaration",
"start": 135,
"end": 169,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 34
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 141,
"end": 168,
"loc": {
"start": {
"line": 5,
"column": 6
},
"end": {
"line": 5,
"column": 33
}
},
"id": {
"type": "Identifier",
"start": 141,
"end": 152,
"loc": {
"start": {
"line": 5,
"column": 6
},
"end": {
"line": 5,
"column": 17
},
"identifierName": "cachedTemp1"
},
"name": "cachedTemp1"
},
"init": {
"type": "CallExpression",
"start": 155,
"end": 168,
"loc": {
"start": {
"line": 5,
"column": 20
},
"end": {
"line": 5,
"column": 33
}
},
"callee": {
"type": "MemberExpression",
"start": 155,
"end": 166,
"loc": {
"start": {
"line": 5,
"column": 20
},
"end": {
"line": 5,
"column": 31
}
},
"object": {
"type": "Identifier",
"start": 155,
"end": 159,
"loc": {
"start": {
"line": 5,
"column": 20
},
"end": {
"line": 5,
"column": 24
},
"identifierName": "vec2"
},
"name": "vec2"
},
"property": {
"type": "Identifier",
"start": 160,
"end": 166,
"loc": {
"start": {
"line": 5,
"column": 25
},
"end": {
"line": 5,
"column": 31
},
"identifierName": "create"
},
"name": "create"
},
"computed": false
},
"arguments": []
}
}
],
"kind": "const"
},
{
"type": "VariableDeclaration",
"start": 171,
"end": 205,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 34
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 177,
"end": 204,
"loc": {
"start": {
"line": 6,
"column": 6
},
"end": {
"line": 6,
"column": 33
}
},
"id": {
"type": "Identifier",
"start": 177,
"end": 188,
"loc": {
"start": {
"line": 6,
"column": 6
},
"end": {
"line": 6,
"column": 17
},
"identifierName": "cachedTemp2"
},
"name": "cachedTemp2"
},
"init": {
"type": "CallExpression",
"start": 191,
"end": 204,
"loc": {
"start": {
"line": 6,
"column": 20
},
"end": {
"line": 6,
"column": 33
}
},
"callee": {
"type": "MemberExpression",
"start": 191,
"end": 202,
"loc": {
"start": {
"line": 6,
"column": 20
},
"end": {
"line": 6,
"column": 31
}
},
"object": {
"type": "Identifier",
"start": 191,
"end": 195,
"loc": {
"start": {
"line": 6,
"column": 20
},
"end": {
"line": 6,
"column": 24
},
"identifierName": "vec2"
},
"name": "vec2"
},
"property": {
"type": "Identifier",
"start": 196,
"end": 202,
"loc": {
"start": {
"line": 6,
"column": 25
},
"end": {
"line": 6,
"column": 31
},
"identifierName": "create"
},
"name": "create"
},
"computed": false
},
"arguments": []
}
}
],
"kind": "const"
},
{
"type": "VariableDeclaration",
"start": 207,
"end": 241,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 34
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 213,
"end": 240,
"loc": {
"start": {
"line": 7,
"column": 6
},
"end": {
"line": 7,
"column": 33
}
},
"id": {
"type": "Identifier",
"start": 213,
"end": 224,
"loc": {
"start": {
"line": 7,
"column": 6
},
"end": {
"line": 7,
"column": 17
},
"identifierName": "cachedTemp3"
},
"name": "cachedTemp3"
},
"init": {
"type": "CallExpression",
"start": 227,
"end": 240,
"loc": {
"start": {
"line": 7,
"column": 20
},
"end": {
"line": 7,
"column": 33
}
},
"callee": {
"type": "MemberExpression",
"start": 227,
"end": 238,
"loc": {
"start": {
"line": 7,
"column": 20
},
"end": {
"line": 7,
"column": 31
}
},
"object": {
"type": "Identifier",
"start": 227,
"end": 231,
"loc": {
"start": {
"line": 7,
"column": 20
},
"end": {
"line": 7,
"column": 24
},
"identifierName": "vec2"
},
"name": "vec2"
},
"property": {
"type": "Identifier",
"start": 232,
"end": 238,
"loc": {
"start": {
"line": 7,
"column": 25
},
"end": {
"line": 7,
"column": 31
},
"identifierName": "create"
},
"name": "create"
},
"computed": false
},
"arguments": []
}
}
],
"kind": "const"
},
{
"type": "ExportDefaultDeclaration",
"start": 245,
"end": 15502,
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 658,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 260,
"end": 15502,
"loc": {
"start": {
"line": 9,
"column": 15
},
"end": {
"line": 658,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 266,
"end": 274,
"loc": {
"start": {
"line": 9,
"column": 21
},
"end": {
"line": 9,
"column": 29
},
"identifierName": "UiSprite"
},
"name": "UiSprite"
},
"superClass": {
"type": "Identifier",
"start": 283,
"end": 299,
"loc": {
"start": {
"line": 9,
"column": 38
},
"end": {
"line": 9,
"column": 54
},
"identifierName": "VerticesRenderer"
},
"name": "VerticesRenderer"
},
"body": {
"type": "ClassBody",
"start": 300,
"end": 15502,
"loc": {
"start": {
"line": 9,
"column": 55
},
"end": {
"line": 658,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 307,
"end": 358,
"loc": {
"start": {
"line": 11,
"column": 2
},
"end": {
"line": 13,
"column": 3
}
},
"static": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 314,
"end": 321,
"loc": {
"start": {
"line": 11,
"column": 9
},
"end": {
"line": 11,
"column": 16
},
"identifierName": "factory"
},
"name": "factory"
},
"kind": "method",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 324,
"end": 358,
"loc": {
"start": {
"line": 11,
"column": 19
},
"end": {
"line": 13,
"column": 3
}
},
"body": [
{
"type": "ReturnStatement",
"start": 331,
"end": 353,
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 12,
"column": 26
}
},
"argument": {
"type": "NewExpression",
"start": 338,
"end": 352,
"loc": {
"start": {
"line": 12,
"column": 11
},
"end": {
"line": 12,
"column": 25
}
},
"callee": {
"type": "Identifier",
"start": 342,
"end": 350,
"loc": {
"start": {
"line": 12,
"column": 15
},
"end": {
"line": 12,
"column": 23
},
"identifierName": "UiSprite"
},
"name": "UiSprite"
},
"arguments": []
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 364,
"end": 1324,
"loc": {
"start": {
"line": 15,
"column": 2
},
"end": {
"line": 43,
"column": 3
}
},
"static": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 375,
"end": 385,
"loc": {
"start": {
"line": 15,
"column": 13
},
"end": {
"line": 15,
"column": 23
},
"identifierName": "propsTypes"
},
"name": "propsTypes"
},
"kind": "get",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 388,
"end": 1324,
"loc": {
"start": {
"line": 15,
"column": 26
},
"end": {
"line": 43,
"column": 3
}
},
"body": [
{
"type": "ReturnStatement",
"start": 395,
"end": 1319,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 42,
"column": 6
}
},
"argument": {
"type": "ObjectExpression",
"start": 402,
"end": 1318,
"loc": {
"start": {
"line": 16,
"column": 11
},
"end": {
"line": 42,
"column": 5
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 411,
"end": 455,
"loc": {
"start": {
"line": 17,
"column": 6
},
"end": {
"line": 17,
"column": 50
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 411,
"end": 418,
"loc": {
"start": {
"line": 17,
"column": 6
},
"end": {
"line": 17,
"column": 13
},
"identifierName": "visible"
},
"name": "visible"
},
"value": {
"type": "MemberExpression",
"start": 420,
"end": 455,
"loc": {
"start": {
"line": 17,
"column": 15
},
"end": {
"line": 17,
"column": 50
}
},
"object": {
"type": "MemberExpression",
"start": 420,
"end": 447,
"loc": {
"start": {
"line": 17,
"column": 15
},
"end": {
"line": 17,
"column": 42
}
},
"object": {
"type": "Identifier",
"start": 420,
"end": 436,
"loc": {
"start": {
"line": 17,
"column": 15
},
"end": {
"line": 17,
"column": 31
},
"identifierName": "VerticesRenderer"
},
"name": "VerticesRenderer"
},
"property": {
"type": "Identifier",
"start": 437,
"end": 447,
"loc": {
"start": {
"line": 17,
"column": 32
},
"end": {
"line": 17,
"column": 42
},
"identifierName": "propsTypes"
},
"name": "propsTypes"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 448,
"end": 455,
"loc": {
"start": {
"line": 17,
"column": 43
},
"end": {
"line": 17,
"column": 50
},
"identifierName": "visible"
},
"name": "visible"
},
"computed": false
}
},
{
"type": "ObjectProperty",
"start": 464,
"end": 506,
"loc": {
"start": {
"line": 18,
"column": 6
},
"end": {
"line": 18,
"column": 48
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 464,
"end": 470,
"loc": {
"start": {
"line": 18,
"column": 6
},
"end": {
"line": 18,
"column": 12
},
"identifierName": "shader"
},
"name": "shader"
},
"value": {
"type": "MemberExpression",
"start": 472,
"end": 506,
"loc": {
"start": {
"line": 18,
"column": 14
},
"end": {
"line": 18,
"column": 48
}
},
"object": {
"type": "MemberExpression",
"start": 472,
"end": 499,
"loc": {
"start": {
"line": 18,
"column": 14
},
"end": {
"line": 18,
"column": 41
}
},
"object": {
"type": "Identifier",
"start": 472,
"end": 488,
"loc": {
"start": {
"line": 18,
"column": 14
},
"end": {
"line": 18,
"column": 30
},
"identifierName": "VerticesRenderer"
},
"name": "VerticesRenderer"
},
"property": {
"type": "Identifier",
"start": 489,
"end": 499,
"loc": {
"start": {
"line": 18,
"column": 31
},
"end": {
"line": 18,
"column": 41
},
"identifierName": "propsTypes"
},
"name": "propsTypes"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 500,
"end": 506,
"loc": {
"start": {
"line": 18,
"column": 42
},
"end": {
"line": 18,
"column": 48
},
"identifierName": "shader"
},
"name": "shader"
},
"computed": false
}
},
{
"type": "ObjectProperty",
"start": 515,
"end": 577,
"loc": {
"start": {
"line": 19,
"column": 6
},
"end": {
"line": 19,
"column": 68
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 515,
"end": 531,
"loc": {
"start": {
"line": 19,
"column": 6
},
"end": {
"line": 19,
"column": 22
},
"identifierName": "overrideUniforms"
},
"name": "overrideUniforms"
},
"value": {
"type": "MemberExpression",
"start": 533,
"end": 577,
"loc": {
"start": {
"line": 19,
"column": 24
},
"end": {
"line": 19,
"column": 68
}
},
"object": {
"type": "MemberExpression",
"start": 533,
"end": 560,
"loc": {
"start": {
"line": 19,
"column": 24
},
"end": {
"line": 19,
"column": 51
}
},
"object": {
"type": "Identifier",
"start": 533,
"end": 549,
"loc": {
"start": {
"line": 19,
"column": 24
},
"end": {
"line": 19,
"column": 40
},
"identifierName": "VerticesRenderer"
},
"name": "VerticesRenderer"
},
"property": {
"type": "Identifier",
"start": 550,
"end": 560,
"loc": {
"start": {
"line": 19,
"column": 41
},
"end": {
"line": 19,
"column": 51
},
"identifierName": "propsTypes"
},
"name": "propsTypes"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 561,
"end": 577,
"loc": {
"start": {
"line": 19,
"column": 52
},
"end": {
"line": 19,
"column": 68
},
"identifierName": "overrideUniforms"
},
"name": "overrideUniforms"
},
"computed": false
}
},
{
"type": "ObjectProperty",
"start": 586,
"end": 648,
"loc": {
"start": {
"line": 20,
"column": 6
},
"end": {
"line": 20,
"column": 68
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 586,
"end": 602,
"loc": {
"start": {
"line": 20,
"column": 6
},
"end": {
"line": 20,
"column": 22
},
"identifierName": "overrideSamplers"
},
"name": "overrideSamplers"
},
"value": {
"type": "MemberExpression",
"start": 604,
"end": 648,
"loc": {
"start": {
"line": 20,
"column": 24
},
"end": {
"line": 20,
"column": 68
}
},
"object": {
"type": "MemberExpression",
"start": 604,
"end": 631,
"loc": {
"start": {
"line": 20,
"column": 24
},
"end": {
"line": 20,
"column": 51
}
},
"object": {
"type": "Identifier",
"start": 604,
"end": 620,
"loc": {
"start": {
"line": 20,
"column": 24
},
"end": {
"line": 20,
"column": 40
},
"identifierName": "VerticesRenderer"
},
"name": "VerticesRenderer"
},
"property": {
"type": "Identifier",
"start": 621,
"end": 631,
"loc": {
"start": {
"line": 20,
"column": 41
},
"end": {
"line": 20,
"column": 51
},
"identifierName": "propsTypes"
},
"name": "propsTypes"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 632,
"end": 648,
"loc": {
"start": {
"line": 20,
"column": 52
},
"end": {
"line": 20,
"column": 68
},
"identifierName": "overrideSamplers"
},
"name": "overrideSamplers"
},
"computed": false
}
},
{
"type": "ObjectProperty",
"start": 657,
"end": 699,
"loc": {
"start": {
"line": 21,
"column": 6
},
"end": {
"line": 21,
"column": 48
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 657,
"end": 663,
"loc": {
"start": {
"line": 21,
"column": 6
},
"end": {
"line": 21,
"column": 12
},
"identifierName": "layers"
},
"name": "layers"
},
"value": {
"type": "MemberExpression",
"start": 665,
"end": 699,
"loc": {
"start": {
"line": 21,
"column": 14
},
"end": {
"line": 21,
"column": 48
}
},
"object": {
"type": "MemberExpression",
"start": 665,
"end": 692,
"loc": {
"start": {
"line": 21,
"column": 14
},
"end": {
"line": 21,
"column": 41
}
},
"object": {
"type": "Identifier",
"start": 665,
"end": 681,
"loc": {
"start": {
"line": 21,
"column": 14
},
"end": {
"line": 21,
"column": 30
},
"identifierName": "VerticesRenderer"
},
"name": "VerticesRenderer"
},
"property": {
"type": "Identifier",
"start": 682,
"end": 692,
"loc": {
"start": {
"line": 21,
"column": 31
},
"end": {
"line": 21,
"column": 41
},
"identifierName": "propsTypes"
},
"name": "propsTypes"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 693,
"end": 699,
"loc": {
"start": {
"line": 21,
"column": 42
},
"end": {
"line": 21,
"column": 48
},
"identifierName": "layers"
},
"name": "layers"
},
"computed": false