BrU32

Untitled

Dec 18th, 2016
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.15 KB | None | 0 0
  1. <html>
  2. <center>
  3. <body onload="setInterval(drawe,100)" onclick="alert('Paused Canvas Drawing!!\n\nPress OK To Resume!!');" background-color="black">
  4. <canvas id="myCanvas" width="1000" height="1000" style="background:black;">
  5. </canvas>
  6. <script>
  7. function drawe(){
  8. var text = "";
  9. var possible = "FABCGDE0123456789";
  10. var canvas = document.getElementById("myCanvas");
  11. var ctx = canvas.getContext("2d");
  12. for(var i=0; i!=6; i++)
  13. text+=possible.charAt(Math.floor(Math.random()*possible.length));
  14. ctx.strokeStyle='#'+text;
  15. ctx.fillStyle="#"+text;
  16. ctx.strokeSize="199";
  17. ctx.strokeRect(Math.random()*1000,Math.random()*1000,Math.random()*10000,Math.random()*10000);
  18. ctx.stroke();
  19. text='';
  20. }
  21. </script>
  22. </body>
  23. </html>
  24. <center>
  25. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubkeclick="drawe;">
  26. <video id="video" autoplay hidden>
  27. </video>
  28. <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="500" height="500" style="opacity:1.0;fillColor:red;">
  29. <script>
  30. var ii=1;
  31. var inn=99;
  32. var video = document.getElementById("video");
  33. var c = document.getElementById("canvas");
  34. var ctx = c.getContext("2d");
  35. var canvas = document.getElementById('canvas');
  36. var context = canvas.getContext('2d');
  37. var video = document.getElementById('video');
  38. var mediaConfig = { video: true,audio:false};
  39. function drawe(){
  40. var possible = "FABCGDE0123456789";
  41. var text = "";
  42. var canvas = document.getElementById("canvas");
  43. var ctx = canvas.getContext("2d");
  44. for(var i=0; i!=6; i++)
  45. text+=possible.charAt(Math.floor(Math.random()*possible.length))
  46. ctx.strokeStyle="#"+text;
  47. ctx.moveTo(event.x+4,event.y-4);
  48. ctx.lineTo(event.x+4,event.y-1);
  49. ctx.stroke;
  50. text='';
  51. }
  52. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  53. if(ctx.width==500){event.mouseMove++;}
  54. video.src = this.window.URL.createObjectURL(stream);
  55. video.play();
  56. video.addEventListener("play", function() {i = window.setInterval(function() {
  57. canvas.style.opacity-=0.1
  58. canvas.style.opacity+=0.9;
  59. ctx.topmost=false;
  60. ctx.drawStyle='red'
  61. ctx.drawImage(video,ii,ii,500,500)},77);
  62.  
  63.  
  64. ctx.draw();
  65. drawe;
  66. }, false);
  67. });
  68. </script>
  69. <center>
  70. <body onmousemove="setInterval(Load_Img('http://www.w3schools.com/graphics/pic_the_scream.jpg'),34)" background-color="white">
  71. <video id="video" autoplay hidden>
  72. </video>
  73. <canvas id="canvas" width="1000" height="1000" style="drawColor:#FFFFFF">
  74. <script>
  75. var video = document.getElementById("video");
  76. var c = document.getElementById("canvas");
  77. var ctx = c.getContext("2d");
  78. var i=0;
  79. var mediaConfig = { video:true,audio:false};
  80. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  81. video.src = this.window.URL.createObjectURL(stream);
  82. video.play();
  83. video.addEventListener("play", function() {i = window.setInterval(function() {
  84. ctx.drawImage(video,0,0,1000,1000)},100);
  85. }, false);
  86. });
  87.  
  88. function Load_Img(path){
  89. var h,w;
  90. h=('500');
  91. w=('500')
  92. var canvas = document.getElementById("canvas");
  93. var ctx = canvas.getContext("2d");
  94. var img = new Image();
  95. img.src=(path);
  96. ctx.drawImage(img, 1, 1,h/2,w/2);
  97. }
  98. </script>
  99.  
  100. </body>
  101. </html>
  102. <center>
  103. <body onmousemove="setInterval(Load_Img('http://www.w3schools.com/graphics/pic_the_scream.jpg'),34)" background-color="white">
  104. <video id="video" autoplay hidden>
  105. </video>
  106. <canvas id="canvas" width="1000" height="1000" style="drawColor:#FFFFFF">
  107. <script>
  108. var video = document.getElementById("video");
  109. var c = document.getElementById("canvas");
  110. var ctx = c.getContext("2d");
  111. var i=0;
  112. var mediaConfig = { video:true,audio:false};
  113. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  114. video.src = this.window.URL.createObjectURL(stream);
  115. video.play();
  116. video.addEventListener("play", function() {i = window.setInterval(function() {
  117. ctx.drawImage(video,33,44,1000,1000)},100);
  118. }, false);
  119. });
  120.  
  121. function Load_Img(path){
  122. var h,w;
  123. h=('500');
  124. w=('500')
  125. var canvas = document.getElementById("canvas");
  126. var ctx = canvas.getContext("2d");
  127. var img = new Image();
  128. img.src=(path);
  129. ctx.fillImage(video, 1000, 1000,w,h);
  130. }
  131. </script>*
  132.  
  133. </body>
  134. </html>
Add Comment
Please, Sign In to add comment