UNPKG

awv3

Version:
1,486 lines (1,485 loc) 334 kB
{ "type": "File", "start": 0, "end": 1427, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 47, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 1427, "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": 150, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 24 } }, "declarations": [ { "type": "VariableDeclarator", "start": 132, "end": 149, "loc": { "start": { "line": 5, "column": 6 }, "end": { "line": 5, "column": 23 } }, "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": 149, "loc": { "start": { "line": 5, "column": 19 }, "end": { "line": 5, "column": 23 } }, "extra": { "rawValue": 1000, "raw": "1e+3" }, "value": 1000 } } ], "kind": "const" }, { "type": "ExportDefaultDeclaration", "start": 152, "end": 1426, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 46, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 167, "end": 1426, "loc": { "start": { "line": 7, "column": 15 }, "end": { "line": 46, "column": 1 } }, "id": { "type": "Identifier", "start": 173, "end": 179, "loc": { "start": { "line": 7, "column": 21 }, "end": { "line": 7, "column": 27 }, "identifierName": "Sketch" }, "name": "Sketch" }, "superClass": { "type": "Identifier", "start": 188, "end": 200, "loc": { "start": { "line": 7, "column": 36 }, "end": { "line": 7, "column": 48 }, "identifierName": "BaseGraphics" }, "name": "BaseGraphics" }, "body": { "type": "ClassBody", "start": 201, "end": 1426, "loc": { "start": { "line": 7, "column": 49 }, "end": { "line": 46, "column": 1 } }, "body": [ { "type": "ClassMethod", "start": 207, "end": 490, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 18, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 207, "end": 218, "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": 221, "end": 490, "loc": { "start": { "line": 8, "column": 18 }, "end": { "line": 18, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 231, "end": 239, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 16 } }, "expression": { "type": "CallExpression", "start": 231, "end": 238, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 15 } }, "callee": { "type": "Super", "start": 231, "end": 236, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 13 } } }, "arguments": [] } }, { "type": "ExpressionStatement", "start": 248, "end": 272, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 32 } }, "expression": { "type": "AssignmentExpression", "start": 248, "end": 271, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 31 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 248, "end": 263, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 23 } }, "object": { "type": "ThisExpression", "start": 248, "end": 252, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 12 } } }, "property": { "type": "Identifier", "start": 253, "end": 263, "loc": { "start": { "line": 10, "column": 13 }, "end": { "line": 10, "column": 23 }, "identifierName": "measurable" }, "name": "measurable" }, "computed": false }, "right": { "type": "BooleanLiteral", "start": 266, "end": 271, "loc": { "start": { "line": 10, "column": 26 }, "end": { "line": 10, "column": 31 } }, "value": false } } }, { "type": "ExpressionStatement", "start": 281, "end": 303, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 30 } }, "expression": { "type": "AssignmentExpression", "start": 281, "end": 302, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 29 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 281, "end": 290, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 17 } }, "object": { "type": "ThisExpression", "start": 281, "end": 285, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 12 } } }, "property": { "type": "Identifier", "start": 286, "end": 290, "loc": { "start": { "line": 11, "column": 13 }, "end": { "line": 11, "column": 17 }, "identifierName": "step" }, "name": "step" }, "computed": false }, "right": { "type": "Identifier", "start": 293, "end": 302, "loc": { "start": { "line": 11, "column": 20 }, "end": { "line": 11, "column": 29 }, "identifierName": "undefined" }, "name": "undefined" } } }, { "type": "ExpressionStatement", "start": 312, "end": 334, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 30 } }, "expression": { "type": "AssignmentExpression", "start": 312, "end": 333, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 29 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 312, "end": 321, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 17 } }, "object": { "type": "ThisExpression", "start": 312, "end": 316, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 12 } } }, "property": { "type": "Identifier", "start": 317, "end": 321, "loc": { "start": { "line": 12, "column": 13 }, "end": { "line": 12, "column": 17 }, "identifierName": "grid" }, "name": "grid" }, "computed": false }, "right": { "type": "Identifier", "start": 324, "end": 333, "loc": { "start": { "line": 12, "column": 20 }, "end": { "line": 12, "column": 29 }, "identifierName": "undefined" }, "name": "undefined" } } }, { "type": "ExpressionStatement", "start": 343, "end": 365, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 30 } }, "expression": { "type": "AssignmentExpression", "start": 343, "end": 364, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 29 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 343, "end": 352, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 17 } }, "object": { "type": "ThisExpression", "start": 343, "end": 347, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 12 } } }, "property": { "type": "Identifier", "start": 348, "end": 352, "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 17 }, "identifierName": "axes" }, "name": "axes" }, "computed": false }, "right": { "type": "Identifier", "start": 355, "end": 364, "loc": { "start": { "line": 13, "column": 20 }, "end": { "line": 13, "column": 29 }, "identifierName": "undefined" }, "name": "undefined" } } }, { "type": "ExpressionStatement", "start": 375, "end": 408, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 41 } }, "expression": { "type": "AssignmentExpression", "start": 375, "end": 407, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 40 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 375, "end": 385, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 18 } }, "object": { "type": "ThisExpression", "start": 375, "end": 379, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 12 } } }, "property": { "type": "Identifier", "start": 380, "end": 385, "loc": { "start": { "line": 15, "column": 13 }, "end": { "line": 15, "column": 18 }, "identifierName": "plane" }, "name": "plane" }, "computed": false }, "right": { "type": "NewExpression", "start": 388, "end": 407, "loc": { "start": { "line": 15, "column": 21 }, "end": { "line": 15, "column": 40 } }, "callee": { "type": "Identifier", "start": 392, "end": 405, "loc": { "start": { "line": 15, "column": 25 }, "end": { "line": 15, "column": 38 }, "identifierName": "InfinitePlane" }, "name": "InfinitePlane" }, "arguments": [] } } }, { "type": "ExpressionStatement", "start": 417, "end": 454, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 45 } }, "expression": { "type": "CallExpression", "start": 417, "end": 453, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 44 } }, "callee": { "type": "MemberExpression", "start": 417, "end": 444, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 35 } }, "object": { "type": "MemberExpression", "start": 417, "end": 440, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 31 } }, "object": { "type": "MemberExpression", "start": 417, "end": 433, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 24 } }, "object": { "type": "MemberExpression", "start": 417, "end": 427, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 18 } }, "object": { "type": "ThisExpression", "start": 417, "end": 421, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 12 } } }, "property": { "type": "Identifier", "start": 422, "end": 427, "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 18 }, "identifierName": "plane" }, "name": "plane" }, "computed": false }, "property": { "type": "Identifier", "start": 428, "end": 433, "loc": { "start": { "line": 16, "column": 19 }, "end": { "line": 16, "column": 24 }, "identifierName": "plane" }, "name": "plane" }, "computed": false }, "property": { "type": "Identifier", "start": 434, "end": 440, "loc": { "start": { "line": 16, "column": 25 }, "end": { "line": 16, "column": 31 }, "identifierName": "normal" }, "name": "normal" }, "computed": false }, "property": { "type": "Identifier", "start": 441, "end": 444, "loc": { "start": { "line": 16, "column": 32 }, "end": { "line": 16, "column": 35 }, "identifierName": "set" }, "name": "set" }, "computed": false }, "arguments": [ { "type": "NumericLiteral", "start": 445, "end": 446, "loc": { "start": { "line": 16, "column": 36 }, "end": { "line": 16, "column": 37 } }, "extra": { "rawValue": 0, "raw": "0" }, "value": 0 }, { "type": "NumericLiteral", "start": 448, "end": 449, "loc": { "start": { "line": 16, "column": 39 }, "end": { "line": 16, "column": 40 } }, "extra": { "rawValue": 0, "raw": "0" }, "value": 0 }, { "type": "NumericLiteral", "start": 451, "end": 452, "loc": { "start": { "line": 16, "column": 42 }, "end": { "line": 16, "column": 43 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 } ] } }, { "type": "ExpressionStatement", "start": 463, "end": 484, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 29 } }, "expression": { "type": "CallExpression", "start": 463, "end": 483, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 28 } }, "callee": { "type": "MemberExpression", "start": 463, "end": 471, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 16 } }, "object": { "type": "ThisExpression", "start": 463, "end": 467, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 12 } } }, "property": { "type": "Identifier", "start": 468, "end": 471, "loc": { "start": { "line": 17, "column": 13 }, "end": { "line": 17, "column": 16 }, "identifierName": "add" }, "name": "add" }, "computed": false }, "arguments": [ { "type": "MemberExpression", "start": 472, "end": 482, "loc": { "start": { "line": 17, "column": 17 }, "end": { "line": 17, "column": 27 } }, "object": { "type": "ThisExpression", "start": 472, "end": 476, "loc": { "start": { "line": 17, "column": 17 }, "end": { "line": 17, "column": 21 } } }, "property": { "type": "Identifier", "start": 477, "end": 482, "loc": { "start": { "line": 17, "column": 22 }, "end": { "line": 17, "column": 27 }, "identifierName": "plane" }, "name": "plane" }, "computed": false } ] } } ], "directives": [] } }, { "type": "ClassMethod", "start": 496, "end": 1333, "loc": { "start": { "line": 20, "column": 4 }, "end": { "line": 41, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 496, "end": 502, "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": 503, "end": 510, "loc": { "start": { "line": 20, "column": 11 }, "end": { "line": 20, "column": 18 }, "identifierName": "newStep" }, "name": "newStep" } ], "body": { "type": "BlockStatement", "start": 512, "end": 1333, "loc": { "start": { "line": 20, "column": 20 }, "end": { "line": 41, "column": 5 } }, "body": [ { "type": "IfStatement", "start": 522, "end": 1327, "loc": { "start": { "line": 21, "column": 8 }, "end": { "line": 40, "column": 9 } }, "test": { "type": "BinaryExpression", "start": 526, "end": 547, "loc": { "start": { "line": 21, "column": 12 }, "end": { "line": 21, "column": 33 } }, "left": { "type": "Identifier", "start": 526, "end": 533, "loc": { "start": { "line": 21, "column": 12 }, "end": { "line": 21, "column": 19 }, "identifierName": "newStep" }, "name": "newStep" }, "operator": "!==", "right": { "type": "MemberExpression", "start": 538, "end": 547, "loc": { "start": { "line": 21, "column": 24 }, "end": { "line": 21, "column": 33 } }, "object": { "type": "ThisExpression", "start": 538,