Advertisement
BrU32

JS Canvas Webcam FLIR FULL Screen FX FINAL!!!!!

Dec 21st, 2016
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.91 KB | None | 0 0
  1. <style>
  2.  
  3. body{
  4. overflow: hidden;
  5. position:absolute;
  6. top:0;
  7. left:0;
  8. z-index:$indexbody;
  9. width: 100%;
  10. height: 100%;
  11. filter:invert(1);
  12. }
  13.  
  14. .container{
  15. position: absolute;
  16. z-index:$indexc1;
  17. width: random()*5vmax+1vmax;
  18. height: random()*15vmax+10vmax;
  19. top: 50%;
  20. left: 50%;
  21. animation: spin $timec1 cubic-bezier(1,floor(-4.332),sqrt(.4),7.33) infinite;
  22. mix-blend-mode:color;
  23. }
  24.  
  25. .container2{
  26. position: absolute;
  27. z-index:$indexc2;
  28. width: random()*5vmax+1vmax;
  29. height: random()*10vmax+1vmax;
  30. top: 50%;
  31. left: 50%;
  32. animation: spin2 atan(2)+$timec2 cubic-bezier(1,sqrt(4.33),.1,-3.33) infinite alternate;
  33. mix-blend-mode:color-dodge;
  34. filter:invert(1);
  35. }
  36.  
  37.  
  38. .container3{
  39. position: absolute;
  40. z-index:$indexc3;
  41. width: random()*15vmax+1vmax;
  42. height: random()*10vmax+5vmax;
  43. top: 50%;
  44. left: 50%;
  45. animation: spin sqrt(19)+$timec3 cubic-bezier(1,abs(3.33),.1,atan(-55.33)) infinite reverse;
  46. mix-blend-mode:exclusion;
  47. filter:contrast(1.2);
  48.  
  49. }
  50.  
  51. section {
  52. position: absolute;
  53. z-index:$indexs;
  54. mix-blend-mode:xor;
  55. left: 50%;
  56. bottom: 50%;
  57. width: $width;
  58. height: $height;
  59. clip-path: polygon(0% 0%, 100% 0%, 50% 100%);
  60. transform-origin: 50% 100%;
  61. background-image: url('http://www.lacor.info/gnrl/codepen/we/entrance_pixies_s_house.jpg');
  62. background-size: auto 333% ;
  63. animation: move-background $timebg infinite alternate cubic-bezier(1,abs(.33),.1,-1.33);
  64. }
  65.  
  66. @for $i from 1 through $sections {
  67. .sect-#{$i} {
  68. @if(($i % 2) == 0) {
  69. transform: translateX(-50%) rotateZ($i * $angle * 1deg) ;
  70. }
  71. @else {
  72. transform: translateX(-50%) rotateY(180deg) rotateZ($i * $angle * 1deg) scale(1.6,1.3);
  73. }
  74. }
  75. }
  76.  
  77. @keyframes spin {
  78. 0% {
  79. transform: translateX(-50%) translateY(-50%) rotateZ(0deg);
  80. }
  81. 100% {
  82. transform: translateX(-50%) translateY(-50%) rotateZ(-360deg) ;
  83. filter:brightness(1.5) ;
  84. }
  85. }
  86.  
  87. @keyframes spin2 {
  88. 0% {
  89. transform: translateX(-50%) translateY(-50%) rotateZ(cos(10)+1deg) ;
  90. }
  91. 100% {
  92. transform: translateX(-50%) translateY(-50%) rotateZ(-360deg) scale(1.2,1.2);
  93. filter:brightness(1.2) ;
  94. }
  95. }
  96.  
  97. @keyframes move-background {
  98. 0% {
  99. background-position: 100% 0%;
  100. }
  101.  
  102. 50%{
  103. background-size:96% auto;
  104. filter:hue-rotate(360deg) ;
  105. z-index:$indexcanv;
  106. }
  107. 100% {
  108. background-position: 0% 100%;
  109. }
  110. }
  111.  
  112. canvas {
  113. position:absolute;
  114. top:0;
  115. left:0;
  116. z-index:$indexcanv;
  117. mix-blend-mode:difference;
  118. background-blend-mode:hue;
  119. filter:invert(0) hue-rotate(20deg) contrast(1.0);
  120. width: 100%;
  121. height: 100%;
  122. }
  123. </style>
  124. <center>
  125. <body onmousemove="setInterval(Load_Img('http://www.w3schools.com/graphics/pic_the_scream.jpg'),34)" background-color="white">
  126. <video id="video" autoplay hidden>
  127. </video>
  128. <canvas id="canvas" width="500" height="500" style="drawColor:#FFFFFF">
  129. <script>
  130. var video = document.getElementById("video");
  131. var c = document.getElementById("canvas");
  132. var ctx = c.getContext("2d");
  133. var i=0;
  134. var mediaConfig = { video:true,audio:false};
  135. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  136. video.src = this.window.URL.createObjectURL(stream);
  137. video.play();
  138. video.addEventListener("play", function() {i = window.setInterval(function() {
  139. ctx.drawImage(video,0,0,500,500)},10);
  140. }, false);
  141. });
  142.  
  143. function Load_Img(path){
  144. var h,w;
  145. h=('500');
  146. w=('500')
  147. var canvas = document.getElementById("canvas");
  148. var ctx = canvas.getContext("2d");
  149. var img = new Image();
  150. img.src=(path);
  151. ctx.drawImage(img, 1, 1,h,w);
  152. }
  153. </script>
  154.  
  155. </body>
  156. </html>
  157. <body bgcolor="black">
  158. <video id="video" autoplay hidden>
  159. </video>
  160. <canvas id="canvas" width="500" height="500" style="border:0px solid">
  161. <script>
  162. var video = document.getElementById("video");
  163. var c = document.getElementById("canvas");
  164. var ctx = c.getContext("2d");
  165. var i=0;
  166. var canvas = document.getElementById('canvas');
  167. var context = canvas.getContext('2d');
  168. var video = document.getElementById('video');
  169. var mediaConfig = { video: true,audio:false};
  170. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  171. video.src = this.window.URL.createObjectURL(stream);
  172. video.play();
  173. video.addEventListener("play", function() {i = window.setInterval(function() {
  174. ctx.drawImage(video,1,1,500,500)},111);
  175. }, false);
  176. });
  177. </script>
  178. <body bgcolor="#000000" onload="setInterval('t();',333.3)"/>
  179. <center>
  180. <canvas id="canvas" width="500" height="500" style="border:4px; background-color:black"></canvas>
  181. <script>
  182. var i=44
  183. function t(){
  184. var canvas = document.querySelector('#canvas').getContext('2d'),side = 0,
  185. size = 100,
  186. x = 100,
  187. y = 100;
  188.  
  189. canvas.beginPath();
  190. canvas.moveTo(x + size * Math.cos(0), y + size * Math.sin(0));
  191.  
  192. for (side; side < 14+1; side++) {
  193. canvas.lineTo(x+Math.floor(Math.random()*4) + size * Math.cos(side * 6 * Math.PI / i++), y + size * Math.sin(side * 568 * Math.PI / 567));
  194. }
  195.  
  196. canvas.fillStyle = "#0FF333";
  197. canvas.fill();
  198.  
  199. }
  200. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement