UNPKG

awv3

Version:
1,291 lines (1,290 loc) 344 kB
{ "type": "File", "start": 0, "end": 1212, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 30, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 1212, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 30, "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": "ExportDefaultDeclaration", "start": 66, "end": 1211, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 29, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 81, "end": 1211, "loc": { "start": { "line": 4, "column": 15 }, "end": { "line": 29, "column": 1 } }, "id": { "type": "Identifier", "start": 87, "end": 93, "loc": { "start": { "line": 4, "column": 21 }, "end": { "line": 4, "column": 27 }, "identifierName": "Linear" }, "name": "Linear" }, "superClass": { "type": "Identifier", "start": 102, "end": 114, "loc": { "start": { "line": 4, "column": 36 }, "end": { "line": 4, "column": 48 }, "identifierName": "BaseGraphics" }, "name": "BaseGraphics" }, "body": { "type": "ClassBody", "start": 115, "end": 1211, "loc": { "start": { "line": 4, "column": 49 }, "end": { "line": 29, "column": 1 } }, "body": [ { "type": "ClassMethod", "start": 121, "end": 181, "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 7, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 121, "end": 132, "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": 133, "end": 140, "loc": { "start": { "line": 5, "column": 16 }, "end": { "line": 5, "column": 23 } }, "argument": { "type": "Identifier", "start": 136, "end": 140, "loc": { "start": { "line": 5, "column": 19 }, "end": { "line": 5, "column": 23 }, "identifierName": "args" }, "name": "args" } } ], "body": { "type": "BlockStatement", "start": 142, "end": 181, "loc": { "start": { "line": 5, "column": 25 }, "end": { "line": 7, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 152, "end": 175, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 31 } }, "expression": { "type": "CallExpression", "start": 152, "end": 175, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 31 } }, "callee": { "type": "Super", "start": 152, "end": 157, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 13 } } }, "arguments": [ { "type": "SpreadElement", "start": 158, "end": 165, "loc": { "start": { "line": 6, "column": 14 }, "end": { "line": 6, "column": 21 } }, "argument": { "type": "Identifier", "start": 161, "end": 165, "loc": { "start": { "line": 6, "column": 17 }, "end": { "line": 6, "column": 21 }, "identifierName": "args" }, "name": "args" } }, { "type": "NumericLiteral", "start": 167, "end": 168, "loc": { "start": { "line": 6, "column": 23 }, "end": { "line": 6, "column": 24 } }, "extra": { "rawValue": 4, "raw": "4" }, "value": 4 }, { "type": "NumericLiteral", "start": 170, "end": 171, "loc": { "start": { "line": 6, "column": 26 }, "end": { "line": 6, "column": 27 } }, "extra": { "rawValue": 0, "raw": "0" }, "value": 0 }, { "type": "NumericLiteral", "start": 173, "end": 174, "loc": { "start": { "line": 6, "column": 29 }, "end": { "line": 6, "column": 30 } }, "extra": { "rawValue": 2, "raw": "2" }, "value": 2 } ] } } ], "directives": [] } }, { "type": "ClassMethod", "start": 187, "end": 1209, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 28, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 187, "end": 202, "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": 203, "end": 207, "loc": { "start": { "line": 9, "column": 20 }, "end": { "line": 9, "column": 24 }, "identifierName": "info" }, "name": "info" }, { "type": "RestElement", "start": 209, "end": 216, "loc": { "start": { "line": 9, "column": 26 }, "end": { "line": 9, "column": 33 } }, "argument": { "type": "Identifier", "start": 212, "end": 216, "loc": { "start": { "line": 9, "column": 29 }, "end": { "line": 9, "column": 33 }, "identifierName": "args" }, "name": "args" } } ], "body": { "type": "BlockStatement", "start": 218, "end": 1209, "loc": { "start": { "line": 9, "column": 35 }, "end": { "line": 28, "column": 5 } }, "body": [ { "type": "VariableDeclaration", "start": 228, "end": 378, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 12, "column": 9 } }, "declarations": [ { "type": "VariableDeclarator", "start": 234, "end": 378, "loc": { "start": { "line": 10, "column": 14 }, "end": { "line": 12, "column": 9 } }, "id": { "type": "ArrayPattern", "start": 234, "end": 251, "loc": { "start": { "line": 10, "column": 14 }, "end": { "line": 10, "column": 31 } }, "elements": [ { "type": "Identifier", "start": 235, "end": 240, "loc": { "start": { "line": 10, "column": 15 }, "end": { "line": 10, "column": 20 }, "identifierName": "start" }, "name": "start" }, { "type": "Identifier", "start": 242, "end": 245, "loc": { "start": { "line": 10, "column": 22 }, "end": { "line": 10, "column": 25 }, "identifierName": "end" }, "name": "end" }, { "type": "Identifier", "start": 247, "end": 250, "loc": { "start": { "line": 10, "column": 27 }, "end": { "line": 10, "column": 30 }, "identifierName": "dim" }, "name": "dim" } ] }, "init": { "type": "CallExpression", "start": 254, "end": 378, "loc": { "start": { "line": 10, "column": 34 }, "end": { "line": 12, "column": 9 } }, "callee": { "type": "MemberExpression", "start": 254, "end": 287, "loc": { "start": { "line": 10, "column": 34 }, "end": { "line": 10, "column": 67 } }, "object": { "type": "ArrayExpression", "start": 254, "end": 283, "loc": { "start": { "line": 10, "column": 34 }, "end": { "line": 10, "column": 63 } }, "elements": [ { "type": "StringLiteral", "start": 255, "end": 264, "loc": { "start": { "line": 10, "column": 35 }, "end": { "line": 10, "column": 44 } }, "extra": { "rawValue": "startPt", "raw": "'startPt'" }, "value": "startPt" }, { "type": "StringLiteral", "start": 266, "end": 273, "loc": { "start": { "line": 10, "column": 46 }, "end": { "line": 10, "column": 53 } }, "extra": { "rawValue": "endPt", "raw": "'endPt'" }, "value": "endPt" }, { "type": "StringLiteral", "start": 275, "end": 282, "loc": { "start": { "line": 10, "column": 55 }, "end": { "line": 10, "column": 62 } }, "extra": { "rawValue": "dimPt", "raw": "'dimPt'" }, "value": "dimPt" } ] }, "property": { "type": "Identifier", "start": 284, "end": 287, "loc": { "start": { "line": 10, "column": 64 }, "end": { "line": 10, "column": 67 }, "identifierName": "map" }, "name": "map" }, "computed": false }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 288, "end": 367, "loc": { "start": { "line": 10, "column": 68 }, "end": { "line": 11, "column": 74 } }, "id": null, "generator": false, "expression": true, "async": false, "params": [ { "type": "Identifier", "start": 288, "end": 289, "loc": { "start": { "line": 10, "column": 68 }, "end": { "line": 10, "column": 69 }, "identifierName": "x" }, "name": "x" } ], "body": { "type": "CallExpression", "start": 305, "end": 367, "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 74 } }, "callee": { "type": "MemberExpression", "start": 305, "end": 334, "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 41 } }, "object": { "type": "NewExpression", "start": 305, "end": 324, "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 31 } }, "callee": { "type": "MemberExpression", "start": 309, "end": 322, "loc": { "start": { "line": 11, "column": 16 }, "end": { "line": 11, "column": 29 } }, "object": { "type": "Identifier", "start": 309, "end": 314, "loc": { "start": { "line": 11, "column": 16 }, "end": { "line": 11, "column": 21 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 315, "end": 322, "loc": { "start": { "line": 11, "column": 22 }, "end": { "line": 11, "column": 29 }, "identifierName": "Vector3" }, "name": "Vector3" }, "computed": false }, "arguments": [] }, "property": { "type": "Identifier", "start": 325, "end": 334, "loc": { "start": { "line": 11, "column": 32 }, "end": { "line": 11, "column": 41 }, "identifierName": "fromArray" }, "name": "fromArray" }, "computed": false }, "arguments": [ { "type": "MemberExpression", "start": 335, "end": 366, "loc": { "start": { "line": 11, "column": 42 }, "end": { "line": 11, "column": 73 } }, "object": { "type": "MemberExpression", "start": 335, "end": 360, "loc": { "start": { "line": 11, "column": 42 }, "end": { "line": 11, "column": 67 } }, "object": { "type": "MemberExpression", "start": 335, "end": 357, "loc": { "start": { "line": 11, "column": 42 }, "end": { "line": 11, "column": 64 } }, "object": { "type": "MemberExpression", "start": 335, "end": 349, "loc": { "start": { "line": 11, "column": 42 }, "end": { "line": 11, "column": 56 } }, "object": { "type": "Identifier", "start": 335, "end": 339, "loc": { "start": { "line": 11, "column": 42 }, "end": { "line": 11, "column": 46 }, "identifierName": "info" }, "name": "info" }, "property": { "type": "Identifier", "start": 340, "end": 349, "loc": { "start": { "line": 11, "column": 47 }, "end": { "line": 11, "column": 56 }, "identifierName": "dimension" }, "name": "dimension" }, "computed": false }, "property": { "type": "Identifier", "start": 350, "end": 357, "loc": { "start": { "line": 11, "column": 57 }, "end": { "line": 11, "column": 64 }, "identifierName": "members" }, "name": "members" }, "computed": false }, "property": { "type": "Identifier", "start": 358, "end": 359, "loc": { "start": { "line": 11, "column": 65 }, "end": { "line": 11, "column": 66 }, "identifierName": "x" }, "name": "x" }, "computed": true }, "property": { "type": "Identifier", "start": 361, "end": 366, "loc": { "start": { "line": 11, "column": 68 }, "end": { "line": 11, "column": 73 }, "identifierName": "value" }, "name": "value" }, "computed": false } ] } } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 387, "end": 556, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 17, "column": 9 } }, "declarations": [ { "type": "VariableDeclarator", "start": 391, "end": 556, "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 17, "column": 9 } }, "id": { "type": "Identifier", "start": 391, "end": 394, "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 15 }, "identifierName": "dir" }, "name": "dir" }, "init": { "type": "NewExpression", "start": 397, "end": 556, "loc": { "start": { "line": 13, "column": 18 }, "end": { "line": 17, "column": 9 } }, "callee": { "type": "MemberExpression", "start": 401, "end": 414, "loc": { "start": { "line": 13, "column": 22 }, "end": { "line": 13, "column": 35 } }, "object": { "type": "Identifier", "start": 401, "end": 406, "loc": { "start": { "line": 13, "column": 22 }, "end": { "line": 13, "column": 27 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 407, "end": 414, "loc": { "start": { "line": 13, "column": 28 }, "end": { "line": 13, "column": 35 }, "identifierName": "Vector3" }, "name": "Vector3" }, "computed": false }, "arguments": [ { "type": "CallExpression", "start": 428, "end": 472, "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 56 } }, "callee": { "type": "MemberExpression", "start": 428, "end": 436, "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 20 } }, "object": { "type": "Identifier", "start": 428, "end": 432, "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 16 }, "identifierName": "Math" }, "name": "Math" }, "property": { "type": "Identifier", "start": 433, "end": 436, "loc": { "start": { "line": 14, "column": 17 }, "end": { "line": 14, "column": 20 }, "identifierName": "cos" }, "name": "cos" }, "computed": false }, "arguments": [ { "type": "MemberExpression", "start": 437, "end": 471,