Advertisement
BrU32

JS Bad Ass Webcam FX SRC FINAL!!!!!

Jan 14th, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.05 KB | None | 0 0
  1. <style>
  2. canvas{
  3. filter:invert(44233%);
  4. filter:saturate(000%);
  5. }
  6. </style>
  7. <center>
  8. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubkeclick="drawe;">
  9. <video id="video" autoplay hidden>
  10. </video>
  11. <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="1000" height="1000" style="opacity:1.0;fillColor:none; width:500px">
  12. <script>
  13. var i=22
  14. var video = document.getElementById("video");
  15. var canvas = document.getElementById("canvas");
  16. var ctx = canvas.getContext("2d");
  17. var video = document.getElementById('video');
  18. var mediaConfig = { video: true,audio:true};
  19. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  20. video.src = this.window.URL.createObjectURL(stream);
  21. video.play();
  22. video.addEventListener("play", function() {i = window.setInterval(function() {
  23. ctx.drawImage(video,1,1,1000,1000)},Math.random()*10.000000000000000000000000000000000000000000000000000000000000000000000001);
  24. ctx.draw();
  25. },true);
  26. });
  27. </script>
  28. </body>
  29. </html>
  30. <center>
  31. <body bgcolor="#000000" onload="setInterval('t();',1333)"/>
  32. <canvas id="canvas" width="5000" height="5000" style="border:4px; background-color:black"></canvas>
  33. <script>
  34. function t(){
  35. var canvas = document.querySelector('#canvas').getContext('2d'),side = 0,
  36. size = 100,
  37. x = 100,
  38. y = 100;
  39.  
  40. canvas.beginPath();
  41. canvas.moveTo(x + size * Math.cos(0), y + size * Math.sin(0));
  42.  
  43. for (side; side < 14+1; side++) {
  44. canvas.lineTo(x+Math.floor(Math.random()*8) + Math.random()*Math.sqrt(3339) * Math.cos(side * 6 * Math.PI / 14), y + size * Math.sin(side * 8 * Math.PI / 14));
  45. }
  46.  
  47. canvas.fillStyle = "#0FF333";
  48. canvas.fill();
  49. canvas.draw();
  50. }
  51. </script>
  52. <body bgcolor="white"/>
  53. <canvas id="canvas"></canvas>
  54.  
  55. <script>
  56. var canvas = document.getElementById('canvas'),
  57. ctx = canvas.getContext('2d'),
  58. HEIGHT = window.innerHeight,
  59. WIDTH = window.innerWidth,
  60. TO_RADIANS = Math.PI / 360;
  61.  
  62. var raf = (function(){
  63. return window.requestAnimationFrame ||
  64. window.webkitRequestAnimationFrame ||
  65. window.mozRequestAnimationFrame ||
  66. window.oRequestAnimationFrame ||
  67. window.msRequestAnimationFrame ||
  68. function( callback ){
  69. window.setTimeout(callback, 1000);
  70. };
  71. })();
  72.  
  73. function clear(style) {
  74. ctx.save();
  75. ctx.fillStyle = style || 'rgba(233,34,0,0.01)';
  76. ctx.fillRect(0, 0, WIDTH, HEIGHT);
  77. ctx.restore();
  78. }
  79.  
  80. function square(x, y, w, h) {
  81. ctx.beginPath();
  82. ctx.rect(WIDTH/2 + x, HEIGHT/2 + y, w, h);
  83. ctx.closePath();
  84. ctx.fill();
  85. }
  86.  
  87. function circle(x, y, w, h) {
  88. ctx.beginPath();
  89. ctx.arc(WIDTH/4 - x, HEIGHT/2+ y, w, 0, Math.PI*2, true);
  90. ctx.closePath();
  91. ctx.fill();
  92. }
  93.  
  94. canvas.width = WIDTH;
  95. canvas.height = HEIGHT;
  96.  
  97. var offsetX = 10,
  98. offsetY = 0;
  99.  
  100. function draw() {
  101. clear();
  102.  
  103. offsetX+= 2;
  104. offsetY++;
  105. var x = Math.sin(WIDTH - offsetX * TO_RADIANS) * WIDTH/4;
  106. var y = Math.sin(HEIGHT - offsetY * TO_RADIANS) * HEIGHT/4;
  107.  
  108. ctx.fillStyle = 'red';
  109. circle(x, y, 24, 20);
  110. offsetX += 2;
  111.  
  112.  
  113. raf(draw, 16);
  114. }
  115.  
  116. clear('black');
  117. draw();
  118. </script>
  119. <style>
  120. canvas{
  121. filter:invert(433%);
  122.  
  123. }
  124. </style>
  125. </html>
  126. <center>
  127. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubkeclick="drawe;">
  128. <video id="video" autoplay hidden>
  129. </video>
  130. <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="1000" height="1000" style="opacity:1.0;fillColor:none; width:500px">
  131. <script>
  132. var i=22
  133. var video = document.getElementById("video");
  134. var canvas = document.getElementById("canvas");
  135. var ctx = canvas.getContext("2d");
  136. var video = document.getElementById('video');
  137. var mediaConfig = { video: true,audio:true};
  138. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  139. video.src = this.window.URL.createObjectURL(stream);
  140. video.play();
  141. video.addEventListener("play", function() {i = window.setInterval(function() {
  142. ctx.drawImage(video,i,i,500,500)},100);
  143. ctx.draw();
  144. },true);
  145. });
  146. </script>
  147. </body>
  148. </html>>
  149. </body>
  150. </html>
  151. <style>
  152. canvas{
  153. filter:invert(433%);
  154. filter:saturate(1114%);
  155.  
  156. }
  157. </style>
  158. <center>
  159. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubkeclick="drawe;">
  160. <video id="video" autoplay hidden>
  161. </video>
  162. <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="1000" height="1000" style="opacity:1.0;fillColor:none; width:500px">
  163. <script>
  164. var i=22
  165. var video = document.getElementById("video");
  166. var canvas = document.getElementById("canvas");
  167. var ctx = canvas.getContext("2d");
  168. var video = document.getElementById('video');
  169. var mediaConfig = { video: true,audio:true};
  170. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  171. video.src = this.window.URL.createObjectURL(stream);
  172. video.play();
  173. video.addEventListener("play", function() {i = window.setInterval(function() {
  174. ctx.drawImage(video,i++,i,500,50)},100);
  175. ctx.draw();
  176. },true);
  177. });
  178. </script>
  179. </body>
  180. </html>>
  181. </body>
  182. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement