awv3
Version:
⚡ AWV3 embedded CAD
1,359 lines • 715 kB
JSON
{
"type": "File",
"start": 0,
"end": 4464,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 115,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 4464,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 115,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 31
}
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"start": 7,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 17
}
},
"local": {
"type": "Identifier",
"start": 12,
"end": 17,
"loc": {
"start": {
"line": 1,
"column": 12
},
"end": {
"line": 1,
"column": 17
},
"identifierName": "THREE"
},
"name": "THREE"
}
}
],
"source": {
"type": "StringLiteral",
"start": 23,
"end": 30,
"loc": {
"start": {
"line": 1,
"column": 23
},
"end": {
"line": 1,
"column": 30
}
},
"extra": {
"rawValue": "three",
"raw": "'three'"
},
"value": "three"
}
},
{
"type": "ExportDefaultDeclaration",
"start": 33,
"end": 4282,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 108,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 48,
"end": 4282,
"loc": {
"start": {
"line": 3,
"column": 15
},
"end": {
"line": 108,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 54,
"end": 63,
"loc": {
"start": {
"line": 3,
"column": 21
},
"end": {
"line": 3,
"column": 30
},
"identifierName": "Raycaster"
},
"name": "Raycaster"
},
"superClass": {
"type": "MemberExpression",
"start": 72,
"end": 87,
"loc": {
"start": {
"line": 3,
"column": 39
},
"end": {
"line": 3,
"column": 54
}
},
"object": {
"type": "Identifier",
"start": 72,
"end": 77,
"loc": {
"start": {
"line": 3,
"column": 39
},
"end": {
"line": 3,
"column": 44
},
"identifierName": "THREE"
},
"name": "THREE"
},
"property": {
"type": "Identifier",
"start": 78,
"end": 87,
"loc": {
"start": {
"line": 3,
"column": 45
},
"end": {
"line": 3,
"column": 54
},
"identifierName": "Raycaster"
},
"name": "Raycaster"
},
"computed": false
},
"body": {
"type": "ClassBody",
"start": 88,
"end": 4282,
"loc": {
"start": {
"line": 3,
"column": 55
},
"end": {
"line": 108,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 94,
"end": 310,
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 9,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 94,
"end": 105,
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 15
},
"identifierName": "constructor"
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 106,
"end": 117,
"loc": {
"start": {
"line": 4,
"column": 16
},
"end": {
"line": 4,
"column": 27
},
"identifierName": "interaction"
},
"name": "interaction"
},
{
"type": "AssignmentPattern",
"start": 119,
"end": 172,
"loc": {
"start": {
"line": 4,
"column": 29
},
"end": {
"line": 4,
"column": 82
}
},
"left": {
"type": "Identifier",
"start": 119,
"end": 126,
"loc": {
"start": {
"line": 4,
"column": 29
},
"end": {
"line": 4,
"column": 36
},
"identifierName": "options"
},
"name": "options"
},
"right": {
"type": "ObjectExpression",
"start": 129,
"end": 172,
"loc": {
"start": {
"line": 4,
"column": 39
},
"end": {
"line": 4,
"column": 82
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 131,
"end": 170,
"loc": {
"start": {
"line": 4,
"column": 41
},
"end": {
"line": 4,
"column": 80
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 131,
"end": 139,
"loc": {
"start": {
"line": 4,
"column": 41
},
"end": {
"line": 4,
"column": 49
},
"identifierName": "approach"
},
"name": "approach"
},
"value": {
"type": "MemberExpression",
"start": 141,
"end": 170,
"loc": {
"start": {
"line": 4,
"column": 51
},
"end": {
"line": 4,
"column": 80
}
},
"object": {
"type": "MemberExpression",
"start": 141,
"end": 159,
"loc": {
"start": {
"line": 4,
"column": 51
},
"end": {
"line": 4,
"column": 69
}
},
"object": {
"type": "Identifier",
"start": 141,
"end": 150,
"loc": {
"start": {
"line": 4,
"column": 51
},
"end": {
"line": 4,
"column": 60
},
"identifierName": "Raycaster"
},
"name": "Raycaster"
},
"property": {
"type": "Identifier",
"start": 151,
"end": 159,
"loc": {
"start": {
"line": 4,
"column": 61
},
"end": {
"line": 4,
"column": 69
},
"identifierName": "Approach"
},
"name": "Approach"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 160,
"end": 170,
"loc": {
"start": {
"line": 4,
"column": 70
},
"end": {
"line": 4,
"column": 80
},
"identifierName": "FirstMatch"
},
"name": "FirstMatch"
},
"computed": false
}
}
]
}
}
],
"body": {
"type": "BlockStatement",
"start": 174,
"end": 310,
"loc": {
"start": {
"line": 4,
"column": 84
},
"end": {
"line": 9,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 184,
"end": 192,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 16
}
},
"expression": {
"type": "CallExpression",
"start": 184,
"end": 191,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 15
}
},
"callee": {
"type": "Super",
"start": 184,
"end": 189,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 13
}
}
},
"arguments": []
}
},
{
"type": "ExpressionStatement",
"start": 201,
"end": 232,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 39
}
},
"expression": {
"type": "AssignmentExpression",
"start": 201,
"end": 231,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 38
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 201,
"end": 217,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 24
}
},
"object": {
"type": "ThisExpression",
"start": 201,
"end": 205,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 206,
"end": 217,
"loc": {
"start": {
"line": 6,
"column": 13
},
"end": {
"line": 6,
"column": 24
},
"identifierName": "interaction"
},
"name": "interaction"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 220,
"end": 231,
"loc": {
"start": {
"line": 6,
"column": 27
},
"end": {
"line": 6,
"column": 38
},
"identifierName": "interaction"
},
"name": "interaction"
}
}
},
{
"type": "ExpressionStatement",
"start": 241,
"end": 270,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 37
}
},
"expression": {
"type": "AssignmentExpression",
"start": 241,
"end": 269,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 36
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 241,
"end": 250,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 17
}
},
"object": {
"type": "ThisExpression",
"start": 241,
"end": 245,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 246,
"end": 250,
"loc": {
"start": {
"line": 7,
"column": 13
},
"end": {
"line": 7,
"column": 17
},
"identifierName": "view"
},
"name": "view"
},
"computed": false
},
"right": {
"type": "MemberExpression",
"start": 253,
"end": 269,
"loc": {
"start": {
"line": 7,
"column": 20
},
"end": {
"line": 7,
"column": 36
}
},
"object": {
"type": "Identifier",
"start": 253,
"end": 264,
"loc": {
"start": {
"line": 7,
"column": 20
},
"end": {
"line": 7,
"column": 31
},
"identifierName": "interaction"
},
"name": "interaction"
},
"property": {
"type": "Identifier",
"start": 265,
"end": 269,
"loc": {
"start": {
"line": 7,
"column": 32
},
"end": {
"line": 7,
"column": 36
},
"identifierName": "view"
},
"name": "view"
},
"computed": false
}
}
},
{
"type": "ExpressionStatement",
"start": 279,
"end": 304,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 33
}
},
"expression": {
"type": "AssignmentExpression",
"start": 279,
"end": 303,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 32
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 279,
"end": 297,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 26
}
},
"object": {
"type": "ThisExpression",
"start": 279,
"end": 283,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 284,
"end": 297,
"loc": {
"start": {
"line": 8,
"column": 13
},
"end": {
"line": 8,
"column": 26
},
"identifierName": "linePrecision"
},
"name": "linePrecision"
},
"computed": false
},
"right": {
"type": "NumericLiteral",
"start": 300,
"end": 303,
"loc": {
"start": {
"line": 8,
"column": 29
},
"end": {
"line": 8,
"column": 32
}
},
"extra": {
"rawValue": 1.5,
"raw": "1.5"
},
"value": 1.5
}
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 316,
"end": 560,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 18,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 316,
"end": 333,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 21
},
"identifierName": "isActuallyVisible"
},
"name": "isActuallyVisible"
},
"static": false,
"kind": "method",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 334,
"end": 337,
"loc": {
"start": {
"line": 11,
"column": 22
},
"end": {
"line": 11,
"column": 25
},
"identifierName": "obj"
},
"name": "obj"
}
],
"body": {
"type": "BlockStatement",
"start": 339,
"end": 560,
"loc": {
"start": {
"line": 11,
"column": 27
},
"end": {
"line": 18,
"column": 5
}
},
"body": [
{
"type": "WhileStatement",
"start": 349,
"end": 533,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 16,
"column": 9
}
},
"test": {
"type": "Identifier",
"start": 356,
"end": 359,
"loc": {
"start": {
"line": 12,
"column": 15
},
"end": {
"line": 12,
"column": 18
},
"identifierName": "obj"
},
"name": "obj"
},
"body": {
"type": "BlockStatement",
"start": 361,
"end": 533,
"loc": {
"start": {
"line": 12,
"column": 20
},
"end": {
"line": 16,
"column": 9
}
},
"body": [
{
"type": "IfStatement",
"start": 375,
"end": 415,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 52
}
},
"test": {
"type": "BinaryExpression",
"start": 379,
"end": 400,
"loc": {
"start": {
"line": 13,
"column": 16
},
"end": {
"line": 13,
"column": 37
}
},
"left": {
"type": "MemberExpression",
"start": 379,
"end": 390,
"loc": {
"start": {
"line": 13,
"column": 16
},
"end": {
"line": 13,
"column": 27
}
},
"object": {
"type": "Identifier",
"start": 379,
"end": 382,
"loc": {
"start": {
"line": 13,
"column": 16
},
"end": {
"line": 13,
"column": 19
},
"identifierName": "obj"
},
"name": "obj"
},
"property": {
"type": "Identifier",
"start": 383,
"end": 390,
"loc": {
"start": {
"line": 13,
"column": 20
},
"end": {
"line": 13,
"column": 27
},
"identifierName": "visible"
},
"name": "visible"
},
"computed": false
},
"operator": "===",
"right": {
"type": "BooleanLiteral",
"start": 395,
"end": 400,
"loc": {
"start": {
"line": 13,
"column": 32
},
"end": {
"line": 13,
"column": 37
}
},
"value": false
}
},
"consequent": {
"type": "ReturnStatement",
"start": 402,
"end": 415,
"loc": {
"start": {
"line": 13,
"column": 39
},
"end": {
"line": 13,
"column": 52
}
},
"argument": {
"type": "BooleanLiteral",
"start": 409,
"end": 414,
"loc": {
"start": {
"line": 13,
"column": 46
},
"end": {
"line": 13,
"column": 51
}
},
"value": false
}
},
"alternate": null
},
{
"type": "IfStatement",
"start": 428,
"end": 493,
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 77
}
},
"test": {
"type": "LogicalExpression",
"start": 432,
"end": 478,
"loc": {
"start": {
"line": 14,
"column": 16
},
"end": {
"line": 14,
"column": 62
}
},
"left": {
"type": "MemberExpression",
"start": 432,
"end": 444,
"loc": {
"start": {
"line": 14,
"column": 16
},
"end": {
"line": 14,
"column": 28
}
},
"object": {
"type": "Identifier",
"start": 432,
"end": 435,
"loc": {
"start": {
"line": 14,
"column": 16
},
"end": {
"line": 14,
"column": 19
},
"identifierName": "obj"
},
"name": "obj"
},
"property": {
"type": "Identifier",
"start": 436,
"end": 444,
"loc": {
"start": {
"line": 14,
"column": 20
},
"end": {
"line": 14,
"column": 28
},
"identifierName": "material"
},
"name": "material"
},
"computed": false
},
"operator": "&&",
"right": {
"type": "BinaryExpression",
"start": 448,
"end": 478,
"loc": {
"start": {
"line": 14,
"column": 32
},
"end": {
"line": 14,
"column": 62
}
},
"left": {
"type": "MemberExpression",
"start": 448,
"end": 468,
"loc": {
"start": {
"line": 14,
"column": 32
},
"end": {
"line": 14,
"column": 52
}
},
"object": {
"type": "MemberExpression",
"start": 448,
"end": 460,
"loc": {
"start": {
"line": 14,
"column": 32
},
"end": {
"line": 14,
"column": 44
}
},
"object": {
"type": "Identifier",
"start": 448,
"end": 451,
"loc": {
"start": {
"line": 14,
"column": 32
},
"end": {
"line": 14,
"column": 35
},
"identifierName": "obj"
},
"name": "obj"
},
"property": {
"type": "Identifier",
"start": 452,
"end": 460,
"loc": {
"start": {
"line": 14,
"column": 36
},
"end": {
"line": 14,
"column": 44
},
"identifierName": "material"
},
"name": "material"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 461,
"end": 468,
"loc": {
"start": {
"line": 14,
"column": 45
},
"end": {
"line": 14,
"column": 52
},
"identifierName": "visible"
},
"name": "visible"
},
"computed": false
},
"operator": "===",
"right": {
"type": "BooleanLiteral",
"start": 473,
"end": 478,
"loc": {
"start": {
"line": 14,
"column": 57
},
"end": {
"line": 14,
"column": 62
}
},
"value": false
}
}
},
"consequent": {
"type": "ReturnStatement",
"start": 480,
"end": 493,
"loc": {
"start": {
"line": 14,
"column": 64
},
"end": {
"line": 14,
"column": 77
}
},
"argument": {
"type": "BooleanLiteral",
"start": 487,
"end": 492,
"loc": {
"start": {
"line": 14,
"column": 71
},
"end": {
"line": 14,
"column": 76
}
},
"value": false
}
},
"alternate": null
},
{
"type": "ExpressionStatement",
"start": 506,
"end": 523,
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 15,
"column": 29
}
},
"expression": {
"type": "AssignmentExpression",
"start": 506,
"end": 522,
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 15,
"column": 28
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 506,
"end": 509,
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 15,
"column": 15
},
"identifierName": "obj"
},
"name": "obj"
},
"right": {
"type": "MemberExpression",
"start": 512,
"end": 522,
"loc": {
"start": {
"line": 15,
"column": 18
},
"end": {
"line": 15,
"column": 28
}
},
"object": {
"type