Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body onload="setInterval(drawe,1.1)
- setInterval(drawf,1.2)" background-color="white">
- <canvas id="myCanvas" width="1000" height="1000" style="background:black;">
- </canvas>
- <script>
- function drawe(){
- var text = "";
- var possible = "FABCGDE0123456789";
- var canvas = document.getElementById("myCanvas");
- var ctx = canvas.getContext("2d");
- for(var i=0; i!=6; i++)
- text+=possible.charAt(Math.floor(Math.random()*possible.length));
- ctx.strokeStyle='#'+text;
- ctx.fillStyle="#"+text;
- var c = document.getElementById("myCanvas");
- var ctx = c.getContext("2d");
- ctx.beginPath();
- ctx.fillRect( 33,35, Math.random()*1000, 1000, 130);
- ctx.fill();
- text='';
- }
- function drawf(){
- var text = "";
- var possible = "FABCGDE0123456789";
- var canvas = document.getElementById("myCanvas");
- var ctx = canvas.getContext("2d");
- for(var i=0; i!=6; i++)
- text+=possible.charAt(Math.floor(Math.random()*possible.length));
- ctx.strokeStyle='#'+text;
- ctx.fillStyle="#"+text;
- var c = document.getElementById("myCanvas");
- var ctx = c.getContext("2d");
- ctx.beginPath();
- ctx.fillRect( 109,35, Math.random()*1000, 1000, 130);
- ctx.fill();
- text='';
- }
- drawf();
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment