UNPKG

awv3

Version:
1,659 lines (1,658 loc) 648 kB
{ "type": "Program", "start": 0, "end": 5807, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 169, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 26, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 26 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 7, "end": 12, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 12 } }, "local": { "type": "Identifier", "start": 7, "end": 12, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 12 } }, "name": "THREE" } } ], "importKind": "value", "source": { "type": "Literal", "start": 18, "end": 25, "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 25 } }, "value": "three", "rawValue": "three", "raw": "'three'" } }, { "type": "ImportDeclaration", "start": 28, "end": 79, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 51 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 35, "end": 52, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 24 } }, "local": { "type": "Identifier", "start": 35, "end": 52, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 24 } }, "name": "MeshPhongMaterial" } } ], "importKind": "value", "source": { "type": "Literal", "start": 58, "end": 78, "loc": { "start": { "line": 2, "column": 30 }, "end": { "line": 2, "column": 50 } }, "value": "../materials/phong", "rawValue": "../materials/phong", "raw": "'../materials/phong'" } }, { "type": "ImportDeclaration", "start": 81, "end": 121, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 40 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 88, "end": 96, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 15 } }, "local": { "type": "Identifier", "start": 88, "end": 96, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 15 } }, "name": "Defaults" } } ], "importKind": "value", "source": { "type": "Literal", "start": 102, "end": 120, "loc": { "start": { "line": 3, "column": 21 }, "end": { "line": 3, "column": 39 } }, "value": "../core/defaults", "rawValue": "../core/defaults", "raw": "'../core/defaults'" } }, { "type": "ExportNamedDeclaration", "start": 125, "end": 1779, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 51, "column": 1 } }, "declaration": { "type": "FunctionDeclaration", "start": 132, "end": 1779, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 51, "column": 1 } }, "id": { "type": "Identifier", "start": 141, "end": 150, "loc": { "start": { "line": 5, "column": 16 }, "end": { "line": 5, "column": 25 } }, "name": "parseLine" }, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 151, "end": 161, "loc": { "start": { "line": 5, "column": 26 }, "end": { "line": 5, "column": 36 } }, "name": "attributes" }, { "type": "Identifier", "start": 163, "end": 170, "loc": { "start": { "line": 5, "column": 38 }, "end": { "line": 5, "column": 45 } }, "name": "context" } ], "body": { "type": "BlockStatement", "start": 172, "end": 1779, "loc": { "start": { "line": 5, "column": 47 }, "end": { "line": 51, "column": 1 } }, "body": [ { "type": "VariableDeclaration", "start": 179, "end": 207, "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 32 } }, "declarations": [ { "type": "VariableDeclarator", "start": 183, "end": 206, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 31 } }, "id": { "type": "Identifier", "start": 183, "end": 189, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 14 } }, "name": "result" }, "init": { "type": "MemberExpression", "start": 192, "end": 206, "loc": { "start": { "line": 6, "column": 17 }, "end": { "line": 6, "column": 31 } }, "object": { "type": "Identifier", "start": 192, "end": 199, "loc": { "start": { "line": 6, "column": 17 }, "end": { "line": 6, "column": 24 } }, "name": "context" }, "property": { "type": "Identifier", "start": 200, "end": 206, "loc": { "start": { "line": 6, "column": 25 }, "end": { "line": 6, "column": 31 } }, "name": "models" }, "computed": false } } ], "kind": "let" }, { "type": "VariableDeclaration", "start": 213, "end": 243, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 34 } }, "declarations": [ { "type": "VariableDeclarator", "start": 217, "end": 242, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 33 } }, "id": { "type": "Identifier", "start": 217, "end": 224, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 15 } }, "name": "options" }, "init": { "type": "MemberExpression", "start": 227, "end": 242, "loc": { "start": { "line": 7, "column": 18 }, "end": { "line": 7, "column": 33 } }, "object": { "type": "Identifier", "start": 227, "end": 234, "loc": { "start": { "line": 7, "column": 18 }, "end": { "line": 7, "column": 25 } }, "name": "context" }, "property": { "type": "Identifier", "start": 235, "end": 242, "loc": { "start": { "line": 7, "column": 26 }, "end": { "line": 7, "column": 33 } }, "name": "options" }, "computed": false } } ], "kind": "let" }, { "type": "VariableDeclaration", "start": 249, "end": 276, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 31 } }, "declarations": [ { "type": "VariableDeclarator", "start": 253, "end": 275, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 30 } }, "id": { "type": "Identifier", "start": 253, "end": 257, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 12 } }, "name": "item" }, "init": { "type": "MemberExpression", "start": 260, "end": 275, "loc": { "start": { "line": 8, "column": 15 }, "end": { "line": 8, "column": 30 } }, "object": { "type": "Identifier", "start": 260, "end": 270, "loc": { "start": { "line": 8, "column": 15 }, "end": { "line": 8, "column": 25 } }, "name": "attributes" }, "property": { "type": "Identifier", "start": 271, "end": 275, "loc": { "start": { "line": 8, "column": 26 }, "end": { "line": 8, "column": 30 } }, "name": "line" }, "computed": false } } ], "kind": "let" }, { "type": "VariableDeclaration", "start": 282, "end": 307, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 29 } }, "declarations": [ { "type": "VariableDeclarator", "start": 286, "end": 306, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 28 } }, "id": { "type": "Identifier", "start": 286, "end": 292, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 14 } }, "name": "groups" }, "init": { "type": "MemberExpression", "start": 295, "end": 306, "loc": { "start": { "line": 9, "column": 17 }, "end": { "line": 9, "column": 28 } }, "object": { "type": "Identifier", "start": 295, "end": 299, "loc": { "start": { "line": 9, "column": 17 }, "end": { "line": 9, "column": 21 } }, "name": "item" }, "property": { "type": "Identifier", "start": 300, "end": 306, "loc": { "start": { "line": 9, "column": 22 }, "end": { "line": 9, "column": 28 } }, "name": "groups" }, "computed": false } } ], "kind": "let", "trailingComments": [ { "type": "CommentLine", "value": " Create mesh", "start": 315, "end": 329, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 18 } }, "range": [ 315, 329 ] } ] }, { "type": "VariableDeclaration", "start": 335, "end": 371, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 40 } }, "declarations": [ { "type": "VariableDeclarator", "start": 339, "end": 370, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 39 } }, "id": { "type": "Identifier", "start": 339, "end": 343, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 12 } }, "name": "mesh", "leadingComments": null }, "init": { "type": "NewExpression", "start": 346, "end": 370, "loc": { "start": { "line": 12, "column": 15 }, "end": { "line": 12, "column": 39 } }, "callee": { "type": "MemberExpression", "start": 350, "end": 368, "loc": { "start": { "line": 12, "column": 19 }, "end": { "line": 12, "column": 37 } }, "object": { "type": "Identifier", "start": 350, "end": 355, "loc": { "start": { "line": 12, "column": 19 }, "end": { "line": 12, "column": 24 } }, "name": "THREE" }, "property": { "type": "Identifier", "start": 356, "end": 368, "loc": { "start": { "line": 12, "column": 25 }, "end": { "line": 12, "column": 37 } }, "name": "LineSegments" }, "computed": false }, "arguments": [] }, "leadingComments": null } ], "kind": "let", "leadingComments": [ { "type": "CommentLine", "value": " Create mesh", "start": 315, "end": 329, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 18 } }, "range": [ 315, 329 ] } ] }, { "type": "ExpressionStatement", "start": 377, "end": 417, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 44 } }, "expression": { "type": "AssignmentExpression", "start": 377, "end": 416, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 43 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 377, "end": 389, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 16 } }, "object": { "type": "Identifier", "start": 377, "end": 381, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 8 } }, "name": "mesh" }, "property": { "type": "Identifier", "start": 382, "end": 389, "loc": { "start": { "line": 13, "column": 9 }, "end": { "line": 13, "column": 16 } }, "name": "visible" }, "computed": false }, "right": { "type": "BinaryExpression", "start": 392, "end": 416, "loc": { "start": { "line": 13, "column": 19 }, "end": { "line": 13, "column": 43 } }, "left": { "type": "MemberExpression", "start": 392, "end": 410, "loc": { "start": { "line": 13, "column": 19 }, "end": { "line": 13, "column": 37 } }, "object": { "type": "Identifier", "start": 392, "end": 402, "loc": { "start": { "line": 13, "column": 19 }, "end": { "line": 13, "column": 29 } }, "name": "attributes" }, "property": { "type": "Identifier", "start": 403, "end": 410, "loc": { "start": { "line": 13, "column": 30 }, "end": { "line": 13, "column": 37 } }, "name": "visible" }, "computed": false }, "operator": "===", "right": { "type": "Literal", "start": 415, "end": 416, "loc": { "start": { "line": 13, "column": 42 }, "end": { "line": 13, "column": 43 } }, "value": 1, "rawValue": 1, "raw": "1" } } } }, { "type": "ExpressionStatement", "start": 423, "end": 542, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 123 } }, "expression": { "type": "AssignmentExpression", "start": 423, "end": 541, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 122 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 423, "end": 439, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 20 } }, "object": { "type": "Identifier", "start": 423, "end": 427, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 8 } }, "name": "mesh" }, "property": { "type": "Identifier", "start": 428, "end": 439, "loc": { "start": { "line": 14, "column": 9 }, "end": { "line": 14, "column": 20 } }, "name": "renderOrder" }, "computed": false }, "right": { "type": "ConditionalExpression", "start": 442, "end": 541, "loc": { "start": { "line": 14, "column": 23 }, "end": { "line": 14, "column": 122 } }, "test": { "type": "BinaryExpression", "start": 442, "end": 498, "loc": { "start": { "line": 14, "column": 23 }, "end": { "line": 14, "column": 79 } }, "left": { "type": "UnaryExpression", "start": 442, "end": 482, "loc": { "start": { "line": 14, "column": 23 }, "end": { "line": 14, "column": 63 } }, "operator": "typeof", "prefix": true, "argument": { "type": "MemberExpression", "start": 449, "end": 482, "loc": { "start": { "line": 14, "column": 30 }, "end": { "line": 14, "column": 63 } }, "object": { "type": "MemberExpression", "start": 449, "end": 469, "loc": { "start": { "line": 14, "column": 30 }, "end": { "line": 14, "column": 50 } }, "object": { "type": "Identifier", "start": 449, "end": 457, "loc": { "start": { "line": 14, "column": 30 }, "end": { "line": 14, "column": 38 } }, "name": "Defaults" }, "property": { "type": "Identifier", "start": 458, "end": 469, "loc": { "start": { "line": 14, "column": 39 }, "end": { "line": 14, "column": 50 } }, "name": "renderOrder" }, "computed": false }, "property": { "type": "Identifier", "start": 470, "end": 482, "loc": { "start": { "line": 14, "column": 51 }, "end": { "line": 14, "column": 63 } }, "name": "LineSegments" }, "computed": false } }, "operator": "!==", "right": { "type": "Literal", "start": 487, "end": 498, "loc": { "start": { "line": 14, "column": 68 }, "end": { "line": 14, "column": 79 } }, "value": "undefined", "rawValue": "undefined", "raw": "\"undefined\"" } }, "consequent": { "type": "MemberExpression", "start": 502, "end": 535, "loc": { "start": { "line": 14, "column": 83 }, "end": { "line": 14, "column": 116 } }, "object": { "type": "MemberExpression", "start": 502, "end": 522, "loc": { "start": { "line": 14, "column": 83 }, "end": { "line": 14, "column": 103 } }, "object": { "type": "Identifier", "start": 502, "end": 510, "loc": { "start": { "line": 14, "column": 83 }, "end": { "line": 14, "column": 91 } }, "name": "Defaults" }, "property": { "type": "Identifier", "start": 511, "end": 522, "loc": { "start": { "line": 14, "column": 92 }, "end": { "line": 14, "column": 103 } }, "name": "renderOrder" }, "computed": false }, "property": { "type": "Identifier", "start": 523, "end": 535, "loc": { "start": { "line": 14, "column": 104 }, "end": { "line": 14, "column": 116 } }, "name": "LineSegments" }, "computed": false }, "alternate": { "type": "Literal", "start": 538, "end": 541, "loc": { "start": { "line": 14, "column": 119 }, "end": { "line": 14, "column": 122 } }, "value": 100, "rawValue": 100, "raw": "100" } } } }, { "type": "ExpressionStatement", "start": 548, "end": 638, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 94 } }, "expression": { "type": "AssignmentExpression", "start": 548, "end": 637, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 93 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 548, "end": 561, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 17 } }, "object": { "type": "Identifier", "start": 548, "end": 552, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 8 } }, "name": "mesh" }, "property": { "type": "Identifier", "start": 553, "end": 561, "loc": { "start": { "line": 15, "column": 9 }, "end": { "line": 15, "column": 17 } }, "name": "userData" }, "computed": false }, "right": { "type": "ObjectExpression", "start": 564, "end": 637, "loc": { "start": { "line": 15, "column": 20 }, "end": { "line": 15, "column": 93 } }, "properties": [ { "type": "Property", "start": 566, "end": 571, "loc": { "start": { "line": 15, "column": 22 }, "end": { "line": 15, "column": 27 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 566, "end": 568, "loc": { "start": { "line": 15, "column": 22 }, "end": { "line": 15, "column": 24 } }, "name": "id" }, "value": { "type": "Literal", "start": 570, "end": 571, "loc": { "start": { "line": 15, "column": 26 }, "end": { "line": 15, "column": 27 } }, "value": 0, "rawValue": 0, "raw": "0" }, "kind": "init" }, { "type": "Property", "start": 573, "end": 596, "loc": { "start": { "line": 15, "column": 29 }, "end": { "line": 15, "column": 52 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 573, "end": 581, "loc": { "start": { "line": 15, "column": 29 }, "end": { "line": 15, "column": 37 } }, "name": "parentId" }, "value": { "type": "MemberExpression", "start": 583, "end": 596, "loc": { "start": { "line": 15, "column": 39 }, "end": { "line": 15, "column": 52 } }, "object": { "type": "Identifier", "start": 583, "end": 593, "loc": { "start": { "line": 15, "column": 39 }, "end": { "line": 15, "column": 49 } }, "name": "attributes" }, "property": { "type": "Identifier", "start": 594, "end": 596, "loc": { "start": { "line": 15, "column": 50 }, "end": { "line": 15, "column": 52 } }, "name": "id" }, "computed": false }, "kind": "init" }, { "type": "Property", "start": 598, "end": 635, "loc": { "start": { "line": 15, "column": 54 }, "end": { "line": 15, "column": 91 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 598, "end": 602, "loc": { "start": { "line": 15, "column": 54 }, "end": { "line": 15, "column": 58 } }, "name": "refs" }, "value": { "type": "CallExpression", "start": 604, "end": 635, "loc": { "start": { "line": 15, "column": 60 }, "end": { "line": 15, "column": 91 } }, "callee": { "type": "MemberExpression", "start": 604, "end": 614, "loc": { "start": { "line": 15, "column": 60 }, "end": { "line": 15, "column": 70 } }, "object": { "type": "Identifier", "start": 604, "end": 610, "loc": { "start": { "line": 15, "column": 60 }, "end": { "line": 15, "column": 66 } }, "name": "groups" }, "property": { "type": "Identifier", "start": 611, "end": 614, "loc": { "start": { "line": 15, "column": 67 },