Advertisement
Keifanel

Untitled

Jan 14th, 2020
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var UwBTTKjQ8x = {
  2.     v: {
  3.         css_other: !1,
  4.         css_map: !1,
  5.         call_other: !1,
  6.         heroPos: [-1, -1]
  7.     },
  8.     update_map: function () {
  9.         var a = UwBTTKjQ8x.v;
  10.         a.css_map || ($('<style id="fluid-si_map"></style>').appendTo("head"),
  11.             a.css_map = !0);
  12.         var b = a.heroPos,
  13.             c = [hero.x, hero.y],
  14.             d = "";
  15.         if (b[0] != c[0] || b[1] != c[1]) {
  16.             a.heroPos = c;
  17.             a = [-32 * c[0] + 256, -32 * c[1] + 256];
  18.             var e = 200;
  19.             b = [b[0] - c[0], b[1] - c[1]];
  20.             for (let a in b) 0 > b[a] && (b[a] *= -1);
  21.             b = b[0] + b[1];
  22.             5 <= b && (e = 0);
  23.             d = d + ` #fluid-si_basebox #base, #fluid-si_basebox #hero, #fluid-si_basebox #base #bground { transition-duration: ${e}ms; }` + ` #fluid-si_basebox #base { left: ${a[0]}px; top: ${a[1]}px; }`;
  24.             d += ` #fluid-si_basebox #hero { left: ${32*c[0]}px!important; top: ${32*c[1]-16}px!important; }`;
  25.             d += ` #fluid-si_basebox #base #bground { left: ${-1*
  26. a[0]}px!important; top: ${-1*a[1]}px!important; background-position: ${a[0]}px ${a[1]}px!important; }`;
  27.             $("#fluid-si_map").html(d)
  28.         }
  29.         setTimeout(UwBTTKjQ8x.update_map, 16)
  30.     },
  31.     update_other: function (a) {
  32.         a = UwBTTKjQ8x.v;
  33.         a.call_other || (gapi.addCallback(this.update_other, ["other"]), a.call_other = !0);
  34.         a.css_other || ($('<style id="fluid-si_other"></style>').appendTo("head"), a.css_other = !0);
  35.         a = gapi.other;
  36.         var b = "";
  37.         for (let c in a) b += `#other${c} { left: ${32*a[c].x}px!important; top: ${32*
  38. a[c].y-16}px!important;}`;
  39.         $("#fluid-si_other").html(b)
  40.     },
  41.     init2: function () {
  42.         $("#fluid-si_basebox").length || $('<div id="fluid-si_basebox"></div>').prependTo("#centerbox").prepend($("#base"));
  43.         UwBTTKjQ8x.update_other();
  44.         UwBTTKjQ8x.update_map()
  45.     },
  46.     init: function () {
  47.         api.stCSS("http://localhost:8080/Code/javascript/margonem/fluidSI.scss");
  48.         api.wfe.add({
  49.             name: "Fluid SI - init2",
  50.             fun: this.init2
  51.         })
  52.     }
  53. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement