BrU32

JS Canvas Webcam Heavy Makeup FX SRC

Jan 5th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. <style>
  2. canvas{
  3. filter:invert(4433%);
  4. filter:saturate(2114%);
  5.  
  6. }
  7. </style>
  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. canvas.style.opacity=Math.random()*1.0;
  25. ctx.drawImage(video,i,i,1000,1000)},Math.random()*10.000000000000000000000000000000000000000000000000000000000000000000000001);
  26. ctx.draw();
  27. },true);
  28. });
  29. </script>
  30. </body>
  31. </html>
Add Comment
Please, Sign In to add comment