@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
|
@@ -21,20 +21,20 @@ var j = (u, i) => {
|
|
|
21
21
|
};
|
|
22
22
|
var f = (u, i, e) => (x(u, typeof i != "symbol" ? i + "" : i, e), e);
|
|
23
23
|
var I = (u, i, e) => new Promise((t, r) => {
|
|
24
|
-
var n = (
|
|
24
|
+
var n = (s) => {
|
|
25
25
|
try {
|
|
26
|
-
|
|
26
|
+
o(e.next(s));
|
|
27
27
|
} catch (a) {
|
|
28
28
|
r(a);
|
|
29
29
|
}
|
|
30
|
-
}, l = (
|
|
30
|
+
}, l = (s) => {
|
|
31
31
|
try {
|
|
32
|
-
|
|
32
|
+
o(e.throw(s));
|
|
33
33
|
} catch (a) {
|
|
34
34
|
r(a);
|
|
35
35
|
}
|
|
36
|
-
},
|
|
37
|
-
|
|
36
|
+
}, o = (s) => s.done ? t(s.value) : Promise.resolve(s.value).then(n, l);
|
|
37
|
+
o((e = e.apply(u, i)).next());
|
|
38
38
|
});
|
|
39
39
|
import { Subscribe as K } from "../../../shared-utils/Subscribe.js";
|
|
40
40
|
import { calculateTagConfig as U } from "../../utils/tag/calculateTagConfig.js";
|
|
@@ -47,14 +47,13 @@ import { centerPoint as ee } from "../../../shared-utils/three/centerPoint.js";
|
|
|
47
47
|
import "@realsee/five/line";
|
|
48
48
|
import { anyPositionToVector3 as A } from "../../../shared-utils/positionToVector3.js";
|
|
49
49
|
import "../../../shared-utils/tag.js";
|
|
50
|
-
import "../../../Sculpt/utils/Modules/Global.js";
|
|
51
50
|
import { toArray as ie } from "../../../shared-utils/util.js";
|
|
52
51
|
import "../../../shared-utils/three/THREESphere.js";
|
|
53
52
|
import { blink as te, reblink as ne } from "../../../shared-utils/three/blink.js";
|
|
54
|
-
import { vectorToCoordinates as
|
|
53
|
+
import { vectorToCoordinates as se } from "../../../shared-utils/vectorToCoordinate.js";
|
|
55
54
|
import { transformPosition as O } from "../../../shared-utils/five/transformPosition.js";
|
|
56
55
|
import { isNil as R, notNil as E } from "../../../shared-utils/isNil.js";
|
|
57
|
-
import { lookPoint as
|
|
56
|
+
import { lookPoint as oe } from "../../../shared-utils/five/lookPoint.js";
|
|
58
57
|
import { uuid as re } from "../../../shared-utils/uuid.js";
|
|
59
58
|
import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
60
59
|
import { objectAssignDeepExports as b } from "../../../vendor/object-assign-deep/objectAssignDeep.js";
|
|
@@ -77,78 +76,8 @@ import "../../../shared-utils/five/getFiveModel.js";
|
|
|
77
76
|
import "../../../shared-utils/Utils/FiveUtil.js";
|
|
78
77
|
import "../../../shared-utils/Utils/BaseUtil.js";
|
|
79
78
|
import "../../../shared-utils/Utils/WorkUtil.js";
|
|
80
|
-
import "../../../Sculpt/utils/Modules/Cursor.js";
|
|
81
|
-
import "../../../Object3DHelperPlugin/Controller.js";
|
|
82
|
-
import "../../../base/BasePlugin.js";
|
|
83
|
-
import "../../../shared-utils/url/absoluteUrl.js";
|
|
84
|
-
import "../../../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
85
|
-
import "../../../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
86
|
-
import "../../../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
87
|
-
import "../../../shared-utils/three/IObject3D.js";
|
|
88
|
-
import "../../../shared-utils/three/boundingBox.js";
|
|
89
|
-
import "../../../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
90
|
-
import "../../../shared-utils/Object3DHelper/utils/direction.js";
|
|
91
|
-
import "../../../shared-utils/Object3DHelper/Constants/color.js";
|
|
92
|
-
import "../../../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
93
|
-
import "../../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
94
|
-
import "../../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
95
|
-
import "../../../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
|
|
96
|
-
import "../../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
97
|
-
import "../../../CSS3DRenderPlugin/utils/even.js";
|
|
98
|
-
import "../../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
99
|
-
import "../../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
100
|
-
import "../../../shared-utils/three/getObjectVisible.js";
|
|
101
|
-
import "../../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
102
|
-
import "../../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
103
|
-
import "../../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
104
|
-
import "../../../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
105
|
-
import "../../../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
106
|
-
import "../../../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
107
|
-
import "../../../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
108
|
-
import "../../../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
109
|
-
import "../../../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
110
|
-
import "../../../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
111
|
-
import "../../../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
112
|
-
import "../../../shared-utils/threex/domevents/index.js";
|
|
113
|
-
import "../../../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
114
|
-
import "../../../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
115
|
-
import "../../../Sculpt/utils/three/rayOnLine.js";
|
|
116
|
-
import "../../../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
117
|
-
import "../../../shared-utils/Object3DHelper/index.js";
|
|
118
|
-
import "../../../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
119
|
-
import "../../../shared-utils/math/rad2Deg.js";
|
|
120
|
-
import "../../../shared-utils/math/deg2Rad.js";
|
|
121
|
-
import "../../../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
122
|
-
import "../../../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
123
|
-
import "../../../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
124
|
-
import "../../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
125
|
-
import "../../../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
126
|
-
import "../../../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
127
|
-
import "../../../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
128
|
-
import "../../../shared-utils/five/fiveModelLoad.js";
|
|
129
|
-
import "../../../shared-utils/five/FiveDomEvents.js";
|
|
130
|
-
import "../../../shared-utils/five/calculateThreeMouse.js";
|
|
131
|
-
import "../../../shared-utils/three/THREERaycaster.js";
|
|
132
|
-
import "../../../shared-utils/three/PointSelector/index.js";
|
|
133
|
-
import "../../../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
134
|
-
import "../../../shared-utils/three/Magnifier.js";
|
|
135
|
-
import "../../../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
136
|
-
import "../../../shared-utils/three/Assets/index.js";
|
|
137
|
-
import "../../../shared-utils/three/PointSelector/utils/html.js";
|
|
138
|
-
import "../../../shared-utils/five/initialCSS3DRender.js";
|
|
139
|
-
import "../../../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
140
|
-
import "../../../Sculpt/Meshes/Line.js";
|
|
141
|
-
import "../../../Sculpt/typings/style.js";
|
|
142
|
-
import "../../../shared-utils/five/FiveLine.js";
|
|
143
|
-
import "../../../Sculpt/utils/removeAllTag.js";
|
|
144
|
-
import "../../../Sculpt/utils/Meshes/getLengthHTML.js";
|
|
145
|
-
import "../../../shared-utils/three/applyObjectMatrixWorld.js";
|
|
146
|
-
import "../../../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
147
|
-
import "../../../shared-utils/isTouchDevice.js";
|
|
148
|
-
import "../../../shared-utils/five/getPosition.js";
|
|
149
|
-
import "../../../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
150
79
|
import "../../../shared-utils/formatRad.js";
|
|
151
|
-
class
|
|
80
|
+
class Ye {
|
|
152
81
|
constructor(i, e) {
|
|
153
82
|
f(this, "plugin");
|
|
154
83
|
f(this, "id");
|
|
@@ -178,17 +107,17 @@ class gt {
|
|
|
178
107
|
f(this, "computedConfig");
|
|
179
108
|
f(this, "cache");
|
|
180
109
|
f(this, "entryFromModel");
|
|
181
|
-
var
|
|
110
|
+
var s, a, c, g;
|
|
182
111
|
this.plugin = i;
|
|
183
112
|
const t = Y(e);
|
|
184
113
|
e.stickType = t;
|
|
185
|
-
const r = JSON.parse(JSON.stringify(e.data)), n = (
|
|
114
|
+
const r = JSON.parse(JSON.stringify(e.data)), n = (s = e.initialConfig) != null ? s : e.config ? JSON.parse(JSON.stringify(e.config)) : {};
|
|
186
115
|
e.initialConfig = n;
|
|
187
|
-
const l = U(e, i.config),
|
|
188
|
-
e.config =
|
|
116
|
+
const l = U(e, i.config), o = this.getConfig(e);
|
|
117
|
+
e.config = o, this.id = (a = e.id) != null ? a : re(), this.enabled = (c = e.enabled) != null ? c : !0, this.contentType = e.contentType, this.data = (g = o.initialData) != null && g.important ? b(e.data, r, o.initialData) : b(e.data, o.initialData, r), this.state = p({
|
|
189
118
|
visible: void 0,
|
|
190
119
|
unfolded: !this.can("fold")
|
|
191
|
-
},
|
|
120
|
+
}, o.initialState), this.originPosition = e.position, e.originPosition = this.originPosition, this.position = (() => {
|
|
192
121
|
const d = e.originPosition;
|
|
193
122
|
if (!d)
|
|
194
123
|
return;
|
|
@@ -245,14 +174,14 @@ class gt {
|
|
|
245
174
|
const n = e == null ? void 0 : e.panoIndex;
|
|
246
175
|
if (R(n))
|
|
247
176
|
return;
|
|
248
|
-
const l = this.workUtil.getObserverPosition(n),
|
|
177
|
+
const l = this.workUtil.getObserverPosition(n), o = this.centerPosition.clone().sub(l).normalize();
|
|
249
178
|
this.five.setState(p({
|
|
250
179
|
mode: "Panorama",
|
|
251
180
|
workCode: this.workUtil.workCode,
|
|
252
181
|
panoIndex: n
|
|
253
|
-
},
|
|
182
|
+
}, se(o))), yield this.five.ready();
|
|
254
183
|
} else
|
|
255
|
-
t === "Mapview" && (yield
|
|
184
|
+
t === "Mapview" && (yield oe(this.five, this.centerPosition, i == null ? void 0 : i.pointConfig));
|
|
256
185
|
});
|
|
257
186
|
}
|
|
258
187
|
/**
|
|
@@ -260,8 +189,8 @@ class gt {
|
|
|
260
189
|
*/
|
|
261
190
|
blink(i) {
|
|
262
191
|
return I(this, null, function* () {
|
|
263
|
-
var
|
|
264
|
-
const e = (
|
|
192
|
+
var o, s;
|
|
193
|
+
const e = (o = this.enabled) != null ? o : !0, t = (s = this.state) == null ? void 0 : s.visible, r = e && t;
|
|
265
194
|
r === !1 && (this.state.visible = !0, this.enabled = !0, this.applyVisible(), this.plugin.addRenderQueue({ type: "TagContainerSvelte", keys: ["tags"] }), this.plugin.render(), yield de(0), this.dom && (this.dom.style.visibility = "hidden"), this.contentDom && (this.contentDom.style.visibility = "hidden"));
|
|
266
195
|
const n = (() => {
|
|
267
196
|
var c;
|
|
@@ -358,13 +287,13 @@ class gt {
|
|
|
358
287
|
this.zIndex = Math.round((1e4 - (i != null ? i : 0)) * 100);
|
|
359
288
|
}
|
|
360
289
|
getConfig(i, e) {
|
|
361
|
-
var l,
|
|
362
|
-
const t = U(i != null ? i : this, this.plugin.config, { useCache: e == null ? void 0 : e.useCache }), r = (l = e == null ? void 0 : e.fiveMode) != null ? l : this.five.getCurrentState().mode, n = (
|
|
363
|
-
return (
|
|
290
|
+
var l, o, s;
|
|
291
|
+
const t = U(i != null ? i : this, this.plugin.config, { useCache: e == null ? void 0 : e.useCache }), r = (l = e == null ? void 0 : e.fiveMode) != null ? l : this.five.getCurrentState().mode, n = (o = t.configWithFiveMode) == null ? void 0 : o[r];
|
|
292
|
+
return (s = n != null ? n : t) != null ? s : {};
|
|
364
293
|
}
|
|
365
294
|
getDistance(i, e = 3) {
|
|
366
|
-
const t = p(p({}, this.five.getCurrentState()), i), { panoIndex: r, mode: n } = t, l = n === "Panorama" ? this.workUtil.getObserverPosition(r) : this.five.camera.position,
|
|
367
|
-
return !l || !
|
|
295
|
+
const t = p(p({}, this.five.getCurrentState()), i), { panoIndex: r, mode: n } = t, l = n === "Panorama" ? this.workUtil.getObserverPosition(r) : this.five.camera.position, o = this.centerPosition;
|
|
296
|
+
return !l || !o ? -1 : l.distanceTo(o);
|
|
368
297
|
}
|
|
369
298
|
getVisible(i) {
|
|
370
299
|
if (!this.enabled || !this.plugin.state.enabled || !this.fiveUtil.model)
|
|
@@ -428,52 +357,52 @@ class gt {
|
|
|
428
357
|
const e = p(p({}, this.five.getCurrentState()), i), { panoIndex: t, mode: r } = e, n = [];
|
|
429
358
|
return (() => {
|
|
430
359
|
var a, g, d;
|
|
431
|
-
const
|
|
432
|
-
if (typeof
|
|
360
|
+
const s = (a = this.getConfig().visibleConfig) != null ? a : {};
|
|
361
|
+
if (typeof s == "function")
|
|
433
362
|
return {
|
|
434
|
-
value:
|
|
363
|
+
value: s(this.five, { tag: this, distance: this.getDistance(e, void 0) }),
|
|
435
364
|
checkedList: n,
|
|
436
365
|
reason: "config function result"
|
|
437
366
|
};
|
|
438
367
|
{
|
|
439
|
-
if (
|
|
368
|
+
if (s.keep === "hidden")
|
|
440
369
|
return { value: !1, checkedList: n, reason: "config.keep is hidden" };
|
|
441
|
-
if (
|
|
370
|
+
if (s.keep === "visible")
|
|
442
371
|
return { value: !0, checkedList: n, reason: "config.keep is visible" };
|
|
443
|
-
const m = this.computeVisibleByFiveMode(
|
|
372
|
+
const m = this.computeVisibleByFiveMode(s, r);
|
|
444
373
|
if ((m == null ? void 0 : m.value) === !1)
|
|
445
374
|
return m;
|
|
446
|
-
if (
|
|
375
|
+
if (s.followModelVisibility === !0 && ["poincare", "aerophoto", "sand"].includes(this.workUtil.fromType) && (r === "Floorplan" || r === "Mapview")) {
|
|
447
376
|
const c = this.computeVisibleByFloorIndex(), { value: h } = c, v = j(c, ["value"]);
|
|
448
377
|
if (h === !1)
|
|
449
378
|
return p({ value: !1, checkedList: n, reason: "followModelVisibility check failed" }, v);
|
|
450
379
|
}
|
|
451
|
-
if (w(r) &&
|
|
452
|
-
if (n.push("visiblePanoIndex"), Array.isArray(
|
|
380
|
+
if (w(r) && s.visiblePanoIndex !== void 0 && s.visiblePanoIndex !== "all" && t !== void 0) {
|
|
381
|
+
if (n.push("visiblePanoIndex"), Array.isArray(s.visiblePanoIndex) && !s.visiblePanoIndex.includes(t))
|
|
453
382
|
return {
|
|
454
383
|
value: !1,
|
|
455
384
|
checkedList: n,
|
|
456
|
-
reason: `current panoIndex is not included in visiblePano. currentPanoIndex: ${t}, visiblePanoIndex: ${
|
|
385
|
+
reason: `current panoIndex is not included in visiblePano. currentPanoIndex: ${t}, visiblePanoIndex: ${s.visiblePanoIndex}`
|
|
457
386
|
};
|
|
458
|
-
if (
|
|
387
|
+
if (s.visiblePanoIndex === "current" && t !== ((g = this.fiveState) == null ? void 0 : g.panoIndex))
|
|
459
388
|
return {
|
|
460
389
|
value: !1,
|
|
461
390
|
checkedList: n,
|
|
462
391
|
reason: `current panoIndex is not equal to tag.panoIndex. currentPanoIndex: ${t}, tag.panoIndex: ${(d = this.fiveState) == null ? void 0 : d.panoIndex}`
|
|
463
392
|
};
|
|
464
393
|
}
|
|
465
|
-
if (
|
|
394
|
+
if (s.visibleDistance !== void 0 && (n.push("visibleDistance"), s.visibleDistance !== "unLimited")) {
|
|
466
395
|
const h = this.getDistance(e, 1);
|
|
467
|
-
if (C(h,
|
|
396
|
+
if (C(h, s.visibleDistance) === !1)
|
|
468
397
|
return {
|
|
469
398
|
value: !1,
|
|
470
399
|
checkedList: n,
|
|
471
400
|
panoIndex: t,
|
|
472
|
-
visibleDistance:
|
|
473
|
-
reason: `distance is not in visibleDistance. distance: ${h}, visibleDistance: ${
|
|
401
|
+
visibleDistance: s.visibleDistance,
|
|
402
|
+
reason: `distance is not in visibleDistance. distance: ${h}, visibleDistance: ${s.visibleDistance.min} - ${s.visibleDistance.max}`
|
|
474
403
|
};
|
|
475
404
|
}
|
|
476
|
-
if (
|
|
405
|
+
if (s.intersectRaycaster !== !1 && (typeof s.intersectRaycaster != "object" || s.intersectRaycaster.enabled !== !1)) {
|
|
477
406
|
if (n.push("intersectRaycaster"), t === void 0)
|
|
478
407
|
return {
|
|
479
408
|
value: !1,
|
|
@@ -497,9 +426,9 @@ class gt {
|
|
|
497
426
|
*/
|
|
498
427
|
computeVisibleByFiveMode(i, e) {
|
|
499
428
|
const t = () => {
|
|
500
|
-
var l,
|
|
429
|
+
var l, o;
|
|
501
430
|
let n = typeof i.visibleFiveMode == "function" ? i.visibleFiveMode(this) : i.visibleFiveMode;
|
|
502
|
-
if (n || (n = (
|
|
431
|
+
if (n || (n = (o = (l = this.fiveState) == null ? void 0 : l.mode) != null ? o : this.workUtil.observers.length ? "Panorama" : "ModelLike"), Array.isArray(n))
|
|
503
432
|
return n.includes(e);
|
|
504
433
|
if (n === "ModelLike")
|
|
505
434
|
return P(e);
|
|
@@ -529,8 +458,8 @@ class gt {
|
|
|
529
458
|
}
|
|
530
459
|
/** 通过射线检测标签可用性 */
|
|
531
460
|
computeVisibleByIntersect(i) {
|
|
532
|
-
var
|
|
533
|
-
const e = z(z((
|
|
461
|
+
var s, a, c, g;
|
|
462
|
+
const e = z(z((s = this.getConfig().visibleConfig) != null ? s : {}).intersectRaycaster), t = i != null ? i : this.five.getCurrentState().panoIndex, r = w(this.five.getCurrentState().mode) ? this.workUtil.getObserverPosition(t) : this.five.camera.position;
|
|
534
463
|
if (r === void 0)
|
|
535
464
|
return { value: !1, reason: { type: "startPosition is undefined", fivePanoIndex: t } };
|
|
536
465
|
const n = ie(
|
|
@@ -540,7 +469,7 @@ class gt {
|
|
|
540
469
|
return d === "center" ? $(this) : d === "corner" ? L(this) : Array.isArray(d) ? d : [];
|
|
541
470
|
})()
|
|
542
471
|
);
|
|
543
|
-
let l = 0,
|
|
472
|
+
let l = 0, o = 0;
|
|
544
473
|
for (const d of n) {
|
|
545
474
|
const m = new B.Vector3().subVectors(d, r).normalize();
|
|
546
475
|
let h;
|
|
@@ -556,12 +485,12 @@ class gt {
|
|
|
556
485
|
}).filter(E), [q] = V.intersectObjects(_, !0);
|
|
557
486
|
return q;
|
|
558
487
|
})(), J = r.distanceTo(d), W = (a = e.distanceAccuracy) != null ? a : 0.01;
|
|
559
|
-
h = Math.min(h != null ? h : 1 / 0, (c = k == null ? void 0 : k.distance) != null ? c : 1 / 0), h + W >= J ? l++ :
|
|
488
|
+
h = Math.min(h != null ? h : 1 / 0, (c = k == null ? void 0 : k.distance) != null ? c : 1 / 0), h + W >= J ? l++ : o++;
|
|
560
489
|
const H = (g = e.needPassed) != null ? g : 1;
|
|
561
490
|
if (l >= H)
|
|
562
491
|
return { value: !0 };
|
|
563
492
|
}
|
|
564
|
-
return
|
|
493
|
+
return o === 0 ? { value: !0 } : {
|
|
565
494
|
value: !1,
|
|
566
495
|
reason: {
|
|
567
496
|
type: "intersectRaycaster check failed",
|
|
@@ -572,12 +501,12 @@ class gt {
|
|
|
572
501
|
};
|
|
573
502
|
}
|
|
574
503
|
computeVisibleByFloorIndex() {
|
|
575
|
-
var r, n, l,
|
|
504
|
+
var r, n, l, o, s, a, c;
|
|
576
505
|
let i = 0;
|
|
577
506
|
const e = (r = this.fiveState) == null ? void 0 : r.panoIndex;
|
|
578
507
|
e !== void 0 ? i = (n = this.workUtil.getObserver(e)) == null ? void 0 : n.floorIndex : i = ae(
|
|
579
508
|
this.workUtil.work,
|
|
580
|
-
(c = (a = (
|
|
509
|
+
(c = (a = (o = (l = this.model) == null ? void 0 : l.object) == null ? void 0 : o.position) != null ? a : (s = this.mediaPlane) == null ? void 0 : s.position) != null ? c : $(this)
|
|
581
510
|
);
|
|
582
511
|
const t = this.fiveUtil.model.shownFloor;
|
|
583
512
|
return {
|
|
@@ -622,19 +551,19 @@ class gt {
|
|
|
622
551
|
return !1;
|
|
623
552
|
}
|
|
624
553
|
if (i.autoUnfold.strategy === "MinimumDistance") {
|
|
625
|
-
const n = this.plugin.filterPointTag.filter((
|
|
626
|
-
const
|
|
627
|
-
if (!
|
|
554
|
+
const n = this.plugin.filterPointTag.filter((o) => o.currentVisible).filter((o) => {
|
|
555
|
+
const s = this.computeTagProject();
|
|
556
|
+
if (!s)
|
|
628
557
|
return !1;
|
|
629
|
-
const { x: a, y: c, z: g } =
|
|
558
|
+
const { x: a, y: c, z: g } = s;
|
|
630
559
|
return !(Math.abs(g) > 1 || Math.abs(a) > 1 || Math.abs(c) > 1);
|
|
631
|
-
}).map((
|
|
632
|
-
var
|
|
633
|
-
return !(typeof
|
|
634
|
-
}).map((
|
|
635
|
-
const a =
|
|
636
|
-
return !(a && C(
|
|
637
|
-
}).sort((
|
|
560
|
+
}).map((o) => ({ tag: o, id: o.id, tagConfig: o.getConfig().unfoldedConfig })).filter(({ tagConfig: o }) => {
|
|
561
|
+
var s, a;
|
|
562
|
+
return !(typeof o == "function" || o.keep || o.autoUnfold === !1 || ((s = o.autoUnfold) == null ? void 0 : s.enable) === !1 || ((a = o.autoUnfold) == null ? void 0 : a.strategy) !== "MinimumDistance");
|
|
563
|
+
}).map((o) => M(p({}, o), { distance: o.tag.getDistance() })).filter(({ distance: o, tagConfig: s }) => {
|
|
564
|
+
const a = s.autoUnfold.distance;
|
|
565
|
+
return !(a && C(o, a) === !1);
|
|
566
|
+
}).sort((o, s) => o.distance - s.distance).findIndex((o) => o.id === this.id);
|
|
638
567
|
if (n === -1 || n <= ((e = i.autoUnfold.maxNumber) != null ? e : 1) - 1 === !1)
|
|
639
568
|
return !1;
|
|
640
569
|
}
|
|
@@ -686,5 +615,5 @@ class gt {
|
|
|
686
615
|
}
|
|
687
616
|
}
|
|
688
617
|
export {
|
|
689
|
-
|
|
618
|
+
Ye as BaseTag
|
|
690
619
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
var f = Object.defineProperty;
|
|
2
|
-
var b = (
|
|
3
|
-
var l = (
|
|
4
|
-
var d = (
|
|
5
|
-
var
|
|
2
|
+
var b = (a, r, i) => r in a ? f(a, r, { enumerable: !0, configurable: !0, writable: !0, value: i }) : a[r] = i;
|
|
3
|
+
var l = (a, r, i) => (b(a, typeof r != "symbol" ? r + "" : r, i), i);
|
|
4
|
+
var d = (a, r, i) => new Promise((s, o) => {
|
|
5
|
+
var m = (t) => {
|
|
6
6
|
try {
|
|
7
|
-
|
|
7
|
+
e(i.next(t));
|
|
8
8
|
} catch (n) {
|
|
9
9
|
o(n);
|
|
10
10
|
}
|
|
11
|
-
},
|
|
11
|
+
}, p = (t) => {
|
|
12
12
|
try {
|
|
13
|
-
|
|
13
|
+
e(i.throw(t));
|
|
14
14
|
} catch (n) {
|
|
15
15
|
o(n);
|
|
16
16
|
}
|
|
17
|
-
},
|
|
18
|
-
|
|
17
|
+
}, e = (t) => t.done ? s(t.value) : Promise.resolve(t.value).then(m, p);
|
|
18
|
+
e((i = i.apply(a, r)).next());
|
|
19
19
|
});
|
|
20
20
|
import { arrayPositionToVector3 as h } from "../../../shared-utils/positionToVector3.js";
|
|
21
21
|
import { loadGLTF as j } from "../../../shared-utils/three/GLTFLoader.js";
|
|
@@ -54,86 +54,15 @@ import "../../../shared-utils/Utils/BaseUtil.js";
|
|
|
54
54
|
import "../../../shared-utils/Utils/WorkUtil.js";
|
|
55
55
|
import "../../../shared-utils/five/transformPosition.js";
|
|
56
56
|
import "../../../shared-utils/three/temp.js";
|
|
57
|
-
import "../../../Sculpt/utils/Modules/Global.js";
|
|
58
|
-
import "../../../Sculpt/utils/Modules/Cursor.js";
|
|
59
|
-
import "../../../Object3DHelperPlugin/Controller.js";
|
|
60
|
-
import "../../../base/BasePlugin.js";
|
|
61
57
|
import "../../../shared-utils/three/THREESphere.js";
|
|
62
58
|
import "animejs";
|
|
63
|
-
import "../../../shared-utils/url/absoluteUrl.js";
|
|
64
59
|
import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
65
|
-
import "../../../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
66
|
-
import "../../../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
67
|
-
import "../../../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
68
|
-
import "../../../shared-utils/three/IObject3D.js";
|
|
69
|
-
import "../../../shared-utils/three/boundingBox.js";
|
|
70
|
-
import "../../../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
71
|
-
import "../../../shared-utils/Object3DHelper/utils/direction.js";
|
|
72
|
-
import "../../../shared-utils/Object3DHelper/Constants/color.js";
|
|
73
|
-
import "../../../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
74
|
-
import "../../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
75
|
-
import "../../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
76
|
-
import "../../../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
|
|
77
|
-
import "../../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
78
|
-
import "../../../CSS3DRenderPlugin/utils/even.js";
|
|
79
|
-
import "../../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
80
|
-
import "../../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
81
|
-
import "../../../shared-utils/three/getObjectVisible.js";
|
|
82
|
-
import "../../../shared-utils/isNil.js";
|
|
83
|
-
import "../../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
84
|
-
import "../../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
85
|
-
import "../../../shared-utils/util.js";
|
|
86
|
-
import "../../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
87
|
-
import "../../../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
88
|
-
import "../../../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
89
|
-
import "../../../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
90
|
-
import "../../../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
91
|
-
import "../../../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
92
|
-
import "../../../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
93
|
-
import "../../../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
94
|
-
import "../../../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
95
|
-
import "../../../shared-utils/threex/domevents/index.js";
|
|
96
|
-
import "../../../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
97
|
-
import "../../../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
98
|
-
import "../../../Sculpt/utils/three/rayOnLine.js";
|
|
99
|
-
import "../../../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
100
|
-
import "../../../shared-utils/Object3DHelper/index.js";
|
|
101
|
-
import "../../../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
102
|
-
import "../../../shared-utils/math/rad2Deg.js";
|
|
103
|
-
import "../../../shared-utils/math/deg2Rad.js";
|
|
104
|
-
import "../../../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
105
|
-
import "../../../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
106
|
-
import "../../../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
107
|
-
import "../../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
108
|
-
import "../../../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
109
|
-
import "../../../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
110
|
-
import "../../../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
111
|
-
import "../../../shared-utils/five/fiveModelLoad.js";
|
|
112
|
-
import "../../../shared-utils/five/FiveDomEvents.js";
|
|
113
|
-
import "../../../shared-utils/five/calculateThreeMouse.js";
|
|
114
|
-
import "../../../shared-utils/three/THREERaycaster.js";
|
|
115
|
-
import "../../../shared-utils/three/PointSelector/index.js";
|
|
116
|
-
import "../../../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
117
|
-
import "../../../shared-utils/three/Magnifier.js";
|
|
118
|
-
import "../../../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
119
|
-
import "../../../shared-utils/three/Assets/index.js";
|
|
120
|
-
import "../../../shared-utils/three/PointSelector/utils/html.js";
|
|
121
|
-
import "../../../shared-utils/five/initialCSS3DRender.js";
|
|
122
|
-
import "../../../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
123
|
-
import "../../../Sculpt/Meshes/Line.js";
|
|
124
|
-
import "../../../Sculpt/typings/style.js";
|
|
125
|
-
import "../../../shared-utils/five/FiveLine.js";
|
|
126
|
-
import "../../../Sculpt/utils/removeAllTag.js";
|
|
127
|
-
import "../../../Sculpt/utils/Meshes/getLengthHTML.js";
|
|
128
|
-
import "../../../shared-utils/three/applyObjectMatrixWorld.js";
|
|
129
|
-
import "../../../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
130
|
-
import "../../../shared-utils/isTouchDevice.js";
|
|
131
|
-
import "../../../shared-utils/five/getPosition.js";
|
|
132
|
-
import "../../../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
133
60
|
import "../../utils/tag/format.js";
|
|
61
|
+
import "../../../shared-utils/util.js";
|
|
134
62
|
import "../../../shared-utils/three/blink.js";
|
|
135
63
|
import "../../../shared-utils/vectorToCoordinate.js";
|
|
136
64
|
import "../../../shared-utils/formatRad.js";
|
|
65
|
+
import "../../../shared-utils/isNil.js";
|
|
137
66
|
import "../../../shared-utils/five/lookPoint.js";
|
|
138
67
|
import "../../../shared-utils/uuid.js";
|
|
139
68
|
import "../../utils/tagPosition.js";
|
|
@@ -143,42 +72,42 @@ import "../../../shared-utils/five/getFloorIndex.js";
|
|
|
143
72
|
import "../../../shared-utils/safeObj.js";
|
|
144
73
|
import "../../utils/Cache.js";
|
|
145
74
|
import "../../../CruisePlugin/utils/sleep.js";
|
|
146
|
-
class
|
|
147
|
-
constructor(i,
|
|
148
|
-
super(i,
|
|
75
|
+
class Pt extends D {
|
|
76
|
+
constructor(i, s) {
|
|
77
|
+
super(i, s);
|
|
149
78
|
l(this, "loading", !1);
|
|
150
79
|
/** 加载外部模型 */
|
|
151
80
|
l(this, "loadModel", () => d(this, null, function* () {
|
|
152
|
-
var
|
|
81
|
+
var p;
|
|
153
82
|
const i = this.data.modelUrl;
|
|
154
83
|
if (!i)
|
|
155
84
|
return;
|
|
156
85
|
this.loading = !0;
|
|
157
|
-
const
|
|
86
|
+
const s = j(i).then((e) => d(this, null, function* () {
|
|
158
87
|
var c;
|
|
159
|
-
const t = Object.assign(
|
|
88
|
+
const t = Object.assign(e.scene, {
|
|
160
89
|
customID: this.id,
|
|
161
90
|
isTagModel: !0,
|
|
162
91
|
removeEventListener: this.getConfig().clickable === !1 ? () => {
|
|
163
|
-
} : this.addObjectClickHandler(this,
|
|
92
|
+
} : this.addObjectClickHandler(this, e.scene, (g) => {
|
|
164
93
|
this.plugin.hooks.emit("click", { target: "TagModel", tag: this, event: g });
|
|
165
94
|
})
|
|
166
95
|
});
|
|
167
96
|
return t.visible = this.currentVisible, new u.Matrix4().fromArray(this.matrix).decompose(t.position, t.quaternion, t.scale), t.updateWorldMatrix(!0, !0), t.visible = yield this.getVisible(), (c = this.getConfig().modelConfig) != null && c.autoLookAtEnabled && t.lookAt(this.five.camera.position.clone().setY(t.position.y)), t;
|
|
168
97
|
}));
|
|
169
|
-
this.model = { promise:
|
|
170
|
-
const o = yield
|
|
171
|
-
if (this.loading = !1, ((
|
|
98
|
+
this.model = { promise: s };
|
|
99
|
+
const o = yield s;
|
|
100
|
+
if (this.loading = !1, ((p = this.model) == null ? void 0 : p.promise) !== s || !this.plugin.tags.includes(this))
|
|
172
101
|
return;
|
|
173
102
|
this.model.object = o;
|
|
174
|
-
const
|
|
175
|
-
if (
|
|
103
|
+
const m = this.plugin.gltfObjectGroup.children.find((e) => e.customID === this.id);
|
|
104
|
+
if (m && (this.plugin.gltfObjectGroup.remove(m), m.removeEventListener()), this.plugin.updateRender3DDomTag(), T(this)) {
|
|
176
105
|
if (this.computeRenderType() === "Mesh" && !this.mediaPlane) {
|
|
177
|
-
const
|
|
106
|
+
const e = this.data.mediaPosition.map(h);
|
|
178
107
|
this.mediaPlane = new M(this.data.mediaData[0].url, this.data.mediaPosition.map(h), {
|
|
179
108
|
objectFit: this.data.objectFit
|
|
180
109
|
});
|
|
181
|
-
const t = new u.Vector3().addVectors(
|
|
110
|
+
const t = new u.Vector3().addVectors(e[0], e[2]).divideScalar(2);
|
|
182
111
|
this.mediaPlane.position.copy(t), o.add(this.mediaPlane);
|
|
183
112
|
}
|
|
184
113
|
this.computeRenderType() !== "Mesh" && (o.updateTagCss3DObjectMatrix = () => this.plugin.updateTagCss3DObjectMatrix(this, o), o.updateTagCss3DObjectMatrix());
|
|
@@ -188,13 +117,13 @@ class qi extends D {
|
|
|
188
117
|
this.state.unfolded = !0;
|
|
189
118
|
}
|
|
190
119
|
applyVisible() {
|
|
191
|
-
var i,
|
|
192
|
-
(i = this.model) != null && i.object && (this.model.object.visible = this.currentVisible), (
|
|
120
|
+
var i, s, o;
|
|
121
|
+
(i = this.model) != null && i.object && (this.model.object.visible = this.currentVisible), (s = this.tag3DContentSvelte) == null || s.svelteApp.$set({ tag: this, state: this.plugin.state }), (o = this.tag3DContentSvelte) == null || o.css3DInstance.setVisible(this.currentVisible);
|
|
193
122
|
}
|
|
194
123
|
computeNormal() {
|
|
195
124
|
return v(this.data.mediaPosition);
|
|
196
125
|
}
|
|
197
126
|
}
|
|
198
127
|
export {
|
|
199
|
-
|
|
128
|
+
Pt as ModelTag
|
|
200
129
|
};
|