Skip to content

Instantly share code, notes, and snippets.

@mikkoh
Created February 4, 2016 17:07
Show Gist options
  • Save mikkoh/79fcf46f7c473fdc3cc7 to your computer and use it in GitHub Desktop.
Save mikkoh/79fcf46f7c473fdc3cc7 to your computer and use it in GitHub Desktop.
fire();
setInterval(fire, 300);
setInterval(unfire, 500);
function fire() {
$('#can').trigger(TRUMP.main.events[0]);
}
function unfire() {
$('#can').trigger(TRUMP.main.events[2]);
}
setInterval(function() {
var rad = this.rad = this.rad || 0;
var x = window.innerWidth * 0.5;
var y = window.innerHeight * 0.5;
var offX = Math.cos(rad) * 200;
var offY = Math.sin(rad) * 200;
TRUMP.trumpet.re(x + offX, y + offY);
TRUMP.counter.uNC();
this.rad += 0.1;
}, 33);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment