UNPKG

awv3

Version:
1,298 lines (1,297 loc) 282 kB
{ "type": "File", "start": 0, "end": 989, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 23, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 989, "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": 988, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 22, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 83, "end": 988, "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": 988, "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": 986, "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": 213, "loc": { "start": { "line": 9, "column": 20 }, "end": { "line": 9, "column": 24 }, "identifierName": "info" }, "name": "info" }, { "type": "RestElement", "start": 215, "end": 222, "loc": { "start": { "line": 9, "column": 26 }, "end": { "line": 9, "column": 33 } }, "argument": { "type": "Identifier", "start": 218, "end": 222, "loc": { "start": { "line": 9, "column": 29 }, "end": { "line": 9, "column": 33 }, "identifierName": "args" }, "name": "args" } } ], "body": { "type": "BlockStatement", "start": 224, "end": 986, "loc": { "start": { "line": 9, "column": 35 }, "end": { "line": 21, "column": 5 } }, "body": [ { "type": "VariableDeclaration", "start": 234, "end": 349, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 123 } }, "declarations": [ { "type": "VariableDeclarator", "start": 240, "end": 348, "loc": { "start": { "line": 10, "column": 14 }, "end": { "line": 10, "column": 122 } }, "id": { "type": "ArrayPattern", "start": 240, "end": 253, "loc": { "start": { "line": 10, "column": 14 }, "end": { "line": 10, "column": 27 } }, "elements": [ { "type": "Identifier", "start": 241, "end": 247, "loc": { "start": { "line": 10, "column": 15 }, "end": { "line": 10, "column": 21 }, "identifierName": "center" }, "name": "center" }, { "type": "Identifier", "start": 249, "end": 252, "loc": { "start": { "line": 10, "column": 23 }, "end": { "line": 10, "column": 26 }, "identifierName": "dim" }, "name": "dim" } ] }, "init": { "type": "CallExpression", "start": 256, "end": 348, "loc": { "start": { "line": 10, "column": 30 }, "end": { "line": 10, "column": 122 } }, "callee": { "type": "MemberExpression", "start": 256, "end": 279, "loc": { "start": { "line": 10, "column": 30 }, "end": { "line": 10, "column": 53 } }, "object": { "type": "ArrayExpression", "start": 256, "end": 275, "loc": { "start": { "line": 10, "column": 30 }, "end": { "line": 10, "column": 49 } }, "elements": [ { "type": "StringLiteral", "start": 257, "end": 265, "loc": { "start": { "line": 10, "column": 31 }, "end": { "line": 10, "column": 39 } }, "extra": { "rawValue": "center", "raw": "'center'" }, "value": "center" }, { "type": "StringLiteral", "start": 267, "end": 274, "loc": { "start": { "line": 10, "column": 41 }, "end": { "line": 10, "column": 48 } }, "extra": { "rawValue": "dimPt", "raw": "'dimPt'" }, "value": "dimPt" } ] }, "property": { "type": "Identifier", "start": 276, "end": 279, "loc": { "start": { "line": 10, "column": 50 }, "end": { "line": 10, "column": 53 }, "identifierName": "map" }, "name": "map" }, "computed": false }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 280, "end": 347, "loc": { "start": { "line": 10, "column": 54 }, "end": { "line": 10, "column": 121 } }, "id": null, "generator": false, "expression": true, "async": false, "params": [ { "type": "Identifier", "start": 280, "end": 281, "loc": { "start": { "line": 10, "column": 54 }, "end": { "line": 10, "column": 55 }, "identifierName": "x" }, "name": "x" } ], "body": { "type": "CallExpression", "start": 285, "end": 347, "loc": { "start": { "line": 10, "column": 59 }, "end": { "line": 10, "column": 121 } }, "callee": { "type": "MemberExpression", "start": 285, "end": 314, "loc": { "start": { "line": 10, "column": 59 }, "end": { "line": 10, "column": 88 } }, "object": { "type": "NewExpression", "start": 285, "end": 304, "loc": { "start": { "line": 10, "column": 59 }, "end": { "line": 10, "column": 78 } }, "callee": { "type": "MemberExpression", "start": 289, "end": 302, "loc": { "start": { "line": 10, "column": 63 }, "end": { "line": 10, "column": 76 } }, "object": { "type": "Identifier", "start": 289, "end": 294, "loc": { "start": { "line": 10, "column": 63 }, "end": { "line": 10, "column": 68 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 295, "end": 302, "loc": { "start": { "line": 10, "column": 69 }, "end": { "line": 10, "column": 76 }, "identifierName": "Vector3" }, "name": "Vector3" }, "computed": false }, "arguments": [] }, "property": { "type": "Identifier", "start": 305, "end": 314, "loc": { "start": { "line": 10, "column": 79 }, "end": { "line": 10, "column": 88 }, "identifierName": "fromArray" }, "name": "fromArray" }, "computed": false }, "arguments": [ { "type": "MemberExpression", "start": 315, "end": 346, "loc": { "start": { "line": 10, "column": 89 }, "end": { "line": 10, "column": 120 } }, "object": { "type": "MemberExpression", "start": 315, "end": 340, "loc": { "start": { "line": 10, "column": 89 }, "end": { "line": 10, "column": 114 } }, "object": { "type": "MemberExpression", "start": 315, "end": 337, "loc": { "start": { "line": 10, "column": 89 }, "end": { "line": 10, "column": 111 } }, "object": { "type": "MemberExpression", "start": 315, "end": 329, "loc": { "start": { "line": 10, "column": 89 }, "end": { "line": 10, "column": 103 } }, "object": { "type": "Identifier", "start": 315, "end": 319, "loc": { "start": { "line": 10, "column": 89 }, "end": { "line": 10, "column": 93 }, "identifierName": "info" }, "name": "info" }, "property": { "type": "Identifier", "start": 320, "end": 329, "loc": { "start": { "line": 10, "column": 94 }, "end": { "line": 10, "column": 103 }, "identifierName": "dimension" }, "name": "dimension" }, "computed": false }, "property": { "type": "Identifier", "start": 330, "end": 337, "loc": { "start": { "line": 10, "column": 104 }, "end": { "line": 10, "column": 111 }, "identifierName": "members" }, "name": "members" }, "computed": false }, "property": { "type": "Identifier", "start": 338, "end": 339, "loc": { "start": { "line": 10, "column": 112 }, "end": { "line": 10, "column": 113 }, "identifierName": "x" }, "name": "x" }, "computed": true }, "property": { "type": "Identifier", "start": 341, "end": 346, "loc": { "start": { "line": 10, "column": 115 }, "end": { "line": 10, "column": 120 }, "identifierName": "value" }, "name": "value" }, "computed": false } ] } } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 358, "end": 409, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 59 } }, "declarations": [ { "type": "VariableDeclarator", "start": 364, "end": 408, "loc": { "start": { "line": 11, "column": 14 }, "end": { "line": 11, "column": 58 } }, "id": { "type": "Identifier", "start": 364, "end": 370, "loc": { "start": { "line": 11, "column": 14 }, "end": { "line": 11, "column": 20 }, "identifierName": "radius" }, "name": "radius" }, "init": { "type": "MemberExpression", "start": 373, "end": 408, "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 58 } }, "object": { "type": "MemberExpression", "start": 373, "end": 402, "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 52 } }, "object": { "type": "MemberExpression", "start": 373, "end": 395, "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 45 } }, "object": { "type": "MemberExpression", "start": 373, "end": 387, "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 37 } }, "object": { "type": "Identifier", "start": 373, "end": 377, "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 27 }, "identifierName": "info" }, "name": "info" }, "property": { "type": "Identifier", "start": 378, "end": 387, "loc": { "start": { "line": 11, "column": 28 }, "end": { "line": 11, "column": 37 }, "identifierName": "dimension" }, "name": "dimension" }, "computed": false }, "property": { "type": "Identifier", "start": 388, "end": 395, "loc": { "start": { "line": 11, "column": 38 }, "end": { "line": 11, "column": 45 }, "identifierName": "members" }, "name": "members" }, "computed": false }, "property": { "type": "Identifier", "start": 396, "end": 402, "loc": { "start": { "line": 11, "column": 46 }, "end": { "line": 11, "column": 52 }, "identifierName": "radius" }, "name": "radius" }, "computed": false }, "property": { "type": "Identifier", "start": 403, "end": 408, "loc": { "start": { "line": 11, "column": 53 }, "end": { "line": 11, "column": 58 }, "identifierName": "value" }, "name": "value" }, "computed": false } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 418, "end": 487, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 77 } }, "declarations": [ { "type": "VariableDeclarator", "start": 424, "end": 486, "loc": { "start": { "line": 12, "column": 14 }, "end": {