Advertisement
BrU32

JS Canvas Webcam Turn The Psy Trippy Fuzzy Page SRC V1

Feb 4th, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1.  
  2. <style>
  3. body{
  4. filter:saturate(880%);
  5. }
  6. </style>
  7. <center>
  8. <body onmousemove="setInterval(Load_Img('https://api.audiotool.com/track/dj_bru_-_acid_step/2/cover/128.jpg?showDefault=true'),33)" background-color="white">
  9. <video id="video" autoplay hidden>
  10. </video>
  11. <canvas id="canvas" width="5000" height="5000" style="drawColor:#FFFFFF">
  12. <script>
  13. var video = document.getElementById("video");
  14. var c = document.getElementById("canvas");
  15. var ctx = c.getContext("2d");
  16. var i=0;
  17. var mediaConfig = { video:true,audio:false};
  18. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  19. video.src = this.window.URL.createObjectURL(stream);
  20. video.play();
  21. video.addEventListener("play", function() {i = window.setInterval(function() {
  22. ctx.drawImage(video,Math.PI--,Math.PI++,window.innerHeight,window.innerWidth)},31);
  23. }, false);
  24. });
  25.  
  26. function Load_Img(path){
  27. var h,w;
  28. h=('5000');
  29. w=('5000')
  30. var canvas = document.getElementById("canvas");
  31. var ctx = canvas.getContext("2d");
  32. var img = new Image();
  33. img.src=(path)
  34. ctx.translate(1,-1)
  35. ctx.rotate(h/2,w*1)
  36. ctx.strokeImage(img,w,w,h,h);
  37.  
  38. }
  39. </script>
  40.  
  41. </body>
  42. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement