Advertisement
BrU32

JS Canvas FLIR Rainbow Flash Side TO Side SRC

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