@realsee/dnalogel 3.45.0 → 3.46.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/dist/Sculpt/Meshes/Line.d.ts +6 -1
- package/dist/index.cjs.js +53 -53
- package/dist/index.js +29609 -29576
- package/dist/index.umd.js +49 -49
- package/dist/shared-utils/tag.d.ts +6 -3
- package/libs/AreaMakerPlugin/Controller.js +150 -78
- package/libs/AreaMakerPlugin/index.js +76 -4
- package/libs/AreaMakerPlugin/utils/Item.js +190 -111
- package/libs/CSS3DRenderPlugin/Controller.js +89 -29
- package/libs/CSS3DRenderPlugin/index.js +75 -15
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +132 -58
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +181 -116
- package/libs/CruisePlugin/BaseController.js +121 -49
- package/libs/CruisePlugin/Move.js +73 -21
- package/libs/CruisePlugin/Work.js +98 -46
- package/libs/CruisePlugin/index.js +79 -27
- package/libs/CurrentPanoImagePlugin/Controller.js +176 -104
- package/libs/CurrentPanoImagePlugin/index.js +76 -4
- package/libs/GuideLinePlugin/Controller.js +82 -30
- package/libs/GuideLinePlugin/GuideLineItem.js +82 -30
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +3 -2
- package/libs/GuideLinePlugin/GuideLineModeItem.js +81 -29
- package/libs/GuideLinePlugin/index.js +79 -27
- package/libs/ModelMakerPlugin/Controller.js +139 -82
- package/libs/ModelMakerPlugin/index.js +75 -18
- package/libs/ModelTVVideoPlugin/Plugin.js +117 -57
- package/libs/ModelTVVideoPlugin/index.js +68 -8
- package/libs/Object3DHelperPlugin/Controller.js +54 -31
- package/libs/Object3DHelperPlugin/index.js +35 -13
- package/libs/PanoCompassPlugin/Controller.js +97 -42
- package/libs/PanoCompassPlugin/index.js +71 -16
- package/libs/PanoDoorLabelPlugin/BaseController.js +98 -26
- package/libs/PanoDoorLabelPlugin/Controller.js +187 -115
- package/libs/PanoDoorLabelPlugin/index.js +76 -4
- package/libs/PanoMeasurePlugin/Components/Controller0.js +140 -88
- package/libs/PanoMeasurePlugin/Components/Controller1.js +178 -126
- package/libs/PanoMeasurePlugin/Controller/EditController.js +124 -72
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +167 -92
- package/libs/PanoMeasurePlugin/Controller/index.js +109 -64
- package/libs/PanoMeasurePlugin/Model/area.js +114 -38
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +78 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +97 -45
- package/libs/PanoMeasurePlugin/index.js +76 -31
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +98 -20
- package/libs/PanoSpatialTagPlugin/Plugin.js +210 -150
- package/libs/PanoSpatialTagPlugin/index.js +66 -6
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +133 -53
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +295 -216
- package/libs/PanoTagPlugin/Components/Tag/index.js +257 -187
- package/libs/PanoTagPlugin/Components/TagContainer.js +157 -87
- package/libs/PanoTagPlugin/Components/TagItem.js +144 -74
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +73 -3
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +109 -39
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +105 -35
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +113 -43
- package/libs/PanoTagPlugin/controller/TagRender.js +132 -80
- package/libs/PanoTagPlugin/controller/TagUtil.js +136 -84
- package/libs/PanoTagPlugin/controller/index.js +113 -61
- package/libs/PanoTagPlugin/index.js +89 -37
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +121 -41
- package/libs/PanoVideoPlugin/Controller.js +137 -65
- package/libs/PanoVideoPlugin/VideoMeshController.js +149 -69
- package/libs/PanoVideoPlugin/index.js +82 -10
- package/libs/PipelinePlugin/Controller.js +199 -128
- package/libs/PipelinePlugin/index.js +76 -5
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +102 -22
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +95 -15
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +136 -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 +76 -56
- 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/Line/Editor.js +11 -10
- package/libs/Sculpt/utils/three/ColoredMesh.js +14 -13
- package/libs/base/BasePlugin.js +14 -13
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +128 -59
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +75 -6
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +129 -59
- package/libs/floorplan/ModelFloorplanPlugin/index.js +75 -5
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +158 -86
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +76 -4
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +151 -81
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +75 -5
- package/libs/floorplan/index.js +1 -0
- package/libs/index.js +67 -67
- 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,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { Subscribe as
|
|
3
|
-
import { CSS3DRenderPlugin as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { pluginStyle as
|
|
7
|
-
import { render as
|
|
1
|
+
import * as l from "three";
|
|
2
|
+
import { Subscribe as yo, Five as To } from "@realsee/five";
|
|
3
|
+
import { CSS3DRenderPlugin as Mo } from "../CSS3DRenderPlugin/index.js";
|
|
4
|
+
import Po from "./Components/origins.js";
|
|
5
|
+
import xo from "./Components/tag.js";
|
|
6
|
+
import { pluginStyle as Eo } from "./style.js";
|
|
7
|
+
import { render as jo } from "../shared-utils/tinyEJSrender.js";
|
|
8
8
|
import "../CSS3DRenderPlugin/Controller.js";
|
|
9
9
|
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
10
10
|
import "../shared-utils/positionToVector3.js";
|
|
@@ -20,246 +20,306 @@ import "../shared-utils/three/centerPoint.js";
|
|
|
20
20
|
import "../shared-utils/three/getObjectVisible.js";
|
|
21
21
|
import "hammerjs";
|
|
22
22
|
import "@realsee/five/line";
|
|
23
|
+
import "../Sculpt/utils/Modules/Global.js";
|
|
24
|
+
import "../Sculpt/utils/Modules/Cursor.js";
|
|
25
|
+
import "../Object3DHelperPlugin/Controller.js";
|
|
26
|
+
import "../base/BasePlugin.js";
|
|
23
27
|
import "../shared-utils/three/THREESphere.js";
|
|
24
28
|
import "animejs";
|
|
25
|
-
import "../shared-utils/
|
|
29
|
+
import "../shared-utils/Utils/FiveUtil.js";
|
|
30
|
+
import "../shared-utils/Utils/BaseUtil.js";
|
|
31
|
+
import "../shared-utils/Utils/WorkUtil.js";
|
|
32
|
+
import "../shared-utils/five/transformPosition.js";
|
|
33
|
+
import "../shared-utils/five/getFiveModel.js";
|
|
34
|
+
import "../shared-utils/url/absoluteUrl.js";
|
|
26
35
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
27
|
-
import "../
|
|
28
|
-
import "../
|
|
36
|
+
import "../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
37
|
+
import "../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
38
|
+
import "../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
39
|
+
import "../shared-utils/three/IObject3D.js";
|
|
40
|
+
import "../shared-utils/three/boundingBox.js";
|
|
41
|
+
import "../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
42
|
+
import "../shared-utils/Object3DHelper/utils/direction.js";
|
|
43
|
+
import "../shared-utils/Object3DHelper/Constants/color.js";
|
|
44
|
+
import "../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
45
|
+
import "../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
46
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
47
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
48
|
+
import "../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
49
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
50
|
+
import "../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
51
|
+
import "../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
52
|
+
import "../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
53
|
+
import "../shared-utils/threex/domevents/index.js";
|
|
54
|
+
import "../shared-utils/isNil.js";
|
|
29
55
|
import "../shared-utils/util.js";
|
|
30
|
-
import "../
|
|
56
|
+
import "../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
57
|
+
import "../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
58
|
+
import "../Sculpt/utils/three/rayOnLine.js";
|
|
59
|
+
import "../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
60
|
+
import "../shared-utils/Object3DHelper/index.js";
|
|
61
|
+
import "../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
62
|
+
import "../shared-utils/math/rad2Deg.js";
|
|
63
|
+
import "../shared-utils/math/deg2Rad.js";
|
|
64
|
+
import "../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
65
|
+
import "../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
66
|
+
import "../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
31
67
|
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
32
|
-
import "../shared-utils/
|
|
68
|
+
import "../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
69
|
+
import "../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
70
|
+
import "../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
33
71
|
import "../shared-utils/five/fiveModelLoad.js";
|
|
34
|
-
import "../shared-utils/five/
|
|
72
|
+
import "../shared-utils/five/FiveDomEvents.js";
|
|
73
|
+
import "../shared-utils/five/calculateThreeMouse.js";
|
|
74
|
+
import "../shared-utils/three/THREERaycaster.js";
|
|
75
|
+
import "../shared-utils/three/PointSelector/index.js";
|
|
76
|
+
import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
77
|
+
import "../shared-utils/three/Magnifier.js";
|
|
78
|
+
import "../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
79
|
+
import "../shared-utils/three/Assets/index.js";
|
|
80
|
+
import "../shared-utils/three/PointSelector/utils/html.js";
|
|
81
|
+
import "../shared-utils/five/initialCSS3DRender.js";
|
|
82
|
+
import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
83
|
+
import "../Sculpt/Meshes/Line.js";
|
|
84
|
+
import "../Sculpt/typings/style.js";
|
|
85
|
+
import "../shared-utils/five/FiveLine.js";
|
|
86
|
+
import "../shared-utils/tag.js";
|
|
87
|
+
import "../shared-utils/five/vector3ToScreen.js";
|
|
88
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
89
|
+
import "../shared-utils/isTouchDevice.js";
|
|
90
|
+
import "../shared-utils/five/getPosition.js";
|
|
91
|
+
import "../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
92
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
93
|
+
import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
94
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
35
95
|
import "../vendor/svelte/internal/index.js";
|
|
36
96
|
import "./store.js";
|
|
37
97
|
import "../vendor/svelte/store/index.js";
|
|
38
|
-
const D = 1e-3, v = 0.01,
|
|
98
|
+
const D = 1e-3, v = 0.01, Io = "https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png", ge = (n, r) => {
|
|
39
99
|
var k, z, q, B, G, J, K, Q;
|
|
40
100
|
let j = r == null ? void 0 : r.container, y = 1.4;
|
|
41
|
-
const
|
|
42
|
-
S.classList.add("PanoSpatialTagPlugin"), Object.assign(S.style,
|
|
43
|
-
const V = new
|
|
101
|
+
const oo = (k = r == null ? void 0 : r.wait) != null ? k : 200, to = (z = r == null ? void 0 : r.maxNumberOnScreen) != null ? z : 3, I = (q = r == null ? void 0 : r.minRad) != null ? q : Math.PI / 4, L = (B = r == null ? void 0 : r.nearTolerance) != null ? B : 100, eo = (G = r == null ? void 0 : r.upsideHeight) != null ? G : 1.6, A = (J = r == null ? void 0 : r.minDistance) != null ? J : 1.2, f = (K = r == null ? void 0 : r.maxDistance) != null ? K : 3.5, C = Mo(n), S = document.createElement("div");
|
|
102
|
+
S.classList.add("PanoSpatialTagPlugin"), Object.assign(S.style, Eo);
|
|
103
|
+
const V = new yo();
|
|
44
104
|
let Z = new Image();
|
|
45
|
-
Z.src =
|
|
46
|
-
const
|
|
105
|
+
Z.src = Io;
|
|
106
|
+
const o = {
|
|
47
107
|
points: [],
|
|
48
108
|
origins: [],
|
|
49
109
|
tags: [],
|
|
50
110
|
template: "",
|
|
51
111
|
events: {},
|
|
52
|
-
render:
|
|
112
|
+
render: jo,
|
|
53
113
|
folded: !1,
|
|
54
114
|
enabled: !0,
|
|
55
115
|
forbidden: !0
|
|
56
|
-
}, Y = new
|
|
116
|
+
}, Y = new Po({
|
|
57
117
|
target: S,
|
|
58
|
-
props: { origins:
|
|
59
|
-
}), _ = (
|
|
118
|
+
props: { origins: o.origins }
|
|
119
|
+
}), _ = (t, s) => {
|
|
60
120
|
T(), s && M();
|
|
61
121
|
}, F = () => {
|
|
62
|
-
|
|
63
|
-
}, H = (
|
|
64
|
-
if (
|
|
122
|
+
o.forbidden && (o.forbidden = !1, M());
|
|
123
|
+
}, H = (t, s) => {
|
|
124
|
+
if (o.tags.length === 0)
|
|
65
125
|
return;
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
const g = new
|
|
69
|
-
P.multiplyMatrices(
|
|
70
|
-
const $ =
|
|
126
|
+
const m = s.longitude - n.state.longitude, e = n.camera.clone();
|
|
127
|
+
e.position.copy(s.offset), e.rotateOnWorldAxis(new l.Vector3(0, 1, 0), m), e.updateProjectionMatrix(), e.updateMatrixWorld(!0);
|
|
128
|
+
const g = new l.Frustum(), P = new l.Matrix4();
|
|
129
|
+
P.multiplyMatrices(e.projectionMatrix, e.matrixWorldInverse), g.setFromProjectionMatrix(P), o.tags.forEach((i) => {
|
|
130
|
+
const $ = e.position.clone().setY(y).distanceTo(i.position);
|
|
71
131
|
if ($ < A || $ > f || !g.containsPoint(i.position))
|
|
72
132
|
return i.destroying = !0;
|
|
73
|
-
const x = i.position.clone().sub(
|
|
133
|
+
const x = i.position.clone().sub(e.position).setY(0);
|
|
74
134
|
if (x.angleTo(i.normal) > Math.PI / 2 - I && x.angleTo(i.normal) < Math.PI / 2 + I)
|
|
75
135
|
return i.destroying = !0;
|
|
76
|
-
}),
|
|
136
|
+
}), o.tags.forEach((i) => {
|
|
77
137
|
i.destroying ? i.app.$set({
|
|
78
|
-
contentZoom: 0.1 +
|
|
79
|
-
lineWidthZoom: 0.38 * (0.01 +
|
|
138
|
+
contentZoom: 0.1 + e.position.distanceTo(i.position) / f,
|
|
139
|
+
lineWidthZoom: 0.38 * (0.01 + e.position.distanceTo(i.position) / f),
|
|
80
140
|
destroying: i.destroying
|
|
81
141
|
}) : i.app.$set({
|
|
82
|
-
lineWidthZoom: 0.38 * (0.01 +
|
|
83
|
-
lineHeightZoom: 0.4 + (
|
|
84
|
-
contentZoom: 0.1 +
|
|
142
|
+
lineWidthZoom: 0.38 * (0.01 + e.position.distanceTo(i.position) / f),
|
|
143
|
+
lineHeightZoom: 0.4 + (e.position.distanceTo(i.position) - A) / f * 0.6,
|
|
144
|
+
contentZoom: 0.1 + e.position.distanceTo(i.position) / f
|
|
85
145
|
});
|
|
86
146
|
}), setTimeout(() => {
|
|
87
|
-
|
|
147
|
+
o.tags.forEach((i) => {
|
|
88
148
|
i.destroying && (i.app.$destroy(), i = null);
|
|
89
|
-
}),
|
|
149
|
+
}), o.tags = o.tags.filter((i) => !i.destroying), T();
|
|
90
150
|
}, 1900);
|
|
91
|
-
}, N = (
|
|
92
|
-
|
|
151
|
+
}, N = (t) => {
|
|
152
|
+
t !== To.Mode.Panorama && !o.forbidden && (Y.$set({ origins: [] }), o.tags.forEach((s) => {
|
|
93
153
|
s.app.$destroy(), s = null;
|
|
94
|
-
}),
|
|
154
|
+
}), o.origins = [], o.tags = [], o.forbidden = !0);
|
|
95
155
|
}, T = () => {
|
|
96
|
-
if (
|
|
156
|
+
if (o.forbidden || !o.enabled)
|
|
97
157
|
return;
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
const
|
|
158
|
+
const t = n.camera, s = t.getWorldDirection(new l.Vector3());
|
|
159
|
+
o.origins = o.tags.map((m) => {
|
|
160
|
+
const e = m.position.clone().project(t), g = m.position.clone().sub(t.position).setY(0).angleTo(s.setY(0)) < Math.PI / 2;
|
|
101
161
|
return {
|
|
102
|
-
id:
|
|
162
|
+
id: m.id,
|
|
103
163
|
front: g,
|
|
104
|
-
left: (
|
|
105
|
-
top: (-
|
|
106
|
-
destroying:
|
|
164
|
+
left: (e.x + 1) / 2 * 100,
|
|
165
|
+
top: (-e.y + 1) / 2 * 100,
|
|
166
|
+
destroying: m.destroying
|
|
107
167
|
};
|
|
108
|
-
}), Y.$set({ origins:
|
|
168
|
+
}), Y.$set({ origins: o.origins });
|
|
109
169
|
}, M = () => {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
const { clientWidth:
|
|
117
|
-
P.multiplyMatrices(
|
|
118
|
-
const $ =
|
|
119
|
-
if (
|
|
170
|
+
o.forbidden || !o.enabled || (o.timeoutId && clearTimeout(o.timeoutId), o.timeoutId = setTimeout(() => {
|
|
171
|
+
o.timeoutId = void 0;
|
|
172
|
+
const t = no();
|
|
173
|
+
t.length && (o.tags = o.tags.concat(t), T());
|
|
174
|
+
}, oo));
|
|
175
|
+
}, no = () => {
|
|
176
|
+
const { clientWidth: t, clientHeight: s } = n.getElement(), m = [], e = n.camera, g = new l.Frustum(), P = new l.Matrix4(), i = e.getWorldDirection(new l.Vector3());
|
|
177
|
+
P.multiplyMatrices(e.projectionMatrix, e.matrixWorldInverse), g.setFromProjectionMatrix(P);
|
|
178
|
+
const $ = o.tags.filter((d) => g.containsPoint(d.position) && !d.destroying).length, x = o.points.reduce((d, a) => {
|
|
179
|
+
if (o.tags.find((p) => a.id === p.id && !p.destroying))
|
|
120
180
|
return d;
|
|
121
|
-
const u =
|
|
122
|
-
if (u < A || u > f || !g.containsPoint(
|
|
181
|
+
const u = e.position.clone().setY(y).distanceTo(a.position);
|
|
182
|
+
if (u < A || u > f || !g.containsPoint(a.position))
|
|
123
183
|
return d;
|
|
124
|
-
const E =
|
|
125
|
-
if (E.angleTo(
|
|
184
|
+
const E = a.position.clone().sub(e.position).setY(0);
|
|
185
|
+
if (E.angleTo(a.normal) > Math.PI / 2 - I && E.angleTo(a.normal) < Math.PI / 2 + I)
|
|
126
186
|
return d;
|
|
127
|
-
const w =
|
|
128
|
-
if (!
|
|
129
|
-
if (
|
|
187
|
+
const w = a.position.clone().project(e);
|
|
188
|
+
if (!o.tags.every((p) => {
|
|
189
|
+
if (p.position.clone().sub(e.position).setY(0).angleTo(i.setY(0)) > Math.PI / 2)
|
|
130
190
|
return !0;
|
|
131
|
-
const b =
|
|
132
|
-
return Math.sqrt(Math.pow((w.x - b.x) / 2 *
|
|
191
|
+
const b = p.position.clone().project(e);
|
|
192
|
+
return Math.sqrt(Math.pow((w.x - b.x) / 2 * t, 2) + Math.pow((w.y - b.y) / 2 * s, 2)) > L;
|
|
133
193
|
}))
|
|
134
194
|
return d;
|
|
135
195
|
const h = {
|
|
136
|
-
id:
|
|
137
|
-
position:
|
|
138
|
-
normal:
|
|
139
|
-
replacement:
|
|
140
|
-
weight:
|
|
196
|
+
id: a.id,
|
|
197
|
+
position: a.position,
|
|
198
|
+
normal: a.normal,
|
|
199
|
+
replacement: a.replacement,
|
|
200
|
+
weight: a.weight,
|
|
141
201
|
distance: u
|
|
142
202
|
};
|
|
143
203
|
let c;
|
|
144
|
-
for (let
|
|
145
|
-
const O = d[
|
|
204
|
+
for (let p = 0, b = d.length; p < b; p++) {
|
|
205
|
+
const O = d[p];
|
|
146
206
|
if (h.weight > O.weight) {
|
|
147
|
-
c =
|
|
207
|
+
c = p;
|
|
148
208
|
break;
|
|
149
209
|
}
|
|
150
210
|
if (h.distance < O.distance) {
|
|
151
|
-
c =
|
|
211
|
+
c = p;
|
|
152
212
|
break;
|
|
153
213
|
}
|
|
154
214
|
}
|
|
155
215
|
return c !== void 0 ? d.splice(c, 0, h) : d.push(h), d;
|
|
156
216
|
}, []);
|
|
157
|
-
for (let d = 0,
|
|
217
|
+
for (let d = 0, a = x.length; d < a && !($ + m.length >= to); d++) {
|
|
158
218
|
const u = x[d];
|
|
159
|
-
if (
|
|
219
|
+
if (m.find((c) => u.id === c.id))
|
|
160
220
|
continue;
|
|
161
|
-
const E = u.position.clone().project(
|
|
162
|
-
if (!
|
|
163
|
-
if (c.position.clone().sub(
|
|
221
|
+
const E = u.position.clone().project(e);
|
|
222
|
+
if (!o.tags.concat(m).every((c) => {
|
|
223
|
+
if (c.position.clone().sub(e.position).setY(0).angleTo(i.setY(0)) > Math.PI / 2)
|
|
164
224
|
return !0;
|
|
165
|
-
const
|
|
166
|
-
return Math.sqrt(Math.pow((E.x -
|
|
225
|
+
const p = c.position.clone().project(e);
|
|
226
|
+
return Math.sqrt(Math.pow((E.x - p.x) / 2 * t, 2) + Math.pow((E.y - p.y) / 2 * s, 2)) > L;
|
|
167
227
|
}))
|
|
168
228
|
continue;
|
|
169
|
-
const w = new
|
|
170
|
-
|
|
171
|
-
u.position.clone().sub(
|
|
229
|
+
const w = new l.Raycaster(
|
|
230
|
+
e.position.clone().setY(y),
|
|
231
|
+
u.position.clone().sub(e.position.clone().setY(y)).normalize(),
|
|
172
232
|
0,
|
|
173
233
|
u.distance + v
|
|
174
|
-
), [h] =
|
|
234
|
+
), [h] = o.intersectObjects ? w.intersectObjects(o.intersectObjects, !0) : n.model.loaded ? n.model.intersectRaycaster(w) : w.intersectObjects(n.model.children, !0);
|
|
175
235
|
if (h && u.distance - h.distance < v) {
|
|
176
|
-
const { position: c, normal:
|
|
236
|
+
const { position: c, normal: p, id: b, replacement: O } = u, fo = new l.Plane().setFromNormalAndCoplanarPoint(p, c), X = c.clone().sub(e.position).cross(new l.Vector3(0, 1, 0)).setLength(D), uo = [
|
|
177
237
|
c.clone(),
|
|
178
238
|
c.clone().add(X),
|
|
179
|
-
c.clone().add(new
|
|
180
|
-
c.clone().add(new
|
|
181
|
-
].map((
|
|
182
|
-
target:
|
|
239
|
+
c.clone().add(new l.Vector3(0, D, 0)).add(X),
|
|
240
|
+
c.clone().add(new l.Vector3(0, D, 0))
|
|
241
|
+
].map((wo) => fo.projectPoint(wo, new l.Vector3())), { container: go, dispose: ho } = C.create3DDomContainer(uo) || {}, bo = new xo({
|
|
242
|
+
target: go,
|
|
183
243
|
props: {
|
|
184
244
|
id: b,
|
|
185
|
-
content:
|
|
186
|
-
lineWidthZoom: 0.38 * (0.01 +
|
|
187
|
-
lineHeightZoom: 0.4 + (
|
|
188
|
-
contentZoom: 0.1 +
|
|
189
|
-
upsideDown: c.y >
|
|
190
|
-
folded:
|
|
191
|
-
events:
|
|
245
|
+
content: o.render(o.template, O),
|
|
246
|
+
lineWidthZoom: 0.38 * (0.01 + e.position.distanceTo(c) / f),
|
|
247
|
+
lineHeightZoom: 0.4 + (e.position.distanceTo(c) - A) / f * 0.6,
|
|
248
|
+
contentZoom: 0.1 + e.position.distanceTo(c) / f,
|
|
249
|
+
upsideDown: c.y > eo,
|
|
250
|
+
folded: o.folded,
|
|
251
|
+
events: o.events,
|
|
192
252
|
hooks: V,
|
|
193
|
-
dispose:
|
|
253
|
+
dispose: ho
|
|
194
254
|
}
|
|
195
255
|
});
|
|
196
|
-
|
|
256
|
+
m.push({
|
|
197
257
|
position: c,
|
|
198
|
-
normal:
|
|
258
|
+
normal: p,
|
|
199
259
|
id: b,
|
|
200
|
-
app:
|
|
260
|
+
app: bo
|
|
201
261
|
});
|
|
202
262
|
}
|
|
203
263
|
}
|
|
204
|
-
return
|
|
205
|
-
},
|
|
206
|
-
|
|
207
|
-
var
|
|
264
|
+
return m;
|
|
265
|
+
}, io = (t) => {
|
|
266
|
+
o.points = t.points.map((s) => {
|
|
267
|
+
var m, e;
|
|
208
268
|
return {
|
|
209
269
|
id: s.id,
|
|
210
|
-
position: new
|
|
211
|
-
normal: new
|
|
212
|
-
replacement: (
|
|
213
|
-
weight: (
|
|
270
|
+
position: new l.Vector3().fromArray(s.position),
|
|
271
|
+
normal: new l.Vector3().fromArray(s.normal),
|
|
272
|
+
replacement: (m = s.replacement) != null ? m : {},
|
|
273
|
+
weight: (e = s.weight) != null ? e : -1
|
|
214
274
|
};
|
|
215
|
-
}),
|
|
216
|
-
},
|
|
217
|
-
|
|
218
|
-
},
|
|
219
|
-
|
|
220
|
-
},
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
}),
|
|
224
|
-
},
|
|
225
|
-
|
|
226
|
-
|
|
275
|
+
}), t.render && (o.render = t.render), t.template && (o.template = t.template), t.events && (o.events = t.events), t.enabled === !1 && (o.enabled = t.enabled), t.folded === !0 && (o.folded = t.folded);
|
|
276
|
+
}, ro = (t) => {
|
|
277
|
+
o.intersectObjects = t, M();
|
|
278
|
+
}, so = () => {
|
|
279
|
+
o.enabled = !0, M();
|
|
280
|
+
}, co = () => {
|
|
281
|
+
o.enabled = !1, Y.$set({ origins: [] }), o.tags.forEach((t) => {
|
|
282
|
+
t.app.$destroy(), t = null;
|
|
283
|
+
}), o.origins = [], o.tags = [];
|
|
284
|
+
}, po = () => {
|
|
285
|
+
o.folded = !1, o.tags.forEach((t) => {
|
|
286
|
+
t.app.$set({ folded: o.folded });
|
|
227
287
|
});
|
|
228
|
-
},
|
|
229
|
-
|
|
230
|
-
|
|
288
|
+
}, lo = () => {
|
|
289
|
+
o.folded = !0, o.tags.forEach((t) => {
|
|
290
|
+
t.app.$set({ folded: o.folded });
|
|
231
291
|
});
|
|
232
|
-
},
|
|
233
|
-
|
|
234
|
-
s.id ===
|
|
292
|
+
}, mo = (t) => {
|
|
293
|
+
o.tags.forEach((s) => {
|
|
294
|
+
s.id === t && s.app.$set({ folded: !1 });
|
|
235
295
|
});
|
|
236
|
-
},
|
|
237
|
-
|
|
238
|
-
s.id ===
|
|
296
|
+
}, ao = (t) => {
|
|
297
|
+
o.tags.forEach((s) => {
|
|
298
|
+
s.id === t && s.app.$set({ folded: !0 });
|
|
239
299
|
});
|
|
240
300
|
}, U = () => {
|
|
241
301
|
n.once("renderFrame", T);
|
|
242
302
|
}, R = () => {
|
|
243
|
-
j || (j = n.getElement().parentElement), j && j.appendChild(S),
|
|
303
|
+
j || (j = n.getElement().parentElement), j && j.appendChild(S), o.forbidden = !1, y = n.model.bounding.getCenter(new l.Vector3()).y, M(), n.on("panoWillArrive", H), n.on("panoArrived", F), n.on("modeChange", N), n.on("cameraUpdate", _);
|
|
244
304
|
}, W = () => {
|
|
245
|
-
Z = null, C.disposeAll(), Y.$destroy(),
|
|
246
|
-
|
|
247
|
-
}),
|
|
305
|
+
Z = null, C.disposeAll(), Y.$destroy(), o.tags.forEach((t) => {
|
|
306
|
+
t.app.$destroy(), t = null;
|
|
307
|
+
}), o.origins = [], o.tags = [], n.off("modelLoaded", R), n.off("renderFrame", T), n.off("panoWillArrive", H), n.off("panoArrived", F), n.off("modeChange", N), n.off("cameraUpdate", _), n.off("dispose", W), window.removeEventListener("resize", U, !1);
|
|
248
308
|
};
|
|
249
309
|
return window.addEventListener("resize", U, !1), (Q = n == null ? void 0 : n.model) != null && Q.loaded ? R() : n.once("modelLoaded", R), n.on("dispose", W), {
|
|
250
|
-
load:
|
|
251
|
-
setIntersectObjects:
|
|
252
|
-
unfoldAll:
|
|
253
|
-
foldAll:
|
|
254
|
-
unfold:
|
|
255
|
-
fold:
|
|
256
|
-
enable:
|
|
257
|
-
disable:
|
|
310
|
+
load: io,
|
|
311
|
+
setIntersectObjects: ro,
|
|
312
|
+
unfoldAll: po,
|
|
313
|
+
foldAll: lo,
|
|
314
|
+
unfold: mo,
|
|
315
|
+
fold: ao,
|
|
316
|
+
enable: so,
|
|
317
|
+
disable: co,
|
|
258
318
|
hooks: V,
|
|
259
319
|
dispose: W
|
|
260
320
|
};
|
|
261
321
|
};
|
|
262
322
|
export {
|
|
263
|
-
|
|
264
|
-
|
|
323
|
+
ge as PanoSpatialTagPlugin,
|
|
324
|
+
ge as default
|
|
265
325
|
};
|
|
@@ -17,18 +17,78 @@ import "../shared-utils/three/centerPoint.js";
|
|
|
17
17
|
import "../shared-utils/three/getObjectVisible.js";
|
|
18
18
|
import "hammerjs";
|
|
19
19
|
import "@realsee/five/line";
|
|
20
|
+
import "../Sculpt/utils/Modules/Global.js";
|
|
21
|
+
import "../Sculpt/utils/Modules/Cursor.js";
|
|
22
|
+
import "../Object3DHelperPlugin/Controller.js";
|
|
23
|
+
import "../base/BasePlugin.js";
|
|
20
24
|
import "../shared-utils/three/THREESphere.js";
|
|
21
25
|
import "animejs";
|
|
22
|
-
import "../shared-utils/
|
|
26
|
+
import "../shared-utils/Utils/FiveUtil.js";
|
|
27
|
+
import "../shared-utils/Utils/BaseUtil.js";
|
|
28
|
+
import "../shared-utils/Utils/WorkUtil.js";
|
|
29
|
+
import "../shared-utils/five/transformPosition.js";
|
|
30
|
+
import "../shared-utils/five/getFiveModel.js";
|
|
31
|
+
import "../shared-utils/url/absoluteUrl.js";
|
|
23
32
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
24
|
-
import "../
|
|
25
|
-
import "../
|
|
33
|
+
import "../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
34
|
+
import "../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
35
|
+
import "../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
36
|
+
import "../shared-utils/three/IObject3D.js";
|
|
37
|
+
import "../shared-utils/three/boundingBox.js";
|
|
38
|
+
import "../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
39
|
+
import "../shared-utils/Object3DHelper/utils/direction.js";
|
|
40
|
+
import "../shared-utils/Object3DHelper/Constants/color.js";
|
|
41
|
+
import "../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
42
|
+
import "../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
43
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
44
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
45
|
+
import "../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
46
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
47
|
+
import "../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
48
|
+
import "../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
49
|
+
import "../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
50
|
+
import "../shared-utils/threex/domevents/index.js";
|
|
51
|
+
import "../shared-utils/isNil.js";
|
|
26
52
|
import "../shared-utils/util.js";
|
|
27
|
-
import "../
|
|
53
|
+
import "../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
54
|
+
import "../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
55
|
+
import "../Sculpt/utils/three/rayOnLine.js";
|
|
56
|
+
import "../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
57
|
+
import "../shared-utils/Object3DHelper/index.js";
|
|
58
|
+
import "../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
59
|
+
import "../shared-utils/math/rad2Deg.js";
|
|
60
|
+
import "../shared-utils/math/deg2Rad.js";
|
|
61
|
+
import "../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
62
|
+
import "../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
63
|
+
import "../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
28
64
|
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
29
|
-
import "../shared-utils/
|
|
65
|
+
import "../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
66
|
+
import "../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
67
|
+
import "../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
30
68
|
import "../shared-utils/five/fiveModelLoad.js";
|
|
31
|
-
import "../shared-utils/five/
|
|
69
|
+
import "../shared-utils/five/FiveDomEvents.js";
|
|
70
|
+
import "../shared-utils/five/calculateThreeMouse.js";
|
|
71
|
+
import "../shared-utils/three/THREERaycaster.js";
|
|
72
|
+
import "../shared-utils/three/PointSelector/index.js";
|
|
73
|
+
import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
74
|
+
import "../shared-utils/three/Magnifier.js";
|
|
75
|
+
import "../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
76
|
+
import "../shared-utils/three/Assets/index.js";
|
|
77
|
+
import "../shared-utils/three/PointSelector/utils/html.js";
|
|
78
|
+
import "../shared-utils/five/initialCSS3DRender.js";
|
|
79
|
+
import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
80
|
+
import "../Sculpt/Meshes/Line.js";
|
|
81
|
+
import "../Sculpt/typings/style.js";
|
|
82
|
+
import "../shared-utils/five/FiveLine.js";
|
|
83
|
+
import "../shared-utils/tag.js";
|
|
84
|
+
import "../shared-utils/five/vector3ToScreen.js";
|
|
85
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
86
|
+
import "../shared-utils/isTouchDevice.js";
|
|
87
|
+
import "../shared-utils/five/getPosition.js";
|
|
88
|
+
import "../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
89
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
90
|
+
import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
91
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
32
92
|
import "./Components/origins.js";
|
|
33
93
|
import "../vendor/svelte/internal/index.js";
|
|
34
94
|
import "./store.js";
|