Advertisement
BrU32

JS Canvas Webcam FLIR 1000x1000 SRC FINAL!!!!!

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