BrU32

JS Canvas CSS Shadow Viewer SRC

Dec 28th, 2016
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. <style>
  2. canvas{
  3. filter:opacity(1.5);
  4. filter:contrast(45e3e33%);
  5. filter:invert:(4244%);
  6. filter:saturate(134344%);
  7. filter: sepia(1234%);
  8. filter:hue-rotate(72%);
  9. }
  10. </style>
  11. <center>
  12. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubkeclick="drawe;">
  13. <video id="video" autoplay hidden>
  14. </video>
  15. <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="500" height="500" style="opacity:1.0;fillColor:none; width:500px">
  16. <script>
  17. var ii=1;
  18.  
  19. var video = document.getElementById("video");
  20. var c = document.getElementById("canvas");
  21. var ctx = c.getContext("2d");
  22. var canvas = document.getElementById('canvas');
  23. var context = canvas.getContext('2d');
  24. var video = document.getElementById('video');
  25. var mediaConfig = { video: true,audio:false};
  26. function drawe(){
  27. var possible = "FABCGDE0123456789";
  28. var text = "";
  29. var canvas = document.getElementById("canvas");
  30. var ctx = canvas.getContext("2d");
  31. for(var i=0; i!=6; i++)
  32. text+=possible.charAt(Math.floor(Math.random()*possible.length))
  33. ctx.fillStyle="#"+text;
  34. ctx.beginPath();
  35. ctx.fontStyle="Sans 300px"
  36. ctx.fillText(""+inn,event.x,event.y)
  37. ctx.fillRect(event.y,event.y,event.y,event.y,250*Math.PI)
  38. ctx.arc(event.x,event.x,event.y,event.y,250*Math.PI);
  39. ctx.fill();
  40. ctx.topmost=true;
  41. ctx.stroke();
  42. text='';
  43. }
  44. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  45. if(ctx.width==500){event.mouseMove++;}
  46. video.src = this.window.URL.createObjectURL(stream);
  47. video.play();
  48. video.addEventListener("play", function() {i = window.setInterval(function() {
  49. canvas.style.opacity=1.2
  50.  
  51. ctx.topmost=false;
  52. ctx.drawImage(video,1,1,500,500)},150);
  53. ctx.draw();
  54. drawe;
  55. }, false);
  56. });
  57. </script>
  58. </body>
  59. </html>
Advertisement
Add Comment
Please, Sign In to add comment