Advertisement
BrU32

JS Webam Rockin Out Psychedelic Edition SRC FINAL

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