Created
November 3, 2015 22:31
-
-
Save anonymous/0c719611e6a97926af90 to your computer and use it in GitHub Desktop.
Revisions
-
There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ Party ----- Rainbows! Forked from [Anders K](http://codepen.io/and3k5/)'s Pen [Party](http://codepen.io/and3k5/pen/PPKjwg/). A [Pen](http://codepen.io/thehalvo/pen/wKxNwE) by [Jordan Halvorsen](http://codepen.io/thehalvo) on [CodePen](http://codepen.io/). [License](http://codepen.io/thehalvo/pen/wKxNwE/license). 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ <canvas width="400" height="400"></canvas> 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ var canvas = document.querySelector("canvas"); var ctx = canvas.getContext("2d"); ctx.font = "900 80px sans-serif"; ctx.lineWidth=2; var str = "FTW"; var strwidth = ctx.measureText(str).width; var width=canvas.width; var c=0; var color=0; var img; (function a() { img=ctx.getImageData(0,0,width,width); ctx.putImageData(img,0,10); ctx.save(); ctx.translate((width/2),width/2); ctx.rotate(Math.PI*(c++/200)); ctx.fillStyle='hsla('+(color=color+4%360)+', 100%, 50%, 1)'; ctx.fillText("FTW",-(strwidth/2),20); ctx.strokeText("FTW",-(strwidth/2),20); ctx.restore(); requestAnimationFrame(a); })(); 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ html,body,canvas { padding:0px; margin:0px; overflow:hidden; height:100%; } body { background: #ffffff); } canvas { display:block; margin:auto; width:100vmin; height:100vmin; }