Created
March 8, 2015 19:17
-
-
Save kusano/7554ea7503dec3c53057 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
!function(){ | |
var R = 480; | |
document.querySelectorAll(".schedule_member_base_grn")[1].style.position="relative"; | |
var p=document.querySelectorAll(".user-grn"); | |
var n=p.length; | |
for (var i=0;i<n;i++) { | |
p[i].r = R*Math.sqrt(Math.random()); | |
p[i].th = 2*Math.PI*Math.random(); | |
p[i].style.position="absolute"; | |
} | |
function render(){ | |
var t=performance.now()/10000; | |
for (var i=0;i<n;i++) { | |
var th = 2*Math.PI*(i/n+t)+p[i].th; | |
p[i].style.top = p[i].r*Math.sin(th)+"px"; | |
p[i].style.left = R-p[i].r*Math.cos(th)+"px"; | |
} | |
requestAnimationFrame(render); | |
} | |
requestAnimationFrame(render); | |
}() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment