Created
March 7, 2015 15:23
-
-
Save kusano/c14c93e60b5f181ab3d2 to your computer and use it in GitHub Desktop.
ガルーンの予定の参加者を円形に(回転版)
This file contains 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(){ | |
function render(){ | |
var t=performance.now()/1000; | |
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++){ | |
var s=p[i].style; | |
s.position="absolute"; | |
s.top=48*Math.sin(2*Math.PI*(i/n+t))+"px"; | |
s.left=48-48*Math.cos(2*Math.PI*(i/n+t))+"px"; | |
} | |
requestAnimationFrame(render); | |
} | |
requestAnimationFrame(render); | |
}() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment