@realsee/dnalogel 3.50.16 → 3.50.18-alpha.0
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/README.md +116 -0
- package/dist/ModelMakerPlugin/Controller.d.ts +2 -0
- package/dist/Sculpt/utils/export.d.ts +18 -0
- package/dist/index.cjs.js +207 -207
- package/dist/index.js +34867 -34776
- package/dist/index.umd.js +211 -211
- package/dist/shared-utils/five/fiveEveryReadyListener.d.ts +2 -0
- package/dist/shared-utils/index.d.ts +1 -0
- package/dist/shared-utils/tag.d.ts +41 -2
- package/dist/shared-utils/three/temp.d.ts +2 -2
- package/libs/AreaMakerPlugin/Controller.js +100 -46
- package/libs/AreaMakerPlugin/index.js +64 -10
- package/libs/AreaMakerPlugin/utils/Item.js +156 -100
- package/libs/CSS3DRenderPlugin/Controller.js +93 -44
- package/libs/CSS3DRenderPlugin/index.js +62 -13
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +105 -49
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +130 -77
- package/libs/CruisePlugin/BaseController.js +143 -89
- package/libs/CruisePlugin/Move.js +83 -39
- package/libs/CruisePlugin/Work.js +95 -51
- package/libs/CruisePlugin/index.js +66 -22
- package/libs/CurrentPanoImagePlugin/Controller.js +139 -85
- package/libs/CurrentPanoImagePlugin/index.js +63 -9
- package/libs/GuideLinePlugin/Controller.js +57 -13
- package/libs/GuideLinePlugin/GuideLineItem.js +63 -19
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +6 -2
- package/libs/GuideLinePlugin/GuideLineModeItem.js +58 -14
- package/libs/GuideLinePlugin/index.js +66 -22
- package/libs/ModelMakerPlugin/Controller.d.ts +2 -0
- package/libs/ModelMakerPlugin/Controller.js +190 -129
- package/libs/ModelMakerPlugin/index.js +63 -21
- package/libs/ModelMakerPlugin/item/baseItem.js +4 -2
- package/libs/ModelMakerPlugin/item/boxItem.js +5 -3
- package/libs/ModelMakerPlugin/item/polygonItem.js +9 -7
- package/libs/ModelMakerPlugin/item/prismItem.js +5 -3
- package/libs/ModelTVVideoPlugin/Plugin.js +96 -47
- package/libs/ModelTVVideoPlugin/index.js +55 -6
- package/libs/Object3DHelperPlugin/Controller.js +42 -25
- package/libs/Object3DHelperPlugin/index.js +28 -12
- package/libs/PanoCompassPlugin/Controller.js +92 -44
- package/libs/PanoCompassPlugin/index.js +63 -15
- package/libs/PanoDoorLabelPlugin/BaseController.js +79 -25
- package/libs/PanoDoorLabelPlugin/Controller.js +132 -78
- package/libs/PanoDoorLabelPlugin/index.js +63 -9
- package/libs/PanoMeasurePlugin/Components/Controller0.js +126 -77
- package/libs/PanoMeasurePlugin/Components/Controller1.js +139 -90
- package/libs/PanoMeasurePlugin/Controller/EditController.js +120 -71
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +120 -70
- package/libs/PanoMeasurePlugin/Controller/index.js +132 -86
- package/libs/PanoMeasurePlugin/Model/area.js +72 -22
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +56 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +64 -15
- package/libs/PanoMeasurePlugin/index.js +62 -16
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +57 -2
- package/libs/PanoRulerProPlugin/Controller.js +88 -33
- package/libs/PanoRulerProPlugin/RulerItems.js +146 -91
- package/libs/PanoRulerProPlugin/index.js +64 -9
- package/libs/PanoSpatialTagPlugin/Plugin.js +177 -128
- package/libs/PanoSpatialTagPlugin/index.js +53 -4
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +116 -60
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +192 -136
- package/libs/PanoTagPlugin/Components/Tag/index.js +194 -139
- package/libs/PanoTagPlugin/Components/TagContainer.js +112 -57
- package/libs/PanoTagPlugin/Components/TagItem.js +204 -149
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +157 -101
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +75 -20
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +86 -31
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +93 -37
- package/libs/PanoTagPlugin/controller/TagRender.js +62 -18
- package/libs/PanoTagPlugin/controller/TagUtil.js +123 -79
- package/libs/PanoTagPlugin/controller/index.js +110 -72
- package/libs/PanoTagPlugin/index.js +72 -28
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +77 -21
- package/libs/PanoVideoPlugin/Controller.js +95 -41
- package/libs/PanoVideoPlugin/VideoMeshController.js +119 -63
- package/libs/PanoVideoPlugin/index.js +66 -12
- package/libs/PipelinePlugin/Controller.js +173 -119
- package/libs/PipelinePlugin/index.js +63 -9
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +70 -14
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +58 -2
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +98 -42
- package/libs/Sculpt/Meshes/Box.js +3 -2
- package/libs/Sculpt/Meshes/Cylinder.js +10 -6
- package/libs/Sculpt/Meshes/Line.js +43 -38
- package/libs/Sculpt/Meshes/LineWithDots.js +14 -10
- package/libs/Sculpt/Meshes/Point.js +24 -20
- package/libs/Sculpt/Meshes/Polygon.js +5 -2
- package/libs/Sculpt/Meshes/Prism.js +19 -16
- package/libs/Sculpt/Objects/Line/Editor.js +6 -5
- package/libs/Sculpt/index.js +15 -14
- package/libs/Sculpt/utils/export.d.ts +18 -0
- package/libs/Sculpt/utils/export.js +21 -0
- package/libs/Sculpt/utils/three/ColoredMesh.js +26 -22
- package/libs/base/BasePlugin.js +14 -10
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +146 -94
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +62 -10
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +109 -56
- package/libs/floorplan/ModelFloorplanPlugin/index.js +62 -9
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +116 -63
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +62 -9
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +105 -52
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +62 -9
- package/libs/floorplan/index.js +4 -0
- package/libs/index.js +208 -206
- package/libs/shared-utils/five/fiveEveryReadyListener.d.ts +2 -0
- package/libs/shared-utils/five/fiveEveryReadyListener.js +15 -0
- package/libs/shared-utils/five/index.js +6 -2
- package/libs/shared-utils/five/lookObject.js +31 -27
- package/libs/shared-utils/index.d.ts +1 -0
- package/libs/shared-utils/index.js +19 -17
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/tag.d.ts +41 -2
- package/libs/shared-utils/tag.js +139 -86
- package/libs/shared-utils/three/index.js +4 -0
- package/libs/shared-utils/three/temp.d.ts +2 -2
- package/libs/shared-utils/three/temp.js +4 -4
- package/package.json +1 -1
|
@@ -21,20 +21,20 @@ var j = (c, i) => {
|
|
|
21
21
|
};
|
|
22
22
|
var f = (c, i, e) => (M(c, typeof i != "symbol" ? i + "" : i, e), e);
|
|
23
23
|
var y = (c, i, e) => new Promise((t, r) => {
|
|
24
|
-
var
|
|
24
|
+
var o = (n) => {
|
|
25
25
|
try {
|
|
26
|
-
|
|
26
|
+
s(e.next(n));
|
|
27
27
|
} catch (d) {
|
|
28
28
|
r(d);
|
|
29
29
|
}
|
|
30
|
-
}, l = (
|
|
30
|
+
}, l = (n) => {
|
|
31
31
|
try {
|
|
32
|
-
|
|
32
|
+
s(e.throw(n));
|
|
33
33
|
} catch (d) {
|
|
34
34
|
r(d);
|
|
35
35
|
}
|
|
36
|
-
},
|
|
37
|
-
|
|
36
|
+
}, s = (n) => n.done ? t(n.value) : Promise.resolve(n.value).then(o, l);
|
|
37
|
+
s((e = e.apply(c, i)).next());
|
|
38
38
|
});
|
|
39
39
|
import { Subscribe as Q } from "../../../shared-utils/Subscribe.js";
|
|
40
40
|
import { calculateTagConfig as w } from "../../utils/tag/calculateTagConfig.js";
|
|
@@ -51,13 +51,17 @@ import "../../../vendor/three/examples/jsm/lines/LineGeometry.js";
|
|
|
51
51
|
import { anyPositionToVector3 as A } from "../../../shared-utils/positionToVector3.js";
|
|
52
52
|
import { toArray as ie } from "../../../shared-utils/util.js";
|
|
53
53
|
import "../../../shared-utils/three/core/Sphere.js";
|
|
54
|
-
import { blink as te, reblink as
|
|
55
|
-
import { vectorToCoordinates as
|
|
54
|
+
import { blink as te, reblink as oe } from "../../../shared-utils/three/blink.js";
|
|
55
|
+
import { vectorToCoordinates as ne } from "../../../shared-utils/vectorToCoordinate.js";
|
|
56
56
|
import { transformPosition as O } from "../../../shared-utils/five/transformPosition.js";
|
|
57
57
|
import { isNil as R, notNil as E } from "../../../shared-utils/isNil.js";
|
|
58
|
-
import { lookPoint as
|
|
58
|
+
import { lookPoint as se } from "../../../shared-utils/five/lookPoint.js";
|
|
59
59
|
import { uuid as re } from "../../../shared-utils/uuid.js";
|
|
60
60
|
import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
61
|
+
import "../../../Sculpt/Meshes/Polygon.js";
|
|
62
|
+
import "../../../Sculpt/utils/Modules/Global.js";
|
|
63
|
+
import "../../../vendor/hotkeys-js/dist/hotkeys.esm.js";
|
|
64
|
+
import "../../../Sculpt/utils/three/rayOnLine.js";
|
|
61
65
|
import { objectAssignDeepExports as b } from "../../../vendor/object-assign-deep/objectAssignDeep.js";
|
|
62
66
|
import { getTagPosition as L, getTagCenterPosition as $ } from "../../utils/tagPosition.js";
|
|
63
67
|
import { checkRange as k } from "../../utils/checkRange.js";
|
|
@@ -78,6 +82,8 @@ import "../../../shared-utils/Utils/FiveUtil.js";
|
|
|
78
82
|
import "../../../shared-utils/Utils/BaseUtil.js";
|
|
79
83
|
import "../../../shared-utils/Utils/WorkUtil.js";
|
|
80
84
|
import "../../../shared-utils/dom/resizeObserver.js";
|
|
85
|
+
import "../../../shared-utils/five/fiveEveryReadyListener.js";
|
|
86
|
+
import "../../../shared-utils/throttle.js";
|
|
81
87
|
import "../../../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
82
88
|
import "../../../shared-utils/three/Magnifier.js";
|
|
83
89
|
import "../../../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
@@ -86,6 +92,7 @@ import "../../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
|
86
92
|
import "../../../CSS3DRenderPlugin/utils/even.js";
|
|
87
93
|
import "../../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
88
94
|
import "../../../shared-utils/three/getObjectVisible.js";
|
|
95
|
+
import "../../../shared-utils/three/core/Raycaster.js";
|
|
89
96
|
import "../../../shared-utils/three/PointSelector/utils/html.js";
|
|
90
97
|
import "../../../shared-utils/five/initialCSS3DRender.js";
|
|
91
98
|
import "../../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
@@ -106,8 +113,57 @@ import "../../../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
|
106
113
|
import "../../../shared-utils/three/PointSelector/utils/contents.js";
|
|
107
114
|
import "../../../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
|
|
108
115
|
import "../../../vendor/three/build/three.module.js";
|
|
116
|
+
import "../../../shared-utils/three/generatePolygonGeometry.js";
|
|
117
|
+
import "../../../shared-utils/three/earcut3D.js";
|
|
118
|
+
import "earcut";
|
|
119
|
+
import "../../../shared-utils/three/getNormal.js";
|
|
120
|
+
import "../../../PanoMeasurePlugin/utils/isIntersecting.js";
|
|
121
|
+
import "../../../Sculpt/utils/three/ColoredMesh.js";
|
|
122
|
+
import "../../../shared-utils/three/geometryUtil.js";
|
|
123
|
+
import "../../../Sculpt/utils/Modules/Cursor.js";
|
|
124
|
+
import "../../../Object3DHelperPlugin/Controller.js";
|
|
125
|
+
import "../../../base/BasePlugin.js";
|
|
126
|
+
import "../../../shared-utils/url/absoluteUrl.js";
|
|
127
|
+
import "../../../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
128
|
+
import "../../../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
129
|
+
import "../../../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
130
|
+
import "../../../shared-utils/three/boundingBox.js";
|
|
131
|
+
import "../../../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
132
|
+
import "../../../shared-utils/Object3DHelper/utils/direction.js";
|
|
133
|
+
import "../../../shared-utils/Object3DHelper/Constants/color.js";
|
|
134
|
+
import "../../../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
135
|
+
import "../../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
136
|
+
import "../../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
137
|
+
import "../../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
138
|
+
import "../../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
139
|
+
import "../../../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
140
|
+
import "../../../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
141
|
+
import "../../../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
142
|
+
import "../../../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
143
|
+
import "../../../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
144
|
+
import "../../../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
145
|
+
import "../../../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
146
|
+
import "../../../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
147
|
+
import "../../../shared-utils/threex/domevents/index.js";
|
|
148
|
+
import "../../../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
149
|
+
import "../../../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
150
|
+
import "../../../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
151
|
+
import "../../../shared-utils/Object3DHelper/index.js";
|
|
152
|
+
import "../../../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
153
|
+
import "../../../shared-utils/math/rad2Deg.js";
|
|
154
|
+
import "../../../shared-utils/math/deg2Rad.js";
|
|
155
|
+
import "../../../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
156
|
+
import "../../../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
157
|
+
import "../../../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
158
|
+
import "../../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
159
|
+
import "../../../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
160
|
+
import "../../../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
161
|
+
import "../../../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
162
|
+
import "../../../shared-utils/five/fiveModelLoad.js";
|
|
163
|
+
import "../../../shared-utils/five/FiveDomEvents.js";
|
|
164
|
+
import "../../../shared-utils/five/calculateThreeMouse.js";
|
|
109
165
|
import "../../../shared-utils/formatRad.js";
|
|
110
|
-
class
|
|
166
|
+
class Ft {
|
|
111
167
|
constructor(i, e) {
|
|
112
168
|
f(this, "plugin");
|
|
113
169
|
f(this, "id");
|
|
@@ -137,17 +193,17 @@ class Ti {
|
|
|
137
193
|
f(this, "computedConfig");
|
|
138
194
|
f(this, "cache");
|
|
139
195
|
f(this, "entryFromModel");
|
|
140
|
-
var
|
|
196
|
+
var n, d, h, u;
|
|
141
197
|
this.plugin = i;
|
|
142
198
|
const t = Y(e);
|
|
143
199
|
e.stickType = t;
|
|
144
|
-
const r = JSON.parse(JSON.stringify(e.data)),
|
|
145
|
-
e.initialConfig =
|
|
146
|
-
const l = w(e, i.config),
|
|
147
|
-
e.config =
|
|
200
|
+
const r = JSON.parse(JSON.stringify(e.data)), o = (n = e.initialConfig) != null ? n : e.config ? JSON.parse(JSON.stringify(e.config)) : {};
|
|
201
|
+
e.initialConfig = o;
|
|
202
|
+
const l = w(e, i.config), s = this.getConfig(e);
|
|
203
|
+
e.config = s, this.id = (d = e.id) != null ? d : re(), this.enabled = (h = e.enabled) != null ? h : !0, this.contentType = e.contentType, this.data = (u = s.initialData) != null && u.important ? b(e.data, r, s.initialData) : b(e.data, s.initialData, r), this.state = p({
|
|
148
204
|
visible: void 0,
|
|
149
205
|
unfolded: !this.can("fold")
|
|
150
|
-
},
|
|
206
|
+
}, s.initialState), this.originPosition = e.position, e.originPosition = this.originPosition, this.position = (() => {
|
|
151
207
|
const a = e.originPosition;
|
|
152
208
|
if (!a)
|
|
153
209
|
return;
|
|
@@ -156,7 +212,7 @@ class Ti {
|
|
|
156
212
|
})(), this.matrix = e.matrix ? (() => {
|
|
157
213
|
const a = new B.Matrix4().fromArray(e.matrix);
|
|
158
214
|
return a.premultiply(i.workUtil.transform), a.elements;
|
|
159
|
-
})() : e.matrix, this.initialConfig =
|
|
215
|
+
})() : e.matrix, this.initialConfig = o, this.computedConfig = l, this.stickType = t, this.config = e.config, this.fiveState = e.fiveState, this.normal = e.normal, this.cache = new fe(), this.hooks = new Q(), Object.keys(e).forEach((a) => {
|
|
160
216
|
this[a] === void 0 && e[a] !== void 0 && (this[a] = e[a]);
|
|
161
217
|
});
|
|
162
218
|
}
|
|
@@ -174,9 +230,9 @@ class Ti {
|
|
|
174
230
|
return ee(...Array.isArray(i) ? i : [i]);
|
|
175
231
|
}
|
|
176
232
|
get currentConfig() {
|
|
177
|
-
var r,
|
|
233
|
+
var r, o;
|
|
178
234
|
const i = w(this, this.plugin.config, { useCache: !0 }), e = this.five.getCurrentState().mode, t = (r = i.configWithFiveMode) == null ? void 0 : r[e];
|
|
179
|
-
return (
|
|
235
|
+
return (o = t != null ? t : i) != null ? o : {};
|
|
180
236
|
}
|
|
181
237
|
get currentVisible() {
|
|
182
238
|
return !(!this.plugin.state.enabled || !this.plugin.state.visible || !this.enabled || !this.state.visible);
|
|
@@ -201,17 +257,17 @@ class Ti {
|
|
|
201
257
|
return;
|
|
202
258
|
const t = (r = i == null ? void 0 : i.targetMode) != null ? r : this.five.state.mode;
|
|
203
259
|
if (t === "Panorama") {
|
|
204
|
-
const
|
|
205
|
-
if (R(
|
|
260
|
+
const o = e == null ? void 0 : e.panoIndex;
|
|
261
|
+
if (R(o))
|
|
206
262
|
return;
|
|
207
|
-
const l = this.workUtil.getObserverPosition(
|
|
263
|
+
const l = this.workUtil.getObserverPosition(o), s = this.centerPosition.clone().sub(l).normalize();
|
|
208
264
|
this.five.setState(p({
|
|
209
265
|
mode: "Panorama",
|
|
210
266
|
workCode: this.workUtil.workCode,
|
|
211
|
-
panoIndex:
|
|
212
|
-
},
|
|
267
|
+
panoIndex: o
|
|
268
|
+
}, ne(s))), yield this.five.ready();
|
|
213
269
|
} else
|
|
214
|
-
t === "Mapview" && (yield
|
|
270
|
+
t === "Mapview" && (yield se(this.five, this.centerPosition, i == null ? void 0 : i.pointConfig));
|
|
215
271
|
});
|
|
216
272
|
}
|
|
217
273
|
/**
|
|
@@ -219,8 +275,8 @@ class Ti {
|
|
|
219
275
|
*/
|
|
220
276
|
blink(i) {
|
|
221
277
|
return y(this, null, function* () {
|
|
222
|
-
var
|
|
223
|
-
const e = (
|
|
278
|
+
var s, n, d, h;
|
|
279
|
+
const e = (s = this.enabled) != null ? s : !0, t = (n = this.state) == null ? void 0 : n.visible, r = e && t;
|
|
224
280
|
r === !1 && (this.state.visible = !0, this.enabled = !0, this.applyVisible(), this.plugin.render(), this.computeRenderType() !== "Mesh" ? yield new Promise((u) => y(this, null, function* () {
|
|
225
281
|
if (this.dom || this.contentDom) {
|
|
226
282
|
u();
|
|
@@ -238,16 +294,16 @@ class Ti {
|
|
|
238
294
|
this.mediaPlane && (u(), clearInterval(a));
|
|
239
295
|
}, 16.7);
|
|
240
296
|
}))), this.dom && (this.dom.style.visibility = "hidden"), this.contentDom && (this.contentDom.style.visibility = "hidden"));
|
|
241
|
-
const
|
|
297
|
+
const o = (() => {
|
|
242
298
|
var a;
|
|
243
299
|
const u = [];
|
|
244
300
|
return u.push(this.dom), this.stickType !== "2DPoint" && u.push(this.contentDom), u.push((a = this.model) == null ? void 0 : a.object), u.push(this.mediaPlane), u.filter(Boolean);
|
|
245
301
|
})();
|
|
246
|
-
if (!
|
|
302
|
+
if (!o.length) {
|
|
247
303
|
console.warn("tagDom is empty");
|
|
248
304
|
return;
|
|
249
305
|
}
|
|
250
|
-
yield (r ? te :
|
|
306
|
+
yield (r ? te : oe)(o, p({
|
|
251
307
|
begin: () => {
|
|
252
308
|
r === !1 && (this.dom && (this.dom.style.visibility = ""), this.contentDom && (this.contentDom.style.visibility = ""));
|
|
253
309
|
},
|
|
@@ -335,13 +391,13 @@ class Ti {
|
|
|
335
391
|
this.zIndex = Math.round((1e4 - (i != null ? i : 0)) * 100);
|
|
336
392
|
}
|
|
337
393
|
getConfig(i, e) {
|
|
338
|
-
var l,
|
|
339
|
-
const t = w(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,
|
|
340
|
-
return (
|
|
394
|
+
var l, s, n;
|
|
395
|
+
const t = w(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, o = (s = t.configWithFiveMode) == null ? void 0 : s[r];
|
|
396
|
+
return (n = o != null ? o : t) != null ? n : {};
|
|
341
397
|
}
|
|
342
398
|
getDistance(i, e = 3) {
|
|
343
|
-
const t = p(p({}, this.five.getCurrentState()), i), { panoIndex: r, mode:
|
|
344
|
-
return !l || !
|
|
399
|
+
const t = p(p({}, this.five.getCurrentState()), i), { panoIndex: r, mode: o } = t, l = o === "Panorama" ? this.workUtil.getObserverPosition(r) : this.five.camera.position, s = this.centerPosition;
|
|
400
|
+
return !l || !s ? -1 : l.distanceTo(s);
|
|
345
401
|
}
|
|
346
402
|
getVisible(i) {
|
|
347
403
|
if (!this.enabled || !this.plugin.state.enabled || !this.fiveUtil.model)
|
|
@@ -402,68 +458,68 @@ class Ti {
|
|
|
402
458
|
return i != null ? i : "Dom";
|
|
403
459
|
}
|
|
404
460
|
computeVisible(i) {
|
|
405
|
-
const e = p(p({}, this.five.getCurrentState()), i), { panoIndex: t, mode: r } = e,
|
|
461
|
+
const e = p(p({}, this.five.getCurrentState()), i), { panoIndex: t, mode: r } = e, o = [];
|
|
406
462
|
return (() => {
|
|
407
463
|
var d, u, a;
|
|
408
|
-
const
|
|
409
|
-
if (typeof
|
|
464
|
+
const n = (d = this.getConfig().visibleConfig) != null ? d : {};
|
|
465
|
+
if (typeof n == "function")
|
|
410
466
|
return {
|
|
411
|
-
value:
|
|
412
|
-
checkedList:
|
|
467
|
+
value: n(this.five, { tag: this, distance: this.getDistance(e, void 0) }),
|
|
468
|
+
checkedList: o,
|
|
413
469
|
reason: "config function result"
|
|
414
470
|
};
|
|
415
471
|
{
|
|
416
|
-
if (
|
|
417
|
-
return { value: !1, checkedList:
|
|
418
|
-
if (
|
|
419
|
-
return { value: !0, checkedList:
|
|
420
|
-
const g = this.computeVisibleByFiveMode(
|
|
472
|
+
if (n.keep === "hidden")
|
|
473
|
+
return { value: !1, checkedList: o, reason: "config.keep is hidden" };
|
|
474
|
+
if (n.keep === "visible")
|
|
475
|
+
return { value: !0, checkedList: o, reason: "config.keep is visible" };
|
|
476
|
+
const g = this.computeVisibleByFiveMode(n, r);
|
|
421
477
|
if ((g == null ? void 0 : g.value) === !1)
|
|
422
478
|
return g;
|
|
423
|
-
if (
|
|
479
|
+
if (n.followModelVisibility === !0 && ["poincare", "aerophoto", "sand"].includes(this.workUtil.fromType) && (r === "Floorplan" || r === "Mapview")) {
|
|
424
480
|
const h = this.computeVisibleByFloorIndex(), { value: m } = h, v = j(h, ["value"]);
|
|
425
481
|
if (m === !1)
|
|
426
|
-
return p({ value: !1, checkedList:
|
|
482
|
+
return p({ value: !1, checkedList: o, reason: "followModelVisibility check failed" }, v);
|
|
427
483
|
}
|
|
428
|
-
if (U(r) &&
|
|
429
|
-
if (
|
|
484
|
+
if (U(r) && n.visiblePanoIndex !== void 0 && n.visiblePanoIndex !== "all" && t !== void 0) {
|
|
485
|
+
if (o.push("visiblePanoIndex"), Array.isArray(n.visiblePanoIndex) && !n.visiblePanoIndex.includes(t))
|
|
430
486
|
return {
|
|
431
487
|
value: !1,
|
|
432
|
-
checkedList:
|
|
433
|
-
reason: `current panoIndex is not included in visiblePano. currentPanoIndex: ${t}, visiblePanoIndex: ${
|
|
488
|
+
checkedList: o,
|
|
489
|
+
reason: `current panoIndex is not included in visiblePano. currentPanoIndex: ${t}, visiblePanoIndex: ${n.visiblePanoIndex}`
|
|
434
490
|
};
|
|
435
|
-
if (
|
|
491
|
+
if (n.visiblePanoIndex === "current" && t !== ((u = this.fiveState) == null ? void 0 : u.panoIndex))
|
|
436
492
|
return {
|
|
437
493
|
value: !1,
|
|
438
|
-
checkedList:
|
|
494
|
+
checkedList: o,
|
|
439
495
|
reason: `current panoIndex is not equal to tag.panoIndex. currentPanoIndex: ${t}, tag.panoIndex: ${(a = this.fiveState) == null ? void 0 : a.panoIndex}`
|
|
440
496
|
};
|
|
441
497
|
}
|
|
442
|
-
if (
|
|
498
|
+
if (n.visibleDistance !== void 0 && (o.push("visibleDistance"), n.visibleDistance !== "unLimited")) {
|
|
443
499
|
const m = this.getDistance(e, 1);
|
|
444
|
-
if (k(m,
|
|
500
|
+
if (k(m, n.visibleDistance) === !1)
|
|
445
501
|
return {
|
|
446
502
|
value: !1,
|
|
447
|
-
checkedList:
|
|
503
|
+
checkedList: o,
|
|
448
504
|
panoIndex: t,
|
|
449
|
-
visibleDistance:
|
|
450
|
-
reason: `distance is not in visibleDistance. distance: ${m}, visibleDistance: ${
|
|
505
|
+
visibleDistance: n.visibleDistance,
|
|
506
|
+
reason: `distance is not in visibleDistance. distance: ${m}, visibleDistance: ${n.visibleDistance.min} - ${n.visibleDistance.max}`
|
|
451
507
|
};
|
|
452
508
|
}
|
|
453
|
-
if (
|
|
454
|
-
if (
|
|
509
|
+
if (n.intersectRaycaster !== !1 && (typeof n.intersectRaycaster != "object" || n.intersectRaycaster.enabled !== !1)) {
|
|
510
|
+
if (o.push("intersectRaycaster"), t === void 0)
|
|
455
511
|
return {
|
|
456
512
|
value: !1,
|
|
457
|
-
checkedList:
|
|
513
|
+
checkedList: o,
|
|
458
514
|
reason: `intersectRaycaster check failed: panoIndex is ${t}`
|
|
459
515
|
};
|
|
460
516
|
const m = this.computeVisibleByIntersect(t);
|
|
461
517
|
if (m.value === !1)
|
|
462
|
-
return Object.assign(m, { checkedList:
|
|
518
|
+
return Object.assign(m, { checkedList: o });
|
|
463
519
|
}
|
|
464
520
|
return {
|
|
465
521
|
value: !0,
|
|
466
|
-
checkedList:
|
|
522
|
+
checkedList: o,
|
|
467
523
|
reason: "all check passed"
|
|
468
524
|
};
|
|
469
525
|
}
|
|
@@ -474,28 +530,28 @@ class Ti {
|
|
|
474
530
|
*/
|
|
475
531
|
computeVisibleByFiveMode(i, e) {
|
|
476
532
|
const t = () => {
|
|
477
|
-
var l,
|
|
478
|
-
let
|
|
479
|
-
if (
|
|
480
|
-
return
|
|
481
|
-
if (
|
|
533
|
+
var l, s;
|
|
534
|
+
let o = typeof i.visibleFiveMode == "function" ? i.visibleFiveMode(this) : i.visibleFiveMode;
|
|
535
|
+
if (o || (o = (s = (l = this.fiveState) == null ? void 0 : l.mode) != null ? s : this.workUtil.observers.length ? "Panorama" : "ModelLike"), Array.isArray(o))
|
|
536
|
+
return o.includes(e);
|
|
537
|
+
if (o === "ModelLike")
|
|
482
538
|
return C(e);
|
|
483
|
-
if (
|
|
539
|
+
if (o === "PanoramaLike")
|
|
484
540
|
return !U(e);
|
|
485
|
-
if (
|
|
541
|
+
if (o === "all")
|
|
486
542
|
return !0;
|
|
487
|
-
if (typeof
|
|
488
|
-
return
|
|
543
|
+
if (typeof o == "string")
|
|
544
|
+
return o === e;
|
|
489
545
|
};
|
|
490
546
|
if ((() => {
|
|
491
547
|
var l;
|
|
492
|
-
const
|
|
548
|
+
const o = t();
|
|
493
549
|
if (E((l = this.fiveState) == null ? void 0 : l.panoIndex) && i.entryFromModel) {
|
|
494
|
-
if (C(e) &&
|
|
550
|
+
if (C(e) && o ? this.entryFromModel = !1 : this.entryFromModel = !0, C(e))
|
|
495
551
|
return !0;
|
|
496
552
|
} else
|
|
497
553
|
this.entryFromModel = !1;
|
|
498
|
-
return
|
|
554
|
+
return o;
|
|
499
555
|
})() === !1)
|
|
500
556
|
return {
|
|
501
557
|
value: !1,
|
|
@@ -506,19 +562,19 @@ class Ti {
|
|
|
506
562
|
}
|
|
507
563
|
/** 通过射线检测标签可用性 */
|
|
508
564
|
computeVisibleByIntersect(i) {
|
|
509
|
-
var
|
|
510
|
-
const e = z(z((
|
|
565
|
+
var n, d, h, u;
|
|
566
|
+
const e = z(z((n = this.getConfig().visibleConfig) != null ? n : {}).intersectRaycaster), t = i != null ? i : this.five.getCurrentState().panoIndex, r = U(this.five.getCurrentState().mode) ? this.workUtil.getObserverPosition(t) : this.five.camera.position;
|
|
511
567
|
if (r === void 0)
|
|
512
568
|
return { value: !1, reason: { type: "startPosition is undefined", fivePanoIndex: t } };
|
|
513
|
-
const
|
|
569
|
+
const o = ie(
|
|
514
570
|
(() => {
|
|
515
571
|
var g;
|
|
516
572
|
const a = (g = e.checkPoints) != null ? g : "center";
|
|
517
573
|
return a === "center" ? $(this) : a === "corner" ? L(this) : Array.isArray(a) ? a : [];
|
|
518
574
|
})()
|
|
519
575
|
);
|
|
520
|
-
let l = 0,
|
|
521
|
-
for (const a of
|
|
576
|
+
let l = 0, s = 0;
|
|
577
|
+
for (const a of o) {
|
|
522
578
|
const g = new B.Vector3().subVectors(a, r).normalize();
|
|
523
579
|
let m;
|
|
524
580
|
V.set(r, g);
|
|
@@ -533,12 +589,12 @@ class Ti {
|
|
|
533
589
|
}).filter(E), [q] = V.intersectObjects(_, !0);
|
|
534
590
|
return q;
|
|
535
591
|
})(), J = r.distanceTo(a), W = (d = e.distanceAccuracy) != null ? d : 0.01;
|
|
536
|
-
m = Math.min(m != null ? m : 1 / 0, (h = x == null ? void 0 : x.distance) != null ? h : 1 / 0), m + W >= J ? l++ :
|
|
592
|
+
m = Math.min(m != null ? m : 1 / 0, (h = x == null ? void 0 : x.distance) != null ? h : 1 / 0), m + W >= J ? l++ : s++;
|
|
537
593
|
const H = (u = e.needPassed) != null ? u : 1;
|
|
538
594
|
if (l >= H)
|
|
539
595
|
return { value: !0 };
|
|
540
596
|
}
|
|
541
|
-
return
|
|
597
|
+
return s === 0 ? { value: !0 } : {
|
|
542
598
|
value: !1,
|
|
543
599
|
reason: {
|
|
544
600
|
type: "intersectRaycaster check failed",
|
|
@@ -549,12 +605,12 @@ class Ti {
|
|
|
549
605
|
};
|
|
550
606
|
}
|
|
551
607
|
computeVisibleByFloorIndex() {
|
|
552
|
-
var r,
|
|
608
|
+
var r, o, l, s, n, d, h;
|
|
553
609
|
let i = 0;
|
|
554
610
|
const e = (r = this.fiveState) == null ? void 0 : r.panoIndex;
|
|
555
|
-
e !== void 0 ? i = (
|
|
611
|
+
e !== void 0 ? i = (o = this.workUtil.getObserver(e)) == null ? void 0 : o.floorIndex : i = ae(
|
|
556
612
|
this.workUtil.work,
|
|
557
|
-
(h = (d = (
|
|
613
|
+
(h = (d = (s = (l = this.model) == null ? void 0 : l.object) == null ? void 0 : s.position) != null ? d : (n = this.mediaPlane) == null ? void 0 : n.position) != null ? h : $(this)
|
|
558
614
|
);
|
|
559
615
|
const t = this.fiveUtil.model.shownFloor;
|
|
560
616
|
return {
|
|
@@ -599,20 +655,20 @@ class Ti {
|
|
|
599
655
|
return !1;
|
|
600
656
|
}
|
|
601
657
|
if (i.autoUnfold.strategy === "MinimumDistance") {
|
|
602
|
-
const
|
|
603
|
-
const
|
|
604
|
-
if (!
|
|
658
|
+
const o = this.plugin.filterPointTag.filter((s) => s.currentVisible).filter((s) => {
|
|
659
|
+
const n = this.computeTagProject();
|
|
660
|
+
if (!n)
|
|
605
661
|
return !1;
|
|
606
|
-
const { x: d, y: h, z: u } =
|
|
662
|
+
const { x: d, y: h, z: u } = n;
|
|
607
663
|
return !(Math.abs(u) > 1 || Math.abs(d) > 1 || Math.abs(h) > 1);
|
|
608
|
-
}).map((
|
|
609
|
-
var
|
|
610
|
-
return !(typeof
|
|
611
|
-
}).map((
|
|
612
|
-
const d =
|
|
613
|
-
return !(d && k(
|
|
614
|
-
}).sort((
|
|
615
|
-
if (
|
|
664
|
+
}).map((s) => ({ tag: s, id: s.id, tagConfig: s.getConfig().unfoldedConfig })).filter(({ tagConfig: s }) => {
|
|
665
|
+
var n, d;
|
|
666
|
+
return !(typeof s == "function" || s.keep || s.autoUnfold === !1 || ((n = s.autoUnfold) == null ? void 0 : n.enable) === !1 || ((d = s.autoUnfold) == null ? void 0 : d.strategy) !== "MinimumDistance");
|
|
667
|
+
}).map((s) => I(p({}, s), { distance: s.tag.getDistance() })).filter(({ distance: s, tagConfig: n }) => {
|
|
668
|
+
const d = n.autoUnfold.distance;
|
|
669
|
+
return !(d && k(s, d) === !1);
|
|
670
|
+
}).sort((s, n) => s.distance - n.distance).findIndex((s) => s.id === this.id);
|
|
671
|
+
if (o === -1 || o <= ((e = i.autoUnfold.maxNumber) != null ? e : 1) - 1 === !1)
|
|
616
672
|
return !1;
|
|
617
673
|
}
|
|
618
674
|
return i.autoUnfold.strategy !== "FoldWhenMove";
|
|
@@ -630,14 +686,14 @@ class Ti {
|
|
|
630
686
|
if (!e || !this.plugin.domEvents)
|
|
631
687
|
return () => {
|
|
632
688
|
};
|
|
633
|
-
const r = () => !(!i.currentVisible || i.loading),
|
|
689
|
+
const r = () => !(!i.currentVisible || i.loading), o = (l) => {
|
|
634
690
|
if (!r())
|
|
635
691
|
return !1;
|
|
636
692
|
t(l.origDomEvent);
|
|
637
693
|
};
|
|
638
|
-
return this.plugin.domEvents.addEventListener(e, "click",
|
|
694
|
+
return this.plugin.domEvents.addEventListener(e, "click", o), () => {
|
|
639
695
|
var l;
|
|
640
|
-
(l = this.plugin.domEvents) == null || l.removeEventListener(e, "click",
|
|
696
|
+
(l = this.plugin.domEvents) == null || l.removeEventListener(e, "click", o);
|
|
641
697
|
};
|
|
642
698
|
}
|
|
643
699
|
whyHide() {
|
|
@@ -666,5 +722,5 @@ class Ti {
|
|
|
666
722
|
}
|
|
667
723
|
}
|
|
668
724
|
export {
|
|
669
|
-
|
|
725
|
+
Ft as BaseTag
|
|
670
726
|
};
|