awv3
Version:
AWV client CAD framework
1,413 lines (1,412 loc) • 1.2 MB
JSON
{
"type": "Program",
"start": 0,
"end": 11598,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 264,
"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": "ExportDefaultDeclaration",
"start": 28,
"end": 3585,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 93,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 43,
"end": 3585,
"loc": {
"start": {
"line": 3,
"column": 15
},
"end": {
"line": 93,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 49,
"end": 58,
"loc": {
"start": {
"line": 3,
"column": 21
},
"end": {
"line": 3,
"column": 30
}
},
"name": "Raycaster"
},
"superClass": {
"type": "MemberExpression",
"start": 67,
"end": 82,
"loc": {
"start": {
"line": 3,
"column": 39
},
"end": {
"line": 3,
"column": 54
}
},
"object": {
"type": "Identifier",
"start": 67,
"end": 72,
"loc": {
"start": {
"line": 3,
"column": 39
},
"end": {
"line": 3,
"column": 44
}
},
"name": "THREE"
},
"property": {
"type": "Identifier",
"start": 73,
"end": 82,
"loc": {
"start": {
"line": 3,
"column": 45
},
"end": {
"line": 3,
"column": 54
}
},
"name": "Raycaster"
},
"computed": false
},
"body": {
"type": "ClassBody",
"start": 83,
"end": 3585,
"loc": {
"start": {
"line": 3,
"column": 55
},
"end": {
"line": 93,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 89,
"end": 937,
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 24,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 89,
"end": 100,
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 15
}
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"value": {
"type": "FunctionExpression",
"start": 100,
"end": 937,
"loc": {
"start": {
"line": 4,
"column": 15
},
"end": {
"line": 24,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 101,
"end": 112,
"loc": {
"start": {
"line": 4,
"column": 16
},
"end": {
"line": 4,
"column": 27
}
},
"name": "interaction"
},
{
"type": "AssignmentPattern",
"start": 114,
"end": 167,
"loc": {
"start": {
"line": 4,
"column": 29
},
"end": {
"line": 4,
"column": 82
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 114,
"end": 121,
"loc": {
"start": {
"line": 4,
"column": 29
},
"end": {
"line": 4,
"column": 36
}
},
"name": "options"
},
"right": {
"type": "ObjectExpression",
"start": 124,
"end": 167,
"loc": {
"start": {
"line": 4,
"column": 39
},
"end": {
"line": 4,
"column": 82
}
},
"properties": [
{
"type": "Property",
"start": 126,
"end": 165,
"loc": {
"start": {
"line": 4,
"column": 41
},
"end": {
"line": 4,
"column": 80
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 126,
"end": 134,
"loc": {
"start": {
"line": 4,
"column": 41
},
"end": {
"line": 4,
"column": 49
}
},
"name": "approach"
},
"value": {
"type": "MemberExpression",
"start": 136,
"end": 165,
"loc": {
"start": {
"line": 4,
"column": 51
},
"end": {
"line": 4,
"column": 80
}
},
"object": {
"type": "MemberExpression",
"start": 136,
"end": 154,
"loc": {
"start": {
"line": 4,
"column": 51
},
"end": {
"line": 4,
"column": 69
}
},
"object": {
"type": "Identifier",
"start": 136,
"end": 145,
"loc": {
"start": {
"line": 4,
"column": 51
},
"end": {
"line": 4,
"column": 60
}
},
"name": "Raycaster"
},
"property": {
"type": "Identifier",
"start": 146,
"end": 154,
"loc": {
"start": {
"line": 4,
"column": 61
},
"end": {
"line": 4,
"column": 69
}
},
"name": "Approach"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 155,
"end": 165,
"loc": {
"start": {
"line": 4,
"column": 70
},
"end": {
"line": 4,
"column": 80
}
},
"name": "FirstMatch"
},
"computed": false
},
"kind": "init"
}
]
}
}
],
"body": {
"type": "BlockStatement",
"start": 169,
"end": 937,
"loc": {
"start": {
"line": 4,
"column": 84
},
"end": {
"line": 24,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 179,
"end": 187,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 16
}
},
"expression": {
"type": "CallExpression",
"start": 179,
"end": 186,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 15
}
},
"callee": {
"type": "Super",
"start": 179,
"end": 184,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 13
}
}
},
"arguments": []
}
},
{
"type": "ExpressionStatement",
"start": 196,
"end": 227,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 39
}
},
"expression": {
"type": "AssignmentExpression",
"start": 196,
"end": 226,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 38
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 196,
"end": 212,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 24
}
},
"object": {
"type": "ThisExpression",
"start": 196,
"end": 200,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 201,
"end": 212,
"loc": {
"start": {
"line": 6,
"column": 13
},
"end": {
"line": 6,
"column": 24
}
},
"name": "interaction"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 215,
"end": 226,
"loc": {
"start": {
"line": 6,
"column": 27
},
"end": {
"line": 6,
"column": 38
}
},
"name": "interaction"
}
}
},
{
"type": "ExpressionStatement",
"start": 236,
"end": 265,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 37
}
},
"expression": {
"type": "AssignmentExpression",
"start": 236,
"end": 264,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 36
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 236,
"end": 245,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 17
}
},
"object": {
"type": "ThisExpression",
"start": 236,
"end": 240,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 241,
"end": 245,
"loc": {
"start": {
"line": 7,
"column": 13
},
"end": {
"line": 7,
"column": 17
}
},
"name": "view"
},
"computed": false
},
"right": {
"type": "MemberExpression",
"start": 248,
"end": 264,
"loc": {
"start": {
"line": 7,
"column": 20
},
"end": {
"line": 7,
"column": 36
}
},
"object": {
"type": "Identifier",
"start": 248,
"end": 259,
"loc": {
"start": {
"line": 7,
"column": 20
},
"end": {
"line": 7,
"column": 31
}
},
"name": "interaction"
},
"property": {
"type": "Identifier",
"start": 260,
"end": 264,
"loc": {
"start": {
"line": 7,
"column": 32
},
"end": {
"line": 7,
"column": 36
}
},
"name": "view"
},
"computed": false
}
}
},
{
"type": "ExpressionStatement",
"start": 275,
"end": 317,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 50
}
},
"expression": {
"type": "AssignmentExpression",
"start": 275,
"end": 316,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 49
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 275,
"end": 294,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 27
}
},
"object": {
"type": "ThisExpression",
"start": 275,
"end": 279,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 280,
"end": 294,
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 27
}
},
"name": "_inverseMatrix"
},
"computed": false
},
"right": {
"type": "NewExpression",
"start": 297,
"end": 316,
"loc": {
"start": {
"line": 9,
"column": 30
},
"end": {
"line": 9,
"column": 49
}
},
"callee": {
"type": "MemberExpression",
"start": 301,
"end": 314,
"loc": {
"start": {
"line": 9,
"column": 34
},
"end": {
"line": 9,
"column": 47
}
},
"object": {
"type": "Identifier",
"start": 301,
"end": 306,
"loc": {
"start": {
"line": 9,
"column": 34
},
"end": {
"line": 9,
"column": 39
}
},
"name": "THREE"
},
"property": {
"type": "Identifier",
"start": 307,
"end": 314,
"loc": {
"start": {
"line": 9,
"column": 40
},
"end": {
"line": 9,
"column": 47
}
},
"name": "Matrix4"
},
"computed": false
},
"arguments": []
}
}
},
{
"type": "ExpressionStatement",
"start": 326,
"end": 354,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 36
}
},
"expression": {
"type": "AssignmentExpression",
"start": 326,
"end": 353,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 35
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 326,
"end": 335,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 17
}
},
"object": {
"type": "ThisExpression",
"start": 326,
"end": 330,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 331,
"end": 335,
"loc": {
"start": {
"line": 10,
"column": 13
},
"end": {
"line": 10,
"column": 17
}
},
"name": "_ray"
},
"computed": false
},
"right": {
"type": "NewExpression",
"start": 338,
"end": 353,
"loc": {
"start": {
"line": 10,
"column": 20
},
"end": {
"line": 10,
"column": 35
}
},
"callee": {
"type": "MemberExpression",
"start": 342,
"end": 351,
"loc": {
"start": {
"line": 10,
"column": 24
},
"end": {
"line": 10,
"column": 33
}
},
"object": {
"type": "Identifier",
"start": 342,
"end": 347,
"loc": {
"start": {
"line": 10,
"column": 24
},
"end": {
"line": 10,
"column": 29
}
},
"name": "THREE"
},
"property": {
"type": "Identifier",
"start": 348,
"end": 351,
"loc": {
"start": {
"line": 10,
"column": 30
},
"end": {
"line": 10,
"column": 33
}
},
"name": "Ray"
},
"computed": false
},
"arguments": []
}
}
},
{
"type": "ExpressionStatement",
"start": 363,
"end": 397,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 42
}
},
"expression": {
"type": "AssignmentExpression",
"start": 363,
"end": 396,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 41
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 363,
"end": 375,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 20
}
},
"object": {
"type": "ThisExpression",
"start": 363,
"end": 367,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 368,
"end": 375,
"loc": {
"start": {
"line": 11,
"column": 13
},
"end": {
"line": 11,
"column": 20
}
},
"name": "_sphere"
},
"computed": false
},
"right": {
"type": "NewExpression",
"start": 378,
"end": 396,
"loc": {
"start": {
"line": 11,
"column": 23
},
"end": {
"line": 11,
"column": 41
}
},
"callee": {
"type": "MemberExpression",
"start": 382,
"end": 394,
"loc": {
"start": {
"line": 11,
"column": 27
},
"end": {
"line": 11,
"column": 39
}
},
"object": {
"type": "Identifier",
"start": 382,
"end": 387,
"loc": {
"start": {
"line": 11,
"column": 27
},
"end": {
"line": 11,
"column": 32
}
},
"name": "THREE"
},
"property": {
"type": "Identifier",
"start": 388,
"end": 394,
"loc": {
"start": {
"line": 11,
"column": 33
},
"end": {
"line": 11,
"column": 39
}
},
"name": "Sphere"
},
"computed": false
},
"arguments": []
}
}
},
{
"type": "ExpressionStatement",
"start": 406,
"end": 437,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 39
}
},
"expression": {
"type": "AssignmentExpression",
"start": 406,
"end": 436,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 38
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 406,
"end": 414,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 16
}
},
"object": {
"type": "ThisExpression",
"start": 406,
"end": 410,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 411,
"end": 414,
"loc": {
"start": {
"line": 12,
"column": 13
},
"end": {
"line": 12,
"column": 16
}
},
"name": "_vA"
},
"computed": false
},
"right": {
"type": "NewExpression",
"start": 417,
"end": 436,
"loc": {
"start": {
"line": 12,
"column": 19
},
"end": {
"line": 12,
"column": 38
}
},
"callee": {
"type": "MemberExpression",
"start": 421,
"end": 434,
"loc": {
"start": {
"line": 12,
"column": 23
},
"end": {
"line": 12,
"column": 36
}
},
"object": {
"type": "Identifier",
"start": 421,
"end": 426,
"loc": {
"start": {
"line": 12,
"column": 23
},
"end": {
"line": 12,
"column": 28
}
},
"name": "THREE"
},
"property": {
"type": "Identifier",
"start": 427,
"end": 434,
"loc": {
"start": {
"line": 12,
"column": 29
},
"end": {
"line": 12,
"column": 36
}
},
"name": "Vector3"
},
"computed": false
},
"arguments": []
}
}
},
{
"type": "ExpressionStatement",
"start": 446,
"end": 477,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 39
}
},
"expression": {
"type": "AssignmentExpression",
"start": 446,
"end": 476,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 38
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 446,
"end": 454,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 16
}
},
"object": {
"type": "ThisExpression",
"start": 446,
"end": 450,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 451,
"end": 454,
"loc": {
"start": {
"line": 13,
"column": 13
},
"end": {
"line": 13,
"column": 16
}
},
"name": "_vB"
},
"computed": false
},
"right": {
"type": "NewExpression",
"start": 457,
"end": 476,
"loc": {
"start": {
"line": 13,
"column": 19
},
"end": {
"line": 13,
"column": 38
}
},
"callee": {
"type": "MemberExpression",
"start": 461,
"end": 474,
"loc": {
"start": {
"line": 13,
"column": 23
},
"end": {
"line": 13,
"column": 36
}
},
"object": {
"type": "Identifier",
"start": 461,
"end": 466,
"loc": {
"start": {
"line": 13,
"column": 23
},
"end": {
"line": 13,
"column": 28
}
},
"name": "THREE"
},
"property": {
"type": "Identifier",
"start": 467,
"end": 474,
"loc": {
"start": {
"line": 13,
"column": 29
},
"end": {
"line": 13,
"column": 36
}
},
"name": "Vector3"
},
"computed": false
},
"arguments": []
}