-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
672 lines (568 loc) · 20.9 KB
/
index.html
File metadata and controls
672 lines (568 loc) · 20.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta property="og:title" content="Bunga Bunga"/>
<meta property="og:description" content="3D animation of earthquakes in Iceland area"/>
<meta property="og:image" content="http://blitzkopf.github.io/bunga.png"/>
<title>Bunga Bunga</title>
<style type="text/css">
#bunga-bunga-canvas{
background-color:#000;
z-index:-1;
position: fixed;
margin: 0
}
#texture{
display: none;
}
#timer{
//background-color:#000;
color:#fff;
z-index:0;
position: relative;
width:500px;
height:30px;
margin: 0;
}
#controls{
color: #aaa;
position: absolute;
top:1px;
right: 0px;
margin: 0;
width: 310px;
//visibility: hidden;
display: none;
}
input.disp{
color:#777;
background-color:none;
width:4em;
//opacity: 0.5;
}
body{
margin: 0
}
a:link{
color:#fff;
}
a:visited{
color:#fff;
}
</style>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-54107862-1', 'auto');
ga('require', 'displayfeatures');
ga('send', 'pageview');
</script>
<script type="text/javascript" src="glMatrix-0.9.5.min.js"></script>
<script type="text/javascript" src="webgl-utils.js"></script>
<script type="text/javascript" src="jquery-2.1.1.js"></script>
<script type="text/javascript" src="quake.js"></script>
<script id="shader-fs" type="x-shader/x-fragment">
precision mediump float;
varying vec4 vColor;
varying vec3 vLightWeighting;
varying vec2 vTextureCoord;
uniform float uAlpha;
uniform sampler2D uSampler;
void main(void) {
vec4 textureColor = texture2D(uSampler, vTextureCoord);
gl_FragColor = vec4(vColor.rgb*textureColor.rgb*vLightWeighting,vColor.a);
}
</script>
<script id="shader-vs" type="x-shader/x-vertex">
attribute vec3 aVertexPosition;
attribute vec3 aVertexNormal;
attribute vec4 aVertexColor;
attribute vec2 aTextureCoord;
uniform vec4 uVertexColor;
uniform mat4 uMVMatrix;
uniform mat4 uPMatrix;
uniform mat3 uNMatrix;
uniform vec3 uAmbientColor;
uniform vec3 uLightingDirection;
uniform vec3 uDirectionalColor;
uniform bool uUseLighting;
varying vec4 vColor;
varying vec2 vTextureCoord;
varying vec3 vLightWeighting;
void main(void) {
gl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);
vTextureCoord = aTextureCoord;
vColor = uVertexColor;
if (!uUseLighting) {
vLightWeighting = vec3(1.0, 1.0, 1.0);
} else {
//vec3 transformedNormal = uNMatrix * aVertexPosition;
vec3 transformedNormal = uNMatrix * aVertexNormal;
float directionalLightWeighting = max(dot(transformedNormal, uLightingDirection), 0.0);
vLightWeighting = uAmbientColor + uDirectionalColor * directionalLightWeighting;
}
}
</script>
<script type="text/javascript" src="webgl-setup.js" ></script>
<script type="text/javascript">
var timeNow;
var timeLast;
var timeDelta;
var qParams;
//earthRadius = 6731.0;
var animParams = {
depthScale: 4.0,
animLength: 120, // seconds
finalSceneLength: 30, //seconds
minQuakeSize: 0 ,//
sizeMultiplier: .2, //
mapdepth: -10, // km
flybyRadius: 100, // degrees
flybyHeight: -1, //
lookAtDepth: 5,
rotationSpeed: -0.5,
dispVerifiedOnly: false,
greenGiant: false,
}
var animTime;
function mapSize(q,time) {
var hours = (time - q.time ) / ( 1000*60*60);
if(time >= qParams.lastTime) {
hours = 4;
}
if (q.size >= 3) {
return animParams.sizeMultiplier*q.size / Math.min(0.2+hours,1);
}
return animParams.sizeMultiplier*q.size / Math.min(0.5+hours,1);
}
function mapColor(q,time) {
var hours = (time - q.time ) / ( 1000*60*60);
if (q.size >= 3 && animParams.greenGiant ) {
return [0.0, 1.0, 0.0 ,1.0 ];
}
if ( hours <= 4.0 ) {
return [ 1.0, 0.0, 0.0, 1.0]; // "#f00";
} else if(hours <= 12) {
return [ 1.0, 0.4, 0.0, 1.0]; //"#f60";
}
else if(hours <= 24) {
return [ 1.0, 1.0, 0.0, 1.0]; // "#ff0";
}
else if(hours <= 36) {
return [ 0.2, 0.4, 0.8, 1.0]; // "#36c";
}
else if(hours <= 48)
{
return [ 0.0, 0.0, 0.4, 1.0]; // "#006";
} else {
return [ 0.4, 0.4, 0.4, 0.5];
}
}
function loadCanvas(dataURL,canvas) {
var canvas = document.getElementById(canvas);
var context = canvas.getContext('2d');
// load image from data url
var imageObj = new Image();
imageObj.onload = function() {
context.drawImage(this, 0, 0);
};
imageObj.src = dataURL;
}
var rIco = 0;
var szIco = 0;
var frame=0;
var quakes = [
];
var timeStart;
var flybyAngle = 0;
function drawScene(time) {
document.getElementById("timer").innerHTML=time;
/*animParams.mapdepth = document.getElementById("mapdepth").value;
document.getElementById("mapdepthdisp").value=animParams.mapdepth;
animParams.sizeMultiplier = document.getElementById("sizeMultiplier").value;
document.getElementById("sizeMultiplierDisp").value=animParams.sizeMultiplier;
animParams.minQuakeSize = document.getElementById("minQuakeSize").value;
document.getElementById("minQuakeDisp").value=animParams.minQuakeSize;
animParams.flybyRadius = document.getElementById("flybyRadius").value;
document.getElementById("flybyRadiusDisp").value=animParams.flybyRadius;
animParams.flybyHeight = document.getElementById("flybyHeight").value;
document.getElementById("flybyHeightDisp").value=animParams.flybyHeight;
animParams.rotationSpeed = document.getElementById("rotationSpeed").value;
document.getElementById("rotationSpeedDisp").value=animParams.rotationSpeed;
*/ animParams.dispVerifiedOnly = document.getElementById("dispVerifiedOnly").checked;
animParams.greenGiant = document.getElementById("greenGiant").checked;
gl.viewport(0, 0, gl.viewportWidth, gl.viewportHeight);
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
mat4.perspective(45, gl.viewportWidth / gl.viewportHeight, 0.1, 2000.0, pMatrix);
mat4.identity(mvMatrix);
flybyAngle = flybyAngle-(animParams.rotationSpeed * timeDelta/5000.0);
var lap=qParams.centerOfMass;
var lapZero=[];
var lapLength=vec3.length(lap);
var lapZero = vec3.scale(lap,earthRadius/lapLength,lapZero);
var lapNormalized=[];
lapNormalized = vec3.normalize(lap,lapNormalized);
var p1=[lap[1],-lap[0],lap[2]];
p1 = vec3.cross(p1,lap);
var p2=[lap[0],lap[1],lap[2]];
p2 = vec3.cross(p2,p1);
p1 = vec3.normalize(p1);
p2 = vec3.normalize(p2);
var cosm = -animParams.flybyRadius*Math.cos(flybyAngle);
var sinm = animParams.flybyRadius*Math.sin(flybyAngle);
p1=vec3.scale(p1,cosm);
p2=vec3.scale(p2,sinm);
lapNormalized = vec3.scale(lapNormalized,animParams.flybyHeight*animParams.depthScale);
var lfp = vec3.add(p1,vec3.add(p2,vec3.add(lapNormalized,lapZero)));
//mvMatrix = mat4.lookAt([lfp.x,lfp.y,lfp.z] ,lap,lap);
mvMatrix = mat4.lookAt(lfp ,lap,lap);
/*lap = {x:0,y:0,z:0};
lfp = {x:1,y:4,z:5};
mvMatrix = mat4.lookAt([lfp.x,lfp.y,lfp.z] ,[lap.x,lap.y,lap.z],[0,1,0]);*/
setLighting();
for ( i in quakes) {
q=quakes[i];
if(q.time < time && q.size >= animParams.minQuakeSize
&& ( !animParams.dispVerifiedOnly || q.verified)) {
drawSphere(q.pos,mapSize(q,time),mapColor(q,time));
}
}
drawEarthWF([0,0,0],earthRadius);
//drawMap(sphere2Cart(64.701,-17,earthRadius),3,4,5);
drawMap(-animParams.depthScale*animParams.mapdepth);
}
var lastTime = 0;
function animate() {
timeNow = new Date().getTime();
timeDelta = timeNow-timeLast;
//t1 = ((timeNow - timeStart) % ((animParams.animLength+animParams.finalSceneLength)*1000))/(animParams.animLength*1000);
t1 = (timeNow - timeStart) / ((animParams.animLength)*1000);
if( t1 > 1.0) {
t1 = 1.0;
}
//animTime = new Date(firstQuakeTime.getTime() + t1* duration);
animTime = new Date(qParams.firstTime.getTime() + t1* qParams.duration);
if(timeNow > timeStart + (animParams.animLength + animParams.finalSceneLength)*1000) {
//timeStart = new Date().getTime();
loadDataRasmuskr("http://isapi.rasmuskr.dk/api/earthquakes/?date=72-hoursago",1);
}
timeLast=timeNow;
}
function tick() {
requestAnimFrame(tick);
handleKeys();
if(!qParams )
return;
animate();
drawScene(animTime);
}
function rangeChange(inp){
animParams[inp.id] = inp.value;
document.getElementById(inp.id+"Disp").value=animParams[inp.id];
}
function initRange(field){
document.getElementById(field).value=animParams[field];
document.getElementById(field+"Disp").value=animParams[field];
}
function initCheck(field){
document.getElementById(field).checked=animParams[field];
}
function stepRange(field,dir){
var range = document.getElementById(field);
var val = range.value;
var step = range.step;
var min = range.min;
var max = range.max;
val = -1*(0-val-dir*step);// funny math to get numbers from strings
if(val<=max && val>=min) {
range.value=val;
rangeChange(range)
}
}
var currentlyPressedKeys = {};
function handleKeyDown(event) {
currentlyPressedKeys[event.keyCode] = new Date().getTime();
if (String.fromCharCode(event.keyCode) == "F") {
filter += 1;
if (filter == 3) {
filter = 0;
}
}
}
function handleKeyUp(event) {
delete currentlyPressedKeys[event.keyCode] ;
}
function handleKeys() {
const keyDelay=300;
var now=new Date().getTime();
if (currentlyPressedKeys[33] < now) {
// Page Up
stepRange('mapdepth',1);
currentlyPressedKeys[33]= now+keyDelay;
}
if (currentlyPressedKeys[34] < now) {
// Page Down
stepRange('mapdepth',-1);
currentlyPressedKeys[34]= now+keyDelay;
}
if (currentlyPressedKeys[37]< now) {
// Left cursor key
stepRange('rotationSpeed',-1);
currentlyPressedKeys[37]= now+keyDelay;
}
if (currentlyPressedKeys[39]< now) {
// Right cursor key
stepRange('rotationSpeed',1);
currentlyPressedKeys[39]= now+keyDelay;
}
if (currentlyPressedKeys[38]< now) {
// Up cursor key
stepRange('flybyRadius',-1);
currentlyPressedKeys[38]= now+keyDelay;
}
if (currentlyPressedKeys[40]< now) {
// Down cursor key
stepRange('flybyRadius',1);
currentlyPressedKeys[40]= now+keyDelay;
}
}
function loadDataRasmuskr(url,clean) {
$.getJSON(url,function(resp) {
if (clean==1)
quakes=[];
var lastTime;
var firstTime;
for (var i in resp.items) {
q=resp.items[i];
quakes.push(new Quake(q.lat,q.long,q.depth,new Date(q.date*1000),q.size,q.verified));
};
qParams=calculatePositions(quakes,animParams);
timeStart = new Date().getTime();
});
}
function loadDataVedurJS(url,clean) {
$.ajax( {
dataType:'script',
url:url,
success:
function(resp) {
if (clean==1)
quakes=[];
var lastTime;
var firstTime;
for (var i in qs) {
q=qs[i];
quakes.push(new Quake(q.lat,q.lon,q.depth,new Date(q.unixtime*1000),q.magnitude,q.verified));
};
qParams=calculatePositions(quakes,animParams);
timeStart = new Date().getTime();
},
error: function(a,b,c) {alert("error"+c);}
}
);
}
function processVedurTab(text,clean) {
if (clean==1)
quakes=[];
var lines = text.split(/(\r\n|\n\r*)\s*/);
for(var i=1 ; i< lines.length; i++) {
var data = lines[i].split(/\s+/);
if(data.length > 2) {
var year ;//,month,day, hour,min,sec;
year = data[1].substr(0,4);
month = data[1].substr(4,2);
day = data[1].substr(6,2);
hour = data[2].substr(0,2);
min = data[2].substr(2,2);
sec = data[2].substr(4);
quakes.push(new Quake(data[3],data[4],data[5],new Date(year,month-1,day,hour,min,sec),data[6]));
}
}
qParams=calculatePositions(quakes,animParams);
timeStart = new Date().getTime();
};
function handle_error(a,b,c) {
alert("error"+a);
}
function loadDataVedurTab(url,clean) {
$.ajax( {
dataType:'text',
url:url,
success:
function(resp) {
processVedurTab(resp,clean);
},
error: function(a,b,c) {handle_error(a,b,c)}
}
);
}
function resize_canvas(){
var canvas = document.getElementById("bunga-bunga-canvas");
var controls = document.getElementById("controls");
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
gl.viewportWidth = canvas.width;
gl.viewportHeight = canvas.height;
controls.style.left=window.innerWidth-320;
}
function hide_controls(){
$("#innerC").toggle(300);
}
function initGL(canvas) {
try {
gl = canvas.getContext("experimental-webgl");
} catch (e) {
}
if (!gl) {
alert("Could not initialise WebGL, sorry :-(");
}
}
function webGLStart() {
timeLast = new Date().getTime();
var canvas = document.getElementById("bunga-bunga-canvas");
initGL(canvas);
resize_canvas();
initShaders();
$("#controls").show(1000);
/*$.getJSON("http://apisis.rasmuskr.dk/earthquake/is",function(resp) {
quakes = resp.results;
lastQuakeTime = new Date(quakes[0].timestamp);
firstQuakeTime = new Date(quakes[quakes.length-1].timestamp);
duration = lastQuakeTime - firstQuakeTime;
for ( i in quakes ) {
quakes[i].date=new Date(quakes[i].timestamp);
quakes[i].pos=sphere2Cart(quakes[i].latitude, quakes[i].longitude, 6731.0 - 2.0*quakes[i].depth);
}
});*/
loadDataRasmuskr("http://isapi.rasmuskr.dk/api/earthquakes/?date=72-hoursago",1);
/* loadDataRasmuskr("http://isapi.rasmuskr.dk/api/earthquakes/?date=2014-08-19",0);
loadDataRasmuskr("http://isapi.rasmuskr.dk/api/earthquakes/?date=2014-08-20",0);
loadDataRasmuskr("http://isapi.rasmuskr.dk/api/earthquakes/?date=2014-08-21",0);
loadDataRasmuskr("http://isapi.rasmuskr.dk/api/earthquakes/?date=2014-08-22",0);
loadDataRasmuskr("http://isapi.rasmuskr.dk/api/earthquakes/?date=2014-08-23",0);
loadDataRasmuskr("http://isapi.rasmuskr.dk/api/earthquakes/?date=2014-08-24",0);
loadDataRasmuskr("http://isapi.rasmuskr.dk/api/earthquakes/?date=2014-08-25",0);
loadDataRasmuskr("http://isapi.rasmuskr.dk/api/earthquakes/?date=2014-08-26",0);
loadDataRasmuskr("http://isapi.rasmuskr.dk/api/earthquakes/?date=2014-08-27",0);
loadDataRasmuskr("http://isapi.rasmuskr.dk/api/earthquakes/?date=2014-08-28",0);
loadDataRasmuskr("http://isapi.rasmuskr.dk/api/earthquakes/?date=2014-08-29",0);
loadDataRasmuskr("http://isapi.rasmuskr.dk/api/earthquakes/?date=2014-08-30",0);
loadDataRasmuskr("http://isapi.rasmuskr.dk/api/earthquakes/?date=2014-08-31",0);
*/
//loadDataVedurJS("qv.js",1)
//loadDataVedurTab("http://hraun.vedur.is/ja/viku/2014/vika_34/listi",0);
/*loadDataVedurTab("listi.33",0);
loadDataVedurTab("listi.34",0);
loadDataVedurTab("listi.35",0);
loadDataVedurTab("listi.36",0);*/
initIcoSphereBuffer(2);
initCircleBuffer(360);
initMapBuffer();
initTexture();
loadMaps();
//drawTexture();
gl.clearColor(0.0, 0.0, 0.0, 1.0);
// gl.enable(gl.DEPTH_TEST);
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
//gl.blendFunc(gl.SRC_ALPHA, gl.ONE);
gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
gl.enable(gl.BLEND);
gl.enable(gl.DEPTH_TEST);
initRange("mapdepth");
initRange("sizeMultiplier");
initRange("minQuakeSize");
initRange("flybyRadius");
initRange("flybyHeight");
initRange("rotationSpeed");
initCheck("greenGiant");
document.onkeydown = handleKeyDown;
document.onkeyup = handleKeyUp;
tick();
}
function drawTexture() {
var canvas = document.getElementById('texture');
var ctx = canvas.getContext('2d');
/*ctx.fillStyle = "#ffff33"; // This determines the text colour, it can take a hex value or rgba value (e.g. rgba(255,0,0,0.5))
ctx.textAlign = "center"; // This determines the alignment of text, e.g. left, center, right
ctx.textBaseline = "middle"; // This determines the baseline of the text, e.g. top, middle, bottom
ctx.font = "12px monospace"; // This determines the size of the text and the font family used
ctx.fillText("Bunga", canvas.width/2, canvas.height/2);*/
var imageObj = new Image();
//imageObj.src = 'http://maps.google.com/maps/api/staticmap?sensor=false¢er=64.397,-17.0&zoom=8&size=512x512&maptype=terrain&format=png';
imageObj.src = 'map.png';
//imageObj.src = 'staticmap.png';
imageObj.onload = function(){
ctx.drawImage(imageObj, 0, 0);
mapTexture = gl.createTexture();
mapTexture.image = canvas;
handleLoadedTexture(mapTexture);
}
}
</script>
</head>
<body onload="webGLStart();" onresize="resize_canvas();">
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=1476390872632779&version=v2.0";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<canvas id="bunga-bunga-canvas" style="border: none;" width="800" height="800"></canvas>
<div id="timer" ></div>
<div id="controls" >
<a href="javascript:void(0)" onclick="hide_controls();"> hide/show controls</a>
<div id="innerC">
<h1>Bunga-Bunga</h1>
<h2> Earthquake the movie </h2>
<h3> Earthquakes in Iceland in 3D animation</h3>
<h2>Try out <a href="http://bunga-bunga.yngvi.com.s3-website-eu-west-1.amazonaws.com/"> version 2 WIP</a></h2>
Map overlay: <div id="maplist"></div>
Depth of map:(pgUp/pgDown)<br><input id="mapdepth" type="range" min="-40" max="2" step="1" value="-15"
onchange="rangeChange(this)" oninput="rangeChange(this)" >
<input type="text" id="mapdepthDisp" editable="false" class="disp"><br>
<!-- (The map is slightly offset, I'm trying to figure it out)<br> -->
Quake size multiplier: <br><input id="sizeMultiplier" type="range" min="0" max="4" step="0.1" value="0.5"
onchange="rangeChange(this)" oninput="rangeChange(this)">
<input type="text" id="sizeMultiplierDisp" editable="false" class="disp"></input> <br>
Minimum quake size: <br><input id="minQuakeSize" type="range" min="0" max="8" step="0.2" value="0"
onchange="rangeChange(this)" oninput="rangeChange(this)">
<input type="text" id="minQuakeSizeDisp" editable="false" class="disp"></input> <br>
<input id="dispVerifiedOnly" type="checkbox" > Only display verified earthquakes</input>
<br>
Flyby radius: (up/down) <br><input id="flybyRadius" type="range" min="1" max="400" step="1"
onchange="rangeChange(this)" oninput="rangeChange(this)">
<input type="text" id="flybyRadiusDisp" editable="false" class="disp"></input> <br>
Flyby height: <br><input id="flybyHeight" type="range" min="-20" max="100" step="0.5" value="20"
onchange="rangeChange(this)" oninput="rangeChange(this)">
<input type="text" id="flybyHeightDisp" editable="false" class="disp"></input> <br>
Rotation speed: (left/right) <br><input id="rotationSpeed" type="range" min="-3" max="3" step="0.1" value="-0.5"
onchange="rangeChange(this)" oninput="rangeChange(this)">
<input type="text" id="rotationSpeedDisp" editable="false" class="disp"></input> <br>
Earthquake age in hours:
<table><tr> <th style="background-color:#f00; color:white; width:50px">0-4</th>
<th style="background-color:#f60; color:white; width:50px">4-12</th>
<th style="background-color:#ff0; color:black; width:50px">12-24</th>
<th style="background-color:#36c; color:white; width:50px">24-36</th>
<th style="background-color:#006; color:white; width:50px">36-48</th>
<th style="background-color:#666; color:white; width:50px; opacity=0.4">48+</th>
</tr></table>
<table><tr> <th style="background-color:#0d0; color:white;">
<input id="greenGiant" type="checkbox" >Quakes larger than 3</input>
</th></tr></table>
The magnitude of each earthquake will detirmine the the size of the bubble.<br>
Also see the Icelandic Meteorological Institute <a href="https://www.vedur.is/skjalftar-og-eldgos/jardskjalftar/reykjanesskagi/"> Reykjanes page</a> <br>
<div class="fb-like" data-href="http://blitzkopf.github.io/" data-layout="button_count" data-action="like" data-show-faces="true" data-share="true"></div>
<div id="credits">
<p class="credit-list">Created by <a href="mailto:blitzkopf@gmail.com">Yngvi Þór</a> using WebGL, inspired by <a href="http://baering.github.io">3dBulge</a>
data provided by <a href="http://www.rasmuskr.dk" target="_blank">RasmusKr</a> and <a href="https://www.vedur.is/"> Veðurstofa Íslands </a>
</div>
</div>
</div>
<canvas id="texture" height="512" width="512"></canvas>
</body>
</html>