awv3
Version:
⚡ AWV3 embedded CAD
1,520 lines (1,519 loc) • 7.21 MB
JSON
{
"type": "File",
"start": 0,
"end": 29142,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 759,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 29142,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 759,
"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": 71,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 39
}
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"start": 39,
"end": 49,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 17
}
},
"local": {
"type": "Identifier",
"start": 44,
"end": 49,
"loc": {
"start": {
"line": 2,
"column": 12
},
"end": {
"line": 2,
"column": 17
},
"identifierName": "Error"
},
"name": "Error"
}
}
],
"source": {
"type": "StringLiteral",
"start": 55,
"end": 70,
"loc": {
"start": {
"line": 2,
"column": 23
},
"end": {
"line": 2,
"column": 38
}
},
"extra": {
"rawValue": "../core/error",
"raw": "'../core/error'"
},
"value": "../core/error"
}
},
{
"type": "ImportDeclaration",
"start": 72,
"end": 115,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 43
}
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"start": 79,
"end": 91,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 19
}
},
"local": {
"type": "Identifier",
"start": 84,
"end": 91,
"loc": {
"start": {
"line": 3,
"column": 12
},
"end": {
"line": 3,
"column": 19
},
"identifierName": "Helpers"
},
"name": "Helpers"
}
}
],
"source": {
"type": "StringLiteral",
"start": 97,
"end": 114,
"loc": {
"start": {
"line": 3,
"column": 25
},
"end": {
"line": 3,
"column": 42
}
},
"extra": {
"rawValue": "../core/helpers",
"raw": "'../core/helpers'"
},
"value": "../core/helpers"
}
},
{
"type": "ImportDeclaration",
"start": 116,
"end": 161,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 45
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 125,
"end": 136,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 20
}
},
"imported": {
"type": "Identifier",
"start": 125,
"end": 136,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 20
},
"identifierName": "lastCreated"
},
"name": "lastCreated"
},
"local": {
"type": "Identifier",
"start": 125,
"end": 136,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 20
},
"identifierName": "lastCreated"
},
"name": "lastCreated"
}
}
],
"source": {
"type": "StringLiteral",
"start": 144,
"end": 160,
"loc": {
"start": {
"line": 4,
"column": 28
},
"end": {
"line": 4,
"column": 44
}
},
"extra": {
"rawValue": "../core/canvas",
"raw": "'../core/canvas'"
},
"value": "../core/canvas"
}
},
{
"type": "ImportDeclaration",
"start": 162,
"end": 221,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 59
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 171,
"end": 182,
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 20
}
},
"imported": {
"type": "Identifier",
"start": 171,
"end": 182,
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 20
},
"identifierName": "exponential"
},
"name": "exponential"
},
"local": {
"type": "Identifier",
"start": 171,
"end": 182,
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 20
},
"identifierName": "exponential"
},
"name": "exponential"
}
},
{
"type": "ImportSpecifier",
"start": 184,
"end": 191,
"loc": {
"start": {
"line": 5,
"column": 22
},
"end": {
"line": 5,
"column": 29
}
},
"imported": {
"type": "Identifier",
"start": 184,
"end": 191,
"loc": {
"start": {
"line": 5,
"column": 22
},
"end": {
"line": 5,
"column": 29
},
"identifierName": "elastic"
},
"name": "elastic"
},
"local": {
"type": "Identifier",
"start": 184,
"end": 191,
"loc": {
"start": {
"line": 5,
"column": 22
},
"end": {
"line": 5,
"column": 29
},
"identifierName": "elastic"
},
"name": "elastic"
}
}
],
"source": {
"type": "StringLiteral",
"start": 199,
"end": 220,
"loc": {
"start": {
"line": 5,
"column": 37
},
"end": {
"line": 5,
"column": 58
}
},
"extra": {
"rawValue": "../animation/easing",
"raw": "'../animation/easing'"
},
"value": "../animation/easing"
}
},
{
"type": "ExportDefaultDeclaration",
"start": 223,
"end": 28868,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 735,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 238,
"end": 28868,
"loc": {
"start": {
"line": 7,
"column": 15
},
"end": {
"line": 735,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 244,
"end": 249,
"loc": {
"start": {
"line": 7,
"column": 21
},
"end": {
"line": 7,
"column": 26
},
"identifierName": "Orbit"
},
"name": "Orbit"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start": 250,
"end": 28868,
"loc": {
"start": {
"line": 7,
"column": 27
},
"end": {
"line": 735,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 256,
"end": 3697,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 87,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 256,
"end": 267,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 15
},
"identifierName": "constructor"
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "AssignmentPattern",
"start": 268,
"end": 302,
"loc": {
"start": {
"line": 8,
"column": 16
},
"end": {
"line": 8,
"column": 50
}
},
"left": {
"type": "Identifier",
"start": 268,
"end": 272,
"loc": {
"start": {
"line": 8,
"column": 16
},
"end": {
"line": 8,
"column": 20
},
"identifierName": "view"
},
"name": "view"
},
"right": {
"type": "CallExpression",
"start": 275,
"end": 302,
"loc": {
"start": {
"line": 8,
"column": 23
},
"end": {
"line": 8,
"column": 50
}
},
"callee": {
"type": "MemberExpression",
"start": 275,
"end": 284,
"loc": {
"start": {
"line": 8,
"column": 23
},
"end": {
"line": 8,
"column": 32
}
},
"object": {
"type": "Identifier",
"start": 275,
"end": 280,
"loc": {
"start": {
"line": 8,
"column": 23
},
"end": {
"line": 8,
"column": 28
},
"identifierName": "Error"
},
"name": "Error"
},
"property": {
"type": "Identifier",
"start": 281,
"end": 284,
"loc": {
"start": {
"line": 8,
"column": 29
},
"end": {
"line": 8,
"column": 32
},
"identifierName": "log"
},
"name": "log"
},
"computed": false
},
"arguments": [
{
"type": "StringLiteral",
"start": 285,
"end": 301,
"loc": {
"start": {
"line": 8,
"column": 33
},
"end": {
"line": 8,
"column": 49
}
},
"extra": {
"rawValue": "View undefined",
"raw": "'View undefined'"
},
"value": "View undefined"
}
]
}
},
{
"type": "AssignmentPattern",
"start": 304,
"end": 316,
"loc": {
"start": {
"line": 8,
"column": 52
},
"end": {
"line": 8,
"column": 64
}
},
"left": {
"type": "Identifier",
"start": 304,
"end": 311,
"loc": {
"start": {
"line": 8,
"column": 52
},
"end": {
"line": 8,
"column": 59
},
"identifierName": "options"
},
"name": "options"
},
"right": {
"type": "ObjectExpression",
"start": 314,
"end": 316,
"loc": {
"start": {
"line": 8,
"column": 62
},
"end": {
"line": 8,
"column": 64
}
},
"properties": []
}
}
],
"body": {
"type": "BlockStatement",
"start": 318,
"end": 3697,
"loc": {
"start": {
"line": 8,
"column": 66
},
"end": {
"line": 87,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 328,
"end": 345,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 25
}
},
"expression": {
"type": "AssignmentExpression",
"start": 328,
"end": 344,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 24
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 328,
"end": 337,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 17
}
},
"object": {
"type": "ThisExpression",
"start": 328,
"end": 332,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 333,
"end": 337,
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 17
},
"identifierName": "view"
},
"name": "view"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 340,
"end": 344,
"loc": {
"start": {
"line": 9,
"column": 20
},
"end": {
"line": 9,
"column": 24
},
"identifierName": "view"
},
"name": "view"
}
}
},
{
"type": "ExpressionStatement",
"start": 354,
"end": 380,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 34
}
},
"expression": {
"type": "AssignmentExpression",
"start": 354,
"end": 379,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 33
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 354,
"end": 365,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 19
}
},
"object": {
"type": "ThisExpression",
"start": 354,
"end": 358,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 359,
"end": 365,
"loc": {
"start": {
"line": 10,
"column": 13
},
"end": {
"line": 10,
"column": 19
},
"identifierName": "canvas"
},
"name": "canvas"
},
"computed": false
},
"right": {
"type": "MemberExpression",
"start": 368,
"end": 379,
"loc": {
"start": {
"line": 10,
"column": 22
},
"end": {
"line": 10,
"column": 33
}
},
"object": {
"type": "Identifier",
"start": 368,
"end": 372,
"loc": {
"start": {
"line": 10,
"column": 22
},
"end": {
"line": 10,
"column": 26
},
"identifierName": "view"
},
"name": "view"
},
"property": {
"type": "Identifier",
"start": 373,
"end": 379,
"loc": {
"start": {
"line": 10,
"column": 27
},
"end": {
"line": 10,
"column": 33
},
"identifierName": "canvas"
},
"name": "canvas"
},
"computed": false
}
}
},
{
"type": "ExpressionStatement",
"start": 389,
"end": 409,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 28
}
},
"expression": {
"type": "AssignmentExpression",
"start": 389,
"end": 408,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 27
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 389,
"end": 397,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 16
}
},
"object": {
"type": "ThisExpression",
"start": 389,
"end": 393,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 394,
"end": 397,
"loc": {
"start": {
"line": 11,
"column": 13
},
"end": {
"line": 11,
"column": 16
},
"identifierName": "dom"
},
"name": "dom"
},
"computed": false
},
"right": {
"type": "MemberExpression",
"start": 400,
"end": 408,
"loc": {
"start": {
"line": 11,
"column": 19
},
"end": {
"line": 11,
"column": 27
}
},
"object": {
"type": "Identifier",
"start": 400,
"end": 404,
"loc": {
"start": {
"line": 11,
"column": 19
},
"end": {
"line": 11,
"column": 23
},
"identifierName": "view"
},
"name": "view"
},
"property": {
"type": "Identifier",
"start": 405,
"end": 408,
"loc": {
"start": {
"line": 11,
"column": 24
},
"end": {
"line": 11,
"column": 27
},
"identifierName": "dom"
},
"name": "dom"
},
"computed": false
}
}
},
{
"type": "ExpressionStatement",
"start": 418,
"end": 447,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 37
}
},
"expression": {
"type": "AssignmentExpression",
"start": 418,
"end": 446,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 36
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 418,
"end": 429,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 19
}
},
"object": {
"type": "ThisExpression",
"start": 418,
"end": 422,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 423,
"end": 429,
"loc": {
"start": {
"line": 12,
"column": 13
},
"end": {
"line": 12,
"column": 19
},
"identifierName": "camera"
},
"name": "camera"
},
"computed": false
},
"right": {
"type": "MemberExpression",
"start": 432,
"end": 446,
"loc": {
"start": {
"line": 12,
"column": 22
},
"end": {
"line": 12,
"column": 36
}
},
"object": {
"type": "Identifier",
"start": 432,
"end": 439,
"loc": {
"start": {
"line": 12,
"column": 22
},
"end": {
"line": 12,
"column": 29
},
"identifierName": "options"
},
"name": "options"
},
"property": {
"type": "Identifier",
"start": 440,
"end": 446,
"loc": {
"start": {
"line": 12,
"column": 30
},
"end": {
"line": 12,
"column": 36
},
"identifierName": "camera"
},
"name": "camera"
},
"computed": false
}
}
},
{
"type": "VariableDeclaration",
"start": 456,
"end": 503,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 55
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 460,
"end": 502,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 54
}
},
"id": {
"type": "Identifier",
"start": 460,
"end": 466,
"loc": {
"start": {
"line": 13,
"column": 12
},
"end": {
"line": 13,
"column": 18
},
"identifierName": "camera"
},
"name": "camera"
},
"init": {
"type": "LogicalExpression",
"start": 470,
"end": 501,
"loc": {
"start": {
"line": 13,
"column": 22
},
"end": {
"line": 13,
"column": 53
}
},
"left": {
"type": "MemberExpression",
"start": 470,
"end": 481,
"loc": {
"start": {
"line": 13,
"column": 22
},
"end": {
"line": 13,
"column": 33
}
},
"object": {
"type": "ThisExpression",
"start": 470,
"end": 474,
"loc": {
"start": {
"line": 13,
"column": 22
},
"end": {
"line": 13,
"column": 26
}
}
},
"property": {
"type": "Identifier",
"start": 475,
"end": 481,
"loc": {
"start": {
"line": 13,
"column": 27
},
"end": {
"line": 13,
"column": 33
},
"identifierName": "camera"
},
"name": "camera"
},
"computed": false
},
"operator": "||",
"right": {
"type": "MemberExpression",
"start": 485,
"end": 501,
"loc": {
"start": {
"line": 13,
"column": 37
},
"end": {
"line": 13,
"column": 53
}
},
"object": {
"type": "MemberExpression",
"start": 485,
"end": 494,
"loc": {
"start": {
"line": 13,
"column": 37
},
"end": {
"line": 13,
"column": 46
}
},
"object": {
"type": "ThisExpression",
"start": 485,
"end": 489,
"loc": {
"start": {
"line": 13,
"column": 37
},
"end": {
"line": 13,
"column": 41
}
}
},
"property": {
"type": "Identifier",
"start": 490,
"end": 494,
"loc": {
"start": {
"line": 13,
"column": 42
},
"end": {
"line": 13,
"column": 46
},
"identifierName": "view"
},
"name": "view"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 495,
"end": 501,
"loc": {
"start": {
"line": 13,
"column": 47
},
"end": {
"line": 13,
"column": 53
},
"identifierName": "camera"
},
"name": "camera"
},
"computed": false
},
"extra": {
"parenthesized": true,
"parenStart": 469
}
}
}
],
"kind": "let"
},
{
"type": "ExpressionStatement",
"start": 513,
"end": 543,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 38
}
},
"expression": {
"type": "AssignmentExpression",
"start": 513,
"end": 542,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 37
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 513,
"end": 524,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 19
}
},
"object": {
"type": "ThisExpression",
"start": 513,
"end": 517,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 518,
"end": 524,
"loc": {
"start": {
"line": 15,
"column": 13
},
"end": {
"line": 15,
"column": 19
},
"identifierName": "easing"
},
"name": "easing"
},
"computed": false
},
"right": {
"type": "MemberExpression",
"start": 527,
"end": 542,
"loc": {
"start": {
"line": 15,
"column": 22
},
"end": {
"line": 15,
"column": 37
}
},
"object": {
"type": "Identifier",
"start": 527,
"end": 538,
"loc": {