awv3
Version:
AWV client CAD framework
1,742 lines • 3.48 MB
JSON
{
"type": "Program",
"start": 0,
"end": 33608,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 823,
"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": 96,
"end": 149,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 53
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 104,
"end": 118,
"loc": {
"start": {
"line": 2,
"column": 8
},
"end": {
"line": 2,
"column": 22
}
},
"imported": {
"type": "Identifier",
"start": 104,
"end": 118,
"loc": {
"start": {
"line": 2,
"column": 8
},
"end": {
"line": 2,
"column": 22
}
},
"name": "ClassCadObject"
},
"local": {
"type": "Identifier",
"start": 104,
"end": 118,
"loc": {
"start": {
"line": 2,
"column": 8
},
"end": {
"line": 2,
"column": 22
}
},
"name": "ClassCadObject"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 125,
"end": 148,
"loc": {
"start": {
"line": 2,
"column": 29
},
"end": {
"line": 2,
"column": 52
}
},
"value": "../sketcher/ccobjects",
"rawValue": "../sketcher/ccobjects",
"raw": "'../sketcher/ccobjects'"
}
},
{
"type": "ImportDeclaration",
"start": 150,
"end": 194,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 44
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 157,
"end": 165,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 15
}
},
"local": {
"type": "Identifier",
"start": 157,
"end": 165,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 15
}
},
"name": "Sketcher"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 171,
"end": 193,
"loc": {
"start": {
"line": 3,
"column": 21
},
"end": {
"line": 3,
"column": 43
}
},
"value": "../sketcher/sketcher",
"rawValue": "../sketcher/sketcher",
"raw": "'../sketcher/sketcher'"
}
},
{
"type": "ImportDeclaration",
"start": 195,
"end": 243,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 48
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 202,
"end": 212,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 17
}
},
"local": {
"type": "Identifier",
"start": 202,
"end": 212,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 17
}
},
"name": "Constraint"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 218,
"end": 242,
"loc": {
"start": {
"line": 4,
"column": 23
},
"end": {
"line": 4,
"column": 47
}
},
"value": "../sketcher/constraint",
"rawValue": "../sketcher/constraint",
"raw": "'../sketcher/constraint'"
}
},
{
"type": "ImportDeclaration",
"start": 244,
"end": 306,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 62
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 252,
"end": 271,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 27
}
},
"imported": {
"type": "Identifier",
"start": 252,
"end": 271,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 27
}
},
"name": "ConstraintGenerator"
},
"local": {
"type": "Identifier",
"start": 252,
"end": 271,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 27
}
},
"name": "ConstraintGenerator"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 278,
"end": 305,
"loc": {
"start": {
"line": 5,
"column": 34
},
"end": {
"line": 5,
"column": 61
}
},
"value": "../sketcher/constraintgen",
"rawValue": "../sketcher/constraintgen",
"raw": "'../sketcher/constraintgen'"
}
},
{
"type": "ImportDeclaration",
"start": 307,
"end": 364,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 57
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 315,
"end": 320,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 13
}
},
"imported": {
"type": "Identifier",
"start": 315,
"end": 320,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 13
}
},
"name": "Point"
},
"local": {
"type": "Identifier",
"start": 315,
"end": 320,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 13
}
},
"name": "Point"
}
},
{
"type": "ImportSpecifier",
"start": 322,
"end": 326,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 6,
"column": 19
}
},
"imported": {
"type": "Identifier",
"start": 322,
"end": 326,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 6,
"column": 19
}
},
"name": "Line"
},
"local": {
"type": "Identifier",
"start": 322,
"end": 326,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 6,
"column": 19
}
},
"name": "Line"
}
},
{
"type": "ImportSpecifier",
"start": 328,
"end": 331,
"loc": {
"start": {
"line": 6,
"column": 21
},
"end": {
"line": 6,
"column": 24
}
},
"imported": {
"type": "Identifier",
"start": 328,
"end": 331,
"loc": {
"start": {
"line": 6,
"column": 21
},
"end": {
"line": 6,
"column": 24
}
},
"name": "Arc"
},
"local": {
"type": "Identifier",
"start": 328,
"end": 331,
"loc": {
"start": {
"line": 6,
"column": 21
},
"end": {
"line": 6,
"column": 24
}
},
"name": "Arc"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 338,
"end": 363,
"loc": {
"start": {
"line": 6,
"column": 31
},
"end": {
"line": 6,
"column": 56
}
},
"value": "../sketcher/geomobjects",
"rawValue": "../sketcher/geomobjects",
"raw": "'../sketcher/geomobjects'"
}
},
{
"type": "ImportDeclaration",
"start": 365,
"end": 404,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 39
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 372,
"end": 379,
"loc": {
"start": {
"line": 7,
"column": 7
},
"end": {
"line": 7,
"column": 14
}
},
"local": {
"type": "Identifier",
"start": 372,
"end": 379,
"loc": {
"start": {
"line": 7,
"column": 7
},
"end": {
"line": 7,
"column": 14
}
},
"name": "Object3"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 385,
"end": 403,
"loc": {
"start": {
"line": 7,
"column": 20
},
"end": {
"line": 7,
"column": 38
}
},
"value": "../three/object3",
"rawValue": "../three/object3",
"raw": "'../three/object3'"
}
},
{
"type": "ImportDeclaration",
"start": 405,
"end": 437,
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 32
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 412,
"end": 416,
"loc": {
"start": {
"line": 8,
"column": 7
},
"end": {
"line": 8,
"column": 11
}
},
"local": {
"type": "Identifier",
"start": 412,
"end": 416,
"loc": {
"start": {
"line": 8,
"column": 7
},
"end": {
"line": 8,
"column": 11
}
},
"name": "View"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 422,
"end": 436,
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 31
}
},
"value": "../core/view",
"rawValue": "../core/view",
"raw": "'../core/view'"
}
},
{
"type": "ImportDeclaration",
"start": 438,
"end": 464,
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 9,
"column": 26
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 445,
"end": 450,
"loc": {
"start": {
"line": 9,
"column": 7
},
"end": {
"line": 9,
"column": 12
}
},
"local": {
"type": "Identifier",
"start": 445,
"end": 450,
"loc": {
"start": {
"line": 9,
"column": 7
},
"end": {
"line": 9,
"column": 12
}
},
"name": "THREE"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 456,
"end": 463,
"loc": {
"start": {
"line": 9,
"column": 18
},
"end": {
"line": 9,
"column": 25
}
},
"value": "three",
"rawValue": "three",
"raw": "'three'"
}
},
{
"type": "ExportDefaultDeclaration",
"start": 466,
"end": 33555,
"loc": {
"start": {
"line": 11,
"column": 0
},
"end": {
"line": 820,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 481,
"end": 33555,
"loc": {
"start": {
"line": 11,
"column": 15
},
"end": {
"line": 820,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 487,
"end": 493,
"loc": {
"start": {
"line": 11,
"column": 21
},
"end": {
"line": 11,
"column": 27
}
},
"name": "Sketch"
},
"superClass": {
"type": "Identifier",
"start": 502,
"end": 516,
"loc": {
"start": {
"line": 11,
"column": 36
},
"end": {
"line": 11,
"column": 50
}
},
"name": "ClassCadObject"
},
"body": {
"type": "ClassBody",
"start": 517,
"end": 33555,
"loc": {
"start": {
"line": 11,
"column": 51
},
"end": {
"line": 820,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 523,
"end": 4100,
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 82,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 523,
"end": 534,
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 12,
"column": 15
}
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"value": {
"type": "FunctionExpression",
"start": 534,
"end": 4100,
"loc": {
"start": {
"line": 12,
"column": 15
},
"end": {
"line": 82,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 537,
"end": 4100,
"loc": {
"start": {
"line": 12,
"column": 18
},
"end": {
"line": 82,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 547,
"end": 555,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 16
}
},
"expression": {
"type": "CallExpression",
"start": 547,
"end": 554,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 15
}
},
"callee": {
"type": "Super",
"start": 547,
"end": 552,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 13
}
}
},
"arguments": []
},
"trailingComments": [
{
"type": "CommentLine",
"value": " set of objects added with addToSketch",
"start": 564,
"end": 604,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 48
}
},
"range": [
564,
604
]
}
]
},
{
"type": "ExpressionStatement",
"start": 613,
"end": 648,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 43
}
},
"expression": {
"type": "AssignmentExpression",
"start": 613,
"end": 647,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 42
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 613,
"end": 631,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 26
}
},
"object": {
"type": "ThisExpression",
"start": 613,
"end": 617,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 12
}
},
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 618,
"end": 631,
"loc": {
"start": {
"line": 15,
"column": 13
},
"end": {
"line": 15,
"column": 26
}
},
"name": "sketchObjects"
},
"computed": false,
"leadingComments": null
},
"right": {
"type": "NewExpression",
"start": 634,
"end": 647,
"loc": {
"start": {
"line": 15,
"column": 29
},
"end": {
"line": 15,
"column": 42
}
},
"callee": {
"type": "Identifier",
"start": 638,
"end": 645,
"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": 564,
"end": 604,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 48
}
},
"range": [
564,
604
]
}
],
"trailingComments": [
{
"type": "CommentLine",
"value": "Note: should not be accessed by anyone accept Sketcher",
"start": 657,
"end": 713,
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 64
}
},
"range": [
657,
713
]
}
]
},
{
"type": "ExpressionStatement",
"start": 722,
"end": 829,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 115
}
},
"expression": {
"type": "AssignmentExpression",
"start": 722,
"end": 828,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 114
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 722,
"end": 746,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 32
}
},
"object": {
"type": "ThisExpression",
"start": 722,
"end": 726,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 12
}
},
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 727,
"end": 746,
"loc": {
"start": {
"line": 17,
"column": 13
},
"end": {
"line": 17,
"column": 32
}
},
"name": "infiniteBoxMaterial"
},
"computed": false,
"leadingComments": null
},
"right": {
"type": "NewExpression",
"start": 749,
"end": 828,
"loc": {
"start": {
"line": 17,
"column": 35
},
"end": {
"line": 17,
"column": 114
}
},
"callee": {
"type": "MemberExpression",
"start": 753,
"end": 776,
"loc": {
"start": {
"line": 17,
"column": 39
},
"end": {
"line": 17,
"column": 62
}
},
"object": {
"type": "Identifier",
"start": 753,
"end": 758,
"loc": {
"start": {
"line": 17,
"column": 39
},
"end": {
"line": 17,
"column": 44
}
},
"name": "THREE"
},
"property": {
"type": "Identifier",
"start": 759,
"end": 776,
"loc": {
"start": {
"line": 17,
"column": 45
},
"end": {
"line": 17,
"column": 62
}
},
"name": "MeshBasicMaterial"
},
"computed": false
},
"arguments": [
{
"type": "ObjectExpression",
"start": 777,
"end": 827,
"loc": {
"start": {
"line": 17,
"column": 63
},
"end": {
"line": 17,
"column": 113
}
},
"properties": [
{
"type": "Property",
"start": 778,
"end": 793,
"loc": {
"start": {
"line": 17,
"column": 64
},
"end": {
"line": 17,
"column": 79
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 778,
"end": 783,
"loc": {
"start": {
"line": 17,
"column": 64
},
"end": {
"line": 17,
"column": 69
}
},
"name": "color"
},
"value": {
"type": "Literal",
"start": 785,
"end": 793,
"loc": {
"start": {
"line": 17,
"column": 71
},
"end": {
"line": 17,
"column": 79
}
},
"value": 4144959,
"rawValue": 4144959,
"raw": "0x3f3f3f"
},
"kind": "init"
},
{
"type": "Property",
"start": 795,
"end": 810,
"loc": {
"start": {
"line": 17,
"column": 81
},
"end": {
"line": 17,
"column": 96
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 795,
"end": 804,
"loc": {
"start": {
"line": 17,
"column": 81
},
"end": {
"line": 17,
"column": 90
}
},
"name": "wireframe"
},
"value": {
"type": "Literal",
"start": 806,
"end": 810,
"loc": {
"start": {
"line": 17,
"column": 92
},
"end": {
"line": 17,
"column": 96
}
},
"value": true,
"rawValue": true,
"raw": "true"
},
"kind": "init"
},
{
"type": "Property",
"start": 812,
"end": 826,
"loc": {
"start": {
"line": 17,
"column": 98
},
"end": {
"line": 17,
"column": 112
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 812,
"end": 819,
"loc": {
"start": {
"line": 17,
"column": 98
},
"end": {
"line": 17,
"column": 105
}
},
"name": "visible"
},
"value": {
"type": "Literal",
"start": 821,
"end": 826,
"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": 657,
"end": 713,
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 64
}
},
"range": [
657,
713
]
}
]
},
{
"type": "ExpressionStatement",
"start": 838,
"end": 1074,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 22,
"column": 15
}
},
"expression": {
"type": "AssignmentExpression",
"start": 838,
"end": 1073,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 22,
"column": 14
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 838,
"end": 859,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 29
}
},
"object": {
"type": "ThisExpression",
"start": 838,
"end": 842,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 843,
"end": 859,
"loc": {
"start": {
"line": 18,
"col