Advertisement
BrU32

JS Canvas Saturated Webcam 3D Cube In Motion SRC V2

Jan 12th, 2017
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. <style>
  2. canvas{
  3. filter:invert(433%);
  4.  
  5. }
  6. </style>
  7. </html>
  8. <center>
  9. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubkeclick="drawe;">
  10. <video id="video" autoplay hidden>
  11. </video>
  12. <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="1000" height="1000" style="opacity:1.0;fillColor:none; width:500px">
  13. <script>
  14. var i=22
  15. var video = document.getElementById("video");
  16. var canvas = document.getElementById("canvas");
  17. var ctx = canvas.getContext("2d");
  18. var video = document.getElementById('video');
  19. var mediaConfig = { video: true,audio:true};
  20. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  21. video.src = this.window.URL.createObjectURL(stream);
  22. video.play();
  23. video.addEventListener("play", function() {i = window.setInterval(function() {
  24. ctx.drawImage(video,i,i,500,500)},100);
  25. ctx.draw();
  26. },true);
  27. });
  28. </script>
  29. </body>
  30. </html>>
  31. </body>
  32. </html>
  33. <style>
  34. canvas{
  35. filter:invert(433%);
  36. filter:saturate(1114%);
  37.  
  38. }
  39. </style>
  40. <center>
  41. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubkeclick="drawe;">
  42. <video id="video" autoplay hidden>
  43. </video>
  44. <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="1000" height="1000" style="opacity:1.0;fillColor:none; width:500px">
  45. <script>
  46. var i=22
  47. var video = document.getElementById("video");
  48. var canvas = document.getElementById("canvas");
  49. var ctx = canvas.getContext("2d");
  50. var video = document.getElementById('video');
  51. var mediaConfig = { video: true,audio:true};
  52. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  53. video.src = this.window.URL.createObjectURL(stream);
  54. video.play();
  55. video.addEventListener("play", function() {i = window.setInterval(function() {
  56. ctx.drawImage(video,i++,i,500,50)},100);
  57. ctx.draw();
  58. },true);
  59. });
  60. </script>
  61. </body>
  62. </html>>
  63. </body>
  64. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement