UNPKG

awv3

Version:
1,500 lines 1.68 MB
{ "type": "File", "start": 0, "end": 6280, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 170, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 6280, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 170, "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": 83, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 51 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 39, "end": 56, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 24 } }, "local": { "type": "Identifier", "start": 39, "end": 56, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 24 }, "identifierName": "MeshPhongMaterial" }, "name": "MeshPhongMaterial" } } ], "source": { "type": "StringLiteral", "start": 62, "end": 82, "loc": { "start": { "line": 2, "column": 30 }, "end": { "line": 2, "column": 50 } }, "extra": { "rawValue": "../materials/phong", "raw": "'../materials/phong'" }, "value": "../materials/phong" } }, { "type": "ImportDeclaration", "start": 84, "end": 118, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 34 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 91, "end": 99, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 15 } }, "local": { "type": "Identifier", "start": 91, "end": 99, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 15 }, "identifierName": "Defaults" }, "name": "Defaults" } } ], "source": { "type": "StringLiteral", "start": 105, "end": 117, "loc": { "start": { "line": 3, "column": 21 }, "end": { "line": 3, "column": 33 } }, "extra": { "rawValue": "./defaults", "raw": "'./defaults'" }, "value": "./defaults" } }, { "type": "ExportNamedDeclaration", "start": 120, "end": 1798, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 47, "column": 1 } }, "specifiers": [], "source": null, "declaration": { "type": "FunctionDeclaration", "start": 127, "end": 1798, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 47, "column": 1 } }, "id": { "type": "Identifier", "start": 136, "end": 145, "loc": { "start": { "line": 5, "column": 16 }, "end": { "line": 5, "column": 25 }, "identifierName": "parseLine" }, "name": "parseLine" }, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 146, "end": 150, "loc": { "start": { "line": 5, "column": 26 }, "end": { "line": 5, "column": 30 }, "identifierName": "data" }, "name": "data" }, { "type": "Identifier", "start": 152, "end": 159, "loc": { "start": { "line": 5, "column": 32 }, "end": { "line": 5, "column": 39 }, "identifierName": "context" }, "name": "context" } ], "body": { "type": "BlockStatement", "start": 161, "end": 1798, "loc": { "start": { "line": 5, "column": 41 }, "end": { "line": 47, "column": 1 } }, "body": [ { "type": "VariableDeclaration", "start": 168, "end": 194, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 30 } }, "declarations": [ { "type": "VariableDeclarator", "start": 172, "end": 193, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 29 } }, "id": { "type": "ObjectPattern", "start": 172, "end": 183, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 19 } }, "properties": [ { "type": "ObjectProperty", "start": 174, "end": 181, "loc": { "start": { "line": 7, "column": 10 }, "end": { "line": 7, "column": 17 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 174, "end": 181, "loc": { "start": { "line": 7, "column": 10 }, "end": { "line": 7, "column": 17 }, "identifierName": "options" }, "name": "options" }, "value": { "type": "Identifier", "start": 174, "end": 181, "loc": { "start": { "line": 7, "column": 10 }, "end": { "line": 7, "column": 17 }, "identifierName": "options" }, "name": "options" }, "extra": { "shorthand": true } } ] }, "init": { "type": "Identifier", "start": 186, "end": 193, "loc": { "start": { "line": 7, "column": 22 }, "end": { "line": 7, "column": 29 }, "identifierName": "context" }, "name": "context" } } ], "kind": "let" }, { "type": "VariableDeclaration", "start": 199, "end": 235, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 40 } }, "declarations": [ { "type": "VariableDeclarator", "start": 203, "end": 234, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 39 } }, "id": { "type": "ObjectPattern", "start": 203, "end": 227, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 32 } }, "properties": [ { "type": "ObjectProperty", "start": 205, "end": 207, "loc": { "start": { "line": 8, "column": 10 }, "end": { "line": 8, "column": 12 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 205, "end": 207, "loc": { "start": { "line": 8, "column": 10 }, "end": { "line": 8, "column": 12 }, "identifierName": "id" }, "name": "id" }, "value": { "type": "Identifier", "start": 205, "end": 207, "loc": { "start": { "line": 8, "column": 10 }, "end": { "line": 8, "column": 12 }, "identifierName": "id" }, "name": "id" }, "extra": { "shorthand": true } }, { "type": "ObjectProperty", "start": 209, "end": 225, "loc": { "start": { "line": 8, "column": 14 }, "end": { "line": 8, "column": 30 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 209, "end": 213, "loc": { "start": { "line": 8, "column": 14 }, "end": { "line": 8, "column": 18 }, "identifierName": "line" }, "name": "line" }, "value": { "type": "ObjectPattern", "start": 215, "end": 225, "loc": { "start": { "line": 8, "column": 20 }, "end": { "line": 8, "column": 30 } }, "properties": [ { "type": "ObjectProperty", "start": 217, "end": 223, "loc": { "start": { "line": 8, "column": 22 }, "end": { "line": 8, "column": 28 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 217, "end": 223, "loc": { "start": { "line": 8, "column": 22 }, "end": { "line": 8, "column": 28 }, "identifierName": "groups" }, "name": "groups" }, "value": { "type": "Identifier", "start": 217, "end": 223, "loc": { "start": { "line": 8, "column": 22 }, "end": { "line": 8, "column": 28 }, "identifierName": "groups" }, "name": "groups" }, "extra": { "shorthand": true } } ] } } ] }, "init": { "type": "Identifier", "start": 230, "end": 234, "loc": { "start": { "line": 8, "column": 35 }, "end": { "line": 8, "column": 39 }, "identifierName": "data" }, "name": "data" } } ], "kind": "let", "trailingComments": [ { "type": "CommentLine", "value": " Create mesh", "start": 241, "end": 255, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 18 } } } ] }, { "type": "VariableDeclaration", "start": 260, "end": 296, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 40 } }, "declarations": [ { "type": "VariableDeclarator", "start": 264, "end": 295, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 39 } }, "id": { "type": "Identifier", "start": 264, "end": 268, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 12 }, "identifierName": "geom" }, "name": "geom", "leadingComments": null }, "init": { "type": "NewExpression", "start": 271, "end": 295, "loc": { "start": { "line": 11, "column": 15 }, "end": { "line": 11, "column": 39 } }, "callee": { "type": "MemberExpression", "start": 275, "end": 293, "loc": { "start": { "line": 11, "column": 19 }, "end": { "line": 11, "column": 37 } }, "object": { "type": "Identifier", "start": 275, "end": 280, "loc": { "start": { "line": 11, "column": 19 }, "end": { "line": 11, "column": 24 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 281, "end": 293, "loc": { "start": { "line": 11, "column": 25 }, "end": { "line": 11, "column": 37 }, "identifierName": "LineSegments" }, "name": "LineSegments" }, "computed": false }, "arguments": [] }, "leadingComments": null } ], "kind": "let", "leadingComments": [ { "type": "CommentLine", "value": " Create mesh", "start": 241, "end": 255, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 18 } } } ] }, { "type": "ExpressionStatement", "start": 301, "end": 420, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 123 } }, "expression": { "type": "AssignmentExpression", "start": 301, "end": 419, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 122 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 301, "end": 317, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 20 } }, "object": { "type": "Identifier", "start": 301, "end": 305, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 8 }, "identifierName": "geom" }, "name": "geom" }, "property": { "type": "Identifier", "start": 306, "end": 317, "loc": { "start": { "line": 12, "column": 9 }, "end": { "line": 12, "column": 20 }, "identifierName": "renderOrder" }, "name": "renderOrder" }, "computed": false }, "right": { "type": "ConditionalExpression", "start": 320, "end": 419, "loc": { "start": { "line": 12, "column": 23 }, "end": { "line": 12, "column": 122 } }, "test": { "type": "BinaryExpression", "start": 320, "end": 376, "loc": { "start": { "line": 12, "column": 23 }, "end": { "line": 12, "column": 79 } }, "left": { "type": "UnaryExpression", "start": 320, "end": 360, "loc": { "start": { "line": 12, "column": 23 }, "end": { "line": 12, "column": 63 } }, "operator": "typeof", "prefix": true, "argument": { "type": "MemberExpression", "start": 327, "end": 360, "loc": { "start": { "line": 12, "column": 30 }, "end": { "line": 12, "column": 63 } }, "object": { "type": "MemberExpression", "start": 327, "end": 347, "loc": { "start": { "line": 12, "column": 30 }, "end": { "line": 12, "column": 50 } }, "object": { "type": "Identifier", "start": 327, "end": 335, "loc": { "start": { "line": 12, "column": 30 }, "end": { "line": 12, "column": 38 }, "identifierName": "Defaults" }, "name": "Defaults" }, "property": { "type": "Identifier", "start": 336, "end": 347, "loc": { "start": { "line": 12, "column": 39 }, "end": { "line": 12, "column": 50 }, "identifierName": "renderOrder" }, "name": "renderOrder" }, "computed": false }, "property": { "type": "Identifier", "start": 348, "end": 360, "loc": { "start": { "line": 12, "column": 51 }, "end": { "line": 12, "column": 63 }, "identifierName": "LineSegments" }, "name": "LineSegments" }, "computed": false }, "extra": { "parenthesizedArgument": false } }, "operator": "!==", "right": { "type": "StringLiteral", "start": 365, "end": 376, "loc": { "start": { "line": 12, "column": 68 }, "end": { "line": 12, "column": 79 } }, "extra": { "rawValue": "undefined", "raw": "\"undefined\"" }, "value": "undefined" } }, "consequent": { "type": "MemberExpression", "start": 380, "end": 413, "loc": { "start": { "line": 12, "column": 83 }, "end": { "line": 12, "column": 116 } }, "object": { "type": "MemberExpression", "start": 380, "end": 400, "loc": { "start": { "line": 12, "column": 83 }, "end": { "line": 12, "column": 103 } }, "object": { "type": "Identifier", "start": 380, "end": 388, "loc": { "start": { "line": 12, "column": 83 }, "end": { "line": 12, "column": 91 }, "identifierName": "Defaults" }, "name": "Defaults" }, "property": { "type": "Identifier", "start": 389, "end": 400, "loc": { "start": { "line": 12, "column": 92 }, "end": { "line": 12, "column": 103 }, "identifierName": "renderOrder" }, "name": "renderOrder" }, "computed": false }, "property": { "type": "Identifier", "start": 401, "end": 413, "loc": { "start": { "line": 12, "column": 104 }, "end": { "line": 12, "column": 116 }, "identifierName": "LineSegments" }, "name": "LineSegments" }, "computed": false }, "alternate": { "type": "NumericLiteral", "start": 416, "end": 419, "loc": { "start": { "line": 12, "column": 119 }, "end": { "line": 12, "column": 122 } }, "extra": { "rawValue": 100, "raw": "100" }, "value": 100 } } } }, { "type": "ExpressionStatement", "start": 425, "end": 504, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 83 } }, "expression": { "type": "AssignmentExpression", "start": 425, "end": 503, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 82 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 425, "end": 438, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 17 } }, "object": { "type": "Identifier", "start": 425, "end": 429, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 8 }, "identifierName": "geom" }, "name": "geom" }, "property": { "type": "Identifier", "start": 430, "end": 438, "loc": { "start": { "line": 13, "column": 9 }, "end": { "line": 13, "column": 17 }, "identifierName": "userData" }, "name": "userData" }, "computed": false }, "right": { "type": "ObjectExpression", "start": 441, "end": 503, "loc": { "start": { "line": 13, "column": 20 }, "end": { "line": 13, "column": 82 } }, "properties": [ { "type": "ObjectProperty", "start": 443, "end": 448, "loc": { "start": { "line": 13, "column": 22 }, "end": { "line": 13, "column": 27 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 443, "end": 445, "loc": { "start": { "line": 13, "column": 22 }, "end": { "line": 13, "column": 24 }, "identifierName": "id" }, "name": "id" }, "value": { "type": "NumericLiteral", "start": 447, "end": 448, "loc": { "start": { "line": 13, "column": 26 }, "end": { "line": 13, "column": 27 } }, "extra": { "rawValue": 0, "raw": "0" }, "value": 0 } }, { "type": "ObjectProperty", "start": 450, "end": 462, "loc": { "start": { "line": 13, "column": 29 }, "end": { "line": 13, "column": 41 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 450, "end": 458, "loc": { "start": { "line": 13, "column": 29 }, "end": { "line": 13, "column": 37 }, "identifierName": "parentId" }, "name": "parentId" }, "value": { "type": "Identifier", "start": 460, "end": 462, "loc": { "start": { "line": 13, "column": 39 }, "end": { "line": 13, "column": 41 }, "identifierName": "id" }, "name": "id" } }, { "type": "ObjectProperty", "start": 464, "end": 501, "loc": { "start": { "line": 13, "column": 43 }, "end": { "line": 13, "column": 80 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 464, "end": 468, "loc": { "start": { "line": 13, "column": 43 }, "end": { "line": 13, "column": 47 }, "identifierName": "refs" }, "name": "refs" }, "value": { "type": "CallExpression", "start": 470, "end": 501, "loc": { "start": { "line": 13, "column": 49 }, "end": { "line": 13, "column": 80 } }, "callee": { "type": "MemberExpression", "start": 470, "end": 480, "loc": { "start": { "line": 13, "column": 49 }, "end": { "line": 13, "column": 59 } }, "object": { "type": "Identifier", "start": 470, "end": 476, "loc": { "start": { "line": 13, "column": 49 }, "end": { "line": 13, "column": 55 }, "identifierName": "groups" }, "name": "groups" }, "property": { "type": "Identifier", "start": 477, "end": 480, "loc": { "start": { "line": 13, "column": 56 }, "end": { "line": 13, "column": 59 }, "identifierName": "map" }, "name": "map" }, "computed": false }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 481, "end": 500, "loc": { "start": { "line": 13, "column": 60 }, "end": { "line": 13, "column": 79 } }, "id": null, "generator": false, "expression": true, "async": false, "params