UNPKG

awv3

Version:
1,550 lines (1,549 loc) 271 kB
{ "type": "File", "start": 0, "end": 1471, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 43, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 1471, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 43, "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": "ImportDeclaration", "start": 112, "end": 167, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 55 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 119, "end": 131, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 19 } }, "local": { "type": "Identifier", "start": 119, "end": 131, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 19 }, "identifierName": "RingGeometry" }, "name": "RingGeometry" } } ], "source": { "type": "StringLiteral", "start": 137, "end": 166, "loc": { "start": { "line": 4, "column": 25 }, "end": { "line": 4, "column": 54 } }, "extra": { "rawValue": "../../../three/ringgeometry", "raw": "'../../../three/ringgeometry'" }, "value": "../../../three/ringgeometry" } }, { "type": "VariableDeclaration", "start": 169, "end": 351, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 12, "column": 3 } }, "declarations": [ { "type": "VariableDeclarator", "start": 175, "end": 350, "loc": { "start": { "line": 6, "column": 6 }, "end": { "line": 12, "column": 2 } }, "id": { "type": "Identifier", "start": 175, "end": 183, "loc": { "start": { "line": 6, "column": 6 }, "end": { "line": 6, "column": 14 }, "identifierName": "material" }, "name": "material" }, "init": { "type": "NewExpression", "start": 186, "end": 350, "loc": { "start": { "line": 6, "column": 17 }, "end": { "line": 12, "column": 2 } }, "callee": { "type": "MemberExpression", "start": 190, "end": 213, "loc": { "start": { "line": 6, "column": 21 }, "end": { "line": 6, "column": 44 } }, "object": { "type": "Identifier", "start": 190, "end": 195, "loc": { "start": { "line": 6, "column": 21 }, "end": { "line": 6, "column": 26 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 196, "end": 213, "loc": { "start": { "line": 6, "column": 27 }, "end": { "line": 6, "column": 44 }, "identifierName": "MeshBasicMaterial" }, "name": "MeshBasicMaterial" }, "computed": false }, "arguments": [ { "type": "ObjectExpression", "start": 214, "end": 349, "loc": { "start": { "line": 6, "column": 45 }, "end": { "line": 12, "column": 1 } }, "properties": [ { "type": "ObjectProperty", "start": 220, "end": 235, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 19 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 220, "end": 225, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 9 }, "identifierName": "color" }, "name": "color" }, "value": { "type": "NumericLiteral", "start": 227, "end": 235, "loc": { "start": { "line": 7, "column": 11 }, "end": { "line": 7, "column": 19 } }, "extra": { "rawValue": 7169981, "raw": "0x6d67bd" }, "value": 7169981 } }, { "type": "ObjectProperty", "start": 241, "end": 263, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 26 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 241, "end": 245, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 8 }, "identifierName": "side" }, "name": "side" }, "value": { "type": "MemberExpression", "start": 247, "end": 263, "loc": { "start": { "line": 8, "column": 10 }, "end": { "line": 8, "column": 26 } }, "object": { "type": "Identifier", "start": 247, "end": 252, "loc": { "start": { "line": 8, "column": 10 }, "end": { "line": 8, "column": 15 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 253, "end": 263, "loc": { "start": { "line": 8, "column": 16 }, "end": { "line": 8, "column": 26 }, "identifierName": "DoubleSide" }, "name": "DoubleSide" }, "computed": false } }, { "type": "ObjectProperty", "start": 269, "end": 288, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 23 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 269, "end": 282, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 17 }, "identifierName": "polygonOffset" }, "name": "polygonOffset" }, "value": { "type": "BooleanLiteral", "start": 284, "end": 288, "loc": { "start": { "line": 9, "column": 19 }, "end": { "line": 9, "column": 23 } }, "value": true } }, { "type": "ObjectProperty", "start": 294, "end": 317, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 27 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 294, "end": 313, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 23 }, "identifierName": "polygonOffsetFactor" }, "name": "polygonOffsetFactor" }, "value": { "type": "UnaryExpression", "start": 315, "end": 317, "loc": { "start": { "line": 10, "column": 25 }, "end": { "line": 10, "column": 27 } }, "operator": "-", "prefix": true, "argument": { "type": "NumericLiteral", "start": 316, "end": 317, "loc": { "start": { "line": 10, "column": 26 }, "end": { "line": 10, "column": 27 } }, "extra": { "rawValue": 2, "raw": "2" }, "value": 2 }, "extra": { "parenthesizedArgument": false } } }, { "type": "ObjectProperty", "start": 323, "end": 346, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 27 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 323, "end": 341, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 22 }, "identifierName": "polygonOffsetUnits" }, "name": "polygonOffsetUnits" }, "value": { "type": "UnaryExpression", "start": 343, "end": 346, "loc": { "start": { "line": 11, "column": 24 }, "end": { "line": 11, "column": 27 } }, "operator": "-", "prefix": true, "argument": { "type": "NumericLiteral", "start": 344, "end": 346, "loc": { "start": { "line": 11, "column": 25 }, "end": { "line": 11, "column": 27 } }, "extra": { "rawValue": 10, "raw": "10" }, "value": 10 }, "extra": { "parenthesizedArgument": false } } } ] } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 352, "end": 372, "loc": { "start": { "line": 13, "column": 0 }, "end": { "line": 13, "column": 20 } }, "declarations": [ { "type": "VariableDeclarator", "start": 358, "end": 371, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 19 } }, "id": { "type": "Identifier", "start": 358, "end": 366, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 14 }, "identifierName": "segments" }, "name": "segments" }, "init": { "type": "NumericLiteral", "start": 369, "end": 371, "loc": { "start": { "line": 13, "column": 17 }, "end": { "line": 13, "column": 19 } }, "extra": { "rawValue": 32, "raw": "32" }, "value": 32 } } ], "kind": "const" }, { "type": "ExportDefaultDeclaration", "start": 374, "end": 1470, "loc": { "start": { "line": 15, "column": 0 }, "end": { "line": 42, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 389, "end": 1470, "loc": { "start": { "line": 15, "column": 15 }, "end": { "line": 42, "column": 1 } }, "id": { "type": "Identifier", "start": 395, "end": 398, "loc": { "start": { "line": 15, "column": 21 }, "end": { "line": 15, "column": 24 }, "identifierName": "Arc" }, "name": "Arc" }, "superClass": { "type": "Identifier", "start": 407, "end": 419, "loc": { "start": { "line": 15, "column": 33 }, "end": { "line": 15, "column": 45 }, "identifierName": "BaseGraphics" }, "name": "BaseGraphics" }, "body": { "type": "ClassBody", "start": 420, "end": 1470, "loc": { "start": { "line": 15, "column": 46 }, "end": { "line": 42, "column": 1 } }, "body": [ { "type": "ClassMethod", "start": 426, "end": 719, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 23, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 426, "end": 437, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 15 }, "identifierName": "constructor" }, "name": "constructor" }, "static": false, "kind": "constructor", "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 440, "end": 719, "loc": { "start": { "line": 16, "column": 18 }, "end": { "line": 23, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 450, "end": 458, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 16 } }, "expression": { "type": "CallExpression", "start": 450, "end": 457, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 15 } }, "callee": { "type": "Super", "start": 450, "end": 455, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 13 } } }, "arguments": [] } }, { "type": "VariableDeclaration", "start": 467, "end": 506, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 47 } }, "declarations": [ { "type": "VariableDeclarator", "start": 473, "end": 505, "loc": { "start": { "line": 18, "column": 14 }, "end": { "line": 18, "column": 46 } }, "id": { "type": "Identifier", "start": 473, "end": 486, "loc": { "start": { "line": 18, "column": 14 }, "end": { "line": 18, "column": 27 }, "identifierName": "materialClone" }, "name": "materialClone" }, "init": { "type": "CallExpression", "start": 489, "end": 505, "loc": { "start": { "line": 18, "column": 30 }, "end": { "line": 18, "column": 46 } }, "callee": { "type": "MemberExpression", "start": 489, "end": 503, "loc": { "start": { "line": 18, "column": 30 }, "end": { "line": 18, "column": 44 } }, "object": { "type": "Identifier", "start": 489, "end": 497, "loc": { "start": { "line": 18, "column": 30 }, "end": { "line": 18, "column": 38 }, "identifierName": "material" }, "name": "material" }, "property": { "type": "Identifier", "start": 498, "end": 503, "loc": { "start": { "line": 18, "column": 39 }, "end": { "line": 18, "column": 44 }, "identifierName": "clone" }, "name": "clone" }, "computed": false }, "arguments": [] } } ], "kind": "const" }, { "type": "ExpressionStatement", "start": 515, "end": 590, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 83 } }, "expression": { "type": "AssignmentExpression", "start": 515, "end": 589, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 82 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 515, "end": 529, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 22 } }, "object": { "type": "ThisExpression", "start": 515, "end": 519, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 12 } } }, "property": { "type": "Identifier", "start": 520, "end": 529, "loc": { "start": { "line": 19, "column": 13 }, "end": { "line": 19, "column": 22 }, "identifierName": "localMesh" }, "name": "localMesh" }, "computed": false }, "right": { "type": "NewExpression", "start": 532, "end": 589, "loc": { "start": { "line": 19, "column": 25 }, "end": { "line": 19, "column": 82 } }, "callee": { "type": "MemberExpression", "start": 536, "end": 546, "loc": { "start": { "line": 19, "column": 29 }, "end": { "line": 19, "column": 39 } }, "object": { "type": "Identifier", "start": 536, "end": 541, "loc": { "start": { "line": 19, "column": 29 }, "end": { "line": 19, "column": 34 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 542, "end": 546, "loc": { "start": { "line": 19, "column": 35 }, "end": { "line": 19, "column": 39 }, "identifierName": "Mesh" }, "name": "Mesh" }, "computed": false }, "arguments": [ { "type": "NewExpression", "start": 547, "end": 573, "loc": { "start": { "line": 19, "column": 40 }, "end": { "line": 19, "column": 66 } }, "callee": { "type": "Identifier", "start": 551, "end": 563, "loc": { "start": { "line": 19, "column": 44 }, "end": { "line": 19, "column": 56 }, "identifierName": "RingGeometry" }, "name": "RingGeometry" }, "arguments": [ { "type": "Identifier", "start": 564, "end": 572, "loc": { "start": { "line": 19, "column": 57 }, "end": { "line": 19, "column": 65 }, "identifierName": "segments" }, "name": "segments" } ] }, { "type": "Identifier", "start": 575, "end": 588, "loc": { "start": { "line": 19, "column": 68 }, "end": { "line": 19, "column": 81 }, "identifierName": "materialClone" }, "name": "materialClone" } ] } } }, { "type": "ExpressionStatement", "start": 599, "end": 636, "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 45 } }, "expression": { "type": "AssignmentExpression", "start": 599, "end": 635, "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 44 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 599, "end": 618, "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 27 } }, "object": { "type": "MemberExpression", "start": 599, "end": 613, "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 22 } }, "object": { "type": "ThisExpression", "start": 599, "end": 603, "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 12 } } }, "property": { "type": "Identifier", "start": 604, "end": 613, "loc": { "start": { "line": 20, "column": 13 }, "end": { "line": 20, "column": 22 }, "identifierName": "localMesh" }, "name": "localMesh" }, "computed": false }, "property": { "type": "Identifier", "start": 614, "end": 618, "loc": { "start": { "line": 20, "column": 23 }, "end": { "line": 20, "column": 27 }, "identifierName": "type" }, "name": "type" }, "computed": false }, "right": { "type": "StringLiteral", "start": 621, "end": 635, "loc": { "start": { "line": 20, "column": 30 }, "end": { "line": 20, "column": 44 } }, "extra": { "rawValue": "SketcherMesh", "raw": "'SketcherMesh'" }, "value": "SketcherMesh" } } }, { "type": "ExpressionStatement", "start": 645, "end": 679, "loc": { "start": { "line": 21, "column": 8 }, "end": { "line": 21, "column": 42 } }, "expression": { "type": "AssignmentExpression", "start": 645, "end": 678, "loc": { "start": { "line": 21, "column": 8 }, "end": { "line": 21, "column": 41 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 645, "end": 673, "loc": { "start": { "line": 21, "column": 8 }, "end": { "line": 21, "column": 36 }