UNPKG

awv3

Version:
1,492 lines (1,491 loc) 1.91 MB
{ "type": "Program", "start": 0, "end": 15700, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 389, "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": 67, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 39 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 35, "end": 42, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 14 } }, "local": { "type": "Identifier", "start": 35, "end": 42, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 14 } }, "name": "Object3" } } ], "importKind": "value", "source": { "type": "Literal", "start": 48, "end": 66, "loc": { "start": { "line": 2, "column": 20 }, "end": { "line": 2, "column": 38 } }, "value": "../three/object3", "rawValue": "../three/object3", "raw": "'../three/object3'" } }, { "type": "ImportDeclaration", "start": 69, "end": 107, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 38 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 76, "end": 81, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 12 } }, "local": { "type": "Identifier", "start": 76, "end": 81, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 12 } }, "name": "Orbit" } } ], "importKind": "value", "source": { "type": "Literal", "start": 87, "end": 106, "loc": { "start": { "line": 3, "column": 18 }, "end": { "line": 3, "column": 37 } }, "value": "../controls/orbit", "rawValue": "../controls/orbit", "raw": "'../controls/orbit'" } }, { "type": "ImportDeclaration", "start": 109, "end": 156, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 47 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 116, "end": 127, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 18 } }, "local": { "type": "Identifier", "start": 116, "end": 127, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 18 } }, "name": "Perspective" } } ], "importKind": "value", "source": { "type": "Literal", "start": 133, "end": 155, "loc": { "start": { "line": 4, "column": 24 }, "end": { "line": 4, "column": 46 } }, "value": "../three/perspective", "rawValue": "../three/perspective", "raw": "'../three/perspective'" }, "trailingComments": [ { "type": "Block", "value": "*\r\n * @class that stores and restores the original color and opacity of a material\r\n ", "start": 160, "end": 249, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 8, "column": 3 } }, "range": [ 160, 249 ] } ] }, { "type": "ClassDeclaration", "start": 251, "end": 1053, "loc": { "start": { "line": 9, "column": 0 }, "end": { "line": 32, "column": 1 } }, "id": { "type": "Identifier", "start": 257, "end": 270, "loc": { "start": { "line": 9, "column": 6 }, "end": { "line": 9, "column": 19 } }, "name": "MaterialStore", "leadingComments": null }, "superClass": null, "body": { "type": "ClassBody", "start": 271, "end": 1053, "loc": { "start": { "line": 9, "column": 20 }, "end": { "line": 32, "column": 1 } }, "body": [ { "type": "MethodDefinition", "start": 278, "end": 541, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 18, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 278, "end": 289, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 15 } }, "name": "constructor" }, "static": false, "kind": "constructor", "value": { "type": "FunctionExpression", "start": 289, "end": 541, "loc": { "start": { "line": 10, "column": 15 }, "end": { "line": 18, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 290, "end": 298, "loc": { "start": { "line": 10, "column": 16 }, "end": { "line": 10, "column": 24 } }, "name": "material" } ], "body": { "type": "BlockStatement", "start": 299, "end": 541, "loc": { "start": { "line": 10, "column": 25 }, "end": { "line": 18, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 310, "end": 346, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 44 } }, "expression": { "type": "AssignmentExpression", "start": 310, "end": 345, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 43 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 310, "end": 320, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 18 } }, "object": { "type": "ThisExpression", "start": 310, "end": 314, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 12 } } }, "property": { "type": "Identifier", "start": 315, "end": 320, "loc": { "start": { "line": 11, "column": 13 }, "end": { "line": 11, "column": 18 } }, "name": "color" }, "computed": false }, "right": { "type": "CallExpression", "start": 323, "end": 345, "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 11, "column": 43 } }, "callee": { "type": "MemberExpression", "start": 323, "end": 343, "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 11, "column": 41 } }, "object": { "type": "MemberExpression", "start": 323, "end": 337, "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 11, "column": 35 } }, "object": { "type": "Identifier", "start": 323, "end": 331, "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 11, "column": 29 } }, "name": "material" }, "property": { "type": "Identifier", "start": 332, "end": 337, "loc": { "start": { "line": 11, "column": 30 }, "end": { "line": 11, "column": 35 } }, "name": "color" }, "computed": false }, "property": { "type": "Identifier", "start": 338, "end": 343, "loc": { "start": { "line": 11, "column": 36 }, "end": { "line": 11, "column": 41 } }, "name": "clone" }, "computed": false }, "arguments": [] } } }, { "type": "ExpressionStatement", "start": 356, "end": 388, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 40 } }, "expression": { "type": "AssignmentExpression", "start": 356, "end": 387, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 39 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 356, "end": 368, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 20 } }, "object": { "type": "ThisExpression", "start": 356, "end": 360, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 12 } } }, "property": { "type": "Identifier", "start": 361, "end": 368, "loc": { "start": { "line": 12, "column": 13 }, "end": { "line": 12, "column": 20 } }, "name": "opacity" }, "computed": false }, "right": { "type": "MemberExpression", "start": 371, "end": 387, "loc": { "start": { "line": 12, "column": 23 }, "end": { "line": 12, "column": 39 } }, "object": { "type": "Identifier", "start": 371, "end": 379, "loc": { "start": { "line": 12, "column": 23 }, "end": { "line": 12, "column": 31 } }, "name": "material" }, "property": { "type": "Identifier", "start": 380, "end": 387, "loc": { "start": { "line": 12, "column": 32 }, "end": { "line": 12, "column": 39 } }, "name": "opacity" }, "computed": false } } }, { "type": "IfStatement", "start": 398, "end": 534, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 17, "column": 9 } }, "test": { "type": "MemberExpression", "start": 402, "end": 420, "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 30 } }, "object": { "type": "Identifier", "start": 402, "end": 410, "loc": { "start": { "line": 13, "column": 12 }, "end": { "line": 13, "column": 20 } }, "name": "material" }, "property": { "type": "Identifier", "start": 411, "end": 420, "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 30 } }, "name": "linewidth" }, "computed": false }, "consequent": { "type": "BlockStatement", "start": 422, "end": 483, "loc": { "start": { "line": 13, "column": 32 }, "end": { "line": 15, "column": 9 } }, "body": [ { "type": "ExpressionStatement", "start": 437, "end": 472, "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 47 } }, "expression": { "type": "AssignmentExpression", "start": 437, "end": 472, "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 47 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 437, "end": 451, "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 26 } }, "object": { "type": "ThisExpression", "start": 437, "end": 441, "loc": { "start": { "line": 14, "column": 12 }, "end": { "line": 14, "column": 16 } } }, "property": { "type": "Identifier", "start": 442, "end": 451, "loc": { "start": { "line": 14, "column": 17 }, "end": { "line": 14, "column": 26 } }, "name": "linewidth" }, "computed": false }, "right": { "type": "MemberExpression", "start": 454, "end": 472, "loc": { "start": { "line": 14, "column": 29 }, "end": { "line": 14, "column": 47 } }, "object": { "type": "Identifier", "start": 454, "end": 462, "loc": { "start": { "line": 14, "column": 29 }, "end": { "line": 14, "column": 37 } }, "name": "material" }, "property": { "type": "Identifier", "start": 463, "end": 472, "loc": { "start": { "line": 14, "column": 38 }, "end": { "line": 14, "column": 47 } }, "name": "linewidth" }, "computed": false } } } ] }, "alternate": { "type": "BlockStatement", "start": 489, "end": 534, "loc": { "start": { "line": 15, "column": 15 }, "end": { "line": 17, "column": 9 } }, "body": [ { "type": "ExpressionStatement", "start": 504, "end": 523, "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 31 } }, "expression": { "type": "AssignmentExpression", "start": 504, "end": 522, "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 30 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 504, "end": 518, "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 26 } }, "object": { "type": "ThisExpression", "start": 504, "end": 508, "loc": { "start": { "line": 16, "column": 12 }, "end": { "line": 16, "column": 16 } } }, "property": { "type": "Identifier", "start": 509, "end": 518, "loc": { "start": { "line": 16, "column": 17 }, "end": { "line": 16, "column": 26 } }, "name": "linewidth" }, "computed": false }, "right": { "type": "Literal", "start": 521, "end": 522, "loc": { "start": { "line": 16, "column": 29 }, "end": { "line": 16, "column": 30 } }, "value": 1, "rawValue": 1, "raw": "1" } } } ] } } ], "trailingComments": null }, "trailingComments": null }, "trailingComments": [ { "type": "Block", "value": "*\r\n * Restores the original color and opacity\r\n * @param {THREE.Material} material - The material that is to be restored\r\n * @param {Number} time - Time for the animation\r\n ", "start": 549, "end": 742, "loc": { "start": { "line": 20, "column": 4 }, "end": { "line": 24, "column": 7 } }, "range": [ 549, 742 ] } ] }, { "type": "MethodDefinition", "start": 748, "end": 1050, "loc": { "start": { "line": 25, "column": 4 }, "end": { "line": 31, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 748, "end": 755, "loc": { "start": { "line": 25, "column": 4 }, "end": { "line": 25, "column": 11 } }, "name": "restore", "leadingComments": null }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 755, "end": 1050, "loc": { "start": { "line": 25, "column": 11 }, "end": { "line": 31, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 756, "end": 764, "loc": { "start": { "line": 25, "column": 12 }, "end": { "line": 25, "column": 20 } }, "name": "material" }, { "type": "AssignmentPattern", "start": 766, "end": 774, "loc": { "start": { "line": 25, "column": 22 }, "end": { "line": 25, "column": 30 } }, "operator": "=", "left": { "type": "Identifier", "start": 766, "end": 770, "loc": { "start": { "line": 25, "column": 22 }, "end": { "line": 25, "column": 26 } }, "name": "time" }, "right": { "type": "Literal", "start": 773, "end": 774, "loc": { "start": { "line": 25, "column": 29 }, "end": { "line": 25, "column": 30 } }, "value": 0, "rawValue": 0, "raw": "0" } } ], "body": { "type": "BlockStatement", "start": 775, "end": 1050, "loc": { "start": { "line": 25, "column": 31 }, "end": { "line": 31, "column": 5 } }, "body": [ { "type": "IfStatement", "start": 786, "end": 1043, "loc": { "start": { "line": 26, "column": 8 }, "end": { "line": 30, "column": 9 } }, "test": { "type": "MemberExpression", "start": 790, "end": 808, "loc": { "start": { "line": 26, "column": 12 }, "end": { "line": 26, "column": 30 } }, "object": { "type": "Identifier", "start": 790, "end": 798, "loc": { "start": { "line": 26, "column": 12 }, "end": { "line": 26, "column": 20 } }, "name": "material" }, "property": { "type": "Identifier", "start": 799, "end": 808, "loc": { "start": { "line": 26, "column": 21 }, "end": { "line": 26, "column": 30 } }, "name": "linewidth" }, "computed": false }, "consequent": { "type": "BlockStatement", "start": 810, "end": 937, "loc": { "start": { "line": 26, "column": 32 }, "end": { "line": 28, "column": 9 } }, "body": [ { "type": "ExpressionStatement", "start": 825, "end": 926, "loc": { "start": { "line": 27, "column": 12 }, "end": { "line": 27, "column": 113 } }, "expression": { "type": "CallExpression", "start": 825, "end": 926, "loc": { "start": { "line": 27, "column": 12 }, "end": { "line": 27, "column": 113 } }, "callee": { "type": "MemberExpression", "start": 825, "end": 920, "loc": { "start": { "line": 27, "column": 12 }, "end": { "line": 27, "column": 107 } }, "object": { "type": "CallExpression", "start": 825, "end": 914, "loc": { "start": { "line": 27, "column": 12 }, "end": { "line": 27, "column": 101 } }, "callee": { "type": "MemberExpression", "start": 825, "end": 841, "loc": { "start": { "line": 27, "column": 12 }, "end": { "line": 27, "column": 28 } }, "object": { "type": "Identifier", "start": 825, "end": 833, "loc": { "start": { "line": 27, "column": 12 }, "end": { "line": 27, "column": 20 } }, "name": "material" }, "property": { "type": "Identifier", "start": 834, "end": 841, "loc": { "start": { "line": 27, "column": 21 }, "end": { "line": 27, "column": 28 } }, "name": "animate" }, "computed": false }, "arguments": [ { "type": "ObjectExpression", "start": 843, "end": 912, "loc": { "start": { "line": 27, "column": 30 }, "end": { "line": 27, "column": 99 } }, "properties": [ { "type": "Property", "start": 844, "end": 861, "loc": { "start": { "line": 27, "column": 31 }, "end": { "line": 27, "column": 48 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 844, "end": 849, "loc": { "start": { "line": 27, "column": 31 }, "end": { "line": 27, "column": 36 } }, "name": "color" }, "value": { "type": "MemberExpression", "start": 851, "end": 861, "loc": { "start": { "line": 27, "column": 38 }, "end": { "line": 27, "column": 48 } }, "object": { "type": "ThisExpression", "start": 851, "end": 855, "loc": { "start": { "line": 27, "column": 38 }, "end": { "line": 27, "column": 42 } } }, "property": { "type": "Identifier", "start": 856, "end": 861, "loc": { "start": { "line": 27, "column": 43 }, "end": { "line": 27, "column": 48 }