@realsee/dnalogel 3.44.4 → 3.44.5
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.
- package/CHANGELOG.md +3 -0
- package/dist/PanoTagPlugin/controller/TagRender.d.ts +1 -1
- package/dist/PanoTagPlugin/utils/DebugUtil.d.ts +5 -0
- package/dist/index.cjs.js +3 -3
- package/dist/index.js +109 -79
- package/dist/index.umd.js +3 -3
- package/libs/CruisePlugin/Move.js +1 -1
- package/libs/CruisePlugin/Work.js +1 -1
- package/libs/CruisePlugin/index.js +1 -1
- package/libs/GuideLinePlugin/Controller.js +1 -1
- package/libs/GuideLinePlugin/GuideLineItem.js +1 -1
- package/libs/GuideLinePlugin/GuideLineModeItem.js +1 -1
- package/libs/GuideLinePlugin/index.js +1 -1
- package/libs/PanoTagPlugin/controller/TagRender.d.ts +1 -1
- package/libs/PanoTagPlugin/controller/TagRender.js +68 -68
- package/libs/PanoTagPlugin/controller/index.js +38 -44
- package/libs/PanoTagPlugin/index.js +1 -1
- package/libs/PanoTagPlugin/utils/DebugUtil.d.ts +5 -0
- package/libs/PanoTagPlugin/utils/DebugUtil.js +47 -8
- package/libs/base/BasePlugin.js +1 -1
- package/libs/index.js +1 -1
- package/libs/shared-utils/logger.js +1 -1
- package/package.json +1 -1
|
@@ -74,7 +74,6 @@ import "../shared-utils/animationFrame/BetterTween.js";
|
|
|
74
74
|
import "../shared-utils/animationFrame/index.js";
|
|
75
75
|
import "../shared-utils/three/loadTexture.js";
|
|
76
76
|
import "../PanoTagPlugin/controller/index.js";
|
|
77
|
-
import "../PanoTagPlugin/utils/addDebugPoints.js";
|
|
78
77
|
import "../PanoTagPlugin/utils/tag/tagCheck.js";
|
|
79
78
|
import "../PanoTagPlugin/utils/debounce.js";
|
|
80
79
|
import "../PanoTagPlugin/utils/throttle.js";
|
|
@@ -201,6 +200,7 @@ import "../shared-utils/five/FiveDomEvents.js";
|
|
|
201
200
|
import "../shared-utils/five/calculateThreeMouse.js";
|
|
202
201
|
import "../shared-utils/three/THREERaycaster.js";
|
|
203
202
|
import "../PanoTagPlugin/utils/DebugUtil.js";
|
|
203
|
+
import "../PanoTagPlugin/utils/addDebugPoints.js";
|
|
204
204
|
import "../PanoTagPlugin/controller/Tag/PointTag.js";
|
|
205
205
|
import "../PanoTagPlugin/utils/requestIdleCallback.js";
|
|
206
206
|
import "../PanoTagPlugin/controller/Tag/PlaneTag.js";
|
|
@@ -75,7 +75,6 @@ import "../shared-utils/animationFrame/index.js";
|
|
|
75
75
|
import "../shared-utils/three/loadTexture.js";
|
|
76
76
|
import "../PanoTagPlugin/controller/index.js";
|
|
77
77
|
import "../vendor/object-assign-deep/objectAssignDeep.js";
|
|
78
|
-
import "../PanoTagPlugin/utils/addDebugPoints.js";
|
|
79
78
|
import "../shared-utils/positionToVector3.js";
|
|
80
79
|
import "../PanoTagPlugin/utils/tag/tagCheck.js";
|
|
81
80
|
import "../PanoTagPlugin/utils/debounce.js";
|
|
@@ -202,6 +201,7 @@ import "../shared-utils/five/FiveDomEvents.js";
|
|
|
202
201
|
import "../shared-utils/five/calculateThreeMouse.js";
|
|
203
202
|
import "../shared-utils/three/THREERaycaster.js";
|
|
204
203
|
import "../PanoTagPlugin/utils/DebugUtil.js";
|
|
204
|
+
import "../PanoTagPlugin/utils/addDebugPoints.js";
|
|
205
205
|
import "../PanoTagPlugin/controller/Tag/PointTag.js";
|
|
206
206
|
import "../PanoTagPlugin/utils/requestIdleCallback.js";
|
|
207
207
|
import "../PanoTagPlugin/controller/Tag/PlaneTag.js";
|
|
@@ -42,7 +42,6 @@ import "../shared-utils/animationFrame/index.js";
|
|
|
42
42
|
import "../shared-utils/three/loadTexture.js";
|
|
43
43
|
import "../PanoTagPlugin/controller/index.js";
|
|
44
44
|
import "../vendor/object-assign-deep/objectAssignDeep.js";
|
|
45
|
-
import "../PanoTagPlugin/utils/addDebugPoints.js";
|
|
46
45
|
import "../shared-utils/positionToVector3.js";
|
|
47
46
|
import "../PanoTagPlugin/utils/tag/tagCheck.js";
|
|
48
47
|
import "../PanoTagPlugin/utils/debounce.js";
|
|
@@ -173,6 +172,7 @@ import "../shared-utils/five/FiveDomEvents.js";
|
|
|
173
172
|
import "../shared-utils/five/calculateThreeMouse.js";
|
|
174
173
|
import "../shared-utils/three/THREERaycaster.js";
|
|
175
174
|
import "../PanoTagPlugin/utils/DebugUtil.js";
|
|
175
|
+
import "../PanoTagPlugin/utils/addDebugPoints.js";
|
|
176
176
|
import "../PanoTagPlugin/controller/Tag/PointTag.js";
|
|
177
177
|
import "../PanoTagPlugin/utils/requestIdleCallback.js";
|
|
178
178
|
import "../PanoTagPlugin/controller/Tag/PlaneTag.js";
|
|
@@ -68,7 +68,6 @@ import "../shared-utils/animationFrame/BetterTween.js";
|
|
|
68
68
|
import "../shared-utils/animationFrame/index.js";
|
|
69
69
|
import "../shared-utils/three/loadTexture.js";
|
|
70
70
|
import "../PanoTagPlugin/controller/index.js";
|
|
71
|
-
import "../PanoTagPlugin/utils/addDebugPoints.js";
|
|
72
71
|
import "../shared-utils/positionToVector3.js";
|
|
73
72
|
import "../PanoTagPlugin/utils/tag/tagCheck.js";
|
|
74
73
|
import "../PanoTagPlugin/utils/debounce.js";
|
|
@@ -197,6 +196,7 @@ import "../shared-utils/five/FiveDomEvents.js";
|
|
|
197
196
|
import "../shared-utils/five/calculateThreeMouse.js";
|
|
198
197
|
import "../shared-utils/three/THREERaycaster.js";
|
|
199
198
|
import "../PanoTagPlugin/utils/DebugUtil.js";
|
|
199
|
+
import "../PanoTagPlugin/utils/addDebugPoints.js";
|
|
200
200
|
import "../PanoTagPlugin/controller/Tag/PointTag.js";
|
|
201
201
|
import "../PanoTagPlugin/utils/requestIdleCallback.js";
|
|
202
202
|
import "../PanoTagPlugin/controller/Tag/PlaneTag.js";
|
|
@@ -31,7 +31,6 @@ import "../shared-utils/animationFrame/index.js";
|
|
|
31
31
|
import "../shared-utils/three/loadTexture.js";
|
|
32
32
|
import "../PanoTagPlugin/controller/index.js";
|
|
33
33
|
import "../vendor/object-assign-deep/objectAssignDeep.js";
|
|
34
|
-
import "../PanoTagPlugin/utils/addDebugPoints.js";
|
|
35
34
|
import "../shared-utils/positionToVector3.js";
|
|
36
35
|
import "../PanoTagPlugin/utils/tag/tagCheck.js";
|
|
37
36
|
import "../PanoTagPlugin/utils/debounce.js";
|
|
@@ -169,6 +168,7 @@ import "../shared-utils/five/calculateThreeMouse.js";
|
|
|
169
168
|
import "../shared-utils/three/THREERaycaster.js";
|
|
170
169
|
import "../base/BasePlugin.js";
|
|
171
170
|
import "../PanoTagPlugin/utils/DebugUtil.js";
|
|
171
|
+
import "../PanoTagPlugin/utils/addDebugPoints.js";
|
|
172
172
|
import "../PanoTagPlugin/controller/Tag/PointTag.js";
|
|
173
173
|
import "../PanoTagPlugin/utils/requestIdleCallback.js";
|
|
174
174
|
import "../PanoTagPlugin/controller/Tag/PlaneTag.js";
|
|
@@ -27,7 +27,6 @@ import "animejs";
|
|
|
27
27
|
import "../shared-utils/util.js";
|
|
28
28
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
29
29
|
import "../shared-utils/animationFrame/index.js";
|
|
30
|
-
import "../PanoTagPlugin/utils/addDebugPoints.js";
|
|
31
30
|
import "../shared-utils/positionToVector3.js";
|
|
32
31
|
import "../PanoTagPlugin/utils/tag/tagCheck.js";
|
|
33
32
|
import "../PanoTagPlugin/utils/debounce.js";
|
|
@@ -166,6 +165,7 @@ import "../shared-utils/five/calculateThreeMouse.js";
|
|
|
166
165
|
import "../shared-utils/three/THREERaycaster.js";
|
|
167
166
|
import "../base/BasePlugin.js";
|
|
168
167
|
import "../PanoTagPlugin/utils/DebugUtil.js";
|
|
168
|
+
import "../PanoTagPlugin/utils/addDebugPoints.js";
|
|
169
169
|
import "../PanoTagPlugin/controller/Tag/PointTag.js";
|
|
170
170
|
import "../PanoTagPlugin/utils/requestIdleCallback.js";
|
|
171
171
|
import "../PanoTagPlugin/controller/Tag/PlaneTag.js";
|
|
@@ -49,7 +49,6 @@ import "../shared-utils/animationFrame/BetterTween.js";
|
|
|
49
49
|
import "../shared-utils/animationFrame/index.js";
|
|
50
50
|
import "../shared-utils/three/loadTexture.js";
|
|
51
51
|
import "../PanoTagPlugin/controller/index.js";
|
|
52
|
-
import "../PanoTagPlugin/utils/addDebugPoints.js";
|
|
53
52
|
import "../shared-utils/positionToVector3.js";
|
|
54
53
|
import "../PanoTagPlugin/utils/tag/tagCheck.js";
|
|
55
54
|
import "../PanoTagPlugin/utils/debounce.js";
|
|
@@ -176,6 +175,7 @@ import "../shared-utils/five/FiveDomEvents.js";
|
|
|
176
175
|
import "../shared-utils/five/calculateThreeMouse.js";
|
|
177
176
|
import "../shared-utils/three/THREERaycaster.js";
|
|
178
177
|
import "../PanoTagPlugin/utils/DebugUtil.js";
|
|
178
|
+
import "../PanoTagPlugin/utils/addDebugPoints.js";
|
|
179
179
|
import "../PanoTagPlugin/controller/Tag/PointTag.js";
|
|
180
180
|
import "../PanoTagPlugin/utils/requestIdleCallback.js";
|
|
181
181
|
import "../PanoTagPlugin/controller/Tag/PlaneTag.js";
|
|
@@ -33,7 +33,7 @@ export declare abstract class TagRender extends TagUtil {
|
|
|
33
33
|
/**
|
|
34
34
|
* @description 渲染3D贴片
|
|
35
35
|
*/
|
|
36
|
-
updateRender3DDomTag
|
|
36
|
+
updateRender3DDomTag(tag?: TagInstance | TagInstance[]): void;
|
|
37
37
|
/** 更新标签中多媒体面片的位置
|
|
38
38
|
* @param tag 标签
|
|
39
39
|
* @param model 模型
|
|
@@ -186,74 +186,6 @@ class Se extends U {
|
|
|
186
186
|
c(this, "temporaryState", { visible: !0 });
|
|
187
187
|
/** 点标签 */
|
|
188
188
|
c(this, "TagContainerSvelte");
|
|
189
|
-
/**
|
|
190
|
-
* @description 渲染3D贴片
|
|
191
|
-
*/
|
|
192
|
-
c(this, "updateRender3DDomTag", (t) => {
|
|
193
|
-
(t ? N(t) : this.filterCSS3DTag).forEach((o) => {
|
|
194
|
-
var i, a, d, n, h, b;
|
|
195
|
-
if (o.tag3DContentSvelte) {
|
|
196
|
-
const { svelteApp: f, css3DInstance: l, initialNormal: u, currentNormal: s } = o.tag3DContentSvelte;
|
|
197
|
-
if ((a = l == null ? void 0 : l.css3DObject) == null || a.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(s)) {
|
|
198
|
-
const p = new G().setFromUnitVectors(u, s);
|
|
199
|
-
l.css3DObject.setRotationFromQuaternion(p);
|
|
200
|
-
}
|
|
201
|
-
return;
|
|
202
|
-
} else {
|
|
203
|
-
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)
|
|
204
|
-
return;
|
|
205
|
-
if (o.stickType === "3DPoint" && !o.normal)
|
|
206
|
-
return console.error("updateRenderPlaneTag: 三维点标签缺少法向量!");
|
|
207
|
-
const f = this.getPositions(o);
|
|
208
|
-
if (!f)
|
|
209
|
-
return;
|
|
210
|
-
const l = o.computeNormal();
|
|
211
|
-
if (!l)
|
|
212
|
-
return;
|
|
213
|
-
const u = o.getConfig(), s = w({
|
|
214
|
-
wrapperStyle: { zIndex: `${Math.round((1e4 - ((h = o.getDistance()) != null ? h : 0)) * 100)}` }
|
|
215
|
-
}, u.tag3DConfig);
|
|
216
|
-
if (o.computeRenderType() === "BehindDom" || s.mode === "behind") {
|
|
217
|
-
s.mode = "behind", s.container = document.createElement("div");
|
|
218
|
-
const D = "black";
|
|
219
|
-
s.container.style.backgroundColor = D, s.container.style.border = `3px solid ${D}`, this.css3DRenderPlugin.hooks.on("render", () => {
|
|
220
|
-
var S;
|
|
221
|
-
if (p.css3DObject.opacityMesh && u.clickable !== !1) {
|
|
222
|
-
const j = this.addObjectClickHandler(o, p.css3DObject.opacityMesh, (k) => {
|
|
223
|
-
this.hooks.emit("click", { event: k, target: "TagContent", tag: o });
|
|
224
|
-
});
|
|
225
|
-
(S = this.store.css3DRenderDisposer.get(o.id)) == null || S.push(j);
|
|
226
|
-
}
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
const p = this.css3DRenderPlugin.create3DDomContainer(f, s);
|
|
230
|
-
if (!p)
|
|
231
|
-
return;
|
|
232
|
-
this.store.css3DRenderDisposer.set(o.id, [p.dispose]);
|
|
233
|
-
const g = new E({
|
|
234
|
-
target: p.container,
|
|
235
|
-
props: {
|
|
236
|
-
tag: o,
|
|
237
|
-
hooks: this.hooks,
|
|
238
|
-
/** 模型标签要等模型加载好之后再展示 */
|
|
239
|
-
state: this.state,
|
|
240
|
-
mediaStore: this.mediaStore,
|
|
241
|
-
temporaryState: this.temporaryState
|
|
242
|
-
}
|
|
243
|
-
});
|
|
244
|
-
o.tag3DContentSvelte = {
|
|
245
|
-
svelteApp: g,
|
|
246
|
-
domContainer: p,
|
|
247
|
-
css3DInstance: p,
|
|
248
|
-
initialNormal: l,
|
|
249
|
-
currentNormal: l,
|
|
250
|
-
dispose: () => {
|
|
251
|
-
g.$destroy(), p.dispose();
|
|
252
|
-
}
|
|
253
|
-
}, P(o) && ((b = o.model) != null && b.object) && this.updateTagCss3DObjectMatrix(o, o.model.object);
|
|
254
|
-
}
|
|
255
|
-
}), this.clearUnusedPanelTag();
|
|
256
|
-
});
|
|
257
189
|
this.group.name = "PanoTagPluginModelGroup", this.gltfObjectGroup.name = "PanoTagPluginGLTFObjectGroup", this.imagePlaneGroup.name = "ImagePlaneGroup", this.group.add(this.gltfObjectGroup), this.group.add(this.imagePlaneGroup);
|
|
258
190
|
}
|
|
259
191
|
/**
|
|
@@ -278,6 +210,74 @@ class Se extends U {
|
|
|
278
210
|
(i = (o = e.mediaPlane) == null ? void 0 : o.parent) == null || i.remove(e.mediaPlane);
|
|
279
211
|
}), 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();
|
|
280
212
|
}
|
|
213
|
+
/**
|
|
214
|
+
* @description 渲染3D贴片
|
|
215
|
+
*/
|
|
216
|
+
updateRender3DDomTag(t) {
|
|
217
|
+
(t ? N(t) : this.filterCSS3DTag).forEach((o) => {
|
|
218
|
+
var i, a, d, n, h, b;
|
|
219
|
+
if (o.tag3DContentSvelte) {
|
|
220
|
+
const { svelteApp: f, css3DInstance: l, initialNormal: u, currentNormal: s } = o.tag3DContentSvelte;
|
|
221
|
+
if ((a = l == null ? void 0 : l.css3DObject) == null || a.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(s)) {
|
|
222
|
+
const p = new G().setFromUnitVectors(u, s);
|
|
223
|
+
l.css3DObject.setRotationFromQuaternion(p);
|
|
224
|
+
}
|
|
225
|
+
return;
|
|
226
|
+
} else {
|
|
227
|
+
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)
|
|
228
|
+
return;
|
|
229
|
+
if (o.stickType === "3DPoint" && !o.normal)
|
|
230
|
+
return console.error("updateRenderPlaneTag: 三维点标签缺少法向量!");
|
|
231
|
+
const f = this.getPositions(o);
|
|
232
|
+
if (!f)
|
|
233
|
+
return;
|
|
234
|
+
const l = o.computeNormal();
|
|
235
|
+
if (!l)
|
|
236
|
+
return;
|
|
237
|
+
const u = o.getConfig(), s = w({
|
|
238
|
+
wrapperStyle: { zIndex: `${Math.round((1e4 - ((h = o.getDistance()) != null ? h : 0)) * 100)}` }
|
|
239
|
+
}, u.tag3DConfig);
|
|
240
|
+
if (o.computeRenderType() === "BehindDom" || s.mode === "behind") {
|
|
241
|
+
s.mode = "behind", s.container = document.createElement("div");
|
|
242
|
+
const D = "black";
|
|
243
|
+
s.container.style.backgroundColor = D, s.container.style.border = `3px solid ${D}`, this.css3DRenderPlugin.hooks.on("render", () => {
|
|
244
|
+
var S;
|
|
245
|
+
if (p.css3DObject.opacityMesh && u.clickable !== !1) {
|
|
246
|
+
const j = this.addObjectClickHandler(o, p.css3DObject.opacityMesh, (k) => {
|
|
247
|
+
this.hooks.emit("click", { event: k, target: "TagContent", tag: o });
|
|
248
|
+
});
|
|
249
|
+
(S = this.store.css3DRenderDisposer.get(o.id)) == null || S.push(j);
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
const p = this.css3DRenderPlugin.create3DDomContainer(f, s);
|
|
254
|
+
if (!p)
|
|
255
|
+
return;
|
|
256
|
+
this.store.css3DRenderDisposer.set(o.id, [p.dispose]);
|
|
257
|
+
const g = new E({
|
|
258
|
+
target: p.container,
|
|
259
|
+
props: {
|
|
260
|
+
tag: o,
|
|
261
|
+
hooks: this.hooks,
|
|
262
|
+
/** 模型标签要等模型加载好之后再展示 */
|
|
263
|
+
state: this.state,
|
|
264
|
+
mediaStore: this.mediaStore,
|
|
265
|
+
temporaryState: this.temporaryState
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
o.tag3DContentSvelte = {
|
|
269
|
+
svelteApp: g,
|
|
270
|
+
domContainer: p,
|
|
271
|
+
css3DInstance: p,
|
|
272
|
+
initialNormal: l,
|
|
273
|
+
currentNormal: l,
|
|
274
|
+
dispose: () => {
|
|
275
|
+
g.$destroy(), p.dispose();
|
|
276
|
+
}
|
|
277
|
+
}, P(o) && ((b = o.model) != null && b.object) && this.updateTagCss3DObjectMatrix(o, o.model.object);
|
|
278
|
+
}
|
|
279
|
+
}), this.clearUnusedPanelTag();
|
|
280
|
+
}
|
|
281
281
|
/** 更新标签中多媒体面片的位置
|
|
282
282
|
* @param tag 标签
|
|
283
283
|
* @param model 模型
|
|
@@ -29,30 +29,29 @@ 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 {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import { debounce as _ } from "../utils/debounce.js";
|
|
32
|
+
import { arrayPositionToVector3 as A } from "../../shared-utils/positionToVector3.js";
|
|
33
|
+
import { isModelTag as k, isMediaModelTag as w } from "../utils/tag/tagCheck.js";
|
|
34
|
+
import { debounce as M } from "../utils/debounce.js";
|
|
36
35
|
import { throttle as y } from "../utils/throttle.js";
|
|
37
|
-
import
|
|
38
|
-
import { generateBlankAudio as L, AudioNamespace as
|
|
36
|
+
import _, { getTagStickType as I } from "../utils/tag/format.js";
|
|
37
|
+
import { generateBlankAudio as L, AudioNamespace as B } from "../../shared-utils/audio.js";
|
|
39
38
|
import { resizeObserver as C } from "../../shared-utils/dom/resizeObserver.js";
|
|
40
|
-
import { TagRender as
|
|
41
|
-
import { isModelLike as
|
|
39
|
+
import { TagRender as O } from "./TagRender.js";
|
|
40
|
+
import { isModelLike as R } from "../../shared-utils/five/mode.js";
|
|
42
41
|
import "hammerjs";
|
|
43
42
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
44
43
|
import "@realsee/five/line";
|
|
45
44
|
import "../../shared-utils/three/THREESphere.js";
|
|
46
45
|
import "animejs";
|
|
47
|
-
import { nextFrame as
|
|
48
|
-
import { waitFiveModelLoaded as
|
|
49
|
-
import { DebugUtil as
|
|
46
|
+
import { nextFrame as G } from "../../shared-utils/animationFrame/index.js";
|
|
47
|
+
import { waitFiveModelLoaded as N } from "../../shared-utils/five/fiveModelLoad.js";
|
|
48
|
+
import { DebugUtil as V } from "../utils/DebugUtil.js";
|
|
50
49
|
import { safeObj as T } from "../../shared-utils/safeObj.js";
|
|
51
|
-
import { PointTag as
|
|
52
|
-
import { ModelTag as
|
|
53
|
-
import { PlaneTag as
|
|
54
|
-
import
|
|
55
|
-
import { tweenProgress as
|
|
50
|
+
import { PointTag as z } from "./Tag/PointTag.js";
|
|
51
|
+
import { ModelTag as x } from "./Tag/ModelTag.js";
|
|
52
|
+
import { PlaneTag as Q } from "./Tag/PlaneTag.js";
|
|
53
|
+
import $ from "../Components/TagContainer.js";
|
|
54
|
+
import { tweenProgress as W } from "../../shared-utils/animationFrame/BetterTween.js";
|
|
56
55
|
import "../Components/Tag/index.js";
|
|
57
56
|
import "../../vendor/svelte/internal/index.js";
|
|
58
57
|
import "../Components/Tag/TextTag/index.js";
|
|
@@ -184,18 +183,19 @@ import "../../shared-utils/five/FiveDomEvents.js";
|
|
|
184
183
|
import "../../shared-utils/five/calculateThreeMouse.js";
|
|
185
184
|
import "../../shared-utils/three/THREERaycaster.js";
|
|
186
185
|
import "../../base/BasePlugin.js";
|
|
186
|
+
import "../utils/addDebugPoints.js";
|
|
187
187
|
import "../utils/requestIdleCallback.js";
|
|
188
188
|
import "../Components/TagItem.js";
|
|
189
189
|
import "../Components/Common/TagPoint.js";
|
|
190
|
-
const S = "Dnalogel-PanoTagPlugin",
|
|
191
|
-
class
|
|
190
|
+
const S = "Dnalogel-PanoTagPlugin", $i = (d) => `${S}--${d}`;
|
|
191
|
+
class Wi extends O {
|
|
192
192
|
constructor(e, t) {
|
|
193
193
|
super(e);
|
|
194
194
|
/** state */
|
|
195
195
|
p(this, "state", { enabled: !0, visible: !0 });
|
|
196
196
|
/** debug */
|
|
197
197
|
p(this, "debug");
|
|
198
|
-
p(this, "debugUtil", new
|
|
198
|
+
p(this, "debugUtil", new V(this));
|
|
199
199
|
/** 更改 tag 模型 */
|
|
200
200
|
p(this, "changeTagModel", (e, t) => l(this, null, function* () {
|
|
201
201
|
var i;
|
|
@@ -205,7 +205,7 @@ class ji extends R {
|
|
|
205
205
|
const t = () => {
|
|
206
206
|
this.tags.forEach((i) => {
|
|
207
207
|
i.state.visible = !1, i.applyVisible(), this.five.ready().then(() => {
|
|
208
|
-
i.updateVisible(),
|
|
208
|
+
i.updateVisible(), w(i) && e !== "Panorama" && this.changeTagMode(i, "behind");
|
|
209
209
|
});
|
|
210
210
|
});
|
|
211
211
|
};
|
|
@@ -236,7 +236,7 @@ class ji extends R {
|
|
|
236
236
|
p(this, "handleFivePanoArrived", () => l(this, null, function* () {
|
|
237
237
|
this.tags.forEach((e) => {
|
|
238
238
|
e.state.visible = !1, e.temporaryState = c(f({}, e.temporaryState), { visible: !0 }), e.applyVisible(), e.updateVisible();
|
|
239
|
-
}), this.temporaryState.visible = !0, this.addRenderQueue({ type: "TagContainerSvelte", keys: ["temporaryState"] }), yield this.setUnfolded(), this.updateRender3DDomTag(), this.tags.filter(
|
|
239
|
+
}), this.temporaryState.visible = !0, this.addRenderQueue({ type: "TagContainerSvelte", keys: ["temporaryState"] }), yield this.setUnfolded(), this.updateRender3DDomTag(), this.tags.filter(k).filter((e) => {
|
|
240
240
|
var t;
|
|
241
241
|
return (t = e.getConfig().modelConfig) == null ? void 0 : t.autoLookAtEnabled;
|
|
242
242
|
}).forEach((e) => {
|
|
@@ -247,7 +247,7 @@ class ji extends R {
|
|
|
247
247
|
t.position.copy(i.position), t.quaternion.copy(i.quaternion);
|
|
248
248
|
const o = this.five.camera.position;
|
|
249
249
|
t.lookAt(o.clone().setY(t.position.y));
|
|
250
|
-
const s = i.quaternion.clone(), n = t.quaternion.clone(), r =
|
|
250
|
+
const s = i.quaternion.clone(), n = t.quaternion.clone(), r = W();
|
|
251
251
|
r.onUpdate(({ progress: g }) => {
|
|
252
252
|
i.quaternion.copy(s.clone().slerp(n, g));
|
|
253
253
|
}), r.play();
|
|
@@ -258,7 +258,7 @@ class ji extends R {
|
|
|
258
258
|
this.tags.forEach((e) => e.updateVisible());
|
|
259
259
|
});
|
|
260
260
|
p(this, "onFiveEveryReady", () => {
|
|
261
|
-
this.setUnfoldedByCamera(),
|
|
261
|
+
this.setUnfoldedByCamera(), R(this.five.getCurrentState().mode) && this.tags.forEach((e) => e.updateVisible());
|
|
262
262
|
});
|
|
263
263
|
p(this, "render", () => {
|
|
264
264
|
this.renderQueue.forEach((e, t) => {
|
|
@@ -285,10 +285,10 @@ class ji extends R {
|
|
|
285
285
|
} else {
|
|
286
286
|
if (!this.container)
|
|
287
287
|
return console.error("updateRenderPlaneTag: tag2DContainer not found");
|
|
288
|
-
this.TagContainerSvelte = new
|
|
288
|
+
this.TagContainerSvelte = new $({
|
|
289
289
|
target: this.container,
|
|
290
290
|
props: c(f({}, n), { state: c(f({}, this.state), { enabled: !1 }) })
|
|
291
|
-
}),
|
|
291
|
+
}), G(() => {
|
|
292
292
|
var r;
|
|
293
293
|
(r = this.TagContainerSvelte) == null || r.$set({ state: this.state });
|
|
294
294
|
});
|
|
@@ -296,7 +296,7 @@ class ji extends R {
|
|
|
296
296
|
}
|
|
297
297
|
}), this.renderQueue.clear();
|
|
298
298
|
});
|
|
299
|
-
this.params = m({}, { debug: !1, config: this.config }, f({}, t)), this.debug = this.params.debug, this.config = this.params.config, L(1, { namespace:
|
|
299
|
+
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 });
|
|
300
300
|
try {
|
|
301
301
|
Array.isArray(window.__PANOTAGPLUGIN_DEBUG_LIST__) || (window.__PANOTAGPLUGIN_DEBUG_LIST__ = []), window.__PANOTAGPLUGIN_DEBUG_LIST__.push(this), window.__PANOTAGPLUGIN_DEBUG__ || Object.defineProperty(window, "__PANOTAGPLUGIN_DEBUG__", {
|
|
302
302
|
get: function() {
|
|
@@ -308,7 +308,7 @@ class ji extends R {
|
|
|
308
308
|
}
|
|
309
309
|
appendTo(e) {
|
|
310
310
|
var i, o, s, n;
|
|
311
|
-
this.container = e, (i = this.css3DRenderPlugin) == null || i.appendToFrontFiveContainer(this.container);
|
|
311
|
+
this.debugUtil.addLog("appendTo"), this.container = e, (i = this.css3DRenderPlugin) == null || i.appendToFrontFiveContainer(this.container);
|
|
312
312
|
const t = (s = (o = this.TagContainerSvelte) == null ? void 0 : o.$$) == null ? void 0 : s.root;
|
|
313
313
|
t && t !== this.container && ((n = this.TagContainerSvelte) == null || n.$destroy(), this.TagContainerSvelte = void 0);
|
|
314
314
|
}
|
|
@@ -323,13 +323,7 @@ class ji extends R {
|
|
|
323
323
|
contentTypeConfig: (o = e.contentTypeConfig) != null ? o : {}
|
|
324
324
|
});
|
|
325
325
|
const t = yield this.addTag(e.tagList);
|
|
326
|
-
|
|
327
|
-
try {
|
|
328
|
-
A(this.five, this.tags);
|
|
329
|
-
} catch (s) {
|
|
330
|
-
console.error(s);
|
|
331
|
-
}
|
|
332
|
-
return t;
|
|
326
|
+
return this.hooks.emit("loaded"), t;
|
|
333
327
|
});
|
|
334
328
|
}
|
|
335
329
|
/**
|
|
@@ -338,15 +332,15 @@ class ji extends R {
|
|
|
338
332
|
addTag(e) {
|
|
339
333
|
return l(this, null, function* () {
|
|
340
334
|
const i = (Array.isArray(e) ? e : [e]).filter((o) => o.position).map((o) => {
|
|
341
|
-
const s =
|
|
335
|
+
const s = I(o);
|
|
342
336
|
if (s === "2DPoint" || s === "3DPoint")
|
|
343
|
-
return new
|
|
337
|
+
return new z(this, o);
|
|
344
338
|
if (s === "Model")
|
|
345
|
-
return new
|
|
339
|
+
return new x(this, o);
|
|
346
340
|
if (s === "Plane")
|
|
347
|
-
return new
|
|
341
|
+
return new Q(this, o);
|
|
348
342
|
});
|
|
349
|
-
return i.forEach(
|
|
343
|
+
return i.forEach(_), this.tags.push(...i), this.tagsLengthWillUpdate = !0, N(this.five).then(() => l(this, null, function* () {
|
|
350
344
|
var o, s;
|
|
351
345
|
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) => {
|
|
352
346
|
n.updateVisible(), n.updateZIndex();
|
|
@@ -459,7 +453,7 @@ class ji extends R {
|
|
|
459
453
|
*/
|
|
460
454
|
changeTagNormalById(e, t) {
|
|
461
455
|
const i = this.getTagById(e);
|
|
462
|
-
i && i.tag3DContentSvelte && (i.tag3DContentSvelte.currentNormal =
|
|
456
|
+
i && i.tag3DContentSvelte && (i.tag3DContentSvelte.currentNormal = A(t));
|
|
463
457
|
}
|
|
464
458
|
/**
|
|
465
459
|
* @description 改变data
|
|
@@ -555,7 +549,7 @@ class ji extends R {
|
|
|
555
549
|
}, 500),
|
|
556
550
|
e
|
|
557
551
|
), { observe: n, unobserve: r } = C(
|
|
558
|
-
|
|
552
|
+
M(() => t(), 400),
|
|
559
553
|
e
|
|
560
554
|
);
|
|
561
555
|
return o(), n(), () => {
|
|
@@ -599,7 +593,7 @@ class ji extends R {
|
|
|
599
593
|
}
|
|
600
594
|
}
|
|
601
595
|
export {
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
596
|
+
Wi as PanoTagPluginController,
|
|
597
|
+
Wi as default,
|
|
598
|
+
$i as pluginFlag
|
|
605
599
|
};
|
|
@@ -4,7 +4,6 @@ import { defaultGlobalConfig as er } from "./typings/tag/TagConfig.js";
|
|
|
4
4
|
import { ContentType as ar, DimensionType as fr, PointType as gr } from "./Archive/deprecated.js";
|
|
5
5
|
import "three";
|
|
6
6
|
import "../vendor/object-assign-deep/objectAssignDeep.js";
|
|
7
|
-
import "./utils/addDebugPoints.js";
|
|
8
7
|
import "../shared-utils/positionToVector3.js";
|
|
9
8
|
import "./utils/tag/tagCheck.js";
|
|
10
9
|
import "./utils/debounce.js";
|
|
@@ -154,6 +153,7 @@ import "../shared-utils/three/THREERaycaster.js";
|
|
|
154
153
|
import "../base/BasePlugin.js";
|
|
155
154
|
import "../shared-utils/animationFrame/index.js";
|
|
156
155
|
import "./utils/DebugUtil.js";
|
|
156
|
+
import "./utils/addDebugPoints.js";
|
|
157
157
|
import "./controller/Tag/PointTag.js";
|
|
158
158
|
import "./utils/requestIdleCallback.js";
|
|
159
159
|
import "./controller/Tag/PlaneTag.js";
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import type PanoTagPluginController from '../controller';
|
|
2
2
|
export declare class DebugUtil {
|
|
3
3
|
plugin: PanoTagPluginController;
|
|
4
|
+
get debug(): boolean;
|
|
5
|
+
private logBinded;
|
|
4
6
|
constructor(plugin: PanoTagPluginController);
|
|
7
|
+
addDebugPoints(): void;
|
|
8
|
+
bindLog(): void;
|
|
9
|
+
addLog(functionName: string, ...args: any[]): void;
|
|
5
10
|
private closeIntersectRaycaster;
|
|
6
11
|
}
|
|
@@ -1,16 +1,55 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { safeObj as
|
|
5
|
-
|
|
1
|
+
var c = Object.defineProperty;
|
|
2
|
+
var a = (t, i, e) => i in t ? c(t, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[i] = e;
|
|
3
|
+
var o = (t, i, e) => (a(t, typeof i != "symbol" ? i + "" : i, e), e);
|
|
4
|
+
import { safeObj as g } from "../../shared-utils/safeObj.js";
|
|
5
|
+
import { addDebugPoints as d } from "./addDebugPoints.js";
|
|
6
|
+
import "three";
|
|
7
|
+
import "../../shared-utils/positionToVector3.js";
|
|
8
|
+
class y {
|
|
6
9
|
constructor(i) {
|
|
7
|
-
|
|
10
|
+
o(this, "plugin");
|
|
11
|
+
o(this, "logBinded", !1);
|
|
8
12
|
this.plugin = i;
|
|
9
13
|
}
|
|
14
|
+
get debug() {
|
|
15
|
+
return this.plugin.debug;
|
|
16
|
+
}
|
|
17
|
+
addDebugPoints() {
|
|
18
|
+
try {
|
|
19
|
+
d(this.plugin.five, this.plugin.tags);
|
|
20
|
+
} catch (i) {
|
|
21
|
+
console.error(i);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
bindLog() {
|
|
25
|
+
if (this.logBinded)
|
|
26
|
+
return;
|
|
27
|
+
this.logBinded = !0;
|
|
28
|
+
const i = (e) => {
|
|
29
|
+
Object.getOwnPropertyNames(e).forEach((n) => {
|
|
30
|
+
typeof e[n] == "function" && (e[n] = new Proxy(e[n], {
|
|
31
|
+
apply: (s, l, r) => (["render"].includes(n) || this.addLog(n, ...r), s.apply(l, r))
|
|
32
|
+
}));
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
i(this.plugin), i(this.plugin.constructor.prototype);
|
|
36
|
+
}
|
|
37
|
+
addLog(i, ...e) {
|
|
38
|
+
if (this.debug) {
|
|
39
|
+
let n = new Error().stack;
|
|
40
|
+
console.debug(
|
|
41
|
+
`%cPanoTagPlugin%c${i}`,
|
|
42
|
+
"background-color: #35e0ed; color: black; padding:0 6px; border-radius: 3px",
|
|
43
|
+
"padding: 0 3px; color: #f3f47c",
|
|
44
|
+
...e,
|
|
45
|
+
{ stack: n }
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
10
49
|
closeIntersectRaycaster() {
|
|
11
50
|
this.plugin.tags.forEach((i) => {
|
|
12
51
|
var e;
|
|
13
|
-
|
|
52
|
+
g((e = i == null ? void 0 : i.initialConfig) == null ? void 0 : e.visibleConfig).intersectRaycaster && (i.initialConfig.visibleConfig.intersectRaycaster.enabled = !1);
|
|
14
53
|
}), this.plugin.changeGlobalConfig({
|
|
15
54
|
visibleConfig: {
|
|
16
55
|
intersectRaycaster: {
|
|
@@ -21,5 +60,5 @@ class r {
|
|
|
21
60
|
}
|
|
22
61
|
}
|
|
23
62
|
export {
|
|
24
|
-
|
|
63
|
+
y as DebugUtil
|
|
25
64
|
};
|
package/libs/base/BasePlugin.js
CHANGED
package/libs/index.js
CHANGED
|
@@ -276,7 +276,6 @@ import "./vendor/gl-vec2/dot.js";
|
|
|
276
276
|
import "./shared-utils/math/intersecting.js";
|
|
277
277
|
import "./shared-utils/five/mode.js";
|
|
278
278
|
import "./shared-utils/three/blink.js";
|
|
279
|
-
import "./PanoTagPlugin/utils/addDebugPoints.js";
|
|
280
279
|
import "./PanoTagPlugin/utils/tag/tagCheck.js";
|
|
281
280
|
import "./PanoTagPlugin/utils/debounce.js";
|
|
282
281
|
import "./PanoTagPlugin/utils/throttle.js";
|
|
@@ -376,6 +375,7 @@ import "./PanoTagPlugin/utils/normalPositionToPositions.js";
|
|
|
376
375
|
import "./shared-utils/five/FiveDomEvents.js";
|
|
377
376
|
import "./shared-utils/three/THREERaycaster.js";
|
|
378
377
|
import "./PanoTagPlugin/utils/DebugUtil.js";
|
|
378
|
+
import "./PanoTagPlugin/utils/addDebugPoints.js";
|
|
379
379
|
import "./PanoTagPlugin/controller/Tag/PointTag.js";
|
|
380
380
|
import "./PanoTagPlugin/utils/requestIdleCallback.js";
|
|
381
381
|
import "./PanoTagPlugin/controller/Tag/PlaneTag.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function A() {
|
|
2
2
|
console.debug(
|
|
3
|
-
"%c %c@realsee/dnalogel %cv3.44.
|
|
3
|
+
"%c %c@realsee/dnalogel %cv3.44.5",
|
|
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",
|