awv3
Version:
AWV client CAD framework
1,464 lines • 1.09 MB
JSON
{
"type": "Program",
"start": 0,
"end": 7515,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 189,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 26,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 26
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 7,
"end": 12,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 12
}
},
"local": {
"type": "Identifier",
"start": 7,
"end": 12,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 12
}
},
"name": "THREE"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 18,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 25
}
},
"value": "three",
"rawValue": "three",
"raw": "'three'"
}
},
{
"type": "ImportDeclaration",
"start": 27,
"end": 70,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 43
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 34,
"end": 43,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 16
}
},
"local": {
"type": "Identifier",
"start": 34,
"end": 43,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 16
}
},
"name": "Raycaster"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 49,
"end": 69,
"loc": {
"start": {
"line": 2,
"column": 22
},
"end": {
"line": 2,
"column": 42
}
},
"value": "../three/raycaster",
"rawValue": "../three/raycaster",
"raw": "'../three/raycaster'"
}
},
{
"type": "ImportDeclaration",
"start": 71,
"end": 110,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 39
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 78,
"end": 85,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 14
}
},
"local": {
"type": "Identifier",
"start": 78,
"end": 85,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 14
}
},
"name": "Object3"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 91,
"end": 109,
"loc": {
"start": {
"line": 3,
"column": 20
},
"end": {
"line": 3,
"column": 38
}
},
"value": "../three/object3",
"rawValue": "../three/object3",
"raw": "'../three/object3'"
}
},
{
"type": "ExportDefaultDeclaration",
"start": 112,
"end": 7514,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 188,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 127,
"end": 7514,
"loc": {
"start": {
"line": 5,
"column": 15
},
"end": {
"line": 188,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 133,
"end": 144,
"loc": {
"start": {
"line": 5,
"column": 21
},
"end": {
"line": 5,
"column": 32
}
},
"name": "Interaction"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start": 145,
"end": 7514,
"loc": {
"start": {
"line": 5,
"column": 33
},
"end": {
"line": 188,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 151,
"end": 772,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 22,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 151,
"end": 162,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 15
}
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"value": {
"type": "FunctionExpression",
"start": 162,
"end": 772,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 22,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "AssignmentPattern",
"start": 163,
"end": 197,
"loc": {
"start": {
"line": 6,
"column": 16
},
"end": {
"line": 6,
"column": 50
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 163,
"end": 167,
"loc": {
"start": {
"line": 6,
"column": 16
},
"end": {
"line": 6,
"column": 20
}
},
"name": "view"
},
"right": {
"type": "CallExpression",
"start": 170,
"end": 197,
"loc": {
"start": {
"line": 6,
"column": 23
},
"end": {
"line": 6,
"column": 50
}
},
"callee": {
"type": "MemberExpression",
"start": 170,
"end": 179,
"loc": {
"start": {
"line": 6,
"column": 23
},
"end": {
"line": 6,
"column": 32
}
},
"object": {
"type": "Identifier",
"start": 170,
"end": 175,
"loc": {
"start": {
"line": 6,
"column": 23
},
"end": {
"line": 6,
"column": 28
}
},
"name": "Error"
},
"property": {
"type": "Identifier",
"start": 176,
"end": 179,
"loc": {
"start": {
"line": 6,
"column": 29
},
"end": {
"line": 6,
"column": 32
}
},
"name": "log"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 180,
"end": 196,
"loc": {
"start": {
"line": 6,
"column": 33
},
"end": {
"line": 6,
"column": 49
}
},
"value": "View undefined",
"rawValue": "View undefined",
"raw": "\"View undefined\""
}
]
}
},
{
"type": "AssignmentPattern",
"start": 199,
"end": 211,
"loc": {
"start": {
"line": 6,
"column": 52
},
"end": {
"line": 6,
"column": 64
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 199,
"end": 206,
"loc": {
"start": {
"line": 6,
"column": 52
},
"end": {
"line": 6,
"column": 59
}
},
"name": "options"
},
"right": {
"type": "ObjectExpression",
"start": 209,
"end": 211,
"loc": {
"start": {
"line": 6,
"column": 62
},
"end": {
"line": 6,
"column": 64
}
},
"properties": []
}
}
],
"body": {
"type": "BlockStatement",
"start": 213,
"end": 772,
"loc": {
"start": {
"line": 6,
"column": 66
},
"end": {
"line": 22,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 223,
"end": 240,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 25
}
},
"expression": {
"type": "AssignmentExpression",
"start": 223,
"end": 239,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 24
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 223,
"end": 232,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 17
}
},
"object": {
"type": "ThisExpression",
"start": 223,
"end": 227,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 228,
"end": 232,
"loc": {
"start": {
"line": 7,
"column": 13
},
"end": {
"line": 7,
"column": 17
}
},
"name": "view"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 235,
"end": 239,
"loc": {
"start": {
"line": 7,
"column": 20
},
"end": {
"line": 7,
"column": 24
}
},
"name": "view"
}
}
},
{
"type": "ExpressionStatement",
"start": 249,
"end": 275,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 34
}
},
"expression": {
"type": "AssignmentExpression",
"start": 249,
"end": 274,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 33
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 249,
"end": 260,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 19
}
},
"object": {
"type": "ThisExpression",
"start": 249,
"end": 253,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 254,
"end": 260,
"loc": {
"start": {
"line": 8,
"column": 13
},
"end": {
"line": 8,
"column": 19
}
},
"name": "canvas"
},
"computed": false
},
"right": {
"type": "MemberExpression",
"start": 263,
"end": 274,
"loc": {
"start": {
"line": 8,
"column": 22
},
"end": {
"line": 8,
"column": 33
}
},
"object": {
"type": "Identifier",
"start": 263,
"end": 267,
"loc": {
"start": {
"line": 8,
"column": 22
},
"end": {
"line": 8,
"column": 26
}
},
"name": "view"
},
"property": {
"type": "Identifier",
"start": 268,
"end": 274,
"loc": {
"start": {
"line": 8,
"column": 27
},
"end": {
"line": 8,
"column": 33
}
},
"name": "canvas"
},
"computed": false
}
}
},
{
"type": "ExpressionStatement",
"start": 284,
"end": 321,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 45
}
},
"expression": {
"type": "AssignmentExpression",
"start": 284,
"end": 320,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 44
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 284,
"end": 298,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 22
}
},
"object": {
"type": "ThisExpression",
"start": 284,
"end": 288,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 289,
"end": 298,
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 22
}
},
"name": "raycaster"
},
"computed": false
},
"right": {
"type": "NewExpression",
"start": 301,
"end": 320,
"loc": {
"start": {
"line": 9,
"column": 25
},
"end": {
"line": 9,
"column": 44
}
},
"callee": {
"type": "Identifier",
"start": 305,
"end": 314,
"loc": {
"start": {
"line": 9,
"column": 29
},
"end": {
"line": 9,
"column": 38
}
},
"name": "Raycaster"
},
"arguments": [
{
"type": "ThisExpression",
"start": 315,
"end": 319,
"loc": {
"start": {
"line": 9,
"column": 39
},
"end": {
"line": 9,
"column": 43
}
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"start": 330,
"end": 409,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 87
}
},
"expression": {
"type": "AssignmentExpression",
"start": 330,
"end": 408,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 86
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 330,
"end": 342,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 20
}
},
"object": {
"type": "ThisExpression",
"start": 330,
"end": 334,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 335,
"end": 342,
"loc": {
"start": {
"line": 10,
"column": 13
},
"end": {
"line": 10,
"column": 20
}
},
"name": "enabled"
},
"computed": false
},
"right": {
"type": "ConditionalExpression",
"start": 345,
"end": 408,
"loc": {
"start": {
"line": 10,
"column": 23
},
"end": {
"line": 10,
"column": 86
}
},
"test": {
"type": "BinaryExpression",
"start": 345,
"end": 383,
"loc": {
"start": {
"line": 10,
"column": 23
},
"end": {
"line": 10,
"column": 61
}
},
"left": {
"type": "UnaryExpression",
"start": 345,
"end": 367,
"loc": {
"start": {
"line": 10,
"column": 23
},
"end": {
"line": 10,
"column": 45
}
},
"operator": "typeof",
"prefix": true,
"argument": {
"type": "MemberExpression",
"start": 352,
"end": 367,
"loc": {
"start": {
"line": 10,
"column": 30
},
"end": {
"line": 10,
"column": 45
}
},
"object": {
"type": "Identifier",
"start": 352,
"end": 359,
"loc": {
"start": {
"line": 10,
"column": 30
},
"end": {
"line": 10,
"column": 37
}
},
"name": "options"
},
"property": {
"type": "Identifier",
"start": 360,
"end": 367,
"loc": {
"start": {
"line": 10,
"column": 38
},
"end": {
"line": 10,
"column": 45
}
},
"name": "enabled"
},
"computed": false
}
},
"operator": "!==",
"right": {
"type": "Literal",
"start": 372,
"end": 383,
"loc": {
"start": {
"line": 10,
"column": 50
},
"end": {
"line": 10,
"column": 61
}
},
"value": "undefined",
"rawValue": "undefined",
"raw": "'undefined'"
}
},
"consequent": {
"type": "MemberExpression",
"start": 386,
"end": 401,
"loc": {
"start": {
"line": 10,
"column": 64
},
"end": {
"line": 10,
"column": 79
}
},
"object": {
"type": "Identifier",
"start": 386,
"end": 393,
"loc": {
"start": {
"line": 10,
"column": 64
},
"end": {
"line": 10,
"column": 71
}
},
"name": "options"
},
"property": {
"type": "Identifier",
"start": 394,
"end": 401,
"loc": {
"start": {
"line": 10,
"column": 72
},
"end": {
"line": 10,
"column": 79
}
},
"name": "enabled"
},
"computed": false
},
"alternate": {
"type": "Literal",
"start": 404,
"end": 408,
"loc": {
"start": {
"line": 10,
"column": 82
},
"end": {
"line": 10,
"column": 86
}
},
"value": true,
"rawValue": true,
"raw": "true"
}
}
}
},
{
"type": "ExpressionStatement",
"start": 418,
"end": 436,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 26
}
},
"expression": {
"type": "AssignmentExpression",
"start": 418,
"end": 435,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 25
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 418,
"end": 430,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 20
}
},
"object": {
"type": "ThisExpression",
"start": 418,
"end": 422,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 423,
"end": 430,
"loc": {
"start": {
"line": 11,
"column": 13
},
"end": {
"line": 11,
"column": 20
}
},
"name": "targets"
},
"computed": false
},
"right": {
"type": "ArrayExpression",
"start": 433,
"end": 435,
"loc": {
"start": {
"line": 11,
"column": 23
},
"end": {
"line": 11,
"column": 25
}
},
"elements": []
}
}
},
{
"type": "ExpressionStatement",
"start": 445,
"end": 466,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 29
}
},
"expression": {
"type": "AssignmentExpression",
"start": 445,
"end": 465,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 28
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 445,
"end": 460,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 23
}
},
"object": {
"type": "ThisExpression",
"start": 445,
"end": 449,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 450,
"end": 460,
"loc": {
"start": {
"line": 12,
"column": 13
},
"end": {
"line": 12,
"column": 23
}
},
"name": "intersects"
},
"computed": false
},
"right": {
"type": "ArrayExpression",
"start": 463,
"end": 465,
"loc": {
"start": {
"line": 12,
"column": 26
},
"end": {
"line": 12,
"column": 28
}
},
"elements": []
}
}
},
{
"type": "ExpressionStatement",
"start": 475,
"end": 490,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 23
}
},
"expression": {
"type": "AssignmentExpression",
"start": 475,
"end": 489,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 22
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 475,
"end": 484,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 17
}
},
"object": {
"type": "ThisExpression",
"start": 475,
"end": 479,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 480,
"end": 484,
"loc": {
"start": {
"line": 13,
"column": 13
},
"end": {
"line": 13,
"column": 17
}
},
"name": "hits"
},
"computed": false
},
"right": {
"type": "ObjectExpression",
"start": 487,
"end": 489,
"loc": {
"start": {
"line": 13,
"column": 20
},
"end": {
"line": 13,
"column": 22
}
},
"properties": []
}
}
},
{
"type": "ExpressionStatement",
"start": 499,
"end": 519,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 28
}
},
"expression": {
"type": "AssignmentExpression",
"start": 499,
"end": 518,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 27
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 499,
"end": 513,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 22
}
},
"object": {
"type": "ThisExpression",
"start": 499,
"end": 503,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 504,
"end": 513,
"loc": {
"start": {
"line": 14,
"column": 13
},
"end": {
"line": 14,
"colum