Skip to content

Instantly share code, notes, and snippets.

@kenbellows
Created April 5, 2016 16:46
Show Gist options
  • Save kenbellows/b6299754ab2ee5b7c044381454405b0a to your computer and use it in GitHub Desktop.
Save kenbellows/b6299754ab2ee5b7c044381454405b0a to your computer and use it in GitHub Desktop.
Drop some pretty crazy stuff in your browser console
var cycles = 5, range = 60,
shadows = [], y = 0;
for (var i=0; i<cycles*360; i+=5.4) {
var x = Math.floor(Math.sin(i/3 * (Math.PI/180)) * range),
color = 'hsl('+(i%360).toFixed(1)+', 100%, 50%)';
shadows.push([x+'px', (y++)+'px', color].join(' '));
}
var css = "font-size: 40px; text-shadow: "+shadows.join(',');
console.log('%cDidn\'t know you could do this, did you?'+(new Array(Math.ceil(cycles*1.5))).fill('\n').join(''), css)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment