Advertisement
BrU32

JS Webcam FLIR W\ Colorful Curtains!!

Feb 17th, 2017
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. <style>
  2. body{
  3.  
  4.  
  5. filter:invert(1236%);
  6.  
  7.  
  8. }
  9. </style>
  10. <center>
  11. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe">
  12. <video id="video" autoplay hidden>
  13. </video>
  14. <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="500" height="500" style="opacity:1.0;fillColor:none;">
  15. <script>
  16. var ii=1;
  17. var video = document.getElementById("video");
  18. var c = document.getElementById("canvas");
  19. var ctx = c.getContext("2d");
  20. var canvas = document.getElementById('canvas');
  21. var context = canvas.getContext('2d');
  22. var video = document.getElementById('video');
  23. var mediaConfig = { video: true,audio:0};
  24. function drawe(){
  25. var possible = "FABCGDE0123456789";
  26. var text = "";
  27. var canvas = document.getElementById("canvas");
  28. var ctx = canvas.getContext("2d");
  29. for(var i=0; i!=6; i++){
  30. text+=possible.charAt(Math.floor(Math.random()*possible.length))
  31. ctx.fillStyle="#"+text
  32. ctx.beginPath();
  33. ctx.fillRect(0,event.y,Math.random()*possible.length+1000,Math.random()*possible.length+1000)
  34. }
  35. ctx.fill();
  36. text='';
  37. }
  38. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  39. if(ctx.width==500){event.mouseMove++;}
  40. video.src = this.window.URL.createObjectURL(stream);
  41. video.play();
  42. video.addEventListener("play", function() {i = window.setInterval(function() {
  43.  
  44. ctx.topmost=false;
  45. ctx.drawImage(video,0,0,500,500)},222);
  46. ctx.fill();
  47.  
  48. }, false);
  49. });
  50. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement