Advertisement
BrU32

JS Canvas Webcam Flir With PIPX FX SRC V1

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