UNPKG

awv3

Version:
1,592 lines (1,591 loc) 609 kB
{ "type": "Program", "start": 0, "end": 6774, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 175, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 53, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 53 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 8, "end": 22, "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 22 } }, "imported": { "type": "Identifier", "start": 8, "end": 22, "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 22 } }, "name": "ClassCadObject" }, "local": { "type": "Identifier", "start": 8, "end": 22, "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 22 } }, "name": "ClassCadObject" } } ], "importKind": "value", "source": { "type": "Literal", "start": 29, "end": 52, "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 52 } }, "value": "../sketcher/ccobjects", "rawValue": "../sketcher/ccobjects", "raw": "'../sketcher/ccobjects'" } }, { "type": "ImportDeclaration", "start": 54, "end": 98, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 44 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 61, "end": 69, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 15 } }, "local": { "type": "Identifier", "start": 61, "end": 69, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 15 } }, "name": "Sketcher" } } ], "importKind": "value", "source": { "type": "Literal", "start": 75, "end": 97, "loc": { "start": { "line": 2, "column": 21 }, "end": { "line": 2, "column": 43 } }, "value": "../sketcher/sketcher", "rawValue": "../sketcher/sketcher", "raw": "'../sketcher/sketcher'" } }, { "type": "ImportDeclaration", "start": 99, "end": 168, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 69 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 107, "end": 117, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 18 } }, "imported": { "type": "Identifier", "start": 107, "end": 117, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 18 } }, "name": "Expression" }, "local": { "type": "Identifier", "start": 107, "end": 117, "loc": { "start": { "line": 3, "column": 8 }, "end": { "line": 3, "column": 18 } }, "name": "Expression" } }, { "type": "ImportSpecifier", "start": 119, "end": 128, "loc": { "start": { "line": 3, "column": 20 }, "end": { "line": 3, "column": 29 } }, "imported": { "type": "Identifier", "start": 119, "end": 128, "loc": { "start": { "line": 3, "column": 20 }, "end": { "line": 3, "column": 29 } }, "name": "Statement" }, "local": { "type": "Identifier", "start": 119, "end": 128, "loc": { "start": { "line": 3, "column": 20 }, "end": { "line": 3, "column": 29 } }, "name": "Statement" } }, { "type": "ImportSpecifier", "start": 130, "end": 137, "loc": { "start": { "line": 3, "column": 31 }, "end": { "line": 3, "column": 38 } }, "imported": { "type": "Identifier", "start": 130, "end": 137, "loc": { "start": { "line": 3, "column": 31 }, "end": { "line": 3, "column": 38 } }, "name": "parseTo" }, "local": { "type": "Identifier", "start": 130, "end": 137, "loc": { "start": { "line": 3, "column": 31 }, "end": { "line": 3, "column": 38 } }, "name": "parseTo" } } ], "importKind": "value", "source": { "type": "Literal", "start": 144, "end": 167, "loc": { "start": { "line": 3, "column": 45 }, "end": { "line": 3, "column": 68 } }, "value": "../sketcher/cchelpers", "rawValue": "../sketcher/cchelpers", "raw": "'../sketcher/cchelpers'" } }, { "type": "ImportDeclaration", "start": 169, "end": 201, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 32 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 176, "end": 180, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 11 } }, "local": { "type": "Identifier", "start": 176, "end": 180, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 11 } }, "name": "View" } } ], "importKind": "value", "source": { "type": "Literal", "start": 186, "end": 200, "loc": { "start": { "line": 4, "column": 17 }, "end": { "line": 4, "column": 31 } }, "value": "../core/view", "rawValue": "../core/view", "raw": "'../core/view'" } }, { "type": "ImportDeclaration", "start": 202, "end": 228, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 26 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 209, "end": 214, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 12 } }, "local": { "type": "Identifier", "start": 209, "end": 214, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 12 } }, "name": "THREE" } } ], "importKind": "value", "source": { "type": "Literal", "start": 220, "end": 227, "loc": { "start": { "line": 5, "column": 18 }, "end": { "line": 5, "column": 25 } }, "value": "three", "rawValue": "three", "raw": "'three'" }, "trailingComments": [ { "type": "Block", "value": "\n * Constraint - a Javascript representation of LGS 2D constraint\n * optional attributes: expression: string, value: number, fixed: boolean\n ", "start": 230, "end": 375, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 10, "column": 3 } }, "range": [ 230, 375 ] } ] }, { "type": "ExportDefaultDeclaration", "start": 376, "end": 4700, "loc": { "start": { "line": 11, "column": 0 }, "end": { "line": 128, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 391, "end": 4700, "loc": { "start": { "line": 11, "column": 15 }, "end": { "line": 128, "column": 1 } }, "id": { "type": "Identifier", "start": 397, "end": 407, "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 11, "column": 31 } }, "name": "Constraint", "leadingComments": null }, "superClass": { "type": "Identifier", "start": 416, "end": 430, "loc": { "start": { "line": 11, "column": 40 }, "end": { "line": 11, "column": 54 } }, "name": "ClassCadObject" }, "body": { "type": "ClassBody", "start": 431, "end": 4700, "loc": { "start": { "line": 11, "column": 55 }, "end": { "line": 128, "column": 1 } }, "body": [ { "type": "MethodDefinition", "start": 437, "end": 1186, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 30, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 437, "end": 448, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 15 } }, "name": "constructor" }, "static": false, "kind": "constructor", "value": { "type": "FunctionExpression", "start": 448, "end": 1186, "loc": { "start": { "line": 12, "column": 15 }, "end": { "line": 30, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 449, "end": 454, "loc": { "start": { "line": 12, "column": 16 }, "end": { "line": 12, "column": 21 } }, "name": "types" }, { "type": "Identifier", "start": 456, "end": 460, "loc": { "start": { "line": 12, "column": 23 }, "end": { "line": 12, "column": 27 } }, "name": "args" }, { "type": "Identifier", "start": 462, "end": 472, "loc": { "start": { "line": 12, "column": 29 }, "end": { "line": 12, "column": 39 } }, "name": "attributes" } ], "body": { "type": "BlockStatement", "start": 474, "end": 1186, "loc": { "start": { "line": 12, "column": 41 }, "end": { "line": 30, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 484, "end": 492, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 16 } }, "expression": { "type": "CallExpression", "start": 484, "end": 491, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 15 } }, "callee": { "type": "Super", "start": 484, "end": 489, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 13 } } }, "arguments": [] } }, { "type": "ExpressionStatement", "start": 501, "end": 561, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 68 } }, "expression": { "type": "CallExpression", "start": 501, "end": 560, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 67 } }, "callee": { "type": "MemberExpression", "start": 501, "end": 538, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 45 } }, "object": { "type": "MemberExpression", "start": 501, "end": 533, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 40 } }, "object": { "type": "Identifier", "start": 501, "end": 509, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 16 } }, "name": "Sketcher" }, "property": { "type": "Identifier", "start": 510, "end": 533, "loc": { "start": { "line": 14, "column": 17 }, "end": { "line": 14, "column": 40 } }, "name": "mixinPixelSizedGeometry" }, "computed": false }, "property": { "type": "Identifier", "start": 534, "end": 538, "loc": { "start": { "line": 14, "column": 41 }, "end": { "line": 14, "column": 45 } }, "name": "call" }, "computed": false }, "arguments": [ { "type": "ThisExpression", "start": 539, "end": 543, "loc": { "start": { "line": 14, "column": 46 }, "end": { "line": 14, "column": 50 } } }, { "type": "MemberExpression", "start": 545, "end": 559, "loc": { "start": { "line": 14, "column": 52 }, "end": { "line": 14, "column": 66 } }, "object": { "type": "ThisExpression", "start": 545, "end": 549, "loc": { "start": { "line": 14, "column": 52 }, "end": { "line": 14, "column": 56 } } }, "property": { "type": "Identifier", "start": 550, "end": 559, "loc": { "start": { "line": 14, "column": 57 }, "end": { "line": 14, "column": 66 } }, "name": "thickness" }, "computed": false } ] } }, { "type": "ExpressionStatement", "start": 571, "end": 588, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 25 } }, "expression": { "type": "AssignmentExpression", "start": 571, "end": 587, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 24 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 571, "end": 582, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 19 } }, "object": { "type": "ThisExpression", "start": 571, "end": 575, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 12 } } }, "property": { "type": "Identifier", "start": 576, "end": 582, "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 19 } }, "name": "points" }, "computed": false }, "right": { "type": "ArrayExpression", "start": 585, "end": 587, "loc": { "start": { "line": 16, "column": 22 }, "end": { "line": 16, "column": 24 } }, "elements": [] } }, "trailingComments": [ { "type": "CommentLine", "value": " constraint.points is assumed to be an empty array throughout a sketcher", "start": 589, "end": 663, "loc": { "start": { "line": 16, "column": 26 }, "end": { "line": 16, "column": 100 } }, "range": [ 589, 663 ] } ] }, { "type": "ExpressionStatement", "start": 672, "end": 692, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 28 } }, "expression": { "type": "AssignmentExpression", "start": 672, "end": 691, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 27 } }, "operator": "=", "left": { "type": "Identifier", "start": 672, "end": 677, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 13 } }, "name": "types", "leadingComments": null }, "right": { "type": "LogicalExpression", "start": 680, "end": 691, "loc": { "start": { "line": 17, "column": 16 }, "end": { "line": 17, "column": 27 } }, "left": { "type": "Identifier", "start": 680, "end": 685, "loc": { "start": { "line": 17, "column": 16 }, "end": { "line": 17, "column": 21 } }, "name": "types" }, "operator": "||", "right": { "type": "ArrayExpression", "start": 689, "end": 691, "loc": { "start": { "line": 17, "column": 25 }, "end": { "line": 17, "column": 27 } }, "elements": [] } }, "leadingComments": null }, "leadingComments": [ { "type": "CommentLine", "value": " constraint.points is assumed to be an empty array throughout a sketcher", "start": 589, "end": 663, "loc": { "start": { "line": 16, "column": 26 }, "end": { "line": 16, "column": 100 } }, "range": [ 589, 663 ] } ] }, { "type": "ExpressionStatement", "start": 701, "end": 726, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 33 } }, "expression": { "type": "AssignmentExpression", "start": 701, "end": 725, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 32 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 701, "end": 714, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 21 } }, "object": { "type": "ThisExpression", "start": 701, "end": 705, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 12 } } }, "property": { "type": "Identifier", "start": 706, "end": 714, "loc": { "start": { "line": 18, "column": 13 }, "end": { "line": 18, "column": 21 } }, "name": "typename" }, "computed": false }, "right": { "type": "MemberExpression", "start": 717, "end": 725, "loc": { "start": { "line": 18, "column": 24 }, "end": { "line": 18, "column": 32 } }, "object": { "type": "Identifier", "start": 717, "end": 722, "loc": { "start": { "line": 18, "column": 24 }, "end": { "line": 18, "column": 29 } }, "name": "types" }, "property": { "type": "Literal", "start": 723, "end": 724, "loc": { "start": { "line": 18, "column": 30 }, "end": { "line": 18, "column": 31 } }, "value": 0, "rawValue": 0, "raw": "0" }, "computed": true } } }, { "type": "ExpressionStatement", "start": 735, "end": 756, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 29 } }, "expression": { "type": "AssignmentExpression", "start": 735, "end": 755, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 28 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 735, "end": 744, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 17 } }, "object": { "type": "ThisExpression", "start": 735, "end": 739, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 12 } } }, "property": { "type": "Identifier", "start": 740, "end": 744, "loc": { "start": { "line": 19, "column": 13 }, "end": { "line": 19, "column": 17 } }, "name": "type" }, "computed": false }, "right": { "type": "MemberExpression", "start": 747, "end": 755, "loc": { "start": { "line": 19, "column": 20 }, "end": { "line": 19, "column": 28 } }, "object": { "type": "Identifier", "start": 747, "end": 752, "loc": { "start": { "line": 19, "column": 20 }, "end": { "line": 19, "column": 25 } }, "name": "types" }, "property": { "type": "Literal", "start": 753, "end": 754, "loc": { "start": { "line": 19, "column": 26 }, "end": { "line": 19, "column": 27 } }, "value": 1, "rawValue": 1, "raw": "1" }, "computed": true } } }, { "type": "ExpressionStatement", "start": 765, "end": 788, "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 31 } }, "expression": { "type": "AssignmentExpression", "start": 765, "end": 787, "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 30 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 765, "end": 774, "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 17 } }, "object": { "type": "ThisExpression", "start": 765, "end": 769, "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 12 } } }, "property": { "type": "Identifier", "start": 770, "end": 774, "loc": { "start": { "line": 20, "column": 13 }, "end": { "line": 20, "column": 17 } }, "name": "args" }, "computed": false }, "right": { "type": "LogicalExpression", "start": 777, "end": 787, "loc": { "start": { "line": 20, "column": 20 }, "end": { "line": 20, "column": 30 } }, "left": { "type": "Identifier", "start": 777, "end": 781, "loc": { "start": { "line": 20, "column": 20 }, "end": { "line": 20, "column": 24 } }, "name": "args" }, "operator": "||", "right": { "type": "ArrayExpression", "start": 785, "end": 787, "loc": { "start": { "line": 20, "column": 28 }, "end": { "line": 20, "column": 30 } }, "elements": [] } } } }, { "type": "ExpressionStatement", "start": 797, "end": 827, "loc": { "start": { "line": 21, "column": 8 }, "end": { "line": 21, "column": 38 } }, "expression": { "type": "AssignmentExpression", "start": 797, "end": 826, "loc": { "start": { "line": 21, "column": 8 }, "end": { "line": 21, "column": 37 } }, "operator": "=", "left": { "type": "Identifier", "start": 797, "end": 807, "loc": { "start": { "line": 21, "column": 8 }, "end": { "line": 21, "column": 18 } }, "name": "attributes" }, "right": { "type": "LogicalExpression", "start": 810, "end": 826, "loc": { "start": { "line": 21, "column": 21 }, "end": { "line": 21, "column": 37 } }, "left": { "type": "Identifier", "start": 810, "end": 820,