UNPKG

oxygen-core

Version:

Oxygen game engine (Xenon Core for browsers)

1,394 lines 1.9 MB
{ "type": "File", "start": 0, "end": 8504, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 339, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 8504, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 339, "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": 135, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 42 } }, "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": "vec4" }, "name": "vec4" }, "local": { "type": "Identifier", "start": 102, "end": 106, "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 13 }, "identifierName": "vec4" }, "name": "vec4" } } ], "source": { "type": "StringLiteral", "start": 114, "end": 134, "loc": { "start": { "line": 3, "column": 21 }, "end": { "line": 3, "column": 41 } }, "extra": { "rawValue": "../utils/gl-matrix", "raw": "'../utils/gl-matrix'" }, "value": "../utils/gl-matrix" } }, { "type": "ImportDeclaration", "start": 137, "end": 177, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 40 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 146, "end": 158, "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 21 } }, "imported": { "type": "Identifier", "start": 146, "end": 158, "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 21 }, "identifierName": "stringToRGBA" }, "name": "stringToRGBA" }, "local": { "type": "Identifier", "start": 146, "end": 158, "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 21 }, "identifierName": "stringToRGBA" }, "name": "stringToRGBA" } } ], "source": { "type": "StringLiteral", "start": 166, "end": 176, "loc": { "start": { "line": 4, "column": 29 }, "end": { "line": 4, "column": 39 } }, "extra": { "rawValue": "../utils", "raw": "'../utils'" }, "value": "../utils" } }, { "type": "ExportDefaultDeclaration", "start": 181, "end": 8502, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 338, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 196, "end": 8502, "loc": { "start": { "line": 6, "column": 15 }, "end": { "line": 338, "column": 1 } }, "id": { "type": "Identifier", "start": 202, "end": 214, "loc": { "start": { "line": 6, "column": 21 }, "end": { "line": 6, "column": 33 }, "identifierName": "TextRenderer" }, "name": "TextRenderer" }, "superClass": { "type": "Identifier", "start": 223, "end": 239, "loc": { "start": { "line": 6, "column": 42 }, "end": { "line": 6, "column": 58 }, "identifierName": "VerticesRenderer" }, "name": "VerticesRenderer" }, "body": { "type": "ClassBody", "start": 240, "end": 8502, "loc": { "start": { "line": 6, "column": 59 }, "end": { "line": 338, "column": 1 } }, "body": [ { "type": "ClassMethod", "start": 247, "end": 302, "loc": { "start": { "line": 8, "column": 2 }, "end": { "line": 10, "column": 3 } }, "static": true, "computed": false, "key": { "type": "Identifier", "start": 254, "end": 261, "loc": { "start": { "line": 8, "column": 9 }, "end": { "line": 8, "column": 16 }, "identifierName": "factory" }, "name": "factory" }, "kind": "method", "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 264, "end": 302, "loc": { "start": { "line": 8, "column": 19 }, "end": { "line": 10, "column": 3 } }, "body": [ { "type": "ReturnStatement", "start": 271, "end": 297, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 30 } }, "argument": { "type": "NewExpression", "start": 278, "end": 296, "loc": { "start": { "line": 9, "column": 11 }, "end": { "line": 9, "column": 29 } }, "callee": { "type": "Identifier", "start": 282, "end": 294, "loc": { "start": { "line": 9, "column": 15 }, "end": { "line": 9, "column": 27 }, "identifierName": "TextRenderer" }, "name": "TextRenderer" }, "arguments": [] } } ], "directives": [] } }, { "type": "ClassMethod", "start": 308, "end": 889, "loc": { "start": { "line": 12, "column": 2 }, "end": { "line": 27, "column": 3 } }, "static": true, "computed": false, "key": { "type": "Identifier", "start": 319, "end": 329, "loc": { "start": { "line": 12, "column": 13 }, "end": { "line": 12, "column": 23 }, "identifierName": "propsTypes" }, "name": "propsTypes" }, "kind": "get", "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 332, "end": 889, "loc": { "start": { "line": 12, "column": 26 }, "end": { "line": 27, "column": 3 } }, "body": [ { "type": "ReturnStatement", "start": 339, "end": 884, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 26, "column": 6 } }, "argument": { "type": "ObjectExpression", "start": 346, "end": 883, "loc": { "start": { "line": 13, "column": 11 }, "end": { "line": 26, "column": 5 } }, "properties": [ { "type": "ObjectProperty", "start": 355, "end": 399, "loc": { "start": { "line": 14, "column": 6 }, "end": { "line": 14, "column": 50 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 355, "end": 362, "loc": { "start": { "line": 14, "column": 6 }, "end": { "line": 14, "column": 13 }, "identifierName": "visible" }, "name": "visible" }, "value": { "type": "MemberExpression", "start": 364, "end": 399, "loc": { "start": { "line": 14, "column": 15 }, "end": { "line": 14, "column": 50 } }, "object": { "type": "MemberExpression", "start": 364, "end": 391, "loc": { "start": { "line": 14, "column": 15 }, "end": { "line": 14, "column": 42 } }, "object": { "type": "Identifier", "start": 364, "end": 380, "loc": { "start": { "line": 14, "column": 15 }, "end": { "line": 14, "column": 31 }, "identifierName": "VerticesRenderer" }, "name": "VerticesRenderer" }, "property": { "type": "Identifier", "start": 381, "end": 391, "loc": { "start": { "line": 14, "column": 32 }, "end": { "line": 14, "column": 42 }, "identifierName": "propsTypes" }, "name": "propsTypes" }, "computed": false }, "property": { "type": "Identifier", "start": 392, "end": 399, "loc": { "start": { "line": 14, "column": 43 }, "end": { "line": 14, "column": 50 }, "identifierName": "visible" }, "name": "visible" }, "computed": false } }, { "type": "ObjectProperty", "start": 408, "end": 450, "loc": { "start": { "line": 15, "column": 6 }, "end": { "line": 15, "column": 48 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 408, "end": 414, "loc": { "start": { "line": 15, "column": 6 }, "end": { "line": 15, "column": 12 }, "identifierName": "shader" }, "name": "shader" }, "value": { "type": "MemberExpression", "start": 416, "end": 450, "loc": { "start": { "line": 15, "column": 14 }, "end": { "line": 15, "column": 48 } }, "object": { "type": "MemberExpression", "start": 416, "end": 443, "loc": { "start": { "line": 15, "column": 14 }, "end": { "line": 15, "column": 41 } }, "object": { "type": "Identifier", "start": 416, "end": 432, "loc": { "start": { "line": 15, "column": 14 }, "end": { "line": 15, "column": 30 }, "identifierName": "VerticesRenderer" }, "name": "VerticesRenderer" }, "property": { "type": "Identifier", "start": 433, "end": 443, "loc": { "start": { "line": 15, "column": 31 }, "end": { "line": 15, "column": 41 }, "identifierName": "propsTypes" }, "name": "propsTypes" }, "computed": false }, "property": { "type": "Identifier", "start": 444, "end": 450, "loc": { "start": { "line": 15, "column": 42 }, "end": { "line": 15, "column": 48 }, "identifierName": "shader" }, "name": "shader" }, "computed": false } }, { "type": "ObjectProperty", "start": 459, "end": 521, "loc": { "start": { "line": 16, "column": 6 }, "end": { "line": 16, "column": 68 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 459, "end": 475, "loc": { "start": { "line": 16, "column": 6 }, "end": { "line": 16, "column": 22 }, "identifierName": "overrideUniforms" }, "name": "overrideUniforms" }, "value": { "type": "MemberExpression", "start": 477, "end": 521, "loc": { "start": { "line": 16, "column": 24 }, "end": { "line": 16, "column": 68 } }, "object": { "type": "MemberExpression", "start": 477, "end": 504, "loc": { "start": { "line": 16, "column": 24 }, "end": { "line": 16, "column": 51 } }, "object": { "type": "Identifier", "start": 477, "end": 493, "loc": { "start": { "line": 16, "column": 24 }, "end": { "line": 16, "column": 40 }, "identifierName": "VerticesRenderer" }, "name": "VerticesRenderer" }, "property": { "type": "Identifier", "start": 494, "end": 504, "loc": { "start": { "line": 16, "column": 41 }, "end": { "line": 16, "column": 51 }, "identifierName": "propsTypes" }, "name": "propsTypes" }, "computed": false }, "property": { "type": "Identifier", "start": 505, "end": 521, "loc": { "start": { "line": 16, "column": 52 }, "end": { "line": 16, "column": 68 }, "identifierName": "overrideUniforms" }, "name": "overrideUniforms" }, "computed": false } }, { "type": "ObjectProperty", "start": 530, "end": 592, "loc": { "start": { "line": 17, "column": 6 }, "end": { "line": 17, "column": 68 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 530, "end": 546, "loc": { "start": { "line": 17, "column": 6 }, "end": { "line": 17, "column": 22 }, "identifierName": "overrideSamplers" }, "name": "overrideSamplers" }, "value": { "type": "MemberExpression", "start": 548, "end": 592, "loc": { "start": { "line": 17, "column": 24 }, "end": { "line": 17, "column": 68 } }, "object": { "type": "MemberExpression", "start": 548, "end": 575, "loc": { "start": { "line": 17, "column": 24 }, "end": { "line": 17, "column": 51 } }, "object": { "type": "Identifier", "start": 548, "end": 564, "loc": { "start": { "line": 17, "column": 24 }, "end": { "line": 17, "column": 40 }, "identifierName": "VerticesRenderer" }, "name": "VerticesRenderer" }, "property": { "type": "Identifier", "start": 565, "end": 575, "loc": { "start": { "line": 17, "column": 41 }, "end": { "line": 17, "column": 51 }, "identifierName": "propsTypes" }, "name": "propsTypes" }, "computed": false }, "property": { "type": "Identifier", "start": 576, "end": 592, "loc": { "start": { "line": 17, "column": 52 }, "end": { "line": 17, "column": 68 }, "identifierName": "overrideSamplers" }, "name": "overrideSamplers" }, "computed": false } }, { "type": "ObjectProperty", "start": 601, "end": 643, "loc": { "start": { "line": 18, "column": 6 }, "end": { "line": 18, "column": 48 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 601, "end": 607, "loc": { "start": { "line": 18, "column": 6 }, "end": { "line": 18, "column": 12 }, "identifierName": "layers" }, "name": "layers" }, "value": { "type": "MemberExpression", "start": 609, "end": 643, "loc": { "start": { "line": 18, "column": 14 }, "end": { "line": 18, "column": 48 } }, "object": { "type": "MemberExpression", "start": 609, "end": 636, "loc": { "start": { "line": 18, "column": 14 }, "end": { "line": 18, "column": 41 } }, "object": { "type": "Identifier", "start": 609, "end": 625, "loc": { "start": { "line": 18, "column": 14 }, "end": { "line": 18, "column": 30 }, "identifierName": "VerticesRenderer" }, "name": "VerticesRenderer" }, "property": { "type": "Identifier", "start": 626, "end": 636, "loc": { "start": { "line": 18, "column": 31 }, "end": { "line": 18, "column": 41 }, "identifierName": "propsTypes" }, "name": "propsTypes" }, "computed": false }, "property": { "type": "Identifier", "start": 637, "end": 643, "loc": { "start": { "line": 18, "column": 42 }, "end": { "line": 18, "column": 48 }, "identifierName": "layers" }, "name": "layers" }, "computed": false } }, { "type": "ObjectProperty", "start": 652, "end": 666, "loc": { "start": { "line": 19, "column": 6 }, "end": { "line": 19, "column": 20 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 652, "end": 656, "loc": { "start": { "line": 19, "column": 6 }, "end": { "line": 19, "column": 10 }, "identifierName": "text" }, "name": "text" }, "value": { "type": "StringLiteral", "start": 658, "end": 666, "loc": { "start": { "line": 19, "column": 12 }, "end": { "line": 19, "column": 20 } }, "extra": { "rawValue": "string", "raw": "'string'" }, "value": "string" } }, { "type": "ObjectProperty", "start": 675, "end": 694, "loc": { "start": { "line": 20, "column": 6 }, "end": { "line": 20, "column": 25 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 675, "end": 679, "loc": { "start": { "line": 20, "column": 6 }, "end": { "line": 20, "column": 10 }, "identifierName": "font" }, "name": "font" }, "value": { "type": "StringLiteral", "start": 681, "end": 694, "loc": { "start": { "line": 20, "column": 12 }, "end": { "line": 20, "column": 25 } }, "extra": { "rawValue": "asset(font)", "raw": "'asset(font)'" }, "value": "asset(font)" } }, { "type": "ObjectProperty", "start": 703, "end": 716, "loc": { "start": { "line": 21, "column": 6 }, "end": { "line": 21, "column": 19 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 703, "end": 708, "loc": { "start": { "line": 21, "column": 6 }, "end": { "line": 21, "column": 11 }, "identifierName": "color" }, "name": "color" }, "value": { "type": "StringLiteral", "start": 710, "end": 716, "loc": { "start": { "line": 21, "column": 13 }, "end": { "line": 21, "column": 19 } }, "extra": { "rawValue": "rgba", "raw": "'rgba'" }, "value": "rgba" } }, { "type": "ObjectProperty", "start": 725, "end": 745, "loc": { "start": { "line": 22, "column": 6 }, "end": { "line": 22, "column": 26 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 725, "end": 737, "loc": { "start": { "line": 22, "column": 6 }, "end": { "line": 22, "column": 18 }, "identifierName": "colorOutline" }, "name"