UNPKG

awv3

Version:
1,899 lines (1,898 loc) 2.65 MB
{ "type": "Program", "start": 0, "end": 28997, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 728, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 57, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 57 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 8, "end": 20, "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 20 } }, "imported": { "type": "Identifier", "start": 8, "end": 20, "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 20 } }, "name": "trackPromise" }, "local": { "type": "Identifier", "start": 8, "end": 20, "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 20 } }, "name": "trackPromise" } }, { "type": "ImportSpecifier", "start": 22, "end": 29, "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 29 } }, "imported": { "type": "Identifier", "start": 22, "end": 29, "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 29 } }, "name": "Interop" }, "local": { "type": "Identifier", "start": 22, "end": 29, "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 29 } }, "name": "Interop" } } ], "importKind": "value", "source": { "type": "Literal", "start": 36, "end": 56, "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 56 } }, "value": "sketcher/cchelpers", "rawValue": "sketcher/cchelpers", "raw": "'sketcher/cchelpers'" } }, { "type": "ImportDeclaration", "start": 58, "end": 115, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 57 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 65, "end": 84, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 26 } }, "local": { "type": "Identifier", "start": 65, "end": 84, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 26 } }, "name": "ConstraintGenerator" } } ], "importKind": "value", "source": { "type": "Literal", "start": 90, "end": 114, "loc": { "start": { "line": 2, "column": 32 }, "end": { "line": 2, "column": 56 } }, "value": "sketcher/constraintgen", "rawValue": "sketcher/constraintgen", "raw": "'sketcher/constraintgen'" } }, { "type": "ImportDeclaration", "start": 116, "end": 153, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 37 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 123, "end": 129, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 13 } }, "local": { "type": "Identifier", "start": 123, "end": 129, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 13 } }, "name": "Sketch" } } ], "importKind": "value", "source": { "type": "Literal", "start": 135, "end": 152, "loc": { "start": { "line": 3, "column": 19 }, "end": { "line": 3, "column": 36 } }, "value": "sketcher/sketch", "rawValue": "sketcher/sketch", "raw": "'sketcher/sketch'" } }, { "type": "ImportDeclaration", "start": 154, "end": 208, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 54 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 162, "end": 167, "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 13 } }, "imported": { "type": "Identifier", "start": 162, "end": 167, "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 13 } }, "name": "Point" }, "local": { "type": "Identifier", "start": 162, "end": 167, "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 13 } }, "name": "Point" } }, { "type": "ImportSpecifier", "start": 169, "end": 173, "loc": { "start": { "line": 4, "column": 15 }, "end": { "line": 4, "column": 19 } }, "imported": { "type": "Identifier", "start": 169, "end": 173, "loc": { "start": { "line": 4, "column": 15 }, "end": { "line": 4, "column": 19 } }, "name": "Line" }, "local": { "type": "Identifier", "start": 169, "end": 173, "loc": { "start": { "line": 4, "column": 15 }, "end": { "line": 4, "column": 19 } }, "name": "Line" } }, { "type": "ImportSpecifier", "start": 175, "end": 178, "loc": { "start": { "line": 4, "column": 21 }, "end": { "line": 4, "column": 24 } }, "imported": { "type": "Identifier", "start": 175, "end": 178, "loc": { "start": { "line": 4, "column": 21 }, "end": { "line": 4, "column": 24 } }, "name": "Arc" }, "local": { "type": "Identifier", "start": 175, "end": 178, "loc": { "start": { "line": 4, "column": 21 }, "end": { "line": 4, "column": 24 } }, "name": "Arc" } } ], "importKind": "value", "source": { "type": "Literal", "start": 185, "end": 207, "loc": { "start": { "line": 4, "column": 31 }, "end": { "line": 4, "column": 53 } }, "value": "sketcher/geomobjects", "rawValue": "sketcher/geomobjects", "raw": "'sketcher/geomobjects'" } }, { "type": "ImportDeclaration", "start": 209, "end": 254, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 45 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 216, "end": 226, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 17 } }, "local": { "type": "Identifier", "start": 216, "end": 226, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 17 } }, "name": "Constraint" } } ], "importKind": "value", "source": { "type": "Literal", "start": 232, "end": 253, "loc": { "start": { "line": 5, "column": 23 }, "end": { "line": 5, "column": 44 } }, "value": "sketcher/constraint", "rawValue": "sketcher/constraint", "raw": "'sketcher/constraint'" } }, { "type": "ImportDeclaration", "start": 255, "end": 301, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 46 } }, "specifiers": [ { "type": "ImportNamespaceSpecifier", "start": 262, "end": 275, "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 6, "column": 20 } }, "local": { "type": "Identifier", "start": 267, "end": 275, "loc": { "start": { "line": 6, "column": 12 }, "end": { "line": 6, "column": 20 } }, "name": "Controls" } } ], "importKind": "value", "source": { "type": "Literal", "start": 281, "end": 300, "loc": { "start": { "line": 6, "column": 26 }, "end": { "line": 6, "column": 45 } }, "value": "sketcher/controls", "rawValue": "sketcher/controls", "raw": "'sketcher/controls'" } }, { "type": "ImportDeclaration", "start": 302, "end": 337, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 35 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 309, "end": 314, "loc": { "start": { "line": 7, "column": 7 }, "end": { "line": 7, "column": 12 } }, "local": { "type": "Identifier", "start": 309, "end": 314, "loc": { "start": { "line": 7, "column": 7 }, "end": { "line": 7, "column": 12 } }, "name": "Orbit" } } ], "importKind": "value", "source": { "type": "Literal", "start": 320, "end": 336, "loc": { "start": { "line": 7, "column": 18 }, "end": { "line": 7, "column": 34 } }, "value": "controls/orbit", "rawValue": "controls/orbit", "raw": "'controls/orbit'" } }, { "type": "ImportDeclaration", "start": 338, "end": 374, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 8, "column": 36 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 345, "end": 352, "loc": { "start": { "line": 8, "column": 7 }, "end": { "line": 8, "column": 14 } }, "local": { "type": "Identifier", "start": 345, "end": 352, "loc": { "start": { "line": 8, "column": 7 }, "end": { "line": 8, "column": 14 } }, "name": "Object3" } } ], "importKind": "value", "source": { "type": "Literal", "start": 358, "end": 373, "loc": { "start": { "line": 8, "column": 20 }, "end": { "line": 8, "column": 35 } }, "value": "three/object3", "rawValue": "three/object3", "raw": "'three/object3'" } }, { "type": "ImportDeclaration", "start": 375, "end": 401, "loc": { "start": { "line": 9, "column": 0 }, "end": { "line": 9, "column": 26 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 382, "end": 387, "loc": { "start": { "line": 9, "column": 7 }, "end": { "line": 9, "column": 12 } }, "local": { "type": "Identifier", "start": 382, "end": 387, "loc": { "start": { "line": 9, "column": 7 }, "end": { "line": 9, "column": 12 } }, "name": "THREE" } } ], "importKind": "value", "source": { "type": "Literal", "start": 393, "end": 400, "loc": { "start": { "line": 9, "column": 18 }, "end": { "line": 9, "column": 25 } }, "value": "three", "rawValue": "three", "raw": "'three'" } }, { "type": "ImportDeclaration", "start": 402, "end": 513, "loc": { "start": { "line": 10, "column": 0 }, "end": { "line": 10, "column": 111 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 409, "end": 421, "loc": { "start": { "line": 10, "column": 7 }, "end": { "line": 10, "column": 19 } }, "local": { "type": "Identifier", "start": 409, "end": 421, "loc": { "start": { "line": 10, "column": 7 }, "end": { "line": 10, "column": 19 } }, "name": "SketcherFont" } } ], "importKind": "value", "source": { "type": "Literal", "start": 427, "end": 512, "loc": { "start": { "line": 10, "column": 25 }, "end": { "line": 10, "column": 110 } }, "value": "json!../../node_modules/three/examples/fonts/droid/droid_sans_regular.typeface.json", "rawValue": "json!../../node_modules/three/examples/fonts/droid/droid_sans_regular.typeface.json", "raw": "'json!../../node_modules/three/examples/fonts/droid/droid_sans_regular.typeface.json'" } }, { "type": "ClassDeclaration", "start": 515, "end": 988, "loc": { "start": { "line": 12, "column": 0 }, "end": { "line": 32, "column": 1 } }, "id": { "type": "Identifier", "start": 521, "end": 535, "loc": { "start": { "line": 12, "column": 6 }, "end": { "line": 12, "column": 20 } }, "name": "CursorPosition" }, "superClass": { "type": "MemberExpression", "start": 544, "end": 557, "loc": { "start": { "line": 12, "column": 29 }, "end": { "line": 12, "column": 42 } }, "object": { "type": "Identifier", "start": 544, "end": 549, "loc": { "start": { "line": 12, "column": 29 }, "end": { "line": 12, "column": 34 } }, "name": "THREE" }, "property": { "type": "Identifier", "start": 550, "end": 557, "loc": { "start": { "line": 12, "column": 35 }, "end": { "line": 12, "column": 42 } }, "name": "Vector3" }, "computed": false }, "body": { "type": "ClassBody", "start": 558, "end": 988, "loc": { "start": { "line": 12, "column": 43 }, "end": { "line": 32, "column": 1 } }, "body": [ { "type": "MethodDefinition", "start": 564, "end": 675, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 17, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 564, "end": 575, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 15 } }, "name": "constructor" }, "static": false, "kind": "constructor", "value": { "type": "FunctionExpression", "start": 575, "end": 675, "loc": { "start": { "line": 13, "column": 15 }, "end": { "line": 17, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 576, "end": 584, "loc": { "start": { "line": 13, "column": 16 }, "end": { "line": 13, "column": 24 } }, "name": "notifier" } ], "body": { "type": "BlockStatement", "start": 586, "end": 675, "loc": { "start": { "line": 13, "column": 26 }, "end": { "line": 17, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 596, "end": 604, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 16 } }, "expression": { "type": "CallExpression", "start": 596, "end": 603, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 15 } }, "callee": { "type": "Super", "start": 596, "end": 601, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 13 } } }, "arguments": [] } }, { "type": "ExpressionStatement", "start": 613, "end": 635, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 30 } }, "expression": { "type": "AssignmentExpression", "start": 613, "end": 634, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 29 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 613, "end": 620, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 15 } }, "object": { "type": "ThisExpression", "start": 613, "end": 617, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 12 } } }, "property": { "type": "Identifier", "start": 618, "end": 620, "loc": { "start": { "line": 15, "column": 13 }, "end": { "line": 15, "column": 15 } }, "name": "_x" }, "computed": false }, "right": { "type": "AssignmentExpression", "start": 623, "end": 634, "loc": { "start": { "line": 15, "column": 18 }, "end": { "line": 15, "column": 29 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 623, "end": 630, "loc": { "start": { "line": 15, "column": 18 }, "end": { "line": 15, "column": 25 } }, "object": { "type": "ThisExpression", "start": 623, "end": 627, "loc": { "start": { "line": 15, "column": 18 }, "end": { "line": 15, "column": 22 } } }, "property": { "type": "Identifier", "start": 628, "end": 630, "loc": { "start": { "line": 15, "column": 23 }, "end": { "line": 15, "column": 25 } }, "name": "_y" }, "computed": false }, "right": { "type": "Literal", "start": 633, "end": 634, "loc": { "start": { "line": 15, "column": 28 }, "end": { "line": 15, "column": 29 } }, "value": 0, "rawValue": 0, "raw": "0" } } } }, { "type": "ExpressionStatement", "start": 644, "end": 669, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 33 } }, "expression": { "type": "AssignmentExpression", "start": 644, "end": 668, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 32 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 644, "end": 657, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 21 } }, "object": { "type": "ThisExpression", "start": 644, "end": 648, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 12 } } }, "property": { "type": "Identifier", "start": 649, "end": 657, "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 21 } }, "name": "notifier" }, "computed": false }, "right": { "type": "Identifier", "start": 660, "end": 668, "loc": { "start": { "line": 16, "column": 24 }, "end": { "line": 16, "column": 32 } }, "name": "notifier" } } } ] } } }, { "type": "MethodDefinition", "start": 680, "end": 707, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 31 } }, "computed": false, "key": { "type": "Identifier", "start": 684, "end": 685, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 9 } }, "name": "x" }, "static": false, "kind": "get", "value": { "type": "FunctionExpression", "start": 685, "end": 707, "loc": { "start": { "line": 18, "column": 9 }, "end": { "line": 18, "column": 31 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 688, "end": 707, "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 31 } }, "body": [ { "type": "ReturnStatement", "start": 690, "end": 705, "loc": { "start": { "line": 18, "column": 14 }, "end": { "line": 18, "column": 29 } }, "argument": { "type": "MemberExpression", "start": 697, "end": 704, "loc": { "start": { "line": 18, "column": 21 }, "end": { "line": 18, "column": 28 } }, "object": { "type": "ThisExpression", "start": 697, "end": 701, "loc": { "start": { "line": 18, "column": 21 }, "end": { "line": 18, "column": 25 } } }, "property": { "type": "Identifier", "start": 702, "end": 704, "loc": { "start": { "line": 18, "column": 26 }, "end": { "line": 18, "column": 28 } }, "name": "_x" }, "computed": false } } ] } } }, { "type": "MethodDefinition", "start": 712, "end": 739, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 31 } }, "computed": false, "key": { "type": "Identifier", "start": 716, "end": 717, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 9 } }, "name": "y" }, "static": false, "kind": "get", "value": { "type": "FunctionExpression", "start": 717, "end": 739, "loc": { "start": { "line": 19, "column": 9 }, "end": { "line": 19, "column": 31 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 720, "end": 739, "loc": { "start": { "line": 19, "column": 12 }, "end": { "line": 19, "column": 31 } }, "body": [ { "type": "ReturnStatement", "start": 722, "end": 737, "loc": { "start": { "line": 19, "column": 14 }, "end": { "line": 19, "column": 29 } }, "argument": { "type": "MemberExpression", "start": 729, "end": 736, "loc": { "start": { "line": 19, "column": 21 }, "end": { "line": 19, "column": 28 } }, "object": { "type": "ThisExpression", "start": 729, "end": 733, "loc": { "start": { "line": 19, "column": 21 }, "end": { "line": 19, "column": 25 } } }, "property": { "type": "Identifier", "start": 734, "end": 736, "loc": { "start": { "line": 19, "column": 26 }, "end": { "line": 19, "column": 28 } }, "name": "_y" }, "computed": false } } ] } } }, { "type": "MethodDefinition", "start": 744, "end": 765, "loc": { "start": { "line": 20, "column": 4 }, "end": { "line": 20, "column": 25 } }, "computed": false, "key": { "type": "Identifier", "start": 748, "end": 749, "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 9 } }, "name": "z" }, "static": false, "kind": "get", "value": { "type": "FunctionExpression", "start": 749, "end": 765, "loc": { "start": { "line": 20, "column": 9 }, "end": { "line": 20, "column": 25 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 752, "end": 765, "loc": { "start": { "line": 20, "column": 12 }, "end": { "line": 20, "column": 25 } }, "body": [ { "type": "ReturnStatement", "start": 754, "end": 763, "loc": { "start": { "line": 20, "column": 14 }, "end": { "line": 20, "column": 23 } }, "argument": { "type": "Literal", "start": 761, "end": 762, "loc": { "start": { "line": 20, "column": 21 }, "end": { "line": 20, "column": 22 } }, "value": 0, "rawValue": 0, "raw": "0" } } ] } } }, { "type": "MethodDefinition", "start": 770, "end": 854, "loc": { "start": { "line": 21, "column": 4 }, "end": { "line": 25, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 770, "end": 773, "loc": { "start": { "line": 21, "column": 4 }, "end": { "line": 21, "column": 7 } }, "name": "set" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 773, "end": 854, "loc": { "start": { "line": 21, "column": 7 }, "end": { "line": 25, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 774, "end": 775, "loc": { "start": { "line": 21, "column": 8 }, "end": { "line": 21, "column": 9 } }, "name": "x" }, { "type": "Identifier", "start": 777, "end": 778, "loc": { "start": { "line": 21, "column": 11 }, "end": { "line": 21, "column": 12 } }, "name": "y" } ], "body": { "type": "BlockStatement", "start": 780, "end": 854, "loc": { "start": { "line": 21, "column": 14 }, "end": { "line": 25, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 790, "end": 802, "loc": { "start": { "line": 22, "column": 8 }, "end": { "line": 22, "column": 20 } }, "expression": { "type": "AssignmentExpression", "start": 790, "end": 801, "loc": { "start": { "line": 22, "column": 8 }, "end": { "line": 22, "column": 19 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 790, "end": 797, "loc": { "start": { "line": 22, "column": 8 }, "end": { "line": 22, "column": 15 } }, "object": { "type": "ThisExpression", "start": 790, "end": 794, "loc": { "start": { "line": 22, "column": 8 }, "end": { "line": 22, "column": 12 } } }, "property": { "type": "Identifier", "start": 795, "end": 797, "loc": { "start": { "line": 22, "column": 13 }, "end": { "line": 22, "column": 15 } }, "name": "_x" }, "computed": false }, "right": { "type": "Identifier", "start": 800, "end": 801, "loc": { "start": { "line": 22, "column": 18 }, "end": { "line": 22, "column": 19 }