Advertisement
BrU32

JS Canvas CMBO FX

Dec 19th, 2016
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.15 KB | None | 0 0
  1. <style>
  2. body{
  3. filter: grayscale(100%);
  4.  
  5. }
  6. </style>
  7. <body bgcolor="black" onload="setInterval(Gen,333)">
  8. <video id="video" autoplay hidden>
  9. </video>
  10. <canvas id="canvas" width="1000" height="1000"style="opacity:1.0;fillColor:black;">
  11. <script>
  12. var ii=1;
  13. var inn=0;
  14. var video = document.getElementById("video");
  15. var c = document.getElementById("canvas");
  16. var ctx = c.getContext("2d");
  17. var i=0;
  18. var canvas = document.getElementById('canvas');
  19. var context = canvas.getContext('2d');
  20. var video = document.getElementById('video');
  21. var mediaConfig = { video: true,audio:false};
  22. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  23. video.src = this.window.URL.createObjectURL(stream);
  24. video.play();
  25. video.addEventListener("play", function() {i = window.setInterval(function() {
  26. canvas.style.opacity-=1.0;
  27. canvas.style.opacity=+Math.random()*.9;
  28. ctx.drawImage(video,1,1,1000,1000)},inn);
  29. }, false);
  30. });
  31. function Gen()
  32. {
  33. var text = "";
  34. var possible = "FABCGDEG01234567";
  35. for(var i=0; i!=6; i++)
  36. text+=possible.charAt(Math.floor(Math.random()*possible.length));
  37. document.body.style.backgroundColor=(text);
  38.  
  39. }
  40. </script>
  41. <center>
  42. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubkeclick="drawe;">
  43. <video id="video" autoplay hidden>
  44. </video>
  45. <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="500" height="500" style="opacity:1.0;fillColor:none;">
  46. <script>
  47. var ii=1;
  48. var inn=244;
  49. var video = document.getElementById("video");
  50. var c = document.getElementById("canvas");
  51. var ctx = c.getContext("2d");
  52. var canvas = document.getElementById('canvas');
  53. var context = canvas.getContext('2d');
  54. var video = document.getElementById('video');
  55. var mediaConfig = { video: true,audio:false};
  56. function drawe(){
  57. var possible = "FABCGDE0123456789";
  58. var text = "";
  59. var canvas = document.getElementById("canvas");
  60. var ctx = canvas.getContext("2d");
  61. for(var i=0; i!=6; i++)
  62. text+=possible.charAt(Math.floor(Math.random()*possible.length))
  63. ctx.strokeStyle="#"+text;
  64. ctx.moveTo(event.x+4,event.y-4);
  65. ctx.lineTo(event.x+4,event.y-1);
  66. ctx.topmost=true;
  67. text='';
  68. }
  69. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  70. if(ctx.width==500){event.mouseMove++;}
  71. video.src = this.window.URL.createObjectURL(stream);
  72. video.play();
  73. video.addEventListener("play", function() {i = window.setInterval(function() {
  74. canvas.style.opacity-=0.1
  75. canvas.style.opacity+=0.3;
  76. ctx.topmost=false;
  77. ctx.drawStyle=''
  78. ctx.drawImage(video,Math.random()*-40,Math.random()*-40)},0.1);
  79. ctx.draw();
  80. drawe;
  81. }, false);
  82. });
  83. </script>
  84. <script>
  85. var context = new AudioContext();
  86. var lfo = context.createOscillator();
  87. lfo.frequency.value = 12;
  88. var hfo = context.createOscillator();
  89. hfo.frequency.value = 250;
  90. var modulationGain = context.createGain();
  91. modulationGain.gain.value = 122;
  92. lfo.connect(modulationGain);
  93. modulationGain.connect(hfo.detune);
  94. hfo.connect(context.destination);
  95. hfo.start(0);
  96. lfo.start(0);
  97. </script>
  98. //JS Canvas Webcam Bounce A Mulicolored Ball SRC:
  99.  
  100. <center>
  101. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubkeclick="drawe;">
  102. <video id="video" autoplay hidden>
  103. </video>
  104. <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="500" height="500" style="opacity:1.0;fillColor:none;">
  105. <script>
  106. var ii=1;
  107. var video = document.getElementById("video");
  108. var c = document.getElementById("canvas");
  109. var ctx = c.getContext("2d");
  110. var canvas = document.getElementById('canvas');
  111. var context = canvas.getContext('2d');
  112. var video = document.getElementById('video');
  113. var mediaConfig = { video: true,audio:false};
  114. function drawe(){
  115. var possible = "FABCGDE0123456789";
  116. var text = "";
  117. var canvas = document.getElementById("canvas");
  118. var ctx = canvas.getContext("2d");
  119. for(var i=0; i!=6; i++)
  120. text+=possible.charAt(Math.floor(Math.random()*possible.length))
  121. ctx.fillStyle="#"+text;
  122. ctx.beginPath();
  123. ctx.arc(event.x,event.x,event.y,event.y,250*Math.PI);
  124. ctx.fill();
  125. ctx.topmost=true;
  126. ctx.stroke();
  127. text='';
  128. }
  129. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  130. if(ctx.width==500){event.mouseMove++;}
  131. video.src = this.window.URL.createObjectURL(stream);
  132. video.play();
  133. video.addEventListener("play", function() {i = window.setInterval(function() {
  134. canvas.style.opacity-=0.1
  135. canvas.style.opacity++;
  136. ctx.topmost=false;
  137. ctx.drawImage(video,1,1,500,500)},150);
  138. ctx.draw();
  139. drawe;
  140. }, false);
  141. });
  142. </script>
  143.  
  144. //JS Webcam Canvas Rainbow Square W\ Custom Text:
  145. <style>
  146. body{
  147. filter: grayscale(100%);
  148.  
  149. }
  150. </style>
  151. <center>
  152. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubkeclick="drawe;">
  153. <video id="video" autoplay hidden>
  154. </video>
  155. <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="500" height="500" style="opacity:1.0;fillColor:none;">
  156. <script>
  157. var ii=1;
  158. var inn=prompt('Enter:')
  159. var video = document.getElementById("video");
  160. var c = document.getElementById("canvas");
  161. var ctx = c.getContext("2d");
  162. var canvas = document.getElementById('canvas');
  163. var context = canvas.getContext('2d');
  164. var video = document.getElementById('video');
  165. var mediaConfig = { video: true,audio:true};
  166. function drawe(){
  167. var possible = "FABCGDE0123456789";
  168. var text = "";
  169. var canvas = document.getElementById("canvas");
  170. var ctx = canvas.getContext("2d");
  171. for(var i=0; i!=6; i++)
  172. text+=possible.charAt(Math.floor(Math.random()*possible.length))
  173. ctx.fillStyle="#"+text;
  174. ctx.beginPath();
  175. ctx.fillText(""+inn,event.x,event.y)
  176. ctx.fillRect(event.x,event.x,event.y,event.y,250*Math.PI)
  177. //ctx.arc(event.x,event.x,event.y,event.y,250*Math.PI);
  178. ctx.fill();
  179. ctx.topmost=true;
  180. ctx.stroke();
  181. //text='';
  182. }
  183. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  184. if(ctx.width==500){event.mouseMove++;}
  185. video.src = this.window.URL.createObjectURL(stream);
  186. video.play();
  187. video.addEventListener("play", function() {i = window.setInterval(function() {
  188. canvas.style.opacity-=0.1
  189. canvas.style.opacity++;
  190. ctx.topmost=false;
  191. ctx.drawImage(video,1,1,500,500)},150);
  192. ctx.draw();
  193. drawe;
  194. }, false);
  195. });
  196. </script>
  197.  
  198. //JS Canvas Webcam Circle Rect And Text Rainbow FX SRC FINAL:
  199.  
  200. <center>
  201. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubkeclick="drawe;">
  202. <video id="video" autoplay hidden>
  203. </video>
  204. <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="500" height="500" style="opacity:1.0;fillColor:none; width:500px">
  205. <script>
  206. var ii=1;
  207. var inn=prompt('Enter:')
  208. var video = document.getElementById("video");
  209. var c = document.getElementById("canvas");
  210. var ctx = c.getContext("2d");
  211. var canvas = document.getElementById('canvas');
  212. var context = canvas.getContext('2d');
  213. var video = document.getElementById('video');
  214. var mediaConfig = { video: true,audio:true};
  215. function drawe(){
  216. var possible = "FABCGDE0123456789";
  217. var text = "";
  218. var canvas = document.getElementById("canvas");
  219. var ctx = canvas.getContext("2d");
  220. for(var i=0; i!=6; i++)
  221. text+=possible.charAt(Math.floor(Math.random()*possible.length))
  222. ctx.fillStyle="#"+text;
  223. ctx.beginPath();
  224. ctx.fontStyle="Sans 300px"
  225. ctx.fillText(""+inn,event.x,event.y)
  226. ctx.fillRect(event.y,event.y,event.y,event.y,250*Math.PI)
  227. ctx.arc(event.x,event.x,event.y,event.y,250*Math.PI);
  228. ctx.fill();
  229. ctx.topmost=true;
  230. ctx.stroke();
  231. //text='';
  232. }
  233. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  234. if(ctx.width==500){event.mouseMove++;}
  235. video.src = this.window.URL.createObjectURL(stream);
  236. video.play();
  237. video.addEventListener("play", function() {i = window.setInterval(function() {
  238. canvas.style.opacity-=0.1
  239. canvas.style.opacity++;
  240. ctx.topmost=false;
  241. ctx.drawImage(video,1,1,500,500)},150);
  242. ctx.draw();
  243. drawe;
  244. }, false);
  245. });
  246. </script>
  247. //JS Canvas Webcam Opacity Shapes SRC:
  248.  
  249. <center>
  250. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubkeclick="drawe;">
  251. <video id="video" autoplay hidden>
  252. </video>
  253. <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="500" height="500" style="opacity:1.0;fillColor:none;">
  254. <script>
  255. var ii=1;
  256. var inn=prompt('Enter:')
  257. var video = document.getElementById("video");
  258. var c = document.getElementById("canvas");
  259. var ctx = c.getContext("2d");
  260. var canvas = document.getElementById('canvas');
  261. var context = canvas.getContext('2d');
  262. var video = document.getElementById('video');
  263. var mediaConfig = { video: true,audio:false};
  264. function drawe(){
  265. var possible = "FABCGDE0123456789";
  266. var text = "";
  267. var canvas = document.getElementById("canvas");
  268. var ctx = canvas.getContext("2d");
  269. for(var i=0; i!=6; i++)
  270. text+=possible.charAt(Math.floor(Math.random()*possible.length))
  271. ctx.fillStyle="#"+text;
  272. ctx.beginPath();
  273. ctx.fillText(""+inn,event.x,event.y)
  274. ctx.fillRect(event.x,event.x,event.y,event.y,250*Math.PI)
  275. //ctx.arc(event.x,event.x,event.y,event.y,250*Math.PI);
  276. ctx.fill();
  277. ctx.topmost=true;
  278. ctx.stroke();
  279. //text='';
  280. }
  281. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  282. if(ctx.width==500){event.mouseMove++;}
  283. video.src = this.window.URL.createObjectURL(stream);
  284. video.play();
  285. video.addEventListener("play", function() {i = window.setInterval(function() {
  286. canvas.style.opacity-=0.1
  287. canvas.style.opacity++;
  288. ctx.topmost=false;
  289. ctx.drawImage(video,1,1,500,500)},150);
  290. ctx.draw();
  291. drawe;
  292. }, false);
  293. });
  294. </script>
  295.  
  296. //JS Canvas Webcam Circle Rect And Text Rainbow FX SRC FINAL:
  297.  
  298. <center>
  299. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubkeclick="drawe;">
  300. <video id="video" autoplay hidden>
  301. </video>
  302. <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="500" height="500" style="opacity:1.0;fillColor:none; width:500px">
  303. <script>
  304. var ii=1;
  305.  
  306. var video = document.getElementById("video");
  307. var c = document.getElementById("canvas");
  308. var ctx = c.getContext("2d");
  309. var canvas = document.getElementById('canvas');
  310. var context = canvas.getContext('2d');
  311. var video = document.getElementById('video');
  312. var mediaConfig = { video: true,audio:false};
  313. function drawe(){
  314. var possible = "FABCGDE0123456789";
  315. var text = "";
  316. var canvas = document.getElementById("canvas");
  317. var ctx = canvas.getContext("2d");
  318. for(var i=0; i!=6; i++)
  319. text+=possible.charAt(Math.floor(Math.random()*possible.length))
  320. ctx.fillStyle="#"+text;
  321. ctx.beginPath();
  322. ctx.fontStyle="Sans 300px"
  323. ctx.fillText(""+inn,event.x,event.y)
  324. ctx.fillRect(event.y,event.y,event.y,event.y,250*Math.PI)
  325. ctx.arc(event.x,event.x,event.y,event.y,250*Math.PI);
  326. ctx.fill();
  327. ctx.topmost=true;
  328. ctx.stroke();
  329. //text='';
  330. }
  331. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  332. if(ctx.width==500){event.mouseMove++;}
  333. video.src = this.window.URL.createObjectURL(stream);
  334. video.play();
  335. video.addEventListener("play", function() {i = window.setInterval(function() {
  336. canvas.style.opacity=0.2
  337.  
  338. ctx.topmost=false;
  339. ctx.drawImage(video,1,1,500,500)},150);
  340. ctx.draw();
  341. drawe;
  342. }, false);
  343. });
  344. </script>
  345. //JS Canvas FINAL FX:
  346.  
  347. <center>
  348. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubkeclick="drawe;">
  349. <video id="video" autoplay hidden>
  350. </video>
  351. <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="500" height="500" style="opacity:1.0;fillColor:none;">
  352. <script>
  353. var ii=1;
  354. var inn=prompt('Enter:')
  355. var video = document.getElementById("video");
  356. var c = document.getElementById("canvas");
  357. var ctx = c.getContext("2d");
  358. var canvas = document.getElementById('canvas');
  359. var context = canvas.getContext('2d');
  360. var video = document.getElementById('video');
  361. var mediaConfig = { video: true,audio:false};
  362. function drawe(){
  363. var possible = "FABCGDE0123456789";
  364. var text = "";
  365. var canvas = document.getElementById("canvas");
  366. var ctx = canvas.getContext("2d");
  367. for(var i=0; i!=6; i++)
  368. text+=possible.charAt(Math.floor(Math.random()*possible.length))
  369. ctx.fillStyle="#"+text;
  370. ctx.beginPath();
  371. ctx.fillText(""+inn,event.x,event.y)
  372. ctx.fillRect(event.x,event.x,event.y,event.y,250*Math.PI)
  373. //ctx.arc(event.x,event.x,event.y,event.y,250*Math.PI);
  374. ctx.fill();
  375. ctx.topmost=true;
  376. ctx.stroke();
  377. //text='';
  378. }
  379. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  380. if(ctx.width==500){event.mouseMove++;}
  381. video.src = this.window.URL.createObjectURL(stream);
  382. video.play();
  383. video.addEventListener("play", function() {i = window.setInterval(function() {
  384. canvas.style.opacity-=0.1
  385. canvas.style.opacity++;
  386. ctx.topmost=false;
  387. ctx.drawImage(video,1,1,500,500)},150);
  388. ctx.draw();
  389. drawe;
  390. }, false);
  391. });
  392. </script>
  393.  
  394. //JS Canvas Webcam Circle Rect And Text Rainbow FX SRC FINAL:
  395.  
  396. <center>
  397. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubkeclick="drawe;">
  398. <video id="video" autoplay hidden>
  399. </video>
  400. <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="500" height="500" style="opacity:1.0;fillColor:none; width:500px">
  401. <script>
  402. var ii=1;
  403.  
  404. var video = document.getElementById("video");
  405. var c = document.getElementById("canvas");
  406. var ctx = c.getContext("2d");
  407. var canvas = document.getElementById('canvas');
  408. var context = canvas.getContext('2d');
  409. var video = document.getElementById('video');
  410. var mediaConfig = { video: true,audio:false};
  411. function drawe(){
  412. var possible = "FABCGDE0123456789";
  413. var text = "";
  414. var canvas = document.getElementById("canvas");
  415. var ctx = canvas.getContext("2d");
  416. for(var i=0; i!=6; i++)
  417. text+=possible.charAt(Math.floor(Math.random()*possible.length))
  418. ctx.fillStyle="#"+text;
  419. ctx.beginPath();
  420. ctx.fontStyle="Sans 300px"
  421. ctx.fillText(""+inn,event.x,event.y)
  422. ctx.fillRect(event.y,event.y,event.y,event.y,250*Math.PI)
  423. ctx.arc(event.x,event.x,event.y,event.y,250*Math.PI);
  424. ctx.fill();
  425. ctx.topmost=true;
  426. ctx.stroke();
  427. //text='';
  428. }
  429. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  430. if(ctx.width==500){event.mouseMove++;}
  431. video.src = this.window.URL.createObjectURL(stream);
  432. video.play();
  433. video.addEventListener("play", function() {i = window.setInterval(function() {
  434. canvas.style.opacity=0.2
  435.  
  436. ctx.topmost=false;
  437. ctx.drawImage(video,1,1,500,500)},150);
  438. ctx.draw();
  439. drawe;
  440. }, false);
  441. });
  442. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement