UNPKG

awv3

Version:
1,314 lines 276 kB
{ "type": "File", "start": 0, "end": 973, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 23, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 973, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 23, "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": 972, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 22, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 83, "end": 972, "loc": { "start": { "line": 4, "column": 15 }, "end": { "line": 22, "column": 1 } }, "id": { "type": "Identifier", "start": 89, "end": 98, "loc": { "start": { "line": 4, "column": 21 }, "end": { "line": 4, "column": 30 }, "identifierName": "Diametral" }, "name": "Diametral" }, "superClass": { "type": "Identifier", "start": 107, "end": 119, "loc": { "start": { "line": 4, "column": 39 }, "end": { "line": 4, "column": 51 }, "identifierName": "BaseGraphics" }, "name": "BaseGraphics" }, "body": { "type": "ClassBody", "start": 120, "end": 972, "loc": { "start": { "line": 4, "column": 52 }, "end": { "line": 22, "column": 1 } }, "body": [ { "type": "ClassMethod", "start": 126, "end": 187, "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 7, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 126, "end": 137, "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": 138, "end": 145, "loc": { "start": { "line": 5, "column": 16 }, "end": { "line": 5, "column": 23 } }, "argument": { "type": "Identifier", "start": 141, "end": 145, "loc": { "start": { "line": 5, "column": 19 }, "end": { "line": 5, "column": 23 }, "identifierName": "args" }, "name": "args" } } ], "body": { "type": "BlockStatement", "start": 147, "end": 187, "loc": { "start": { "line": 5, "column": 25 }, "end": { "line": 7, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 157, "end": 181, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 32 } }, "expression": { "type": "CallExpression", "start": 157, "end": 180, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 31 } }, "callee": { "type": "Super", "start": 157, "end": 162, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 13 } } }, "arguments": [ { "type": "SpreadElement", "start": 163, "end": 170, "loc": { "start": { "line": 6, "column": 14 }, "end": { "line": 6, "column": 21 } }, "argument": { "type": "Identifier", "start": 166, "end": 170, "loc": { "start": { "line": 6, "column": 17 }, "end": { "line": 6, "column": 21 }, "identifierName": "args" }, "name": "args" } }, { "type": "NumericLiteral", "start": 172, "end": 173, "loc": { "start": { "line": 6, "column": 23 }, "end": { "line": 6, "column": 24 } }, "extra": { "rawValue": 2, "raw": "2" }, "value": 2 }, { "type": "NumericLiteral", "start": 175, "end": 176, "loc": { "start": { "line": 6, "column": 26 }, "end": { "line": 6, "column": 27 } }, "extra": { "rawValue": 0, "raw": "0" }, "value": 0 }, { "type": "NumericLiteral", "start": 178, "end": 179, "loc": { "start": { "line": 6, "column": 29 }, "end": { "line": 6, "column": 30 } }, "extra": { "rawValue": 2, "raw": "2" }, "value": 2 } ] } } ], "directives": [] } }, { "type": "ClassMethod", "start": 193, "end": 970, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 21, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 193, "end": 208, "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": 209, "end": 214, "loc": { "start": { "line": 9, "column": 20 }, "end": { "line": 9, "column": 25 }, "identifierName": "state" }, "name": "state" }, { "type": "RestElement", "start": 216, "end": 223, "loc": { "start": { "line": 9, "column": 27 }, "end": { "line": 9, "column": 34 } }, "argument": { "type": "Identifier", "start": 219, "end": 223, "loc": { "start": { "line": 9, "column": 30 }, "end": { "line": 9, "column": 34 }, "identifierName": "args" }, "name": "args" } } ], "body": { "type": "BlockStatement", "start": 225, "end": 970, "loc": { "start": { "line": 9, "column": 36 }, "end": { "line": 21, "column": 5 } }, "body": [ { "type": "VariableDeclaration", "start": 235, "end": 341, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 114 } }, "declarations": [ { "type": "VariableDeclarator", "start": 241, "end": 340, "loc": { "start": { "line": 10, "column": 14 }, "end": { "line": 10, "column": 113 } }, "id": { "type": "ArrayPattern", "start": 241, "end": 254, "loc": { "start": { "line": 10, "column": 14 }, "end": { "line": 10, "column": 27 } }, "elements": [ { "type": "Identifier", "start": 242, "end": 248, "loc": { "start": { "line": 10, "column": 15 }, "end": { "line": 10, "column": 21 }, "identifierName": "center" }, "name": "center" }, { "type": "Identifier", "start": 250, "end": 253, "loc": { "start": { "line": 10, "column": 23 }, "end": { "line": 10, "column": 26 }, "identifierName": "dim" }, "name": "dim" } ] }, "init": { "type": "CallExpression", "start": 257, "end": 340, "loc": { "start": { "line": 10, "column": 30 }, "end": { "line": 10, "column": 113 } }, "callee": { "type": "MemberExpression", "start": 257, "end": 280, "loc": { "start": { "line": 10, "column": 30 }, "end": { "line": 10, "column": 53 } }, "object": { "type": "ArrayExpression", "start": 257, "end": 276, "loc": { "start": { "line": 10, "column": 30 }, "end": { "line": 10, "column": 49 } }, "elements": [ { "type": "StringLiteral", "start": 258, "end": 266, "loc": { "start": { "line": 10, "column": 31 }, "end": { "line": 10, "column": 39 } }, "extra": { "rawValue": "center", "raw": "'center'" }, "value": "center" }, { "type": "StringLiteral", "start": 268, "end": 275, "loc": { "start": { "line": 10, "column": 41 }, "end": { "line": 10, "column": 48 } }, "extra": { "rawValue": "dimPt", "raw": "'dimPt'" }, "value": "dimPt" } ] }, "property": { "type": "Identifier", "start": 277, "end": 280, "loc": { "start": { "line": 10, "column": 50 }, "end": { "line": 10, "column": 53 }, "identifierName": "map" }, "name": "map" }, "computed": false }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 281, "end": 339, "loc": { "start": { "line": 10, "column": 54 }, "end": { "line": 10, "column": 112 } }, "id": null, "generator": false, "expression": true, "async": false, "params": [ { "type": "Identifier", "start": 281, "end": 282, "loc": { "start": { "line": 10, "column": 54 }, "end": { "line": 10, "column": 55 }, "identifierName": "x" }, "name": "x" } ], "body": { "type": "CallExpression", "start": 286, "end": 339, "loc": { "start": { "line": 10, "column": 59 }, "end": { "line": 10, "column": 112 } }, "callee": { "type": "MemberExpression", "start": 286, "end": 315, "loc": { "start": { "line": 10, "column": 59 }, "end": { "line": 10, "column": 88 } }, "object": { "type": "NewExpression", "start": 286, "end": 305, "loc": { "start": { "line": 10, "column": 59 }, "end": { "line": 10, "column": 78 } }, "callee": { "type": "MemberExpression", "start": 290, "end": 303, "loc": { "start": { "line": 10, "column": 63 }, "end": { "line": 10, "column": 76 } }, "object": { "type": "Identifier", "start": 290, "end": 295, "loc": { "start": { "line": 10, "column": 63 }, "end": { "line": 10, "column": 68 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 296, "end": 303, "loc": { "start": { "line": 10, "column": 69 }, "end": { "line": 10, "column": 76 }, "identifierName": "Vector3" }, "name": "Vector3" }, "computed": false }, "arguments": [] }, "property": { "type": "Identifier", "start": 306, "end": 315, "loc": { "start": { "line": 10, "column": 79 }, "end": { "line": 10, "column": 88 }, "identifierName": "fromArray" }, "name": "fromArray" }, "computed": false }, "arguments": [ { "type": "MemberExpression", "start": 316, "end": 338, "loc": { "start": { "line": 10, "column": 89 }, "end": { "line": 10, "column": 111 } }, "object": { "type": "MemberExpression", "start": 316, "end": 332, "loc": { "start": { "line": 10, "column": 89 }, "end": { "line": 10, "column": 105 } }, "object": { "type": "MemberExpression", "start": 316, "end": 329, "loc": { "start": { "line": 10, "column": 89 }, "end": { "line": 10, "column": 102 } }, "object": { "type": "Identifier", "start": 316, "end": 321, "loc": { "start": { "line": 10, "column": 89 }, "end": { "line": 10, "column": 94 }, "identifierName": "state" }, "name": "state" }, "property": { "type": "Identifier", "start": 322, "end": 329, "loc": { "start": { "line": 10, "column": 95 }, "end": { "line": 10, "column": 102 }, "identifierName": "members" }, "name": "members" }, "computed": false }, "property": { "type": "Identifier", "start": 330, "end": 331, "loc": { "start": { "line": 10, "column": 103 }, "end": { "line": 10, "column": 104 }, "identifierName": "x" }, "name": "x" }, "computed": true }, "property": { "type": "Identifier", "start": 333, "end": 338, "loc": { "start": { "line": 10, "column": 106 }, "end": { "line": 10, "column": 111 }, "identifierName": "value" }, "name": "value" }, "computed": false } ] } } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 350, "end": 392, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 50 } }, "declarations": [ { "type": "VariableDeclarator", "start": 356, "end": 391, "loc": { "start": { "line": 11, "column": 14 }, "end": { "line": 11, "column": 49 } }, "id": { "type": "Identifier", "start": 356, "end": 362, "loc": { "start": { "line": 11, "column": 14 }, "end": { "line": 11, "column": 20 }, "identifierName": "radius" }, "name": "radius" }, "init": { "type": "MemberExpression", "start": 365, "end": 391, "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 49 } }, "object": { "type": "MemberExpression", "start": 365, "end": 385, "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 43 } }, "object": { "type": "MemberExpression", "start": 365, "end": 378, "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 36 } }, "object": { "type": "Identifier", "start": 365, "end": 370, "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 28 }, "identifierName": "state" }, "name": "state" }, "property": { "type": "Identifier", "start": 371, "end": 378, "loc": { "start": { "line": 11, "column": 29 }, "end": { "line": 11, "column": 36 }, "identifierName": "members" }, "name": "members" }, "computed": false }, "property": { "type": "Identifier", "start": 379, "end": 385, "loc": { "start": { "line": 11, "column": 37 }, "end": { "line": 11, "column": 43 }, "identifierName": "radius" }, "name": "radius" }, "computed": false }, "property": { "type": "Identifier", "start": 386, "end": 391, "loc": { "start": { "line": 11, "column": 44 }, "end": { "line": 11, "column": 49 }, "identifierName": "value" }, "name": "value" }, "computed": false } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 401, "end": 470, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 77 } }, "declarations": [ { "type": "VariableDeclarator", "start": 407, "end": 469, "loc": { "start": { "line": 12, "column": 14 }, "end": { "line": 12, "column": 76 } }, "id": { "type": "Identifier", "start": 407, "end": 412, "loc": { "start": { "line": 12, "column": 14 }, "end": { "line": 12, "column": 19 }, "identifierName": "start" }, "name": "start" }, "init": { "type": "CallExpression", "start": 415, "end": 469, "loc": { "start": { "line": 12, "column": 22 }, "end": { "line": 12, "column": 76 } }, "callee": { "type": "MemberExpression", "start": 415, "end": 461, "loc": { "start": { "line": 12, "column": 22 }, "end": { "line": 12, "column": 68 } }, "object": { "type": "CallExpression", "start": 415, "end": 457, "loc": { "start": { "line": 12, "column": 22 }, "end": { "line": 12, "column": 64 } }, "callee": { "type": "MemberExpression", "start": 415, "end": 448, "loc": { "start": { "line": 12, "column": 22 }, "end": { "line": 12, "column": 55 } }, "object": { "type": "CallExpression", "start": 415, "end": 438, "loc": { "s