@realsee/dnalogel 3.50.10 → 3.50.12

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.
@@ -34,10 +34,10 @@ import { isModelTag as A, isMediaModelTag as w } from "../utils/tag/tagCheck.js"
34
34
  import { debounce as M } from "../utils/debounce.js";
35
35
  import { throttle as b } from "../utils/throttle.js";
36
36
  import _, { getTagStickType as I } from "../utils/tag/format.js";
37
- import { generateBlankAudio as L, AudioNamespace as B } from "../../shared-utils/audio.js";
38
- import { resizeObserver as C } from "../../shared-utils/dom/resizeObserver.js";
39
- import { TagRender as O } from "./TagRender.js";
40
- import { isModelLike as R } from "../../shared-utils/five/mode.js";
37
+ import { generateBlankAudio as L, AudioNamespace as R } from "../../shared-utils/audio.js";
38
+ import { resizeObserver as T } from "../../shared-utils/dom/resizeObserver.js";
39
+ import { TagRender as B } from "./TagRender.js";
40
+ import { isModelLike as O } from "../../shared-utils/five/mode.js";
41
41
  import "hammerjs";
42
42
  import "three/examples/jsm/renderers/CSS3DRenderer";
43
43
  import "@realsee/five/line";
@@ -48,7 +48,7 @@ import "animejs";
48
48
  import { nextFrame as G } from "../../shared-utils/animationFrame/index.js";
49
49
  import { waitFiveModelLoaded as N } from "../../shared-utils/five/fiveModelLoad.js";
50
50
  import { DebugUtil as V } from "../utils/DebugUtil.js";
51
- import { safeObj as T } from "../../shared-utils/safeObj.js";
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
54
  import { PlaneTag as x } from "./Tag/PlaneTag.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 O {
196
+ class Zi extends B {
197
197
  constructor(e, t) {
198
198
  super(e);
199
199
  /** state */
@@ -263,7 +263,7 @@ class Zi extends O {
263
263
  this.tags.forEach((e) => e.updateVisible());
264
264
  });
265
265
  p(this, "onFiveEveryReady", () => {
266
- this.setUnfoldedByCamera(), R(this.five.getCurrentState().mode) && this.tags.forEach((e) => e.updateVisible());
266
+ this.setUnfoldedByCamera(), O(this.five.getCurrentState().mode) && this.tags.forEach((e) => e.updateVisible());
267
267
  });
268
268
  p(this, "render", () => {
269
269
  this.renderQueue.forEach((e, t) => {
@@ -301,7 +301,7 @@ class Zi extends O {
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: B.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(), L(1, { namespace: R.PlayAudio });
305
305
  try {
306
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__", {
307
307
  get: function() {
@@ -520,10 +520,10 @@ class Zi extends O {
520
520
  });
521
521
  }
522
522
  handleShow() {
523
- this.state.visible = !0, this.group.visible = !0, this.addRenderQueue({ type: "TagContainerSvelte", keys: ["state"] }), this.five.needsRender = !0;
523
+ this.state.visible = !0, this.group.visible = !0, this.addRenderQueue({ type: "TagContainerSvelte", keys: ["state"] }), this.updateRender3DDomTag(), this.five.needsRender = !0;
524
524
  }
525
525
  handleHide() {
526
- this.pauseCurrentMedia(), this.state.visible = !1, this.group.visible = !1, this.addRenderQueue({ type: "TagContainerSvelte", keys: ["state"] }), this.five.needsRender = !0;
526
+ this.pauseCurrentMedia(), this.state.visible = !1, this.group.visible = !1, this.addRenderQueue({ type: "TagContainerSvelte", keys: ["state"] }), this.updateRender3DDomTag(), this.five.needsRender = !0;
527
527
  }
528
528
  handleEnable() {
529
529
  this.state.enabled = !0, this.store.eventListenerDisposer = this.addEventListener(), this.five.scene.children.includes(this.group) || this.five.scene.add(this.group), this.group.traverse((e) => {
@@ -553,12 +553,12 @@ class Zi extends O {
553
553
  this.state.enabled && (this.filterPointTag.forEach((h) => h.updateScreenPosition({ force: !0 })), this.temporaryState.visible = !0, this.addRenderQueue({ type: "TagContainerSvelte", keys: ["temporaryState"] }));
554
554
  }, i = () => {
555
555
  this.state.enabled && (this.temporaryState.visible = !1, this.addRenderQueue({ type: "TagContainerSvelte", keys: ["temporaryState"] }));
556
- }, { observe: o, unobserve: s } = C(
556
+ }, { observe: o, unobserve: s } = T(
557
557
  b(() => {
558
558
  this.store.resizeObserverDisposer && i();
559
559
  }, 500),
560
560
  e
561
- ), { observe: n, unobserve: r } = C(
561
+ ), { observe: n, unobserve: r } = T(
562
562
  M(() => t(), 400),
563
563
  e
564
564
  );
@@ -573,13 +573,13 @@ class Zi extends O {
573
573
  if (t.state && i !== void 0) {
574
574
  if (i === !0 && t.screenPosition) {
575
575
  const o = t.getConfig().unfoldedConfig;
576
- T(o).keep !== "unfolded" && (e = !0);
576
+ C(o).keep !== "unfolded" && (e = !0);
577
577
  }
578
578
  t.state.unfolded = i;
579
579
  }
580
580
  }), e && this.filterPointTag.forEach((t) => {
581
581
  const i = t.getConfig().unfoldedConfig;
582
- typeof i == "object" && (i.autoUnfold || i.autoUnfold === !1 || T(i.autoUnfold).enable === !1 || i.keep) || t.state && (t.state.unfolded = !1);
582
+ typeof i == "object" && (i.autoUnfold || i.autoUnfold === !1 || C(i.autoUnfold).enable === !1 || i.keep) || t.state && (t.state.unfolded = !1);
583
583
  });
584
584
  }
585
585
  changeTagMode(e, t) {
@@ -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
  */
@@ -1,31 +1,31 @@
1
- var U = Object.defineProperty, _ = Object.defineProperties;
2
- var x = Object.getOwnPropertyDescriptors;
1
+ var B = Object.defineProperty, U = Object.defineProperties;
2
+ var _ = Object.getOwnPropertyDescriptors;
3
3
  var f = Object.getOwnPropertySymbols;
4
- var E = Object.prototype.hasOwnProperty, L = Object.prototype.propertyIsEnumerable;
5
- var y = (m, i, e) => i in m ? U(m, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : m[i] = e, r = (m, i) => {
4
+ var x = Object.prototype.hasOwnProperty, E = Object.prototype.propertyIsEnumerable;
5
+ var y = (m, i, e) => i in m ? B(m, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : m[i] = e, r = (m, i) => {
6
6
  for (var e in i || (i = {}))
7
- E.call(i, e) && y(m, e, i[e]);
7
+ x.call(i, e) && y(m, e, i[e]);
8
8
  if (f)
9
9
  for (var e of f(i))
10
- L.call(i, e) && y(m, e, i[e]);
10
+ E.call(i, e) && y(m, e, i[e]);
11
11
  return m;
12
- }, g = (m, i) => _(m, x(i));
13
- var a = (m, i, e) => (y(m, typeof i != "symbol" ? i + "" : i, e), e);
14
- var u = (m, i, e) => new Promise((t, n) => {
15
- var l = (c) => {
12
+ }, g = (m, i) => U(m, _(i));
13
+ var u = (m, i, e) => (y(m, typeof i != "symbol" ? i + "" : i, e), e);
14
+ var a = (m, i, e) => new Promise((t, n) => {
15
+ var c = (l) => {
16
16
  try {
17
- s(e.next(c));
17
+ o(e.next(l));
18
18
  } catch (d) {
19
19
  n(d);
20
20
  }
21
- }, o = (c) => {
21
+ }, s = (l) => {
22
22
  try {
23
- s(e.throw(c));
23
+ o(e.throw(l));
24
24
  } catch (d) {
25
25
  n(d);
26
26
  }
27
- }, s = (c) => c.done ? t(c.value) : Promise.resolve(c.value).then(l, o);
28
- s((e = e.apply(m, i)).next());
27
+ }, o = (l) => l.done ? t(l.value) : Promise.resolve(l.value).then(c, s);
28
+ o((e = e.apply(m, i)).next());
29
29
  });
30
30
  import { globalModules as O } from "./utils/Modules/Global.js";
31
31
  import { Subscribe as S } from "../shared-utils/Subscribe.js";
@@ -50,33 +50,33 @@ import { Circle as C } from "./Objects/Circle/index.js";
50
50
  import { Cylinder as R } from "./Objects/Cylinder/index.js";
51
51
  import { Box as D } from "./Objects/Box/index.js";
52
52
  import { forReverseEach as z } from "../shared-utils/forReverseEach.js";
53
- import { Line as j } from "./Objects/Line/index.js";
54
- import { hotkeys as B } from "../vendor/hotkeys-js/dist/hotkeys.esm.js";
53
+ import { Line as L } from "./Objects/Line/index.js";
54
+ import { hotkeys as j } from "../vendor/hotkeys-js/dist/hotkeys.esm.js";
55
55
  const h = class extends S {
56
56
  constructor(e, t) {
57
57
  super();
58
- a(this, "group");
59
- a(this, "theme");
60
- a(this, "five");
61
- a(this, "creatingItem", null);
58
+ u(this, "group");
59
+ u(this, "theme");
60
+ u(this, "five");
61
+ u(this, "creatingItem", null);
62
62
  /**
63
63
  * @description: 撤销
64
64
  */
65
- a(this, "undo", () => {
65
+ u(this, "undo", () => {
66
66
  var e;
67
67
  console.log("undo"), (e = this.creatingItem) == null || e.undo(), this.five.needsRender = !0;
68
68
  });
69
69
  /**
70
70
  * @description: 重做
71
71
  */
72
- a(this, "redo", () => {
72
+ u(this, "redo", () => {
73
73
  var e;
74
74
  console.log("redo"), (e = this.creatingItem) == null || e.redo(), this.five.needsRender = !0;
75
75
  });
76
- this.five = e, this.theme = t, this.group = new k(), this.group.name = "Sculpt", e.scene.add(this.group), h.modules.init(e), B("ctrl+z", this.undo), B("ctrl+shift+z", this.redo), h.modules.fiveDomEvents.addEventListener(this.group, "click", ({ intersects: n, origDomEvent: l }) => {
77
- var s;
78
- const o = M((s = n == null ? void 0 : n[0]) == null ? void 0 : s.object, (c) => c.isSculptObject);
79
- return o && !o.editing ? this.emit("click", l, o) : !1;
76
+ this.five = e, this.theme = t, this.group = new k(), this.group.name = "Sculpt", e.scene.add(this.group), h.modules.init(e), j("ctrl+z", this.undo), j("ctrl+shift+z", this.redo), h.modules.fiveDomEvents.addEventListener(this.group, "click", ({ intersects: n, origDomEvent: c }) => {
77
+ var o;
78
+ const s = M((o = n == null ? void 0 : n[0]) == null ? void 0 : o.object, (l) => l.isSculptObject);
79
+ return s && !s.editing ? this.emit("click", c, s) : !1;
80
80
  }), window.__SCULPT_DEBUG__ = this, window.__SCULPT_MODULES_DEBUG__ = h.modules;
81
81
  }
82
82
  get data() {
@@ -97,14 +97,14 @@ const h = class extends S {
97
97
  * @description: 加载数据 展示
98
98
  */
99
99
  load(e, t) {
100
- var l;
100
+ var c;
101
101
  this.clear();
102
- const n = (l = e == null ? void 0 : e.items) == null ? void 0 : l.map((o) => {
103
- var c;
104
- const s = g(r({}, o), {
105
- style: r(r({}, (c = this.theme) == null ? void 0 : c[o.type.toLowerCase()]), o.style)
102
+ const n = (c = e == null ? void 0 : e.items) == null ? void 0 : c.map((s) => {
103
+ var l;
104
+ const o = g(r({}, s), {
105
+ style: r(r({}, (l = this.theme) == null ? void 0 : l[s.type.toLowerCase()]), s.style)
106
106
  });
107
- return o.type === "Point" ? new w(s, t) : o.type === "line" ? new j(s, t) : o.type === "Polyline" ? new I(s, t) : o.type === "Polygon" ? new P(s, t) : o.type === "Prism" ? new v(s, t) : o.type === "Rectangle" ? new b(s, t) : o.type === "Circle" ? new C(s, t) : o.type === "Cylinder" ? new R(s, t) : o.type === "Box" ? new D(s, t) : null;
107
+ return s.type === "Point" ? new w(o, t) : s.type === "line" ? new L(o, t) : s.type === "Polyline" ? new I(o, t) : s.type === "Polygon" ? new P(o, t) : s.type === "Prism" ? new v(o, t) : s.type === "Rectangle" ? new b(o, t) : s.type === "Circle" ? new C(o, t) : s.type === "Cylinder" ? new R(o, t) : s.type === "Box" ? new D(o, t) : null;
108
108
  });
109
109
  this.group.add(...n), this.five.needsRender = !0;
110
110
  }
@@ -118,16 +118,16 @@ const h = class extends S {
118
118
  * @description: 放置物体
119
119
  */
120
120
  putObject(e) {
121
- var l;
121
+ var c;
122
122
  this.group.add(e);
123
123
  const t = h.modules.object3DHelper, n = t.addObject3DHelper(e);
124
- return (l = n == null ? void 0 : n.moveController) == null || l.moveByMouse(), t;
124
+ return (c = n == null ? void 0 : n.moveController) == null || c.moveByMouse(), t;
125
125
  }
126
126
  /**
127
127
  * @description: 开始绘制点
128
128
  */
129
129
  createPoint(e) {
130
- return u(this, null, function* () {
130
+ return a(this, null, function* () {
131
131
  var t;
132
132
  return this.createItem(w, r(r({}, (t = this.theme) == null ? void 0 : t.point), e));
133
133
  });
@@ -135,17 +135,25 @@ const h = class extends S {
135
135
  /**
136
136
  * @description: 开始绘制线段
137
137
  */
138
- createline(e) {
139
- return u(this, null, function* () {
138
+ createLine(e) {
139
+ return a(this, null, function* () {
140
140
  var t;
141
- return this.createItem(j, r(r({}, (t = this.theme) == null ? void 0 : t.line), e));
141
+ return this.createItem(L, r(r({}, (t = this.theme) == null ? void 0 : t.line), e));
142
+ });
143
+ }
144
+ /**
145
+ * @deprecated use createLine instead
146
+ */
147
+ createline(...e) {
148
+ return a(this, null, function* () {
149
+ this.createLine(...e);
142
150
  });
143
151
  }
144
152
  /**
145
153
  * @description: 开始绘制空间折线
146
154
  */
147
155
  createPolyline(e) {
148
- return u(this, null, function* () {
156
+ return a(this, null, function* () {
149
157
  var t;
150
158
  return this.createItem(I, r(r({}, (t = this.theme) == null ? void 0 : t.polyline), e));
151
159
  });
@@ -154,7 +162,7 @@ const h = class extends S {
154
162
  * @description: 开始绘制平面多边形
155
163
  */
156
164
  createPolygon(e) {
157
- return u(this, null, function* () {
165
+ return a(this, null, function* () {
158
166
  var t;
159
167
  return this.createItem(P, r(r({}, (t = this.theme) == null ? void 0 : t.polygon), e));
160
168
  });
@@ -163,7 +171,7 @@ const h = class extends S {
163
171
  * @description: 开始绘制多棱柱
164
172
  */
165
173
  createPrism(e) {
166
- return u(this, null, function* () {
174
+ return a(this, null, function* () {
167
175
  var t;
168
176
  return this.createItem(v, r(r({}, (t = this.theme) == null ? void 0 : t.prism), e));
169
177
  });
@@ -172,7 +180,7 @@ const h = class extends S {
172
180
  * @description: 开始绘制矩形
173
181
  */
174
182
  createRectangle(e) {
175
- return u(this, null, function* () {
183
+ return a(this, null, function* () {
176
184
  var t;
177
185
  return this.createItem(b, r(r({}, (t = this.theme) == null ? void 0 : t.rectangle), e));
178
186
  });
@@ -181,7 +189,7 @@ const h = class extends S {
181
189
  * @description: 开始绘制圆形
182
190
  */
183
191
  createCircle(e) {
184
- return u(this, null, function* () {
192
+ return a(this, null, function* () {
185
193
  var t;
186
194
  return this.createItem(C, r(r({}, (t = this.theme) == null ? void 0 : t.circle), e));
187
195
  });
@@ -190,7 +198,7 @@ const h = class extends S {
190
198
  * @description: 开始绘制圆柱
191
199
  */
192
200
  createCylinder(e) {
193
- return u(this, null, function* () {
201
+ return a(this, null, function* () {
194
202
  var t;
195
203
  return this.createItem(R, r(r({}, (t = this.theme) == null ? void 0 : t.cylinder), e));
196
204
  });
@@ -199,7 +207,7 @@ const h = class extends S {
199
207
  * @description: 开始绘制 Box
200
208
  */
201
209
  createBox(e) {
202
- return u(this, null, function* () {
210
+ return a(this, null, function* () {
203
211
  var t;
204
212
  return this.createItem(D, r(r({}, (t = this.theme) == null ? void 0 : t.box), e));
205
213
  });
@@ -219,19 +227,19 @@ const h = class extends S {
219
227
  z(this.items, (e) => e.delete()), this.five.needsRender = !0;
220
228
  }
221
229
  createItem(e, ...t) {
222
- return u(this, null, function* () {
230
+ return a(this, null, function* () {
223
231
  this.creatingItem && (this.creatingItem.stopCreating(), this.creatingItem = null);
224
232
  const n = new e();
225
- return this.creatingItem = n, this.group.add(n), yield n.create(...t).then((...l) => (this.creatingItem = null, l)).catch((l) => {
226
- console.error(l), this.group.remove(n);
233
+ return this.creatingItem = n, this.group.add(n), yield n.create(...t).then((...c) => (this.creatingItem = null, c)).catch((c) => {
234
+ console.error(c), this.group.remove(n);
227
235
  }), n;
228
236
  });
229
237
  }
230
238
  };
231
239
  let p = h;
232
- a(p, "modules", O);
233
- const ae = (m) => new p(m);
240
+ u(p, "modules", O);
241
+ const ue = (m) => new p(m);
234
242
  export {
235
243
  p as Sculpt,
236
- ae as SculptPlugin
244
+ ue as SculptPlugin
237
245
  };
@@ -18,7 +18,7 @@ let P = class {
18
18
  /**
19
19
  * @realsee/dnalogel 版本号
20
20
  */
21
- i(this, "VERSION", "3.50.10");
21
+ i(this, "VERSION", "3.50.12");
22
22
  i(this, "NAME");
23
23
  i(this, "five");
24
24
  i(this, "workUtil");
@@ -1,6 +1,6 @@
1
1
  function A() {
2
2
  console.debug(
3
- "%c %c@realsee/dnalogel %cv3.50.10",
3
+ "%c %c@realsee/dnalogel %cv3.50.12",
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.50.10",
3
+ "version": "3.50.12",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./libs/index.js",
6
6
  "types": "./libs/index.d.ts",