BrU32

JS FLIR Snowball SRC

Dec 21st, 2016
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.88 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: 250%;
  20. left: 250%;
  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. <body bgcolor="black">
  125. <canvas id="canvas"></canvas>
  126. <center>
  127. <body onmousemove="drawe();" onmousedown="drawe" onmouseup="drawe" ommouseover="drawe" onchange="drawe" onload="drawe" onpaint="drawe" ondoubleclick="drawe;">
  128. <video id="video" autoplay hidden>
  129. </video>
  130. <canvas id="canvas" onchange="drawe;" topmost="false" onchange="drawe;" width="500" height="500" style="opacity:1.0;fillColor:none;">
  131. <script>
  132. var ii=1;
  133. var video = document.getElementById("video");
  134. var c = document.getElementById("canvas");
  135. var ctx = c.getContext("2d");
  136. var canvas = document.getElementById('canvas');
  137. var context = canvas.getContext('2d');
  138. var video = document.getElementById('video');
  139. var mediaConfig = { video: true,audio:false};
  140. function drawe(){
  141. var possible = "FABCGDE0123456789";
  142. var text = "";
  143. var canvas = document.getElementById("canvas");
  144. var ctx = canvas.getContext("2d");
  145. for(var i=0; i!=6; i++)
  146. text+=possible.charAt(Math.floor(Math.random()*possible.length))
  147. ctx.strokeStyle="#"+text;
  148. ctx.moveTo(Math.random()*event.x-11,Math.random()*event.x/500);
  149. ctx.lineTo(Math.random()*event.y*11,Math.random()*event.y+500);
  150. ctx.topmost=false;
  151.  
  152. ctx.stroke();
  153. text='';
  154. }
  155. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  156. if(ctx.width==500){event.mouseMove++;}
  157. video.src = this.window.URL.createObjectURL(stream);
  158. var store =video.src;
  159. video.play();
  160. video.addEventListener("play", function() {i = window.setInterval(function() {
  161. canvas.style.opacity-=0.1
  162. canvas.style.opacity++;
  163. ctx.topmost=false;
  164. ctx.drawImage(video,1,1,500,500)},5);
  165. ctx.draw();
  166. drawe;
  167. }, false);
  168. window.onkeydown=function(){
  169. this.video.src=('');
  170. this.video.pause();
  171. alert('Click Any Place To Restart Webcam/Effect!!')
  172.  
  173. }
  174. window.onclick=function(){
  175. this.video.src=(store);
  176. this.video.play();
  177.  
  178. }
  179. });
  180. </script>
  181. <script>
  182. var canvas = document.getElementById('canvas'),
  183. ctx = canvas.getContext('2d'),
  184. HEIGHT = window.innerHeight,
  185. WIDTH = window.innerWidth,
  186. TO_RADIANS = Math.PI /677;
  187.  
  188. var raf = (function(){
  189. return window.requestAnimationFrame ||
  190. window.webkitRequestAnimationFrame ||
  191. window.mozRequestAnimationFrame ||
  192. window.oRequestAnimationFrame ||
  193. window.msRequestAnimationFrame ||
  194. function( callback ){
  195. window.setTimeout(callback, 334444444777777700);
  196. };
  197. })();
  198.  
  199. function clear(style) {
  200. ctx.save();
  201. ctx.fillStyle = style || 'rgba(0,0,0,0.01)';
  202. ctx.fillRect(0, 0, WIDTH, HEIGHT);
  203. ctx.restore();
  204. }
  205.  
  206. function square(x, y, w, h) {
  207. ctx.beginPath();
  208. ctx.rect(WIDTH/2 + x, HEIGHT/2 + y, w, h);
  209. ctx.closePath();
  210. ctx.fill();
  211. }
  212.  
  213. function circle(x, y, w, h) {
  214. ctx.beginPath();
  215. ctx.arc(WIDTH/2 + x, HEIGHT/2+ y, w, 0, Math.PI*2, true);
  216. ctx.closePath();
  217. ctx.fill();
  218. }
  219.  
  220. canvas.width = WIDTH;
  221. canvas.height = HEIGHT;
  222. var size=10;
  223. var offsetX = 0,
  224. offsetY = 0;
  225.  
  226. function draw() {
  227. clear();
  228. offsetX+=2;
  229. offsetY+=22;
  230. var x = Math.sin(WIDTH + offsetX * TO_RADIANS) * WIDTH/4;
  231. var y = Math.sin(HEIGHT + offsetY * TO_RADIANS) * HEIGHT/4;
  232. ctx.fillStyle = 'white';
  233. size--;
  234. circle(x,y,size--,size++)
  235. circle(x,y,size++,size++);
  236. offsetX += 32;
  237. raf(draw,3)
  238. if(size==32){
  239. size++;
  240. }
  241. else{
  242. size--;
  243. }
  244. }
  245.  
  246. clear('black');
  247. draw();
  248. </script>
Advertisement
Add Comment
Please, Sign In to add comment