Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var UwBTTKjQ8x = {
- v: {
- css_other: !1,
- css_map: !1,
- call_other: !1,
- heroPos: [-1, -1]
- },
- update_map: function () {
- var a = UwBTTKjQ8x.v;
- a.css_map || ($('<style id="fluid-si_map"></style>').appendTo("head"),
- a.css_map = !0);
- var b = a.heroPos,
- c = [hero.x, hero.y],
- d = "";
- if (b[0] != c[0] || b[1] != c[1]) {
- a.heroPos = c;
- a = [-32 * c[0] + 256, -32 * c[1] + 256];
- var e = 200;
- b = [b[0] - c[0], b[1] - c[1]];
- for (let a in b) 0 > b[a] && (b[a] *= -1);
- b = b[0] + b[1];
- 5 <= b && (e = 0);
- 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; }`;
- d += ` #fluid-si_basebox #hero { left: ${32*c[0]}px!important; top: ${32*c[1]-16}px!important; }`;
- d += ` #fluid-si_basebox #base #bground { left: ${-1*
- a[0]}px!important; top: ${-1*a[1]}px!important; background-position: ${a[0]}px ${a[1]}px!important; }`;
- $("#fluid-si_map").html(d)
- }
- setTimeout(UwBTTKjQ8x.update_map, 16)
- },
- update_other: function (a) {
- a = UwBTTKjQ8x.v;
- a.call_other || (gapi.addCallback(this.update_other, ["other"]), a.call_other = !0);
- a.css_other || ($('<style id="fluid-si_other"></style>').appendTo("head"), a.css_other = !0);
- a = gapi.other;
- var b = "";
- for (let c in a) b += `#other${c} { left: ${32*a[c].x}px!important; top: ${32*
- a[c].y-16}px!important;}`;
- $("#fluid-si_other").html(b)
- },
- init2: function () {
- $("#fluid-si_basebox").length || $('<div id="fluid-si_basebox"></div>').prependTo("#centerbox").prepend($("#base"));
- UwBTTKjQ8x.update_other();
- UwBTTKjQ8x.update_map()
- },
- init: function () {
- api.stCSS("http://localhost:8080/Code/javascript/margonem/fluidSI.scss");
- api.wfe.add({
- name: "Fluid SI - init2",
- fun: this.init2
- })
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement