UNPKG

awv3

Version:
1,535 lines 3.58 MB
{ "type": "File", "start": 0, "end": 16907, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 393, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 16907, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 393, "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" }, "trailingComments": [ { "type": "CommentBlock", "value": "\n * The following restrictions apply to points: xoffset yoffset.\n * Restrictions apply to lines in the following order: length angle xoffset yoffset.\n * Restrictions apply to arcs in the following order: angle radius clockwise.\n ", "start": 33, "end": 266, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 7, "column": 3 } } } ] }, { "type": "ExportNamedDeclaration", "start": 268, "end": 545, "loc": { "start": { "line": 9, "column": 0 }, "end": { "line": 14, "column": 1 } }, "specifiers": [], "source": null, "declaration": { "type": "FunctionDeclaration", "start": 275, "end": 545, "loc": { "start": { "line": 9, "column": 7 }, "end": { "line": 14, "column": 1 } }, "id": { "type": "Identifier", "start": 284, "end": 297, "loc": { "start": { "line": 9, "column": 16 }, "end": { "line": 9, "column": 29 }, "identifierName": "drawPointBy_S" }, "name": "drawPointBy_S", "leadingComments": null }, "generator": false, "expression": false, "async": false, "params": [ { "type": "ArrayPattern", "start": 298, "end": 309, "loc": { "start": { "line": 9, "column": 30 }, "end": { "line": 9, "column": 41 } }, "elements": [ { "type": "Identifier", "start": 299, "end": 308, "loc": { "start": { "line": 9, "column": 31 }, "end": { "line": 9, "column": 40 }, "identifierName": "startHint" }, "name": "startHint" } ] }, { "type": "Identifier", "start": 311, "end": 323, "loc": { "start": { "line": 9, "column": 43 }, "end": { "line": 9, "column": 55 }, "identifierName": "restrictions" }, "name": "restrictions" } ], "body": { "type": "BlockStatement", "start": 325, "end": 545, "loc": { "start": { "line": 9, "column": 57 }, "end": { "line": 14, "column": 1 } }, "body": [ { "type": "VariableDeclaration", "start": 331, "end": 361, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 34 } }, "declarations": [ { "type": "VariableDeclarator", "start": 335, "end": 360, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 33 } }, "id": { "type": "Identifier", "start": 335, "end": 340, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 13 }, "identifierName": "start" }, "name": "start" }, "init": { "type": "CallExpression", "start": 343, "end": 360, "loc": { "start": { "line": 10, "column": 16 }, "end": { "line": 10, "column": 33 } }, "callee": { "type": "MemberExpression", "start": 343, "end": 358, "loc": { "start": { "line": 10, "column": 16 }, "end": { "line": 10, "column": 31 } }, "object": { "type": "Identifier", "start": 343, "end": 352, "loc": { "start": { "line": 10, "column": 16 }, "end": { "line": 10, "column": 25 }, "identifierName": "startHint" }, "name": "startHint" }, "property": { "type": "Identifier", "start": 353, "end": 358, "loc": { "start": { "line": 10, "column": 26 }, "end": { "line": 10, "column": 31 }, "identifierName": "clone" }, "name": "clone" }, "computed": false }, "arguments": [] } } ], "kind": "let" }, { "type": "IfStatement", "start": 366, "end": 441, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 79 } }, "test": { "type": "BinaryExpression", "start": 370, "end": 406, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 44 } }, "left": { "type": "MemberExpression", "start": 370, "end": 392, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 30 } }, "object": { "type": "Identifier", "start": 370, "end": 382, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 20 }, "identifierName": "restrictions" }, "name": "restrictions" }, "property": { "type": "Identifier", "start": 383, "end": 392, "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 11, "column": 30 }, "identifierName": "xabsolute" }, "name": "xabsolute" }, "computed": false }, "operator": "!==", "right": { "type": "Identifier", "start": 397, "end": 406, "loc": { "start": { "line": 11, "column": 35 }, "end": { "line": 11, "column": 44 }, "identifierName": "undefined" }, "name": "undefined" } }, "consequent": { "type": "ExpressionStatement", "start": 408, "end": 441, "loc": { "start": { "line": 11, "column": 46 }, "end": { "line": 11, "column": 79 } }, "expression": { "type": "AssignmentExpression", "start": 408, "end": 440, "loc": { "start": { "line": 11, "column": 46 }, "end": { "line": 11, "column": 78 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 408, "end": 415, "loc": { "start": { "line": 11, "column": 46 }, "end": { "line": 11, "column": 53 } }, "object": { "type": "Identifier", "start": 408, "end": 413, "loc": { "start": { "line": 11, "column": 46 }, "end": { "line": 11, "column": 51 }, "identifierName": "start" }, "name": "start" }, "property": { "type": "Identifier", "start": 414, "end": 415, "loc": { "start": { "line": 11, "column": 52 }, "end": { "line": 11, "column": 53 }, "identifierName": "x" }, "name": "x" }, "computed": false }, "right": { "type": "MemberExpression", "start": 418, "end": 440, "loc": { "start": { "line": 11, "column": 56 }, "end": { "line": 11, "column": 78 } }, "object": { "type": "Identifier", "start": 418, "end": 430, "loc": { "start": { "line": 11, "column": 56 }, "end": { "line": 11, "column": 68 }, "identifierName": "restrictions" }, "name": "restrictions" }, "property": { "type": "Identifier", "start": 431, "end": 440, "loc": { "start": { "line": 11, "column": 69 }, "end": { "line": 11, "column": 78 }, "identifierName": "xabsolute" }, "name": "xabsolute" }, "computed": false } } }, "alternate": null }, { "type": "IfStatement", "start": 446, "end": 521, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 79 } }, "test": { "type": "BinaryExpression", "start": 450, "end": 486, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 44 } }, "left": { "type": "MemberExpression", "start": 450, "end": 472, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 30 } }, "object": { "type": "Identifier", "start": 450, "end": 462, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 20 }, "identifierName": "restrictions" }, "name": "restrictions" }, "property": { "type": "Identifier", "start": 463, "end": 472, "loc": { "start": { "line": 12, "column": 21 }, "end": { "line": 12, "column": 30 }, "identifierName": "yabsolute" }, "name": "yabsolute" }, "computed": false }, "operator": "!==", "right": { "type": "Identifier", "start": 477, "end": 486, "loc": { "start": { "line": 12, "column": 35 }, "end": { "line": 12, "column": 44 }, "identifierName": "undefined" }, "name": "undefined" } }, "consequent": { "type": "ExpressionStatement", "start": 488, "end": 521, "loc": { "start": { "line": 12, "column": 46 }, "end": { "line": 12, "column": 79 } }, "expression": { "type": "AssignmentExpression", "start": 488, "end": 520, "loc": { "start": { "line": 12, "column": 46 }, "end": { "line": 12, "column": 78 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 488, "end": 495, "loc": { "start": { "line": 12, "column": 46 }, "end": { "line": 12, "column": 53 } }, "object": { "type": "Identifier", "start": 488, "end": 493, "loc": { "start": { "line": 12, "column": 46 }, "end": { "line": 12, "column": 51 }, "identifierName": "start" }, "name": "start" }, "property": { "type": "Identifier", "start": 494, "end": 495, "loc": { "start": { "line": 12, "column": 52 }, "end": { "line": 12, "column": 53 }, "identifierName": "y" }, "name": "y" }, "computed": false }, "right": { "type": "MemberExpression", "start": 498, "end": 520, "loc": { "start": { "line": 12, "column": 56 }, "end": { "line": 12, "column": 78 } }, "object": { "type": "Identifier", "start": 498, "end": 510, "loc": { "start": { "line": 12, "column": 56 }, "end": { "line": 12, "column": 68 }, "identifierName": "restrictions" }, "name": "restrictions" }, "property": { "type": "Identifier", "start": 511, "end": 520, "loc": { "start": { "line": 12, "column": 69 }, "end": { "line": 12, "column": 78 }, "identifierName": "yabsolute" }, "name": "yabsolute" }, "computed": false } } }, "alternate": null }, { "type": "ReturnStatement", "start": 526, "end": 543, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 21 } }, "argument": { "type": "ObjectExpression", "start": 533, "end": 542, "loc": { "start": { "line": 13, "column": 11 }, "end": { "line": 13, "column": 20 } }, "properties": [ { "type": "ObjectProperty", "start": 535, "end": 540, "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 18 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 535, "end": 540, "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 18 }, "identifierName": "start" }, "name": "start" }, "value": { "type": "Identifier", "start": 535, "end": 540, "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 18 }, "identifierName": "start" }, "name": "start" }, "extra": { "shorthand": true } } ] } } ], "directives": [] }, "leadingComments": [ { "type": "CommentBlock", "value": "\n * The following restrictions apply to points: xoffset yoffset.\n * Restrictions apply to lines in the following order: length angle xoffset yoffset.\n * Restrictions apply to arcs in the following order: angle radius clockwise.\n ", "start": 33, "end": 266, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 7, "column": 3 } } } ], "trailingComments": [] }, "leadingComments": [ { "type": "CommentBlock", "value": "\n * The following restrictions apply to points: xoffset yoffset.\n * Restrictions apply to lines in the following order: length angle xoffset yoffset.\n * Restrictions apply to arcs in the following order: angle radius clockwise.\n ", "start": 33, "end": 266, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 7, "column": 3 } } } ] }, { "type": "ExportNamedDeclaration", "start": 547, "end": 1701, "loc": { "start": { "line": 16, "column": 0 }, "end": { "line": 37, "column": 1 } }, "specifiers": [], "source": null, "declaration": { "type": "FunctionDeclaration", "start": 554, "end": 1701, "loc": { "start": { "line": 16, "column": 7 }, "end": { "line": 37, "column": 1 } }, "id": { "type": "Identifier", "start": 563, "end": 577, "loc": { "start": { "line": 16, "column": 16 }, "end": { "line": 16, "column": 30 }, "identifierName": "drawLineBy_S_E" }, "name": "drawLineBy_S_E" }, "generator": false, "expression": false, "async": false, "params": [ { "type": "ArrayPattern", "start": 578, "end": 594, "loc": { "start": { "line": 16, "column": 31 }, "end": { "line": 16, "column": 47 } }, "elements": [ { "type": "Identifier", "start": 579, "end": 584, "loc": { "start": { "line": 16, "column": 32 }, "end": { "line": 16, "column": 37 }, "identifierName": "start" }, "name": "start" }, { "type": "Identifier", "start": 586, "end": 593, "loc": { "start": { "line": 16, "column": 39 }, "end": { "line": 16, "column": 46 }, "identifierName": "endHint" }, "name": "endHint" } ] }, { "type": "Identifier", "start": 596, "end": 608, "loc": { "start": { "line": 16, "column": 49 }, "end": { "line": 16, "column": 61 }, "identifierName": "restrictions" }, "name": "restrictions" } ], "body": { "type": "BlockStatement", "start": 610, "end": 1701, "loc": { "start": { "line": 16, "column": 63 }, "end": { "line": 37, "column": 1 } }, "body": [ { "type": "VariableDeclaration", "start": 616, "end": 693, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 81 } }, "declarations": [ { "type": "VariableDeclarator", "start": 620, "end": 692, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 80 } }, "id": { "type": "ObjectPattern", "start": 620, "end": 677, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 65 } }, "properties": [ { "type": "ObjectProperty", "start": 622, "end": 629, "loc": { "start": { "line": 17, "column": 10 }, "end": { "line": 17, "column": 17 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 622, "end": 629, "loc": { "start": { "line": 17, "column": 10 }, "end": { "line": 17, "column": 17 }, "identifierName": "xoffset" }, "name": "xoffset" }, "value": { "type": "Identifier", "start": 622, "end": 629, "loc": { "start": { "line": 17, "column": 10 }, "end": { "line": 17, "column": 17 }, "identifierName": "xoffset" }, "name": "xoffset" }, "extra": { "shorthand": true } }, { "type": "ObjectProperty", "start": 631, "end": 638, "loc": { "start": { "line": 17, "column": 19 }, "end": { "line": 17, "column": 26 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 631, "end": 638, "loc": { "start": { "line": 17, "column": 19 }, "end": { "line": 17, "column": 26 }, "identifierName": "yoffset" }, "name": "yoffset" }, "value": { "type": "Identifier", "start": 631, "end": 638, "loc": { "start": { "line": 17, "column": 19 }, "end": { "line": 17, "column": 26 }, "identifierName": "yoffset" }, "name": "yoffset" }, "extra": { "shorthand": true } }, { "type": "ObjectProperty", "start": 640, "end": 649, "loc": { "start": { "line": 17, "column": 28 }, "end": { "line": 17, "column": 37 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 640, "end": 649, "loc": { "start": { "line": 17, "column": 28 }, "end": { "line": 17, "column": 37 }, "identifierName": "xabsolute" }, "name": "xabsolute" }, "value": { "type": "Identifier", "start": 640, "end": 649, "loc": { "start": { "line": 17, "column": 28 }, "end": { "line": 17, "column": 37 }, "identifierName": "xabsolute" }, "name": "xabsolute" }, "extra": { "shorthand": true } }, { "type": "ObjectProperty", "start": 651, "end": 660, "loc": { "start": { "line": 17, "column": 39 }, "end": { "line": 17, "column": 48 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 651, "end": 660, "loc": { "start": { "line": 17, "column": 39 }, "end": { "line": 17, "column": 48 }, "identifierName": "yabsolute" }, "name": "yabsolute" }, "value": { "type": "Identifier", "start": 651, "end": 660, "loc": { "start": { "line": 17, "column": 39 }, "end": { "line": 17, "column": 48 }, "identifierName": "yabsolute" }, "name": "yabsolute" }, "extra": { "shorthand": true } }, { "type": "ObjectProperty", "start": 662, "end": 667, "loc": { "start": { "line": 17, "column": 50 }, "end": { "line": 17, "column": 55 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 662, "end": 667, "loc": { "start": { "line": 17, "column": 50 }, "end": { "line": 17, "column": 55 }, "identifierName": "angle" }, "name": "angle" }, "value": { "type": "Identifier", "start": 662, "end": 667, "loc": { "start": { "line": 17, "column": 50 }, "end": { "line": 17, "column": 55 }, "identifierName": "angle" }, "name": "angle" }, "extra": { "shorthand": true } }, { "type": "ObjectProperty", "start": 669, "end": 675, "loc": { "start": { "line": 17, "column": 57 }, "end": { "line": 17, "column": 63 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 669, "end": 675, "loc": { "start": { "line": 17, "column": 57 }, "end": { "line": 17, "column": 63 }, "identifierName": "length" }, "name": "length" }, "value": { "type": "Identifier", "start": 669, "end": 675, "loc": { "start": { "line": 17, "column": 57 }, "end": { "line": 17, "column": 63 }, "identifierName": "length" }, "name": "length" }, "extra": { "shorthand": true } } ] }, "init": { "type": "Identifier", "start": 680, "end": 692, "loc": { "start": { "line": 17, "column": 68 }, "end": { "line": 17, "column": 80 }, "identifierName": "restrictions" }, "name": "restrictions" } } ], "kind": "let" }, { "type": "IfStatement", "start": 698, "end": 757, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 63 } }, "test": { "type": "BinaryExpression", "start": 702, "end": 725, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 31 } }, "left": { "type": "Identifier", "start": 702, "end": 711, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 17 }, "identifierName": "xabsolute" }, "name": "xabsolute" }, "operator": "!==", "right": { "type": "Identifier", "start": 716, "end": 725, "loc": { "start": { "line": 18, "column": 22 }, "end": { "line": 18, "column": 31 }, "identifierName": "undefined" }, "name":