UNPKG

awv3

Version:
1,315 lines (1,314 loc) 221 kB
{ "type": "File", "start": 0, "end": 814, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 21, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 814, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 21, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 31, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 31 } }, "specifiers": [ { "type": "ImportNamespaceSpecifier", "start": 7, "end": 17, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 17 } }, "local": { "type": "Identifier", "start": 12, "end": 17, "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 17 }, "identifierName": "THREE" }, "name": "THREE" } } ], "source": { "type": "StringLiteral", "start": 23, "end": 30, "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 30 } }, "extra": { "rawValue": "three", "raw": "'three'" }, "value": "three" } }, { "type": "ImportDeclaration", "start": 32, "end": 66, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 34 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 39, "end": 51, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 19 } }, "local": { "type": "Identifier", "start": 39, "end": 51, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 19 }, "identifierName": "BaseGraphics" }, "name": "BaseGraphics" } } ], "source": { "type": "StringLiteral", "start": 57, "end": 65, "loc": { "start": { "line": 2, "column": 25 }, "end": { "line": 2, "column": 33 } }, "extra": { "rawValue": "./base", "raw": "'./base'" }, "value": "./base" } }, { "type": "ExportDefaultDeclaration", "start": 68, "end": 813, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 20, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 83, "end": 813, "loc": { "start": { "line": 4, "column": 15 }, "end": { "line": 20, "column": 1 } }, "id": { "type": "Identifier", "start": 89, "end": 95, "loc": { "start": { "line": 4, "column": 21 }, "end": { "line": 4, "column": 27 }, "identifierName": "Radial" }, "name": "Radial" }, "superClass": { "type": "Identifier", "start": 104, "end": 116, "loc": { "start": { "line": 4, "column": 36 }, "end": { "line": 4, "column": 48 }, "identifierName": "BaseGraphics" }, "name": "BaseGraphics" }, "body": { "type": "ClassBody", "start": 117, "end": 813, "loc": { "start": { "line": 4, "column": 49 }, "end": { "line": 20, "column": 1 } }, "body": [ { "type": "ClassMethod", "start": 123, "end": 184, "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 7, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 123, "end": 134, "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 15 }, "identifierName": "constructor" }, "name": "constructor" }, "static": false, "kind": "constructor", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "RestElement", "start": 135, "end": 142, "loc": { "start": { "line": 5, "column": 16 }, "end": { "line": 5, "column": 23 } }, "argument": { "type": "Identifier", "start": 138, "end": 142, "loc": { "start": { "line": 5, "column": 19 }, "end": { "line": 5, "column": 23 }, "identifierName": "args" }, "name": "args" } } ], "body": { "type": "BlockStatement", "start": 144, "end": 184, "loc": { "start": { "line": 5, "column": 25 }, "end": { "line": 7, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 154, "end": 178, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 32 } }, "expression": { "type": "CallExpression", "start": 154, "end": 177, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 31 } }, "callee": { "type": "Super", "start": 154, "end": 159, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 13 } } }, "arguments": [ { "type": "SpreadElement", "start": 160, "end": 167, "loc": { "start": { "line": 6, "column": 14 }, "end": { "line": 6, "column": 21 } }, "argument": { "type": "Identifier", "start": 163, "end": 167, "loc": { "start": { "line": 6, "column": 17 }, "end": { "line": 6, "column": 21 }, "identifierName": "args" }, "name": "args" } }, { "type": "NumericLiteral", "start": 169, "end": 170, "loc": { "start": { "line": 6, "column": 23 }, "end": { "line": 6, "column": 24 } }, "extra": { "rawValue": 2, "raw": "2" }, "value": 2 }, { "type": "NumericLiteral", "start": 172, "end": 173, "loc": { "start": { "line": 6, "column": 26 }, "end": { "line": 6, "column": 27 } }, "extra": { "rawValue": 0, "raw": "0" }, "value": 0 }, { "type": "NumericLiteral", "start": 175, "end": 176, "loc": { "start": { "line": 6, "column": 29 }, "end": { "line": 6, "column": 30 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 } ] } } ], "directives": [] } }, { "type": "ClassMethod", "start": 190, "end": 811, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 19, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 190, "end": 205, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 19 }, "identifierName": "updateFromState" }, "name": "updateFromState" }, "static": false, "kind": "method", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 206, "end": 211, "loc": { "start": { "line": 9, "column": 20 }, "end": { "line": 9, "column": 25 }, "identifierName": "state" }, "name": "state" }, { "type": "RestElement", "start": 213, "end": 220, "loc": { "start": { "line": 9, "column": 27 }, "end": { "line": 9, "column": 34 } }, "argument": { "type": "Identifier", "start": 216, "end": 220, "loc": { "start": { "line": 9, "column": 30 }, "end": { "line": 9, "column": 34 }, "identifierName": "args" }, "name": "args" } } ], "body": { "type": "BlockStatement", "start": 222, "end": 811, "loc": { "start": { "line": 9, "column": 36 }, "end": { "line": 19, "column": 5 } }, "body": [ { "type": "VariableDeclaration", "start": 232, "end": 338, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 114 } }, "declarations": [ { "type": "VariableDeclarator", "start": 238, "end": 337, "loc": { "start": { "line": 10, "column": 14 }, "end": { "line": 10, "column": 113 } }, "id": { "type": "ArrayPattern", "start": 238, "end": 251, "loc": { "start": { "line": 10, "column": 14 }, "end": { "line": 10, "column": 27 } }, "elements": [ { "type": "Identifier", "start": 239, "end": 245, "loc": { "start": { "line": 10, "column": 15 }, "end": { "line": 10, "column": 21 }, "identifierName": "center" }, "name": "center" }, { "type": "Identifier", "start": 247, "end": 250, "loc": { "start": { "line": 10, "column": 23 }, "end": { "line": 10, "column": 26 }, "identifierName": "dim" }, "name": "dim" } ] }, "init": { "type": "CallExpression", "start": 254, "end": 337, "loc": { "start": { "line": 10, "column": 30 }, "end": { "line": 10, "column": 113 } }, "callee": { "type": "MemberExpression", "start": 254, "end": 277, "loc": { "start": { "line": 10, "column": 30 }, "end": { "line": 10, "column": 53 } }, "object": { "type": "ArrayExpression", "start": 254, "end": 273, "loc": { "start": { "line": 10, "column": 30 }, "end": { "line": 10, "column": 49 } }, "elements": [ { "type": "StringLiteral", "start": 255, "end": 263, "loc": { "start": { "line": 10, "column": 31 }, "end": { "line": 10, "column": 39 } }, "extra": { "rawValue": "center", "raw": "'center'" }, "value": "center" }, { "type": "StringLiteral", "start": 265, "end": 272, "loc": { "start": { "line": 10, "column": 41 }, "end": { "line": 10, "column": 48 } }, "extra": { "rawValue": "dimPt", "raw": "'dimPt'" }, "value": "dimPt" } ] }, "property": { "type": "Identifier", "start": 274, "end": 277, "loc": { "start": { "line": 10, "column": 50 }, "end": { "line": 10, "column": 53 }, "identifierName": "map" }, "name": "map" }, "computed": false }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 278, "end": 336, "loc": { "start": { "line": 10, "column": 54 }, "end": { "line": 10, "column": 112 } }, "id": null, "generator": false, "expression": true, "async": false, "params": [ { "type": "Identifier", "start": 278, "end": 279, "loc": { "start": { "line": 10, "column": 54 }, "end": { "line": 10, "column": 55 }, "identifierName": "x" }, "name": "x" } ], "body": { "type": "CallExpression", "start": 283, "end": 336, "loc": { "start": { "line": 10, "column": 59 }, "end": { "line": 10, "column": 112 } }, "callee": { "type": "MemberExpression", "start": 283, "end": 312, "loc": { "start": { "line": 10, "column": 59 }, "end": { "line": 10, "column": 88 } }, "object": { "type": "NewExpression", "start": 283, "end": 302, "loc": { "start": { "line": 10, "column": 59 }, "end": { "line": 10, "column": 78 } }, "callee": { "type": "MemberExpression", "start": 287, "end": 300, "loc": { "start": { "line": 10, "column": 63 }, "end": { "line": 10, "column": 76 } }, "object": { "type": "Identifier", "start": 287, "end": 292, "loc": { "start": { "line": 10, "column": 63 }, "end": { "line": 10, "column": 68 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 293, "end": 300, "loc": { "start": { "line": 10, "column": 69 }, "end": { "line": 10, "column": 76 }, "identifierName": "Vector3" }, "name": "Vector3" }, "computed": false }, "arguments": [] }, "property": { "type": "Identifier", "start": 303, "end": 312, "loc": { "start": { "line": 10, "column": 79 }, "end": { "line": 10, "column": 88 }, "identifierName": "fromArray" }, "name": "fromArray" }, "computed": false }, "arguments": [ { "type": "MemberExpression", "start": 313, "end": 335, "loc": { "start": { "line": 10, "column": 89 }, "end": { "line": 10, "column": 111 } }, "object": { "type": "MemberExpression", "start": 313, "end": 329, "loc": { "start": { "line": 10, "column": 89 }, "end": { "line": 10, "column": 105 } }, "object": { "type": "MemberExpression", "start": 313, "end": 326, "loc": { "start": { "line": 10, "column": 89 }, "end": { "line": 10, "column": 102 } }, "object": { "type": "Identifier", "start": 313, "end": 318, "loc": { "start": { "line": 10, "column": 89 }, "end": { "line": 10, "column": 94 }, "identifierName": "state" }, "name": "state" }, "property": { "type": "Identifier", "start": 319, "end": 326, "loc": { "start": { "line": 10, "column": 95 }, "end": { "line": 10, "column": 102 }, "identifierName": "members" }, "name": "members" }, "computed": false }, "property": { "type": "Identifier", "start": 327, "end": 328, "loc": { "start": { "line": 10, "column": 103 }, "end": { "line": 10, "column": 104 }, "identifierName": "x" }, "name": "x" }, "computed": true }, "property": { "type": "Identifier", "start": 330, "end": 335, "loc": { "start": { "line": 10, "column": 106 }, "end": { "line": 10, "column": 111 }, "identifierName": "value" }, "name": "value" }, "computed": false } ] } } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 347, "end": 389, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 50 } }, "declarations": [ { "type": "VariableDeclarator", "start": 353, "end": 388, "loc": { "start": { "line": 11, "column": 14 }, "end": { "line": 11, "column": 49 } }, "id": { "type": "Identifier", "start": 353, "end": 359, "loc": { "start": { "line": 11, "column": 14 }, "end": { "line": 11, "column": 20 }, "identifierName": "radius" }, "name": "radius" }, "init": { "type": "MemberExpression", "start": 362, "end": 388, "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 49 } }, "object": { "type": "MemberExpression", "start": 362, "end": 382, "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 43 } }, "object": { "type": "MemberExpression", "start": 362, "end": 375, "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 36 } }, "object": { "type": "Identifier", "start": 362, "end": 367, "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 28 }, "identifierName": "state" }, "name": "state" }, "property": { "type": "Identifier", "start": 368, "end": 375, "loc": { "start": { "line": 11, "column": 29 }, "end": { "line": 11, "column": 36 }, "identifierName": "members" }, "name": "members" }, "computed": false }, "property": { "type": "Identifier", "start": 376, "end": 382, "loc": { "start": { "line": 11, "column": 37 }, "end": { "line": 11, "column": 43 }, "identifierName": "radius" }, "name": "radius" }, "computed": false }, "property": { "type": "Identifier", "start": 383, "end": 388, "loc": { "start": { "line": 11, "column": 44 }, "end": { "line": 11, "column": 49 }, "identifierName": "value" }, "name": "value" }, "computed": false } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 398, "end": 464, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 74 } }, "declarations": [ { "type": "VariableDeclarator", "start": 404, "end": 463, "loc": { "start": { "line": 12, "column": 14 }, "end": { "line": 12, "column": 73 } }, "id": { "type": "Identifier", "start": 404, "end": 407, "loc": { "start": { "line": 12, "column": 14 }, "end": { "line": 12, "column": 17 }, "identifierName": "end" }, "name": "end" }, "init": { "type": "CallExpression", "start": 410, "end": 463, "loc": { "start": { "line": 12, "column": 20 }, "end": { "line": 12, "column": 73 } }, "callee": { "type": "MemberExpression", "start": 410, "end": 455, "loc": { "start": { "line": 12, "column": 20 }, "end": { "line": 12, "column": 65 } }, "object": { "type": "CallExpression", "start": 410, "end": 451, "loc": { "start": { "line": 12, "column": 20 }, "end": { "line": 12, "column": 61 } }, "callee": { "type": "MemberExpression", "start": 410, "end": 443, "loc": { "start": { "line": 12, "column": 20 }, "end": { "line": 12, "column": 53 } }, "object": { "type": "CallExpression", "start": 410, "end": 433, "loc": { "start": {