awv3
Version:
⚡ AWV3 embedded CAD
1,387 lines • 141 kB
JSON
{
"type": "File",
"start": 0,
"end": 830,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 24,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 830,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 24,
"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": 88,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 56
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 39,
"end": 52,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 20
}
},
"local": {
"type": "Identifier",
"start": 39,
"end": 52,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 20
},
"identifierName": "MaterialStore"
},
"name": "MaterialStore"
}
}
],
"source": {
"type": "StringLiteral",
"start": 58,
"end": 87,
"loc": {
"start": {
"line": 2,
"column": 26
},
"end": {
"line": 2,
"column": 55
}
},
"extra": {
"rawValue": "../../../misc/materialstore",
"raw": "'../../../misc/materialstore'"
},
"value": "../../../misc/materialstore"
}
},
{
"type": "ImportDeclaration",
"start": 89,
"end": 134,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 45
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 96,
"end": 103,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 14
}
},
"local": {
"type": "Identifier",
"start": 96,
"end": 103,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 14
},
"identifierName": "Object3"
},
"name": "Object3"
}
}
],
"source": {
"type": "StringLiteral",
"start": 109,
"end": 133,
"loc": {
"start": {
"line": 3,
"column": 20
},
"end": {
"line": 3,
"column": 44
}
},
"extra": {
"rawValue": "../../../three/object3",
"raw": "'../../../three/object3'"
},
"value": "../../../three/object3"
}
},
{
"type": "ImportDeclaration",
"start": 135,
"end": 168,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 33
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 142,
"end": 153,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 18
}
},
"local": {
"type": "Identifier",
"start": 142,
"end": 153,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 18
},
"identifierName": "BaseHandler"
},
"name": "BaseHandler"
}
}
],
"source": {
"type": "StringLiteral",
"start": 159,
"end": 167,
"loc": {
"start": {
"line": 4,
"column": 24
},
"end": {
"line": 4,
"column": 32
}
},
"extra": {
"rawValue": "./base",
"raw": "'./base'"
},
"value": "./base"
}
},
{
"type": "ExportDefaultDeclaration",
"start": 170,
"end": 829,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 23,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 185,
"end": 829,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 23,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 191,
"end": 203,
"loc": {
"start": {
"line": 6,
"column": 21
},
"end": {
"line": 6,
"column": 33
},
"identifierName": "HoverHandler"
},
"name": "HoverHandler"
},
"superClass": {
"type": "Identifier",
"start": 212,
"end": 223,
"loc": {
"start": {
"line": 6,
"column": 42
},
"end": {
"line": 6,
"column": 53
},
"identifierName": "BaseHandler"
},
"name": "BaseHandler"
},
"body": {
"type": "ClassBody",
"start": 224,
"end": 829,
"loc": {
"start": {
"line": 6,
"column": 54
},
"end": {
"line": 23,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 230,
"end": 346,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 10,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 230,
"end": 241,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 15
},
"identifierName": "constructor"
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 242,
"end": 250,
"loc": {
"start": {
"line": 7,
"column": 16
},
"end": {
"line": 7,
"column": 24
},
"identifierName": "sketcher"
},
"name": "sketcher"
},
{
"type": "Identifier",
"start": 252,
"end": 256,
"loc": {
"start": {
"line": 7,
"column": 26
},
"end": {
"line": 7,
"column": 30
},
"identifierName": "name"
},
"name": "name"
}
],
"body": {
"type": "BlockStatement",
"start": 258,
"end": 346,
"loc": {
"start": {
"line": 7,
"column": 32
},
"end": {
"line": 10,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 268,
"end": 290,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 30
}
},
"expression": {
"type": "CallExpression",
"start": 268,
"end": 289,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 29
}
},
"callee": {
"type": "Super",
"start": 268,
"end": 273,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 13
}
}
},
"arguments": [
{
"type": "Identifier",
"start": 274,
"end": 282,
"loc": {
"start": {
"line": 8,
"column": 14
},
"end": {
"line": 8,
"column": 22
},
"identifierName": "sketcher"
},
"name": "sketcher"
},
{
"type": "Identifier",
"start": 284,
"end": 288,
"loc": {
"start": {
"line": 8,
"column": 24
},
"end": {
"line": 8,
"column": 28
},
"identifierName": "name"
},
"name": "name"
}
]
}
},
{
"type": "ExpressionStatement",
"start": 299,
"end": 340,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 49
}
},
"expression": {
"type": "AssignmentExpression",
"start": 299,
"end": 339,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 48
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 299,
"end": 317,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 26
}
},
"object": {
"type": "ThisExpression",
"start": 299,
"end": 303,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 304,
"end": 317,
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 26
},
"identifierName": "materialStore"
},
"name": "materialStore"
},
"computed": false
},
"right": {
"type": "NewExpression",
"start": 320,
"end": 339,
"loc": {
"start": {
"line": 9,
"column": 29
},
"end": {
"line": 9,
"column": 48
}
},
"callee": {
"type": "Identifier",
"start": 324,
"end": 337,
"loc": {
"start": {
"line": 9,
"column": 33
},
"end": {
"line": 9,
"column": 46
},
"identifierName": "MaterialStore"
},
"name": "MaterialStore"
},
"arguments": []
}
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 352,
"end": 688,
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 18,
"column": 5
}
},
"computed": true,
"key": {
"type": "MemberExpression",
"start": 353,
"end": 387,
"loc": {
"start": {
"line": 12,
"column": 5
},
"end": {
"line": 12,
"column": 39
}
},
"object": {
"type": "MemberExpression",
"start": 353,
"end": 379,
"loc": {
"start": {
"line": 12,
"column": 5
},
"end": {
"line": 12,
"column": 31
}
},
"object": {
"type": "MemberExpression",
"start": 353,
"end": 367,
"loc": {
"start": {
"line": 12,
"column": 5
},
"end": {
"line": 12,
"column": 19
}
},
"object": {
"type": "Identifier",
"start": 353,
"end": 360,
"loc": {
"start": {
"line": 12,
"column": 5
},
"end": {
"line": 12,
"column": 12
},
"identifierName": "Object3"
},
"name": "Object3"
},
"property": {
"type": "Identifier",
"start": 361,
"end": 367,
"loc": {
"start": {
"line": 12,
"column": 13
},
"end": {
"line": 12,
"column": 19
},
"identifierName": "Events"
},
"name": "Events"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 368,
"end": 379,
"loc": {
"start": {
"line": 12,
"column": 20
},
"end": {
"line": 12,
"column": 31
},
"identifierName": "Interaction"
},
"name": "Interaction"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 380,
"end": 387,
"loc": {
"start": {
"line": 12,
"column": 32
},
"end": {
"line": 12,
"column": 39
},
"identifierName": "Hovered"
},
"name": "Hovered"
},
"computed": false
},
"static": false,
"kind": "method",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 389,
"end": 395,
"loc": {
"start": {
"line": 12,
"column": 41
},
"end": {
"line": 12,
"column": 47
},
"identifierName": "object"
},
"name": "object"
},
{
"type": "Identifier",
"start": 397,
"end": 406,
"loc": {
"start": {
"line": 12,
"column": 49
},
"end": {
"line": 12,
"column": 58
},
"identifierName": "hitObject"
},
"name": "hitObject"
}
],
"body": {
"type": "BlockStatement",
"start": 408,
"end": 688,
"loc": {
"start": {
"line": 12,
"column": 60
},
"end": {
"line": 18,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 418,
"end": 682,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 17,
"column": 20
}
},
"expression": {
"type": "CallExpression",
"start": 418,
"end": 681,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 17,
"column": 19
}
},
"callee": {
"type": "MemberExpression",
"start": 418,
"end": 678,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 17,
"column": 16
}
},
"object": {
"type": "CallExpression",
"start": 418,
"end": 672,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 17,
"column": 10
}
},
"callee": {
"type": "MemberExpression",
"start": 418,
"end": 442,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 32
}
},
"object": {
"type": "MemberExpression",
"start": 418,
"end": 436,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 26
}
},
"object": {
"type": "ThisExpression",
"start": 418,
"end": 422,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 423,
"end": 436,
"loc": {
"start": {
"line": 13,
"column": 13
},
"end": {
"line": 13,
"column": 26
},
"identifierName": "materialStore"
},
"name": "materialStore"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 437,
"end": 442,
"loc": {
"start": {
"line": 13,
"column": 27
},
"end": {
"line": 13,
"column": 32
},
"identifierName": "store"
},
"name": "store"
},
"computed": false
},
"arguments": [
{
"type": "MemberExpression",
"start": 443,
"end": 461,
"loc": {
"start": {
"line": 13,
"column": 33
},
"end": {
"line": 13,
"column": 51
}
},
"object": {
"type": "Identifier",
"start": 443,
"end": 452,
"loc": {
"start": {
"line": 13,
"column": 33
},
"end": {
"line": 13,
"column": 42
},
"identifierName": "hitObject"
},
"name": "hitObject"
},
"property": {
"type": "Identifier",
"start": 453,
"end": 461,
"loc": {
"start": {
"line": 13,
"column": 43
},
"end": {
"line": 13,
"column": 51
},
"identifierName": "material"
},
"name": "material"
},
"computed": false
},
{
"type": "ObjectExpression",
"start": 463,
"end": 671,
"loc": {
"start": {
"line": 13,
"column": 53
},
"end": {
"line": 17,
"column": 9
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 477,
"end": 509,
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 44
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 477,
"end": 482,
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 17
},
"identifierName": "color"
},
"name": "color"
},
"value": {
"type": "NewExpression",
"start": 484,
"end": 509,
"loc": {
"start": {
"line": 14,
"column": 19
},
"end": {
"line": 14,
"column": 44
}
},
"callee": {
"type": "MemberExpression",
"start": 488,
"end": 499,
"loc": {
"start": {
"line": 14,
"column": 23
},
"end": {
"line": 14,
"column": 34
}
},
"object": {
"type": "Identifier",
"start": 488,
"end": 493,
"loc": {
"start": {
"line": 14,
"column": 23
},
"end": {
"line": 14,
"column": 28
},
"identifierName": "THREE"
},
"name": "THREE"
},
"property": {
"type": "Identifier",
"start": 494,
"end": 499,
"loc": {
"start": {
"line": 14,
"column": 29
},
"end": {
"line": 14,
"column": 34
},
"identifierName": "Color"
},
"name": "Color"
},
"computed": false
},
"arguments": [
{
"type": "NumericLiteral",
"start": 500,
"end": 508,
"loc": {
"start": {
"line": 14,
"column": 35
},
"end": {
"line": 14,
"column": 43
}
},
"extra": {
"rawValue": 2676639,
"raw": "0x28d79f"
},
"value": 2676639
}
]
}
},
{
"type": "ObjectProperty",
"start": 610,
"end": 634,
"loc": {
"start": {
"line": 16,
"column": 12
},
"end": {
"line": 16,
"column": 36
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 610,
"end": 629,
"loc": {
"start": {
"line": 16,
"column": 12
},
"end": {
"line": 16,
"column": 31
},
"identifierName": "polygonOffsetFactor"
},
"name": "polygonOffsetFactor",
"leadingComments": null
},
"value": {
"type": "UnaryExpression",
"start": 631,
"end": 634,
"loc": {
"start": {
"line": 16,
"column": 33
},
"end": {
"line": 16,
"column": 36
}
},
"operator": "-",
"prefix": true,
"argument": {
"type": "NumericLiteral",
"start": 632,
"end": 634,
"loc": {
"start": {
"line": 16,
"column": 34
},
"end": {
"line": 16,
"column": 36
}
},
"extra": {
"rawValue": 10,
"raw": "10"
},
"value": 10
},
"extra": {
"parenthesizedArgument": false
}
},
"leadingComments": [
{
"type": "CommentLine",
"value": "note: make sure that hovered point is on front (in case of tie by depth)",
"start": 523,
"end": 597,
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 15,
"column": 86
}
}
}
]
},
{
"type": "ObjectProperty",
"start": 636,
"end": 660,
"loc": {
"start": {
"line": 16,
"column": 38
},
"end": {
"line": 16,
"column": 62
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 636,
"end": 654,
"loc": {
"start": {
"line": 16,
"column": 38
},
"end": {
"line": 16,
"column": 56
},
"identifierName": "polygonOffsetUnits"
},
"name": "polygonOffsetUnits"
},
"value": {
"type": "UnaryExpression",
"start": 657,
"end": 660,
"loc": {
"start": {
"line": 16,
"column": 59
},
"end": {
"line": 16,
"column": 62
}
},
"operator": "-",
"prefix": true,
"argument": {
"type": "NumericLiteral",
"start": 658,
"end": 660,
"loc": {
"start": {
"line": 16,
"column": 60
},
"end": {
"line": 16,
"column": 62
}
},
"extra": {
"rawValue": 50,
"raw": "50"
},
"value": 50
},
"extra": {
"parenthesizedArgument": false
}
}
}
]
}
]
},
"property": {
"type": "Identifier",
"start": 673,
"end": 678,
"loc": {
"start": {
"line": 17,
"column": 11
},
"end": {
"line": 17,
"column": 16
},
"identifierName": "start"
},
"name": "start"
},
"computed": false
},
"arguments": [
{
"type": "NumericLiteral",
"start": 679,
"end": 680,
"loc": {
"start": {
"line": 17,
"column": 17
},
"end": {
"line": 17,
"col