<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:media="http://search.yahoo.com/mrss/"
	
	>

<channel>
	<title>jonaskleerup</title>
	<link>https://jonaskleerup.com</link>
	<description>jonaskleerup</description>
	<pubDate>Mon, 09 Jul 2018 15:26:57 +0000</pubDate>
	<generator>https://jonaskleerup.com</generator>
	<language>en</language>
	
		
	<item>
		<title>Home</title>
				
		<link>https://jonaskleerup.com/Home</link>

		<pubDate>Mon, 09 Jul 2018 15:26:57 +0000</pubDate>

		<dc:creator>jonaskleerup</dc:creator>

		<guid isPermaLink="true">https://jonaskleerup.com/Home</guid>

		<description>
	Jonas Kleerup
	






Art Consultant







/* Living background: orbiting bar, spinning cube, wavy line + drifting echoes.
   Paste into a site's custom HTML. Tweak the CONFIG values below. */
(function () {
  var CONFIG = {
    opacity: 0.6,      // 0-1: lower it to keep text readable on top
    zIndex: -1,        // -1 = behind page content; raise if it disappears behind a background
    cover: true,       // true = fills the whole window (crops edges); false = fits fully inside
    background: ''     // e.g. '#ffffff' to paint its own backdrop; empty = transparent
  };
  var W = 800, H = 600;
  var PTS = [[438.1, 48.7], [432.0, 69.0], [436.0, 94.7], [446.4, 123.3], [459.9, 152.6], [474.4, 181.7], [488.8, 210.7], [505.0, 240.4], [531.7, 245.8], [545.7, 214.9], [552.8, 181.6], [553.1, 147.6], [540.5, 116.6], [510.2, 103.4], [479.0, 115.3], [458.8, 142.5], [446.4, 174.2], [438.1, 207.3], [432.0, 240.8], [428.6, 274.7], [440.8, 305.3], [471.5, 319.7], [504.1, 329.8], [536.8, 339.2], [522.7, 329.0], [490.3, 318.5], [456.7, 312.9], [422.7, 313.0], [389.0, 318.2], [355.9, 326.4], [323.0, 335.4], [289.9, 343.7], [256.6, 350.7], [222.9, 356.1], [189.0, 360.0], [155.0, 362.4], [120.9, 363.3], [86.9, 362.4], [53.0, 358.8], [20.4, 349.2], [2.6, 322.3], [8.3, 288.9], [23.9, 258.7], [52.3, 243.2], [76.4, 265.9], [92.1, 296.2], [108.8, 325.9], [130.9, 351.7], [158.9, 371.0], [190.2, 384.4], [222.9, 394.0], [256.3, 401.2], [290.0, 406.4], [323.9, 410.0], [357.9, 412.0], [392.0, 412.3], [426.0, 410.8], [460.0, 407.5], [493.9, 403.8], [527.9, 401.1], [561.8, 398.2], [595.4, 392.1], [627.9, 381.8], [658.2, 366.4], [681.6, 342.1], [681.4, 309.2], [663.3, 280.6], [631.6, 273.7], [601.7, 289.7], [575.3, 311.3], [544.5, 323.4], [522.9, 301.0], [534.0, 269.4], [557.4, 244.7], [580.7, 219.9], [597.2, 190.1], [607.7, 157.7], [613.3, 124.1], [611.6, 90.7], [602.0, 59.5], [582.7, 34.3], [555.2, 19.4], [524.9, 13.8], [495.3, 14.2], [469.1, 20.2], [450.4, 32.3]];

  function start() {
    if (document.getElementById('living-bg')) return;
    var reduce = window.matchMedia &#38;&#38; window.matchMedia('(prefers-reduced-motion: reduce)').matches;
    var root = document.createElement('div');
    root.id = 'living-bg';
    root.setAttribute('aria-hidden', 'true');
    root.style.cssText = 'position:fixed;left:0;top:0;width:100%;height:100%;overflow:hidden;pointer-events:none;z-index:' + CONFIG.zIndex + ';opacity:' + CONFIG.opacity + ';' + (CONFIG.background ? 'background:' + CONFIG.background : '');
    var stage = document.createElement('div');
    stage.style.cssText = 'position:absolute;left:50%;top:50%;width:' + W + 'px;height:' + H + 'px;';
    root.appendChild(stage);
    document.body.appendChild(root);

    function fit() {
      var sx = window.innerWidth / W, sy = window.innerHeight / H;
      var s = CONFIG.cover ? Math.max(sx, sy) : Math.min(sx, sy);
      stage.style.transform = 'translate(-50%,-50%) scale(' + s + ')';
    }
    fit();
    window.addEventListener('resize', fit);

    var NS = 'http://www.w3.org/2000/svg';
    function div(css, parent) { var d = document.createElement('div'); d.style.cssText = 'position:absolute;box-sizing:border-box;' + css; (parent &#124;&#124; stage).appendChild(d); return d; }
    function svgWith(paths, css) {
      var s = document.createElementNS(NS, 'svg');
      s.setAttribute('viewBox', '0 0 692 417'); s.setAttribute('preserveAspectRatio', 'none');
      s.style.cssText = 'position:absolute;left:44px;top:71px;width:749px;height:522px;overflow:visible;fill:none;stroke-linecap:round;stroke-linejoin:round;' + (css &#124;&#124; '');
      var out = [];
      for (var i = 0; i &#60; paths; i++) {
        var p = document.createElementNS(NS, 'path');
        p.setAttribute('vector-effect', 'non-scaling-stroke');
        s.appendChild(p); out.push(p);
      }
      stage.appendChild(s);
      return { svg: s, paths: out };
    }
    function cube(parent, dashed) {
      var wrap = div('left:340px;top:310px;width:120px;height:120px;perspective:700px;');
      var inner = div('left:0;top:0;width:120px;height:120px;transform-style:preserve-3d;', wrap);
      var T = ['translateZ(60px)', 'rotateY(180deg) translateZ(60px)', 'rotateY(90deg) translateZ(60px)', 'rotateY(-90deg) translateZ(60px)', 'rotateX(90deg) translateZ(60px)', 'rotateX(-90deg) translateZ(60px)'];
      var faces = T.map(function (t) { return div('left:0;top:0;width:120px;height:120px;border-radius:6px;transform:' + t + ';', inner); });
      return { wrap: wrap, inner: inner, faces: faces };
    }
    function wavePath(t, off, amp, freq, speed) {
      var P = PTS, n = P.length, q = [], i;
      for (i = 0; i &#60; n; i++) {
        var a = P[(i + n - 1) % n], b = P[(i + 1) % n];
        var nx = -(b[1] - a[1]), ny = b[0] - a[0], l = Math.hypot(nx, ny) &#124;&#124; 1;
        nx /= l; ny /= l;
        var w = off + amp * Math.sin(i * freq * 2 - t * speed);
        q.push([P[i][0] + nx * w, P[i][1] + ny * w]);
      }
      var d = 'M' + q[0][0].toFixed(1) + ' ' + q[0][1].toFixed(1);
      for (i = 0; i &#60; n; i++) {
        var p0 = q[(i + n - 1) % n], p1 = q[i], p2 = q[(i + 1) % n], p3 = q[(i + 2) % n];
        d += ' C' + (p1[0] + (p2[0] - p0[0]) / 6).toFixed(1) + ' ' + (p1[1] + (p2[1] - p0[1]) / 6).toFixed(1) + ' ' +
          (p2[0] - (p3[0] - p1[0]) / 6).toFixed(1) + ' ' + (p2[1] - (p3[1] - p1[1]) / 6).toFixed(1) + ' ' +
          p2[0].toFixed(1) + ' ' + p2[1].toFixed(1);
      }
      return d + ' Z';
    }

    // layers, back to front
    var ghosts = [[0.34, 1], [0.24, 2], [0.15, 3], [0.08, 4]].map(function (g) {
      return div('width:230px;height:87px;background:#b6b0a7;border-radius:8px;left:196px;top:156px;opacity:' + g[0] + ';filter:blur(' + g[1] + 'px);');
    });
    var grey = div('width:230px;height:87px;background:#b6b0a7;border-radius:8px;left:196px;top:156px;');
    var cubeLayer = div('left:0;top:0;width:0;height:0;');
    var main = cube();
    var mainCols = ['#EE72D3', '#C95BB0', '#D866BF', '#F58AE0', '#F9A6E8', '#A8478F'];
    main.faces.forEach(function (f, i) { f.style.background = mainCols[i]; f.style.border = '1px dashed #141413'; f.style.backfaceVisibility = 'hidden'; });
    var rippleLayer = div('left:0;top:0;width:0;height:0;');
    var line = svgWith(3, 'transition:transform .2s ease;');
    line.paths.forEach(function (p) { p.style.transition = 'stroke-width .15s ease'; });
    line.paths[1].style.opacity = 0.7; line.paths[2].style.opacity = 0.5;

    var lineR = [], cubeR = [], nextL = 0, nextC = 2, beatL = 0, beatC = 0, touching = false, pulseUntil = -1, t0 = 0;
    var LSEQ = [[1, 0], [1, 0], [1, 0], [0, -1], [-1, 0], [-1, 0], [0, 1]];   // right x3, up, left x2, down
    var CSEQ = [[0, 1], [0, 1], [0, 1], [-1, 0], [0, -1], [0, -1], [1, 0]];   // down x3, left, up x2, right
    var t = 0, last = performance.now();

    function frame(now) {
      var dt = Math.min(0.1, (now - last) / 1000) * (reduce ? 0.25 : 1);
      last = now; t += dt;
      var th = (t / 4) * Math.PI * 2;
      var gdx = 80 * Math.cos(th) - 80, gdy = 80 * Math.sin(th);
      var pdx = 12 * Math.sin((t / 12) * Math.PI * 2), pdy = 14 * Math.sin((t / 9) * Math.PI * 2 + 1.2);
      var gx = 196 + gdx, gy = 156 + gdy, px = 340 + pdx, py = 310 + pdy;
      var hit = gx &#60; px + 120 &#38;&#38; gx + 230 &#62; px &#38;&#38; gy &#60; py + 120 &#38;&#38; gy + 87 &#62; py;
      if (hit &#38;&#38; !touching) { pulseUntil = t + 0.8; t0 = t; }
      touching = hit;
      var on = t &#60; pulseUntil;
      var hue = ((t - t0) * 700) % 360;
      function col(o) { return 'hsl(' + ((hue + o) % 360).toFixed(0) + ' 100% 55%)'; }

      if (t &#62;= nextL) { nextL = t + 4; var s = svgWith(1, 'pointer-events:none;'); s.paths[0].style.strokeWidth = '1.3px'; stage.removeChild(s.svg); rippleLayer.appendChild(s.svg); lineR.push({ t0: t, dir: LSEQ[beatL++ % LSEQ.length], el: s }); if (lineR.length &#62; 8) { var o = lineR.shift(); rippleLayer.removeChild(o.el.svg); } }
      if (t &#62;= nextC) {
        nextC = t + 4;
        var c = cube(); stage.removeChild(c.wrap); cubeLayer.appendChild(c.wrap); c.wrap.style.pointerEvents = 'none';
        c.faces.forEach(function (f) { f.style.border = '1px solid'; });
        cubeR.push({ t0: t, hue: (315 + beatC * 47) % 360, dir: CSEQ[beatC++ % CSEQ.length], ox: pdx, oy: pdy, el: c });
        if (cubeR.length &#62; 8) { var oc = cubeR.shift(); cubeLayer.removeChild(oc.el.wrap); }
      }

      ghosts.forEach(function (g, i) {
        var q = ((t - (i + 1) * 0.09) / 4) * Math.PI * 2;
        g.style.transform = 'translate(' + (80 * Math.cos(q) - 80).toFixed(2) + 'px,' + (80 * Math.sin(q)).toFixed(2) + 'px)';
      });
      grey.style.transform = 'translate(' + gdx.toFixed(2) + 'px,' + gdy.toFixed(2) + 'px)';
      main.wrap.style.transform = 'translate(' + pdx.toFixed(2) + 'px,' + pdy.toFixed(2) + 'px)';
      main.inner.style.transform = 'rotateX(-20deg) rotateY(' + (((t / 8) * 360) % 360).toFixed(2) + 'deg)';

      cubeR.forEach(function (r) {
        var age = t - r.t0, sc = 1 + 0.09 * age, mv = 26 * age;
        var op = 0.85 * Math.exp(-age / 11) * Math.min(1, age / 0.8);
        var hs = (r.hue + (on ? age * 60 : 0)) % 360, L = [62, 50, 56, 70, 78, 40];
        r.el.wrap.style.transform = 'translate(' + (r.ox + r.dir[0] * mv).toFixed(1) + 'px,' + (r.oy + r.dir[1] * mv).toFixed(1) + 'px) scale(' + sc.toFixed(3) + ')';
        r.el.wrap.style.opacity = op.toFixed(3);
        r.el.inner.style.transform = 'rotateX(-20deg) rotateY(' + ((((t / 8) * 360) + age * 15) % 360).toFixed(2) + 'deg)';
        r.el.faces.forEach(function (f, i) { f.style.background = 'hsla(' + hs.toFixed(0) + ',75%,' + L[i] + '%,0.6)'; f.style.borderColor = 'hsl(' + hs.toFixed(0) + ',70%,35%)'; });
      });
      lineR.forEach(function (r) {
        var age = t - r.t0, sc = 1 + 0.09 * age, mv = 26 * age;
        r.el.svg.style.transform = 'translate(' + (r.dir[0] * mv).toFixed(1) + 'px,' + (r.dir[1] * mv).toFixed(1) + 'px) scale(' + sc.toFixed(3) + ')';
        r.el.svg.style.opacity = (0.5 * Math.exp(-age / 11) * Math.min(1, age / 0.8)).toFixed(3);
        r.el.paths[0].setAttribute('stroke', on ? col(age * 60) : '#8a8378');
        r.el.paths[0].setAttribute('d', wavePath(t, 0, 7 + 0.7 * age, 0.21, 0.35));
      });
      // retire old ones
      [lineR, cubeR].forEach(function (arr, k) { while (arr.length &#38;&#38; t - arr[0].t0 &#62;= 36) { var o = arr.shift(); (k ? cubeLayer.removeChild(o.el.wrap) : rippleLayer.removeChild(o.el.svg)); } });

      var boost = on ? 1.6 : 1;
      var defs = [[0, 7, 0.21, 0.7, '#8a8378', 0, 2.2, 14], [10, 5, 0.17, 0.55, '#b3ac9f', 70, 1.2, 7], [-12, 4, 0.26, 0.85, '#cfc9be', 140, 1, 5]];
      defs.forEach(function (d, i) {
        var p = line.paths[i];
        p.setAttribute('d', wavePath(t, d[0], d[1] * boost, d[2], d[3]));
        p.setAttribute('stroke', on ? col(d[5]) : d[4]);
        p.style.strokeWidth = (on ? d[7] : d[6]) + 'px';
      });
      line.svg.style.filter = on ? 'drop-shadow(0 0 12px ' + col(0) + ')' : 'none';
      line.svg.style.transform = 'scale(' + (on ? 1.18 : 1) + ')';
      requestAnimationFrame(frame);
    }
    requestAnimationFrame(frame);
  }
  if (document.body) start(); else document.addEventListener('DOMContentLoaded', start);
})();

document.title = 'TEST ' + document.title</description>
		
	</item>
		
	</channel>
</rss>