UNPKG

awv3

Version:
1,486 lines (1,485 loc) 331 kB
{ "type": "File", "start": 0, "end": 1422, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 47, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 1422, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 47, "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": 89, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 57 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 39, "end": 52, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 20 } }, "local": { "type": "Identifier", "start": 39, "end": 52, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 20 }, "identifierName": "InfinitePlane" }, "name": "InfinitePlane" } } ], "source": { "type": "StringLiteral", "start": 58, "end": 88, "loc": { "start": { "line": 2, "column": 26 }, "end": { "line": 2, "column": 56 } }, "extra": { "rawValue": "../../../three/infiniteplane", "raw": "'../../../three/infiniteplane'" }, "value": "../../../three/infiniteplane" } }, { "type": "ImportDeclaration", "start": 90, "end": 124, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 34 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 97, "end": 109, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 19 } }, "local": { "type": "Identifier", "start": 97, "end": 109, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 19 }, "identifierName": "BaseGraphics" }, "name": "BaseGraphics" } } ], "source": { "type": "StringLiteral", "start": 115, "end": 123, "loc": { "start": { "line": 3, "column": 25 }, "end": { "line": 3, "column": 33 } }, "extra": { "rawValue": "./base", "raw": "'./base'" }, "value": "./base" } }, { "type": "VariableDeclaration", "start": 126, "end": 149, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 23 } }, "declarations": [ { "type": "VariableDeclarator", "start": 132, "end": 148, "loc": { "start": { "line": 5, "column": 6 }, "end": { "line": 5, "column": 22 } }, "id": { "type": "Identifier", "start": 132, "end": 142, "loc": { "start": { "line": 5, "column": 6 }, "end": { "line": 5, "column": 16 }, "identifierName": "LinesCount" }, "name": "LinesCount" }, "init": { "type": "NumericLiteral", "start": 145, "end": 148, "loc": { "start": { "line": 5, "column": 19 }, "end": { "line": 5, "column": 22 } }, "extra": { "rawValue": 1000, "raw": "1e3" }, "value": 1000 } } ], "kind": "const" }, { "type": "ExportDefaultDeclaration", "start": 151, "end": 1421, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 46, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 166, "end": 1421, "loc": { "start": { "line": 7, "column": 15 }, "end": { "line": 46, "column": 1 } }, "id": { "type": "Identifier", "start": 172, "end": 178, "loc": { "start": { "line": 7, "column": 21 }, "end": { "line": 7, "column": 27 }, "identifierName": "Sketch" }, "name": "Sketch" }, "superClass": { "type": "Identifier", "start": 187, "end": 199, "loc": { "start": { "line": 7, "column": 36 }, "end": { "line": 7, "column": 48 }, "identifierName": "BaseGraphics" }, "name": "BaseGraphics" }, "body": { "type": "ClassBody", "start": 200, "end": 1421, "loc": { "start": { "line": 7, "column": 49 }, "end": { "line": 46, "column": 1 } }, "body": [ { "type": "ClassMethod", "start": 206, "end": 489, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 18, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 206, "end": 217, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 15 }, "identifierName": "constructor" }, "name": "constructor" }, "static": false, "kind": "constructor", "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 220, "end": 489, "loc": { "start": { "line": 8, "column": 18 }, "end": { "line": 18, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 230, "end": 238, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 16 } }, "expression": { "type": "CallExpression", "start": 230, "end": 237, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 15 } }, "callee": { "type": "Super", "start": 230, "end": 235, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 13 } } }, "arguments": [] } }, { "type": "ExpressionStatement", "start": 247, "end": 271, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 32 } }, "expression": { "type": "AssignmentExpression", "start": 247, "end": 270, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 31 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 247, "end": 262, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 23 } }, "object": { "type": "ThisExpression", "start": 247, "end": 251, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 12 } } }, "property": { "type": "Identifier", "start": 252, "end": 262, "loc": { "start": { "line": 10, "column": 13 }, "end": { "line": 10, "column": 23 }, "identifierName": "measurable" }, "name": "measurable" }, "computed": false }, "right": { "type": "BooleanLiteral", "start": 265, "end": 270, "loc": { "start": { "line": 10, "column": 26 }, "end": { "line": 10, "column": 31 } }, "value": false } } }, { "type": "ExpressionStatement", "start": 280, "end": 302, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 30 } }, "expression": { "type": "AssignmentExpression", "start": 280, "end": 301, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 29 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 280, "end": 289, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 17 } }, "object": { "type": "ThisExpression", "start": 280, "end": 284, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 12 } } }, "property": { "type": "Identifier", "start": 285, "end": 289, "loc": { "start": { "line": 11, "column": 13 }, "end": { "line": 11, "column": 17 }, "identifierName": "step" }, "name": "step" }, "computed": false }, "right": { "type": "Identifier", "start": 292, "end": 301, "loc": { "start": { "line": 11, "column": 20 }, "end": { "line": 11, "column": 29 }, "identifierName": "undefined" }, "name": "undefined" } } }, { "type": "ExpressionStatement", "start": 311, "end": 333, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 30 } }, "expression": { "type": "AssignmentExpression", "start": 311, "end": 332, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 29 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 311, "end": 320, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 17 } }, "object": { "type": "ThisExpression", "start": 311, "end": 315, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 12 } } }, "property": { "type": "Identifier", "start": 316, "end": 320, "loc": { "start": { "line": 12, "column": 13 }, "end": { "line": 12, "column": 17 }, "identifierName": "grid" }, "name": "grid" }, "computed": false }, "right": { "type": "Identifier", "start": 323, "end": 332, "loc": { "start": { "line": 12, "column": 20 }, "end": { "line": 12, "column": 29 }, "identifierName": "undefined" }, "name": "undefined" } } }, { "type": "ExpressionStatement", "start": 342, "end": 364, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 30 } }, "expression": { "type": "AssignmentExpression", "start": 342, "end": 363, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 29 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 342, "end": 351, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 17 } }, "object": { "type": "ThisExpression", "start": 342, "end": 346, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 12 } } }, "property": { "type": "Identifier", "start": 347, "end": 351, "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 17 }, "identifierName": "axes" }, "name": "axes" }, "computed": false }, "right": { "type": "Identifier", "start": 354, "end": 363, "loc": { "start": { "line": 13, "column": 20 }, "end": { "line": 13, "column": 29 }, "identifierName": "undefined" }, "name": "undefined" } } }, { "type": "ExpressionStatement", "start": 374, "end": 407, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 41 } }, "expression": { "type": "AssignmentExpression", "start": 374, "end": 406, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 40 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 374, "end": 384, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 18 } }, "object": { "type": "ThisExpression", "start": 374, "end": 378, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 12 } } }, "property": { "type": "Identifier", "start": 379, "end": 384, "loc": { "start": { "line": 15, "column": 13 }, "end": { "line": 15, "column": 18 }, "identifierName": "plane" }, "name": "plane" }, "computed": false }, "right": { "type": "NewExpression", "start": 387, "end": 406, "loc": { "start": { "line": 15, "column": 21 }, "end": { "line": 15, "column": 40 } }, "callee": { "type": "Identifier", "start": 391, "end": 404, "loc": { "start": { "line": 15, "column": 25 }, "end": { "line": 15, "column": 38 }, "identifierName": "InfinitePlane" }, "name": "InfinitePlane" }, "arguments": [] } } }, { "type": "ExpressionStatement", "start": 416, "end": 453, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 45 } }, "expression": { "type": "CallExpression", "start": 416, "end": 452, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 44 } }, "callee": { "type": "MemberExpression", "start": 416, "end": 443, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 35 } }, "object": { "type": "MemberExpression", "start": 416, "end": 439, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 31 } }, "object": { "type": "MemberExpression", "start": 416, "end": 432, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 24 } }, "object": { "type": "MemberExpression", "start": 416, "end": 426, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 18 } }, "object": { "type": "ThisExpression", "start": 416, "end": 420, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 12 } } }, "property": { "type": "Identifier", "start": 421, "end": 426, "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 18 }, "identifierName": "plane" }, "name": "plane" }, "computed": false }, "property": { "type": "Identifier", "start": 427, "end": 432, "loc": { "start": { "line": 16, "column": 19 }, "end": { "line": 16, "column": 24 }, "identifierName": "plane" }, "name": "plane" }, "computed": false }, "property": { "type": "Identifier", "start": 433, "end": 439, "loc": { "start": { "line": 16, "column": 25 }, "end": { "line": 16, "column": 31 }, "identifierName": "normal" }, "name": "normal" }, "computed": false }, "property": { "type": "Identifier", "start": 440, "end": 443, "loc": { "start": { "line": 16, "column": 32 }, "end": { "line": 16, "column": 35 }, "identifierName": "set" }, "name": "set" }, "computed": false }, "arguments": [ { "type": "NumericLiteral", "start": 444, "end": 445, "loc": { "start": { "line": 16, "column": 36 }, "end": { "line": 16, "column": 37 } }, "extra": { "rawValue": 0, "raw": "0" }, "value": 0 }, { "type": "NumericLiteral", "start": 447, "end": 448, "loc": { "start": { "line": 16, "column": 39 }, "end": { "line": 16, "column": 40 } }, "extra": { "rawValue": 0, "raw": "0" }, "value": 0 }, { "type": "NumericLiteral", "start": 450, "end": 451, "loc": { "start": { "line": 16, "column": 42 }, "end": { "line": 16, "column": 43 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 } ] } }, { "type": "ExpressionStatement", "start": 462, "end": 483, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 29 } }, "expression": { "type": "CallExpression", "start": 462, "end": 482, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 28 } }, "callee": { "type": "MemberExpression", "start": 462, "end": 470, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 16 } }, "object": { "type": "ThisExpression", "start": 462, "end": 466, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 12 } } }, "property": { "type": "Identifier", "start": 467, "end": 470, "loc": { "start": { "line": 17, "column": 13 }, "end": { "line": 17, "column": 16 }, "identifierName": "add" }, "name": "add" }, "computed": false }, "arguments": [ { "type": "MemberExpression", "start": 471, "end": 481, "loc": { "start": { "line": 17, "column": 17 }, "end": { "line": 17, "column": 27 } }, "object": { "type": "ThisExpression", "start": 471, "end": 475, "loc": { "start": { "line": 17, "column": 17 }, "end": { "line": 17, "column": 21 } } }, "property": { "type": "Identifier", "start": 476, "end": 481, "loc": { "start": { "line": 17, "column": 22 }, "end": { "line": 17, "column": 27 }, "identifierName": "plane" }, "name": "plane" }, "computed": false } ] } } ], "directives": [] } }, { "type": "ClassMethod", "start": 495, "end": 1328, "loc": { "start": { "line": 20, "column": 4 }, "end": { "line": 41, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 495, "end": 501, "loc": { "start": { "line": 20, "column": 4 }, "end": { "line": 20, "column": 10 }, "identifierName": "update" }, "name": "update" }, "static": false, "kind": "method", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 502, "end": 509, "loc": { "start": { "line": 20, "column": 11 }, "end": { "line": 20, "column": 18 }, "identifierName": "newStep" }, "name": "newStep" } ], "body": { "type": "BlockStatement", "start": 511, "end": 1328, "loc": { "start": { "line": 20, "column": 20 }, "end": { "line": 41, "column": 5 } }, "body": [ { "type": "IfStatement", "start": 521, "end": 1322, "loc": { "start": { "line": 21, "column": 8 }, "end": { "line": 40, "column": 9 } }, "test": { "type": "BinaryExpression", "start": 525, "end": 546, "loc": { "start": { "line": 21, "column": 12 }, "end": { "line": 21, "column": 33 } }, "left": { "type": "Identifier", "start": 525, "end": 532, "loc": { "start": { "line": 21, "column": 12 }, "end": { "line": 21, "column": 19 }, "identifierName": "newStep" }, "name": "newStep" }, "operator": "!==", "right": { "type": "MemberExpression", "start": 537, "end": 546, "loc": { "start": { "line": 21, "column": 24 }, "end": { "line": 21, "column": 33 } }, "object": { "type": "ThisExpression", "start": 537,