UNPKG

dirtybomb

Version:
1,542 lines (1,541 loc) 119 kB
{ "type": "Program", "body": [ { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportDefaultSpecifier", "local": { "type": "Identifier", "name": "GaussianDecayPuff", "range": [ 74, 91 ], "loc": { "start": { "line": 7, "column": 7 }, "end": { "line": 7, "column": 24 } } }, "range": [ 74, 91 ], "loc": { "start": { "line": 7, "column": 7 }, "end": { "line": 7, "column": 24 } } } ], "source": { "type": "Literal", "value": "./Dispersion/GaussianDecayPuff", "raw": "'./Dispersion/GaussianDecayPuff'", "range": [ 97, 129 ], "loc": { "start": { "line": 7, "column": 30 }, "end": { "line": 7, "column": 62 } } }, "range": [ 67, 130 ], "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 63 } }, "leadingComments": [ { "type": "Block", "value": "*\n * Created by austin on 6/2/16.\n * file: Dirtybomb.js\n * \n ", "range": [ 0, 65 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 5, "column": 3 } } } ] }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportDefaultSpecifier", "local": { "type": "Identifier", "name": "DynamicGaussianDecayPuff", "range": [ 138, 162 ], "loc": { "start": { "line": 8, "column": 7 }, "end": { "line": 8, "column": 31 } } }, "range": [ 138, 162 ], "loc": { "start": { "line": 8, "column": 7 }, "end": { "line": 8, "column": 31 } } } ], "source": { "type": "Literal", "value": "./Dispersion/DynamicGaussianDecayPuff", "raw": "'./Dispersion/DynamicGaussianDecayPuff'", "range": [ 168, 207 ], "loc": { "start": { "line": 8, "column": 37 }, "end": { "line": 8, "column": 76 } } }, "range": [ 131, 208 ], "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 8, "column": 77 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportDefaultSpecifier", "local": { "type": "Identifier", "name": "Bomb", "range": [ 216, 220 ], "loc": { "start": { "line": 9, "column": 7 }, "end": { "line": 9, "column": 11 } } }, "range": [ 216, 220 ], "loc": { "start": { "line": 9, "column": 7 }, "end": { "line": 9, "column": 11 } } } ], "source": { "type": "Literal", "value": "./Bomb", "raw": "'./Bomb'", "range": [ 226, 234 ], "loc": { "start": { "line": 9, "column": 17 }, "end": { "line": 9, "column": 25 } } }, "range": [ 209, 235 ], "loc": { "start": { "line": 9, "column": 0 }, "end": { "line": 9, "column": 26 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportDefaultSpecifier", "local": { "type": "Identifier", "name": "NuclearMaterial", "range": [ 243, 258 ], "loc": { "start": { "line": 10, "column": 7 }, "end": { "line": 10, "column": 22 } } }, "range": [ 243, 258 ], "loc": { "start": { "line": 10, "column": 7 }, "end": { "line": 10, "column": 22 } } } ], "source": { "type": "Literal", "value": "./NuclearMaterial", "raw": "'./NuclearMaterial'", "range": [ 264, 283 ], "loc": { "start": { "line": 10, "column": 28 }, "end": { "line": 10, "column": 47 } } }, "range": [ 236, 284 ], "loc": { "start": { "line": 10, "column": 0 }, "end": { "line": 10, "column": 48 } } }, { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportDefaultSpecifier", "local": { "type": "Identifier", "name": "Dispersion", "range": [ 292, 302 ], "loc": { "start": { "line": 11, "column": 7 }, "end": { "line": 11, "column": 17 } } }, "range": [ 292, 302 ], "loc": { "start": { "line": 11, "column": 7 }, "end": { "line": 11, "column": 17 } } } ], "source": { "type": "Literal", "value": "./Dispersion/Dispersion", "raw": "'./Dispersion/Dispersion'", "range": [ 308, 333 ], "loc": { "start": { "line": 11, "column": 23 }, "end": { "line": 11, "column": 48 } } }, "range": [ 285, 334 ], "loc": { "start": { "line": 11, "column": 0 }, "end": { "line": 11, "column": 49 } }, "trailingComments": [ { "type": "Block", "value": "*\n * A simple dirtybomb. Assumes all nuclear material is released into the atmosphere\n ", "range": [ 336, 427 ], "loc": { "start": { "line": 13, "column": 0 }, "end": { "line": 15, "column": 3 } } } ] }, { "type": "Identifier", "id": { "type": "Identifier", "name": "Dirtybomb", "range": [ 434, 443 ], "loc": { "start": { "line": 16, "column": 6 }, "end": { "line": 16, "column": 15 } } }, "superClass": { "type": "Identifier", "name": "Bomb", "range": [ 452, 456 ], "loc": { "start": { "line": 16, "column": 24 }, "end": { "line": 16, "column": 28 } } }, "body": { "type": "ClassBody", "body": [ { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "constructor", "range": [ 741, 752 ], "loc": { "start": { "line": 25, "column": 4 }, "end": { "line": 25, "column": 15 } } }, "value": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "nuclearMat", "range": [ 753, 763 ], "loc": { "start": { "line": 25, "column": 16 }, "end": { "line": 25, "column": 26 } } }, { "type": "Identifier", "name": "tntEqvMass", "range": [ 765, 775 ], "loc": { "start": { "line": 25, "column": 28 }, "end": { "line": 25, "column": 38 } } }, { "type": "AssignmentPattern", "left": { "type": "Identifier", "name": "atmosphere", "range": [ 777, 787 ], "loc": { "start": { "line": 25, "column": 40 }, "end": { "line": 25, "column": 50 } } }, "right": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "Bomb", "range": [ 790, 794 ], "loc": { "start": { "line": 25, "column": 53 }, "end": { "line": 25, "column": 57 } } }, "property": { "type": "Identifier", "name": "STANDARD_ATM", "range": [ 795, 807 ], "loc": { "start": { "line": 25, "column": 58 }, "end": { "line": 25, "column": 70 } } }, "range": [ 790, 807 ], "loc": { "start": { "line": 25, "column": 53 }, "end": { "line": 25, "column": 70 } } }, "range": [ 777, 807 ], "loc": { "start": { "line": 25, "column": 40 }, "end": { "line": 25, "column": 70 } } }, { "type": "AssignmentPattern", "left": { "type": "Identifier", "name": "isStatic", "range": [ 809, 817 ], "loc": { "start": { "line": 25, "column": 72 }, "end": { "line": 25, "column": 80 } } }, "right": { "type": "Literal", "value": true, "raw": "true", "range": [ 820, 824 ], "loc": { "start": { "line": 25, "column": 83 }, "end": { "line": 25, "column": 87 } } }, "range": [ 809, 824 ], "loc": { "start": { "line": 25, "column": 72 }, "end": { "line": 25, "column": 87 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Super", "range": [ 836, 841 ], "loc": { "start": { "line": 26, "column": 8 }, "end": { "line": 26, "column": 13 } } }, "arguments": [ { "type": "Identifier", "name": "tntEqvMass", "range": [ 842, 852 ], "loc": { "start": { "line": 26, "column": 14 }, "end": { "line": 26, "column": 24 } } }, { "type": "Identifier", "name": "atmosphere", "range": [ 854, 864 ], "loc": { "start": { "line": 26, "column": 26 }, "end": { "line": 26, "column": 36 } } }, { "type": "Identifier", "name": "isStatic", "range": [ 866, 874 ], "loc": { "start": { "line": 26, "column": 38 }, "end": { "line": 26, "column": 46 } } } ], "range": [ 836, 875 ], "loc": { "start": { "line": 26, "column": 8 }, "end": { "line": 26, "column": 47 } } }, "range": [ 836, 876 ], "loc": { "start": { "line": 26, "column": 8 }, "end": { "line": 26, "column": 48 } }, "trailingComments": [ { "type": "Block", "value": "*\n * @type {NuclearMaterial}\n * @private\n ", "range": [ 894, 964 ], "loc": { "start": { "line": 28, "column": 8 }, "end": { "line": 31, "column": 11 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 973, 977 ], "loc": { "start": { "line": 32, "column": 8 }, "end": { "line": 32, "column": 12 } } }, "property": { "type": "Identifier", "name": "_nucMat", "range": [ 978, 985 ], "loc": { "start": { "line": 32, "column": 13 }, "end": { "line": 32, "column": 20 } } }, "range": [ 973, 985 ], "loc": { "start": { "line": 32, "column": 8 }, "end": { "line": 32, "column": 20 } } }, "right": { "type": "Identifier", "name": "nuclearMat", "range": [ 988, 998 ], "loc": { "start": { "line": 32, "column": 23 }, "end": { "line": 32, "column": 33 } } }, "range": [ 973, 998 ], "loc": { "start": { "line": 32, "column": 8 }, "end": { "line": 32, "column": 33 } } }, "range": [ 973, 999 ], "loc": { "start": { "line": 32, "column": 8 }, "end": { "line": 32, "column": 34 } }, "leadingComments": [ { "type": "Block", "value": "*\n * @type {NuclearMaterial}\n * @private\n ", "range": [ 894, 964 ], "loc": { "start": { "line": 28, "column": 8 }, "end": { "line": 31, "column": 11 } } } ], "trailingComments": [ { "type": "Block", "value": "*\n * Either\n * @type {GaussianPuff}\n * @private\n ", "range": [ 1009, 1094 ], "loc": { "start": { "line": 34, "column": 8 }, "end": { "line": 38, "column": 11 } } } ] }, { "type": "ExpressionStatement", "expression": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 1103, 1107 ], "loc": { "start": { "line": 39, "column": 8 }, "end": { "line": 39, "column": 12 } } }, "property": { "type": "Identifier", "name": "_puff", "range": [ 1108, 1113 ], "loc": { "start": { "line": 39, "column": 13 }, "end": { "line": 39, "column": 18 } } }, "range": [ 1103, 1113 ], "loc": { "start": { "line": 39, "column": 8 }, "end": { "line": 39, "column": 18 } } }, "range": [ 1103, 1114 ], "loc": { "start": { "line": 39, "column": 8 }, "end": { "line": 39, "column": 19 } }, "leadingComments": [ { "type": "Block", "value": "*\n * Either\n * @type {GaussianPuff}\n * @private\n ", "range": [ 1009, 1094 ], "loc": { "start": { "line": 34, "column": 8 }, "end": { "line": 38, "column": 11 } } } ] }, { "type": "IfStatement", "test": { "type": "Identifier", "name": "isStatic", "range": [ 1136, 1144 ], "loc": { "start": { "line": 41, "column": 12 }, "end": { "line": 41, "column": 20 } } }, "consequent": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 1160, 1164 ], "loc": { "start": { "line": 42, "column": 12 }, "end": { "line": 42, "column": 16 } } }, "property": { "type": "Identifier", "name": "_puff", "range": [ 1165, 1170 ], "loc": { "start": { "line": 42, "column": 17 }, "end": { "line": 42, "column": 22 } } }, "range": [ 1160, 1170 ], "loc": { "start": { "line": 42, "column": 12 }, "end": { "line": 42, "column": 22 } } }, "right": { "type": "NewExpression", "callee": { "type": "Identifier", "name": "GaussianDecayPuff", "range": [ 1177, 1194 ], "loc": { "start": { "line": 42, "column": 29 }, "end": { "line": 42, "column": 46 } } }, "arguments": [ { "type": "Identifier", "name": "atmosphere", "range": [ 1212, 1222 ], "loc": { "start": { "line": 43, "column": 16 }, "end": { "line": 43, "column": 26 } } }, { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 1240, 1244 ], "loc": { "start": { "line": 44, "column": 16 }, "end": { "line": 44, "column": 20 } } }, "property": { "type": "Identifier", "name": "source", "range": [ 1245, 1251 ], "loc": { "start": { "line": 44, "column": 21 }, "end": { "line": 44, "column": 27 } } }, "range": [ 1240, 1251 ], "loc": { "start": { "line": 44, "column": 16 }, "end": { "line": 44, "column": 27 } } }, { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "nuclearMat", "range": [ 1269, 1279 ], "loc": { "start": { "line": 45, "column": 16 }, "end": { "line": 45, "column": 26 } } }, "property": { "type": "Identifier", "name": "mass", "range": [ 1280, 1284 ], "loc": { "start": { "line": 45, "column": 27 }, "end": { "line": 45, "column": 31 } } }, "range": [ 1269, 1284 ], "loc": { "start": { "line": 45, "column": 16 }, "end": { "line": 45, "column": 31 } } }, { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "nuclearMat", "range": [ 1302, 1312 ], "loc": { "start": { "line": 46, "column": 16 }, "end": { "line": 46, "column": 26 } } }, "property": { "type": "Identifier", "name": "halfLife", "range": [ 1313, 1321 ], "loc": { "start": { "line": 46, "column": 27 }, "end": { "line": 46, "column": 35 } } }, "range": [ 1302, 1321 ], "loc": { "start": { "line": 46, "column": 16 }, "end": { "line": 46, "column": 35 } } } ], "range": [ 1173, 1335 ], "loc": { "start": { "line": 42, "column": 25 }, "end": { "line": 47, "column": 13 } } }, "range": [ 1160, 1335 ], "loc": { "start": { "line": 42, "column": 12 }, "end": { "line": 47, "column": 13 } } }, "range": [ 1160, 1336 ], "loc": { "start": { "line": 42, "column": 12 }, "end": { "line": 47, "column": 14 } } } ], "range": [ 1146, 1346 ], "loc": { "start": { "line": 41, "column": 22 }, "end": { "line": 48, "column": 9 } } }, "alternate": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 1366, 1370 ], "loc": { "start": { "line": 49, "column": 12 }, "end": { "line": 49, "column": 16 } } }, "property": { "type": "Identifier", "name": "_puff", "range": [ 1371, 1376 ], "loc": { "start": { "line": 49, "column": 17 }, "end": { "line": 49, "column": 22 } } }, "range": [ 1366, 1376 ], "loc": { "start": { "line": 49, "column": 12 }, "end": { "line": 49, "column": 22 } } }, "right": { "type": "NewExpression", "callee": { "type": "Identifier", "name": "DynamicGaussianDecayPuff", "range": [ 1383, 1407 ], "loc": { "start": { "line": 49, "column": 29 }, "end": { "line": 49, "column": 53 } } }, "arguments": [ { "type": "Identifier", "name": "atmosphere", "range": [ 1425, 1435 ], "loc": { "start": { "line": 50, "column": 16 }, "end": { "line": 50, "column": 26 } } }, { "type": "MemberExpression", "computed": false, "object": { "type": "ThisExpression", "range": [ 1453, 1457 ], "loc": { "start": { "line": 51, "column": 16 }, "end": { "line": 51, "column": 20 } } }, "property": { "type": "Identifier", "name": "source", "range": [ 1458, 1464 ], "loc": { "start": { "line": 51, "column": 21 }, "end": { "line": 51, "column": 27 } } }, "range": [ 1453, 1464 ], "loc": { "start": { "line": 51, "column": 16 }, "end": { "line": 51, "column": 27 } } }, { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "nuclearMat", "range": [ 1482, 1492 ], "loc": { "start": { "line": 52, "column": 16 }, "end": { "line": 52, "column": 26 } } }, "property": { "type": "Identifier", "name": "mass", "range": [ 1493,