UNPKG

awv3

Version:
1,619 lines (1,618 loc) 567 kB
{ "type": "File", "start": 0, "end": 2296, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 47, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 2296, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 47, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 30, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 30 } }, "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": 31, "end": 64, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 33 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 38, "end": 50, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 19 } }, "local": { "type": "Identifier", "start": 38, "end": 50, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 19 }, "identifierName": "BaseGraphics" }, "name": "BaseGraphics" } } ], "source": { "type": "StringLiteral", "start": 56, "end": 64, "loc": { "start": { "line": 2, "column": 25 }, "end": { "line": 2, "column": 33 } }, "extra": { "rawValue": "./base", "raw": "'./base'" }, "value": "./base" } }, { "type": "FunctionDeclaration", "start": 66, "end": 297, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 9, "column": 1 } }, "id": { "type": "Identifier", "start": 75, "end": 87, "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 21 }, "identifierName": "closestAngle" }, "name": "closestAngle" }, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 88, "end": 93, "loc": { "start": { "line": 4, "column": 22 }, "end": { "line": 4, "column": 27 }, "identifierName": "value" }, "name": "value" }, { "type": "Identifier", "start": 95, "end": 97, "loc": { "start": { "line": 4, "column": 29 }, "end": { "line": 4, "column": 31 }, "identifierName": "to" }, "name": "to" } ], "body": { "type": "BlockStatement", "start": 99, "end": 297, "loc": { "start": { "line": 4, "column": 33 }, "end": { "line": 9, "column": 1 } }, "body": [ { "type": "VariableDeclaration", "start": 105, "end": 128, "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 27 } }, "declarations": [ { "type": "VariableDeclarator", "start": 111, "end": 128, "loc": { "start": { "line": 5, "column": 10 }, "end": { "line": 5, "column": 27 } }, "id": { "type": "Identifier", "start": 111, "end": 114, "loc": { "start": { "line": 5, "column": 10 }, "end": { "line": 5, "column": 13 }, "identifierName": "pi2" }, "name": "pi2" }, "init": { "type": "BinaryExpression", "start": 117, "end": 128, "loc": { "start": { "line": 5, "column": 16 }, "end": { "line": 5, "column": 27 } }, "left": { "type": "NumericLiteral", "start": 117, "end": 118, "loc": { "start": { "line": 5, "column": 16 }, "end": { "line": 5, "column": 17 } }, "extra": { "rawValue": 2, "raw": "2" }, "value": 2 }, "operator": "*", "right": { "type": "MemberExpression", "start": 121, "end": 128, "loc": { "start": { "line": 5, "column": 20 }, "end": { "line": 5, "column": 27 } }, "object": { "type": "Identifier", "start": 121, "end": 125, "loc": { "start": { "line": 5, "column": 20 }, "end": { "line": 5, "column": 24 }, "identifierName": "Math" }, "name": "Math" }, "property": { "type": "Identifier", "start": 126, "end": 128, "loc": { "start": { "line": 5, "column": 25 }, "end": { "line": 5, "column": 27 }, "identifierName": "PI" }, "name": "PI" }, "computed": false } } } ], "kind": "const" }, { "type": "WhileStatement", "start": 133, "end": 203, "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 74 } }, "test": { "type": "BinaryExpression", "start": 140, "end": 189, "loc": { "start": { "line": 6, "column": 11 }, "end": { "line": 6, "column": 60 } }, "left": { "type": "CallExpression", "start": 140, "end": 166, "loc": { "start": { "line": 6, "column": 11 }, "end": { "line": 6, "column": 37 } }, "callee": { "type": "MemberExpression", "start": 140, "end": 148, "loc": { "start": { "line": 6, "column": 11 }, "end": { "line": 6, "column": 19 } }, "object": { "type": "Identifier", "start": 140, "end": 144, "loc": { "start": { "line": 6, "column": 11 }, "end": { "line": 6, "column": 15 }, "identifierName": "Math" }, "name": "Math" }, "property": { "type": "Identifier", "start": 145, "end": 148, "loc": { "start": { "line": 6, "column": 16 }, "end": { "line": 6, "column": 19 }, "identifierName": "abs" }, "name": "abs" }, "computed": false }, "arguments": [ { "type": "BinaryExpression", "start": 149, "end": 165, "loc": { "start": { "line": 6, "column": 20 }, "end": { "line": 6, "column": 36 } }, "left": { "type": "BinaryExpression", "start": 149, "end": 160, "loc": { "start": { "line": 6, "column": 20 }, "end": { "line": 6, "column": 31 } }, "left": { "type": "Identifier", "start": 149, "end": 154, "loc": { "start": { "line": 6, "column": 20 }, "end": { "line": 6, "column": 25 }, "identifierName": "value" }, "name": "value" }, "operator": "-", "right": { "type": "Identifier", "start": 157, "end": 160, "loc": { "start": { "line": 6, "column": 28 }, "end": { "line": 6, "column": 31 }, "identifierName": "pi2" }, "name": "pi2" } }, "operator": "-", "right": { "type": "Identifier", "start": 163, "end": 165, "loc": { "start": { "line": 6, "column": 34 }, "end": { "line": 6, "column": 36 }, "identifierName": "to" }, "name": "to" } } ] }, "operator": "<", "right": { "type": "CallExpression", "start": 169, "end": 189, "loc": { "start": { "line": 6, "column": 40 }, "end": { "line": 6, "column": 60 } }, "callee": { "type": "MemberExpression", "start": 169, "end": 177, "loc": { "start": { "line": 6, "column": 40 }, "end": { "line": 6, "column": 48 } }, "object": { "type": "Identifier", "start": 169, "end": 173, "loc": { "start": { "line": 6, "column": 40 }, "end": { "line": 6, "column": 44 }, "identifierName": "Math" }, "name": "Math" }, "property": { "type": "Identifier", "start": 174, "end": 177, "loc": { "start": { "line": 6, "column": 45 }, "end": { "line": 6, "column": 48 }, "identifierName": "abs" }, "name": "abs" }, "computed": false }, "arguments": [ { "type": "BinaryExpression", "start": 178, "end": 188, "loc": { "start": { "line": 6, "column": 49 }, "end": { "line": 6, "column": 59 } }, "left": { "type": "Identifier", "start": 178, "end": 183, "loc": { "start": { "line": 6, "column": 49 }, "end": { "line": 6, "column": 54 }, "identifierName": "value" }, "name": "value" }, "operator": "-", "right": { "type": "Identifier", "start": 186, "end": 188, "loc": { "start": { "line": 6, "column": 57 }, "end": { "line": 6, "column": 59 }, "identifierName": "to" }, "name": "to" } } ] } }, "body": { "type": "ExpressionStatement", "start": 191, "end": 203, "loc": { "start": { "line": 6, "column": 62 }, "end": { "line": 6, "column": 74 } }, "expression": { "type": "AssignmentExpression", "start": 191, "end": 203, "loc": { "start": { "line": 6, "column": 62 }, "end": { "line": 6, "column": 74 } }, "operator": "-=", "left": { "type": "Identifier", "start": 191, "end": 196, "loc": { "start": { "line": 6, "column": 62 }, "end": { "line": 6, "column": 67 }, "identifierName": "value" }, "name": "value" }, "right": { "type": "Identifier", "start": 200, "end": 203, "loc": { "start": { "line": 6, "column": 71 }, "end": { "line": 6, "column": 74 }, "identifierName": "pi2" }, "name": "pi2" } } } }, { "type": "WhileStatement", "start": 208, "end": 278, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 74 } }, "test": { "type": "BinaryExpression", "start": 215, "end": 264, "loc": { "start": { "line": 7, "column": 11 }, "end": { "line": 7, "column": 60 } }, "left": { "type": "CallExpression", "start": 215, "end": 241, "loc": { "start": { "line": 7, "column": 11 }, "end": { "line": 7, "column": 37 } }, "callee": { "type": "MemberExpression", "start": 215, "end": 223, "loc": { "start": { "line": 7, "column": 11 }, "end": { "line": 7, "column": 19 } }, "object": { "type": "Identifier", "start": 215, "end": 219, "loc": { "start": { "line": 7, "column": 11 }, "end": { "line": 7, "column": 15 }, "identifierName": "Math" }, "name": "Math" }, "property": { "type": "Identifier", "start": 220, "end": 223, "loc": { "start": { "line": 7, "column": 16 }, "end": { "line": 7, "column": 19 }, "identifierName": "abs" }, "name": "abs" }, "computed": false }, "arguments": [ { "type": "BinaryExpression", "start": 224, "end": 240, "loc": { "start": { "line": 7, "column": 20 }, "end": { "line": 7, "column": 36 } }, "left": { "type": "BinaryExpression", "start": 224, "end": 235, "loc": { "start": { "line": 7, "column": 20 }, "end": { "line": 7, "column": 31 } }, "left": { "type": "Identifier", "start": 224, "end": 229, "loc": { "start": { "line": 7, "column": 20 }, "end": { "line": 7, "column": 25 }, "identifierName": "value" }, "name": "value" }, "operator": "+", "right": { "type": "Identifier", "start": 232, "end": 235, "loc": { "start": { "line": 7, "column": 28 }, "end": { "line": 7, "column": 31 }, "identifierName": "pi2" }, "name": "pi2" } }, "operator": "-", "right": { "type": "Identifier", "start": 238, "end": 240, "loc": { "start": { "line": 7, "column": 34 }, "end": { "line": 7, "column": 36 }, "identifierName": "to" }, "name": "to" } } ] }, "operator": "<", "right": { "type": "CallExpression", "start": 244, "end": 264, "loc": { "start": { "line": 7, "column": 40 }, "end": { "line": 7, "column": 60 } }, "callee": { "type": "MemberExpression", "start": 244, "end": 252, "loc": { "start": { "line": 7, "column": 40 }, "end": { "line": 7, "column": 48 } }, "object": { "type": "Identifier", "start": 244, "end": 248, "loc": { "start": { "line": 7, "column": 40 }, "end": { "line": 7, "column": 44 }, "identifierName": "Math" }, "name": "Math" }, "property": { "type": "Identifier", "start": 249, "end": 252, "loc": { "start": { "line": 7, "column": 45 }, "end": { "line": 7, "column": 48 }, "identifierName": "abs" }, "name": "abs" }, "computed": false }, "arguments": [ { "type": "BinaryExpression", "start": 253, "end": 263, "loc": { "start": { "line": 7, "column": 49 }, "end": { "line": 7, "column": 59 } }, "left": { "type": "Identifier", "start": 253, "end": 258, "loc": { "start": { "line": 7, "column": 49 }, "end": { "line": 7, "column": 54 }, "identifierName": "value" }, "name": "value" }, "operator": "-", "right": { "type": "Identifier", "start": 261, "end": 263, "loc": { "start": { "line": 7, "column": 57 }, "end": { "line": 7, "column": 59 }, "identifierName": "to" }, "name": "to" } } ] } }, "body": { "type": "ExpressionStatement", "start": 266, "end": 278, "loc": { "start": { "line": 7, "column": 62 }, "end": { "line": 7, "column": 74 } }, "expression": { "type": "AssignmentExpression", "start": 266, "end": 278, "loc": { "start": { "line": 7, "column": 62 }, "end": { "line": 7, "column": 74 } }, "operator": "+=", "left": { "type": "Identifier", "start": 266, "end": 271, "loc": { "start": { "line": 7, "column": 62 }, "end": { "line": 7, "column": 67 }, "identifierName": "value" }, "name": "value" }, "right": { "type": "Identifier", "start": 275, "end": 278, "loc": { "start": { "line": 7, "column": 71 }, "end": { "line": 7, "column": 74 }, "identifierName": "pi2" }, "name": "pi2" } } } }, { "type": "ReturnStatement", "start": 283, "end": 295, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 16 } }, "argument": { "type": "Identifier", "start": 290, "end": 295, "loc": { "start": { "line": 8, "column": 11 }, "end": { "line": 8, "column": 16 }, "identifierName": "value" }, "name": "value" } } ], "directives": [] } }, { "type": "ExportDefaultDeclaration", "start": 299, "end": 2295, "loc": { "start": { "line": 11, "column": 0 }, "end": { "line": 46, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 314, "end": 2295, "loc": { "start": { "line": 11, "column": 15 }, "end": { "line": 46, "column": 1 } }, "id": { "type": "Identifier", "start": 320, "end": 327, "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 11, "column": 28 }, "identifierName": "Angular" }, "name": "Angular" }, "superClass": { "type": "Identifier", "start": 336, "end": 348, "loc": { "start": { "line": 11, "column": 37 }, "end": { "line": 11, "column": 49 }, "identifierName": "BaseGraphics" }, "name": "BaseGraphics" }, "body": { "type": "ClassBody", "start": 349, "end": 2295, "loc": { "start": { "line": 11, "column": 50 }, "end": { "line": 46, "column": 1 } }, "body": [ { "type": "ClassMethod", "start": 355, "end": 415, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 14, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 355, "end": 366, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 15 }, "identifierName": "constructor" }, "name": "constructor" }, "static": false, "kind": "constructor", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "RestElement", "start": 367, "end": 374, "loc": { "start": { "line": 12, "column": 16 }, "end": { "line": 12, "column": 23 } }, "argument": { "type": "Identifier", "start": 370, "end": 374, "loc": { "start": { "line": 12, "column": 19 }, "end": { "line": 12, "column": 23 }, "identifierName": "args" }, "name": "args" } } ], "body": { "type": "BlockStatement", "start": 376, "end": 415, "loc": { "start": { "line": 12, "column": 25 }, "end": { "line": 14, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 386, "end": 409, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 31 } }, "expression": { "type": "CallExpression", "start": 386, "end": 409, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 31 } }, "callee": { "type": "Super", "start": 386, "end": 391, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 13 } } }, "arguments": [ { "type": "SpreadElement", "start": 392, "end": 399, "loc": { "start": { "line": 13, "column": 14 }, "end": { "line": 13, "column": 21 } }, "argument": { "type": "Identifier", "start": 395, "end": 399, "loc": { "start": { "line": 13, "column": 17 }, "end": { "line": 13, "column": 21 }, "identifierName": "args" }, "name": "args" } }, { "type": "NumericLiteral", "start": 401, "end": 402, "loc": { "start": { "line": 13, "column": 23 }, "end": { "line": 13, "column": 24 } }, "extra": { "rawValue": 2, "raw": "2" }, "value": 2 }, { "type": "NumericLiteral", "start": 404, "end": 405, "loc": { "start": { "line": 13, "column": 26 }, "end": { "line": 13, "column": 27 } }, "extra": { "rawValue": 2, "raw": "2" }, "value": 2 }, { "type": "NumericLiteral", "start": 407, "end": 408, "loc": { "start": { "line": 13, "column": 29 }, "end": { "line": 13, "column": 30 } }, "extra": { "rawValue": 2, "raw": "2" }, "value": 2 } ] } } ], "directives": [] } }, { "type": "ClassMethod", "start": 421, "end": 2293, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 45, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 421, "end": 436, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 19 }, "identifierName": "updateFromState" }, "name": "updateFromState" }, "static": false, "kind": "method", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 437, "end": 441, "loc": { "start": { "line": 16, "column": 20 }, "end": { "line": 16, "column": 24 }, "identifierName": "info" }, "name": "info" }, { "type": "RestElement", "start": 443, "end": 450, "loc": { "start": { "line": 16, "column": 26 }, "end": { "line": 16, "column": 33 } }, "argument": { "type": "Identifier", "start": 446, "end": 450, "loc": { "start": { "line": 16, "column": 29 }, "end": { "line": 16, "column": 33 }, "identifierName": "args" }, "name": "args" } } ], "body": { "type": "BlockStatement", "start": 452, "end": 2293, "loc": { "start": { "line": 16, "column": 35 }, "end": { "line": 45, "column": 5 } }, "body": [ { "type": "VariableDeclaration", "start": 531, "end": 699, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 20, "column": 9 } }, "declarations": [ { "type": "VariableDeclarator", "start": 535, "end": 699, "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 20, "column": 9 } }, "id": { "type": "ArrayPattern", "start": 535, "end": 560, "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 37 } }, "elements": [ { "type": "Identifier", "start": 536, "end": 541, "loc": { "start": { "line": 18, "column": 13 }, "end": { "line": 18, "column": 18