awv3
Version:
AWV client CAD framework
1,724 lines (1,723 loc) • 3.5 MB
JSON
{
"type": "Program",
"start": 0,
"end": 33956,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 822,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 50,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 50
}
},
"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": 49,
"loc": {
"start": {
"line": 1,
"column": 29
},
"end": {
"line": 1,
"column": 49
}
},
"value": "sketcher/ccobjects",
"rawValue": "sketcher/ccobjects",
"raw": "'sketcher/ccobjects'"
}
},
{
"type": "ImportDeclaration",
"start": 51,
"end": 92,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 41
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 58,
"end": 66,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 15
}
},
"local": {
"type": "Identifier",
"start": 58,
"end": 66,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 15
}
},
"name": "Sketcher"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 72,
"end": 91,
"loc": {
"start": {
"line": 2,
"column": 21
},
"end": {
"line": 2,
"column": 40
}
},
"value": "sketcher/sketcher",
"rawValue": "sketcher/sketcher",
"raw": "'sketcher/sketcher'"
}
},
{
"type": "ImportDeclaration",
"start": 93,
"end": 138,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 45
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 100,
"end": 110,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 17
}
},
"local": {
"type": "Identifier",
"start": 100,
"end": 110,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 17
}
},
"name": "Constraint"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 116,
"end": 137,
"loc": {
"start": {
"line": 3,
"column": 23
},
"end": {
"line": 3,
"column": 44
}
},
"value": "sketcher/constraint",
"rawValue": "sketcher/constraint",
"raw": "'sketcher/constraint'"
}
},
{
"type": "ImportDeclaration",
"start": 139,
"end": 198,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 59
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 147,
"end": 166,
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 4,
"column": 27
}
},
"imported": {
"type": "Identifier",
"start": 147,
"end": 166,
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 4,
"column": 27
}
},
"name": "ConstraintGenerator"
},
"local": {
"type": "Identifier",
"start": 147,
"end": 166,
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 4,
"column": 27
}
},
"name": "ConstraintGenerator"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 173,
"end": 197,
"loc": {
"start": {
"line": 4,
"column": 34
},
"end": {
"line": 4,
"column": 58
}
},
"value": "sketcher/constraintgen",
"rawValue": "sketcher/constraintgen",
"raw": "'sketcher/constraintgen'"
}
},
{
"type": "ImportDeclaration",
"start": 199,
"end": 293,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 94
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 207,
"end": 222,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 23
}
},
"imported": {
"type": "Identifier",
"start": 207,
"end": 222,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 23
}
},
"name": "executePrepared"
},
"local": {
"type": "Identifier",
"start": 207,
"end": 222,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 23
}
},
"name": "executePrepared"
}
},
{
"type": "ImportSpecifier",
"start": 224,
"end": 236,
"loc": {
"start": {
"line": 5,
"column": 25
},
"end": {
"line": 5,
"column": 37
}
},
"imported": {
"type": "Identifier",
"start": 224,
"end": 236,
"loc": {
"start": {
"line": 5,
"column": 25
},
"end": {
"line": 5,
"column": 37
}
},
"name": "trackPromise"
},
"local": {
"type": "Identifier",
"start": 224,
"end": 236,
"loc": {
"start": {
"line": 5,
"column": 25
},
"end": {
"line": 5,
"column": 37
}
},
"name": "trackPromise"
}
},
{
"type": "ImportSpecifier",
"start": 238,
"end": 245,
"loc": {
"start": {
"line": 5,
"column": 39
},
"end": {
"line": 5,
"column": 46
}
},
"imported": {
"type": "Identifier",
"start": 238,
"end": 245,
"loc": {
"start": {
"line": 5,
"column": 39
},
"end": {
"line": 5,
"column": 46
}
},
"name": "Interop"
},
"local": {
"type": "Identifier",
"start": 238,
"end": 245,
"loc": {
"start": {
"line": 5,
"column": 39
},
"end": {
"line": 5,
"column": 46
}
},
"name": "Interop"
}
},
{
"type": "ImportSpecifier",
"start": 247,
"end": 265,
"loc": {
"start": {
"line": 5,
"column": 48
},
"end": {
"line": 5,
"column": 66
}
},
"imported": {
"type": "Identifier",
"start": 247,
"end": 265,
"loc": {
"start": {
"line": 5,
"column": 48
},
"end": {
"line": 5,
"column": 66
}
},
"name": "getObjectStatement"
},
"local": {
"type": "Identifier",
"start": 247,
"end": 265,
"loc": {
"start": {
"line": 5,
"column": 48
},
"end": {
"line": 5,
"column": 66
}
},
"name": "getObjectStatement"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 272,
"end": 292,
"loc": {
"start": {
"line": 5,
"column": 73
},
"end": {
"line": 5,
"column": 93
}
},
"value": "sketcher/cchelpers",
"rawValue": "sketcher/cchelpers",
"raw": "'sketcher/cchelpers'"
}
},
{
"type": "ImportDeclaration",
"start": 294,
"end": 348,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 54
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 302,
"end": 307,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 13
}
},
"imported": {
"type": "Identifier",
"start": 302,
"end": 307,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 13
}
},
"name": "Point"
},
"local": {
"type": "Identifier",
"start": 302,
"end": 307,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 13
}
},
"name": "Point"
}
},
{
"type": "ImportSpecifier",
"start": 309,
"end": 313,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 6,
"column": 19
}
},
"imported": {
"type": "Identifier",
"start": 309,
"end": 313,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 6,
"column": 19
}
},
"name": "Line"
},
"local": {
"type": "Identifier",
"start": 309,
"end": 313,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 6,
"column": 19
}
},
"name": "Line"
}
},
{
"type": "ImportSpecifier",
"start": 315,
"end": 318,
"loc": {
"start": {
"line": 6,
"column": 21
},
"end": {
"line": 6,
"column": 24
}
},
"imported": {
"type": "Identifier",
"start": 315,
"end": 318,
"loc": {
"start": {
"line": 6,
"column": 21
},
"end": {
"line": 6,
"column": 24
}
},
"name": "Arc"
},
"local": {
"type": "Identifier",
"start": 315,
"end": 318,
"loc": {
"start": {
"line": 6,
"column": 21
},
"end": {
"line": 6,
"column": 24
}
},
"name": "Arc"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 325,
"end": 347,
"loc": {
"start": {
"line": 6,
"column": 31
},
"end": {
"line": 6,
"column": 53
}
},
"value": "sketcher/geomobjects",
"rawValue": "sketcher/geomobjects",
"raw": "'sketcher/geomobjects'"
}
},
{
"type": "ImportDeclaration",
"start": 349,
"end": 385,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 36
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 356,
"end": 363,
"loc": {
"start": {
"line": 7,
"column": 7
},
"end": {
"line": 7,
"column": 14
}
},
"local": {
"type": "Identifier",
"start": 356,
"end": 363,
"loc": {
"start": {
"line": 7,
"column": 7
},
"end": {
"line": 7,
"column": 14
}
},
"name": "Object3"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 369,
"end": 384,
"loc": {
"start": {
"line": 7,
"column": 20
},
"end": {
"line": 7,
"column": 35
}
},
"value": "three/object3",
"rawValue": "three/object3",
"raw": "'three/object3'"
}
},
{
"type": "ImportDeclaration",
"start": 386,
"end": 415,
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 29
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 393,
"end": 397,
"loc": {
"start": {
"line": 8,
"column": 7
},
"end": {
"line": 8,
"column": 11
}
},
"local": {
"type": "Identifier",
"start": 393,
"end": 397,
"loc": {
"start": {
"line": 8,
"column": 7
},
"end": {
"line": 8,
"column": 11
}
},
"name": "View"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 403,
"end": 414,
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 28
}
},
"value": "core/view",
"rawValue": "core/view",
"raw": "'core/view'"
}
},
{
"type": "ImportDeclaration",
"start": 416,
"end": 442,
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 9,
"column": 26
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 423,
"end": 428,
"loc": {
"start": {
"line": 9,
"column": 7
},
"end": {
"line": 9,
"column": 12
}
},
"local": {
"type": "Identifier",
"start": 423,
"end": 428,
"loc": {
"start": {
"line": 9,
"column": 7
},
"end": {
"line": 9,
"column": 12
}
},
"name": "THREE"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 434,
"end": 441,
"loc": {
"start": {
"line": 9,
"column": 18
},
"end": {
"line": 9,
"column": 25
}
},
"value": "three",
"rawValue": "three",
"raw": "'three'"
}
},
{
"type": "ExportDefaultDeclaration",
"start": 444,
"end": 33903,
"loc": {
"start": {
"line": 11,
"column": 0
},
"end": {
"line": 819,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 459,
"end": 33903,
"loc": {
"start": {
"line": 11,
"column": 15
},
"end": {
"line": 819,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 465,
"end": 471,
"loc": {
"start": {
"line": 11,
"column": 21
},
"end": {
"line": 11,
"column": 27
}
},
"name": "Sketch"
},
"superClass": {
"type": "Identifier",
"start": 480,
"end": 494,
"loc": {
"start": {
"line": 11,
"column": 36
},
"end": {
"line": 11,
"column": 50
}
},
"name": "ClassCadObject"
},
"body": {
"type": "ClassBody",
"start": 495,
"end": 33903,
"loc": {
"start": {
"line": 11,
"column": 51
},
"end": {
"line": 819,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 501,
"end": 4094,
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 82,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 501,
"end": 512,
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 12,
"column": 15
}
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"value": {
"type": "FunctionExpression",
"start": 512,
"end": 4094,
"loc": {
"start": {
"line": 12,
"column": 15
},
"end": {
"line": 82,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 515,
"end": 4094,
"loc": {
"start": {
"line": 12,
"column": 18
},
"end": {
"line": 82,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 525,
"end": 533,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 16
}
},
"expression": {
"type": "CallExpression",
"start": 525,
"end": 532,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 15
}
},
"callee": {
"type": "Super",
"start": 525,
"end": 530,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 13
}
}
},
"arguments": []
},
"trailingComments": [
{
"type": "CommentLine",
"value": " set of objects added with addToSketch",
"start": 542,
"end": 582,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 48
}
},
"range": [
542,
582
]
}
]
},
{
"type": "ExpressionStatement",
"start": 591,
"end": 626,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 43
}
},
"expression": {
"type": "AssignmentExpression",
"start": 591,
"end": 625,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 42
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 591,
"end": 609,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 26
}
},
"object": {
"type": "ThisExpression",
"start": 591,
"end": 595,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 12
}
},
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 596,
"end": 609,
"loc": {
"start": {
"line": 15,
"column": 13
},
"end": {
"line": 15,
"column": 26
}
},
"name": "sketchObjects"
},
"computed": false,
"leadingComments": null
},
"right": {
"type": "NewExpression",
"start": 612,
"end": 625,
"loc": {
"start": {
"line": 15,
"column": 29
},
"end": {
"line": 15,
"column": 42
}
},
"callee": {
"type": "Identifier",
"start": 616,
"end": 623,
"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": 542,
"end": 582,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 48
}
},
"range": [
542,
582
]
}
],
"trailingComments": [
{
"type": "CommentLine",
"value": "Note: should not be accessed by anyone accept Sketcher",
"start": 635,
"end": 691,
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 64
}
},
"range": [
635,
691
]
}
]
},
{
"type": "ExpressionStatement",
"start": 700,
"end": 807,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 115
}
},
"expression": {
"type": "AssignmentExpression",
"start": 700,
"end": 806,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 114
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 700,
"end": 724,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 32
}
},
"object": {
"type": "ThisExpression",
"start": 700,
"end": 704,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 12
}
},
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 705,
"end": 724,
"loc": {
"start": {
"line": 17,
"column": 13
},
"end": {
"line": 17,
"column": 32
}
},
"name": "infiniteBoxMaterial"
},
"computed": false,
"leadingComments": null
},
"right": {
"type": "NewExpression",
"start": 727,
"end": 806,
"loc": {
"start": {
"line": 17,
"column": 35
},
"end": {
"line": 17,
"column": 114
}
},
"callee": {
"type": "MemberExpression",
"start": 731,
"end": 754,
"loc": {
"start": {
"line": 17,
"column": 39
},
"end": {
"line": 17,
"column": 62
}
},
"object": {
"type": "Identifier",
"start": 731,
"end": 736,
"loc": {
"start": {
"line": 17,
"column": 39
},
"end": {
"line": 17,
"column": 44
}
},
"name": "THREE"
},
"property": {
"type": "Identifier",
"start": 737,
"end": 754,
"loc": {
"start": {
"line": 17,
"column": 45
},
"end": {
"line": 17,
"column": 62
}
},
"name": "MeshBasicMaterial"
},
"computed": false
},
"arguments": [
{
"type": "ObjectExpression",
"start": 755,
"end": 805,
"loc": {
"start": {
"line": 17,
"column": 63
},
"end": {
"line": 17,
"column": 113
}
},
"properties": [
{
"type": "Property",
"start": 756,
"end": 771,
"loc": {
"start": {
"line": 17,
"column": 64
},
"end": {
"line": 17,
"column": 79
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 756,
"end": 761,
"loc": {
"start": {
"line": 17,
"column": 64
},
"end": {
"line": 17,
"column": 69
}
},
"name": "color"
},
"value": {
"type": "Literal",
"start": 763,
"end": 771,
"loc": {
"start": {
"line": 17,
"column": 71
},
"end": {
"line": 17,
"column": 79
}
},
"value": 4144959,
"rawValue": 4144959,
"raw": "0x3f3f3f"
},
"kind": "init"
},
{
"type": "Property",
"start": 773,
"end": 788,
"loc": {
"start": {
"line": 17,
"column": 81
},
"end": {
"line": 17,
"column": 96
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 773,
"end": 782,
"loc": {
"start": {
"line": 17,
"column": 81
},
"end": {
"line": 17,
"column": 90
}
},
"name": "wireframe"
},
"value": {
"type": "Literal",
"start": 784,
"end": 788,
"loc": {
"start": {
"line": 17,
"column": 92
},
"end": {
"line": 17,
"column": 96
}
},
"value": true,
"rawValue": true,
"raw": "true"
},
"kind": "init"
},
{
"type": "Property",
"start": 790,
"end": 804,
"loc": {
"start": {
"line": 17,
"column": 98
},
"end": {
"line": 17,
"column": 112
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 790,
"end": 797,
"loc": {
"start": {
"line": 17,
"column": 98
},
"end": {
"line": 17,
"column": 105
}
},
"name": "visible"
},
"value": {
"type": "Literal",
"start": 799,
"end": 804,
"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": 635,
"end": 691,
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 64
}
},
"range": [
635,
691
]
}
]
},
{
"type": "ExpressionStatement",
"start": 816,
"end": 1052,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 22,
"column": 15
}
},
"expression": {
"type": "AssignmentExpression",
"start": 816,
"end": 1051,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 22,
"column": 14
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 816,
"end": 837,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 29
}
},
"object": {
"type": "ThisExpression",
"start": 816,
"end": 820,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 821,
"end": 837,
"loc": {
"start": {
"line": 18,
"column": 13
},
"end": {
"line": 18,
"column": 29
}
},
"name": "frameBoxMaterial"
},
"computed": false
},
"right": {
"type": "NewExpression",
"start": 840,
"end": 1051,
"loc": {
"start": {
"line": 18,
"column": 32
},
"end": {
"line": 22,
"column": 14
}
},
"callee": {
"type": "MemberExpression",
"start": 844,
"end": 867,