Skip to content

Commit

Permalink
Three.js Earth
Browse files Browse the repository at this point in the history
  • Loading branch information
1j01 committed Nov 6, 2015
1 parent 36548bd commit 3b11e2c
Show file tree
Hide file tree
Showing 10 changed files with 1,443 additions and 281 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ MOS

Hack servers with 1337 sk111z and the Monochrome Operating System, virus free since 1990.

####
-----------------------------------------------------------------------------

Moss is green and MOS is green.
Binary file added earth-outlines.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/worldmap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
<body bgcoral="boulder-star" class="color">
<script src="mosgui.js"></script>
<script>onerror=gui.err;gui.overlay();</script>
<script src="ace.js"></script>
<script src="lib/ace.js"></script>
<script src="lib/three.min.js"></script>
<script src="lib/Detector.js"></script>
<script src="lib/TrackballControls.js"></script>
<script src="core-programs.js"></script>
<script src="map.js"></script>
<script src="monochromium.js"></script>
Expand Down
40 changes: 40 additions & 0 deletions lib/Detector.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* @author alteredq / http://alteredqualia.com/
* @author mr.doob / http://mrdoob.com/
*/

var Detector = {

canvas: !! window.CanvasRenderingContext2D,
webgl: ( function () { try { var canvas = document.createElement( 'canvas' ); return !! window.WebGLRenderingContext && ( canvas.getContext( 'webgl' ) || canvas.getContext( 'experimental-webgl' ) ); } catch( e ) { return false; } } )(),
workers: !! window.Worker,
fileapi: window.File && window.FileReader && window.FileList && window.Blob,

getWebGLErrorMessage: function () {

var element = document.createElement( 'div' );
element.className = 'webgl-error';

if ( !this.webgl ) {

element.innerHTML = window.WebGLRenderingContext ? [
'Your graphics card does not seem to support <a href="http://khronos.org/webgl/wiki/Getting_a_WebGL_Implementation">WebGL</a>.<br />',
'Find out how to get it <a href="http://get.webgl.org/">here</a>.'
].join( '\n' ) : [
'Your browser does not seem to support <a href="http://khronos.org/webgl/wiki/Getting_a_WebGL_Implementation">WebGL</a>.<br/>',
'Find out how to get it <a href="http://get.webgl.org/">here</a>.'
].join( '\n' );

}

return element;

},

addGetWebGLMessage: function (parent ) {

parent.appendChild( Detector.getWebGLErrorMessage() );

}

};
Loading

0 comments on commit 3b11e2c

Please sign in to comment.