Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 33.74 KB | None | 0 0
  1. <html>
  2. <head><meta http-equiv="Content-Type" content="text/html; charset=ANSI">
  3. </head>
  4. <body>
  5. <p>Chinchilla</p>
  6. </body>
  7. </html>
  8. <title></title>
  9.  
  10. <html><script src="js/main.js"></script><script src="app.css"></script>
  11. <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  12. <link href="favicon.ico" rel="icon" type="image/ico" /><script src="title.js"></script>
  13. <style type="text/css">p {
  14. font-size: 40px;
  15. margin: 0;
  16. letter-spacing: 3px;
  17. }
  18. </style>
  19. </head>
  20. <body oncontextmenu="return false;" onselectstart="return false;" unselectable="on">
  21. <p><canvas height="974" width="715"></canvas></p>
  22. </body>
  23. </html>
  24. <title>E W</title>
  25. <p>
  26. <audio autoplay="" id="audio"><source src="music.ogg" type="audio/ogg" /> <source src="music.mp3" type="audio/mpeg" /> Your browser does not support the audio element.</audio>
  27. <style type="text/css">
  28. </style>
  29. <script type="text/javascript">
  30. window.onkeydown = function(evt) {
  31. if (evt.keyCode == 123 || evt.keyCode == 85 || evt.keyCode == 17 || evt.keyCode == 16 || evt.keyCode == 74 || evt.keyCode == 116 || evt.keyCode == 73) return false;
  32. };
  33.  
  34. window.onkeypress = function(evt) {
  35. if (evt.keyCode == 123 || evt.keyCode == 85 || evt.keyCode == 17 || evt.keyCode == 16 || evt.keyCode == 74 || evt.keyCode == 116 || evt.keyCode == 73) return false;
  36. };
  37.  
  38. function disableF5(e) {
  39. if ((e.which || e.keyCode) == 116) e.preventDefault();
  40. };
  41. $(document).on("keydown", disableF5);
  42. </script>
  43. <style type="text/css">body {
  44. -webkit-user-select: none;
  45. -moz-user-select: none;
  46. -ms-user-select: none;
  47. -o-user-select: none;
  48. user-select: none;
  49. }
  50.  
  51. a {
  52. color: inherit;
  53. text-decoration: none !important;
  54. }
  55.  
  56. .center {
  57. font-family: 'Montserrat', sans-serif;
  58. position: fixed;
  59. /* or absolute */
  60. top: 50%;
  61. left: 50%;
  62. /* bring your own prefixes */
  63. transform: translate(-50%, -50%);
  64. animation: fadein 3s;
  65. -moz-animation: fadein 3s;
  66. /* Firefox */
  67. -webkit-animation: fadein 3s;
  68. /* Safari and Chrome */
  69. -o-animation: fadein 3s;
  70. /* Opera */
  71. }
  72.  
  73. â&#128;
  74. &#139;
  75. @keyframes fadein {
  76. from {
  77. opacity: 0;
  78. }
  79. to {
  80. opacity: 1;
  81. }
  82. }
  83.  
  84. @-moz-keyframes fadein {
  85. /* Firefox */
  86. from {
  87. opacity: 0;
  88. }
  89. to {
  90. opacity: 1;
  91. }
  92. }
  93.  
  94. @-webkit-keyframes fadein {
  95. /* Safari and Chrome */
  96. from {
  97. opacity: 0;
  98. }
  99. to {
  100. opacity: 1;
  101. }
  102. }
  103.  
  104. @-o-keyframes fadein {
  105. /* Opera */
  106. from {
  107. opacity: 0;
  108. }
  109. to {
  110. opacity: 1;
  111. }
  112. }
  113. </style>
  114. </p>
  115.  
  116. <div class="center">
  117. <center>
  118. <p><a href="https://ewnet.work">E W N E T W O R K</a></p>
  119.  
  120. <div style="letter-spacing: 3;font-size: 15;">
  121. <div id="center">
  122. <div class="animated fadeInDown"></div>
  123.  
  124. <div class="animated fadeInUp">
  125. <pre>
  126.  
  127. </pre>
  128.  
  129. <pre align="middle">
  130. <a href="https://ewnet.work/forums" target="_blank">Forums /</a> <a href="https://discord.gg/QdjpCew" target="_blank">Discord</a></pre>
  131.  
  132. <center>
  133. <div class="clockStyle" id="clockDisplay">09:44:37 PM</div>
  134. <script>
  135. function renderTime() {
  136. var currentTime = new Date();
  137. var diem = "AM";
  138. var h = currentTime.getHours();
  139. var m = currentTime.getMinutes();
  140. var s = currentTime.getSeconds();
  141. setTimeout('renderTime()', 1000);
  142. if (h == 0) {
  143. h = 12;
  144. } else if (h > 12) {
  145. h = h - 12;
  146. diem = "PM";
  147. }
  148. if (h < 10) {
  149. h = "0" + h;
  150. }
  151. if (m < 10) {
  152. m = "0" + m;
  153. }
  154. if (s < 10) {
  155. s = "0" + s;
  156. }
  157. var myClock = document.getElementById('clockDisplay');
  158. myClock.textContent = h + ":" + m + ":" + s + " " + diem;
  159. myClock.innerText = h + ":" + m + ":" + s + " " + diem;
  160. }
  161. renderTime();
  162. </script></center>
  163. </div>
  164. </div>
  165. </div>
  166. <br />
  167. <style type="text/css">html,
  168. body {
  169. overflow: hidden;
  170. color: #fefeff;
  171. }
  172.  
  173. body {
  174. margin: 0;
  175. position: absolute;
  176. width: 100%;
  177. height: 100%;
  178. }
  179.  
  180. canvas {
  181. width: 100%;
  182. height: 100%;
  183. z-index: -999999999;
  184. }
  185.  
  186. [class^="letter"] {
  187. -webkit-transition: opacity 3s ease;
  188. -moz-transition: opacity 3s ease;
  189. transition: opacity 3s ease;
  190. }
  191.  
  192. .letter-0 {
  193. transition-delay: 0.2s;
  194. }
  195.  
  196. .letter-1 {
  197. transition-delay: 0.4s;
  198. }
  199.  
  200. .letter-2 {
  201. transition-delay: 0.6s;
  202. }
  203.  
  204. .letter-3 {
  205. transition-delay: 0.8s;
  206. }
  207.  
  208. .letter-4 {
  209. transition-delay: 1.0s;
  210. }
  211.  
  212. .letter-5 {
  213. transition-delay: 1.2s;
  214. }
  215.  
  216. .letter-6 {
  217. transition-delay: 1.4s;
  218. }
  219.  
  220. .letter-7 {
  221. transition-delay: 1.6s;
  222. }
  223.  
  224. .letter-8 {
  225. transition-delay: 1.8s;
  226. }
  227.  
  228. .letter-9 {
  229. transition-delay: 2.0s;
  230. }
  231.  
  232. .letter-10 {
  233. transition-delay: 2.2s;
  234. }
  235.  
  236. .letter-11 {
  237. transition-delay: 2.4s;
  238. }
  239.  
  240. .letter-12 {
  241. transition-delay: 2.6s;
  242. }
  243.  
  244. .letter-13 {
  245. transition-delay: 2.8s;
  246. }
  247.  
  248. .letter-14 {
  249. transition-delay: 3.0s;
  250. }
  251.  
  252. .letter-15 {
  253. transition-delay: 3.2s;
  254. }
  255. </style>
  256. <script>
  257. 'use strict';
  258.  
  259. var canvas = document.getElementsByTagName('canvas')[0];
  260.  
  261. canvas.width = canvas.clientWidth;
  262. canvas.height = canvas.clientHeight;
  263.  
  264. var config = {
  265. TEXTURE_DOWNSAMPLE: 1,
  266. DENSITY_DISSIPATION: 0.98,
  267. VELOCITY_DISSIPATION: 0.99,
  268. PRESSURE_DISSIPATION: 0.8,
  269. PRESSURE_ITERATIONS: 25,
  270. CURL: 30,
  271. SPLAT_RADIUS: 0.005
  272. };
  273.  
  274. var pointers = [];
  275. var splatStack = [];
  276.  
  277. var _getWebGLContext = getWebGLContext(canvas);
  278. var gl = _getWebGLContext.gl;
  279. var ext = _getWebGLContext.ext;
  280. var support_linear_float = _getWebGLContext.support_linear_float;
  281.  
  282. function getWebGLContext(canvas) {
  283.  
  284. var params = {
  285. alpha: false,
  286. depth: false,
  287. stencil: false,
  288. antialias: false
  289. };
  290.  
  291. var gl = canvas.getContext('webgl2', params);
  292.  
  293. var isWebGL2 = !!gl;
  294.  
  295. if (!isWebGL2) gl = canvas.getContext('webgl', params) || canvas.getContext('experimental-webgl', params);
  296.  
  297. var halfFloat = gl.getExtension('OES_texture_half_float');
  298. var support_linear_float = gl.getExtension('OES_texture_half_float_linear');
  299.  
  300. if (isWebGL2) {
  301. gl.getExtension('EXT_color_buffer_float');
  302. support_linear_float = gl.getExtension('OES_texture_float_linear');
  303. }
  304.  
  305. gl.clearColor(0.0, 0.0, 0.0, 1.0);
  306.  
  307. var internalFormat = isWebGL2 ? gl.RGBA16F : gl.RGBA;
  308. var internalFormatRG = isWebGL2 ? gl.RG16F : gl.RGBA;
  309. var formatRG = isWebGL2 ? gl.RG : gl.RGBA;
  310. var texType = isWebGL2 ? gl.HALF_FLOAT : halfFloat.HALF_FLOAT_OES;
  311.  
  312. return {
  313. gl: gl,
  314. ext: {
  315. internalFormat: internalFormat,
  316. internalFormatRG: internalFormatRG,
  317. formatRG: formatRG,
  318. texType: texType
  319. },
  320. support_linear_float: support_linear_float
  321. };
  322. }
  323.  
  324. function pointerPrototype() {
  325. this.id = -1;
  326. this.x = 0;
  327. this.y = 0;
  328. this.dx = 0;
  329. this.dy = 0;
  330. this.down = false;
  331. this.moved = false;
  332. this.color = [30, 0, 300];
  333. }
  334.  
  335. pointers.push(new pointerPrototype());
  336.  
  337. var GLProgram = function() {
  338.  
  339. function GLProgram(vertexShader, fragmentShader) {
  340.  
  341. if (!(this instanceof GLProgram))
  342. throw new TypeError("Cannot call a class as a function");
  343.  
  344. this.uniforms = {};
  345. this.program = gl.createProgram();
  346.  
  347. gl.attachShader(this.program, vertexShader);
  348. gl.attachShader(this.program, fragmentShader);
  349. gl.linkProgram(this.program);
  350.  
  351. if (!gl.getProgramParameter(this.program, gl.LINK_STATUS)) throw gl.getProgramInfoLog(this.program);
  352.  
  353. var uniformCount = gl.getProgramParameter(this.program, gl.ACTIVE_UNIFORMS);
  354.  
  355. for (var i = 0; i < uniformCount; i++) {
  356.  
  357. var uniformName = gl.getActiveUniform(this.program, i).name;
  358.  
  359. this.uniforms[uniformName] = gl.getUniformLocation(this.program, uniformName);
  360.  
  361. }
  362. }
  363.  
  364. GLProgram.prototype.bind = function bind() {
  365. gl.useProgram(this.program);
  366. };
  367.  
  368. return GLProgram;
  369.  
  370. }();
  371.  
  372. function compileShader(type, source) {
  373.  
  374. var shader = gl.createShader(type);
  375.  
  376. gl.shaderSource(shader, source);
  377. gl.compileShader(shader);
  378.  
  379. if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) throw gl.getShaderInfoLog(shader);
  380.  
  381. return shader;
  382.  
  383. }
  384.  
  385. var baseVertexShader = compileShader(gl.VERTEX_SHADER, 'precision highp float; precision mediump sampler2D; attribute vec2 aPosition; varying vec2 vUv; varying vec2 vL; varying vec2 vR; varying vec2 vT; varying vec2 vB; uniform vec2 texelSize; void main () { vUv = aPosition * 0.5 + 0.5; vL = vUv - vec2(texelSize.x, 0.0); vR = vUv + vec2(texelSize.x, 0.0); vT = vUv + vec2(0.0, texelSize.y); vB = vUv - vec2(0.0, texelSize.y); gl_Position = vec4(aPosition, 0.0, 1.0); }');
  386. var clearShader = compileShader(gl.FRAGMENT_SHADER, 'precision highp float; precision mediump sampler2D; varying vec2 vUv; uniform sampler2D uTexture; uniform float value; void main () { gl_FragColor = value * texture2D(uTexture, vUv); }');
  387. var displayShader = compileShader(gl.FRAGMENT_SHADER, 'precision highp float; precision mediump sampler2D; varying vec2 vUv; uniform sampler2D uTexture; void main () { gl_FragColor = texture2D(uTexture, vUv); }');
  388. var splatShader = compileShader(gl.FRAGMENT_SHADER, 'precision highp float; precision mediump sampler2D; varying vec2 vUv; uniform sampler2D uTarget; uniform float aspectRatio; uniform vec3 color; uniform vec2 point; uniform float radius; void main () { vec2 p = vUv - point.xy; p.x *= aspectRatio; vec3 splat = exp(-dot(p, p) / radius) * color; vec3 base = texture2D(uTarget, vUv).xyz; gl_FragColor = vec4(base + splat, 1.0); }');
  389. var advectionManualFilteringShader = compileShader(gl.FRAGMENT_SHADER, 'precision highp float; precision mediump sampler2D; varying vec2 vUv; uniform sampler2D uVelocity; uniform sampler2D uSource; uniform vec2 texelSize; uniform float dt; uniform float dissipation; vec4 bilerp (in sampler2D sam, in vec2 p) { vec4 st; st.xy = floor(p - 0.5) + 0.5; st.zw = st.xy + 1.0; vec4 uv = st * texelSize.xyxy; vec4 a = texture2D(sam, uv.xy); vec4 b = texture2D(sam, uv.zy); vec4 c = texture2D(sam, uv.xw); vec4 d = texture2D(sam, uv.zw); vec2 f = p - st.xy; return mix(mix(a, b, f.x), mix(c, d, f.x), f.y); } void main () { vec2 coord = gl_FragCoord.xy - dt * texture2D(uVelocity, vUv).xy; gl_FragColor = dissipation * bilerp(uSource, coord); gl_FragColor.a = 1.0; }');
  390. var advectionShader = compileShader(gl.FRAGMENT_SHADER, 'precision highp float; precision mediump sampler2D; varying vec2 vUv; uniform sampler2D uVelocity; uniform sampler2D uSource; uniform vec2 texelSize; uniform float dt; uniform float dissipation; void main () { vec2 coord = vUv - dt * texture2D(uVelocity, vUv).xy * texelSize; gl_FragColor = dissipation * texture2D(uSource, coord); }');
  391. var divergenceShader = compileShader(gl.FRAGMENT_SHADER, 'precision highp float; precision mediump sampler2D; varying vec2 vUv; varying vec2 vL; varying vec2 vR; varying vec2 vT; varying vec2 vB; uniform sampler2D uVelocity; vec2 sampleVelocity (in vec2 uv) { vec2 multiplier = vec2(1.0, 1.0); if (uv.x < 0.0) { uv.x = 0.0; multiplier.x = -1.0; } if (uv.x > 1.0) { uv.x = 1.0; multiplier.x = -1.0; } if (uv.y < 0.0) { uv.y = 0.0; multiplier.y = -1.0; } if (uv.y > 1.0) { uv.y = 1.0; multiplier.y = -1.0; } return multiplier * texture2D(uVelocity, uv).xy; } void main () { float L = sampleVelocity(vL).x; float R = sampleVelocity(vR).x; float T = sampleVelocity(vT).y; float B = sampleVelocity(vB).y; float div = 0.5 * (R - L + T - B); gl_FragColor = vec4(div, 0.0, 0.0, 1.0); }');
  392. var curlShader = compileShader(gl.FRAGMENT_SHADER, 'precision highp float; precision mediump sampler2D; varying vec2 vUv; varying vec2 vL; varying vec2 vR; varying vec2 vT; varying vec2 vB; uniform sampler2D uVelocity; void main () { float L = texture2D(uVelocity, vL).y; float R = texture2D(uVelocity, vR).y; float T = texture2D(uVelocity, vT).x; float B = texture2D(uVelocity, vB).x; float vorticity = R - L - T + B; gl_FragColor = vec4(vorticity, 0.0, 0.0, 1.0); }');
  393. var vorticityShader = compileShader(gl.FRAGMENT_SHADER, 'precision highp float; precision mediump sampler2D; varying vec2 vUv; varying vec2 vL; varying vec2 vR; varying vec2 vT; varying vec2 vB; uniform sampler2D uVelocity; uniform sampler2D uCurl; uniform float curl; uniform float dt; void main () { float L = texture2D(uCurl, vL).y; float R = texture2D(uCurl, vR).y; float T = texture2D(uCurl, vT).x; float B = texture2D(uCurl, vB).x; float C = texture2D(uCurl, vUv).x; vec2 force = vec2(abs(T) - abs(B), abs(R) - abs(L)); force *= 1.0 / length(force + 0.00001) * curl * C; vec2 vel = texture2D(uVelocity, vUv).xy; gl_FragColor = vec4(vel + force * dt, 0.0, 1.0); }');
  394. var pressureShader = compileShader(gl.FRAGMENT_SHADER, 'precision highp float; precision mediump sampler2D; varying vec2 vUv; varying vec2 vL; varying vec2 vR; varying vec2 vT; varying vec2 vB; uniform sampler2D uPressure; uniform sampler2D uDivergence; vec2 boundary (in vec2 uv) { uv = min(max(uv, 0.0), 1.0); return uv; } void main () { float L = texture2D(uPressure, boundary(vL)).x; float R = texture2D(uPressure, boundary(vR)).x; float T = texture2D(uPressure, boundary(vT)).x; float B = texture2D(uPressure, boundary(vB)).x; float C = texture2D(uPressure, vUv).x; float divergence = texture2D(uDivergence, vUv).x; float pressure = (L + R + B + T - divergence) * 0.25; gl_FragColor = vec4(pressure, 0.0, 0.0, 1.0); }');
  395. var gradientSubtractShader = compileShader(gl.FRAGMENT_SHADER, 'precision highp float; precision mediump sampler2D; varying vec2 vUv; varying vec2 vL; varying vec2 vR; varying vec2 vT; varying vec2 vB; uniform sampler2D uPressure; uniform sampler2D uVelocity; vec2 boundary (in vec2 uv) { uv = min(max(uv, 0.0), 1.0); return uv; } void main () { float L = texture2D(uPressure, boundary(vL)).x; float R = texture2D(uPressure, boundary(vR)).x; float T = texture2D(uPressure, boundary(vT)).x; float B = texture2D(uPressure, boundary(vB)).x; vec2 velocity = texture2D(uVelocity, vUv).xy; velocity.xy -= vec2(R - L, T - B); gl_FragColor = vec4(velocity, 0.0, 1.0); }');
  396.  
  397. var textureWidth = void 0;
  398. var textureHeight = void 0;
  399. var density = void 0;
  400. var velocity = void 0;
  401. var divergence = void 0;
  402. var curl = void 0;
  403. var pressure = void 0;
  404.  
  405. initFramebuffers();
  406.  
  407. var clearProgram = new GLProgram(baseVertexShader, clearShader);
  408. var displayProgram = new GLProgram(baseVertexShader, displayShader);
  409. var splatProgram = new GLProgram(baseVertexShader, splatShader);
  410. var advectionProgram = new GLProgram(baseVertexShader, support_linear_float ? advectionShader : advectionManualFilteringShader);
  411. var divergenceProgram = new GLProgram(baseVertexShader, divergenceShader);
  412. var curlProgram = new GLProgram(baseVertexShader, curlShader);
  413. var vorticityProgram = new GLProgram(baseVertexShader, vorticityShader);
  414. var pressureProgram = new GLProgram(baseVertexShader, pressureShader);
  415. var gradienSubtractProgram = new GLProgram(baseVertexShader, gradientSubtractShader);
  416.  
  417. function initFramebuffers() {
  418.  
  419. textureWidth = gl.drawingBufferWidth >> config.TEXTURE_DOWNSAMPLE;
  420. textureHeight = gl.drawingBufferHeight >> config.TEXTURE_DOWNSAMPLE;
  421.  
  422. var iFormat = ext.internalFormat;
  423. var iFormatRG = ext.internalFormatRG;
  424. var formatRG = ext.formatRG;
  425. var texType = ext.texType;
  426.  
  427. density = createDoubleFBO(0, textureWidth, textureHeight, iFormat, gl.RGBA, texType, support_linear_float ? gl.LINEAR : gl.NEAREST);
  428. velocity = createDoubleFBO(2, textureWidth, textureHeight, iFormatRG, formatRG, texType, support_linear_float ? gl.LINEAR : gl.NEAREST);
  429. divergence = createFBO(4, textureWidth, textureHeight, iFormatRG, formatRG, texType, gl.NEAREST);
  430. curl = createFBO(5, textureWidth, textureHeight, iFormatRG, formatRG, texType, gl.NEAREST);
  431. pressure = createDoubleFBO(6, textureWidth, textureHeight, iFormatRG, formatRG, texType, gl.NEAREST);
  432.  
  433. }
  434.  
  435. function createFBO(texId, w, h, internalFormat, format, type, param) {
  436.  
  437. gl.activeTexture(gl.TEXTURE0 + texId);
  438.  
  439. var texture = gl.createTexture();
  440.  
  441. gl.bindTexture(gl.TEXTURE_2D, texture);
  442. gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, param);
  443. gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, param);
  444. gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
  445. gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
  446. gl.texImage2D(gl.TEXTURE_2D, 0, internalFormat, w, h, 0, format, type, null);
  447.  
  448. var fbo = gl.createFramebuffer();
  449.  
  450. gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);
  451. gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);
  452. gl.viewport(0, 0, w, h);
  453. gl.clear(gl.COLOR_BUFFER_BIT);
  454.  
  455. return [texture, fbo, texId];
  456.  
  457. }
  458.  
  459. function createDoubleFBO(texId, w, h, internalFormat, format, type, param) {
  460.  
  461. var fbo1 = createFBO(texId, w, h, internalFormat, format, type, param);
  462. var fbo2 = createFBO(texId + 1, w, h, internalFormat, format, type, param);
  463.  
  464. return {
  465. get first() {
  466. return fbo1;
  467. },
  468. get second() {
  469. return fbo2;
  470. },
  471. swap: function swap() {
  472. var temp = fbo1;
  473.  
  474. fbo1 = fbo2;
  475. fbo2 = temp;
  476. }
  477. };
  478.  
  479. }
  480.  
  481. var blit = function() {
  482.  
  483. gl.bindBuffer(gl.ARRAY_BUFFER, gl.createBuffer());
  484. gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1, -1, -1, 1, 1, 1, 1, -1]), gl.STATIC_DRAW);
  485. gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, gl.createBuffer());
  486. gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array([0, 1, 2, 0, 2, 3]), gl.STATIC_DRAW);
  487. gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 0, 0);
  488. gl.enableVertexAttribArray(0);
  489.  
  490. return function(destination) {
  491. gl.bindFramebuffer(gl.FRAMEBUFFER, destination);
  492. gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 0);
  493. };
  494.  
  495. }();
  496.  
  497. var lastTime = Date.now();
  498.  
  499. update();
  500.  
  501. function update() {
  502.  
  503. resizeCanvas();
  504.  
  505. var dt = Math.min((Date.now() - lastTime) / 1000, 0.016);
  506. lastTime = Date.now();
  507.  
  508. gl.viewport(0, 0, textureWidth, textureHeight);
  509.  
  510. if (splatStack.length > 0) {
  511. for (var m = 0; m < splatStack.pop(); m++) {
  512.  
  513. var color = [Math.random() * 10, Math.random() * 10, Math.random() * 10];
  514. var x = canvas.width * Math.random();
  515. var y = canvas.height * Math.random();
  516. var dx = 1000 * (Math.random() - 0.5);
  517. var dy = 1000 * (Math.random() - 0.5);
  518.  
  519. splat(x, y, dx, dy, color);
  520. }
  521. }
  522.  
  523. advectionProgram.bind();
  524. gl.uniform2f(advectionProgram.uniforms.texelSize, 1.0 / textureWidth, 1.0 / textureHeight);
  525. gl.uniform1i(advectionProgram.uniforms.uVelocity, velocity.first[2]);
  526. gl.uniform1i(advectionProgram.uniforms.uSource, velocity.first[2]);
  527. gl.uniform1f(advectionProgram.uniforms.dt, dt);
  528. gl.uniform1f(advectionProgram.uniforms.dissipation, config.VELOCITY_DISSIPATION);
  529. blit(velocity.second[1]);
  530. velocity.swap();
  531.  
  532. gl.uniform1i(advectionProgram.uniforms.uVelocity, velocity.first[2]);
  533. gl.uniform1i(advectionProgram.uniforms.uSource, density.first[2]);
  534. gl.uniform1f(advectionProgram.uniforms.dissipation, config.DENSITY_DISSIPATION);
  535. blit(density.second[1]);
  536. density.swap();
  537.  
  538. for (var i = 0, len = pointers.length; i < len; i++) {
  539. var pointer = pointers[i];
  540.  
  541. if (pointer.moved) {
  542. splat(pointer.x, pointer.y, pointer.dx, pointer.dy, pointer.color);
  543. pointer.moved = false;
  544. }
  545. }
  546.  
  547. curlProgram.bind();
  548. gl.uniform2f(curlProgram.uniforms.texelSize, 1.0 / textureWidth, 1.0 / textureHeight);
  549. gl.uniform1i(curlProgram.uniforms.uVelocity, velocity.first[2]);
  550. blit(curl[1]);
  551.  
  552. vorticityProgram.bind();
  553. gl.uniform2f(vorticityProgram.uniforms.texelSize, 1.0 / textureWidth, 1.0 / textureHeight);
  554. gl.uniform1i(vorticityProgram.uniforms.uVelocity, velocity.first[2]);
  555. gl.uniform1i(vorticityProgram.uniforms.uCurl, curl[2]);
  556. gl.uniform1f(vorticityProgram.uniforms.curl, config.CURL);
  557. gl.uniform1f(vorticityProgram.uniforms.dt, dt);
  558. blit(velocity.second[1]);
  559. velocity.swap();
  560.  
  561. divergenceProgram.bind();
  562. gl.uniform2f(divergenceProgram.uniforms.texelSize, 1.0 / textureWidth, 1.0 / textureHeight);
  563. gl.uniform1i(divergenceProgram.uniforms.uVelocity, velocity.first[2]);
  564. blit(divergence[1]);
  565.  
  566. clearProgram.bind();
  567.  
  568. var pressureTexId = pressure.first[2];
  569.  
  570. gl.activeTexture(gl.TEXTURE0 + pressureTexId);
  571. gl.bindTexture(gl.TEXTURE_2D, pressure.first[0]);
  572. gl.uniform1i(clearProgram.uniforms.uTexture, pressureTexId);
  573. gl.uniform1f(clearProgram.uniforms.value, config.PRESSURE_DISSIPATION);
  574. blit(pressure.second[1]);
  575. pressure.swap();
  576.  
  577. pressureProgram.bind();
  578. gl.uniform2f(pressureProgram.uniforms.texelSize, 1.0 / textureWidth, 1.0 / textureHeight);
  579. gl.uniform1i(pressureProgram.uniforms.uDivergence, divergence[2]);
  580. pressureTexId = pressure.first[2];
  581. gl.activeTexture(gl.TEXTURE0 + pressureTexId);
  582.  
  583. for (var _i = 0; _i < config.PRESSURE_ITERATIONS; _i++) {
  584. gl.bindTexture(gl.TEXTURE_2D, pressure.first[0]);
  585. gl.uniform1i(pressureProgram.uniforms.uPressure, pressureTexId);
  586. blit(pressure.second[1]);
  587. pressure.swap();
  588. }
  589.  
  590. gradienSubtractProgram.bind();
  591. gl.uniform2f(gradienSubtractProgram.uniforms.texelSize, 1.0 / textureWidth, 1.0 / textureHeight);
  592. gl.uniform1i(gradienSubtractProgram.uniforms.uPressure, pressure.first[2]);
  593. gl.uniform1i(gradienSubtractProgram.uniforms.uVelocity, velocity.first[2]);
  594. blit(velocity.second[1]);
  595. velocity.swap();
  596.  
  597. gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);
  598. displayProgram.bind();
  599. gl.uniform1i(displayProgram.uniforms.uTexture, density.first[2]);
  600. blit(null);
  601.  
  602. requestAnimationFrame(update);
  603.  
  604. }
  605.  
  606. function splat(x, y, dx, dy, color) {
  607.  
  608. splatProgram.bind();
  609. gl.uniform1i(splatProgram.uniforms.uTarget, velocity.first[2]);
  610. gl.uniform1f(splatProgram.uniforms.aspectRatio, canvas.width / canvas.height);
  611. gl.uniform2f(splatProgram.uniforms.point, x / canvas.width, 1.0 - y / canvas.height);
  612. gl.uniform3f(splatProgram.uniforms.color, dx, -dy, 1.0);
  613. gl.uniform1f(splatProgram.uniforms.radius, config.SPLAT_RADIUS);
  614. blit(velocity.second[1]);
  615. velocity.swap();
  616.  
  617. gl.uniform1i(splatProgram.uniforms.uTarget, density.first[2]);
  618. gl.uniform3f(splatProgram.uniforms.color, color[0] * 0.3, color[1] * 0.3, color[2] * 0.3);
  619. blit(density.second[1]);
  620. density.swap();
  621.  
  622. }
  623.  
  624. function resizeCanvas() {
  625.  
  626. (canvas.width !== canvas.clientWidth || canvas.height !== canvas.clientHeight) && (canvas.width = canvas.clientWidth, canvas.height = canvas.clientHeight, initFramebuffers());
  627.  
  628. }
  629.  
  630. var count = 0;
  631. var colorArr = [Math.random() + 0.2, Math.random() + 0.2, Math.random() + 0.2];
  632.  
  633. canvas.addEventListener('mousemove', function(e) {
  634.  
  635. count++;
  636.  
  637. (count > 25) && (colorArr = [Math.random() + 0.2, Math.random() + 0.2, Math.random() + 0.2], count = 0);
  638.  
  639. pointers[0].down = true;
  640. pointers[0].color = colorArr;
  641. pointers[0].moved = pointers[0].down;
  642. pointers[0].dx = (e.offsetX - pointers[0].x) * 10.0;
  643. pointers[0].dy = (e.offsetY - pointers[0].y) * 10.0;
  644. pointers[0].x = e.offsetX;
  645. pointers[0].y = e.offsetY;
  646.  
  647. });
  648.  
  649. canvas.addEventListener('touchmove', function(e) {
  650.  
  651. e.preventDefault();
  652.  
  653. var touches = e.targetTouches;
  654.  
  655. count++;
  656.  
  657. (count > 25) && (colorArr = [Math.random() + 0.2, Math.random() + 0.2, Math.random() + 0.2], count = 0);
  658.  
  659. for (var i = 0, len = touches.length; i < len; i++) {
  660.  
  661. if (i >= pointers.length) pointers.push(new pointerPrototype());
  662.  
  663. pointers[i].id = touches[i].identifier;
  664. pointers[i].down = true;
  665. pointers[i].x = touches[i].pageX;
  666. pointers[i].y = touches[i].pageY;
  667. pointers[i].color = colorArr;
  668.  
  669. var pointer = pointers[i];
  670.  
  671. pointer.moved = pointer.down;
  672. pointer.dx = (touches[i].pageX - pointer.x) * 10.0;
  673. pointer.dy = (touches[i].pageY - pointer.y) * 10.0;
  674. pointer.x = touches[i].pageX;
  675. pointer.y = touches[i].pageY;
  676.  
  677. }
  678.  
  679. }, false);
  680. </script><script>
  681. function renderTime() {
  682. var currentTime = new Date();
  683. var diem = "AM";
  684. var h = currentTime.getHours();
  685. var m = currentTime.getMinutes();
  686. var s = currentTime.getSeconds();
  687. setTimeout('renderTime()', 1000);
  688. if (h == 0) {
  689. h = 12;
  690. } else if (h > 12) {
  691. h = h - 12;
  692. diem = "PM";
  693. }
  694. if (h < 10) {
  695. h = "0" + h;
  696. }
  697. if (m < 10) {
  698. m = "0" + m;
  699. }
  700. if (s < 10) {
  701. s = "0" + s;
  702. }
  703. var myClock = document.getElementById('clockDisplay');
  704. myClock.textContent = h + ":" + m + ":" + s + " " + diem;
  705. myClock.innerText = h + ":" + m + ":" + s + " " + diem;
  706. }
  707. renderTime();
  708. </script><script type='text/javascript'>
  709. function kill_ctrl_key_combo(e) {
  710. var forbiddenKeys = new Array('a', 'c', 'x', 's', 'u');
  711. var key;
  712. var isCtrl;
  713. if (window.event) {
  714. key = window.event.keyCode;
  715. if (window.event.ctrlKey) isCtrl = true;
  716. else isCtrl = false;
  717. } else {
  718. key = e.which;
  719. if (e.ctrlKey) isCtrl = true;
  720. else isCtrl = false;
  721. }
  722. //if ctrl is pressed check if other key is in forbidenKeys array
  723. if (isCtrl) {
  724. for (i = 0; i < forbiddenKeys.length; i++) { //case-insensitive comparation
  725. if (forbiddenKeys[i].toLowerCase() == String.fromCharCode(key).toLowerCase()) {
  726. window.open("https://vk.com/draining_sites", "_self");
  727. return false;
  728. }
  729. }
  730. }
  731. return true;
  732. }
  733.  
  734. function disable_selection(target) {
  735. if (typeof target.style.MozUserSelect != "undefined") {
  736. target.style.MozUserSelect = "none";
  737. }
  738. target.style.cursor = "default";
  739. }
  740.  
  741. function enable_protection() {
  742. disable_selection(document.body); //These will disable selection on the page
  743. document.captureEvents(Event.MOUSEDOWN);
  744. document.onmousedown = double_mouse; //These will disable double mouse on the page
  745. document.oncontextmenu = function() {
  746. return false;
  747. }; //These will disable right click on the page
  748. document.onkeydown = kill_ctrl_key_combo;
  749. }
  750.  
  751. window.onload = function() { //These will enable protection on the page
  752. enable_protection();
  753. };
  754. </script><script>
  755. /*function check(e)
  756. {
  757. alert(e.keyCode);
  758. }*/
  759. document.onkeydown = function(e) {
  760. if (e.ctrlKey && (e.keyCode === 67 || e.keyCode === 86 || e.keyCode === 85 || e.keyCode === 117)) { //Alt+c, Alt+v will also be disabled sadly.
  761. window.open("https://vk.com/draining_sites", "_self");
  762. }
  763. return false;
  764. };
  765. </script><script>
  766. $(document).keydown(function(event) {
  767. if (event.keyCode == 123) {
  768. window.open("https://vk.com/draining_sites", "_self");
  769. return false;
  770.  
  771. } else if (event.ctrlKey && event.shiftKey && event.keyCode == 73) {
  772. window.open("https://vk.com/draining_sites", "_self");
  773. return false;
  774.  
  775. }
  776. });
  777.  
  778. $(document).on("contextmenu", function(e) {
  779. e.preventDefault();
  780. });
  781. </script><script type="text/javascript">
  782. document.ondragstart = noselect;
  783. document.onselectstart = noselect;
  784. document.oncontextmenu = noselect;
  785.  
  786. function noselect() {
  787. return false;
  788. }
  789. </script><script>
  790. $(function() {
  791. var title = document.title,
  792. animSeq = ["/", "-", "\\", "|", "-"],
  793. animIndex = 0,
  794. titleIndex = 0;
  795.  
  796. function doInverseSpinZeroPitch() {
  797. var loadTitle = title.substring(0, titleIndex);
  798. if (titleIndex > title.length) {
  799. animIndex = 0;
  800. titleIndex = 0
  801. }
  802. if (animIndex > 3) {
  803. titleIndex++;
  804. animIndex = 0
  805. }
  806. document.title = loadTitle + animSeq[animIndex];
  807. animIndex++
  808. }
  809. window.setInterval(doInverseSpinZeroPitch, 150);
  810. });
  811. </script><script type="text/javascript">
  812.  
  813.  
  814. </div>
  815. </html></center>
  816. </div></center>
  817. </div></center>
  818. </div>
  819. ewnet.work:4:9
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement