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