Advertisement
BrU32

JS Saturated Cube Webcam FX

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