UNPKG

awv3

Version:
1,509 lines (1,508 loc) 251 kB
{ "type": "File", "start": 0, "end": 1116, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 33, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 1116, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 33, "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": 122, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 54 } }, "declarations": [ { "type": "VariableDeclarator", "start": 74, "end": 121, "loc": { "start": { "line": 4, "column": 6 }, "end": { "line": 4, "column": 53 } }, "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": 121, "loc": { "start": { "line": 4, "column": 17 }, "end": { "line": 4, "column": 53 } }, "callee": { "type": "MemberExpression", "start": 89, "end": 112, "loc": { "start": { "line": 4, "column": 21 }, "end": { "line": 4, "column": 44 } }, "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": 112, "loc": { "start": { "line": 4, "column": 27 }, "end": { "line": 4, "column": 44 }, "identifierName": "BoxBufferGeometry" }, "name": "BoxBufferGeometry" }, "computed": false }, "arguments": [ { "type": "NumericLiteral", "start": 113, "end": 114, "loc": { "start": { "line": 4, "column": 45 }, "end": { "line": 4, "column": 46 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 }, { "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": 120, "loc": { "start": { "line": 4, "column": 51 }, "end": { "line": 4, "column": 52 } }, "extra": { "rawValue": 0, "raw": "0" }, "value": 0 } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 123, "end": 304, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 11, "column": 3 } }, "declarations": [ { "type": "VariableDeclarator", "start": 129, "end": 303, "loc": { "start": { "line": 5, "column": 6 }, "end": { "line": 11, "column": 2 } }, "id": { "type": "Identifier", "start": 129, "end": 137, "loc": { "start": { "line": 5, "column": 6 }, "end": { "line": 5, "column": 14 }, "identifierName": "material" }, "name": "material" }, "init": { "type": "NewExpression", "start": 140, "end": 303, "loc": { "start": { "line": 5, "column": 17 }, "end": { "line": 11, "column": 2 } }, "callee": { "type": "MemberExpression", "start": 144, "end": 167, "loc": { "start": { "line": 5, "column": 21 }, "end": { "line": 5, "column": 44 } }, "object": { "type": "Identifier", "start": 144, "end": 149, "loc": { "start": { "line": 5, "column": 21 }, "end": { "line": 5, "column": 26 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 150, "end": 167, "loc": { "start": { "line": 5, "column": 27 }, "end": { "line": 5, "column": 44 }, "identifierName": "MeshBasicMaterial" }, "name": "MeshBasicMaterial" }, "computed": false }, "arguments": [ { "type": "ObjectExpression", "start": 168, "end": 302, "loc": { "start": { "line": 5, "column": 45 }, "end": { "line": 11, "column": 1 } }, "properties": [ { "type": "ObjectProperty", "start": 174, "end": 189, "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 19 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 174, "end": 179, "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 9 }, "identifierName": "color" }, "name": "color" }, "value": { "type": "NumericLiteral", "start": 181, "end": 189, "loc": { "start": { "line": 6, "column": 11 }, "end": { "line": 6, "column": 19 } }, "extra": { "rawValue": 3373218, "raw": "0x3378a2" }, "value": 3373218 } }, { "type": "ObjectProperty", "start": 195, "end": 217, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 26 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 195, "end": 199, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 8 }, "identifierName": "side" }, "name": "side" }, "value": { "type": "MemberExpression", "start": 201, "end": 217, "loc": { "start": { "line": 7, "column": 10 }, "end": { "line": 7, "column": 26 } }, "object": { "type": "Identifier", "start": 201, "end": 206, "loc": { "start": { "line": 7, "column": 10 }, "end": { "line": 7, "column": 15 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 207, "end": 217, "loc": { "start": { "line": 7, "column": 16 }, "end": { "line": 7, "column": 26 }, "identifierName": "DoubleSide" }, "name": "DoubleSide" }, "computed": false } }, { "type": "ObjectProperty", "start": 223, "end": 242, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 23 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 223, "end": 236, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 17 }, "identifierName": "polygonOffset" }, "name": "polygonOffset" }, "value": { "type": "BooleanLiteral", "start": 238, "end": 242, "loc": { "start": { "line": 8, "column": 19 }, "end": { "line": 8, "column": 23 } }, "value": true } }, { "type": "ObjectProperty", "start": 248, "end": 271, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 27 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 248, "end": 267, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 23 }, "identifierName": "polygonOffsetFactor" }, "name": "polygonOffsetFactor" }, "value": { "type": "UnaryExpression", "start": 269, "end": 271, "loc": { "start": { "line": 9, "column": 25 }, "end": { "line": 9, "column": 27 } }, "operator": "-", "prefix": true, "argument": { "type": "NumericLiteral", "start": 270, "end": 271, "loc": { "start": { "line": 9, "column": 26 }, "end": { "line": 9, "column": 27 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 }, "extra": { "parenthesizedArgument": false } } }, { "type": "ObjectProperty", "start": 277, "end": 299, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 26 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 277, "end": 295, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 22 }, "identifierName": "polygonOffsetUnits" }, "name": "polygonOffsetUnits" }, "value": { "type": "UnaryExpression", "start": 297, "end": 299, "loc": { "start": { "line": 10, "column": 24 }, "end": { "line": 10, "column": 26 } }, "operator": "-", "prefix": true, "argument": { "type": "NumericLiteral", "start": 298, "end": 299, "loc": { "start": { "line": 10, "column": 25 }, "end": { "line": 10, "column": 26 } }, "extra": { "rawValue": 5, "raw": "5" }, "value": 5 }, "extra": { "parenthesizedArgument": false } } } ] } ] } } ], "kind": "const" }, { "type": "ExportDefaultDeclaration", "start": 306, "end": 1115, "loc": { "start": { "line": 13, "column": 0 }, "end": { "line": 32, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 321, "end": 1115, "loc": { "start": { "line": 13, "column": 15 }, "end": { "line": 32, "column": 1 } }, "id": { "type": "Identifier", "start": 327, "end": 331, "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 25 }, "identifierName": "Line" }, "name": "Line" }, "superClass": { "type": "Identifier", "start": 340, "end": 352, "loc": { "start": { "line": 13, "column": 34 }, "end": { "line": 13, "column": 46 }, "identifierName": "BaseGraphics" }, "name": "BaseGraphics" }, "body": { "type": "ClassBody", "start": 353, "end": 1115, "loc": { "start": { "line": 13, "column": 47 }, "end": { "line": 32, "column": 1 } }, "body": [ { "type": "ClassMethod", "start": 359, "end": 589, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 20, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 359, "end": 370, "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": 373, "end": 589, "loc": { "start": { "line": 14, "column": 18 }, "end": { "line": 20, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 383, "end": 391, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 16 } }, "expression": { "type": "CallExpression", "start": 383, "end": 390, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 15 } }, "callee": { "type": "Super", "start": 383, "end": 388, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 13 } } }, "arguments": [] } }, { "type": "ExpressionStatement", "start": 400, "end": 460, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 68 } }, "expression": { "type": "AssignmentExpression", "start": 400, "end": 459, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 67 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 400, "end": 414, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 22 } }, "object": { "type": "ThisExpression", "start": 400, "end": 404, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 12 } } }, "property": { "type": "Identifier", "start": 405, "end": 414, "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 22 }, "identifierName": "localMesh" }, "name": "localMesh" }, "computed": false }, "right": { "type": "NewExpression", "start": 417, "end": 459, "loc": { "start": { "line": 16, "column": 25 }, "end": { "line": 16, "column": 67 } }, "callee": { "type": "MemberExpression", "start": 421, "end": 431, "loc": { "start": { "line": 16, "column": 29 }, "end": { "line": 16, "column": 39 } }, "object": { "type": "Identifier", "start": 421, "end": 426, "loc": { "start": { "line": 16, "column": 29 }, "end": { "line": 16, "column": 34 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 427, "end": 431, "loc": { "start": { "line": 16, "column": 35 }, "end": { "line": 16, "column": 39 }, "identifierName": "Mesh" }, "name": "Mesh" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 432, "end": 440, "loc": { "start": { "line": 16, "column": 40 }, "end": { "line": 16, "column": 48 }, "identifierName": "geometry" }, "name": "geometry" }, { "type": "CallExpression", "start": 442, "end": 458, "loc": { "start": { "line": 16, "column": 50 }, "end": { "line": 16, "column": 66 } }, "callee": { "type": "MemberExpression", "start": 442, "end": 456, "loc": { "start": { "line": 16, "column": 50 }, "end": { "line": 16, "column": 64 } }, "object": { "type": "Identifier", "start": 442, "end": 450, "loc": { "start": { "line": 16, "column": 50 }, "end": { "line": 16, "column": 58 }, "identifierName": "material" }, "name": "material" }, "property": { "type": "Identifier", "start": 451, "end": 456, "loc": { "start": { "line": 16, "column": 59 }, "end": { "line": 16, "column": 64 }, "identifierName": "clone" }, "name": "clone" }, "computed": false }, "arguments": [] } ] } } }, { "type": "ExpressionStatement", "start": 469, "end": 506, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 45 } }, "expression": { "type": "AssignmentExpression", "start": 469, "end": 505, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 44 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 469, "end": 488, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 27 } }, "object": { "type": "MemberExpression", "start": 469, "end": 483, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 22 } }, "object": { "type": "ThisExpression", "start": 469, "end": 473, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 12 } } }, "property": { "type": "Identifier", "start": 474, "end": 483, "loc": { "start": { "line": 17, "column": 13 }, "end": { "line": 17, "column": 22 }, "identifierName": "localMesh" }, "name": "localMesh" }, "computed": false }, "property": { "type": "Identifier", "start": 484, "end": 488, "loc": { "start": { "line": 17, "column": 23 }, "end": { "line": 17, "column": 27 }, "identifierName": "type" }, "name": "type" }, "computed": false }, "right": { "type": "StringLiteral", "start": 491, "end": 505, "loc": { "start": { "line": 17, "column": 30 }, "end": { "line": 17, "column": 44 } }, "extra": { "rawValue": "SketcherMesh", "raw": "'SketcherMesh'" }, "value": "SketcherMesh" } } }, { "type": "ExpressionStatement", "start": 515, "end": 549, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 42 } }, "expression": { "type": "AssignmentExpression", "start": 515, "end": 548, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 41 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 515, "end": 543, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 36 } }, "object": { "type": "MemberExpression", "start": 515, "end": 538, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 31 } }, "object": { "type": "MemberExpression", "start": 515, "end": 529, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 22 } }, "object": { "type": "ThisExpression", "start": 515, "end": 519, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 12 } } }, "property": { "type": "Identifier", "start": 520, "end": 529, "loc": { "start": { "line": 18, "column": 13 }, "end": { "line": 18, "column": 22 }, "identifierName": "localMesh" }, "name": "localMesh" }, "computed": false }, "property": { "type": "Identifier", "start": 530, "end": 538, "loc": { "start": { "line": 18, "column": 23 }, "end": { "line": 18, "column": 31 }, "identifierName": "material" }, "name": "material" }, "computed": false }, "property": { "type": "Identifier", "start": 539, "end": 543, "loc": { "start": { "line": 18, "column": 32 }, "end": { "line": 18, "column": 36 }, "identifierName": "meta" }, "name": "meta" }, "computed": false }, "right": { "type": "ObjectExpression", "start": 546, "end": 548, "loc": { "start": { "line": 18,