BrU32

JS Webam Rockin Out Psychedelic Edition SRC FINAL V2

Nov 6th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.28 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="1000" height="1000"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,1000,1000)},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. //JS Canvas Webcam Bounce A Mulicolored Ball SRC:
  93.  
  94. <center>
  95. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubkeclick="drawe;">
  96. <video id="video" autoplay hidden>
  97. </video>
  98. <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="500" height="500" style="opacity:1.0;fillColor:none;">
  99. <script>
  100. var ii=1;
  101. var video = document.getElementById("video");
  102. var c = document.getElementById("canvas");
  103. var ctx = c.getContext("2d");
  104. var canvas = document.getElementById('canvas');
  105. var context = canvas.getContext('2d');
  106. var video = document.getElementById('video');
  107. var mediaConfig = { video: true,audio:false};
  108. function drawe(){
  109. var possible = "FABCGDE0123456789";
  110. var text = "";
  111. var canvas = document.getElementById("canvas");
  112. var ctx = canvas.getContext("2d");
  113. for(var i=0; i!=6; i++)
  114. text+=possible.charAt(Math.floor(Math.random()*possible.length))
  115. ctx.fillStyle="#"+text;
  116. ctx.beginPath();
  117. ctx.arc(event.x,event.x,event.y,event.y,250*Math.PI);
  118. ctx.fill();
  119. ctx.topmost=true;
  120. ctx.stroke();
  121. //text='';
  122. }
  123. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  124. if(ctx.width==500){event.mouseMove++;}
  125. video.src = this.window.URL.createObjectURL(stream);
  126. video.play();
  127. video.addEventListener("play", function() {i = window.setInterval(function() {
  128. canvas.style.opacity-=0.1
  129. canvas.style.opacity++;
  130. ctx.topmost=false;
  131. ctx.drawImage(video,1,1,500,500)},150);
  132. ctx.draw();
  133. drawe;
  134. }, false);
  135. });
  136. </script>
  137.  
  138. //JS Webcam Canvas Rainbow Square W\ Custom Text:
  139.  
  140. <style>
  141. body{
  142. overflow: visible;
  143. position:center;
  144. width: 100%;
  145. height: 100%;
  146. filter:invert(1.0);
  147. }
  148. .container{
  149. position: center;
  150. width: Math.random()*5vmax+1vmax;
  151. height: Math.random()*15vmax+10vmax;
  152. top: 50%;
  153. left: 50%;
  154. }
  155. </style>
  156. <center>
  157. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubkeclick="drawe;">
  158. <video id="video" autoplay hidden>
  159. </video>
  160. <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="500" height="500" style="opacity:1.0;fillColor:none;">
  161. <script>
  162. var ii=1;
  163. var inn=prompt('Enter:')
  164. var video = document.getElementById("video");
  165. var c = document.getElementById("canvas");
  166. var ctx = c.getContext("2d");
  167. var canvas = document.getElementById('canvas');
  168. var context = canvas.getContext('2d');
  169. var video = document.getElementById('video');
  170. var mediaConfig = { video: true,audio:true};
  171. function drawe(){
  172. var possible = "FABCGDE0123456789";
  173. var text = "";
  174. var canvas = document.getElementById("canvas");
  175. var ctx = canvas.getContext("2d");
  176. for(var i=0; i!=6; i++)
  177. text+=possible.charAt(Math.floor(Math.random()*possible.length))
  178. ctx.fillStyle="#"+text;
  179. ctx.beginPath();
  180. ctx.fillText(""+inn,event.x,event.y)
  181. ctx.fillRect(event.x,event.x,event.y,event.y,250*Math.PI)
  182. //ctx.arc(event.x,event.x,event.y,event.y,250*Math.PI);
  183. ctx.fill();
  184. ctx.topmost=true;
  185. ctx.stroke();
  186. //text='';
  187. }
  188. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  189. if(ctx.width==500){event.mouseMove++;}
  190. video.src = this.window.URL.createObjectURL(stream);
  191. video.play();
  192. video.addEventListener("play", function() {i = window.setInterval(function() {
  193. canvas.style.opacity-=0.1
  194. canvas.style.opacity++;
  195. ctx.topmost=false;
  196. ctx.drawImage(video,1,1,500,500)},150);
  197. ctx.draw();
  198. drawe;
  199. }, false);
  200. });
  201. </script>
  202.  
  203. //JS Canvas Webcam Circle Rect And Text Rainbow FX SRC FINAL:
  204.  
  205. <center>
  206. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubkeclick="drawe;">
  207. <video id="video" autoplay hidden>
  208. </video>
  209. <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="500" height="500" style="opacity:1.0;fillColor:none; width:500px">
  210. <script>
  211. var ii=1;
  212. var inn=prompt('Enter:')
  213. var video = document.getElementById("video");
  214. var c = document.getElementById("canvas");
  215. var ctx = c.getContext("2d");
  216. var canvas = document.getElementById('canvas');
  217. var context = canvas.getContext('2d');
  218. var video = document.getElementById('video');
  219. var mediaConfig = { video: true,audio:true};
  220. function drawe(){
  221. var possible = "FABCGDE0123456789";
  222. var text = "";
  223. var canvas = document.getElementById("canvas");
  224. var ctx = canvas.getContext("2d");
  225. for(var i=0; i!=6; i++)
  226. text+=possible.charAt(Math.floor(Math.random()*possible.length))
  227. ctx.fillStyle="#"+text;
  228. ctx.beginPath();
  229. ctx.fontStyle="Sans 300px"
  230. ctx.fillText(""+inn,event.x,event.y)
  231. ctx.fillRect(event.y,event.y,event.y,event.y,250*Math.PI)
  232. ctx.arc(event.x,event.x,event.y,event.y,250*Math.PI);
  233. ctx.fill();
  234. ctx.topmost=true;
  235. ctx.stroke();
  236. //text='';
  237. }
  238. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  239. if(ctx.width==500){event.mouseMove++;}
  240. video.src = this.window.URL.createObjectURL(stream);
  241. video.play();
  242. video.addEventListener("play", function() {i = window.setInterval(function() {
  243. canvas.style.opacity-=0.1
  244. canvas.style.opacity++;
  245. ctx.topmost=false;
  246. ctx.drawImage(video,1,1,500,500)},150);
  247. ctx.draw();
  248. drawe;
  249. }, false);
  250. });
  251. </script>
  252. //JS Canvas Webcam Opacity Shapes SRC:
  253.  
  254. <center>
  255. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubkeclick="drawe;">
  256. <video id="video" autoplay hidden>
  257. </video>
  258. <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="500" height="500" style="opacity:1.0;fillColor:none;">
  259. <script>
  260. var ii=1;
  261. var inn=prompt('Enter:')
  262. var video = document.getElementById("video");
  263. var c = document.getElementById("canvas");
  264. var ctx = c.getContext("2d");
  265. var canvas = document.getElementById('canvas');
  266. var context = canvas.getContext('2d');
  267. var video = document.getElementById('video');
  268. var mediaConfig = { video: true,audio:false};
  269. function drawe(){
  270. var possible = "FABCGDE0123456789";
  271. var text = "";
  272. var canvas = document.getElementById("canvas");
  273. var ctx = canvas.getContext("2d");
  274. for(var i=0; i!=6; i++)
  275. text+=possible.charAt(Math.floor(Math.random()*possible.length))
  276. ctx.fillStyle="#"+text;
  277. ctx.beginPath();
  278. ctx.fillText(""+inn,event.x,event.y)
  279. ctx.fillRect(event.x,event.x,event.y,event.y,250*Math.PI)
  280. //ctx.arc(event.x,event.x,event.y,event.y,250*Math.PI);
  281. ctx.fill();
  282. ctx.topmost=true;
  283. ctx.stroke();
  284. //text='';
  285. }
  286. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  287. if(ctx.width==500){event.mouseMove++;}
  288. video.src = this.window.URL.createObjectURL(stream);
  289. video.play();
  290. video.addEventListener("play", function() {i = window.setInterval(function() {
  291. canvas.style.opacity-=0.1
  292. canvas.style.opacity++;
  293. ctx.topmost=false;
  294. ctx.drawImage(video,1,1,500,500)},150);
  295. ctx.draw();
  296. drawe;
  297. }, false);
  298. });
  299. </script>
  300.  
  301. //JS Canvas Webcam Circle Rect And Text Rainbow FX SRC FINAL:
  302.  
  303. <center>
  304. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubkeclick="drawe;">
  305. <video id="video" autoplay hidden>
  306. </video>
  307. <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="500" height="500" style="opacity:1.0;fillColor:none; width:500px">
  308. <script>
  309. var ii=1;
  310.  
  311. var video = document.getElementById("video");
  312. var c = document.getElementById("canvas");
  313. var ctx = c.getContext("2d");
  314. var canvas = document.getElementById('canvas');
  315. var context = canvas.getContext('2d');
  316. var video = document.getElementById('video');
  317. var mediaConfig = { video: true,audio:false};
  318. function drawe(){
  319. var possible = "FABCGDE0123456789";
  320. var text = "";
  321. var canvas = document.getElementById("canvas");
  322. var ctx = canvas.getContext("2d");
  323. for(var i=0; i!=6; i++)
  324. text+=possible.charAt(Math.floor(Math.random()*possible.length))
  325. ctx.fillStyle="#"+text;
  326. ctx.beginPath();
  327. ctx.fontStyle="Sans 300px"
  328. ctx.fillText(""+inn,event.x,event.y)
  329. ctx.fillRect(event.y,event.y,event.y,event.y,250*Math.PI)
  330. ctx.arc(event.x,event.x,event.y,event.y,250*Math.PI);
  331. ctx.fill();
  332. ctx.topmost=true;
  333. ctx.stroke();
  334. //text='';
  335. }
  336. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  337. if(ctx.width==500){event.mouseMove++;}
  338. video.src = this.window.URL.createObjectURL(stream);
  339. video.play();
  340. video.addEventListener("play", function() {i = window.setInterval(function() {
  341. canvas.style.opacity=0.2
  342.  
  343. ctx.topmost=false;
  344. ctx.drawImage(video,1,1,500,500)},150);
  345. ctx.draw();
  346. drawe;
  347. }, false);
  348. });
  349. </script>
  350. //JS Canvas FINAL FX:
  351.  
  352. <center>
  353. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubkeclick="drawe;">
  354. <video id="video" autoplay hidden>
  355. </video>
  356. <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="500" height="500" style="opacity:1.0;fillColor:none;">
  357. <script>
  358. var ii=1;
  359. var inn=prompt('Enter:')
  360. var video = document.getElementById("video");
  361. var c = document.getElementById("canvas");
  362. var ctx = c.getContext("2d");
  363. var canvas = document.getElementById('canvas');
  364. var context = canvas.getContext('2d');
  365. var video = document.getElementById('video');
  366. var mediaConfig = { video: true,audio:false};
  367. function drawe(){
  368. var possible = "FABCGDE0123456789";
  369. var text = "";
  370. var canvas = document.getElementById("canvas");
  371. var ctx = canvas.getContext("2d");
  372. for(var i=0; i!=6; i++)
  373. text+=possible.charAt(Math.floor(Math.random()*possible.length))
  374. ctx.fillStyle="#"+text;
  375. ctx.beginPath();
  376. ctx.fillText(""+inn,event.x,event.y)
  377. ctx.fillRect(event.x,event.x,event.y,event.y,250*Math.PI)
  378. //ctx.arc(event.x,event.x,event.y,event.y,250*Math.PI);
  379. ctx.fill();
  380. ctx.topmost=true;
  381. ctx.stroke();
  382. //text='';
  383. }
  384. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  385. if(ctx.width==500){event.mouseMove++;}
  386. video.src = this.window.URL.createObjectURL(stream);
  387. video.play();
  388. video.addEventListener("play", function() {i = window.setInterval(function() {
  389. canvas.style.opacity-=0.1
  390. canvas.style.opacity++;
  391. ctx.topmost=false;
  392. ctx.drawImage(video,1,1,500,500)},150);
  393. ctx.draw();
  394. drawe;
  395. }, false);
  396. });
  397. </script>
  398.  
  399. //JS Canvas Webcam Circle Rect And Text Rainbow FX SRC FINAL:
  400.  
  401. <center>
  402. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubkeclick="drawe;">
  403. <video id="video" autoplay hidden>
  404. </video>
  405. <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="500" height="500" style="opacity:1.0;fillColor:none; width:500px">
  406. <script>
  407. var ii=1;
  408.  
  409. var video = document.getElementById("video");
  410. var c = document.getElementById("canvas");
  411. var ctx = c.getContext("2d");
  412. var canvas = document.getElementById('canvas');
  413. var context = canvas.getContext('2d');
  414. var video = document.getElementById('video');
  415. var mediaConfig = { video: true,audio:false};
  416. function drawe(){
  417. var possible = "FABCGDE0123456789";
  418. var text = "";
  419. var canvas = document.getElementById("canvas");
  420. var ctx = canvas.getContext("2d");
  421. for(var i=0; i!=6; i++)
  422. text+=possible.charAt(Math.floor(Math.random()*possible.length))
  423. ctx.fillStyle="#"+text;
  424. ctx.beginPath();
  425. ctx.fontStyle="Sans 300px"
  426. ctx.fillText(""+inn,event.x,event.y)
  427. ctx.fillRect(event.y,event.y,event.y,event.y,250*Math.PI)
  428. ctx.arc(event.x,event.x,event.y,event.y,250*Math.PI);
  429. ctx.fill();
  430. ctx.topmost=true;
  431. ctx.stroke();
  432. //text='';
  433. }
  434. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  435. if(ctx.width==500){event.mouseMove++;}
  436. video.src = this.window.URL.createObjectURL(stream);
  437. video.play();
  438. video.addEventListener("play", function() {i = window.setInterval(function() {
  439. canvas.style.opacity=0.2
  440.  
  441. ctx.topmost=false;
  442. ctx.drawImage(video,1,1,500,500)},150);
  443. ctx.draw();
  444. drawe;
  445. }, false);
  446. });
  447. </script>
Add Comment
Please, Sign In to add comment