dirtybomb
Version:
A dirty bomb model
1,319 lines (1,318 loc) • 185 kB
JSON
{
"type": "Program",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "Literal",
"value": "use strict",
"raw": "\"use strict\"",
"range": [
42,
54
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 12
}
}
},
"range": [
42,
55
],
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 13
}
},
"leadingComments": [
{
"type": "Block",
"value": "*\n * Created by austin on 6/15/16.\n ",
"range": [
0,
40
],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"column": 3
}
}
}
]
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"local": {
"type": "Identifier",
"name": "chai",
"range": [
64,
68
],
"loc": {
"start": {
"line": 7,
"column": 7
},
"end": {
"line": 7,
"column": 11
}
}
},
"range": [
64,
68
],
"loc": {
"start": {
"line": 7,
"column": 7
},
"end": {
"line": 7,
"column": 11
}
}
}
],
"source": {
"type": "Literal",
"value": "chai",
"raw": "'chai'",
"range": [
74,
80
],
"loc": {
"start": {
"line": 7,
"column": 17
},
"end": {
"line": 7,
"column": 23
}
}
},
"range": [
57,
81
],
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 24
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"local": {
"type": "Identifier",
"name": "Atmosphere",
"range": [
90,
100
],
"loc": {
"start": {
"line": 9,
"column": 7
},
"end": {
"line": 9,
"column": 17
}
}
},
"range": [
90,
100
],
"loc": {
"start": {
"line": 9,
"column": 7
},
"end": {
"line": 9,
"column": 17
}
}
}
],
"source": {
"type": "Literal",
"value": "../src/Dispersion/Atmosphere",
"raw": "'../src/Dispersion/Atmosphere'",
"range": [
106,
136
],
"loc": {
"start": {
"line": 9,
"column": 23
},
"end": {
"line": 9,
"column": 53
}
}
},
"range": [
83,
137
],
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 9,
"column": 54
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"local": {
"type": "Identifier",
"name": "Source",
"range": [
145,
151
],
"loc": {
"start": {
"line": 10,
"column": 7
},
"end": {
"line": 10,
"column": 13
}
}
},
"range": [
145,
151
],
"loc": {
"start": {
"line": 10,
"column": 7
},
"end": {
"line": 10,
"column": 13
}
}
},
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "SourceType",
"range": [
159,
169
],
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 14
}
}
},
"imported": {
"type": "Identifier",
"name": "SourceType",
"range": [
159,
169
],
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 14
}
}
},
"range": [
159,
169
],
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 14
}
}
}
],
"source": {
"type": "Literal",
"value": "../src/Dispersion/Source",
"raw": "'../src/Dispersion/Source'",
"range": [
177,
203
],
"loc": {
"start": {
"line": 12,
"column": 7
},
"end": {
"line": 12,
"column": 33
}
}
},
"range": [
138,
204
],
"loc": {
"start": {
"line": 10,
"column": 0
},
"end": {
"line": 12,
"column": 34
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"local": {
"type": "Identifier",
"name": "GaussianPuff",
"range": [
212,
224
],
"loc": {
"start": {
"line": 13,
"column": 7
},
"end": {
"line": 13,
"column": 19
}
}
},
"range": [
212,
224
],
"loc": {
"start": {
"line": 13,
"column": 7
},
"end": {
"line": 13,
"column": 19
}
}
}
],
"source": {
"type": "Literal",
"value": "../src/Dispersion/GaussianPuff",
"raw": "'../src/Dispersion/GaussianPuff'",
"range": [
230,
262
],
"loc": {
"start": {
"line": 13,
"column": 25
},
"end": {
"line": 13,
"column": 57
}
}
},
"range": [
205,
263
],
"loc": {
"start": {
"line": 13,
"column": 0
},
"end": {
"line": 13,
"column": 58
}
}
},
{
"type": "ImportDeclaration",
"specifiers": [
{
"type": "ImportSpecifier",
"local": {
"type": "Identifier",
"name": "integrate",
"range": [
272,
281
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 17
}
}
},
"imported": {
"type": "Identifier",
"name": "integrate",
"range": [
272,
281
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 17
}
}
},
"range": [
272,
281
],
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 17
}
}
}
],
"source": {
"type": "Literal",
"value": "../src/Dispersion/utils",
"raw": "'../src/Dispersion/utils'",
"range": [
288,
313
],
"loc": {
"start": {
"line": 14,
"column": 24
},
"end": {
"line": 14,
"column": 49
}
}
},
"range": [
264,
314
],
"loc": {
"start": {
"line": 14,
"column": 0
},
"end": {
"line": 14,
"column": 50
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "chai",
"range": [
316,
320
],
"loc": {
"start": {
"line": 16,
"column": 0
},
"end": {
"line": 16,
"column": 4
}
}
},
"property": {
"type": "Identifier",
"name": "should",
"range": [
321,
327
],
"loc": {
"start": {
"line": 16,
"column": 5
},
"end": {
"line": 16,
"column": 11
}
}
},
"range": [
316,
327
],
"loc": {
"start": {
"line": 16,
"column": 0
},
"end": {
"line": 16,
"column": 11
}
}
},
"arguments": [],
"range": [
316,
329
],
"loc": {
"start": {
"line": 16,
"column": 0
},
"end": {
"line": 16,
"column": 13
}
}
},
"range": [
316,
330
],
"loc": {
"start": {
"line": 16,
"column": 0
},
"end": {
"line": 16,
"column": 14
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "describe",
"range": [
332,
340
],
"loc": {
"start": {
"line": 18,
"column": 0
},
"end": {
"line": 18,
"column": 8
}
}
},
"arguments": [
{
"type": "Literal",
"value": "GaussianPuff",
"raw": "'GaussianPuff'",
"range": [
341,
355
],
"loc": {
"start": {
"line": 18,
"column": 9
},
"end": {
"line": 18,
"column": 23
}
}
},
{
"type": "FunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "puff",
"range": [
378,
382
],
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 12
}
}
},
"init": null,
"range": [
378,
382
],
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 12
}
}
}
],
"kind": "let",
"range": [
374,
383
],
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 13
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "describe",
"range": [
393,
401
],
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 21,
"column": 12
}
}
},
"arguments": [
{
"type": "Literal",
"value": "Constructor",
"raw": "'Constructor'",
"range": [
402,
415
],
"loc": {
"start": {
"line": 21,
"column": 13
},
"end": {
"line": 21,
"column": 26
}
}
},
{
"type": "ArrowFunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "Identifier",
"name": "it",
"range": [
433,
435
],
"loc": {
"start": {
"line": 22,
"column": 8
},
"end": {
"line": 22,
"column": 10
}
}
},
"arguments": [
{
"type": "Literal",
"value": "should import correctly",
"raw": "'should import correctly'",
"range": [
436,
461
],
"loc": {
"start": {
"line": 22,
"column": 11
},
"end": {
"line": 22,
"column": 36
}
}
},
{
"type": "ArrowFunctionExpression",
"id": null,
"params": [],
"body": {
"type": "BlockStatement",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "atm",
"range": [
487,
490
],
"loc": {
"start": {
"line": 23,
"column": 16
},
"end": {
"line": 23,
"column": 19
}
}
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Atmosphere",
"range": [
497,
507
],
"loc": {
"start": {
"line": 23,
"column": 26
},
"end": {
"line": 23,
"column": 36
}
}
},
"arguments": [
{
"type": "Literal",
"value": 10,
"raw": "10",
"range": [
508,
510
],
"loc": {
"start": {
"line": 23,
"column": 37
},
"end": {
"line": 23,
"column": 39
}
}
},
{
"type": "Literal",
"value": 1,
"raw": "1",
"range": [
512,
513
],
"loc": {
"start": {
"line": 23,
"column": 41
},
"end": {
"line": 23,
"column": 42
}
}
},
{
"type": "Literal",
"value": 65,
"raw": "65",
"range": [
515,
517
],
"loc": {
"start": {
"line": 23,
"column": 44
},
"end": {
"line": 23,
"column": 46
}
}
},
{
"type": "Literal",
"value": 300,
"raw": "300",
"range": [
519,
522
],
"loc": {
"start": {
"line": 23,
"column": 48
},
"end": {
"line": 23,
"column": 51
}
}
}
],
"range": [
493,
523
],
"loc": {
"start": {
"line": 23,
"column": 22
},
"end": {
"line": 23,
"column": 52
}
}
},
"range": [
487,
523
],
"loc": {
"start": {
"line": 23,
"column": 16
},
"end": {
"line": 23,
"column": 52
}
}
}
],
"kind": "let",
"range": [
483,
524
],
"loc": {
"start": {
"line": 23,
"column": 12
},
"end": {
"line": 23,
"column": 53
}
}
},
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "source",
"range": [
541,
547
],
"loc": {
"start": {
"line": 24,
"column": 16
},
"end": {
"line": 24,
"column": 22
}
}
},
"init": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "Source",
"range": [
554,
560
],
"loc": {
"start": {
"line": 24,
"column": 29
},
"end": {
"line": 24,
"column": 35
}
}
},
"arguments": [
{
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "SourceType",
"range": [
561,
571
],
"loc": {
"start": {
"line": 24,
"column": 36
},
"end": {
"line": 24,
"column": 46
}
}
},
"property": {
"type": "Identifier",
"name": "POINT",
"range": [
572,
577
],
"loc": {
"start": {
"line": 24,
"column": 47
},
"end": {
"line": 24,
"column": 52
}
}
},
"range": [
561,
577
],
"loc": {
"start": {
"line": 24,
"column": 36
},
"end": {
"line": 24,
"column": 52
}
}
},
{
"type": "Literal",
"value": 2,
"raw": "2",
"range": [
579,
580
],
"loc": {
"start": {
"line": 24,
"column": 54
},
"end": {
"line": 24,
"column": 55
}
}
},
{
"type": "Literal",
"value": 150,
"raw": "150",
"range": [
582,
585
],
"loc": {
"start": {
"line": 24,
"column": 57
},
"end": {
"line": 24,
"column": 60
}
}
},
{
"type": "Literal",
"value": 5,
"raw": "5",
"range": [
587,
588
],
"loc": {
"start": {
"line": 24,
"column": 62
},
"end": {
"line": 24,
"column": 63
}
}
},
{
"type": "Literal",
"value": 400,
"raw": "400",
"range": [
590,
593
],
"loc": {
"start": {
"line": 24,
"column": 65
},
"end": {
"line": 24,
"column": 68
}
}
},
{
"type": "Literal",
"value": 4,
"raw": "4",
"range": [
595,
596
],
"loc": {
"start": {
"line": 24,
"column": 70
},
"end": {
"line": 24,
"column": 71
}
}
}
],
"range": [
550,
597
],
"loc": {
"start": {
"line": 24,
"column": 25
},
"end": {
"line": 24,
"column": 72
}
}
},
"range": [
541,
597
],
"loc": {
"start": {
"line": 24,
"column": 16
},
"end": {
"line": 24,
"column": 72
}
}
}
],
"kind": "let",
"range": [
537,
598
],
"loc": {
"start": {
"line": 24,
"column": 12
},
"end": {
"line": 24,
"column": 73
}
}
},
{
"type": "ExpressionStatement",
"expression": {
"type": "AssignmentExpression",
"operator": "=",
"left": {
"type": "Identifier",
"name": "puff",
"range": [
611,
615
],
"loc": {
"start": {
"line": 25,
"column": 12
},
"end": {
"line": 25,
"column": 16
}
}
},
"right": {
"type": "NewExpression",
"callee": {
"type": "Identifier",
"name": "GaussianPuff",
"range": [
622,
634
],
"loc": {
"start": {
"line": 25,
"column": 23
},
"end": {
"line": 25,
"column": 35
}
}
},
"arguments": [
{
"type": "Identifier",
"name": "atm",
"range": [
635,
638
],
"loc": {
"start": {
"line": 25,
"column": 36
},
"end": {
"line": 25,
"column": 39
}
}
},
{
"type": "Identifier",
"name": "source",
"range": [
640,
646
],
"loc": {
"start": {
"line": 25,
"column": 41
},
"end": {
"line": 25,
"column": 47
}
}
},
{
"type": "Literal",
"value": 20,
"raw": "20",
"range": [
648,
650
],
"loc": {
"start": {
"line": 25,
"column": 49
},
"end": {
"line": 25,
"column": 51
}
}
}
],
"range": [
618,
651
],
"loc": {
"start": {
"line": 25,
"column": 19
},
"end": {
"line": 25,
"column": 52
}
}
},
"range": [
611,
651
],
"loc": {
"start": {
"line": 25,