Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <body bgcolor="#000000">
- <center>
- <canvas id="canvas" width="500" height="500" style="border:4px; background-color:black"></canvas>
- <script>
- var canvas = document.querySelector('#canvas').getContext('2d'),side = 0,
- size = 100,
- x = 100,
- y = 100;
- canvas.beginPath();
- canvas.moveTo(x + size * Math.cos(0), y + size * Math.sin(0));
- for (side; side < 14+1; side++) {
- canvas.lineTo(x+Math.floor(Math.random()*8) + size * Math.cos(side * 6 * Math.PI / 14), y + size * Math.sin(side * 8 * Math.PI / 14));
- }
- canvas.fillStyle = "#0FF333";
- canvas.fill();
- canvas.draw();
- </script>
- <canvas id="canvas" width="400" height="400"></canvas>
- <script>
- var canvas = document.querySelector('#canvas').getContext('2d'),side = 0,
- size = 100,
- x = 100,
- y = 100;
- canvas.beginPath();
- canvas.moveTo(x + size * Math.cos(0), y + size * Math.sin(0));
- for (side; side < 12+1; side++) {
- canvas.lineTo(x + size * Math.cos(side * 4 * Math.PI / 12), y + size * Math.sin(side * 4 * Math.PI / 12));
- }
- canvas.fillStyle = "#FFF333";
- canvas.stroke();
- </script>
- <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="1000" height="1000"style="opacity:1.0;fillColor:none;">
- <script>
- var ii=1;
- var inn=prompt("Enter #:");
- 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,event.y);
- ctx.lineTo(event.x+inn,event.y+inn);
- ctx.topmost=true;
- ctx.stroke();
- text='';
- var canvas = document.querySelector('#canvas').getContext('2d'),side = 0,
- size = 100,
- x = 100,
- y = 100;
- canvas.beginPath();
- canvas.moveTo(x + size * Math.cos(0), y + size * Math.sin(0));
- for (side; side < 12+1; side++) {
- canvas.lineTo(x + size * Math.cos(side * 4 * Math.PI / 12), y + size * Math.sin(side * 4 * Math.PI / 12));
- }
- canvas.fillStyle = "#FFF333";
- canvas.stroke();
- }
- 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++;
- ctx.topmost=false;
- ctx.drawImage(video,1,1,ii++,ii++)},inn);
- ctx.draw();
- drawe;
- }, false);
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement