UNPKG

awv3

Version:
1,310 lines (1,309 loc) 387 kB
{ "type": "File", "start": 0, "end": 1329, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 26, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 1329, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 26, "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": 1328, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 25, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 83, "end": 1328, "loc": { "start": { "line": 4, "column": 15 }, "end": { "line": 25, "column": 1 } }, "id": { "type": "Identifier", "start": 89, "end": 96, "loc": { "start": { "line": 4, "column": 21 }, "end": { "line": 4, "column": 28 }, "identifierName": "Angular" }, "name": "Angular" }, "superClass": { "type": "Identifier", "start": 105, "end": 117, "loc": { "start": { "line": 4, "column": 37 }, "end": { "line": 4, "column": 49 }, "identifierName": "BaseGraphics" }, "name": "BaseGraphics" }, "body": { "type": "ClassBody", "start": 118, "end": 1328, "loc": { "start": { "line": 4, "column": 50 }, "end": { "line": 25, "column": 1 } }, "body": [ { "type": "ClassMethod", "start": 124, "end": 185, "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 7, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 124, "end": 135, "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": 136, "end": 143, "loc": { "start": { "line": 5, "column": 16 }, "end": { "line": 5, "column": 23 } }, "argument": { "type": "Identifier", "start": 139, "end": 143, "loc": { "start": { "line": 5, "column": 19 }, "end": { "line": 5, "column": 23 }, "identifierName": "args" }, "name": "args" } } ], "body": { "type": "BlockStatement", "start": 145, "end": 185, "loc": { "start": { "line": 5, "column": 25 }, "end": { "line": 7, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 155, "end": 179, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 32 } }, "expression": { "type": "CallExpression", "start": 155, "end": 178, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 31 } }, "callee": { "type": "Super", "start": 155, "end": 160, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 13 } } }, "arguments": [ { "type": "SpreadElement", "start": 161, "end": 168, "loc": { "start": { "line": 6, "column": 14 }, "end": { "line": 6, "column": 21 } }, "argument": { "type": "Identifier", "start": 164, "end": 168, "loc": { "start": { "line": 6, "column": 17 }, "end": { "line": 6, "column": 21 }, "identifierName": "args" }, "name": "args" } }, { "type": "NumericLiteral", "start": 170, "end": 171, "loc": { "start": { "line": 6, "column": 23 }, "end": { "line": 6, "column": 24 } }, "extra": { "rawValue": 2, "raw": "2" }, "value": 2 }, { "type": "NumericLiteral", "start": 173, "end": 174, "loc": { "start": { "line": 6, "column": 26 }, "end": { "line": 6, "column": 27 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 }, { "type": "NumericLiteral", "start": 176, "end": 177, "loc": { "start": { "line": 6, "column": 29 }, "end": { "line": 6, "column": 30 } }, "extra": { "rawValue": 2, "raw": "2" }, "value": 2 } ] } } ], "directives": [] } }, { "type": "ClassMethod", "start": 191, "end": 1326, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 24, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 191, "end": 206, "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": 207, "end": 212, "loc": { "start": { "line": 9, "column": 20 }, "end": { "line": 9, "column": 25 }, "identifierName": "state" }, "name": "state" }, { "type": "Identifier", "start": 214, "end": 218, "loc": { "start": { "line": 9, "column": 27 }, "end": { "line": 9, "column": 31 }, "identifierName": "tree" }, "name": "tree" } ], "body": { "type": "BlockStatement", "start": 220, "end": 1326, "loc": { "start": { "line": 9, "column": 33 }, "end": { "line": 24, "column": 5 } }, "body": [ { "type": "VariableDeclaration", "start": 230, "end": 368, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 146 } }, "declarations": [ { "type": "VariableDeclarator", "start": 234, "end": 367, "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 145 } }, "id": { "type": "ArrayPattern", "start": 234, "end": 259, "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 37 } }, "elements": [ { "type": "Identifier", "start": 235, "end": 240, "loc": { "start": { "line": 10, "column": 13 }, "end": { "line": 10, "column": 18 }, "identifierName": "start" }, "name": "start" }, { "type": "Identifier", "start": 242, "end": 245, "loc": { "start": { "line": 10, "column": 20 }, "end": { "line": 10, "column": 23 }, "identifierName": "end" }, "name": "end" }, { "type": "Identifier", "start": 247, "end": 250, "loc": { "start": { "line": 10, "column": 25 }, "end": { "line": 10, "column": 28 }, "identifierName": "dim" }, "name": "dim" }, { "type": "Identifier", "start": 252, "end": 258, "loc": { "start": { "line": 10, "column": 30 }, "end": { "line": 10, "column": 36 }, "identifierName": "corner" }, "name": "corner" } ] }, "init": { "type": "CallExpression", "start": 262, "end": 367, "loc": { "start": { "line": 10, "column": 40 }, "end": { "line": 10, "column": 145 } }, "callee": { "type": "MemberExpression", "start": 262, "end": 307, "loc": { "start": { "line": 10, "column": 40 }, "end": { "line": 10, "column": 85 } }, "object": { "type": "ArrayExpression", "start": 262, "end": 303, "loc": { "start": { "line": 10, "column": 40 }, "end": { "line": 10, "column": 81 } }, "elements": [ { "type": "StringLiteral", "start": 263, "end": 272, "loc": { "start": { "line": 10, "column": 41 }, "end": { "line": 10, "column": 50 } }, "extra": { "rawValue": "startPt", "raw": "'startPt'" }, "value": "startPt" }, { "type": "StringLiteral", "start": 274, "end": 281, "loc": { "start": { "line": 10, "column": 52 }, "end": { "line": 10, "column": 59 } }, "extra": { "rawValue": "endPt", "raw": "'endPt'" }, "value": "endPt" }, { "type": "StringLiteral", "start": 283, "end": 290, "loc": { "start": { "line": 10, "column": 61 }, "end": { "line": 10, "column": 68 } }, "extra": { "rawValue": "dimPt", "raw": "'dimPt'" }, "value": "dimPt" }, { "type": "StringLiteral", "start": 292, "end": 302, "loc": { "start": { "line": 10, "column": 70 }, "end": { "line": 10, "column": 80 } }, "extra": { "rawValue": "cornerPt", "raw": "'cornerPt'" }, "value": "cornerPt" } ] }, "property": { "type": "Identifier", "start": 304, "end": 307, "loc": { "start": { "line": 10, "column": 82 }, "end": { "line": 10, "column": 85 }, "identifierName": "map" }, "name": "map" }, "computed": false }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 308, "end": 366, "loc": { "start": { "line": 10, "column": 86 }, "end": { "line": 10, "column": 144 } }, "id": null, "generator": false, "expression": true, "async": false, "params": [ { "type": "Identifier", "start": 308, "end": 309, "loc": { "start": { "line": 10, "column": 86 }, "end": { "line": 10, "column": 87 }, "identifierName": "x" }, "name": "x" } ], "body": { "type": "CallExpression", "start": 313, "end": 366, "loc": { "start": { "line": 10, "column": 91 }, "end": { "line": 10, "column": 144 } }, "callee": { "type": "MemberExpression", "start": 313, "end": 342, "loc": { "start": { "line": 10, "column": 91 }, "end": { "line": 10, "column": 120 } }, "object": { "type": "NewExpression", "start": 313, "end": 332, "loc": { "start": { "line": 10, "column": 91 }, "end": { "line": 10, "column": 110 } }, "callee": { "type": "MemberExpression", "start": 317, "end": 330, "loc": { "start": { "line": 10, "column": 95 }, "end": { "line": 10, "column": 108 } }, "object": { "type": "Identifier", "start": 317, "end": 322, "loc": { "start": { "line": 10, "column": 95 }, "end": { "line": 10, "column": 100 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 323, "end": 330, "loc": { "start": { "line": 10, "column": 101 }, "end": { "line": 10, "column": 108 }, "identifierName": "Vector3" }, "name": "Vector3" }, "computed": false }, "arguments": [] }, "property": { "type": "Identifier", "start": 333, "end": 342, "loc": { "start": { "line": 10, "column": 111 }, "end": { "line": 10, "column": 120 }, "identifierName": "fromArray" }, "name": "fromArray" }, "computed": false }, "arguments": [ { "type": "MemberExpression", "start": 343, "end": 365, "loc": { "start": { "line": 10, "column": 121 }, "end": { "line": 10, "column": 143 } }, "object": { "type": "MemberExpression", "start": 343, "end": 359, "loc": { "start": { "line": 10, "column": 121 }, "end": { "line": 10, "column": 137 } }, "object": { "type": "MemberExpression", "start": 343, "end": 356, "loc": { "start": { "line": 10, "column": 121 }, "end": { "line": 10, "column": 134 } }, "object": { "type": "Identifier", "start": 343, "end": 348, "loc": { "start": { "line": 10, "column": 121 }, "end": { "line": 10, "column": 126 }, "identifierName": "state" }, "name": "state" }, "property": { "type": "Identifier", "start": 349, "end": 356, "loc": { "start": { "line": 10, "column": 127 }, "end": { "line": 10, "column": 134 }, "identifierName": "members" }, "name": "members" }, "computed": false }, "property": { "type": "Identifier", "start": 357, "end": 358, "loc": { "start": { "line": 10, "column": 135 }, "end": { "line": 10, "column": 136 }, "identifierName": "x" }, "name": "x" }, "computed": true }, "property": { "type": "Identifier", "start": 360, "end": 365, "loc": { "start": { "line": 10, "column": 138 }, "end": { "line": 10, "column": 143 }, "identifierName": "value" }, "name": "value" }, "computed": false } ] } } ] } } ], "kind": "let" }, { "type": "VariableDeclaration", "start": 377, "end": 415, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 46 } }, "declarations": [ { "type": "VariableDeclarator", "start": 383, "end": 414, "loc": { "start": { "line": 11, "column": 14 }, "end": { "line": 11, "column": 45 } }, "id": { "type": "Identifier", "start": 383, "end": 389, "loc": { "start": { "line": 11, "column": 14 }, "end": { "line": 11, "column": 20 }, "identifierName": "radius" }, "name": "radius" }, "init": { "type": "CallExpression", "start": 392, "end": 414, "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 45 } }, "callee": { "type": "MemberExpression", "start": 392, "end": 409, "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 40 } }, "object": { "type": "Identifier", "start": 392, "end": 398, "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 29 }, "identifierName": "corner" }, "name": "corner" }, "property": { "type": "Identifier", "start": 399, "end": 409, "loc": { "start": { "line": 11, "column": 30 }, "end": { "line": 11, "column": 40 }, "identifierName": "distanceTo" }, "name": "distanceTo" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 410, "end": 413, "loc": { "start": { "line": 11, "column": 41 }, "end": { "line": 11, "column": 44 }, "identifierName": "dim" }, "name": "dim" } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 424, "end": 547, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 131 } }, "declarations": [ { "type": "VariableDeclarator", "start": 428, "end": 489, "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 73 } }, "id": { "type": "Identifier", "start": 428, "end": 436, "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 20 }, "identifierName": "startAng" }, "name": "startAng" }, "init": { "type": "CallExpression", "start": 439, "end": 489, "loc": { "start": { "line": 12, "column": 23 }, "end": { "line": 12, "column": 73 } }, "callee": { "type": "MemberExpression", "start": 439, "end": 449, "loc": { "start": { "line": 12, "column": 23 }, "end": { "line": 12, "column": 33 } }, "object": { "type": "Identifier",