Advertisement
BrU32

JS Canvas Webcam FLIR With Flar FX SRC FINAL!!!!!

Feb 24th, 2017
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. <style>
  2. body{
  3.  
  4. filter:invert(180%);
  5.  
  6.  
  7.  
  8.  
  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;border:1px">
  16. <script>
  17. var ii=1;
  18. var video = document.getElementById("video");
  19. var c = document.getElementById("canvas");
  20. var ctx = c.getContext("2d");
  21. var canvas = document.getElementById('canvas');
  22. var context = canvas.getContext('2d');
  23. var video = document.getElementById('video');
  24. var mediaConfig = { video: true,audio:false};
  25. function drawe(){
  26. var possible = "FABCGDE0123456789";
  27. var text = "";
  28. var canvas = document.getElementById("canvas");
  29. var ctx = canvas.getContext("2d");
  30. for(var i=0; i!=6; i++)
  31. text+=possible.charAt(Math.floor(Math.random()*possible.length))
  32. ctx.fillStyle="#"+text
  33. ctx.beginPath();
  34.  
  35. ctx.moveTo(Math.random()*event.x,Math.random()*event.y);
  36. ctx.lineTo(Math.random()*event.y,Math.random()*event.y);
  37. ctx.arc(event.x,event.y,23,23,33);
  38.  
  39.  
  40. ctx.fill();
  41. text='';
  42. }
  43. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  44. if(ctx.width==500){event.mouseMove++;}
  45. video.src = this.window.URL.createObjectURL(stream);
  46. video.play();
  47. video.addEventListener("play", function() {i = window.setInterval(function() {
  48.  
  49. ctx.topmost=false;
  50. ctx.drawImage(video,1,1,500,500)},200);
  51. ctx.fill();
  52. drawe;
  53. drawe;
  54. }, false);
  55. });
  56. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement