awv3
Version:
⚡ AWV3 embedded CAD
1,370 lines (1,369 loc) • 305 kB
JSON
{
"type": "File",
"start": 0,
"end": 1634,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 45,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 1634,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 45,
"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": "ImportDeclaration",
"start": 32,
"end": 76,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 44
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 41,
"end": 53,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 21
}
},
"imported": {
"type": "Identifier",
"start": 41,
"end": 53,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 21
},
"identifierName": "getArcAngles"
},
"name": "getArcAngles"
},
"local": {
"type": "Identifier",
"start": 41,
"end": 53,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 21
},
"identifierName": "getArcAngles"
},
"name": "getArcAngles"
}
}
],
"source": {
"type": "StringLiteral",
"start": 61,
"end": 75,
"loc": {
"start": {
"line": 2,
"column": 29
},
"end": {
"line": 2,
"column": 43
}
},
"extra": {
"rawValue": "../geomutils",
"raw": "'../geomutils'"
},
"value": "../geomutils"
}
},
{
"type": "ImportDeclaration",
"start": 77,
"end": 111,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 34
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 84,
"end": 96,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 19
}
},
"local": {
"type": "Identifier",
"start": 84,
"end": 96,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 19
},
"identifierName": "BaseGraphics"
},
"name": "BaseGraphics"
}
}
],
"source": {
"type": "StringLiteral",
"start": 102,
"end": 110,
"loc": {
"start": {
"line": 3,
"column": 25
},
"end": {
"line": 3,
"column": 33
}
},
"extra": {
"rawValue": "./base",
"raw": "'./base'"
},
"value": "./base"
}
},
{
"type": "VariableDeclaration",
"start": 113,
"end": 166,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 53
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 119,
"end": 165,
"loc": {
"start": {
"line": 5,
"column": 6
},
"end": {
"line": 5,
"column": 52
}
},
"id": {
"type": "Identifier",
"start": 119,
"end": 127,
"loc": {
"start": {
"line": 5,
"column": 6
},
"end": {
"line": 5,
"column": 14
},
"identifierName": "geometry"
},
"name": "geometry"
},
"init": {
"type": "NewExpression",
"start": 130,
"end": 165,
"loc": {
"start": {
"line": 5,
"column": 17
},
"end": {
"line": 5,
"column": 52
}
},
"callee": {
"type": "MemberExpression",
"start": 134,
"end": 159,
"loc": {
"start": {
"line": 5,
"column": 21
},
"end": {
"line": 5,
"column": 46
}
},
"object": {
"type": "Identifier",
"start": 134,
"end": 139,
"loc": {
"start": {
"line": 5,
"column": 21
},
"end": {
"line": 5,
"column": 26
},
"identifierName": "THREE"
},
"name": "THREE"
},
"property": {
"type": "Identifier",
"start": 140,
"end": 159,
"loc": {
"start": {
"line": 5,
"column": 27
},
"end": {
"line": 5,
"column": 46
},
"identifierName": "PlaneBufferGeometry"
},
"name": "PlaneBufferGeometry"
},
"computed": false
},
"arguments": [
{
"type": "NumericLiteral",
"start": 160,
"end": 161,
"loc": {
"start": {
"line": 5,
"column": 47
},
"end": {
"line": 5,
"column": 48
}
},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
},
{
"type": "NumericLiteral",
"start": 163,
"end": 164,
"loc": {
"start": {
"line": 5,
"column": 50
},
"end": {
"line": 5,
"column": 51
}
},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
}
]
}
}
],
"kind": "const"
},
{
"type": "VariableDeclaration",
"start": 167,
"end": 207,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 40
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 173,
"end": 206,
"loc": {
"start": {
"line": 6,
"column": 6
},
"end": {
"line": 6,
"column": 39
}
},
"id": {
"type": "Identifier",
"start": 173,
"end": 190,
"loc": {
"start": {
"line": 6,
"column": 6
},
"end": {
"line": 6,
"column": 23
},
"identifierName": "materialByTexture"
},
"name": "materialByTexture"
},
"init": {
"type": "NewExpression",
"start": 193,
"end": 206,
"loc": {
"start": {
"line": 6,
"column": 26
},
"end": {
"line": 6,
"column": 39
}
},
"callee": {
"type": "Identifier",
"start": 197,
"end": 204,
"loc": {
"start": {
"line": 6,
"column": 30
},
"end": {
"line": 6,
"column": 37
},
"identifierName": "WeakMap"
},
"name": "WeakMap"
},
"arguments": []
}
}
],
"kind": "const"
},
{
"type": "ExportDefaultDeclaration",
"start": 209,
"end": 1633,
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 44,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 224,
"end": 1633,
"loc": {
"start": {
"line": 8,
"column": 15
},
"end": {
"line": 44,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 230,
"end": 246,
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 37
},
"identifierName": "ConstraintEntity"
},
"name": "ConstraintEntity"
},
"superClass": {
"type": "Identifier",
"start": 255,
"end": 267,
"loc": {
"start": {
"line": 8,
"column": 46
},
"end": {
"line": 8,
"column": 58
},
"identifierName": "BaseGraphics"
},
"name": "BaseGraphics"
},
"body": {
"type": "ClassBody",
"start": 268,
"end": 1633,
"loc": {
"start": {
"line": 8,
"column": 59
},
"end": {
"line": 44,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 274,
"end": 911,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 24,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 274,
"end": 285,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 15
},
"identifierName": "constructor"
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 286,
"end": 293,
"loc": {
"start": {
"line": 9,
"column": 16
},
"end": {
"line": 9,
"column": 23
},
"identifierName": "texture"
},
"name": "texture"
}
],
"body": {
"type": "BlockStatement",
"start": 295,
"end": 911,
"loc": {
"start": {
"line": 9,
"column": 25
},
"end": {
"line": 24,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 305,
"end": 313,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 16
}
},
"expression": {
"type": "CallExpression",
"start": 305,
"end": 312,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 15
}
},
"callee": {
"type": "Super",
"start": 305,
"end": 310,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 13
}
}
},
"arguments": []
}
},
{
"type": "IfStatement",
"start": 322,
"end": 639,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 18,
"column": 9
}
},
"test": {
"type": "UnaryExpression",
"start": 326,
"end": 357,
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 43
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "CallExpression",
"start": 327,
"end": 357,
"loc": {
"start": {
"line": 11,
"column": 13
},
"end": {
"line": 11,
"column": 43
}
},
"callee": {
"type": "MemberExpression",
"start": 327,
"end": 348,
"loc": {
"start": {
"line": 11,
"column": 13
},
"end": {
"line": 11,
"column": 34
}
},
"object": {
"type": "Identifier",
"start": 327,
"end": 344,
"loc": {
"start": {
"line": 11,
"column": 13
},
"end": {
"line": 11,
"column": 30
},
"identifierName": "materialByTexture"
},
"name": "materialByTexture"
},
"property": {
"type": "Identifier",
"start": 345,
"end": 348,
"loc": {
"start": {
"line": 11,
"column": 31
},
"end": {
"line": 11,
"column": 34
},
"identifierName": "has"
},
"name": "has"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 349,
"end": 356,
"loc": {
"start": {
"line": 11,
"column": 35
},
"end": {
"line": 11,
"column": 42
},
"identifierName": "texture"
},
"name": "texture"
}
]
},
"extra": {
"parenthesizedArgument": false
}
},
"consequent": {
"type": "BlockStatement",
"start": 359,
"end": 639,
"loc": {
"start": {
"line": 11,
"column": 45
},
"end": {
"line": 18,
"column": 9
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 373,
"end": 439,
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 78
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 379,
"end": 438,
"loc": {
"start": {
"line": 12,
"column": 18
},
"end": {
"line": 12,
"column": 77
}
},
"id": {
"type": "Identifier",
"start": 379,
"end": 387,
"loc": {
"start": {
"line": 12,
"column": 18
},
"end": {
"line": 12,
"column": 26
},
"identifierName": "material"
},
"name": "material"
},
"init": {
"type": "NewExpression",
"start": 390,
"end": 438,
"loc": {
"start": {
"line": 12,
"column": 29
},
"end": {
"line": 12,
"column": 77
}
},
"callee": {
"type": "MemberExpression",
"start": 394,
"end": 417,
"loc": {
"start": {
"line": 12,
"column": 33
},
"end": {
"line": 12,
"column": 56
}
},
"object": {
"type": "Identifier",
"start": 394,
"end": 399,
"loc": {
"start": {
"line": 12,
"column": 33
},
"end": {
"line": 12,
"column": 38
},
"identifierName": "THREE"
},
"name": "THREE"
},
"property": {
"type": "Identifier",
"start": 400,
"end": 417,
"loc": {
"start": {
"line": 12,
"column": 39
},
"end": {
"line": 12,
"column": 56
},
"identifierName": "MeshBasicMaterial"
},
"name": "MeshBasicMaterial"
},
"computed": false
},
"arguments": [
{
"type": "ObjectExpression",
"start": 418,
"end": 437,
"loc": {
"start": {
"line": 12,
"column": 57
},
"end": {
"line": 12,
"column": 76
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 420,
"end": 435,
"loc": {
"start": {
"line": 12,
"column": 59
},
"end": {
"line": 12,
"column": 74
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 420,
"end": 425,
"loc": {
"start": {
"line": 12,
"column": 59
},
"end": {
"line": 12,
"column": 64
},
"identifierName": "color"
},
"name": "color"
},
"value": {
"type": "NumericLiteral",
"start": 427,
"end": 435,
"loc": {
"start": {
"line": 12,
"column": 66
},
"end": {
"line": 12,
"column": 74
}
},
"extra": {
"rawValue": 16777215,
"raw": "0xffffff"
},
"value": 16777215
}
}
]
}
]
}
}
],
"kind": "const"
},
{
"type": "ExpressionStatement",
"start": 452,
"end": 575,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 16,
"column": 17
}
},
"expression": {
"type": "CallExpression",
"start": 452,
"end": 574,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 16,
"column": 16
}
},
"callee": {
"type": "ArrowFunctionExpression",
"start": 453,
"end": 571,
"loc": {
"start": {
"line": 13,
"column": 13
},
"end": {
"line": 16,
"column": 13
}
},
"id": null,
"generator": false,
"expression": false,
"async": true,
"params": [],
"body": {
"type": "BlockStatement",
"start": 465,
"end": 571,
"loc": {
"start": {
"line": 13,
"column": 25
},
"end": {
"line": 16,
"column": 13
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 483,
"end": 512,
"loc": {
"start": {
"line": 14,
"column": 16
},
"end": {
"line": 14,
"column": 45
}
},
"expression": {
"type": "AssignmentExpression",
"start": 483,
"end": 511,
"loc": {
"start": {
"line": 14,
"column": 16
},
"end": {
"line": 14,
"column": 44
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 483,
"end": 495,
"loc": {
"start": {
"line": 14,
"column": 16
},
"end": {
"line": 14,
"column": 28
}
},
"object": {
"type": "Identifier",
"start": 483,
"end": 491,
"loc": {
"start": {
"line": 14,
"column": 16
},
"end": {
"line": 14,
"column": 24
},
"identifierName": "material"
},
"name": "material"
},
"property": {
"type": "Identifier",
"start": 492,
"end": 495,
"loc": {
"start": {
"line": 14,
"column": 25
},
"end": {
"line": 14,
"column": 28
},
"identifierName": "map"
},
"name": "map"
},
"computed": false
},
"right": {
"type": "AwaitExpression",
"start": 498,
"end": 511,
"loc": {
"start": {
"line": 14,
"column": 31
},
"end": {
"line": 14,
"column": 44
}
},
"argument": {
"type": "Identifier",
"start": 504,
"end": 511,
"loc": {
"start": {
"line": 14,
"column": 37
},
"end": {
"line": 14,
"column": 44
},
"identifierName": "texture"
},
"name": "texture"
}
}
}
},
{
"type": "ExpressionStatement",
"start": 529,
"end": 557,
"loc": {
"start": {
"line": 15,
"column": 16
},
"end": {
"line": 15,
"column": 44
}
},
"expression": {
"type": "AssignmentExpression",
"start": 529,
"end": 556,
"loc": {
"start": {
"line": 15,
"column": 16
},
"end": {
"line": 15,
"column": 43
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 529,
"end": 549,
"loc": {
"start": {
"line": 15,
"column": 16
},
"end": {
"line": 15,
"column": 36
}
},
"object": {
"type": "Identifier",
"start": 529,
"end": 537,
"loc": {
"start": {
"line": 15,
"column": 16
},
"end": {
"line": 15,
"column": 24
},
"identifierName": "material"
},
"name": "material"
},
"property": {
"type": "Identifier",
"start": 538,
"end": 549,
"loc": {
"start": {
"line": 15,
"column": 25
},
"end": {
"line": 15,
"column": 36
},
"identifierName": "needsUpdate"
},
"name": "needsUpdate"
},
"computed": false
},
"right": {
"type": "BooleanLiteral",
"start": 552,
"end": 556,
"loc": {
"start": {
"line": 15,
"column": 39
},
"end": {
"line": 15,
"column": 43
}
},
"value": true
}
}
}
],
"directives": []
},
"extra": {
"parenthesized": true,
"parenStart": 452
}
},
"arguments": []
}
},
{
"type": "ExpressionStatement",
"start": 588,
"end": 629,
"loc": {
"start": {
"line": 17,
"column": 12
},
"end": {
"line": 17,
"column": 53
}
},
"expression": {
"type": "CallExpression",
"start": 588,
"end": 628,
"loc": {
"start": {
"line": 17,
"column": 12
},
"end": {
"line": 17,
"column": 52
}
},
"callee": {
"type": "MemberExpression",
"start": 588,
"end": 609,
"loc": {
"start": {
"line": 17,
"column": 12
},
"end": {
"line": 17,
"column": 33
}
},
"object": {
"type": "Identifier",
"start": 588,
"end": 605,
"loc": {
"start": {
"line": 17,
"column": 12
},
"end": {
"line": 17,
"column": 29
},
"identifierName": "materialByTexture"
},
"name": "materialByTexture"
},
"property": {
"type": "Identifier",
"start": 606,
"end": 609,
"loc": {
"start": {
"line": 17,
"column": 30
},
"end": {
"line": 17,
"column": 33
},
"identifierName": "set"
},
"name": "set"