Advertisement
BrU32

JS Canvas Webcam 3D Saturated Cube In Motion SRC

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