UNPKG

awv3

Version:
1,816 lines (1,815 loc) 1.91 MB
{ "type": "File", "start": 0, "end": 7771, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 166, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 7771, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 166, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 41, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 41 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 7, "end": 16, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 16 } }, "local": { "type": "Identifier", "start": 7, "end": 16, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 16 }, "identifierName": "cloneDeep" }, "name": "cloneDeep" } } ], "source": { "type": "StringLiteral", "start": 22, "end": 40, "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 40 } }, "extra": { "rawValue": "lodash/cloneDeep", "raw": "'lodash/cloneDeep'" }, "value": "lodash/cloneDeep" } }, { "type": "ImportDeclaration", "start": 42, "end": 73, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 31 } }, "specifiers": [ { "type": "ImportNamespaceSpecifier", "start": 49, "end": 59, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 17 } }, "local": { "type": "Identifier", "start": 54, "end": 59, "loc": { "start": { "line": 2, "column": 12 }, "end": { "line": 2, "column": 17 }, "identifierName": "THREE" }, "name": "THREE" } } ], "source": { "type": "StringLiteral", "start": 65, "end": 72, "loc": { "start": { "line": 2, "column": 23 }, "end": { "line": 2, "column": 30 } }, "extra": { "rawValue": "three", "raw": "'three'" }, "value": "three" } }, { "type": "ImportDeclaration", "start": 74, "end": 119, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 45 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 81, "end": 88, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 14 } }, "local": { "type": "Identifier", "start": 81, "end": 88, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 14 }, "identifierName": "Object3" }, "name": "Object3" } } ], "source": { "type": "StringLiteral", "start": 94, "end": 118, "loc": { "start": { "line": 3, "column": 20 }, "end": { "line": 3, "column": 44 } }, "extra": { "rawValue": "../../../three/object3", "raw": "'../../../three/object3'" }, "value": "../../../three/object3" }, "trailingComments": [ { "type": "CommentLine", "value": "note: all these geometries must have unit size here", "start": 121, "end": 174, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 53 } } }, { "type": "CommentLine", "value": "the real sizes of objects are set in onRender method", "start": 175, "end": 229, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 54 } } } ] }, { "type": "VariableDeclaration", "start": 230, "end": 294, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 64 } }, "declarations": [ { "type": "VariableDeclarator", "start": 236, "end": 293, "loc": { "start": { "line": 7, "column": 6 }, "end": { "line": 7, "column": 63 } }, "id": { "type": "Identifier", "start": 236, "end": 249, "loc": { "start": { "line": 7, "column": 6 }, "end": { "line": 7, "column": 19 }, "identifierName": "pointGeometry" }, "name": "pointGeometry", "leadingComments": null }, "init": { "type": "NewExpression", "start": 252, "end": 293, "loc": { "start": { "line": 7, "column": 22 }, "end": { "line": 7, "column": 63 } }, "callee": { "type": "MemberExpression", "start": 256, "end": 282, "loc": { "start": { "line": 7, "column": 26 }, "end": { "line": 7, "column": 52 } }, "object": { "type": "Identifier", "start": 256, "end": 261, "loc": { "start": { "line": 7, "column": 26 }, "end": { "line": 7, "column": 31 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 262, "end": 282, "loc": { "start": { "line": 7, "column": 32 }, "end": { "line": 7, "column": 52 }, "identifierName": "SphereBufferGeometry" }, "name": "SphereBufferGeometry" }, "computed": false }, "arguments": [ { "type": "NumericLiteral", "start": 283, "end": 284, "loc": { "start": { "line": 7, "column": 53 }, "end": { "line": 7, "column": 54 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 }, { "type": "NumericLiteral", "start": 286, "end": 288, "loc": { "start": { "line": 7, "column": 56 }, "end": { "line": 7, "column": 58 } }, "extra": { "rawValue": 16, "raw": "16" }, "value": 16 }, { "type": "NumericLiteral", "start": 290, "end": 292, "loc": { "start": { "line": 7, "column": 60 }, "end": { "line": 7, "column": 62 } }, "extra": { "rawValue": 16, "raw": "16" }, "value": 16 } ] }, "leadingComments": null } ], "kind": "const", "leadingComments": [ { "type": "CommentLine", "value": "note: all these geometries must have unit size here", "start": 121, "end": 174, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 53 } } }, { "type": "CommentLine", "value": "the real sizes of objects are set in onRender method", "start": 175, "end": 229, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 54 } } } ] }, { "type": "VariableDeclaration", "start": 295, "end": 397, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 8, "column": 102 } }, "declarations": [ { "type": "VariableDeclarator", "start": 301, "end": 396, "loc": { "start": { "line": 8, "column": 6 }, "end": { "line": 8, "column": 101 } }, "id": { "type": "Identifier", "start": 301, "end": 314, "loc": { "start": { "line": 8, "column": 6 }, "end": { "line": 8, "column": 19 }, "identifierName": "pointMaterial" }, "name": "pointMaterial" }, "init": { "type": "NewExpression", "start": 317, "end": 396, "loc": { "start": { "line": 8, "column": 22 }, "end": { "line": 8, "column": 101 } }, "callee": { "type": "MemberExpression", "start": 321, "end": 344, "loc": { "start": { "line": 8, "column": 26 }, "end": { "line": 8, "column": 49 } }, "object": { "type": "Identifier", "start": 321, "end": 326, "loc": { "start": { "line": 8, "column": 26 }, "end": { "line": 8, "column": 31 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 327, "end": 344, "loc": { "start": { "line": 8, "column": 32 }, "end": { "line": 8, "column": 49 }, "identifierName": "MeshBasicMaterial" }, "name": "MeshBasicMaterial" }, "computed": false }, "arguments": [ { "type": "ObjectExpression", "start": 345, "end": 395, "loc": { "start": { "line": 8, "column": 50 }, "end": { "line": 8, "column": 100 } }, "properties": [ { "type": "ObjectProperty", "start": 346, "end": 361, "loc": { "start": { "line": 8, "column": 51 }, "end": { "line": 8, "column": 66 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 346, "end": 351, "loc": { "start": { "line": 8, "column": 51 }, "end": { "line": 8, "column": 56 }, "identifierName": "color" }, "name": "color" }, "value": { "type": "NumericLiteral", "start": 353, "end": 361, "loc": { "start": { "line": 8, "column": 58 }, "end": { "line": 8, "column": 66 } }, "extra": { "rawValue": 12727145, "raw": "0xc23369" }, "value": 12727145 } }, { "type": "ObjectProperty", "start": 363, "end": 380, "loc": { "start": { "line": 8, "column": 68 }, "end": { "line": 8, "column": 85 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 363, "end": 374, "loc": { "start": { "line": 8, "column": 68 }, "end": { "line": 8, "column": 79 }, "identifierName": "transparent" }, "name": "transparent" }, "value": { "type": "BooleanLiteral", "start": 376, "end": 380, "loc": { "start": { "line": 8, "column": 81 }, "end": { "line": 8, "column": 85 } }, "value": true } }, { "type": "ObjectProperty", "start": 382, "end": 394, "loc": { "start": { "line": 8, "column": 87 }, "end": { "line": 8, "column": 99 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 382, "end": 389, "loc": { "start": { "line": 8, "column": 87 }, "end": { "line": 8, "column": 94 }, "identifierName": "opacity" }, "name": "opacity" }, "value": { "type": "NumericLiteral", "start": 391, "end": 394, "loc": { "start": { "line": 8, "column": 96 }, "end": { "line": 8, "column": 99 } }, "extra": { "rawValue": 0.3, "raw": "0.3" }, "value": 0.3 } } ] } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 398, "end": 461, "loc": { "start": { "line": 9, "column": 0 }, "end": { "line": 9, "column": 63 } }, "declarations": [ { "type": "VariableDeclarator", "start": 404, "end": 460, "loc": { "start": { "line": 9, "column": 6 }, "end": { "line": 9, "column": 62 } }, "id": { "type": "Identifier", "start": 404, "end": 416, "loc": { "start": { "line": 9, "column": 6 }, "end": { "line": 9, "column": 18 }, "identifierName": "lineGeometry" }, "name": "lineGeometry" }, "init": { "type": "NewExpression", "start": 419, "end": 460, "loc": { "start": { "line": 9, "column": 21 }, "end": { "line": 9, "column": 62 } }, "callee": { "type": "MemberExpression", "start": 423, "end": 451, "loc": { "start": { "line": 9, "column": 25 }, "end": { "line": 9, "column": 53 } }, "object": { "type": "Identifier", "start": 423, "end": 428, "loc": { "start": { "line": 9, "column": 25 }, "end": { "line": 9, "column": 30 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 429, "end": 451, "loc": { "start": { "line": 9, "column": 31 }, "end": { "line": 9, "column": 53 }, "identifierName": "CylinderBufferGeometry" }, "name": "CylinderBufferGeometry" }, "computed": false }, "arguments": [ { "type": "NumericLiteral", "start": 452, "end": 453, "loc": { "start": { "line": 9, "column": 54 }, "end": { "line": 9, "column": 55 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 }, { "type": "NumericLiteral", "start": 455, "end": 456, "loc": { "start": { "line": 9, "column": 57 }, "end": { "line": 9, "column": 58 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 }, { "type": "NumericLiteral", "start": 458, "end": 459, "loc": { "start": { "line": 9, "column": 60 }, "end": { "line": 9, "column": 61 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 462, "end": 530, "loc": { "start": { "line": 10, "column": 0 }, "end": { "line": 10, "column": 68 } }, "declarations": [ { "type": "VariableDeclarator", "start": 468, "end": 529, "loc": { "start": { "line": 10, "column": 6 }, "end": { "line": 10, "column": 67 } }, "id": { "type": "Identifier", "start": 468, "end": 480, "loc": { "start": { "line": 10, "column": 6 }, "end": { "line": 10, "column": 18 }, "identifierName": "lineMaterial" }, "name": "lineMaterial" }, "init": { "type": "NewExpression", "start": 483, "end": 529, "loc": { "start": { "line": 10, "column": 21 }, "end": { "line": 10, "column": 67 } }, "callee": { "type": "MemberExpression", "start": 487, "end": 510, "loc": { "start": { "line": 10, "column": 25 }, "end": { "line": 10, "column": 48 } }, "object": { "type": "Identifier", "start": 487, "end": 492, "loc": { "start": { "line": 10, "column": 25 }, "end": { "line": 10, "column": 30 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 493, "end": 510, "loc": { "start": { "line": 10, "column": 31 }, "end": { "line": 10, "column": 48 }, "identifierName": "MeshBasicMaterial" }, "name": "MeshBasicMaterial" }, "computed": false }, "arguments": [ { "type": "ObjectExpression", "start": 511, "end": 528, "loc": { "start": { "line": 10, "column": 49 }, "end": { "line": 10, "column": 66 } }, "properties": [ { "type": "ObjectProperty", "start": 512, "end": 527, "loc": { "start": { "line": 10, "column": 50 }, "end": { "line": 10, "column": 65 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 512, "end": 517, "loc": { "start": { "line": 10, "column": 50 }, "end": { "line": 10, "column": 55 }, "identifierName": "color" }, "name": "color" }, "value": { "type": "NumericLiteral", "start": 519, "end": 527, "loc": { "start": { "line": 10, "column": 57 }, "end": { "line": 10, "column": 65 } }, "extra": { "rawValue": 12727145, "raw": "0xc23369" }, "value": 12727145 } } ] } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 531, "end": 606, "loc": { "start": { "line": 11, "column": 0 }, "end": { "line": 11, "column": 75 } }, "declarations": [ { "type": "VariableDeclarator", "start": 537, "end": 605, "loc": { "start": { "line": 11, "column": 6 }, "end": { "line": 11, "column": 74 } }, "id": { "type": "Identifier", "start": 537, "end": 555, "loc": { "start": { "line": 11, "column": 6 }, "end": { "line": 11, "column": 24 }, "identifierName": "arcSegmentGeometry" }, "name": "arcSegmentGeometry" }, "init": { "type": "NewExpression", "start": 558, "end": 605, "loc": { "start": { "line": 11, "column": 27 }, "end": { "line": 11, "column": 74 } }, "callee": { "type": "MemberExpression", "start": 562, "end": 590, "loc": { "start": { "line": 11, "column": 31 }, "end": { "line": 11, "column": 59 } }, "object": { "type": "Identifier", "start": 562, "end": 567, "loc": { "start": { "line": 11, "column": 31 }, "end": { "line": 11, "column": 36 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 568, "end": 590, "loc": { "start": { "line": 11, "column": 37 }, "end": { "line": 11, "column": 59 }, "identifierName": "CylinderBufferGeometry" }, "name": "CylinderBufferGeometry" }, "computed": false }, "arguments": [ { "type": "NumericLiteral", "start": 591, "end": 592, "loc": { "start": { "line": 11, "column": 60 }, "end": { "line": 11, "column": 61 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 }, { "type": "NumericLiteral", "start": 594, "end": 595, "loc": { "start": { "line": 11, "column": 63 }, "end": { "line": 11, "column": 64 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 }, { "type": "NumericLiteral", "start": 597, "end": 598, "loc": { "start": { "line": 11, "column": 66 }, "end": { "line": 11, "column": 67 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 }, { "type": "NumericLiteral", "start": 600, "end": 601, "loc": { "start": { "line": 11, "column": 69 }, "end": { "line": 11, "column": 70 } }, "extra": { "rawValue": 4, "raw": "4" }, "value": 4 }, { "type": "NumericLiteral", "start": 603, "end": 604, "loc": { "start": { "line": 11, "column": 72 }, "end": { "line": 11, "column": 73 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 607, "end": 681, "loc": { "start": { "line": 12, "column": 0 }, "end": { "line": 12, "column": 74 } }, "declarations": [ { "type": "VariableDeclarator", "start": 613, "end": 680, "loc": { "start": { "line": 12, "column": 6 }, "end": { "line": 12, "column": 73 } }, "id": { "type": "Identifier", "start": 613, "end": 631, "loc": { "start": { "line": 12, "column": 6 }, "end": { "line": 12, "column": 24 }, "identifierName": "arcSegmentMaterial" }, "name": "arcSegmentMaterial" }, "init": { "type": "NewExpression", "start": 634, "end": 680, "loc": { "start": { "line": 12, "column": 27 }, "end": { "line": 12, "column": 73 } }, "callee": { "type": "MemberExpression", "start": 638, "end": 661, "loc": { "start": { "line": 12, "column": 31 }, "end": { "line": 12, "column": 54 } }, "object": { "type": "Identifier", "start": 638, "end": 643, "loc": { "start": { "line": 12, "column": 31 }, "end": { "line": 12, "column": 36 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 644, "end": 661, "loc": { "start": { "line": 12, "column": 37 }, "end": { "line": 12, "column": 54 }, "identifierName": "MeshBasicMaterial" }, "name": "MeshBasicMaterial" }, "computed": false }, "arguments": [ { "type": "ObjectExpression", "start": 662, "end": 679, "loc": { "start": { "line": 12, "column": 55 }, "end": { "line": 12, "column": 72 } }, "properties": [ { "type": "ObjectProperty", "start": 663, "end": 678, "loc": { "start": { "line": 12, "column": 56 }, "end": { "line": 12, "column": 71 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 663, "end": 668, "loc": { "start": { "line": 12, "column": 56 }, "end": { "line": 12, "column": 61 }, "identifierName": "color" }, "name": "color" }, "value": { "type": "NumericLiteral", "start": 670, "end": 678, "loc": { "start": { "line": 12, "column": 63 }, "end": { "line": 12, "column": 71 } }, "extra": { "rawValue": 12727145, "raw": "0xc23369" }, "value": 12727145 } } ] } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 682, "end": 739, "loc": { "start": { "line": 13, "column": 0 }, "end": { "line": 13, "column": 57 } }, "declarations": [ { "type": "VariableDeclarator", "start": 688, "end": 738, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 56 } }, "id": { "type": "Identifier", "start": 688, "end": 701, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 19 }, "identifierName": "arrowGeometry" }, "name": "arrowGeometry" }, "init": { "type": "NewExpression", "start": 704, "end": 738, "loc": { "start": { "line": 13, "column": 22 }, "end": { "line": 13, "column": 56 } }, "callee": { "type": "MemberExpression", "start": 708, "end": 732, "loc": { "start": { "line": 13, "column": 26 }, "end": { "line": 13, "column": 50 } }, "object": { "type": "Identifier", "start": 708, "end": 713, "loc": { "start": { "line": 13, "column": 26 }, "end": { "line": 13, "column": 31 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 714, "end": 732, "loc": { "start": { "line": 13, "column": 32 }, "end": { "line": 13, "column": 50 }, "identifierName": "ConeBufferGeometry" }, "name": "ConeBufferGeometry" }, "computed": false }, "arguments": [ { "type": "NumericLiteral", "start": 733, "end": 734, "loc": { "start": { "line": 13, "column": 51 }, "end": { "line": 13, "column": 52 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 }, { "type": "NumericLiteral", "start": 736, "end": 737, "loc": { "start": { "line": 13, "column": 54 }, "end": { "line": 13, "column": 55 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 } ] } } ], "kind": "const" }, { "type": "ExpressionStatement", "start": 740, "end": 776, "loc": { "start": { "line": 14, "column": 0 }, "end": { "line": 14, "column": 36 } }, "expression": { "type": "CallExpression", "start": 740, "end": 775, "loc": { "start": { "line": 14, "column": 0 }, "end": { "line": 14, "column": 35 } }, "callee": { "type": "MemberExpression", "start": 740, "end": 763, "loc": { "start": { "line": 14, "column": 0 }, "end": { "line": 14, "column": 23 } }, "object": { "type": "Identifier", "start": 740, "end": 753, "loc": { "start": { "line": 14, "column": 0 }, "end": { "line": 14, "column": 13 }, "identifierName": "arrowGeometry" }, "name": "arrowGeometry" }, "property": { "type": "Identifier", "start": 754, "end": 763, "loc": { "start": { "line": 14, "column": 14 }, "end": { "line": 14, "column": 23 }, "identifierName": "translate" }, "name": "translate" }, "computed": false }, "arguments": [ { "type": "NumericLiteral", "start": 764, "end": 765, "loc": { "start": { "line": 14, "column": 24 }, "end": { "line": 14, "column": 25 } }, "extra": { "rawValue": 0, "raw": "0" }, "value": 0 }, { "type": "UnaryExpression", "start": 767, "end": 771, "loc": { "start": { "line": 14, "column": 27