UNPKG

awv3

Version:
1,310 lines (1,309 loc) 153 kB
{ "type": "File", "start": 0, "end": 597, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 18, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 597, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 18, "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": 596, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 17, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 83, "end": 596, "loc": { "start": { "line": 4, "column": 15 }, "end": { "line": 17, "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": 596, "loc": { "start": { "line": 4, "column": 49 }, "end": { "line": 17, "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": 1, "raw": "1" }, "value": 1 }, { "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": 594, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 16, "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": "Identifier", "start": 213, "end": 217, "loc": { "start": { "line": 9, "column": 27 }, "end": { "line": 9, "column": 31 }, "identifierName": "tree" }, "name": "tree" } ], "body": { "type": "BlockStatement", "start": 219, "end": 594, "loc": { "start": { "line": 9, "column": 33 }, "end": { "line": 16, "column": 5 } }, "body": [ { "type": "VariableDeclaration", "start": 229, "end": 335, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 114 } }, "declarations": [ { "type": "VariableDeclarator", "start": 235, "end": 334, "loc": { "start": { "line": 10, "column": 14 }, "end": { "line": 10, "column": 113 } }, "id": { "type": "ArrayPattern", "start": 235, "end": 248, "loc": { "start": { "line": 10, "column": 14 }, "end": { "line": 10, "column": 27 } }, "elements": [ { "type": "Identifier", "start": 236, "end": 242, "loc": { "start": { "line": 10, "column": 15 }, "end": { "line": 10, "column": 21 }, "identifierName": "center" }, "name": "center" }, { "type": "Identifier", "start": 244, "end": 247, "loc": { "start": { "line": 10, "column": 23 }, "end": { "line": 10, "column": 26 }, "identifierName": "dim" }, "name": "dim" } ] }, "init": { "type": "CallExpression", "start": 251, "end": 334, "loc": { "start": { "line": 10, "column": 30 }, "end": { "line": 10, "column": 113 } }, "callee": { "type": "MemberExpression", "start": 251, "end": 274, "loc": { "start": { "line": 10, "column": 30 }, "end": { "line": 10, "column": 53 } }, "object": { "type": "ArrayExpression", "start": 251, "end": 270, "loc": { "start": { "line": 10, "column": 30 }, "end": { "line": 10, "column": 49 } }, "elements": [ { "type": "StringLiteral", "start": 252, "end": 260, "loc": { "start": { "line": 10, "column": 31 }, "end": { "line": 10, "column": 39 } }, "extra": { "rawValue": "center", "raw": "'center'" }, "value": "center" }, { "type": "StringLiteral", "start": 262, "end": 269, "loc": { "start": { "line": 10, "column": 41 }, "end": { "line": 10, "column": 48 } }, "extra": { "rawValue": "dimPt", "raw": "'dimPt'" }, "value": "dimPt" } ] }, "property": { "type": "Identifier", "start": 271, "end": 274, "loc": { "start": { "line": 10, "column": 50 }, "end": { "line": 10, "column": 53 }, "identifierName": "map" }, "name": "map" }, "computed": false }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 275, "end": 333, "loc": { "start": { "line": 10, "column": 54 }, "end": { "line": 10, "column": 112 } }, "id": null, "generator": false, "expression": true, "async": false, "params": [ { "type": "Identifier", "start": 275, "end": 276, "loc": { "start": { "line": 10, "column": 54 }, "end": { "line": 10, "column": 55 }, "identifierName": "x" }, "name": "x" } ], "body": { "type": "CallExpression", "start": 280, "end": 333, "loc": { "start": { "line": 10, "column": 59 }, "end": { "line": 10, "column": 112 } }, "callee": { "type": "MemberExpression", "start": 280, "end": 309, "loc": { "start": { "line": 10, "column": 59 }, "end": { "line": 10, "column": 88 } }, "object": { "type": "NewExpression", "start": 280, "end": 299, "loc": { "start": { "line": 10, "column": 59 }, "end": { "line": 10, "column": 78 } }, "callee": { "type": "MemberExpression", "start": 284, "end": 297, "loc": { "start": { "line": 10, "column": 63 }, "end": { "line": 10, "column": 76 } }, "object": { "type": "Identifier", "start": 284, "end": 289, "loc": { "start": { "line": 10, "column": 63 }, "end": { "line": 10, "column": 68 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 290, "end": 297, "loc": { "start": { "line": 10, "column": 69 }, "end": { "line": 10, "column": 76 }, "identifierName": "Vector3" }, "name": "Vector3" }, "computed": false }, "arguments": [] }, "property": { "type": "Identifier", "start": 300, "end": 309, "loc": { "start": { "line": 10, "column": 79 }, "end": { "line": 10, "column": 88 }, "identifierName": "fromArray" }, "name": "fromArray" }, "computed": false }, "arguments": [ { "type": "MemberExpression", "start": 310, "end": 332, "loc": { "start": { "line": 10, "column": 89 }, "end": { "line": 10, "column": 111 } }, "object": { "type": "MemberExpression", "start": 310, "end": 326, "loc": { "start": { "line": 10, "column": 89 }, "end": { "line": 10, "column": 105 } }, "object": { "type": "MemberExpression", "start": 310, "end": 323, "loc": { "start": { "line": 10, "column": 89 }, "end": { "line": 10, "column": 102 } }, "object": { "type": "Identifier", "start": 310, "end": 315, "loc": { "start": { "line": 10, "column": 89 }, "end": { "line": 10, "column": 94 }, "identifierName": "state" }, "name": "state" }, "property": { "type": "Identifier", "start": 316, "end": 323, "loc": { "start": { "line": 10, "column": 95 }, "end": { "line": 10, "column": 102 }, "identifierName": "members" }, "name": "members" }, "computed": false }, "property": { "type": "Identifier", "start": 324, "end": 325, "loc": { "start": { "line": 10, "column": 103 }, "end": { "line": 10, "column": 104 }, "identifierName": "x" }, "name": "x" }, "computed": true }, "property": { "type": "Identifier", "start": 327, "end": 332, "loc": { "start": { "line": 10, "column": 106 }, "end": { "line": 10, "column": 111 }, "identifierName": "value" }, "name": "value" }, "computed": false } ] } } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 344, "end": 386, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 50 } }, "declarations": [ { "type": "VariableDeclarator", "start": 350, "end": 385, "loc": { "start": { "line": 11, "column": 14 }, "end": { "line": 11, "column": 49 } }, "id": { "type": "Identifier", "start": 350, "end": 356, "loc": { "start": { "line": 11, "column": 14 }, "end": { "line": 11, "column": 20 }, "identifierName": "radius" }, "name": "radius" }, "init": { "type": "MemberExpression", "start": 359, "end": 385, "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 49 } }, "object": { "type": "MemberExpression", "start": 359, "end": 379, "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 43 } }, "object": { "type": "MemberExpression", "start": 359, "end": 372, "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 36 } }, "object": { "type": "Identifier", "start": 359, "end": 364, "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 28 }, "identifierName": "state" }, "name": "state" }, "property": { "type": "Identifier", "start": 365, "end": 372, "loc": { "start": { "line": 11, "column": 29 }, "end": { "line": 11, "column": 36 }, "identifierName": "members" }, "name": "members" }, "computed": false }, "property": { "type": "Identifier", "start": 373, "end": 379, "loc": { "start": { "line": 11, "column": 37 }, "end": { "line": 11, "column": 43 }, "identifierName": "radius" }, "name": "radius" }, "computed": false }, "property": { "type": "Identifier", "start": 380, "end": 385, "loc": { "start": { "line": 11, "column": 44 }, "end": { "line": 11, "column": 49 }, "identifierName": "value" }, "name": "value" }, "computed": false } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 395, "end": 461, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 74 } }, "declarations": [ { "type": "VariableDeclarator", "start": 401, "end": 460, "loc": { "start": { "line": 12, "column": 14 }, "end": { "line": 12, "column": 73 } }, "id": { "type": "Identifier", "start": 401, "end": 404, "loc": { "start": { "line": 12, "column": 14 }, "end": { "line": 12, "column": 17 }, "identifierName": "end" }, "name": "end" }, "init": { "type": "CallExpression", "start": 407, "end": 460, "loc": { "start": { "line": 12, "column": 20 }, "end": { "line": 12, "column": 73 } }, "callee": { "type": "MemberExpression", "start": 407, "end": 452, "loc": { "start": { "line": 12, "column": 20 }, "end": { "line": 12, "column": 65 } }, "object": { "type": "CallExpression", "start": 407, "end": 448, "loc": { "start": { "line": 12, "column": 20 }, "end": { "line": 12, "column": 61 } }, "callee": { "type": "MemberExpression", "start": 407, "end": 440, "loc": { "start": { "line": 12, "column": 20 }, "end": { "line": 12, "column": 53 } }, "object": { "type": "CallExpression", "start": 407, "end": 430, "loc": { "start": { "line": 12, "column": 20 }, "end": { "line": 12, "column": 43 } }, "callee": { "type": "MemberExpression",