Advertisement
BrU32

JS Cube Webcam SRC

Dec 22nd, 2016
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.00 KB | None | 0 0
  1. <center>
  2. <body bgcolor="black" onload="setInterval(Gen,333)">
  3. <video id="video" hidden>
  4. </video>
  5. <canvas id="canvas" width="500" height="500"style="opacity:1.0;fillColor:black;">
  6. <script>
  7. var ii=1;
  8. var inn=0;
  9. var video = document.getElementById("video");
  10. var c = document.getElementById("canvas");
  11. var ctx = c.getContext("2d");
  12. var i=0;
  13. var canvas = document.getElementById('canvas');
  14. var context = canvas.getContext('2d');
  15. var video = document.getElementById('video');
  16. var mediaConfig = { video: true,audio:false};
  17. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  18. video.src = this.window.URL.createObjectURL(stream);
  19. video.play();
  20. video.addEventListener("play", function() {i = window.setInterval(function() {
  21. canvas.style.opacity=1.0;
  22. canvas.style.opacity=+Math.random()*99;
  23. ctx.drawImage(video,1,1,500,50)},inn++);
  24.  
  25. }, false);
  26. });
  27. function Gen()
  28. {
  29. var text = "";
  30. var possible = ""
  31. for(var i=0; i!=6; i++)
  32. text+=possible.charAt(Math.floor(Math.random()*possible.length));
  33. document.body.style.backgroundColor=(text);
  34.  
  35. }
  36. </script>
  37. <center>
  38. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubkeclick="drawe;">
  39. <video id="video" autoplay hidden>
  40. </video>
  41. <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="500" height="500" style="opacity:1.0;fillColor:none;">
  42. <script>
  43. var ii=10;
  44. var inn=24;
  45. var video = document.getElementById("video");
  46. var c = document.getElementById("canvas");
  47. var ctx = c.getContext("2d");
  48. var canvas = document.getElementById('canvas');
  49. var context = canvas.getContext('2d');
  50. var video = document.getElementById('video');
  51. var mediaConfig = { video: true,audio:false};
  52. function drawe(){
  53. var possible = "FABCGDE0123456789";
  54. var text = "";
  55. var canvas = document.getElementById("canvas");
  56. var ctx = canvas.getContext("2d");
  57. for(var i=0; i!=6; i++)
  58. text+=possible.charAt(Math.floor(Math.random()*possible.length))
  59. ctx.strokeStyle="#"+text;
  60.  
  61. ctx.topmost=false;
  62.  
  63. }
  64. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  65. if(ctx.width==500){event.mouseMove++;}
  66. video.src = this.window.URL.createObjectURL(stream);
  67. video.play();
  68. video.addEventListener("play", function() {i = window.setInterval(function() {
  69.  
  70. canvas.style.opacity=1.0;
  71. ctx.topmost=false;
  72. ctx.drawStyle=''
  73. ctx.drawImage(video,Math.random()+80,Math.random())},0.1);
  74. ctx.drawImage(video,Math.random()-80,Math.random())},0.1);
  75. ctx.drawImage(video,Math.random()*800,Math.random()},0.1);
  76. ctx.drawImage(video,1,61,50,500)},inn);
  77. ctx.draw();
  78. drawe;
  79. }, false);
  80. });
  81. </script>
  82. <script>
  83. var context = new AudioContext();
  84.  
  85. </script>
  86.  
  87. <center>
  88. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubkeclick="drawe;">
  89. <video id="video" autoplay hidden>
  90. </video>
  91. <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="500" height="500" style="opacity:1.0;fillColor:none;">
  92. <script>
  93. var ii=1;
  94. var video = document.getElementById("video");
  95. var c = document.getElementById("canvas");
  96. var ctx = c.getContext("2d");
  97. var canvas = document.getElementById('canvas');
  98. var context = canvas.getContext('2d');
  99. var video = document.getElementById('video');
  100. var mediaConfig = { video: true,audio:false};
  101. function drawe(){
  102. var possible = "FABCGDE0123456789";
  103. var text = "";
  104. var canvas = document.getElementById("canvas");
  105. var ctx = canvas.getContext("2d");
  106. for(var i=0; i!=6; i++)
  107. text+=possible.charAt(Math.floor(Math.random()*possible.length))
  108. ctx.fillStyle="#"+text;
  109. ctx.beginPath();
  110.  
  111. ctx.fill();
  112. ctx.topmost=true;
  113. ctx.stroke();
  114. text='';
  115. }
  116. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  117. if(ctx.width==500){event.mouseMove++;}
  118. video.src = this.window.URL.createObjectURL(stream);
  119. video.play();
  120. video.addEventListener("play", function() {i = window.setInterval(function() {
  121.  
  122.  
  123. ctx.topmost=false;
  124. ctx.drawImage(video,1,1,500,500)},100);
  125. ctx.draw();
  126. drawe;
  127. }, false);
  128. });
  129. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement