@realsee/dnalogel 3.42.0 → 3.44.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 +8 -1
- package/dist/CSS3DRenderPlugin/utils/three/CSS3DObject.d.ts +4 -2
- package/dist/CSS3DRenderPlugin/utils/three/CSS3DRenderer.d.ts +2 -1
- package/dist/CSS3DRenderPlugin/utils/three/CSS3DSprite.d.ts +4 -0
- package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +6 -1
- package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Controller/index.d.ts +2 -0
- package/dist/Sculpt/Meshes/Line.d.ts +19 -1
- package/dist/Sculpt/utils/color.d.ts +1 -1
- package/dist/index.cjs.js +102 -68
- package/dist/index.js +7597 -7330
- package/dist/index.umd.js +103 -69
- package/dist/shared-utils/five/getPosition.d.ts +12 -4
- package/dist/shared-utils/five/initialCSS3DRender.d.ts +2 -0
- package/dist/shared-utils/math/deg2Rad.d.ts +1 -1
- package/dist/shared-utils/math/rad2Deg.d.ts +1 -1
- package/dist/shared-utils/positionToVector3.d.ts +6 -6
- package/{libs/shared-utils/three/PointSelector.d.ts → dist/shared-utils/three/PointSelector/index.d.ts} +23 -7
- package/dist/shared-utils/three/{PointHelper.d.ts → PointSelector/utils/PointHelper.d.ts} +11 -3
- package/dist/shared-utils/three/PointSelector/utils/PointHelper2.d.ts +30 -0
- package/dist/shared-utils/three/{PointSelectorHelper.d.ts → PointSelector/utils/PointSelectorHelper.d.ts} +9 -10
- package/dist/shared-utils/three/PointSelector/utils/typing.d.ts +8 -0
- package/dist/shared-utils/three/index.d.ts +2 -3
- package/libs/AreaMakerPlugin/Controller.js +5 -18
- package/libs/AreaMakerPlugin/index.js +4 -17
- package/libs/AreaMakerPlugin/utils/Item.js +13 -26
- package/libs/CSS3DRenderPlugin/Controller.js +9 -6
- package/libs/CSS3DRenderPlugin/index.js +12 -9
- package/libs/CSS3DRenderPlugin/utils/getAllCSS3DObject.js +6 -6
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.d.ts +4 -2
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +73 -56
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +11 -4
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRenderer.d.ts +2 -1
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRenderer.js +14 -14
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DSprite.d.ts +4 -0
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DSprite.js +13 -0
- package/libs/CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js +85 -0
- package/libs/CruisePlugin/BaseController.js +20 -33
- package/libs/CruisePlugin/Move.js +25 -23
- package/libs/CruisePlugin/Work.js +10 -8
- package/libs/CruisePlugin/index.js +23 -21
- package/libs/CurrentPanoImagePlugin/Controller.js +30 -43
- package/libs/CurrentPanoImagePlugin/index.js +5 -18
- package/libs/GuideLinePlugin/Controller.js +15 -13
- package/libs/GuideLinePlugin/GuideLineItem.js +19 -17
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +4 -5
- package/libs/GuideLinePlugin/GuideLineModeItem.js +21 -19
- package/libs/GuideLinePlugin/index.js +23 -21
- package/libs/ModelMakerPlugin/Controller.js +19 -30
- package/libs/ModelMakerPlugin/index.js +11 -22
- package/libs/ModelTVVideoPlugin/Plugin.js +13 -10
- package/libs/ModelTVVideoPlugin/index.js +12 -9
- package/libs/Object3DHelperPlugin/Controller.js +7 -5
- package/libs/Object3DHelperPlugin/index.js +23 -21
- package/libs/PanoCompassPlugin/Controller.js +18 -15
- package/libs/PanoCompassPlugin/index.js +21 -18
- package/libs/PanoDoorLabelPlugin/BaseController.js +24 -37
- package/libs/PanoDoorLabelPlugin/Controller.js +56 -69
- package/libs/PanoDoorLabelPlugin/index.js +5 -18
- package/libs/PanoMeasurePlugin/Components/Controller0.js +40 -47
- package/libs/PanoMeasurePlugin/Components/Controller1.js +72 -79
- package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +6 -1
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +53 -39
- package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Controller/EditController.js +177 -153
- package/libs/PanoMeasurePlugin/Controller/MixedController.js +1 -1
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +60 -74
- package/libs/PanoMeasurePlugin/Controller/index.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Controller/index.js +59 -60
- package/libs/PanoMeasurePlugin/Model/area.js +30 -44
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +3 -16
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +42 -49
- package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +1 -1
- package/libs/PanoMeasurePlugin/index.js +35 -40
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +23 -36
- package/libs/PanoSpatialTagPlugin/Plugin.js +41 -38
- package/libs/PanoSpatialTagPlugin/index.js +10 -7
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +80 -93
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +55 -69
- package/libs/PanoTagPlugin/Components/Tag/index.js +135 -145
- package/libs/PanoTagPlugin/Components/TagContainer.js +42 -52
- package/libs/PanoTagPlugin/Components/TagItem.js +74 -84
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +87 -88
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +29 -39
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +11 -21
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +18 -28
- package/libs/PanoTagPlugin/controller/TagRender.js +18 -16
- package/libs/PanoTagPlugin/controller/TagUtil.js +12 -9
- package/libs/PanoTagPlugin/controller/index.js +27 -25
- package/libs/PanoTagPlugin/index.js +28 -26
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +43 -57
- package/libs/PanoVideoPlugin/Controller.js +52 -65
- package/libs/PanoVideoPlugin/VideoMeshController.js +11 -25
- package/libs/PanoVideoPlugin/index.js +8 -21
- package/libs/PipelinePlugin/Controller.js +44 -57
- package/libs/PipelinePlugin/index.js +5 -18
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +20 -34
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +16 -30
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +39 -53
- package/libs/Sculpt/Meshes/Box.js +3 -3
- package/libs/Sculpt/Meshes/Cylinder.js +14 -14
- package/libs/Sculpt/Meshes/Line.d.ts +19 -1
- package/libs/Sculpt/Meshes/Line.js +40 -41
- package/libs/Sculpt/Meshes/LineWithDots.js +5 -6
- package/libs/Sculpt/Meshes/Point.js +3 -3
- package/libs/Sculpt/Meshes/Polyline.js +3 -3
- package/libs/Sculpt/Meshes/Prism.js +11 -12
- package/libs/Sculpt/Meshes/Rectangle.js +3 -3
- package/libs/Sculpt/Objects/Point/Editor.js +10 -10
- package/libs/Sculpt/Objects/Polygon/Editor.js +6 -6
- package/libs/Sculpt/Objects/Polyline/Editor.js +4 -4
- package/libs/Sculpt/index.js +3 -3
- package/libs/Sculpt/utils/Modules/Global.js +1 -1
- package/libs/Sculpt/utils/color.d.ts +1 -1
- package/libs/Sculpt/utils/three/ColoredMesh.js +3 -3
- package/libs/base/BasePlugin.js +4 -4
- package/libs/floorplan/Components/Compass.js +29 -31
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +9 -22
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +6 -19
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +5 -18
- package/libs/floorplan/ModelFloorplanPlugin/index.js +5 -18
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +48 -61
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +5 -18
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +28 -41
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +5 -18
- package/libs/floorplan/index.js +3 -3
- package/libs/index.js +140 -137
- package/libs/shared-utils/five/getPosition.d.ts +12 -4
- package/libs/shared-utils/five/getPosition.js +23 -23
- package/libs/shared-utils/five/index.js +2 -2
- package/libs/shared-utils/five/initialCSS3DRender.d.ts +2 -0
- package/libs/shared-utils/five/initialCSS3DRender.js +17 -0
- package/libs/shared-utils/five/lookObject.js +3 -3
- package/libs/shared-utils/index.js +38 -40
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/math/deg2Rad.d.ts +1 -1
- package/libs/shared-utils/math/rad2Deg.d.ts +1 -1
- package/libs/shared-utils/positionToVector3.d.ts +6 -6
- package/{dist/shared-utils/three/PointSelector.d.ts → libs/shared-utils/three/PointSelector/index.d.ts} +23 -7
- package/libs/shared-utils/three/{PointSelector.js → PointSelector/index.js} +54 -45
- package/libs/shared-utils/three/{PointHelper.d.ts → PointSelector/utils/PointHelper.d.ts} +11 -3
- package/libs/shared-utils/three/PointSelector/utils/PointHelper.js +95 -0
- package/libs/shared-utils/three/PointSelector/utils/PointHelper2.d.ts +30 -0
- package/libs/shared-utils/three/PointSelector/utils/PointHelper2.js +153 -0
- package/libs/shared-utils/three/{PointSelectorHelper.d.ts → PointSelector/utils/PointSelectorHelper.d.ts} +9 -10
- package/libs/shared-utils/three/PointSelector/utils/PointSelectorHelper.js +60 -0
- package/libs/{PanoMeasurePlugin/Modules/rangePiece → shared-utils/three/PointSelector/utils}/html.js +3 -4
- package/libs/shared-utils/three/PointSelector/utils/typing.d.ts +8 -0
- package/libs/shared-utils/three/index.d.ts +2 -3
- package/libs/shared-utils/three/index.js +3 -3
- package/package.json +3 -3
- package/dist/shared-utils/three/PointDomHelper.d.ts +0 -18
- package/libs/shared-utils/three/PointDomHelper.d.ts +0 -18
- package/libs/shared-utils/three/PointDomHelper.js +0 -62
- package/libs/shared-utils/three/PointHelper.js +0 -73
- package/libs/shared-utils/three/PointSelectorHelper.js +0 -52
- /package/dist/{PanoMeasurePlugin/Modules/rangePiece → shared-utils/three/PointSelector/utils}/html.d.ts +0 -0
- /package/libs/{PanoMeasurePlugin/Modules/rangePiece → shared-utils/three/PointSelector/utils}/html.d.ts +0 -0
|
@@ -5,22 +5,8 @@ import "../base/BasePluginWithData.js";
|
|
|
5
5
|
import "../base/BasePlugin.js";
|
|
6
6
|
import "../shared-utils/Subscribe.js";
|
|
7
7
|
import "hammerjs";
|
|
8
|
-
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
9
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
10
|
-
import "../shared-utils/positionToVector3.js";
|
|
11
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
12
8
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
13
|
-
import "
|
|
14
|
-
import "../shared-utils/util.js";
|
|
15
|
-
import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
16
|
-
import "../CSS3DRenderPlugin/utils/even.js";
|
|
17
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
18
|
-
import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
19
|
-
import "../shared-utils/three/centerPoint.js";
|
|
20
|
-
import "../shared-utils/three/getObjectVisible.js";
|
|
21
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
22
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
23
|
-
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
9
|
+
import "@realsee/five/line";
|
|
24
10
|
import "../shared-utils/three/THREESphere.js";
|
|
25
11
|
import "animejs";
|
|
26
12
|
import "../shared-utils/Utils/FiveUtil.js";
|
|
@@ -29,16 +15,33 @@ import "../shared-utils/Utils/WorkUtil.js";
|
|
|
29
15
|
import "../shared-utils/five/transformPosition.js";
|
|
30
16
|
import "../shared-utils/five/getFiveModel.js";
|
|
31
17
|
import "../shared-utils/url/absoluteUrl.js";
|
|
18
|
+
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
32
19
|
import "./getRoomInfoInstance.js";
|
|
33
20
|
import "./Assets/roomInfoIcon.js";
|
|
34
21
|
import "../shared-utils/three/loadTexture.js";
|
|
35
22
|
import "../CSS3DRenderPlugin/index.js";
|
|
36
23
|
import "../CSS3DRenderPlugin/Controller.js";
|
|
24
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
25
|
+
import "../shared-utils/positionToVector3.js";
|
|
26
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
27
|
+
import "../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
|
|
28
|
+
import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
29
|
+
import "../CSS3DRenderPlugin/utils/even.js";
|
|
30
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
31
|
+
import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
32
|
+
import "../shared-utils/three/centerPoint.js";
|
|
33
|
+
import "../shared-utils/three/getObjectVisible.js";
|
|
34
|
+
import "../shared-utils/isNil.js";
|
|
35
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
36
|
+
import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
37
|
+
import "../shared-utils/util.js";
|
|
38
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
39
|
+
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
37
40
|
import "../shared-utils/five/fiveModelLoad.js";
|
|
38
41
|
import "../shared-utils/animationFrame/BetterTween.js";
|
|
39
42
|
import "../shared-utils/animationFrame/index.js";
|
|
40
|
-
const
|
|
43
|
+
const T = (o, r) => new t(o, r);
|
|
41
44
|
export {
|
|
42
|
-
|
|
43
|
-
|
|
45
|
+
T as PanoCompassPlugin,
|
|
46
|
+
T as default
|
|
44
47
|
};
|
|
@@ -1,37 +1,23 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var p = Object.defineProperty, d = Object.defineProperties;
|
|
2
|
+
var m = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var h = Object.getOwnPropertySymbols;
|
|
4
4
|
var u = Object.prototype.hasOwnProperty, b = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
5
|
+
var o = (i, e, t) => e in i ? p(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, s = (i, e) => {
|
|
6
6
|
for (var t in e || (e = {}))
|
|
7
|
-
u.call(e, t) &&
|
|
8
|
-
if (
|
|
9
|
-
for (var t of
|
|
10
|
-
b.call(e, t) &&
|
|
7
|
+
u.call(e, t) && o(i, t, e[t]);
|
|
8
|
+
if (h)
|
|
9
|
+
for (var t of h(e))
|
|
10
|
+
b.call(e, t) && o(i, t, e[t]);
|
|
11
11
|
return i;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
12
|
+
}, r = (i, e) => d(i, m(e));
|
|
13
|
+
var a = (i, e, t) => (o(i, typeof e != "symbol" ? e + "" : e, t), t);
|
|
14
14
|
import { Five as v } from "@realsee/five";
|
|
15
15
|
import { Controller as c } from "../base/BasePlugin.js";
|
|
16
16
|
import "../shared-utils/Subscribe.js";
|
|
17
17
|
import "three";
|
|
18
18
|
import "hammerjs";
|
|
19
|
-
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
20
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
21
|
-
import "../shared-utils/positionToVector3.js";
|
|
22
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
23
19
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
24
|
-
import "
|
|
25
|
-
import "../shared-utils/util.js";
|
|
26
|
-
import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
27
|
-
import "../CSS3DRenderPlugin/utils/even.js";
|
|
28
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
29
|
-
import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
30
|
-
import "../shared-utils/three/centerPoint.js";
|
|
31
|
-
import "../shared-utils/three/getObjectVisible.js";
|
|
32
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
33
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
34
|
-
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
20
|
+
import "@realsee/five/line";
|
|
35
21
|
import "../shared-utils/three/THREESphere.js";
|
|
36
22
|
import "animejs";
|
|
37
23
|
import "../shared-utils/Utils/FiveUtil.js";
|
|
@@ -40,12 +26,13 @@ import "../shared-utils/Utils/WorkUtil.js";
|
|
|
40
26
|
import "../shared-utils/five/transformPosition.js";
|
|
41
27
|
import "../shared-utils/five/getFiveModel.js";
|
|
42
28
|
import "../shared-utils/url/absoluteUrl.js";
|
|
43
|
-
|
|
29
|
+
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
30
|
+
class z extends c {
|
|
44
31
|
constructor(t) {
|
|
45
32
|
super(t);
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
33
|
+
a(this, "state");
|
|
34
|
+
a(this, "container");
|
|
35
|
+
a(this, "enabled");
|
|
49
36
|
this.five = t, this.five.once("dispose", this.dispose), this.enabled = !0, this.state = this.initState();
|
|
50
37
|
}
|
|
51
38
|
/**
|
|
@@ -53,14 +40,14 @@ class U extends c {
|
|
|
53
40
|
* @param options
|
|
54
41
|
*/
|
|
55
42
|
enable(t) {
|
|
56
|
-
this.enabled = !0, this.updateState(s(
|
|
43
|
+
this.enabled = !0, this.updateState(r(s({}, t), { userAction: !0 }));
|
|
57
44
|
}
|
|
58
45
|
/**
|
|
59
46
|
* 禁用组件
|
|
60
47
|
* @param options
|
|
61
48
|
*/
|
|
62
49
|
disable(t) {
|
|
63
|
-
this.enabled = !1, this.updateState(s(
|
|
50
|
+
this.enabled = !1, this.updateState(r(s({}, t), { userAction: !0 }));
|
|
64
51
|
}
|
|
65
52
|
/**
|
|
66
53
|
* 显示 UI
|
|
@@ -69,7 +56,7 @@ class U extends c {
|
|
|
69
56
|
*/
|
|
70
57
|
show(t) {
|
|
71
58
|
if (this.state.enabled)
|
|
72
|
-
return this.setState(s(
|
|
59
|
+
return this.setState(r(s({}, this.state), { visible: !0 }), t), Promise.resolve();
|
|
73
60
|
}
|
|
74
61
|
/**
|
|
75
62
|
* 隐藏 UI
|
|
@@ -78,7 +65,7 @@ class U extends c {
|
|
|
78
65
|
*/
|
|
79
66
|
hide(t) {
|
|
80
67
|
if (this.state.enabled)
|
|
81
|
-
return this.setState(s(
|
|
68
|
+
return this.setState(r(s({}, this.state), { visible: !1 }), t), Promise.resolve();
|
|
82
69
|
}
|
|
83
70
|
/**
|
|
84
71
|
* 销毁对象
|
|
@@ -95,8 +82,8 @@ class U extends c {
|
|
|
95
82
|
setState(t, n) {
|
|
96
83
|
if (!this.enabled)
|
|
97
84
|
return;
|
|
98
|
-
const
|
|
99
|
-
this.state =
|
|
85
|
+
const l = s({}, this.state);
|
|
86
|
+
this.state = s(s(s({}, this.state), t), n), this.stateChangedCallback(l, n);
|
|
100
87
|
}
|
|
101
88
|
get visible() {
|
|
102
89
|
return this.five.state.mode === v.Mode.Panorama;
|
|
@@ -105,9 +92,9 @@ class U extends c {
|
|
|
105
92
|
this.enabled && (this.container = t, this.render());
|
|
106
93
|
}
|
|
107
94
|
updateState(t) {
|
|
108
|
-
this.setState(s(
|
|
95
|
+
this.setState(r(s({}, this.state), { enabled: this.enabled, visible: this.visible }), t);
|
|
109
96
|
}
|
|
110
97
|
}
|
|
111
98
|
export {
|
|
112
|
-
|
|
99
|
+
z as BasePanoPluginController
|
|
113
100
|
};
|
|
@@ -2,15 +2,15 @@ var $ = Object.defineProperty, B = Object.defineProperties;
|
|
|
2
2
|
var U = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var C = Object.getOwnPropertySymbols;
|
|
4
4
|
var G = Object.prototype.hasOwnProperty, N = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var T = (p, a,
|
|
6
|
-
for (var
|
|
7
|
-
G.call(a,
|
|
5
|
+
var T = (p, a, e) => a in p ? $(p, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : p[a] = e, H = (p, a) => {
|
|
6
|
+
for (var e in a || (a = {}))
|
|
7
|
+
G.call(a, e) && T(p, e, a[e]);
|
|
8
8
|
if (C)
|
|
9
|
-
for (var
|
|
10
|
-
N.call(a,
|
|
9
|
+
for (var e of C(a))
|
|
10
|
+
N.call(a, e) && T(p, e, a[e]);
|
|
11
11
|
return p;
|
|
12
12
|
}, W = (p, a) => B(p, U(a));
|
|
13
|
-
var r = (p, a,
|
|
13
|
+
var r = (p, a, e) => (T(p, typeof a != "symbol" ? a + "" : a, e), e);
|
|
14
14
|
import { Raycaster as Q, Vector3 as V, Quaternion as j, Euler as z } from "three";
|
|
15
15
|
import { BasePanoPluginController as q } from "./BaseController.js";
|
|
16
16
|
import X from "./DoorLabelItem.js";
|
|
@@ -19,22 +19,8 @@ import "@realsee/five";
|
|
|
19
19
|
import "../base/BasePlugin.js";
|
|
20
20
|
import "../shared-utils/Subscribe.js";
|
|
21
21
|
import "hammerjs";
|
|
22
|
-
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
23
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
24
|
-
import "../shared-utils/positionToVector3.js";
|
|
25
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
26
22
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
27
|
-
import "
|
|
28
|
-
import "../shared-utils/util.js";
|
|
29
|
-
import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
30
|
-
import "../CSS3DRenderPlugin/utils/even.js";
|
|
31
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
32
|
-
import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
33
|
-
import "../shared-utils/three/centerPoint.js";
|
|
34
|
-
import "../shared-utils/three/getObjectVisible.js";
|
|
35
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
36
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
37
|
-
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
23
|
+
import "@realsee/five/line";
|
|
38
24
|
import "../shared-utils/three/THREESphere.js";
|
|
39
25
|
import "animejs";
|
|
40
26
|
import "../shared-utils/Utils/FiveUtil.js";
|
|
@@ -43,12 +29,13 @@ import "../shared-utils/Utils/WorkUtil.js";
|
|
|
43
29
|
import "../shared-utils/five/transformPosition.js";
|
|
44
30
|
import "../shared-utils/five/getFiveModel.js";
|
|
45
31
|
import "../shared-utils/url/absoluteUrl.js";
|
|
32
|
+
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
46
33
|
import "../vendor/svelte/internal/index.js";
|
|
47
34
|
import "../vendor/classnames/index.js";
|
|
48
|
-
const
|
|
49
|
-
class
|
|
50
|
-
constructor(
|
|
51
|
-
super(
|
|
35
|
+
const ee = { userAction: !0 };
|
|
36
|
+
class we extends q {
|
|
37
|
+
constructor(e) {
|
|
38
|
+
super(e);
|
|
52
39
|
r(this, "MinVisibledistance", 1.8);
|
|
53
40
|
r(this, "MaxVisibledistance", 5);
|
|
54
41
|
r(this, "OffsetHeight", -1.3);
|
|
@@ -64,19 +51,19 @@ class Hi extends q {
|
|
|
64
51
|
/** 数据 */
|
|
65
52
|
r(this, "doorLabels");
|
|
66
53
|
r(this, "roomObservers");
|
|
67
|
-
r(this, "loadData", (
|
|
54
|
+
r(this, "loadData", (e, n) => {
|
|
68
55
|
n && (this.MaxVisibledistance = n.MaxVisibledistance, this.MinVisibledistance = n.MinVisibledistance, this.OffsetHeight = n.OffsetHeight), this.doorLabelItems && this.doorLabelItems.length > 0 && this.doorLabelItems.forEach((d) => {
|
|
69
56
|
d.$destroy();
|
|
70
|
-
}), this.labelItems = [], this.doorLabels = [], this.doorLabelItems = [], this.floorplanServerData =
|
|
57
|
+
}), this.labelItems = [], this.doorLabels = [], this.doorLabelItems = [], this.floorplanServerData = e, typeof this.five.ready == "function" ? this.five.ready().then(() => this.initData()) : this.five.once("panoArrived", () => {
|
|
71
58
|
this.initData();
|
|
72
59
|
});
|
|
73
60
|
});
|
|
74
61
|
r(this, "initRoomObservers", () => {
|
|
75
62
|
var l, h;
|
|
76
|
-
const
|
|
77
|
-
const s = o.panoIndex, f = o.floorIndex,
|
|
78
|
-
if (
|
|
79
|
-
const t =
|
|
63
|
+
const e = this.floorplanServerData.computed_data.floor_datas || [], d = (((h = (l = this.five) == null ? void 0 : l.work) == null ? void 0 : h.observers) || []).map((o) => {
|
|
64
|
+
const s = o.panoIndex, f = o.floorIndex, i = e == null ? void 0 : e.find((t) => t.floor_index === f);
|
|
65
|
+
if (i) {
|
|
66
|
+
const t = i.rooms.find((c) => c.observer_indexs.includes(s));
|
|
80
67
|
if (t)
|
|
81
68
|
return { panoIndex: s, floorIndex: f, name: t.name };
|
|
82
69
|
}
|
|
@@ -84,31 +71,31 @@ class Hi extends q {
|
|
|
84
71
|
this.roomObservers = d;
|
|
85
72
|
});
|
|
86
73
|
r(this, "hideAllLabels", () => {
|
|
87
|
-
this.labelItems.forEach((
|
|
88
|
-
|
|
74
|
+
this.labelItems.forEach((e) => {
|
|
75
|
+
e.visible = !1, e.inSight = !1;
|
|
89
76
|
}), this.render();
|
|
90
77
|
});
|
|
91
78
|
r(this, "fixDoorVisibleAndPosition", () => {
|
|
92
79
|
this.initRoomObservers();
|
|
93
|
-
const { panoIndex:
|
|
94
|
-
if (!this.visible || this.five.model.empty ||
|
|
80
|
+
const { panoIndex: e } = this.five;
|
|
81
|
+
if (!this.visible || this.five.model.empty || e === null || !this.roomObservers.find((o) => o.panoIndex === e))
|
|
95
82
|
return;
|
|
96
|
-
const n = this.roomObservers.find((o) => o.panoIndex ===
|
|
97
|
-
if (this.visibleLabelMap.has(
|
|
98
|
-
return this.visibleLabelMap.get(
|
|
83
|
+
const n = this.roomObservers.find((o) => o.panoIndex === e), l = this.five.work.observers.find((o) => o.panoIndex === e).position.clone(), h = (() => {
|
|
84
|
+
if (this.visibleLabelMap.has(e))
|
|
85
|
+
return this.visibleLabelMap.get(e);
|
|
99
86
|
{
|
|
100
87
|
const o = [];
|
|
101
88
|
return this.doorLabels.forEach((s, f) => {
|
|
102
89
|
if (s.roomName === n.name)
|
|
103
90
|
return;
|
|
104
|
-
const
|
|
91
|
+
const i = s.position.clone(), t = i.distanceTo(l);
|
|
105
92
|
if (t < this.MinVisibledistance || t > this.MaxVisibledistance)
|
|
106
93
|
return;
|
|
107
|
-
const c = new Q(), v =
|
|
94
|
+
const c = new Q(), v = i.clone().sub(l).normalize();
|
|
108
95
|
c.set(l, v);
|
|
109
96
|
const [b] = this.five.model.intersectRaycaster(c);
|
|
110
97
|
b && b.distance + 0.1 < t || o.push(f);
|
|
111
|
-
}), this.visibleLabelMap.set(
|
|
98
|
+
}), this.visibleLabelMap.set(e, o), o;
|
|
112
99
|
}
|
|
113
100
|
})();
|
|
114
101
|
this.labelItems.forEach((o, s) => {
|
|
@@ -116,9 +103,9 @@ class Hi extends q {
|
|
|
116
103
|
}), this.fixDoorPosition();
|
|
117
104
|
});
|
|
118
105
|
r(this, "fixDoorPosition", () => {
|
|
119
|
-
var
|
|
120
|
-
const { panoIndex:
|
|
121
|
-
if (
|
|
106
|
+
var i, t, c, v, b, y, g, w, L, E, _, S;
|
|
107
|
+
const { panoIndex: e, camera: n } = this.five;
|
|
108
|
+
if (e === null)
|
|
122
109
|
return;
|
|
123
110
|
if (this.five.currentMode !== "Panorama")
|
|
124
111
|
return this.hideAllLabels();
|
|
@@ -139,7 +126,7 @@ class Hi extends q {
|
|
|
139
126
|
const R = {
|
|
140
127
|
left: l * M / 100,
|
|
141
128
|
top: h * k / 100,
|
|
142
|
-
width: (c = (t = (
|
|
129
|
+
width: (c = (t = (i = I.children) == null ? void 0 : i[0]) == null ? void 0 : t.clientWidth) != null ? c : 0,
|
|
143
130
|
height: (y = (b = (v = I.children) == null ? void 0 : v[0]) == null ? void 0 : b.clientHeight) != null ? y : 0
|
|
144
131
|
}, F = {
|
|
145
132
|
left: l * O / 100,
|
|
@@ -152,21 +139,21 @@ class Hi extends q {
|
|
|
152
139
|
}
|
|
153
140
|
this.labelItems = f, this.render();
|
|
154
141
|
});
|
|
155
|
-
r(this, "onClick", (
|
|
142
|
+
r(this, "onClick", (e, n) => {
|
|
156
143
|
if (!this.roomObservers)
|
|
157
144
|
return;
|
|
158
145
|
const { work: d } = this.five;
|
|
159
146
|
let l, h, o = 1 / 0;
|
|
160
147
|
for (const s of d.observers)
|
|
161
|
-
if (this.roomObservers.find((
|
|
162
|
-
const
|
|
163
|
-
t < o && (l = s.panoIndex, h =
|
|
148
|
+
if (this.roomObservers.find((i) => i.panoIndex === s.panoIndex && i.name === e)) {
|
|
149
|
+
const i = s.standingPosition, t = n.distanceTo(i);
|
|
150
|
+
t < o && (l = s.panoIndex, h = i.clone().sub(n).normalize(), o = t);
|
|
164
151
|
}
|
|
165
152
|
if (h !== null && l !== null) {
|
|
166
153
|
const s = {};
|
|
167
154
|
if (o > 0) {
|
|
168
|
-
const
|
|
169
|
-
c.setFromUnitVectors(
|
|
155
|
+
const i = new V(0, 0, -1), t = h.clone(), c = new j();
|
|
156
|
+
c.setFromUnitVectors(i, t);
|
|
170
157
|
const v = new z();
|
|
171
158
|
v.setFromQuaternion(c, "YXZ"), s.longitude = v.y;
|
|
172
159
|
}
|
|
@@ -176,12 +163,12 @@ class Hi extends q {
|
|
|
176
163
|
r(this, "initData", () => {
|
|
177
164
|
var l;
|
|
178
165
|
this.doorLabels = [];
|
|
179
|
-
const
|
|
166
|
+
const e = this.five.panoIndex, n = this.floorplanServerData.computed_data.observers[e].floor_index, d = n !== void 0 && ((l = this.floorplanServerData.computed_data.floor_datas[n]) == null ? void 0 : l.rooms);
|
|
180
167
|
this.rooms = d, this.rooms && this.rooms.length > 0 && this.rooms.forEach((h) => {
|
|
181
168
|
var f;
|
|
182
|
-
const o = (f = this.floorplanServerData.computed_data.doors) == null ? void 0 : f.filter((
|
|
183
|
-
o && o.forEach((
|
|
184
|
-
const t =
|
|
169
|
+
const o = (f = this.floorplanServerData.computed_data.doors) == null ? void 0 : f.filter((i) => !!(i && i.name === h.name)), s = this.five.work.observers.filter((i, t) => !!h.observer_indexs.find((c) => c === t));
|
|
170
|
+
o && o.forEach((i) => {
|
|
171
|
+
const t = i.position;
|
|
185
172
|
let c = 1 / 0, v;
|
|
186
173
|
s.forEach((y) => {
|
|
187
174
|
const g = y.standingPosition, w = {
|
|
@@ -192,11 +179,11 @@ class Hi extends q {
|
|
|
192
179
|
L < c && (c = L, v = w);
|
|
193
180
|
}), v && (t.y = v.y + 0.01);
|
|
194
181
|
const b = new V(t.x, t.y, t.z);
|
|
195
|
-
b.add(new V(-0.2, 1.8, 0).applyEuler(new z(0,
|
|
182
|
+
b.add(new V(-0.2, 1.8, 0).applyEuler(new z(0, i.rad, 0))), this.doorLabels.push({
|
|
196
183
|
roomName: h.name,
|
|
197
|
-
name:
|
|
184
|
+
name: i.name,
|
|
198
185
|
position: b,
|
|
199
|
-
toward: K(
|
|
186
|
+
toward: K(i.rad)
|
|
200
187
|
});
|
|
201
188
|
});
|
|
202
189
|
}), this.labelItems = this.doorLabels.map((h) => W(H({}, h), {
|
|
@@ -209,33 +196,33 @@ class Hi extends q {
|
|
|
209
196
|
})), this.five.on("wantsToMoveToPano", this.hideAllLabels), this.five.on("modelLoaded", this.fixDoorVisibleAndPosition), this.five.on("panoArrived", this.fixDoorVisibleAndPosition), this.five.on("initAnimationEnded", this.fixDoorPosition), this.five.on("cameraUpdate", this.fixDoorPosition), this.five.on("mouseWheel", this.fixDoorPosition), this.five.on("pinchGesture", this.fixDoorPosition), this.fixDoorVisibleAndPosition();
|
|
210
197
|
});
|
|
211
198
|
}
|
|
212
|
-
stateChangedCallback(
|
|
199
|
+
stateChangedCallback(e, n) {
|
|
213
200
|
if (this.hooks.hasListener("stateChange")) {
|
|
214
201
|
const d = {
|
|
215
202
|
state: this.state,
|
|
216
|
-
prevState:
|
|
217
|
-
userAction: n ? n.userAction :
|
|
203
|
+
prevState: e,
|
|
204
|
+
userAction: n ? n.userAction : ee.userAction
|
|
218
205
|
};
|
|
219
206
|
this.hooks.emit("stateChange", d);
|
|
220
207
|
}
|
|
221
208
|
}
|
|
222
209
|
render() {
|
|
223
210
|
if (!this.enabled) {
|
|
224
|
-
this.doorLabelItems && this.doorLabelItems.length > 0 && this.doorLabelItems.forEach((
|
|
225
|
-
|
|
211
|
+
this.doorLabelItems && this.doorLabelItems.length > 0 && this.doorLabelItems.forEach((e) => {
|
|
212
|
+
e == null || e.$destroy();
|
|
226
213
|
}), this.doorLabels = void 0;
|
|
227
214
|
return;
|
|
228
215
|
}
|
|
229
|
-
this.doorLabelItems && this.doorLabelItems.forEach((
|
|
230
|
-
|
|
231
|
-
}), this.doorLabelItems = [], this.labelItems.forEach((
|
|
216
|
+
this.doorLabelItems && this.doorLabelItems.forEach((e) => {
|
|
217
|
+
e.$destroy();
|
|
218
|
+
}), this.doorLabelItems = [], this.labelItems.forEach((e) => {
|
|
232
219
|
this.doorLabelItems.push(
|
|
233
220
|
new X({
|
|
234
221
|
target: this.container,
|
|
235
222
|
props: {
|
|
236
|
-
props:
|
|
223
|
+
props: e,
|
|
237
224
|
onClick: () => {
|
|
238
|
-
this.onClick(
|
|
225
|
+
this.onClick(e.name, e.position);
|
|
239
226
|
}
|
|
240
227
|
}
|
|
241
228
|
})
|
|
@@ -250,5 +237,5 @@ class Hi extends q {
|
|
|
250
237
|
}
|
|
251
238
|
}
|
|
252
239
|
export {
|
|
253
|
-
|
|
240
|
+
we as PanoDoorLabelPluginController
|
|
254
241
|
};
|
|
@@ -5,22 +5,8 @@ import "@realsee/five";
|
|
|
5
5
|
import "../base/BasePlugin.js";
|
|
6
6
|
import "../shared-utils/Subscribe.js";
|
|
7
7
|
import "hammerjs";
|
|
8
|
-
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
9
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
10
|
-
import "../shared-utils/positionToVector3.js";
|
|
11
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
12
8
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
13
|
-
import "
|
|
14
|
-
import "../shared-utils/util.js";
|
|
15
|
-
import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
16
|
-
import "../CSS3DRenderPlugin/utils/even.js";
|
|
17
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
18
|
-
import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
19
|
-
import "../shared-utils/three/centerPoint.js";
|
|
20
|
-
import "../shared-utils/three/getObjectVisible.js";
|
|
21
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
22
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
23
|
-
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
9
|
+
import "@realsee/five/line";
|
|
24
10
|
import "../shared-utils/three/THREESphere.js";
|
|
25
11
|
import "animejs";
|
|
26
12
|
import "../shared-utils/Utils/FiveUtil.js";
|
|
@@ -29,12 +15,13 @@ import "../shared-utils/Utils/WorkUtil.js";
|
|
|
29
15
|
import "../shared-utils/five/transformPosition.js";
|
|
30
16
|
import "../shared-utils/five/getFiveModel.js";
|
|
31
17
|
import "../shared-utils/url/absoluteUrl.js";
|
|
18
|
+
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
32
19
|
import "./DoorLabelItem.js";
|
|
33
20
|
import "../vendor/svelte/internal/index.js";
|
|
34
21
|
import "../vendor/classnames/index.js";
|
|
35
22
|
import "./utils.js";
|
|
36
|
-
const
|
|
23
|
+
const j = (o) => new r(o);
|
|
37
24
|
export {
|
|
38
|
-
|
|
39
|
-
|
|
25
|
+
j as PanoDoorLabelPlugin,
|
|
26
|
+
j as default
|
|
40
27
|
};
|