Last active
December 25, 2018 01:33
-
-
Save EliTheCoder/20fcceb4cb8c2a389cb1c3da3ef913c3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let person = 0; | |
let toggle = false; | |
window.addEventListener("keydown", (e)=>{ | |
if (e.keyCode == 219) { | |
if (person == 0) { | |
person = IIC.getConnectedIds.length-1; | |
} else { | |
person--; | |
} | |
} | |
if (e.keyCode == 221) { | |
if (person == IIC.getConnectedIds.length-1) { | |
person = 0; | |
} else { | |
person++; | |
} | |
} | |
}); | |
setInterval(()=>{ | |
toggle = !toggle; | |
let ux = IIC.getPosition(IIC.getConnectedIds()[person]).x; | |
let uy = IIC.getPosition(IIC.getConnectedIds()[person]).y; | |
IIC.setAngle(IIC.getAngle()+Math.PI*2/50); | |
IIC.setPosition(ux+50*Math.sin(IIC.getAngle()),uy+50*Math.cos(IIC.getAngle())); | |
IIC.makeWave(IIC.getPosition().x,IIC.getPosition().y); | |
if (toggle) IIC.makeGhost(IIC.getPosition().x,IIC.getPosition().y); | |
},100); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a script for isitchristmas.com. It makes it so your flag makes circles around a random flag. Use [ and ] to change which flag you're rotating.