Skip to content

Instantly share code, notes, and snippets.

@SyntaxColoring
Last active January 1, 2016 10:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SyntaxColoring/8130437 to your computer and use it in GitHub Desktop.
Save SyntaxColoring/8130437 to your computer and use it in GitHub Desktop.
Trace a sine wave with your flag on isitchristmas.com.
var theta = 0.0;
window.setInterval(function() {
theta += Math.PI/10;
if (theta >= Math.PI*4) theta = 0.0;
var event = {clientX: theta*100, clientY: (Math.sin(theta)+1.5)*100, button: 2};
me.angle = Math.cos(theta)*180/Math.PI;
setRotate(me.flag, me.angle);
emit('scroll', {id: me.id, angle: me.angle});
document.onmousemove(event);
document.onmousedown(event);
}, 200);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment