@realsee/dnalogel 3.47.7 → 3.47.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,5 +27,4 @@ export declare class PointTag<C extends TagContentType = TagContentType> extends
27
27
  }): void;
28
28
  updateUnfoldedByPanoIndex(): void;
29
29
  computeNormal(): THREE.Vector3;
30
- destroy(): void;
31
30
  }
@@ -203,9 +203,6 @@ class Si extends g {
203
203
  computeNormal() {
204
204
  return new d.Vector3().fromArray(this.normal);
205
205
  }
206
- destroy() {
207
- this.plugin.addRenderQueue({ type: "TagContainerSvelte", keys: ["tags"] });
208
- }
209
206
  }
210
207
  export {
211
208
  Si as PointTag
@@ -1,30 +1,30 @@
1
1
  var x = Object.defineProperty;
2
2
  var v = Object.getOwnPropertySymbols;
3
3
  var O = Object.prototype.hasOwnProperty, A = Object.prototype.propertyIsEnumerable;
4
- var T = (s, e, t) => e in s ? x(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, w = (s, e) => {
4
+ var T = (a, e, t) => e in a ? x(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t, j = (a, e) => {
5
5
  for (var t in e || (e = {}))
6
- O.call(e, t) && T(s, t, e[t]);
6
+ O.call(e, t) && T(a, t, e[t]);
7
7
  if (v)
8
8
  for (var t of v(e))
9
- A.call(e, t) && T(s, t, e[t]);
10
- return s;
9
+ A.call(e, t) && T(a, t, e[t]);
10
+ return a;
11
11
  };
12
- var c = (s, e, t) => (T(s, typeof e != "symbol" ? e + "" : e, t), t);
13
- var R = (s, e, t) => new Promise((i, o) => {
14
- var r = (n) => {
12
+ var d = (a, e, t) => (T(a, typeof e != "symbol" ? e + "" : e, t), t);
13
+ var w = (a, e, t) => new Promise((i, o) => {
14
+ var r = (p) => {
15
15
  try {
16
- d(t.next(n));
16
+ l(t.next(p));
17
17
  } catch (h) {
18
18
  o(h);
19
19
  }
20
- }, a = (n) => {
20
+ }, m = (p) => {
21
21
  try {
22
- d(t.throw(n));
22
+ l(t.throw(p));
23
23
  } catch (h) {
24
24
  o(h);
25
25
  }
26
- }, d = (n) => n.done ? i(n.value) : Promise.resolve(n.value).then(r, a);
27
- d((t = t.apply(s, e)).next());
26
+ }, l = (p) => p.done ? i(p.value) : Promise.resolve(p.value).then(r, m);
27
+ l((t = t.apply(a, e)).next());
28
28
  });
29
29
  import { Group as y, Quaternion as G, Vector3 as C, Matrix4 as M } from "three";
30
30
  import E from "../Components/Tag/index.js";
@@ -230,17 +230,17 @@ import "../../CSS3DRenderPlugin/Controller.js";
230
230
  class vr extends U {
231
231
  constructor(t) {
232
232
  super(t);
233
- c(this, "rendererMap", /* @__PURE__ */ new Map());
234
- c(this, "contentTypeMap", /* @__PURE__ */ new Map());
235
- c(this, "group", new y());
236
- c(this, "imagePlaneGroup", new y());
237
- c(this, "gltfObjectGroup", new y());
233
+ d(this, "rendererMap", /* @__PURE__ */ new Map());
234
+ d(this, "contentTypeMap", /* @__PURE__ */ new Map());
235
+ d(this, "group", new y());
236
+ d(this, "imagePlaneGroup", new y());
237
+ d(this, "gltfObjectGroup", new y());
238
238
  /** 维护一个可用模型表,用于快速删除不应该在场景中的模型 */
239
- c(this, "enabledModelTagSet", /* @__PURE__ */ new Set());
239
+ d(this, "enabledModelTagSet", /* @__PURE__ */ new Set());
240
240
  /** 临时状态 */
241
- c(this, "temporaryState", { visible: !0 });
241
+ d(this, "temporaryState", { visible: !0 });
242
242
  /** 点标签 */
243
- c(this, "TagContainerSvelte");
243
+ d(this, "TagContainerSvelte");
244
244
  this.group.name = "PanoTagPluginModelGroup", this.gltfObjectGroup.name = "PanoTagPluginGLTFObjectGroup", this.imagePlaneGroup.name = "ImagePlaneGroup", this.group.add(this.gltfObjectGroup), this.group.add(this.imagePlaneGroup);
245
245
  }
246
246
  /**
@@ -261,8 +261,8 @@ class vr extends U {
261
261
  clearTags() {
262
262
  var t;
263
263
  this.tags.length && (this.tags.forEach((i) => {
264
- var o, r;
265
- (r = (o = i.mediaPlane) == null ? void 0 : o.parent) == null || r.remove(i.mediaPlane);
264
+ var o, r, m, l, p;
265
+ (r = (o = i.mediaPlane) == null ? void 0 : o.parent) == null || r.remove(i.mediaPlane), (p = (l = (m = i.model) == null ? void 0 : m.object) == null ? void 0 : l.parent) == null || p.remove(i.model.object);
266
266
  }), this.tags = [], this.tagsLengthWillUpdate = !0, this.hooks.emit("tagsLengthChange"), (t = this.TagContainerSvelte) == null || t.$destroy(), this.TagContainerSvelte = void 0, this.disposeAllCSS3DContainer()), this.enabledModelTagSet.clear(), this.cache.clear();
267
267
  }
268
268
  /**
@@ -270,47 +270,47 @@ class vr extends U {
270
270
  */
271
271
  updateRender3DDomTag(t) {
272
272
  (t ? N(t) : this.filterCSS3DTag).forEach((o) => {
273
- var r, a, d, n, h, b;
273
+ var r, m, l, p, h, b;
274
274
  if (o.tag3DContentSvelte) {
275
- const { svelteApp: f, css3DInstance: l, initialNormal: u, currentNormal: p } = o.tag3DContentSvelte;
276
- if ((a = l == null ? void 0 : l.css3DObject) == null || a.setVisible((this.state.visible && ((r = o.state) == null ? void 0 : r.visible)) !== !1), f.$set({ tag: o, hooks: this.hooks, state: this.state, temporaryState: this.temporaryState }), !u.equals(p)) {
277
- const m = new G().setFromUnitVectors(u, p);
278
- l.css3DObject.setRotationFromQuaternion(m);
275
+ const { svelteApp: f, css3DInstance: c, initialNormal: u, currentNormal: s } = o.tag3DContentSvelte;
276
+ if ((m = c == null ? void 0 : c.css3DObject) == null || m.setVisible((this.state.visible && ((r = o.state) == null ? void 0 : r.visible)) !== !1), f.$set({ tag: o, hooks: this.hooks, state: this.state, temporaryState: this.temporaryState }), !u.equals(s)) {
277
+ const n = new G().setFromUnitVectors(u, s);
278
+ c.css3DObject.setRotationFromQuaternion(n);
279
279
  }
280
280
  return;
281
281
  } else {
282
- if (P(o) && !((d = o.model) != null && d.object) || ((n = o.state) == null ? void 0 : n.visible) === !1 || !this.state.visible || !this.state.enabled || !this.css3DRenderPlugin)
282
+ if (P(o) && !((l = o.model) != null && l.object) || ((p = o.state) == null ? void 0 : p.visible) === !1 || !this.state.visible || !this.state.enabled || !this.css3DRenderPlugin)
283
283
  return;
284
284
  if (o.stickType === "3DPoint" && !o.normal)
285
285
  return console.error("updateRenderPlaneTag: 三维点标签缺少法向量!");
286
286
  const f = this.getPositions(o);
287
287
  if (!f)
288
288
  return;
289
- const l = o.computeNormal();
290
- if (!l)
289
+ const c = o.computeNormal();
290
+ if (!c)
291
291
  return;
292
- const u = o.getConfig(), p = w({
292
+ const u = o.getConfig(), s = j({
293
293
  wrapperStyle: { zIndex: `${Math.round((1e4 - ((h = o.getDistance()) != null ? h : 0)) * 100)}` }
294
294
  }, u.tag3DConfig);
295
- if (o.computeRenderType() === "BehindDom" || p.mode === "behind") {
296
- p.mode = "behind", p.container = document.createElement("div");
295
+ if (o.computeRenderType() === "BehindDom" || s.mode === "behind") {
296
+ s.mode = "behind", s.container = document.createElement("div");
297
297
  const D = "black";
298
- p.container.style.backgroundColor = D, p.container.style.border = `3px solid ${D}`, this.css3DRenderPlugin.hooks.on("render", () => {
298
+ s.container.style.backgroundColor = D, s.container.style.border = `3px solid ${D}`, this.css3DRenderPlugin.hooks.on("render", () => {
299
299
  var S;
300
- if (m.css3DObject.opacityMesh && u.clickable !== !1) {
301
- const j = this.addObjectClickHandler(o, m.css3DObject.opacityMesh, (k) => {
300
+ if (n.css3DObject.opacityMesh && u.clickable !== !1) {
301
+ const R = this.addObjectClickHandler(o, n.css3DObject.opacityMesh, (k) => {
302
302
  this.hooks.emit("click", { event: k, target: "TagContent", tag: o });
303
303
  });
304
- (S = this.store.css3DRenderDisposer.get(o.id)) == null || S.push(j);
304
+ (S = this.store.css3DRenderDisposer.get(o.id)) == null || S.push(R);
305
305
  }
306
306
  });
307
307
  }
308
- const m = this.css3DRenderPlugin.create3DDomContainer(f, p);
309
- if (!m)
308
+ const n = this.css3DRenderPlugin.create3DDomContainer(f, s);
309
+ if (!n)
310
310
  return;
311
- this.store.css3DRenderDisposer.set(o.id, [m.dispose]);
311
+ this.store.css3DRenderDisposer.set(o.id, [n.dispose]);
312
312
  const g = new E({
313
- target: m.container,
313
+ target: n.container,
314
314
  props: {
315
315
  tag: o,
316
316
  hooks: this.hooks,
@@ -322,12 +322,12 @@ class vr extends U {
322
322
  });
323
323
  o.tag3DContentSvelte = {
324
324
  svelteApp: g,
325
- domContainer: m,
326
- css3DInstance: m,
327
- initialNormal: l,
328
- currentNormal: l,
325
+ domContainer: n,
326
+ css3DInstance: n,
327
+ initialNormal: c,
328
+ currentNormal: c,
329
329
  dispose: () => {
330
- g.$destroy(), m.dispose();
330
+ g.$destroy(), n.dispose();
331
331
  }
332
332
  }, P(o) && ((b = o.model) != null && b.object) && this.updateTagCss3DObjectMatrix(o, o.model.object);
333
333
  }
@@ -338,22 +338,22 @@ class vr extends U {
338
338
  * @param model 模型
339
339
  */
340
340
  updateTagCss3DObjectMatrix(t, i) {
341
- var m, g, D;
342
- const o = (g = (m = t.getConfig().tag3DConfig) == null ? void 0 : m.ratio) != null ? g : 216e-5, r = (D = t.tag3DContentSvelte) == null ? void 0 : D.css3DInstance.css3DObject;
341
+ var n, g, D;
342
+ const o = (g = (n = t.getConfig().tag3DConfig) == null ? void 0 : n.ratio) != null ? g : 216e-5, r = (D = t.tag3DContentSvelte) == null ? void 0 : D.css3DInstance.css3DObject;
343
343
  if (!r)
344
344
  return;
345
- const a = P(t) ? t.data.mediaPosition : t.position;
346
- if (!a || a.length !== 4 || !Array.isArray(a[0]) || !Array.isArray(a[2]))
345
+ const m = P(t) ? t.data.mediaPosition : t.position;
346
+ if (!m || m.length !== 4 || !Array.isArray(m[0]) || !Array.isArray(m[2]))
347
347
  return;
348
348
  i.updateWorldMatrix(!1, !1);
349
- const d = i.matrixWorld, n = new C().fromArray(a[0]), h = new C().fromArray(a[2]), b = I(n, h).add(new C(0, 0, 5e-4)), f = new M().setPosition(b), l = new M().makeScale(o, o, o), u = new M().multiply(d).multiply(f).multiply(l);
349
+ const l = i.matrixWorld, p = new C().fromArray(m[0]), h = new C().fromArray(m[2]), b = I(p, h).add(new C(0, 0, 5e-4)), f = new M().setPosition(b), c = new M().makeScale(o, o, o), u = new M().multiply(l).multiply(f).multiply(c);
350
350
  u.decompose(r.position, r.quaternion, r.scale);
351
- const p = r.opacityMesh;
352
- p && u.decompose(p.position, p.quaternion, p.scale);
351
+ const s = r.opacityMesh;
352
+ s && u.decompose(s.position, s.quaternion, s.scale);
353
353
  }
354
354
  /** 添加模型标签 */
355
355
  addMediaModelTag(t) {
356
- return R(this, null, function* () {
356
+ return w(this, null, function* () {
357
357
  const i = t.filter((o) => o.stickType === "Model").map((o) => o.loadModel());
358
358
  yield Promise.all(i), t.forEach((o) => o.updateVisible());
359
359
  });
@@ -16,7 +16,7 @@ let c = class {
16
16
  /**
17
17
  * @realsee/dnalogel 版本号
18
18
  */
19
- e(this, "VERSION", "3.47.7");
19
+ e(this, "VERSION", "3.47.8");
20
20
  e(this, "NAME");
21
21
  e(this, "five");
22
22
  e(this, "workUtil");
@@ -1,6 +1,6 @@
1
1
  function A() {
2
2
  console.debug(
3
- "%c %c@realsee/dnalogel %cv3.47.7",
3
+ "%c %c@realsee/dnalogel %cv3.47.8",
4
4
  [
5
5
  "background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAMAAACHgmeRAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABLFBMVEUAAAAapPoap/oaqvkbrfkbr/gZnfwZoPsaqfnD4v/E4/8Ylv0clPm93/+/4P/B4f8Yj/683/8Wif+33P8Uhv+x2f8ShP+s1v8Pgf+n0/8Nf/+h0f8Lff8Lff8Nf/9dl/+czv8KfP8KfP+Lxf+Uyv+Xy/+Hwv+Jw/+Mxf+Oxv+RyP8aovsapfoap/oZmfwZm/wZnvsYnPsYkf4YlP0NePsDYfgYcfi43f+63v8Xiv8Xjf4EWfwCV/sWZ/qz2v+02/8Vh/8WiP8EUf8CTf4WXv2u1/+v2P8Thf8Thv8ETf8CR/8VV/+o1f+q1f8Qgv8Rg/8DSv8BRf8UVP+j0v+k0v8OgP8Pgf8DR/8DQv9Nhf+dzv+fz/+Kv/+Vyv+Xy/+azf+Oxv+Qx/+SyP////8MUhLdAAAAK3RSTlMACEWQ2bd98uQECPXxqO7c+Pb49vj2+Pb49vj23Oul8fMHA+TwerXXjEIG2P+bHgAAAAFiS0dEY1y+LaoAAAB+SURBVAjXY2BgZGJmYWVgYGBgY9fW0eVg4ORi4NbTNzDk4eXjZxAwMjYxNTO3EGQQsrSytrG1sxdmEHFwdHJ2cXUTZRBz9/D08vbxFWeQ8PMPCAwKDpFkkAoNC4+IjIqWZpCRlZOPiY2LV2BQVGJQTkhMUlEFWaOmrqGpxQAAyg0S9Dq+VPYAAAAASUVORK5CYII=')",
6
6
  "background-repeat: no-repeat",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@realsee/dnalogel",
3
- "version": "3.47.7",
3
+ "version": "3.47.8",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./libs/index.js",
6
6
  "types": "./libs/index.d.ts",