SHOW:
|
|
- or go back to the newest paste.
| 1 | <canvas id="canvas" width='1000' height='1000'></canvas> | |
| 2 | ||
| 3 | <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubleclick="drawe;"> | |
| 4 | <video id="video" autoplay hidden> | |
| 5 | </video> | |
| 6 | <canvas id="canvas" width="1000" height="1000"style="opacity:0.0;fillColor:none;"> | |
| 7 | <script> | |
| 8 | var ii=10; | |
| 9 | ||
| 10 | var video = document.getElementById("video");
| |
| 11 | var c = document.getElementById("canvas");
| |
| 12 | var ctx = c.getContext("2d");
| |
| 13 | var canvas = document.getElementById('canvas');
| |
| 14 | var context = canvas.getContext('2d');
| |
| 15 | var video = document.getElementById('video');
| |
| 16 | var mediaConfig = { video: true,audio:true};
| |
| 17 | function drawe(){
| |
| 18 | } | |
| 19 | navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
| |
| 20 | video.src = this.window.URL.createObjectURL(stream); | |
| 21 | video.play(); | |
| 22 | ii+=50; | |
| 23 | video.addEventListener("play", function() {i = window.setInterval(function() {
| |
| 24 | canvas.style.opacity+=1.9; | |
| 25 | - | ctx.drawImage(video,ii*Math.floor(Math.random()*4),4,4,Math.random()*ii)},4); |
| 25 | + | ctx.drawImage(video,ii*Math.floor(Math.random()*453),44,7,Math.random()*414)},1); |
| 26 | ctx.draw(); | |
| 27 | drawe(); | |
| 28 | }, false); | |
| 29 | }); | |
| 30 | </script> | |
| 31 | </center> |