awv3
Version:
AWV client CAD framework
1,742 lines • 3.49 MB
JSON
{
"type": "Program",
"start": 0,
"end": 34735,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 828,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 95,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 95
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 8,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 18
}
},
"imported": {
"type": "Identifier",
"start": 8,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 18
}
},
"name": "Expression"
},
"local": {
"type": "Identifier",
"start": 8,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 18
}
},
"name": "Expression"
}
},
{
"type": "ImportSpecifier",
"start": 20,
"end": 29,
"loc": {
"start": {
"line": 1,
"column": 20
},
"end": {
"line": 1,
"column": 29
}
},
"imported": {
"type": "Identifier",
"start": 20,
"end": 29,
"loc": {
"start": {
"line": 1,
"column": 20
},
"end": {
"line": 1,
"column": 29
}
},
"name": "Statement"
},
"local": {
"type": "Identifier",
"start": 20,
"end": 29,
"loc": {
"start": {
"line": 1,
"column": 20
},
"end": {
"line": 1,
"column": 29
}
},
"name": "Statement"
}
},
{
"type": "ImportSpecifier",
"start": 31,
"end": 41,
"loc": {
"start": {
"line": 1,
"column": 31
},
"end": {
"line": 1,
"column": 41
}
},
"imported": {
"type": "Identifier",
"start": 31,
"end": 41,
"loc": {
"start": {
"line": 1,
"column": 31
},
"end": {
"line": 1,
"column": 41
}
},
"name": "Statements"
},
"local": {
"type": "Identifier",
"start": 31,
"end": 41,
"loc": {
"start": {
"line": 1,
"column": 31
},
"end": {
"line": 1,
"column": 41
}
},
"name": "Statements"
}
},
{
"type": "ImportSpecifier",
"start": 43,
"end": 50,
"loc": {
"start": {
"line": 1,
"column": 43
},
"end": {
"line": 1,
"column": 50
}
},
"imported": {
"type": "Identifier",
"start": 43,
"end": 50,
"loc": {
"start": {
"line": 1,
"column": 43
},
"end": {
"line": 1,
"column": 50
}
},
"name": "parseTo"
},
"local": {
"type": "Identifier",
"start": 43,
"end": 50,
"loc": {
"start": {
"line": 1,
"column": 43
},
"end": {
"line": 1,
"column": 50
}
},
"name": "parseTo"
}
},
{
"type": "ImportSpecifier",
"start": 52,
"end": 64,
"loc": {
"start": {
"line": 1,
"column": 52
},
"end": {
"line": 1,
"column": 64
}
},
"imported": {
"type": "Identifier",
"start": 52,
"end": 64,
"loc": {
"start": {
"line": 1,
"column": 52
},
"end": {
"line": 1,
"column": 64
}
},
"name": "trackPromise"
},
"local": {
"type": "Identifier",
"start": 52,
"end": 64,
"loc": {
"start": {
"line": 1,
"column": 52
},
"end": {
"line": 1,
"column": 64
}
},
"name": "trackPromise"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 71,
"end": 94,
"loc": {
"start": {
"line": 1,
"column": 71
},
"end": {
"line": 1,
"column": 94
}
},
"value": "../sketcher/cchelpers",
"rawValue": "../sketcher/cchelpers",
"raw": "'../sketcher/cchelpers'"
}
},
{
"type": "ImportDeclaration",
"start": 97,
"end": 150,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 53
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 105,
"end": 119,
"loc": {
"start": {
"line": 2,
"column": 8
},
"end": {
"line": 2,
"column": 22
}
},
"imported": {
"type": "Identifier",
"start": 105,
"end": 119,
"loc": {
"start": {
"line": 2,
"column": 8
},
"end": {
"line": 2,
"column": 22
}
},
"name": "ClassCadObject"
},
"local": {
"type": "Identifier",
"start": 105,
"end": 119,
"loc": {
"start": {
"line": 2,
"column": 8
},
"end": {
"line": 2,
"column": 22
}
},
"name": "ClassCadObject"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 126,
"end": 149,
"loc": {
"start": {
"line": 2,
"column": 29
},
"end": {
"line": 2,
"column": 52
}
},
"value": "../sketcher/ccobjects",
"rawValue": "../sketcher/ccobjects",
"raw": "'../sketcher/ccobjects'"
}
},
{
"type": "ImportDeclaration",
"start": 152,
"end": 196,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 44
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 159,
"end": 167,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 15
}
},
"local": {
"type": "Identifier",
"start": 159,
"end": 167,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 15
}
},
"name": "Sketcher"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 173,
"end": 195,
"loc": {
"start": {
"line": 3,
"column": 21
},
"end": {
"line": 3,
"column": 43
}
},
"value": "../sketcher/sketcher",
"rawValue": "../sketcher/sketcher",
"raw": "'../sketcher/sketcher'"
}
},
{
"type": "ImportDeclaration",
"start": 198,
"end": 246,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 48
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 205,
"end": 215,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 17
}
},
"local": {
"type": "Identifier",
"start": 205,
"end": 215,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 17
}
},
"name": "Constraint"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 221,
"end": 245,
"loc": {
"start": {
"line": 4,
"column": 23
},
"end": {
"line": 4,
"column": 47
}
},
"value": "../sketcher/constraint",
"rawValue": "../sketcher/constraint",
"raw": "'../sketcher/constraint'"
}
},
{
"type": "ImportDeclaration",
"start": 248,
"end": 310,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 62
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 256,
"end": 275,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 27
}
},
"imported": {
"type": "Identifier",
"start": 256,
"end": 275,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 27
}
},
"name": "ConstraintGenerator"
},
"local": {
"type": "Identifier",
"start": 256,
"end": 275,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 27
}
},
"name": "ConstraintGenerator"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 282,
"end": 309,
"loc": {
"start": {
"line": 5,
"column": 34
},
"end": {
"line": 5,
"column": 61
}
},
"value": "../sketcher/constraintgen",
"rawValue": "../sketcher/constraintgen",
"raw": "'../sketcher/constraintgen'"
}
},
{
"type": "ImportDeclaration",
"start": 312,
"end": 369,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 57
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 320,
"end": 325,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 13
}
},
"imported": {
"type": "Identifier",
"start": 320,
"end": 325,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 13
}
},
"name": "Point"
},
"local": {
"type": "Identifier",
"start": 320,
"end": 325,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 13
}
},
"name": "Point"
}
},
{
"type": "ImportSpecifier",
"start": 327,
"end": 331,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 6,
"column": 19
}
},
"imported": {
"type": "Identifier",
"start": 327,
"end": 331,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 6,
"column": 19
}
},
"name": "Line"
},
"local": {
"type": "Identifier",
"start": 327,
"end": 331,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 6,
"column": 19
}
},
"name": "Line"
}
},
{
"type": "ImportSpecifier",
"start": 333,
"end": 336,
"loc": {
"start": {
"line": 6,
"column": 21
},
"end": {
"line": 6,
"column": 24
}
},
"imported": {
"type": "Identifier",
"start": 333,
"end": 336,
"loc": {
"start": {
"line": 6,
"column": 21
},
"end": {
"line": 6,
"column": 24
}
},
"name": "Arc"
},
"local": {
"type": "Identifier",
"start": 333,
"end": 336,
"loc": {
"start": {
"line": 6,
"column": 21
},
"end": {
"line": 6,
"column": 24
}
},
"name": "Arc"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 343,
"end": 368,
"loc": {
"start": {
"line": 6,
"column": 31
},
"end": {
"line": 6,
"column": 56
}
},
"value": "../sketcher/geomobjects",
"rawValue": "../sketcher/geomobjects",
"raw": "'../sketcher/geomobjects'"
}
},
{
"type": "ImportDeclaration",
"start": 371,
"end": 410,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 39
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 378,
"end": 385,
"loc": {
"start": {
"line": 7,
"column": 7
},
"end": {
"line": 7,
"column": 14
}
},
"local": {
"type": "Identifier",
"start": 378,
"end": 385,
"loc": {
"start": {
"line": 7,
"column": 7
},
"end": {
"line": 7,
"column": 14
}
},
"name": "Object3"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 391,
"end": 409,
"loc": {
"start": {
"line": 7,
"column": 20
},
"end": {
"line": 7,
"column": 38
}
},
"value": "../three/object3",
"rawValue": "../three/object3",
"raw": "'../three/object3'"
}
},
{
"type": "ImportDeclaration",
"start": 412,
"end": 444,
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 32
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 419,
"end": 423,
"loc": {
"start": {
"line": 8,
"column": 7
},
"end": {
"line": 8,
"column": 11
}
},
"local": {
"type": "Identifier",
"start": 419,
"end": 423,
"loc": {
"start": {
"line": 8,
"column": 7
},
"end": {
"line": 8,
"column": 11
}
},
"name": "View"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 429,
"end": 443,
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 31
}
},
"value": "../core/view",
"rawValue": "../core/view",
"raw": "'../core/view'"
}
},
{
"type": "ImportDeclaration",
"start": 446,
"end": 472,
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 9,
"column": 26
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 453,
"end": 458,
"loc": {
"start": {
"line": 9,
"column": 7
},
"end": {
"line": 9,
"column": 12
}
},
"local": {
"type": "Identifier",
"start": 453,
"end": 458,
"loc": {
"start": {
"line": 9,
"column": 7
},
"end": {
"line": 9,
"column": 12
}
},
"name": "THREE"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 464,
"end": 471,
"loc": {
"start": {
"line": 9,
"column": 18
},
"end": {
"line": 9,
"column": 25
}
},
"value": "three",
"rawValue": "three",
"raw": "'three'"
}
},
{
"type": "ExportDefaultDeclaration",
"start": 476,
"end": 34679,
"loc": {
"start": {
"line": 11,
"column": 0
},
"end": {
"line": 825,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 491,
"end": 34679,
"loc": {
"start": {
"line": 11,
"column": 15
},
"end": {
"line": 825,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 497,
"end": 503,
"loc": {
"start": {
"line": 11,
"column": 21
},
"end": {
"line": 11,
"column": 27
}
},
"name": "Sketch"
},
"superClass": {
"type": "Identifier",
"start": 512,
"end": 526,
"loc": {
"start": {
"line": 11,
"column": 36
},
"end": {
"line": 11,
"column": 50
}
},
"name": "ClassCadObject"
},
"body": {
"type": "ClassBody",
"start": 527,
"end": 34679,
"loc": {
"start": {
"line": 11,
"column": 51
},
"end": {
"line": 825,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 534,
"end": 4181,
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 82,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 534,
"end": 545,
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 12,
"column": 15
}
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"value": {
"type": "FunctionExpression",
"start": 545,
"end": 4181,
"loc": {
"start": {
"line": 12,
"column": 15
},
"end": {
"line": 82,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 548,
"end": 4181,
"loc": {
"start": {
"line": 12,
"column": 18
},
"end": {
"line": 82,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 559,
"end": 567,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 16
}
},
"expression": {
"type": "CallExpression",
"start": 559,
"end": 566,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 15
}
},
"callee": {
"type": "Super",
"start": 559,
"end": 564,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 13
}
}
},
"arguments": []
},
"trailingComments": [
{
"type": "CommentLine",
"value": " set of objects added with addToSketch",
"start": 577,
"end": 617,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 48
}
},
"range": [
577,
617
]
}
]
},
{
"type": "ExpressionStatement",
"start": 627,
"end": 662,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 43
}
},
"expression": {
"type": "AssignmentExpression",
"start": 627,
"end": 661,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 42
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 627,
"end": 645,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 26
}
},
"object": {
"type": "ThisExpression",
"start": 627,
"end": 631,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 12
}
},
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 632,
"end": 645,
"loc": {
"start": {
"line": 15,
"column": 13
},
"end": {
"line": 15,
"column": 26
}
},
"name": "sketchObjects"
},
"computed": false,
"leadingComments": null
},
"right": {
"type": "NewExpression",
"start": 648,
"end": 661,
"loc": {
"start": {
"line": 15,
"column": 29
},
"end": {
"line": 15,
"column": 42
}
},
"callee": {
"type": "Identifier",
"start": 652,
"end": 659,
"loc": {
"start": {
"line": 15,
"column": 33
},
"end": {
"line": 15,
"column": 40
}
},
"name": "WeakSet"
},
"arguments": []
},
"leadingComments": null
},
"leadingComments": [
{
"type": "CommentLine",
"value": " set of objects added with addToSketch",
"start": 577,
"end": 617,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 48
}
},
"range": [
577,
617
]
}
],
"trailingComments": [
{
"type": "CommentLine",
"value": "Note: should not be accessed by anyone accept Sketcher",
"start": 672,
"end": 728,
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 64
}
},
"range": [
672,
728
]
}
]
},
{
"type": "ExpressionStatement",
"start": 738,
"end": 845,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 115
}
},
"expression": {
"type": "AssignmentExpression",
"start": 738,
"end": 844,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 114
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 738,
"end": 762,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 32
}
},
"object": {
"type": "ThisExpression",
"start": 738,
"end": 742,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 12
}
},
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 743,
"end": 762,
"loc": {
"start": {
"line": 17,
"column": 13
},
"end": {
"line": 17,
"column": 32
}
},
"name": "infiniteBoxMaterial"
},
"computed": false,
"leadingComments": null
},
"right": {
"type": "NewExpression",
"start": 765,
"end": 844,
"loc": {
"start": {
"line": 17,
"column": 35
},
"end": {
"line": 17,
"column": 114
}
},
"callee": {
"type": "MemberExpression",
"start": 769,
"end": 792,
"loc": {
"start": {
"line": 17,
"column": 39
},
"end": {
"line": 17,
"column": 62
}
},
"object": {
"type": "Identifier",
"start": 769,
"end": 774,
"loc": {
"start": {
"line": 17,
"column": 39
},
"end": {
"line": 17,
"column": 44
}
},
"name": "THREE"
},
"property": {
"type": "Identifier",
"start": 775,
"end": 792,
"loc": {
"start": {
"line": 17,
"column": 45
},
"end": {
"line": 17,
"column": 62
}
},
"name": "MeshBasicMaterial"
},
"computed": false
},
"arguments": [
{
"type": "ObjectExpression",
"start": 793,
"end": 843,
"loc": {
"start": {
"line": 17,
"column": 63
},
"end": {
"line": 17,
"column": 113
}
},
"properties": [
{
"type": "Property",
"start": 794,
"end": 809,
"loc": {
"start": {
"line": 17,
"column": 64
},
"end": {
"line": 17,
"column": 79
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 794,
"end": 799,
"loc": {
"start": {
"line": 17,
"column": 64
},
"end": {
"line": 17,
"column": 69
}
},
"name": "color"
},
"value": {
"type": "Literal",
"start": 801,
"end": 809,
"loc": {
"start": {
"line": 17,
"column": 71
},
"end": {
"line": 17,
"column": 79
}
},
"value": 4144959,
"rawValue": 4144959,
"raw": "0x3f3f3f"
},
"kind": "init"
},
{
"type": "Property",
"start": 811,
"end": 826,
"loc": {
"start": {
"line": 17,
"column": 81
},
"end": {
"line": 17,
"column": 96
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 811,
"end": 820,
"loc": {
"start": {
"line": 17,
"column": 81
},
"end": {
"line": 17,
"column": 90
}
},
"name": "wireframe"
},
"value": {
"type": "Literal",
"start": 822,
"end": 826,
"loc": {
"start": {
"line": 17,
"column": 92
},
"end": {
"line": 17,
"column": 96
}
},
"value": true,
"rawValue": true,
"raw": "true"
},
"kind": "init"
},
{
"type": "Property",
"start": 828,
"end": 842,
"loc": {
"start": {
"line": 17,
"column": 98
},
"end": {
"line": 17,
"column": 112
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 828,
"end": 835,
"loc": {
"start": {
"line": 17,
"column": 98
},
"end": {
"line": 17,
"column": 105
}
},
"name": "visible"
},
"value": {
"type": "Literal",
"start": 837,
"end": 842,
"loc": {
"start": {
"line": 17,
"column": 107
},
"end": {
"line": 17,
"column": 112
}
},
"value": false,
"rawValue": false,
"raw": "false"
},
"kind": "init"
}
]
}
]
},
"leadingComments": null
},
"leadingComments": [
{
"type": "CommentLine",
"value": "Note: should not be accessed by anyone accept Sketcher",
"start": 672,
"end": 728,
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 64
}
},
"range": [
672,
728
]
}
]
},
{
"type": "ExpressionStatement",
"start": 855,
"end": 1095,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 22,
"column": 15
}
},
"expression": {
"type": "AssignmentExpression",
"start": 855,
"end": 1094,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 22,
"column": 14
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 855,
"end": 876,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 29
}
},
"object": {
"type": "ThisExpression",
"start": 855,
"end": 859,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 860,
"end": 876,
"loc": {
"start": {
"line": 18,
"col