Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <center>
- <body onload="setInterval(drawe,100)" onclick="alert('Paused Canvas Drawing!!\n\nPress OK To Resume!!');" background-color="black">
- <canvas id="myCanvas" width="1000" height="1000" style="background:black;">
- </canvas>
- <script>
- function drawe(){
- var text = "";
- var possible = "FABCGDE0123456789";
- var canvas = document.getElementById("myCanvas");
- var ctx = canvas.getContext("2d");
- for(var i=0; i!=6; i++)
- text+=possible.charAt(Math.floor(Math.random()*possible.length));
- ctx.strokeStyle='#'+text;
- ctx.fillStyle="#"+text;
- ctx.strokeSize="199";
- ctx.strokeRect(Math.random()*1000,Math.random()*1000,Math.random()*10000,Math.random()*10000);
- ctx.stroke();
- text='';
- }
- </script>
- </body>
- </html>
- <center>
- <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubkeclick="drawe;">
- <video id="video" autoplay hidden>
- </video>
- <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="500" height="500" style="opacity:1.0;fillColor:red;">
- <script>
- var ii=1;
- var inn=99;
- var video = document.getElementById("video");
- var c = document.getElementById("canvas");
- var ctx = c.getContext("2d");
- var canvas = document.getElementById('canvas');
- var context = canvas.getContext('2d');
- var video = document.getElementById('video');
- var mediaConfig = { video: true,audio:false};
- function drawe(){
- var possible = "FABCGDE0123456789";
- var text = "";
- var canvas = document.getElementById("canvas");
- var ctx = canvas.getContext("2d");
- for(var i=0; i!=6; i++)
- text+=possible.charAt(Math.floor(Math.random()*possible.length))
- ctx.strokeStyle="#"+text;
- ctx.moveTo(event.x+4,event.y-4);
- ctx.lineTo(event.x+4,event.y-1);
- ctx.stroke;
- text='';
- }
- navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
- if(ctx.width==500){event.mouseMove++;}
- video.src = this.window.URL.createObjectURL(stream);
- video.play();
- video.addEventListener("play", function() {i = window.setInterval(function() {
- canvas.style.opacity-=0.1
- canvas.style.opacity+=0.9;
- ctx.topmost=false;
- ctx.drawStyle='red'
- ctx.drawImage(video,ii,ii,500,500)},77);
- ctx.draw();
- drawe;
- }, false);
- });
- </script>
- <center>
- <body onmousemove="setInterval(Load_Img('http://www.w3schools.com/graphics/pic_the_scream.jpg'),34)" background-color="white">
- <video id="video" autoplay hidden>
- </video>
- <canvas id="canvas" width="1000" height="1000" style="drawColor:#FFFFFF">
- <script>
- var video = document.getElementById("video");
- var c = document.getElementById("canvas");
- var ctx = c.getContext("2d");
- var i=0;
- var mediaConfig = { video:true,audio:false};
- navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
- video.src = this.window.URL.createObjectURL(stream);
- video.play();
- video.addEventListener("play", function() {i = window.setInterval(function() {
- ctx.drawImage(video,0,0,1000,1000)},100);
- }, false);
- });
- function Load_Img(path){
- var h,w;
- h=('500');
- w=('500')
- var canvas = document.getElementById("canvas");
- var ctx = canvas.getContext("2d");
- var img = new Image();
- img.src=(path);
- ctx.drawImage(img, 1, 1,h/2,w/2);
- }
- </script>
- </body>
- </html>
- <center>
- <body onmousemove="setInterval(Load_Img('http://www.w3schools.com/graphics/pic_the_scream.jpg'),34)" background-color="white">
- <video id="video" autoplay hidden>
- </video>
- <canvas id="canvas" width="1000" height="1000" style="drawColor:#FFFFFF">
- <script>
- var video = document.getElementById("video");
- var c = document.getElementById("canvas");
- var ctx = c.getContext("2d");
- var i=0;
- var mediaConfig = { video:true,audio:false};
- navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
- video.src = this.window.URL.createObjectURL(stream);
- video.play();
- video.addEventListener("play", function() {i = window.setInterval(function() {
- ctx.drawImage(video,33,44,1000,1000)},100);
- }, false);
- });
- function Load_Img(path){
- var h,w;
- h=('500');
- w=('500')
- var canvas = document.getElementById("canvas");
- var ctx = canvas.getContext("2d");
- var img = new Image();
- img.src=(path);
- ctx.fillImage(video, 1000, 1000,w,h);
- }
- </script>*
- </body>
- </html>
Add Comment
Please, Sign In to add comment