awv3
Version:
⚡ AWV3 embedded CAD
1,505 lines • 188 kB
JSON
{
"type": "File",
"start": 0,
"end": 958,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 31,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 958,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 31,
"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": 66,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 34
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 39,
"end": 51,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 19
}
},
"local": {
"type": "Identifier",
"start": 39,
"end": 51,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 19
},
"identifierName": "BaseGraphics"
},
"name": "BaseGraphics"
}
}
],
"source": {
"type": "StringLiteral",
"start": 57,
"end": 65,
"loc": {
"start": {
"line": 2,
"column": 25
},
"end": {
"line": 2,
"column": 33
}
},
"extra": {
"rawValue": "./base",
"raw": "'./base'"
},
"value": "./base"
}
},
{
"type": "VariableDeclaration",
"start": 68,
"end": 123,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 55
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 74,
"end": 122,
"loc": {
"start": {
"line": 4,
"column": 6
},
"end": {
"line": 4,
"column": 54
}
},
"id": {
"type": "Identifier",
"start": 74,
"end": 82,
"loc": {
"start": {
"line": 4,
"column": 6
},
"end": {
"line": 4,
"column": 14
},
"identifierName": "geometry"
},
"name": "geometry"
},
"init": {
"type": "NewExpression",
"start": 85,
"end": 122,
"loc": {
"start": {
"line": 4,
"column": 17
},
"end": {
"line": 4,
"column": 54
}
},
"callee": {
"type": "MemberExpression",
"start": 89,
"end": 115,
"loc": {
"start": {
"line": 4,
"column": 21
},
"end": {
"line": 4,
"column": 47
}
},
"object": {
"type": "Identifier",
"start": 89,
"end": 94,
"loc": {
"start": {
"line": 4,
"column": 21
},
"end": {
"line": 4,
"column": 26
},
"identifierName": "THREE"
},
"name": "THREE"
},
"property": {
"type": "Identifier",
"start": 95,
"end": 115,
"loc": {
"start": {
"line": 4,
"column": 27
},
"end": {
"line": 4,
"column": 47
},
"identifierName": "CircleBufferGeometry"
},
"name": "CircleBufferGeometry"
},
"computed": false
},
"arguments": [
{
"type": "NumericLiteral",
"start": 116,
"end": 117,
"loc": {
"start": {
"line": 4,
"column": 48
},
"end": {
"line": 4,
"column": 49
}
},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
},
{
"type": "NumericLiteral",
"start": 119,
"end": 121,
"loc": {
"start": {
"line": 4,
"column": 51
},
"end": {
"line": 4,
"column": 53
}
},
"extra": {
"rawValue": 32,
"raw": "32"
},
"value": 32
}
]
}
}
],
"kind": "const"
},
{
"type": "VariableDeclaration",
"start": 124,
"end": 306,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 11,
"column": 3
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 130,
"end": 305,
"loc": {
"start": {
"line": 5,
"column": 6
},
"end": {
"line": 11,
"column": 2
}
},
"id": {
"type": "Identifier",
"start": 130,
"end": 138,
"loc": {
"start": {
"line": 5,
"column": 6
},
"end": {
"line": 5,
"column": 14
},
"identifierName": "material"
},
"name": "material"
},
"init": {
"type": "NewExpression",
"start": 141,
"end": 305,
"loc": {
"start": {
"line": 5,
"column": 17
},
"end": {
"line": 11,
"column": 2
}
},
"callee": {
"type": "MemberExpression",
"start": 145,
"end": 168,
"loc": {
"start": {
"line": 5,
"column": 21
},
"end": {
"line": 5,
"column": 44
}
},
"object": {
"type": "Identifier",
"start": 145,
"end": 150,
"loc": {
"start": {
"line": 5,
"column": 21
},
"end": {
"line": 5,
"column": 26
},
"identifierName": "THREE"
},
"name": "THREE"
},
"property": {
"type": "Identifier",
"start": 151,
"end": 168,
"loc": {
"start": {
"line": 5,
"column": 27
},
"end": {
"line": 5,
"column": 44
},
"identifierName": "MeshBasicMaterial"
},
"name": "MeshBasicMaterial"
},
"computed": false
},
"arguments": [
{
"type": "ObjectExpression",
"start": 169,
"end": 304,
"loc": {
"start": {
"line": 5,
"column": 45
},
"end": {
"line": 11,
"column": 1
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 175,
"end": 190,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 19
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 175,
"end": 180,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 9
},
"identifierName": "color"
},
"name": "color"
},
"value": {
"type": "NumericLiteral",
"start": 182,
"end": 190,
"loc": {
"start": {
"line": 6,
"column": 11
},
"end": {
"line": 6,
"column": 19
}
},
"extra": {
"rawValue": 10967001,
"raw": "0xa757d9"
},
"value": 10967001
}
},
{
"type": "ObjectProperty",
"start": 196,
"end": 218,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 26
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 196,
"end": 200,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 8
},
"identifierName": "side"
},
"name": "side"
},
"value": {
"type": "MemberExpression",
"start": 202,
"end": 218,
"loc": {
"start": {
"line": 7,
"column": 10
},
"end": {
"line": 7,
"column": 26
}
},
"object": {
"type": "Identifier",
"start": 202,
"end": 207,
"loc": {
"start": {
"line": 7,
"column": 10
},
"end": {
"line": 7,
"column": 15
},
"identifierName": "THREE"
},
"name": "THREE"
},
"property": {
"type": "Identifier",
"start": 208,
"end": 218,
"loc": {
"start": {
"line": 7,
"column": 16
},
"end": {
"line": 7,
"column": 26
},
"identifierName": "DoubleSide"
},
"name": "DoubleSide"
},
"computed": false
}
},
{
"type": "ObjectProperty",
"start": 224,
"end": 243,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 23
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 224,
"end": 237,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 17
},
"identifierName": "polygonOffset"
},
"name": "polygonOffset"
},
"value": {
"type": "BooleanLiteral",
"start": 239,
"end": 243,
"loc": {
"start": {
"line": 8,
"column": 19
},
"end": {
"line": 8,
"column": 23
}
},
"value": true
}
},
{
"type": "ObjectProperty",
"start": 249,
"end": 272,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 27
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 249,
"end": 268,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 23
},
"identifierName": "polygonOffsetFactor"
},
"name": "polygonOffsetFactor"
},
"value": {
"type": "UnaryExpression",
"start": 270,
"end": 272,
"loc": {
"start": {
"line": 9,
"column": 25
},
"end": {
"line": 9,
"column": 27
}
},
"operator": "-",
"prefix": true,
"argument": {
"type": "NumericLiteral",
"start": 271,
"end": 272,
"loc": {
"start": {
"line": 9,
"column": 26
},
"end": {
"line": 9,
"column": 27
}
},
"extra": {
"rawValue": 3,
"raw": "3"
},
"value": 3
},
"extra": {
"parenthesizedArgument": false
}
}
},
{
"type": "ObjectProperty",
"start": 278,
"end": 301,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 27
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 278,
"end": 296,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 22
},
"identifierName": "polygonOffsetUnits"
},
"name": "polygonOffsetUnits"
},
"value": {
"type": "UnaryExpression",
"start": 298,
"end": 301,
"loc": {
"start": {
"line": 10,
"column": 24
},
"end": {
"line": 10,
"column": 27
}
},
"operator": "-",
"prefix": true,
"argument": {
"type": "NumericLiteral",
"start": 299,
"end": 301,
"loc": {
"start": {
"line": 10,
"column": 25
},
"end": {
"line": 10,
"column": 27
}
},
"extra": {
"rawValue": 15,
"raw": "15"
},
"value": 15
},
"extra": {
"parenthesizedArgument": false
}
}
}
]
}
]
}
}
],
"kind": "const"
},
{
"type": "ExportDefaultDeclaration",
"start": 308,
"end": 957,
"loc": {
"start": {
"line": 13,
"column": 0
},
"end": {
"line": 30,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 323,
"end": 957,
"loc": {
"start": {
"line": 13,
"column": 15
},
"end": {
"line": 30,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 329,
"end": 334,
"loc": {
"start": {
"line": 13,
"column": 21
},
"end": {
"line": 13,
"column": 26
},
"identifierName": "Point"
},
"name": "Point"
},
"superClass": {
"type": "Identifier",
"start": 343,
"end": 355,
"loc": {
"start": {
"line": 13,
"column": 35
},
"end": {
"line": 13,
"column": 47
},
"identifierName": "BaseGraphics"
},
"name": "BaseGraphics"
},
"body": {
"type": "ClassBody",
"start": 356,
"end": 957,
"loc": {
"start": {
"line": 13,
"column": 48
},
"end": {
"line": 30,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 362,
"end": 592,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 20,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 362,
"end": 373,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 15
},
"identifierName": "constructor"
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 376,
"end": 592,
"loc": {
"start": {
"line": 14,
"column": 18
},
"end": {
"line": 20,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 386,
"end": 394,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 16
}
},
"expression": {
"type": "CallExpression",
"start": 386,
"end": 393,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 15
}
},
"callee": {
"type": "Super",
"start": 386,
"end": 391,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 13
}
}
},
"arguments": []
}
},
{
"type": "ExpressionStatement",
"start": 403,
"end": 463,
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 68
}
},
"expression": {
"type": "AssignmentExpression",
"start": 403,
"end": 462,
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 67
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 403,
"end": 417,
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 22
}
},
"object": {
"type": "ThisExpression",
"start": 403,
"end": 407,
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 408,
"end": 417,
"loc": {
"start": {
"line": 16,
"column": 13
},
"end": {
"line": 16,
"column": 22
},
"identifierName": "localMesh"
},
"name": "localMesh"
},
"computed": false
},
"right": {
"type": "NewExpression",
"start": 420,
"end": 462,
"loc": {
"start": {
"line": 16,
"column": 25
},
"end": {
"line": 16,
"column": 67
}
},
"callee": {
"type": "MemberExpression",
"start": 424,
"end": 434,
"loc": {
"start": {
"line": 16,
"column": 29
},
"end": {
"line": 16,
"column": 39
}
},
"object": {
"type": "Identifier",
"start": 424,
"end": 429,
"loc": {
"start": {
"line": 16,
"column": 29
},
"end": {
"line": 16,
"column": 34
},
"identifierName": "THREE"
},
"name": "THREE"
},
"property": {
"type": "Identifier",
"start": 430,
"end": 434,
"loc": {
"start": {
"line": 16,
"column": 35
},
"end": {
"line": 16,
"column": 39
},
"identifierName": "Mesh"
},
"name": "Mesh"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 435,
"end": 443,
"loc": {
"start": {
"line": 16,
"column": 40
},
"end": {
"line": 16,
"column": 48
},
"identifierName": "geometry"
},
"name": "geometry"
},
{
"type": "CallExpression",
"start": 445,
"end": 461,
"loc": {
"start": {
"line": 16,
"column": 50
},
"end": {
"line": 16,
"column": 66
}
},
"callee": {
"type": "MemberExpression",
"start": 445,
"end": 459,
"loc": {
"start": {
"line": 16,
"column": 50
},
"end": {
"line": 16,
"column": 64
}
},
"object": {
"type": "Identifier",
"start": 445,
"end": 453,
"loc": {
"start": {
"line": 16,
"column": 50
},
"end": {
"line": 16,
"column": 58
},
"identifierName": "material"
},
"name": "material"
},
"property": {
"type": "Identifier",
"start": 454,
"end": 459,
"loc": {
"start": {
"line": 16,
"column": 59
},
"end": {
"line": 16,
"column": 64
},
"identifierName": "clone"
},
"name": "clone"
},
"computed": false
},
"arguments": []
}
]
}
}
},
{
"type": "ExpressionStatement",
"start": 472,
"end": 509,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 45
}
},
"expression": {
"type": "AssignmentExpression",
"start": 472,
"end": 508,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 44
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 472,
"end": 491,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 27
}
},
"object": {
"type": "MemberExpression",
"start": 472,
"end": 486,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 22
}
},
"object": {
"type": "ThisExpression",
"start": 472,
"end": 476,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 477,
"end": 486,
"loc": {
"start": {
"line": 17,
"column": 13
},
"end": {
"line": 17,
"column": 22
},
"identifierName": "localMesh"
},
"name": "localMesh"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 487,
"end": 491,
"loc": {
"start": {
"line": 17,
"column": 23
},
"end": {
"line": 17,
"column": 27
},
"identifierName": "type"
},
"name": "type"
},
"computed": false
},
"right": {
"type": "StringLiteral",
"start": 494,
"end": 508,
"loc": {
"start": {
"line": 17,
"column": 30
},
"end": {
"line": 17,
"column": 44
}
},
"extra": {
"rawValue": "SketcherMesh",
"raw": "'SketcherMesh'"
},
"value": "SketcherMesh"
}
}
},
{
"type": "ExpressionStatement",
"start": 518,
"end": 552,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 42
}
},
"expression": {
"type": "AssignmentExpression",
"start": 518,
"end": 551,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 41
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 518,
"end": 546,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 36
}
},
"object": {
"type": "MemberExpression",
"start": 518,
"end": 541,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 31
}
},
"object": {
"type": "MemberExpression",
"start": 518,
"end": 532,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 22
}
},
"object": {
"type": "ThisExpression",
"start": 518,
"end": 522,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 523,
"end": 532,
"loc": {
"start": {
"line": 18,
"column": 13
},
"end": {
"line": 18,
"column": 22
},
"identifierName": "localMesh"
},
"name": "localMesh"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 533,
"end": 541,
"loc": {
"start": {
"line": 18,
"column": 23
},
"end": {
"line": 18,
"column": 31
},
"identifierName": "material"
},
"name": "material"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 542,
"end": 546,
"loc": {
"start": {
"line": 18,
"column": 32
},
"end": {
"line": 18,
"column": 36
},
"identifierName": "meta"
},
"name": "meta"
},
"computed": false
},
"right": {
"type": "ObjectExpression",
"start": 549,
"end": 551,
"loc": {
"start": {
"line": 18,
"column": 39
},
"end": {
"line": 18,
"column": 41
}
},
"properties": []
}
}
},
{
"type": "ExpressionStatement",
"start": 561,
"end": 586,
"loc": {
"start": {