@realsee/dnalogel 3.45.0 → 3.46.1
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 +6 -0
- package/dist/Sculpt/Meshes/Line.d.ts +6 -1
- package/dist/Sculpt/utils/removeAllTag.d.ts +2 -0
- package/dist/index.cjs.js +53 -53
- package/dist/index.js +29600 -29557
- package/dist/index.umd.js +49 -49
- package/dist/shared-utils/tag.d.ts +6 -3
- package/libs/AreaMakerPlugin/Controller.js +151 -78
- package/libs/AreaMakerPlugin/index.js +77 -4
- package/libs/AreaMakerPlugin/utils/Item.js +191 -111
- package/libs/CSS3DRenderPlugin/Controller.js +90 -29
- package/libs/CSS3DRenderPlugin/index.js +76 -15
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +133 -58
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +182 -116
- package/libs/CruisePlugin/BaseController.js +122 -49
- package/libs/CruisePlugin/Move.js +74 -21
- package/libs/CruisePlugin/Work.js +99 -46
- package/libs/CruisePlugin/index.js +80 -27
- package/libs/CurrentPanoImagePlugin/Controller.js +177 -104
- package/libs/CurrentPanoImagePlugin/index.js +77 -4
- package/libs/GuideLinePlugin/Controller.js +79 -26
- package/libs/GuideLinePlugin/GuideLineItem.js +83 -30
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +3 -2
- package/libs/GuideLinePlugin/GuideLineModeItem.js +82 -29
- package/libs/GuideLinePlugin/index.js +80 -27
- package/libs/ModelMakerPlugin/Controller.js +140 -82
- package/libs/ModelMakerPlugin/index.js +76 -18
- package/libs/ModelTVVideoPlugin/Plugin.js +118 -57
- package/libs/ModelTVVideoPlugin/index.js +69 -8
- package/libs/Object3DHelperPlugin/Controller.js +67 -43
- package/libs/Object3DHelperPlugin/index.js +36 -13
- package/libs/PanoCompassPlugin/Controller.js +98 -42
- package/libs/PanoCompassPlugin/index.js +72 -16
- package/libs/PanoDoorLabelPlugin/BaseController.js +99 -26
- package/libs/PanoDoorLabelPlugin/Controller.js +188 -115
- package/libs/PanoDoorLabelPlugin/index.js +77 -4
- package/libs/PanoMeasurePlugin/Components/Controller0.js +141 -88
- package/libs/PanoMeasurePlugin/Components/Controller1.js +179 -126
- package/libs/PanoMeasurePlugin/Controller/EditController.js +125 -72
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +168 -92
- package/libs/PanoMeasurePlugin/Controller/index.js +110 -64
- package/libs/PanoMeasurePlugin/Model/area.js +115 -38
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +79 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +98 -45
- package/libs/PanoMeasurePlugin/index.js +77 -31
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +99 -20
- package/libs/PanoSpatialTagPlugin/Plugin.js +211 -150
- package/libs/PanoSpatialTagPlugin/index.js +67 -6
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +149 -68
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +296 -216
- package/libs/PanoTagPlugin/Components/Tag/index.js +258 -187
- package/libs/PanoTagPlugin/Components/TagContainer.js +158 -87
- package/libs/PanoTagPlugin/Components/TagItem.js +145 -74
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +133 -62
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +110 -39
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +106 -35
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +114 -43
- package/libs/PanoTagPlugin/controller/TagRender.js +133 -80
- package/libs/PanoTagPlugin/controller/TagUtil.js +137 -84
- package/libs/PanoTagPlugin/controller/index.js +114 -61
- package/libs/PanoTagPlugin/index.js +90 -37
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +122 -41
- package/libs/PanoVideoPlugin/Controller.js +138 -65
- package/libs/PanoVideoPlugin/VideoMeshController.js +150 -69
- package/libs/PanoVideoPlugin/index.js +83 -10
- package/libs/PipelinePlugin/Controller.js +200 -128
- package/libs/PipelinePlugin/index.js +77 -5
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +103 -22
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +96 -15
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +137 -56
- package/libs/Sculpt/Meshes/Box.js +6 -5
- package/libs/Sculpt/Meshes/Cylinder.js +7 -6
- package/libs/Sculpt/Meshes/Line.d.ts +6 -1
- package/libs/Sculpt/Meshes/Line.js +80 -57
- package/libs/Sculpt/Meshes/Point.js +6 -5
- package/libs/Sculpt/Meshes/Polyline.js +5 -4
- package/libs/Sculpt/Meshes/Rectangle.js +3 -2
- package/libs/Sculpt/Objects/Base/index.js +20 -17
- package/libs/Sculpt/Objects/Line/Editor.js +11 -10
- package/libs/Sculpt/utils/removeAllTag.d.ts +2 -0
- package/libs/Sculpt/utils/removeAllTag.js +10 -0
- package/libs/Sculpt/utils/three/ColoredMesh.js +14 -13
- package/libs/base/BasePlugin.js +14 -13
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +129 -59
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +76 -6
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +130 -59
- package/libs/floorplan/ModelFloorplanPlugin/index.js +76 -5
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +159 -86
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +77 -4
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +152 -81
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +76 -5
- package/libs/floorplan/index.js +1 -0
- package/libs/index.js +193 -192
- package/libs/shared-utils/five/index.js +3 -2
- package/libs/shared-utils/five/lookObject.js +3 -2
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/tag.d.ts +6 -3
- package/libs/shared-utils/tag.js +38 -24
- package/libs/shared-utils/three/index.js +1 -0
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
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 = (
|
|
5
|
-
for (var t in
|
|
6
|
-
O.call(
|
|
4
|
+
var T = (s, e, t) => e in s ? x(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, w = (s, e) => {
|
|
5
|
+
for (var t in e || (e = {}))
|
|
6
|
+
O.call(e, t) && T(s, t, e[t]);
|
|
7
7
|
if (v)
|
|
8
|
-
for (var t of v(
|
|
9
|
-
A.call(
|
|
10
|
-
return
|
|
8
|
+
for (var t of v(e))
|
|
9
|
+
A.call(e, t) && T(s, t, e[t]);
|
|
10
|
+
return s;
|
|
11
11
|
};
|
|
12
|
-
var c = (
|
|
13
|
-
var R = (
|
|
14
|
-
var
|
|
12
|
+
var c = (s, e, t) => (T(s, typeof e != "symbol" ? e + "" : e, t), t);
|
|
13
|
+
var R = (s, e, t) => new Promise((i, o) => {
|
|
14
|
+
var r = (n) => {
|
|
15
15
|
try {
|
|
16
16
|
d(t.next(n));
|
|
17
17
|
} catch (h) {
|
|
@@ -23,8 +23,8 @@ var R = (m, r, t) => new Promise((e, o) => {
|
|
|
23
23
|
} catch (h) {
|
|
24
24
|
o(h);
|
|
25
25
|
}
|
|
26
|
-
}, d = (n) => n.done ?
|
|
27
|
-
d((t = t.apply(
|
|
26
|
+
}, d = (n) => n.done ? i(n.value) : Promise.resolve(n.value).then(r, a);
|
|
27
|
+
d((t = t.apply(s, e)).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";
|
|
@@ -92,8 +92,86 @@ import "../Components/Tag/MarketingTag.js";
|
|
|
92
92
|
import "hammerjs";
|
|
93
93
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
94
94
|
import "@realsee/five/line";
|
|
95
|
+
import "../../Sculpt/utils/Modules/Global.js";
|
|
96
|
+
import "../../Sculpt/utils/Modules/Cursor.js";
|
|
97
|
+
import "../../Object3DHelperPlugin/Controller.js";
|
|
98
|
+
import "../../base/BasePlugin.js";
|
|
99
|
+
import "../../shared-utils/Subscribe.js";
|
|
95
100
|
import "../../shared-utils/three/THREESphere.js";
|
|
101
|
+
import "../../shared-utils/Utils/FiveUtil.js";
|
|
102
|
+
import "../../shared-utils/Utils/BaseUtil.js";
|
|
103
|
+
import "../../shared-utils/Utils/WorkUtil.js";
|
|
104
|
+
import "../../shared-utils/five/transformPosition.js";
|
|
105
|
+
import "../../shared-utils/five/getFiveModel.js";
|
|
106
|
+
import "../../shared-utils/url/absoluteUrl.js";
|
|
96
107
|
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
108
|
+
import "../../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
109
|
+
import "../../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
110
|
+
import "../../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
111
|
+
import "../../shared-utils/three/IObject3D.js";
|
|
112
|
+
import "../../shared-utils/three/boundingBox.js";
|
|
113
|
+
import "../../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
114
|
+
import "../../shared-utils/Object3DHelper/utils/direction.js";
|
|
115
|
+
import "../../shared-utils/Object3DHelper/Constants/color.js";
|
|
116
|
+
import "../../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
117
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
118
|
+
import "../../shared-utils/positionToVector3.js";
|
|
119
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
120
|
+
import "../../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
|
|
121
|
+
import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
122
|
+
import "../../CSS3DRenderPlugin/utils/even.js";
|
|
123
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
124
|
+
import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
125
|
+
import "../../shared-utils/three/getObjectVisible.js";
|
|
126
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
127
|
+
import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
128
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
129
|
+
import "../../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
130
|
+
import "../../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
131
|
+
import "../../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
132
|
+
import "../../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
133
|
+
import "../../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
134
|
+
import "../../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
135
|
+
import "../../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
136
|
+
import "../../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
137
|
+
import "../../shared-utils/threex/domevents/index.js";
|
|
138
|
+
import "../../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
139
|
+
import "../../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
140
|
+
import "../../Sculpt/utils/three/rayOnLine.js";
|
|
141
|
+
import "../../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
142
|
+
import "../../shared-utils/Object3DHelper/index.js";
|
|
143
|
+
import "../../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
144
|
+
import "../../shared-utils/math/rad2Deg.js";
|
|
145
|
+
import "../../shared-utils/math/deg2Rad.js";
|
|
146
|
+
import "../../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
147
|
+
import "../../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
148
|
+
import "../../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
149
|
+
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
150
|
+
import "../../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
151
|
+
import "../../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
152
|
+
import "../../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
153
|
+
import "../../shared-utils/five/fiveModelLoad.js";
|
|
154
|
+
import "../../shared-utils/five/FiveDomEvents.js";
|
|
155
|
+
import "../../shared-utils/five/calculateThreeMouse.js";
|
|
156
|
+
import "../../shared-utils/three/THREERaycaster.js";
|
|
157
|
+
import "../../shared-utils/three/PointSelector/index.js";
|
|
158
|
+
import "../../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
159
|
+
import "../../shared-utils/three/Magnifier.js";
|
|
160
|
+
import "../../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
161
|
+
import "../../shared-utils/three/Assets/index.js";
|
|
162
|
+
import "../../shared-utils/three/PointSelector/utils/html.js";
|
|
163
|
+
import "../../shared-utils/five/initialCSS3DRender.js";
|
|
164
|
+
import "../../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
165
|
+
import "../../Sculpt/Meshes/Line.js";
|
|
166
|
+
import "../../Sculpt/typings/style.js";
|
|
167
|
+
import "../../shared-utils/five/FiveLine.js";
|
|
168
|
+
import "../../shared-utils/tag.js";
|
|
169
|
+
import "../../shared-utils/five/vector3ToScreen.js";
|
|
170
|
+
import "../../Sculpt/utils/removeAllTag.js";
|
|
171
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
172
|
+
import "../../shared-utils/isTouchDevice.js";
|
|
173
|
+
import "../../shared-utils/five/getPosition.js";
|
|
174
|
+
import "../../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
97
175
|
import "../utils/noTypecheck.js";
|
|
98
176
|
import "../Components/Tag/AudioTag/index.js";
|
|
99
177
|
import "../Components/Tag/AudioTag/AudioTag.js";
|
|
@@ -110,7 +188,6 @@ import "../Components/Tag/PanoramaTag.js";
|
|
|
110
188
|
import "../Components/Tag/CustomTag.js";
|
|
111
189
|
import "../../vendor/classnames/index.js";
|
|
112
190
|
import "./Tag/ModelTag.js";
|
|
113
|
-
import "../../shared-utils/positionToVector3.js";
|
|
114
191
|
import "../../shared-utils/three/GLTFLoader.js";
|
|
115
192
|
import "@realsee/five/gltf-loader";
|
|
116
193
|
import "../utils/planeNormal.js";
|
|
@@ -124,7 +201,6 @@ import "../../shared-utils/three/getPositionsByObjectFit.js";
|
|
|
124
201
|
import "../../shared-utils/three/FragmentTransparencyMaterial.js";
|
|
125
202
|
import "../../shared-utils/three/getNormal.js";
|
|
126
203
|
import "./Tag/BaseTag.js";
|
|
127
|
-
import "../../shared-utils/Subscribe.js";
|
|
128
204
|
import "../utils/tag/calculateTagConfig.js";
|
|
129
205
|
import "../../vendor/object-assign-deep/objectAssignDeep.js";
|
|
130
206
|
import "../../shared-utils/typescript/entries.js";
|
|
@@ -136,12 +212,7 @@ import "../utils/tag/format.js";
|
|
|
136
212
|
import "../../shared-utils/three/blink.js";
|
|
137
213
|
import "../../shared-utils/vectorToCoordinate.js";
|
|
138
214
|
import "../../shared-utils/formatRad.js";
|
|
139
|
-
import "../../shared-utils/five/transformPosition.js";
|
|
140
215
|
import "../../shared-utils/five/lookPoint.js";
|
|
141
|
-
import "../../shared-utils/Utils/FiveUtil.js";
|
|
142
|
-
import "../../shared-utils/Utils/BaseUtil.js";
|
|
143
|
-
import "../../shared-utils/Utils/WorkUtil.js";
|
|
144
|
-
import "../../shared-utils/five/getFiveModel.js";
|
|
145
216
|
import "../utils/tagPosition.js";
|
|
146
217
|
import "../utils/checkRange.js";
|
|
147
218
|
import "../../shared-utils/url/getUrl.js";
|
|
@@ -154,25 +225,7 @@ import "../utils/normalPositionToPositions.js";
|
|
|
154
225
|
import "../../vendor/svelte/store/index.js";
|
|
155
226
|
import "../../CSS3DRenderPlugin/index.js";
|
|
156
227
|
import "../../CSS3DRenderPlugin/Controller.js";
|
|
157
|
-
|
|
158
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
159
|
-
import "../../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
|
|
160
|
-
import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
161
|
-
import "../../CSS3DRenderPlugin/utils/even.js";
|
|
162
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
163
|
-
import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
164
|
-
import "../../shared-utils/three/getObjectVisible.js";
|
|
165
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
166
|
-
import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
167
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
168
|
-
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
169
|
-
import "../../shared-utils/url/absoluteUrl.js";
|
|
170
|
-
import "../../shared-utils/five/fiveModelLoad.js";
|
|
171
|
-
import "../../shared-utils/five/FiveDomEvents.js";
|
|
172
|
-
import "../../shared-utils/five/calculateThreeMouse.js";
|
|
173
|
-
import "../../shared-utils/three/THREERaycaster.js";
|
|
174
|
-
import "../../base/BasePlugin.js";
|
|
175
|
-
class Se extends U {
|
|
228
|
+
class Pr extends U {
|
|
176
229
|
constructor(t) {
|
|
177
230
|
super(t);
|
|
178
231
|
c(this, "rendererMap", /* @__PURE__ */ new Map());
|
|
@@ -196,18 +249,18 @@ class Se extends U {
|
|
|
196
249
|
* @param config.usePoint 是否需要标签点, 默认为 false
|
|
197
250
|
* @note 优先级低于 tag.element
|
|
198
251
|
*/
|
|
199
|
-
registerRenderer(t,
|
|
200
|
-
var
|
|
201
|
-
this.rendererMap.set(t, { renderer:
|
|
252
|
+
registerRenderer(t, i, o) {
|
|
253
|
+
var r;
|
|
254
|
+
this.rendererMap.set(t, { renderer: i, usePoint: (r = o == null ? void 0 : o.usePoint) != null ? r : !1 });
|
|
202
255
|
}
|
|
203
|
-
bindRenderer(t,
|
|
204
|
-
this.contentTypeMap.set(t,
|
|
256
|
+
bindRenderer(t, i) {
|
|
257
|
+
this.contentTypeMap.set(t, i);
|
|
205
258
|
}
|
|
206
259
|
clearTags() {
|
|
207
260
|
var t;
|
|
208
|
-
this.tags.length && (this.tags.forEach((
|
|
209
|
-
var o,
|
|
210
|
-
(
|
|
261
|
+
this.tags.length && (this.tags.forEach((i) => {
|
|
262
|
+
var o, r;
|
|
263
|
+
(r = (o = i.mediaPlane) == null ? void 0 : o.parent) == null || r.remove(i.mediaPlane);
|
|
211
264
|
}), 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();
|
|
212
265
|
}
|
|
213
266
|
/**
|
|
@@ -215,12 +268,12 @@ class Se extends U {
|
|
|
215
268
|
*/
|
|
216
269
|
updateRender3DDomTag(t) {
|
|
217
270
|
(t ? N(t) : this.filterCSS3DTag).forEach((o) => {
|
|
218
|
-
var
|
|
271
|
+
var r, a, d, n, h, b;
|
|
219
272
|
if (o.tag3DContentSvelte) {
|
|
220
|
-
const { svelteApp: f, css3DInstance: l, initialNormal: u, currentNormal:
|
|
221
|
-
if ((a = l == null ? void 0 : l.css3DObject) == null || a.setVisible((this.state.visible && ((
|
|
222
|
-
const
|
|
223
|
-
l.css3DObject.setRotationFromQuaternion(
|
|
273
|
+
const { svelteApp: f, css3DInstance: l, initialNormal: u, currentNormal: p } = o.tag3DContentSvelte;
|
|
274
|
+
if ((a = l == null ? void 0 : l.css3DObject) == null || a.setVisible((this.state.visible && ((r = o.state) == null ? void 0 : r.visible)) !== !1), f.$set({ tag: o, hooks: this.hooks, state: this.state, temporaryState: this.temporaryState }), !u.equals(p)) {
|
|
275
|
+
const m = new G().setFromUnitVectors(u, p);
|
|
276
|
+
l.css3DObject.setRotationFromQuaternion(m);
|
|
224
277
|
}
|
|
225
278
|
return;
|
|
226
279
|
} else {
|
|
@@ -234,28 +287,28 @@ class Se extends U {
|
|
|
234
287
|
const l = o.computeNormal();
|
|
235
288
|
if (!l)
|
|
236
289
|
return;
|
|
237
|
-
const u = o.getConfig(),
|
|
290
|
+
const u = o.getConfig(), p = w({
|
|
238
291
|
wrapperStyle: { zIndex: `${Math.round((1e4 - ((h = o.getDistance()) != null ? h : 0)) * 100)}` }
|
|
239
292
|
}, u.tag3DConfig);
|
|
240
|
-
if (o.computeRenderType() === "BehindDom" ||
|
|
241
|
-
|
|
293
|
+
if (o.computeRenderType() === "BehindDom" || p.mode === "behind") {
|
|
294
|
+
p.mode = "behind", p.container = document.createElement("div");
|
|
242
295
|
const D = "black";
|
|
243
|
-
|
|
296
|
+
p.container.style.backgroundColor = D, p.container.style.border = `3px solid ${D}`, this.css3DRenderPlugin.hooks.on("render", () => {
|
|
244
297
|
var S;
|
|
245
|
-
if (
|
|
246
|
-
const j = this.addObjectClickHandler(o,
|
|
298
|
+
if (m.css3DObject.opacityMesh && u.clickable !== !1) {
|
|
299
|
+
const j = this.addObjectClickHandler(o, m.css3DObject.opacityMesh, (k) => {
|
|
247
300
|
this.hooks.emit("click", { event: k, target: "TagContent", tag: o });
|
|
248
301
|
});
|
|
249
302
|
(S = this.store.css3DRenderDisposer.get(o.id)) == null || S.push(j);
|
|
250
303
|
}
|
|
251
304
|
});
|
|
252
305
|
}
|
|
253
|
-
const
|
|
254
|
-
if (!
|
|
306
|
+
const m = this.css3DRenderPlugin.create3DDomContainer(f, p);
|
|
307
|
+
if (!m)
|
|
255
308
|
return;
|
|
256
|
-
this.store.css3DRenderDisposer.set(o.id, [
|
|
309
|
+
this.store.css3DRenderDisposer.set(o.id, [m.dispose]);
|
|
257
310
|
const g = new E({
|
|
258
|
-
target:
|
|
311
|
+
target: m.container,
|
|
259
312
|
props: {
|
|
260
313
|
tag: o,
|
|
261
314
|
hooks: this.hooks,
|
|
@@ -267,12 +320,12 @@ class Se extends U {
|
|
|
267
320
|
});
|
|
268
321
|
o.tag3DContentSvelte = {
|
|
269
322
|
svelteApp: g,
|
|
270
|
-
domContainer:
|
|
271
|
-
css3DInstance:
|
|
323
|
+
domContainer: m,
|
|
324
|
+
css3DInstance: m,
|
|
272
325
|
initialNormal: l,
|
|
273
326
|
currentNormal: l,
|
|
274
327
|
dispose: () => {
|
|
275
|
-
g.$destroy(),
|
|
328
|
+
g.$destroy(), m.dispose();
|
|
276
329
|
}
|
|
277
330
|
}, P(o) && ((b = o.model) != null && b.object) && this.updateTagCss3DObjectMatrix(o, o.model.object);
|
|
278
331
|
}
|
|
@@ -282,30 +335,30 @@ class Se extends U {
|
|
|
282
335
|
* @param tag 标签
|
|
283
336
|
* @param model 模型
|
|
284
337
|
*/
|
|
285
|
-
updateTagCss3DObjectMatrix(t,
|
|
286
|
-
var
|
|
287
|
-
const o = (g = (
|
|
288
|
-
if (!
|
|
338
|
+
updateTagCss3DObjectMatrix(t, i) {
|
|
339
|
+
var m, g, D;
|
|
340
|
+
const o = (g = (m = t.getConfig().tag3DConfig) == null ? void 0 : m.ratio) != null ? g : 216e-5, r = (D = t.tag3DContentSvelte) == null ? void 0 : D.css3DInstance.css3DObject;
|
|
341
|
+
if (!r)
|
|
289
342
|
return;
|
|
290
343
|
const a = P(t) ? t.data.mediaPosition : t.position;
|
|
291
344
|
if (!a || a.length !== 4 || !Array.isArray(a[0]) || !Array.isArray(a[2]))
|
|
292
345
|
return;
|
|
293
|
-
|
|
294
|
-
const d =
|
|
295
|
-
u.decompose(
|
|
296
|
-
const
|
|
297
|
-
|
|
346
|
+
i.updateWorldMatrix(!1, !1);
|
|
347
|
+
const d = i.matrixWorld, n = new C().fromArray(a[0]), h = new C().fromArray(a[2]), b = I(n, h).add(new C(0, 0, 5e-4)), f = new M().setPosition(b), l = new M().makeScale(o, o, o), u = new M().multiply(d).multiply(f).multiply(l);
|
|
348
|
+
u.decompose(r.position, r.quaternion, r.scale);
|
|
349
|
+
const p = r.opacityMesh;
|
|
350
|
+
p && u.decompose(p.position, p.quaternion, p.scale);
|
|
298
351
|
}
|
|
299
352
|
/** 添加模型标签 */
|
|
300
353
|
addMediaModelTag(t) {
|
|
301
354
|
return R(this, null, function* () {
|
|
302
|
-
const
|
|
303
|
-
yield Promise.all(
|
|
355
|
+
const i = t.filter((o) => o.stickType === "Model").map((o) => o.loadModel());
|
|
356
|
+
yield Promise.all(i), t.forEach((o) => o.updateVisible());
|
|
304
357
|
});
|
|
305
358
|
}
|
|
306
359
|
disposeAllCSS3DContainer() {
|
|
307
360
|
for (const [, t] of this.store.css3DRenderDisposer)
|
|
308
|
-
t == null || t.forEach((
|
|
361
|
+
t == null || t.forEach((i) => i == null ? void 0 : i());
|
|
309
362
|
this.store.css3DRenderDisposer = /* @__PURE__ */ new Map();
|
|
310
363
|
}
|
|
311
364
|
/**
|
|
@@ -313,15 +366,15 @@ class Se extends U {
|
|
|
313
366
|
*/
|
|
314
367
|
clearUnusedPanelTag() {
|
|
315
368
|
this.filter2DPointTag.forEach((t) => {
|
|
316
|
-
var
|
|
317
|
-
(
|
|
369
|
+
var i;
|
|
370
|
+
(i = t.tag3DContentSvelte) == null || i.css3DInstance.dispose(), t.tag3DContentSvelte = void 0;
|
|
318
371
|
});
|
|
319
|
-
for (const [t,
|
|
372
|
+
for (const [t, i] of this.store.css3DRenderDisposer) {
|
|
320
373
|
const o = this.getTagById(t);
|
|
321
|
-
(!o || o.stickType === "2DPoint") && (
|
|
374
|
+
(!o || o.stickType === "2DPoint") && (i == null || i.forEach((r) => r == null ? void 0 : r()), this.store.css3DRenderDisposer.delete(t));
|
|
322
375
|
}
|
|
323
376
|
}
|
|
324
377
|
}
|
|
325
378
|
export {
|
|
326
|
-
|
|
379
|
+
Pr as TagRender
|
|
327
380
|
};
|