Skip to content

Instantly share code, notes, and snippets.

@kusano
Created March 7, 2015 15:23
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kusano/c14c93e60b5f181ab3d2 to your computer and use it in GitHub Desktop.
Save kusano/c14c93e60b5f181ab3d2 to your computer and use it in GitHub Desktop.
ガルーンの予定の参加者を円形に(回転版)
!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