Advertisement
BrU32

JS Canvas Shakey Webcam Trip SRC

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