@realsee/dnalogel 3.47.13 → 3.47.15
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 +8 -0
- package/dist/PanoTagPlugin/utils/requestIdleCallback.d.ts +1 -1
- package/dist/Sculpt/Meshes/Line.d.ts +1 -0
- package/dist/Sculpt/Meshes/Polygon.d.ts +2 -1
- package/dist/index.cjs.js +53 -53
- package/dist/index.js +18650 -18640
- package/dist/index.umd.js +47 -47
- package/libs/AreaMakerPlugin/Controller.js +78 -150
- package/libs/AreaMakerPlugin/index.js +3 -75
- package/libs/AreaMakerPlugin/utils/Item.js +111 -185
- package/libs/CSS3DRenderPlugin/Controller.js +29 -86
- package/libs/CSS3DRenderPlugin/index.js +12 -69
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +58 -127
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +113 -174
- package/libs/CruisePlugin/BaseController.js +50 -122
- package/libs/CruisePlugin/Move.js +21 -74
- package/libs/CruisePlugin/Work.js +46 -99
- package/libs/CruisePlugin/index.js +26 -79
- package/libs/CurrentPanoImagePlugin/Controller.js +104 -176
- package/libs/CurrentPanoImagePlugin/index.js +4 -76
- package/libs/GuideLinePlugin/Controller.js +26 -79
- package/libs/GuideLinePlugin/GuideLineItem.js +24 -77
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +2 -3
- package/libs/GuideLinePlugin/GuideLineModeItem.js +22 -75
- package/libs/GuideLinePlugin/index.js +26 -79
- package/libs/ModelMakerPlugin/Controller.js +83 -139
- package/libs/ModelMakerPlugin/index.js +16 -72
- package/libs/ModelTVVideoPlugin/Plugin.js +48 -105
- package/libs/ModelTVVideoPlugin/index.js +7 -64
- package/libs/Object3DHelperPlugin/Controller.js +32 -56
- package/libs/Object3DHelperPlugin/index.js +12 -35
- package/libs/PanoCompassPlugin/Controller.js +37 -93
- package/libs/PanoCompassPlugin/index.js +11 -67
- package/libs/PanoDoorLabelPlugin/BaseController.js +25 -97
- package/libs/PanoDoorLabelPlugin/Controller.js +115 -187
- package/libs/PanoDoorLabelPlugin/index.js +4 -76
- package/libs/PanoMeasurePlugin/Components/Controller0.js +83 -128
- package/libs/PanoMeasurePlugin/Components/Controller1.js +96 -141
- package/libs/PanoMeasurePlugin/Controller/EditController.js +66 -111
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +51 -121
- package/libs/PanoMeasurePlugin/Controller/index.js +59 -101
- package/libs/PanoMeasurePlugin/Model/area.js +21 -91
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +0 -73
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +27 -72
- package/libs/PanoMeasurePlugin/index.js +25 -67
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +17 -89
- package/libs/PanoSpatialTagPlugin/Plugin.js +106 -163
- package/libs/PanoSpatialTagPlugin/index.js +5 -62
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +67 -141
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +208 -281
- package/libs/PanoTagPlugin/Components/Tag/index.js +180 -251
- package/libs/PanoTagPlugin/Components/TagContainer.js +80 -151
- package/libs/PanoTagPlugin/Components/TagItem.js +67 -138
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +61 -132
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +28 -99
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +30 -101
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +36 -107
- package/libs/PanoTagPlugin/controller/TagRender.js +68 -121
- package/libs/PanoTagPlugin/controller/TagUtil.js +79 -132
- package/libs/PanoTagPlugin/controller/index.js +55 -108
- package/libs/PanoTagPlugin/index.js +31 -84
- package/libs/PanoTagPlugin/utils/requestIdleCallback.d.ts +1 -1
- package/libs/PanoTagPlugin/utils/requestIdleCallback.js +5 -13
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +30 -104
- package/libs/PanoVideoPlugin/Controller.js +64 -136
- package/libs/PanoVideoPlugin/VideoMeshController.js +74 -148
- package/libs/PanoVideoPlugin/index.js +8 -80
- package/libs/PipelinePlugin/Controller.js +128 -199
- package/libs/PipelinePlugin/index.js +5 -76
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +17 -91
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +14 -88
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +56 -130
- package/libs/Sculpt/Meshes/Box.js +5 -6
- package/libs/Sculpt/Meshes/Cylinder.js +2 -3
- package/libs/Sculpt/Meshes/Line.d.ts +1 -0
- package/libs/Sculpt/Meshes/Line.js +50 -41
- package/libs/Sculpt/Meshes/Point.js +9 -10
- package/libs/Sculpt/Meshes/Polygon.d.ts +2 -1
- package/libs/Sculpt/Meshes/Polygon.js +47 -37
- package/libs/Sculpt/Meshes/Polyline.js +18 -16
- package/libs/Sculpt/Meshes/Rectangle.js +3 -4
- package/libs/Sculpt/Objects/Line/Editor.js +2 -3
- package/libs/Sculpt/Objects/Rectangle/index.js +1 -1
- package/libs/Sculpt/utils/removeAllTag.js +4 -4
- package/libs/Sculpt/utils/three/ColoredMesh.js +3 -4
- package/libs/base/BasePlugin.js +3 -4
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +59 -128
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +6 -75
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +59 -129
- package/libs/floorplan/ModelFloorplanPlugin/index.js +5 -75
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +62 -134
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +4 -76
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +81 -151
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +5 -75
- package/libs/floorplan/index.js +0 -1
- package/libs/index.js +62 -62
- package/libs/shared-utils/five/index.js +2 -3
- package/libs/shared-utils/five/lookObject.js +17 -18
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/three/index.js +0 -1
- package/package.json +1 -1
|
@@ -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 = (a,
|
|
5
|
-
for (var t in
|
|
6
|
-
O.call(
|
|
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]);
|
|
7
7
|
if (v)
|
|
8
|
-
for (var t of v(
|
|
9
|
-
A.call(
|
|
8
|
+
for (var t of v(r))
|
|
9
|
+
A.call(r, t) && T(a, t, r[t]);
|
|
10
10
|
return a;
|
|
11
11
|
};
|
|
12
|
-
var d = (a,
|
|
13
|
-
var w = (a,
|
|
14
|
-
var
|
|
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
15
|
try {
|
|
16
|
-
l(t.next(
|
|
16
|
+
l(t.next(s));
|
|
17
17
|
} catch (h) {
|
|
18
18
|
o(h);
|
|
19
19
|
}
|
|
20
|
-
},
|
|
20
|
+
}, p = (s) => {
|
|
21
21
|
try {
|
|
22
|
-
l(t.throw(
|
|
22
|
+
l(t.throw(s));
|
|
23
23
|
} catch (h) {
|
|
24
24
|
o(h);
|
|
25
25
|
}
|
|
26
|
-
}, l = (
|
|
27
|
-
l((t = t.apply(a,
|
|
26
|
+
}, l = (s) => s.done ? e(s.value) : Promise.resolve(s.value).then(i, p);
|
|
27
|
+
l((t = t.apply(a, r)).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";
|
|
@@ -102,79 +102,8 @@ import "../../shared-utils/Subscribe.js";
|
|
|
102
102
|
import "../../shared-utils/Utils/WorkUtil.js";
|
|
103
103
|
import "../../shared-utils/five/transformPosition.js";
|
|
104
104
|
import "../../shared-utils/three/temp.js";
|
|
105
|
-
import "../../Sculpt/utils/Modules/Global.js";
|
|
106
|
-
import "../../Sculpt/utils/Modules/Cursor.js";
|
|
107
|
-
import "../../Object3DHelperPlugin/Controller.js";
|
|
108
|
-
import "../../base/BasePlugin.js";
|
|
109
105
|
import "../../shared-utils/three/THREESphere.js";
|
|
110
|
-
import "../../shared-utils/url/absoluteUrl.js";
|
|
111
106
|
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
112
|
-
import "../../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
113
|
-
import "../../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
114
|
-
import "../../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
115
|
-
import "../../shared-utils/three/IObject3D.js";
|
|
116
|
-
import "../../shared-utils/three/boundingBox.js";
|
|
117
|
-
import "../../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
118
|
-
import "../../shared-utils/Object3DHelper/utils/direction.js";
|
|
119
|
-
import "../../shared-utils/Object3DHelper/Constants/color.js";
|
|
120
|
-
import "../../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
121
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
122
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
123
|
-
import "../../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
|
|
124
|
-
import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
125
|
-
import "../../CSS3DRenderPlugin/utils/even.js";
|
|
126
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
127
|
-
import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
128
|
-
import "../../shared-utils/three/getObjectVisible.js";
|
|
129
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
130
|
-
import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
131
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
132
|
-
import "../../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
133
|
-
import "../../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
134
|
-
import "../../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
135
|
-
import "../../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
136
|
-
import "../../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
137
|
-
import "../../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
138
|
-
import "../../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
139
|
-
import "../../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
140
|
-
import "../../shared-utils/threex/domevents/index.js";
|
|
141
|
-
import "../../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
142
|
-
import "../../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
143
|
-
import "../../Sculpt/utils/three/rayOnLine.js";
|
|
144
|
-
import "../../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
145
|
-
import "../../shared-utils/Object3DHelper/index.js";
|
|
146
|
-
import "../../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
147
|
-
import "../../shared-utils/math/rad2Deg.js";
|
|
148
|
-
import "../../shared-utils/math/deg2Rad.js";
|
|
149
|
-
import "../../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
150
|
-
import "../../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
151
|
-
import "../../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
152
|
-
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
153
|
-
import "../../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
154
|
-
import "../../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
155
|
-
import "../../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
156
|
-
import "../../shared-utils/five/fiveModelLoad.js";
|
|
157
|
-
import "../../shared-utils/five/FiveDomEvents.js";
|
|
158
|
-
import "../../shared-utils/five/calculateThreeMouse.js";
|
|
159
|
-
import "../../shared-utils/three/THREERaycaster.js";
|
|
160
|
-
import "../../shared-utils/three/PointSelector/index.js";
|
|
161
|
-
import "../../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
162
|
-
import "../../shared-utils/three/Magnifier.js";
|
|
163
|
-
import "../../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
164
|
-
import "../../shared-utils/three/Assets/index.js";
|
|
165
|
-
import "../../shared-utils/three/PointSelector/utils/html.js";
|
|
166
|
-
import "../../shared-utils/five/initialCSS3DRender.js";
|
|
167
|
-
import "../../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
168
|
-
import "../../Sculpt/Meshes/Line.js";
|
|
169
|
-
import "../../Sculpt/typings/style.js";
|
|
170
|
-
import "../../shared-utils/five/FiveLine.js";
|
|
171
|
-
import "../../Sculpt/utils/removeAllTag.js";
|
|
172
|
-
import "../../Sculpt/utils/Meshes/getLengthHTML.js";
|
|
173
|
-
import "../../shared-utils/three/applyObjectMatrixWorld.js";
|
|
174
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
175
|
-
import "../../shared-utils/isTouchDevice.js";
|
|
176
|
-
import "../../shared-utils/five/getPosition.js";
|
|
177
|
-
import "../../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
178
107
|
import "../utils/noTypecheck.js";
|
|
179
108
|
import "../Components/Tag/AudioTag/index.js";
|
|
180
109
|
import "../Components/Tag/AudioTag/AudioTag.js";
|
|
@@ -228,7 +157,25 @@ import "../utils/normalPositionToPositions.js";
|
|
|
228
157
|
import "../../vendor/svelte/store/index.js";
|
|
229
158
|
import "../../CSS3DRenderPlugin/index.js";
|
|
230
159
|
import "../../CSS3DRenderPlugin/Controller.js";
|
|
231
|
-
|
|
160
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
161
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
162
|
+
import "../../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
|
|
163
|
+
import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
164
|
+
import "../../CSS3DRenderPlugin/utils/even.js";
|
|
165
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
166
|
+
import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
167
|
+
import "../../shared-utils/three/getObjectVisible.js";
|
|
168
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
169
|
+
import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
170
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
171
|
+
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
172
|
+
import "../../shared-utils/url/absoluteUrl.js";
|
|
173
|
+
import "../../shared-utils/five/fiveModelLoad.js";
|
|
174
|
+
import "../../shared-utils/five/FiveDomEvents.js";
|
|
175
|
+
import "../../shared-utils/five/calculateThreeMouse.js";
|
|
176
|
+
import "../../shared-utils/three/THREERaycaster.js";
|
|
177
|
+
import "../../base/BasePlugin.js";
|
|
178
|
+
class we extends U {
|
|
232
179
|
constructor(t) {
|
|
233
180
|
super(t);
|
|
234
181
|
d(this, "rendererMap", /* @__PURE__ */ new Map());
|
|
@@ -252,18 +199,18 @@ class jr extends U {
|
|
|
252
199
|
* @param config.usePoint 是否需要标签点, 默认为 false
|
|
253
200
|
* @note 优先级低于 tag.element
|
|
254
201
|
*/
|
|
255
|
-
registerRenderer(t,
|
|
256
|
-
var
|
|
257
|
-
this.rendererMap.set(t, { renderer:
|
|
202
|
+
registerRenderer(t, e, o) {
|
|
203
|
+
var i;
|
|
204
|
+
this.rendererMap.set(t, { renderer: e, usePoint: (i = o == null ? void 0 : o.usePoint) != null ? i : !1 });
|
|
258
205
|
}
|
|
259
|
-
bindRenderer(t,
|
|
260
|
-
this.contentTypeMap.set(t,
|
|
206
|
+
bindRenderer(t, e) {
|
|
207
|
+
this.contentTypeMap.set(t, e);
|
|
261
208
|
}
|
|
262
209
|
clearTags() {
|
|
263
210
|
var t;
|
|
264
|
-
this.tags.length && (this.tags.forEach((
|
|
265
|
-
var o,
|
|
266
|
-
(
|
|
211
|
+
this.tags.length && (this.tags.forEach((e) => {
|
|
212
|
+
var o, i, p, l, s;
|
|
213
|
+
(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);
|
|
267
214
|
}), 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();
|
|
268
215
|
}
|
|
269
216
|
/**
|
|
@@ -271,16 +218,16 @@ class jr extends U {
|
|
|
271
218
|
*/
|
|
272
219
|
updateRender3DDomTag(t) {
|
|
273
220
|
(t ? N(t) : this.filterCSS3DTag).forEach((o) => {
|
|
274
|
-
var
|
|
221
|
+
var i, p, l, s, h, b;
|
|
275
222
|
if (o.tag3DContentSvelte) {
|
|
276
|
-
const { svelteApp: f, css3DInstance: c, initialNormal: u, currentNormal:
|
|
277
|
-
if ((
|
|
278
|
-
const n = new G().setFromUnitVectors(u,
|
|
223
|
+
const { svelteApp: f, css3DInstance: c, initialNormal: u, currentNormal: m } = o.tag3DContentSvelte;
|
|
224
|
+
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)) {
|
|
225
|
+
const n = new G().setFromUnitVectors(u, m);
|
|
279
226
|
c.css3DObject.setRotationFromQuaternion(n);
|
|
280
227
|
}
|
|
281
228
|
return;
|
|
282
229
|
} else {
|
|
283
|
-
if (P(o) && !((l = o.model) != null && l.object) || ((
|
|
230
|
+
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)
|
|
284
231
|
return;
|
|
285
232
|
if (o.stickType === "3DPoint" && !o.normal)
|
|
286
233
|
return console.error("updateRenderPlaneTag: 三维点标签缺少法向量!");
|
|
@@ -290,13 +237,13 @@ class jr extends U {
|
|
|
290
237
|
const c = o.computeNormal();
|
|
291
238
|
if (!c)
|
|
292
239
|
return;
|
|
293
|
-
const u = o.getConfig(),
|
|
240
|
+
const u = o.getConfig(), m = j({
|
|
294
241
|
wrapperStyle: { zIndex: `${Math.round((1e4 - ((h = o.getDistance()) != null ? h : 0)) * 100)}` }
|
|
295
242
|
}, u.tag3DConfig);
|
|
296
|
-
if (o.computeRenderType() === "BehindDom" ||
|
|
297
|
-
|
|
243
|
+
if (o.computeRenderType() === "BehindDom" || m.mode === "behind") {
|
|
244
|
+
m.mode = "behind", m.container = document.createElement("div");
|
|
298
245
|
const D = "black";
|
|
299
|
-
|
|
246
|
+
m.container.style.backgroundColor = D, m.container.style.border = `3px solid ${D}`, this.css3DRenderPlugin.hooks.on("render", () => {
|
|
300
247
|
var S;
|
|
301
248
|
if (n.css3DObject.opacityMesh && u.clickable !== !1) {
|
|
302
249
|
const R = this.addObjectClickHandler(o, n.css3DObject.opacityMesh, (k) => {
|
|
@@ -306,7 +253,7 @@ class jr extends U {
|
|
|
306
253
|
}
|
|
307
254
|
});
|
|
308
255
|
}
|
|
309
|
-
const n = this.css3DRenderPlugin.create3DDomContainer(f,
|
|
256
|
+
const n = this.css3DRenderPlugin.create3DDomContainer(f, m);
|
|
310
257
|
if (!n)
|
|
311
258
|
return;
|
|
312
259
|
this.store.css3DRenderDisposer.set(o.id, [n.dispose]);
|
|
@@ -338,30 +285,30 @@ class jr extends U {
|
|
|
338
285
|
* @param tag 标签
|
|
339
286
|
* @param model 模型
|
|
340
287
|
*/
|
|
341
|
-
updateTagCss3DObjectMatrix(t,
|
|
288
|
+
updateTagCss3DObjectMatrix(t, e) {
|
|
342
289
|
var n, g, D;
|
|
343
|
-
const o = (g = (n = t.getConfig().tag3DConfig) == null ? void 0 : n.ratio) != null ? g : 216e-5,
|
|
344
|
-
if (!
|
|
290
|
+
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;
|
|
291
|
+
if (!i)
|
|
345
292
|
return;
|
|
346
|
-
const
|
|
347
|
-
if (!
|
|
293
|
+
const p = P(t) ? t.data.mediaPosition : t.position;
|
|
294
|
+
if (!p || p.length !== 4 || !Array.isArray(p[0]) || !Array.isArray(p[2]))
|
|
348
295
|
return;
|
|
349
|
-
|
|
350
|
-
const l =
|
|
351
|
-
u.decompose(
|
|
352
|
-
const
|
|
353
|
-
|
|
296
|
+
e.updateWorldMatrix(!1, !1);
|
|
297
|
+
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);
|
|
298
|
+
u.decompose(i.position, i.quaternion, i.scale);
|
|
299
|
+
const m = i.opacityMesh;
|
|
300
|
+
m && u.decompose(m.position, m.quaternion, m.scale);
|
|
354
301
|
}
|
|
355
302
|
/** 添加模型标签 */
|
|
356
303
|
addMediaModelTag(t) {
|
|
357
304
|
return w(this, null, function* () {
|
|
358
|
-
const
|
|
359
|
-
yield Promise.all(
|
|
305
|
+
const e = t.filter((o) => o.stickType === "Model").map((o) => o.loadModel());
|
|
306
|
+
yield Promise.all(e), t.forEach((o) => o.updateVisible());
|
|
360
307
|
});
|
|
361
308
|
}
|
|
362
309
|
disposeAllCSS3DContainer() {
|
|
363
310
|
for (const [, t] of this.store.css3DRenderDisposer)
|
|
364
|
-
t == null || t.forEach((
|
|
311
|
+
t == null || t.forEach((e) => e == null ? void 0 : e());
|
|
365
312
|
this.store.css3DRenderDisposer = /* @__PURE__ */ new Map();
|
|
366
313
|
}
|
|
367
314
|
/**
|
|
@@ -369,15 +316,15 @@ class jr extends U {
|
|
|
369
316
|
*/
|
|
370
317
|
clearUnusedPanelTag() {
|
|
371
318
|
this.filter2DPointTag.forEach((t) => {
|
|
372
|
-
var
|
|
373
|
-
(
|
|
319
|
+
var e;
|
|
320
|
+
(e = t.tag3DContentSvelte) == null || e.css3DInstance.dispose(), t.tag3DContentSvelte = void 0;
|
|
374
321
|
});
|
|
375
|
-
for (const [t,
|
|
322
|
+
for (const [t, e] of this.store.css3DRenderDisposer) {
|
|
376
323
|
const o = this.getTagById(t);
|
|
377
|
-
(!o || o.stickType === "2DPoint") && (
|
|
324
|
+
(!o || o.stickType === "2DPoint") && (e == null || e.forEach((i) => i == null ? void 0 : i()), this.store.css3DRenderDisposer.delete(t));
|
|
378
325
|
}
|
|
379
326
|
}
|
|
380
327
|
}
|
|
381
328
|
export {
|
|
382
|
-
|
|
329
|
+
we as TagRender
|
|
383
330
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var d = Object.defineProperty;
|
|
2
|
-
var c = (
|
|
3
|
-
var
|
|
2
|
+
var c = (a, n, e) => n in a ? d(a, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[n] = e;
|
|
3
|
+
var r = (a, n, e) => (c(a, typeof n != "symbol" ? n + "" : n, e), e);
|
|
4
4
|
import { DefaultConfig as l } from "../tag.config.js";
|
|
5
5
|
import "three";
|
|
6
|
-
import { anyPositionToVector3 as
|
|
6
|
+
import { anyPositionToVector3 as p } from "../../shared-utils/positionToVector3.js";
|
|
7
7
|
import { isPlaneTag as u, isMediaModelTag as f, isPoint3DTag as h } from "../utils/tag/tagCheck.js";
|
|
8
8
|
import { normalPositionToPositions as g } from "../utils/normalPositionToPositions.js";
|
|
9
9
|
import { writable as P } from "../../vendor/svelte/store/index.js";
|
|
@@ -36,72 +36,17 @@ import "../../shared-utils/Utils/BaseUtil.js";
|
|
|
36
36
|
import "../../shared-utils/Utils/WorkUtil.js";
|
|
37
37
|
import "../../shared-utils/five/transformPosition.js";
|
|
38
38
|
import "../../shared-utils/three/temp.js";
|
|
39
|
-
import "../../Sculpt/utils/Modules/Global.js";
|
|
40
|
-
import "../../Sculpt/utils/Modules/Cursor.js";
|
|
41
|
-
import "../../Object3DHelperPlugin/Controller.js";
|
|
42
39
|
import "../../shared-utils/three/THREESphere.js";
|
|
43
|
-
import "../../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
44
|
-
import "../../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
45
|
-
import "../../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
46
|
-
import "../../shared-utils/three/IObject3D.js";
|
|
47
|
-
import "../../shared-utils/three/boundingBox.js";
|
|
48
|
-
import "../../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
49
|
-
import "../../shared-utils/Object3DHelper/utils/direction.js";
|
|
50
|
-
import "../../shared-utils/Object3DHelper/Constants/color.js";
|
|
51
|
-
import "../../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
52
|
-
import "../../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
53
|
-
import "../../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
54
|
-
import "../../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
55
|
-
import "../../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
56
|
-
import "../../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
57
|
-
import "../../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
58
|
-
import "../../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
59
|
-
import "../../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
60
|
-
import "../../shared-utils/threex/domevents/index.js";
|
|
61
|
-
import "../../shared-utils/isNil.js";
|
|
62
|
-
import "../../shared-utils/util.js";
|
|
63
|
-
import "../../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
64
|
-
import "../../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
65
|
-
import "../../Sculpt/utils/three/rayOnLine.js";
|
|
66
|
-
import "../../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
67
|
-
import "../../shared-utils/Object3DHelper/index.js";
|
|
68
|
-
import "../../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
69
|
-
import "../../shared-utils/math/rad2Deg.js";
|
|
70
|
-
import "../../shared-utils/math/deg2Rad.js";
|
|
71
|
-
import "../../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
72
|
-
import "../../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
73
|
-
import "../../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
74
|
-
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
75
|
-
import "../../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
76
|
-
import "../../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
77
|
-
import "../../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
78
|
-
import "../../shared-utils/five/fiveModelLoad.js";
|
|
79
|
-
import "../../shared-utils/five/calculateThreeMouse.js";
|
|
80
|
-
import "../../shared-utils/three/THREERaycaster.js";
|
|
81
|
-
import "../../shared-utils/three/PointSelector/index.js";
|
|
82
|
-
import "../../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
83
|
-
import "../../shared-utils/three/Magnifier.js";
|
|
84
|
-
import "../../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
85
|
-
import "../../shared-utils/three/Assets/index.js";
|
|
86
|
-
import "../../shared-utils/three/PointSelector/utils/html.js";
|
|
87
|
-
import "../../shared-utils/five/initialCSS3DRender.js";
|
|
88
|
-
import "../../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
89
|
-
import "../../Sculpt/Meshes/Line.js";
|
|
90
|
-
import "../../Sculpt/typings/style.js";
|
|
91
|
-
import "../../shared-utils/five/FiveLine.js";
|
|
92
|
-
import "../../Sculpt/utils/removeAllTag.js";
|
|
93
|
-
import "../../Sculpt/utils/Meshes/getLengthHTML.js";
|
|
94
|
-
import "../../shared-utils/three/applyObjectMatrixWorld.js";
|
|
95
40
|
import "animejs";
|
|
41
|
+
import "../../shared-utils/isNil.js";
|
|
96
42
|
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
97
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
98
|
-
import "../../shared-utils/isTouchDevice.js";
|
|
99
|
-
import "../../shared-utils/five/getPosition.js";
|
|
100
|
-
import "../../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
101
|
-
import "../../shared-utils/url/absoluteUrl.js";
|
|
102
43
|
import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
103
44
|
import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
45
|
+
import "../../shared-utils/util.js";
|
|
104
46
|
import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
47
|
+
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
48
|
+
import "../../shared-utils/url/absoluteUrl.js";
|
|
49
|
+
import "../../shared-utils/five/fiveModelLoad.js";
|
|
105
50
|
import "../../shared-utils/three/loadTexture.js";
|
|
106
51
|
import "../../shared-utils/three/Quadrangle.js";
|
|
107
52
|
import "../../shared-utils/math/pointsIsRectangle.js";
|
|
@@ -110,125 +55,127 @@ import "../Assets/Icon.js";
|
|
|
110
55
|
import "../../shared-utils/three/getPositionsByObjectFit.js";
|
|
111
56
|
import "../../shared-utils/three/FragmentTransparencyMaterial.js";
|
|
112
57
|
import "../../shared-utils/three/getNormal.js";
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
e
|
|
118
|
-
|
|
119
|
-
|
|
58
|
+
import "../../shared-utils/five/calculateThreeMouse.js";
|
|
59
|
+
import "../../shared-utils/three/THREERaycaster.js";
|
|
60
|
+
class Me extends E {
|
|
61
|
+
constructor(e) {
|
|
62
|
+
super(e);
|
|
63
|
+
r(this, "tags", []);
|
|
64
|
+
r(this, "cache", new v());
|
|
65
|
+
r(this, "config", l);
|
|
66
|
+
r(this, "renderQueue", /* @__PURE__ */ new Map());
|
|
120
67
|
/** 插件参数 */
|
|
121
|
-
|
|
122
|
-
|
|
68
|
+
r(this, "params");
|
|
69
|
+
r(this, "mediaStore", P({
|
|
123
70
|
currentMediaElement: null
|
|
124
71
|
}));
|
|
125
|
-
|
|
72
|
+
r(this, "store", {
|
|
126
73
|
disposers: [],
|
|
127
74
|
disposed: !1,
|
|
128
75
|
resizeObserverDisposerAdding: !1,
|
|
129
76
|
css3DRenderDisposer: /* @__PURE__ */ new Map()
|
|
130
77
|
});
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
const
|
|
139
|
-
return
|
|
78
|
+
r(this, "domEvents", new y(this.five));
|
|
79
|
+
r(this, "_cache_pointTag");
|
|
80
|
+
r(this, "_cache_2DPointTag");
|
|
81
|
+
r(this, "_cache_css3DTag");
|
|
82
|
+
r(this, "_container", null);
|
|
83
|
+
r(this, "_css3DRenderPlugin");
|
|
84
|
+
r(this, "whyHide", (e) => {
|
|
85
|
+
const t = this.getTagById(e);
|
|
86
|
+
return t ? t.whyHide() : { reason: `tag ${e} not found` };
|
|
140
87
|
});
|
|
141
|
-
|
|
88
|
+
r(this, "loadVideoFirstFrame", () => {
|
|
142
89
|
T && this.hooks.emit("loadVideoFirstFrame");
|
|
143
90
|
});
|
|
144
|
-
this.mediaStore.subscribe(({ currentMediaElement:
|
|
145
|
-
this.tags.forEach((
|
|
91
|
+
this.mediaStore.subscribe(({ currentMediaElement: t }) => {
|
|
92
|
+
this.tags.forEach((i) => {
|
|
146
93
|
var o;
|
|
147
|
-
if (
|
|
148
|
-
if (!((o =
|
|
94
|
+
if (i.mediaPlane instanceof _ && t !== i.mediaPlane.videoInstance) {
|
|
95
|
+
if (!((o = i.mediaPlane.videoInstance) != null && o.src) || t === i.mediaPlane.videoInstance)
|
|
149
96
|
return;
|
|
150
|
-
|
|
97
|
+
i.mediaPlane.pause();
|
|
151
98
|
}
|
|
152
99
|
});
|
|
153
100
|
});
|
|
154
101
|
}
|
|
155
102
|
get container() {
|
|
156
|
-
var
|
|
157
|
-
return this._container || ((
|
|
103
|
+
var e;
|
|
104
|
+
return this._container || ((e = this.five.getElement()) == null ? void 0 : e.parentElement);
|
|
158
105
|
}
|
|
159
|
-
set container(
|
|
160
|
-
this._container =
|
|
106
|
+
set container(e) {
|
|
107
|
+
this._container = e;
|
|
161
108
|
}
|
|
162
109
|
// eslint-disable-next-line accessor-pairs
|
|
163
|
-
set tagsLengthWillUpdate(
|
|
164
|
-
|
|
165
|
-
(
|
|
166
|
-
).filter((
|
|
167
|
-
const
|
|
168
|
-
return
|
|
110
|
+
set tagsLengthWillUpdate(e) {
|
|
111
|
+
e && (this._cache_pointTag = this.tags.filter((t) => t.stickType === "2DPoint" || t.stickType === "3DPoint").filter((t) => t.position), this._cache_2DPointTag = this.tags.filter((t) => t.stickType === "2DPoint").filter((t) => t.position), this._cache_css3DTag = this.tags.filter(
|
|
112
|
+
(t) => t.stickType === "3DPoint" || t.stickType === "Plane" || t.stickType === "Model" && t.contentType === "MediaModel"
|
|
113
|
+
).filter((t) => {
|
|
114
|
+
const i = t.computeRenderType();
|
|
115
|
+
return i === "BehindDom" || i === "Dom";
|
|
169
116
|
}));
|
|
170
117
|
}
|
|
171
118
|
/** css3DRenderPlugin */
|
|
172
119
|
get css3DRenderPlugin() {
|
|
173
|
-
var t, i
|
|
120
|
+
var e, t, i;
|
|
174
121
|
if (!this._css3DRenderPlugin) {
|
|
175
122
|
const o = D(this.five);
|
|
176
|
-
this._css3DRenderPlugin = o, (
|
|
123
|
+
this._css3DRenderPlugin = o, (e = o.frontModeCSS3DRenderer) != null && e.domElementWrapper && (o.frontModeCSS3DRenderer.domElementWrapper.style.zIndex = (i = (t = this.params.containerZIndex) == null ? void 0 : t.toString()) != null ? i : "");
|
|
177
124
|
}
|
|
178
125
|
return this._css3DRenderPlugin;
|
|
179
126
|
}
|
|
180
127
|
get filterPointTag() {
|
|
181
|
-
var
|
|
182
|
-
return (
|
|
128
|
+
var e;
|
|
129
|
+
return (e = this._cache_pointTag) != null ? e : [];
|
|
183
130
|
}
|
|
184
131
|
get filter2DPointTag() {
|
|
185
|
-
var
|
|
186
|
-
return (
|
|
132
|
+
var e;
|
|
133
|
+
return (e = this._cache_2DPointTag) != null ? e : [];
|
|
187
134
|
}
|
|
188
135
|
get filterCSS3DTag() {
|
|
189
|
-
var
|
|
190
|
-
return (
|
|
136
|
+
var e;
|
|
137
|
+
return (e = this._cache_css3DTag) != null ? e : [];
|
|
191
138
|
}
|
|
192
|
-
addRenderQueue(
|
|
193
|
-
var
|
|
194
|
-
const { type:
|
|
195
|
-
this.renderQueue.has(
|
|
196
|
-
keys: Array.from(/* @__PURE__ */ new Set([...(
|
|
197
|
-
tags: Array.from(/* @__PURE__ */ new Set([...(s = this.renderQueue.get(
|
|
198
|
-
}) : this.renderQueue.set(
|
|
139
|
+
addRenderQueue(e) {
|
|
140
|
+
var m, s;
|
|
141
|
+
const { type: t, keys: i = [], tags: o = [] } = e;
|
|
142
|
+
this.renderQueue.has(t) ? this.renderQueue.set(t, {
|
|
143
|
+
keys: Array.from(/* @__PURE__ */ new Set([...(m = this.renderQueue.get(t).keys) != null ? m : [], ...i])),
|
|
144
|
+
tags: Array.from(/* @__PURE__ */ new Set([...(s = this.renderQueue.get(t).tags) != null ? s : [], ...o]))
|
|
145
|
+
}) : this.renderQueue.set(t, { keys: i, tags: o });
|
|
199
146
|
}
|
|
200
|
-
getTagById(
|
|
201
|
-
const
|
|
202
|
-
if (!
|
|
203
|
-
console.warn(`getTagById Error: can't find tag id: ${
|
|
147
|
+
getTagById(e) {
|
|
148
|
+
const t = this.tags.find((i) => i.id === e);
|
|
149
|
+
if (!t) {
|
|
150
|
+
console.warn(`getTagById Error: can't find tag id: ${e}`);
|
|
204
151
|
return;
|
|
205
152
|
}
|
|
206
|
-
return
|
|
153
|
+
return t;
|
|
207
154
|
}
|
|
208
155
|
/** 暂停当前标签内进行的所有多媒体 */
|
|
209
156
|
pauseCurrentMedia() {
|
|
210
157
|
this.mediaStore.set({ currentMediaElement: null });
|
|
211
158
|
}
|
|
212
|
-
getPositions(
|
|
213
|
-
if (u(
|
|
214
|
-
return
|
|
215
|
-
if (f(
|
|
216
|
-
return
|
|
217
|
-
if (h(
|
|
218
|
-
return g(this.five.camera.position,
|
|
159
|
+
getPositions(e) {
|
|
160
|
+
if (u(e))
|
|
161
|
+
return e.position;
|
|
162
|
+
if (f(e))
|
|
163
|
+
return e.data.mediaPosition;
|
|
164
|
+
if (h(e))
|
|
165
|
+
return g(this.five.camera.position, p(e.position), p(e.normal));
|
|
219
166
|
}
|
|
220
|
-
addObjectClickHandler(t, i
|
|
221
|
-
if (!
|
|
167
|
+
addObjectClickHandler(e, t, i) {
|
|
168
|
+
if (!t || !this.domEvents)
|
|
222
169
|
return () => {
|
|
223
170
|
};
|
|
224
|
-
const o = () => !(!
|
|
171
|
+
const o = () => !(!e.currentVisible || e.loading), m = (s) => {
|
|
225
172
|
if (!o())
|
|
226
173
|
return !1;
|
|
227
|
-
|
|
174
|
+
i(s.origDomEvent);
|
|
228
175
|
};
|
|
229
|
-
return this.domEvents.addEventListener(
|
|
176
|
+
return this.domEvents.addEventListener(t, "click", m), () => {
|
|
230
177
|
var s;
|
|
231
|
-
(s = this.domEvents) == null || s.removeEventListener(
|
|
178
|
+
(s = this.domEvents) == null || s.removeEventListener(t, "click", m);
|
|
232
179
|
};
|
|
233
180
|
}
|
|
234
181
|
/**
|
|
@@ -240,5 +187,5 @@ class Ci extends E {
|
|
|
240
187
|
}
|
|
241
188
|
}
|
|
242
189
|
export {
|
|
243
|
-
|
|
190
|
+
Me as TagUtil
|
|
244
191
|
};
|