UNPKG

@realsee/dnalogel

Version:
64 lines (63 loc) 2.35 kB
var C = Object.defineProperty; var l = (r, t, e) => t in r ? C(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e; var s = (r, t, e) => (l(r, typeof t != "symbol" ? t + "" : t, e), e); import { Controller as g } from "../../base/BasePlugin.js"; import "../../shared-utils/Subscribe.js"; import "hammerjs"; import "three"; import "@realsee/five"; import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js"; import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js"; import "../../shared-utils/positionToVector3.js"; import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js"; import "three/examples/jsm/renderers/CSS3DRenderer"; import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js"; import "../../shared-utils/util.js"; import "../../CSS3DRenderPlugin/utils/createResizeObserver.js"; import "../../CSS3DRenderPlugin/utils/even.js"; import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js"; import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js"; import "../../shared-utils/three/centerPoint.js"; import "../../shared-utils/three/getObjectVisible.js"; import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js"; import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js"; import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js"; import "animejs"; import "../../shared-utils/url/absoluteUrl.js"; class F extends g { constructor(e) { super(e); s(this, "tagCacheByPanoIndex", {}); } getPanoIndexCache(e) { var p; const { five: n } = this, { panoIndex: a, id: i, key: h } = e != null ? e : {}, c = a != null ? a : n.getCurrentState().panoIndex; if (c === void 0) throw new Error(`TagCacheController getPanoIndexCache(): fivePanoIndex is ${c}`); const m = `${n.model.uuid}__${c}`; let o = this.tagCacheByPanoIndex[m]; if (o || (o = /* @__PURE__ */ new Map(), this.tagCacheByPanoIndex[m] = o), i === void 0) return o; if (h === void 0) { const d = o.get(i); return d || (o.set(i, {}), o.get(i)); } return (p = o.get(i)) == null ? void 0 : p[h]; } clearCacheById(e) { Object.values(this.tagCacheByPanoIndex).forEach((n) => { n.delete(e); }); } /** * @description 清除所有缓存 */ clearCache() { this.tagCacheByPanoIndex = {}; } removeCache() { } } export { F as TagCache };