BrU32

JS Webcam/Mic With CSS Flir Heat Sensitive Mode V1

Sep 15th, 2016
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.99 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. <video id="video" width="500" height="500" autoplay></video>
  125. <canvas id="canvas" width="500" height="500"></canvas>
  126. <script>
  127. var canvas = document.getElementById('canvas');
  128. var context = canvas.getContext('2d');
  129. var video = document.getElementById('video');
  130. var mediaConfig = { video: true,audio:true};
  131. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  132. video.src = window.URL.createObjectURL(stream);
  133. video.play();
  134. });
  135. </script>
Advertisement
Add Comment
Please, Sign In to add comment