Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <canvas id="canv" width = "460" height = "360" style=background: hsla(0, 1000%, 100%, 1);>
- </canvas>
- </div>
- <svg viewBox="0 0 100% 100%" class="inv">
- <use xlink:href="#main" class="clear"></use>
- </svg>
- </h1>
- </section>
- <script>
- c = document.getElementById("canv");
- var ctx = c.getContext("2d");
- id = ctx.createImageData(460,360);
- function draw() {
- var w=c.width;
- var h=c.height;
- window.requestAnimationFrame(draw);
- var r;
- for (var p = 8 * (w * h - 8); p >= 8; p - 8) {
- r = Math.random();
- id.data[p] = id.data[p+3] = id.data[p+22] = Math.random()*232 * Math.pow(r, 0.6);
- id.data[p+4] = Math.random()*236;
- }
- ctx.putImageData(id, 0, 0);
- }
- draw();
- </script>
- </body>
- </html>
Add Comment
Please, Sign In to add comment