PageSourceSearch

https://kodeimmersive.com/_nuxt/Dq2L4M5D.js

js kodeimmersive.com collected 2026-10-05 23:04:32 UTC 3,303 bytes, 49 lines download raw bytes

1import { _ as I, l as L, s as w, q as P, n as V, m as B, k as K, i as X, h as F, v as U, x as v, J as t, C as i, E as o, B as W, I as x, af as j, c as q, o as G, a as E, Z as M } from "./Dn5CFQ0G.js";
2import { u as N } from "./CoZkyM-e.js";
3const Y = { class: "relative overflow-hidden" }, z = ["width", "height"], H = { __name: "index", setup(J) {
4  const b = L(), f = w(null), c = w(null), u = w(false), { width: m, height: g, top: T } = P(b), { pixelRatio: k } = V(), n = B(b), { isMedium: l } = N(), { gsap: d, Observer: y, Draggable: C } = K(), _ = X(), a = F();
5  let h = null, s = null, p = null;
6  U(async () => {
7    await v(), h = t(f).transferControlToOffscreen(), s = new Worker(new URL("" + new URL("worker-Xj5ljGsQ.js", import.meta.url).href, import.meta.url), { type: "module" });
8    const e = await O();
9    s.postMessage({ init: true, canvas: h, width: t(m), height: t(g), texture: e }, [h, e]), s.onmessage = (S) => {
10      const { data: r } = S;
11      r.modelLoaded && i.emit(o.WORKER_MODEL_LOADED), r.init && (A(), D(), W(u, true)), r.hover !== void 0 && (a.setCursorState(r.hover && !a.isContactOverlayVisible ? "icon-hover" : "idle"), a.setCursorLabel(r.hover && !a.isContactOverlayVisible ? "drag" : null), i.emit(r.hover && _.isSoundEnabled && !a.isContactOverlayVisible ? o.PLAY_ASTERISK_SFX : o.STOP_ASTERISK_SFX));
12    };
13  }), x([m, g, u], (e) => {
14    e[2] && s.postMessage({ resize: true, width: e[0], height: e[1] });
15  }), x([k, u], (e) => {
16    e[1] && s.postMessage({ dpr: e[0] });
17  }), x([n, u, () => _.isInit], async (e) => {
18    var _a, _b, _c;
19    !e[1] || !e[2] || (s.postMessage({ isVisible: e[0] }), e[0] ? ((_a = p == null ? void 0 : p[0]) == null ? void 0 : _a.enable(), d.ticker.add(R)) : (d.set(t(c), { x: 0 }), (_b = p == null ? void 0 : p[0]) == null ? void 0 : _b.update(), (_c = p == null ? void 0 : p[0]) == null ? void 0 : _c.disable(), await v(), d.ticker.remove(R), a.setCursorState("idle"), a.setCursorLabel(null), i.emit(o.STOP_ASTERISK_SFX)));
20  });
21  function R(e) {
22    s.postMessage({ update: true, tick: e });
23  }
24  async function O() {
25    const e = await j.load("/Metallic_MatCap.webp");
26    return await createImageBitmap(e.image);
27  }
28  function A() {
29    y.create({ type: "pointer", onMove: (e) => {
30      !t(n) || !t(l) || s.postMessage({ mouse: true, x: e.x, y: e.y });
31    } }), y.create({ type: "touch", target: t(f), onPress: () => {
32      !t(n) || t(l) || _.isSoundEnabled && i.emit(o.PLAY_ASTERISK_SFX);
33    }, onDrag: (e) => {
34      !t(n) || t(l) || s.postMessage({ mouse: true, x: e.x, y: e.y - t(T) });
35    }, onRelease: () => {
36      !t(n) || t(l) || i.emit(o.STOP_ASTERISK_SFX);
37    } });
38  }
39  function D() {
40    p = C.create(t(c), { cursor: "default", activeCursor: "default", type: "x", trigger: document.body, inertia: true, throwResistance: 6e3, onDrag: e, onThrowUpdate: e });
41    function e() {
42      s.postMessage({ drag: true, x: d.getProperty(t(c), "x") });
43    }
44  }
45  return (e, S) => (G(), q("div", Y, [E("canvas", { class: "canvas", ref_key: "canvasRef", ref: f, width: M(m), height: M(g) }, null, 8, z), E("div", { class: "fixed top-0 left-0 bg-white w-10 aspect-square invisible", ref_key: "draggableDummyRef", ref: c }, null, 512)]));
46} }, $ = I(H, [["__scopeId", "data-v-ff7a7df1"]]);
47export {
48  $ as _
49};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.