@realsee/dnalogel 3.50.11 → 3.50.13

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.
@@ -153,8 +153,8 @@ export declare abstract class BaseTag<C extends TagContentType = TagContentType,
153
153
  }): TagConfig;
154
154
  getDistance(fiveState?: Partial<FiveState>, accurate?: number): number;
155
155
  getVisible(fiveState?: Partial<FiveState>): boolean;
156
- getUnfoldedByPanoIndex(panoIndex?: number): any;
157
- getUnfoldedByCamera(): any;
156
+ getUnfoldedByPanoIndex(panoIndex?: number): boolean;
157
+ getUnfoldedByCamera(): boolean;
158
158
  can(action: 'show' | 'hide' | 'fold' | 'unfold'): boolean;
159
159
  onClick(params: Pick<TagClickParams, 'target'>): void;
160
160
  abstract computeNormal(): THREE.Vector3 | undefined;
@@ -204,7 +204,7 @@ export declare abstract class BaseTag<C extends TagContentType = TagContentType,
204
204
  * @description 获取是否展开
205
205
  */
206
206
  protected computeUnfoldedByPanoIndex(panoIndex?: number): boolean;
207
- protected computeUnfoldedByCamera(): any;
207
+ protected computeUnfoldedByCamera(): boolean;
208
208
  protected computeTagProject(): {
209
209
  x: number;
210
210
  y: number;
@@ -29,7 +29,6 @@ export declare abstract class TagRender extends TagUtil {
29
29
  usePoint?: boolean;
30
30
  }): void;
31
31
  bindRenderer(contentType: string, builtInRenderer: TagContentType): void;
32
- clearTags(): void;
33
32
  /**
34
33
  * @description 渲染3D贴片
35
34
  */
@@ -39,8 +38,6 @@ export declare abstract class TagRender extends TagUtil {
39
38
  * @param model 模型
40
39
  */
41
40
  updateTagCss3DObjectMatrix<S extends 'Model' | 'Plane' = 'Model'>(tag: TagInstance<TagContentType, S>, model: Object3D): void;
42
- /** 添加模型标签 */
43
- protected addMediaModelTag(tags: TagInstance[]): Promise<void>;
44
41
  protected disposeAllCSS3DContainer(): void;
45
42
  /**
46
43
  * @description 检查并销毁不用的3D贴片
@@ -1,37 +1,21 @@
1
- var x = Object.defineProperty;
1
+ var k = Object.defineProperty;
2
2
  var v = Object.getOwnPropertySymbols;
3
- var O = Object.prototype.hasOwnProperty, A = Object.prototype.propertyIsEnumerable;
4
- var T = (a, r, t) => r in a ? x(a, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[r] = t, j = (a, r) => {
5
- for (var t in r || (r = {}))
6
- O.call(r, t) && T(a, t, r[t]);
3
+ var x = Object.prototype.hasOwnProperty, O = Object.prototype.propertyIsEnumerable;
4
+ var y = (m, i, t) => i in m ? k(m, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : m[i] = t, R = (m, i) => {
5
+ for (var t in i || (i = {}))
6
+ x.call(i, t) && y(m, t, i[t]);
7
7
  if (v)
8
- for (var t of v(r))
9
- A.call(r, t) && T(a, t, r[t]);
10
- return a;
8
+ for (var t of v(i))
9
+ O.call(i, t) && y(m, t, i[t]);
10
+ return m;
11
11
  };
12
- var d = (a, r, t) => (T(a, typeof r != "symbol" ? r + "" : r, t), t);
13
- var w = (a, r, t) => new Promise((e, o) => {
14
- var i = (s) => {
15
- try {
16
- l(t.next(s));
17
- } catch (h) {
18
- o(h);
19
- }
20
- }, p = (s) => {
21
- try {
22
- l(t.throw(s));
23
- } catch (h) {
24
- o(h);
25
- }
26
- }, l = (s) => s.done ? e(s.value) : Promise.resolve(s.value).then(i, p);
27
- l((t = t.apply(a, r)).next());
28
- });
29
- import { Group as y, Quaternion as G, Vector3 as C, Matrix4 as M } from "three";
30
- import E from "../Components/Tag/index.js";
31
- import { isMediaModelTag as P } from "../utils/tag/tagCheck.js";
32
- import { centerPoint as I } from "../../shared-utils/three/centerPoint.js";
33
- import { toArray as N } from "../../shared-utils/util.js";
34
- import { TagUtil as U } from "./TagUtil.js";
12
+ var c = (m, i, t) => (y(m, typeof i != "symbol" ? i + "" : i, t), t);
13
+ import { Group as T, Quaternion as G, Vector3 as P, Matrix4 as C } from "three";
14
+ import A from "../Components/Tag/index.js";
15
+ import { isMediaModelTag as M } from "../utils/tag/tagCheck.js";
16
+ import { centerPoint as E } from "../../shared-utils/three/centerPoint.js";
17
+ import { toArray as I } from "../../shared-utils/util.js";
18
+ import { TagUtil as N } from "./TagUtil.js";
35
19
  import "../../vendor/svelte/internal/index.js";
36
20
  import "../Components/Tag/TextTag/index.js";
37
21
  import "../Components/Tag/TextTag/TextTag.js";
@@ -179,20 +163,20 @@ import "../../shared-utils/five/calculateThreeMouse.js";
179
163
  import "../../shared-utils/three/core/Raycaster.js";
180
164
  import "../../shared-utils/isTouchDevice.js";
181
165
  import "../../base/BasePlugin.js";
182
- class Oe extends U {
166
+ class xr extends N {
183
167
  constructor(t) {
184
168
  super(t);
185
- d(this, "rendererMap", /* @__PURE__ */ new Map());
186
- d(this, "contentTypeMap", /* @__PURE__ */ new Map());
187
- d(this, "group", new y());
188
- d(this, "imagePlaneGroup", new y());
189
- d(this, "gltfObjectGroup", new y());
169
+ c(this, "rendererMap", /* @__PURE__ */ new Map());
170
+ c(this, "contentTypeMap", /* @__PURE__ */ new Map());
171
+ c(this, "group", new T());
172
+ c(this, "imagePlaneGroup", new T());
173
+ c(this, "gltfObjectGroup", new T());
190
174
  /** 维护一个可用模型表,用于快速删除不应该在场景中的模型 */
191
- d(this, "enabledModelTagSet", /* @__PURE__ */ new Set());
175
+ c(this, "enabledModelTagSet", /* @__PURE__ */ new Set());
192
176
  /** 临时状态 */
193
- d(this, "temporaryState", { visible: !0 });
177
+ c(this, "temporaryState", { visible: !0 });
194
178
  /** 点标签 */
195
- d(this, "TagContainerSvelte");
179
+ c(this, "TagContainerSvelte");
196
180
  this.group.name = "PanoTagPluginModelGroup", this.gltfObjectGroup.name = "PanoTagPluginGLTFObjectGroup", this.imagePlaneGroup.name = "ImagePlaneGroup", this.group.add(this.gltfObjectGroup), this.group.add(this.imagePlaneGroup);
197
181
  }
198
182
  /**
@@ -203,66 +187,59 @@ class Oe extends U {
203
187
  * @param config.usePoint 是否需要标签点, 默认为 false
204
188
  * @note 优先级低于 tag.element
205
189
  */
206
- registerRenderer(t, e, o) {
207
- var i;
208
- this.rendererMap.set(t, { renderer: e, usePoint: (i = o == null ? void 0 : o.usePoint) != null ? i : !1 });
190
+ registerRenderer(t, r, o) {
191
+ var e;
192
+ this.rendererMap.set(t, { renderer: r, usePoint: (e = o == null ? void 0 : o.usePoint) != null ? e : !1 });
209
193
  }
210
- bindRenderer(t, e) {
211
- this.contentTypeMap.set(t, e);
212
- }
213
- clearTags() {
214
- var t;
215
- this.tags.length && (this.tags.forEach((e) => {
216
- var o, i, p, l, s;
217
- (i = (o = e.mediaPlane) == null ? void 0 : o.parent) == null || i.remove(e.mediaPlane), (s = (l = (p = e.model) == null ? void 0 : p.object) == null ? void 0 : l.parent) == null || s.remove(e.model.object);
218
- }), 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();
194
+ bindRenderer(t, r) {
195
+ this.contentTypeMap.set(t, r);
219
196
  }
220
197
  /**
221
198
  * @description 渲染3D贴片
222
199
  */
223
200
  updateRender3DDomTag(t) {
224
- (t ? N(t) : this.filterCSS3DTag).forEach((o) => {
225
- var i, p, l, s, h, b;
201
+ (t ? I(t) : this.filterCSS3DTag).forEach((o) => {
202
+ var e, a, f, D, g, b;
226
203
  if (o.tag3DContentSvelte) {
227
- const { svelteApp: f, css3DInstance: c, initialNormal: u, currentNormal: m } = o.tag3DContentSvelte;
228
- if ((p = c == null ? void 0 : c.css3DObject) == null || p.setVisible((this.state.visible && ((i = o.state) == null ? void 0 : i.visible)) !== !1), f.$set({ tag: o, hooks: this.hooks, state: this.state, temporaryState: this.temporaryState }), !u.equals(m)) {
229
- const n = new G().setFromUnitVectors(u, m);
230
- c.css3DObject.setRotationFromQuaternion(n);
204
+ const { svelteApp: d, css3DInstance: n, initialNormal: l, currentNormal: p } = o.tag3DContentSvelte;
205
+ if ((a = n == null ? void 0 : n.css3DObject) == null || a.setVisible((this.state.visible && ((e = o.state) == null ? void 0 : e.visible)) !== !1), d.$set({ tag: o, hooks: this.hooks, state: this.state, temporaryState: this.temporaryState }), !l.equals(p)) {
206
+ const s = new G().setFromUnitVectors(l, p);
207
+ n.css3DObject.setRotationFromQuaternion(s);
231
208
  }
232
209
  return;
233
210
  } else {
234
- if (P(o) && !((l = o.model) != null && l.object) || ((s = o.state) == null ? void 0 : s.visible) === !1 || !this.state.visible || !this.state.enabled || !this.css3DRenderPlugin)
211
+ if (M(o) && !((f = o.model) != null && f.object) || ((D = o.state) == null ? void 0 : D.visible) === !1 || !this.state.visible || !this.state.enabled || !this.css3DRenderPlugin)
235
212
  return;
236
213
  if (o.stickType === "3DPoint" && !o.normal)
237
214
  return console.error("updateRenderPlaneTag: 三维点标签缺少法向量!");
238
- const f = this.getPositions(o);
239
- if (!f)
215
+ const d = this.getPositions(o);
216
+ if (!d)
240
217
  return;
241
- const c = o.computeNormal();
242
- if (!c)
218
+ const n = o.computeNormal();
219
+ if (!n)
243
220
  return;
244
- const u = o.getConfig(), m = j({
245
- wrapperStyle: { zIndex: `${Math.round((1e4 - ((h = o.getDistance()) != null ? h : 0)) * 100)}` }
246
- }, u.tag3DConfig);
247
- if (o.computeRenderType() === "BehindDom" || m.mode === "behind") {
248
- m.mode = "behind", m.container = document.createElement("div");
249
- const D = "black";
250
- m.container.style.backgroundColor = D, m.container.style.border = `3px solid ${D}`, this.css3DRenderPlugin.hooks.on("render", () => {
221
+ const l = o.getConfig(), p = R({
222
+ wrapperStyle: { zIndex: `${Math.round((1e4 - ((g = o.getDistance()) != null ? g : 0)) * 100)}` }
223
+ }, l.tag3DConfig);
224
+ if (o.computeRenderType() === "BehindDom" || p.mode === "behind") {
225
+ p.mode = "behind", p.container = document.createElement("div");
226
+ const h = "black";
227
+ p.container.style.backgroundColor = h, p.container.style.border = `3px solid ${h}`, this.css3DRenderPlugin.hooks.on("render", () => {
251
228
  var S;
252
- if (n.css3DObject.opacityMesh && u.clickable !== !1) {
253
- const R = this.addObjectClickHandler(o, n.css3DObject.opacityMesh, (k) => {
254
- this.hooks.emit("click", { event: k, target: "TagContent", tag: o });
229
+ if (s.css3DObject.opacityMesh && l.clickable !== !1) {
230
+ const j = this.addObjectClickHandler(o, s.css3DObject.opacityMesh, (w) => {
231
+ this.hooks.emit("click", { event: w, target: "TagContent", tag: o });
255
232
  });
256
- (S = this.store.css3DRenderDisposer.get(o.id)) == null || S.push(R);
233
+ (S = this.store.css3DRenderDisposer.get(o.id)) == null || S.push(j);
257
234
  }
258
235
  });
259
236
  }
260
- const n = this.css3DRenderPlugin.create3DDomContainer(f, m);
261
- if (!n)
237
+ const s = this.css3DRenderPlugin.create3DDomContainer(d, p);
238
+ if (!s)
262
239
  return;
263
- this.store.css3DRenderDisposer.set(o.id, [n.dispose]);
264
- const g = new E({
265
- target: n.container,
240
+ this.store.css3DRenderDisposer.set(o.id, [s.dispose]);
241
+ const u = new A({
242
+ target: s.container,
266
243
  props: {
267
244
  tag: o,
268
245
  hooks: this.hooks,
@@ -273,15 +250,15 @@ class Oe extends U {
273
250
  }
274
251
  });
275
252
  o.tag3DContentSvelte = {
276
- svelteApp: g,
277
- domContainer: n,
278
- css3DInstance: n,
279
- initialNormal: c,
280
- currentNormal: c,
253
+ svelteApp: u,
254
+ domContainer: s,
255
+ css3DInstance: s,
256
+ initialNormal: n,
257
+ currentNormal: n,
281
258
  dispose: () => {
282
- g.$destroy(), n.dispose();
259
+ u.$destroy(), s.dispose();
283
260
  }
284
- }, P(o) && ((b = o.model) != null && b.object) && this.updateTagCss3DObjectMatrix(o, o.model.object);
261
+ }, M(o) && ((b = o.model) != null && b.object) && this.updateTagCss3DObjectMatrix(o, o.model.object);
285
262
  }
286
263
  }), this.clearUnusedPanelTag();
287
264
  }
@@ -289,30 +266,23 @@ class Oe extends U {
289
266
  * @param tag 标签
290
267
  * @param model 模型
291
268
  */
292
- updateTagCss3DObjectMatrix(t, e) {
293
- var n, g, D;
294
- const o = (g = (n = t.getConfig().tag3DConfig) == null ? void 0 : n.ratio) != null ? g : 216e-5, i = (D = t.tag3DContentSvelte) == null ? void 0 : D.css3DInstance.css3DObject;
295
- if (!i)
269
+ updateTagCss3DObjectMatrix(t, r) {
270
+ var s, u, h;
271
+ const o = (u = (s = t.getConfig().tag3DConfig) == null ? void 0 : s.ratio) != null ? u : 216e-5, e = (h = t.tag3DContentSvelte) == null ? void 0 : h.css3DInstance.css3DObject;
272
+ if (!e)
296
273
  return;
297
- const p = P(t) ? t.data.mediaPosition : t.position;
298
- if (!p || p.length !== 4 || !Array.isArray(p[0]) || !Array.isArray(p[2]))
274
+ const a = M(t) ? t.data.mediaPosition : t.position;
275
+ if (!a || a.length !== 4 || !Array.isArray(a[0]) || !Array.isArray(a[2]))
299
276
  return;
300
- e.updateWorldMatrix(!1, !1);
301
- const l = e.matrixWorld, s = new C().fromArray(p[0]), h = new C().fromArray(p[2]), b = I(s, 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);
302
- u.decompose(i.position, i.quaternion, i.scale);
303
- const m = i.opacityMesh;
304
- m && u.decompose(m.position, m.quaternion, m.scale);
305
- }
306
- /** 添加模型标签 */
307
- addMediaModelTag(t) {
308
- return w(this, null, function* () {
309
- const e = t.filter((o) => o.stickType === "Model").map((o) => o.loadModel());
310
- yield Promise.all(e), t.forEach((o) => o.updateVisible());
311
- });
277
+ r.updateWorldMatrix(!1, !1);
278
+ const f = r.matrixWorld, D = new P().fromArray(a[0]), g = new P().fromArray(a[2]), b = E(D, g).add(new P(0, 0, 5e-4)), d = new C().setPosition(b), n = new C().makeScale(o, o, o), l = new C().multiply(f).multiply(d).multiply(n);
279
+ l.decompose(e.position, e.quaternion, e.scale);
280
+ const p = e.opacityMesh;
281
+ p && l.decompose(p.position, p.quaternion, p.scale);
312
282
  }
313
283
  disposeAllCSS3DContainer() {
314
284
  for (const [, t] of this.store.css3DRenderDisposer)
315
- t == null || t.forEach((e) => e == null ? void 0 : e());
285
+ t == null || t.forEach((r) => r == null ? void 0 : r());
316
286
  this.store.css3DRenderDisposer = /* @__PURE__ */ new Map();
317
287
  }
318
288
  /**
@@ -320,15 +290,15 @@ class Oe extends U {
320
290
  */
321
291
  clearUnusedPanelTag() {
322
292
  this.filter2DPointTag.forEach((t) => {
323
- var e;
324
- (e = t.tag3DContentSvelte) == null || e.css3DInstance.dispose(), t.tag3DContentSvelte = void 0;
293
+ var r;
294
+ (r = t.tag3DContentSvelte) == null || r.css3DInstance.dispose(), t.tag3DContentSvelte = void 0;
325
295
  });
326
- for (const [t, e] of this.store.css3DRenderDisposer) {
296
+ for (const [t, r] of this.store.css3DRenderDisposer) {
327
297
  const o = this.getTagById(t);
328
- (!o || o.stickType === "2DPoint") && (e == null || e.forEach((i) => i == null ? void 0 : i()), this.store.css3DRenderDisposer.delete(t));
298
+ (!o || o.stickType === "2DPoint") && (r == null || r.forEach((e) => e == null ? void 0 : e()), this.store.css3DRenderDisposer.delete(t));
329
299
  }
330
300
  }
331
301
  }
332
302
  export {
333
- Oe as TagRender
303
+ xr as TagRender
334
304
  };
@@ -111,6 +111,10 @@ declare class PanoTagPluginController extends TagRender {
111
111
  * @deprecated
112
112
  */
113
113
  updateRenderAllTags(): void;
114
+ /**
115
+ * @description 清除所有标签
116
+ */
117
+ clearTags(): void;
114
118
  /**
115
119
  * @description 设置 unfolded
116
120
  */
@@ -1,13 +1,13 @@
1
1
  var D = Object.defineProperty, P = Object.defineProperties;
2
2
  var U = Object.getOwnPropertyDescriptors;
3
- var y = Object.getOwnPropertySymbols;
4
- var F = Object.prototype.hasOwnProperty, E = Object.prototype.propertyIsEnumerable;
3
+ var b = Object.getOwnPropertySymbols;
4
+ var E = Object.prototype.hasOwnProperty, A = Object.prototype.propertyIsEnumerable;
5
5
  var u = (d, a, e) => a in d ? D(d, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : d[a] = e, f = (d, a) => {
6
6
  for (var e in a || (a = {}))
7
- F.call(a, e) && u(d, e, a[e]);
8
- if (y)
9
- for (var e of y(a))
10
- E.call(a, e) && u(d, e, a[e]);
7
+ E.call(a, e) && u(d, e, a[e]);
8
+ if (b)
9
+ for (var e of b(a))
10
+ A.call(a, e) && u(d, e, a[e]);
11
11
  return d;
12
12
  }, c = (d, a) => P(d, U(a));
13
13
  var p = (d, a, e) => (u(d, typeof a != "symbol" ? a + "" : a, e), e);
@@ -29,14 +29,14 @@ var l = (d, a, e) => new Promise((t, i) => {
29
29
  });
30
30
  import * as v from "three";
31
31
  import { objectAssignDeepExports as m } from "../../vendor/object-assign-deep/objectAssignDeep.js";
32
- import { arrayPositionToVector3 as k } from "../../shared-utils/positionToVector3.js";
33
- import { isModelTag as A, isMediaModelTag as w } from "../utils/tag/tagCheck.js";
32
+ import { arrayPositionToVector3 as F } from "../../shared-utils/positionToVector3.js";
33
+ import { isModelTag as k, isMediaModelTag as w } from "../utils/tag/tagCheck.js";
34
34
  import { debounce as M } from "../utils/debounce.js";
35
- import { throttle as b } from "../utils/throttle.js";
36
- import _, { getTagStickType as I } from "../utils/tag/format.js";
37
- import { generateBlankAudio as L, AudioNamespace as R } from "../../shared-utils/audio.js";
35
+ import { throttle as y } from "../utils/throttle.js";
36
+ import _, { getTagStickType as L } from "../utils/tag/format.js";
37
+ import { generateBlankAudio as I, AudioNamespace as B } from "../../shared-utils/audio.js";
38
38
  import { resizeObserver as T } from "../../shared-utils/dom/resizeObserver.js";
39
- import { TagRender as B } from "./TagRender.js";
39
+ import { TagRender as R } from "./TagRender.js";
40
40
  import { isModelLike as O } from "../../shared-utils/five/mode.js";
41
41
  import "hammerjs";
42
42
  import "three/examples/jsm/renderers/CSS3DRenderer";
@@ -51,9 +51,9 @@ import { DebugUtil as V } from "../utils/DebugUtil.js";
51
51
  import { safeObj as C } from "../../shared-utils/safeObj.js";
52
52
  import { PointTag as z } from "./Tag/PointTag.js";
53
53
  import { ModelTag as Q } from "./Tag/ModelTag.js";
54
- import { PlaneTag as x } from "./Tag/PlaneTag.js";
55
- import $ from "../Components/TagContainer.js";
56
- import { tweenProgress as W } from "../../shared-utils/animationFrame/BetterTween.js";
54
+ import { PlaneTag as $ } from "./Tag/PlaneTag.js";
55
+ import x from "../Components/TagContainer.js";
56
+ import { tweenProgress as j } from "../../shared-utils/animationFrame/BetterTween.js";
57
57
  import "../Components/Tag/index.js";
58
58
  import "../../vendor/svelte/internal/index.js";
59
59
  import "../Components/Tag/TextTag/index.js";
@@ -193,7 +193,7 @@ import "../utils/addDebugPoints.js";
193
193
  import "../Components/TagItem.js";
194
194
  import "../Components/Common/TagPoint.js";
195
195
  const S = "Dnalogel-PanoTagPlugin", Ji = (d) => `${S}--${d}`;
196
- class Zi extends B {
196
+ class Zi extends R {
197
197
  constructor(e, t) {
198
198
  super(e);
199
199
  /** state */
@@ -241,7 +241,7 @@ class Zi extends B {
241
241
  p(this, "handleFivePanoArrived", () => l(this, null, function* () {
242
242
  this.tags.forEach((e) => {
243
243
  e.state.visible = !1, e.temporaryState = c(f({}, e.temporaryState), { visible: !0 }), e.applyVisible(), e.updateVisible();
244
- }), this.temporaryState.visible = !0, this.addRenderQueue({ type: "TagContainerSvelte", keys: ["temporaryState"] }), yield this.setUnfolded(), this.updateRender3DDomTag(), this.tags.filter(A).filter((e) => {
244
+ }), this.temporaryState.visible = !0, this.addRenderQueue({ type: "TagContainerSvelte", keys: ["temporaryState"] }), yield this.setUnfolded(), this.updateRender3DDomTag(), this.tags.filter(k).filter((e) => {
245
245
  var t;
246
246
  return (t = e.getConfig().modelConfig) == null ? void 0 : t.autoLookAtEnabled;
247
247
  }).forEach((e) => {
@@ -252,7 +252,7 @@ class Zi extends B {
252
252
  t.position.copy(i.position), t.quaternion.copy(i.quaternion);
253
253
  const o = this.five.camera.position;
254
254
  t.lookAt(o.clone().setY(t.position.y));
255
- const s = i.quaternion.clone(), n = t.quaternion.clone(), r = W();
255
+ const s = i.quaternion.clone(), n = t.quaternion.clone(), r = j();
256
256
  r.onUpdate(({ progress: g }) => {
257
257
  i.quaternion.copy(s.clone().slerp(n, g));
258
258
  }), r.play();
@@ -290,7 +290,7 @@ class Zi extends B {
290
290
  } else {
291
291
  if (!this.container)
292
292
  return console.error("updateRenderPlaneTag: tag2DContainer not found");
293
- this.TagContainerSvelte = new $({
293
+ this.TagContainerSvelte = new x({
294
294
  target: this.container,
295
295
  props: c(f({}, n), { state: c(f({}, this.state), { enabled: !1 }) })
296
296
  }), G(() => {
@@ -301,9 +301,9 @@ class Zi extends B {
301
301
  }
302
302
  }), this.renderQueue.clear();
303
303
  });
304
- this.params = m({}, { debug: !1, config: this.config }, f({}, t)), this.debug = this.params.debug, this.config = this.params.config, this.debug && this.debugUtil.bindLog(), L(1, { namespace: R.PlayAudio });
304
+ this.params = m({}, { debug: !1, config: this.config }, f({}, t)), this.debug = this.params.debug, this.config = this.params.config, this.debug && this.debugUtil.bindLog(), I(1, { namespace: B.PlayAudio });
305
305
  try {
306
- Array.isArray(window.__PANOTAGPLUGIN_DEBUG_LIST__) || (window.__PANOTAGPLUGIN_DEBUG_LIST__ = []), window.__PANOTAGPLUGIN_DEBUG_LIST__.push(this), window.__PANOTAGPLUGIN_DEBUG__ || Object.defineProperty(window, "__PANOTAGPLUGIN_DEBUG__", {
306
+ Array.isArray(window.__PANOTAGPLUGIN_DEBUG_LIST__) || (window.__PANOTAGPLUGIN_DEBUG_LIST__ = []), this.NAME = S + "-" + window.__PANOTAGPLUGIN_DEBUG_LIST__.length, window.__PANOTAGPLUGIN_DEBUG_LIST__.push(this), window.__PANOTAGPLUGIN_DEBUG__ || Object.defineProperty(window, "__PANOTAGPLUGIN_DEBUG__", {
307
307
  get: function() {
308
308
  return window.__PANOTAGPLUGIN_DEBUG_LIST__.sort((i, o) => o.tags.length - i.tags.length)[0];
309
309
  }
@@ -325,7 +325,7 @@ class Zi extends B {
325
325
  var i, o;
326
326
  this.clearTags();
327
327
  try {
328
- console.debug(S, " load:", { data: JSON.parse(JSON.stringify(e)) });
328
+ console.debug(this.NAME, " load:", { data: JSON.parse(JSON.stringify(e)) });
329
329
  } catch (s) {
330
330
  }
331
331
  this.config = m({}, this.config, {
@@ -342,18 +342,20 @@ class Zi extends B {
342
342
  addTag(e) {
343
343
  return l(this, null, function* () {
344
344
  const i = (Array.isArray(e) ? e : [e]).filter((o) => o.position).map((o) => {
345
- const s = I(o);
345
+ const s = L(o);
346
346
  if (s === "2DPoint" || s === "3DPoint")
347
347
  return new z(this, o);
348
348
  if (s === "Model")
349
349
  return new Q(this, o);
350
350
  if (s === "Plane")
351
- return new x(this, o);
351
+ return new $(this, o);
352
352
  });
353
353
  return i.forEach(_), this.tags.push(...i), this.tagsLengthWillUpdate = !0, N(this.five).then(() => l(this, null, function* () {
354
354
  var o, s;
355
- this.store.eventListenerDisposer && ((s = (o = this.store).eventListenerDisposer) == null || s.call(o)), this.state.enabled && this.handleEnable(), this.addResizeListener(), this.clearUnusedPanelTag(), this.addMediaModelTag(i), i.forEach((n) => {
356
- n.updateVisible(), n.updateZIndex();
355
+ this.store.eventListenerDisposer && ((s = (o = this.store).eventListenerDisposer) == null || s.call(o)), this.state.enabled && this.handleEnable(), this.addResizeListener(), this.clearUnusedPanelTag(), i.forEach((n) => {
356
+ this.tags.includes(n) && (n.stickType === "Model" && n.loadModel().then(() => {
357
+ this.tags.includes(n) && n.updateVisible();
358
+ }), n.updateVisible(), n.updateZIndex());
357
359
  }), this.setUnfolded(), this.addRenderQueue({ type: "TagContainerSvelte" }), this.hooks.emit("tagsLengthChange");
358
360
  }));
359
361
  });
@@ -463,7 +465,7 @@ class Zi extends B {
463
465
  */
464
466
  changeTagNormalById(e, t) {
465
467
  const i = this.getTagById(e);
466
- i && i.tag3DContentSvelte && (i.tag3DContentSvelte.currentNormal = k(t));
468
+ i && i.tag3DContentSvelte && (i.tag3DContentSvelte.currentNormal = F(t));
467
469
  }
468
470
  /**
469
471
  * @description 改变data
@@ -507,6 +509,16 @@ class Zi extends B {
507
509
  updateRenderAllTags() {
508
510
  this.tags.forEach((e) => e.updateVisible()), this.five.needsRender = !0;
509
511
  }
512
+ /**
513
+ * @description 清除所有标签
514
+ */
515
+ clearTags() {
516
+ var e;
517
+ this.tags.length && (this.tags.forEach((t) => {
518
+ var i, o, s, n, r;
519
+ (o = (i = t.mediaPlane) == null ? void 0 : i.parent) == null || o.remove(t.mediaPlane), (r = (n = (s = t.model) == null ? void 0 : s.object) == null ? void 0 : n.parent) == null || r.remove(t.model.object);
520
+ }), this.tags = [], this.tagsLengthWillUpdate = !0, this.hooks.emit("tagsLengthChange"), (e = this.TagContainerSvelte) == null || e.$destroy(), this.TagContainerSvelte = void 0, this.disposeAllCSS3DContainer()), this.enabledModelTagSet.clear(), this.cache.clear();
521
+ }
510
522
  /**
511
523
  * @description 设置 unfolded
512
524
  */
@@ -554,7 +566,7 @@ class Zi extends B {
554
566
  }, i = () => {
555
567
  this.state.enabled && (this.temporaryState.visible = !1, this.addRenderQueue({ type: "TagContainerSvelte", keys: ["temporaryState"] }));
556
568
  }, { observe: o, unobserve: s } = T(
557
- b(() => {
569
+ y(() => {
558
570
  this.store.resizeObserverDisposer && i();
559
571
  }, 500),
560
572
  e
@@ -592,7 +604,7 @@ class Zi extends B {
592
604
  addEventListener() {
593
605
  const { five: e, hooks: t } = this;
594
606
  let i = !1;
595
- const o = b(() => {
607
+ const o = y(() => {
596
608
  i || (i = !0, e.ready().then(() => {
597
609
  this.onFiveEveryReady(), i = !1;
598
610
  }));
@@ -140,7 +140,11 @@ export declare class Sculpt extends Subscribe<Event> {
140
140
  /**
141
141
  * @description: 开始绘制线段
142
142
  */
143
- createline(params?: Parameters<Line['create']>[0]): Promise<Line>;
143
+ createLine(params?: Parameters<Line['create']>[0]): Promise<Line>;
144
+ /**
145
+ * @deprecated use createLine instead
146
+ */
147
+ createline(...params: any[]): Promise<void>;
144
148
  /**
145
149
  * @description: 开始绘制空间折线
146
150
  */