Skip to content

Commit

Permalink
Merge remote-tracking branch 'emackey/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Jan 11, 2012
2 parents ea3c525 + 3b1ef79 commit a489e51
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 12 deletions.
8 changes: 4 additions & 4 deletions server/assets/gallery.html
Expand Up @@ -11,7 +11,7 @@
margin: 3em 4em;
color: #888;
}
a:not(h1){
a{
color: #aaa;
text-decoration: none;
border-bottom: 1px solid #444;
Expand All @@ -21,9 +21,9 @@
border-bottom: 1px solid #009DE9;
}

h1, h2{
h1, h1 a, h2{
color: #009DE9;
font: 28px Tahoma, Arial, Helvetica, sans-serif;;
font: 28px Tahoma, Arial, Helvetica, sans-serif;
font-weight: normal;
margin-bottom: 7px;
}
Expand Down Expand Up @@ -73,7 +73,7 @@
<body>

<div id="header">
<a href="http://glsl.heroku.com/"><h1>GLSL Sandbox</h1></a>
<h1><a href="http://glsl.heroku.com/">GLSL Sandbox</a></h1>
<a href="/e">Create new effect!</a> &nbsp;&nbsp;/&nbsp;
<a href="https://github.com/mrdoob/glsl-sandbox">github</a> &nbsp;&nbsp;/&nbsp;
gallery by <a href="http://twitter.com/thevaw">@thevaw</a> and <a href="http://twitter.com/feiss">@feiss</a> &nbsp;/&nbsp; editor by <a href="http://twitter.com/mrdoob">@mrdoob</a>, <a href="http://twitter.com/mrkishi">@mrkishi</a>, <a href="http://twitter.com/p01">@p01</a>, <a href="http://twitter.com/alteredq">@alteredq</a>, <a href="http://twitter.com/kusmabite">@kusmabite</a> and <a href="http://twitter.com/emackey">@emackey</a>
Expand Down
10 changes: 8 additions & 2 deletions server/assets/js/helpers.js
Expand Up @@ -11,8 +11,14 @@ function initialize_compressor(){
function initialize_helper() {
window.onhashchange = function() { load_url_code(); };

if ( !localStorage.getItem('glslsandbox_user') )
localStorage.setItem('glslsandbox_user', generate_user_id());
if (typeof localStorage !== 'undefined') {
if ( !localStorage.getItem('glslsandbox_user') ) {
localStorage.setItem('glslsandbox_user', generate_user_id());
}
} else {
// This fallback shouldn't be used by any browsers that are able to commit code.
localStorage = { getItem: function(x) { return 'invalid_user'; } };
}
}

function generate_user_id() {
Expand Down
25 changes: 19 additions & 6 deletions static/index.html
Expand Up @@ -125,19 +125,27 @@
window.requestAnimationFrame = ( function() {

return window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function ( callback, element ) {
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function ( callback, element ) {

window.setTimeout( callback, 1000 / 60 );
window.setTimeout( callback, 1000 / 60 );

};
};

} )();

}

// Get older browsers safely through init code, so users can read the
// message about how to download newer browsers.
if (!Date.now) {
Date.now = function() {
return +new Date();
};
}

// Greetings to Iq/RGBA! ;)

var quality = 2, quality_levels = [ 0.5, 1, 2, 4, 8 ];
Expand All @@ -151,6 +159,11 @@

function init() {

if (!document.addEventListener) {
document.location = 'http://get.webgl.org/';
return;
}

var effect = document.createElement( 'div' );
document.body.appendChild( effect );

Expand Down

0 comments on commit a489e51

Please sign in to comment.