@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
|
@@ -26,6 +26,7 @@ import * as H from "three";
|
|
|
26
26
|
import "hammerjs";
|
|
27
27
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
28
28
|
import "@realsee/five/line";
|
|
29
|
+
import "../utils/Modules/Global.js";
|
|
29
30
|
import "../../shared-utils/three/THREESphere.js";
|
|
30
31
|
import "animejs";
|
|
31
32
|
import { notNil as I } from "../../shared-utils/isNil.js";
|
|
@@ -97,19 +98,19 @@ class v extends F {
|
|
|
97
98
|
this.lines.forEach((i) => i.unhighlight());
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
|
-
class
|
|
101
|
+
class Z extends v {
|
|
101
102
|
constructor(...i) {
|
|
102
103
|
super(c(a({}, i[0]), { withDots: !1 }));
|
|
103
104
|
l(this, "name", "PolylineMesh");
|
|
104
105
|
}
|
|
105
106
|
}
|
|
106
|
-
class
|
|
107
|
+
class _ extends v {
|
|
107
108
|
constructor(...i) {
|
|
108
109
|
super(c(a({}, i[0]), { withDots: !0 }));
|
|
109
110
|
l(this, "name", "PolylineWithDotsMesh");
|
|
110
111
|
}
|
|
111
112
|
}
|
|
112
113
|
export {
|
|
113
|
-
|
|
114
|
-
|
|
114
|
+
Z as PolylineMesh,
|
|
115
|
+
_ as PolylineWithDotsMesh
|
|
115
116
|
};
|
|
@@ -6,6 +6,7 @@ import * as u from "three";
|
|
|
6
6
|
import "hammerjs";
|
|
7
7
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
8
8
|
import "@realsee/five/line";
|
|
9
|
+
import "../utils/Modules/Global.js";
|
|
9
10
|
import "../../shared-utils/three/THREESphere.js";
|
|
10
11
|
import "animejs";
|
|
11
12
|
import { notNil as s } from "../../shared-utils/isNil.js";
|
|
@@ -14,7 +15,7 @@ import { PolygonMesh as f } from "./Polygon.js";
|
|
|
14
15
|
import { RectangleGeometry as g } from "../utils/three/RectangleGeometry.js";
|
|
15
16
|
import { getBetterNormal as d } from "../utils/getBetterNormal.js";
|
|
16
17
|
import { Sculpt as v } from "../index.js";
|
|
17
|
-
class
|
|
18
|
+
class G extends f {
|
|
18
19
|
constructor(t) {
|
|
19
20
|
super(t);
|
|
20
21
|
i(this, "name", "RectangleMesh");
|
|
@@ -46,5 +47,5 @@ class B extends f {
|
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
export {
|
|
49
|
-
|
|
50
|
+
G as RectangleMesh
|
|
50
51
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
var g = Object.defineProperty;
|
|
2
2
|
var d = (s, e, t) => e in s ? g(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
|
-
var
|
|
3
|
+
var o = (s, e, t) => (d(s, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
4
|
import { BaseEditor as p } from "../Base/Editor.js";
|
|
5
|
-
import { Sculpt as
|
|
5
|
+
import { Sculpt as n } from "../../index.js";
|
|
6
6
|
import { PointMesh as a } from "../../Meshes/Point.js";
|
|
7
7
|
import { getIntersectByRaycaster as h } from "../../../shared-utils/five/getPosition.js";
|
|
8
8
|
import "three";
|
|
9
9
|
import "hammerjs";
|
|
10
10
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
11
11
|
import "@realsee/five/line";
|
|
12
|
+
import "../../utils/Modules/Global.js";
|
|
12
13
|
import "../../../shared-utils/three/THREESphere.js";
|
|
13
14
|
import "animejs";
|
|
14
15
|
import { notNil as l } from "../../../shared-utils/isNil.js";
|
|
@@ -16,12 +17,12 @@ import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
|
16
17
|
class m extends p {
|
|
17
18
|
constructor(t) {
|
|
18
19
|
super(t);
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
o(this, "draggingPoints", []);
|
|
21
|
+
o(this, "onDragstart", (t) => {
|
|
21
22
|
const i = t.target;
|
|
22
23
|
this.draggingPoints = this.pointMeshes.filter((r) => r.position.equals(i.position));
|
|
23
24
|
});
|
|
24
|
-
|
|
25
|
+
o(this, "onDragend", (t) => {
|
|
25
26
|
this.draggingPoints = [];
|
|
26
27
|
});
|
|
27
28
|
}
|
|
@@ -34,20 +35,20 @@ class m extends p {
|
|
|
34
35
|
enable() {
|
|
35
36
|
super.enable(), this.points.filter(l).forEach((t) => {
|
|
36
37
|
const i = new a();
|
|
37
|
-
i.visible = !1, i.position.copy(t), i.draggable = !0,
|
|
38
|
+
i.visible = !1, i.position.copy(t), i.draggable = !0, n.modules.fiveDomEvents.addEventListener(i, "drag", this.onDrag), n.modules.fiveDomEvents.addEventListener(i, "dragstart", this.onDragstart), n.modules.fiveDomEvents.addEventListener(i, "dragend", this.onDragend), this.add(i);
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
41
|
disable() {
|
|
41
42
|
super.disable(), this.removeChildren();
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
|
-
class
|
|
45
|
+
class O extends m {
|
|
45
46
|
constructor(t) {
|
|
46
47
|
super(t);
|
|
47
|
-
|
|
48
|
+
o(this, "onDrag", (t) => {
|
|
48
49
|
if (!this.draggingPoints || this.draggingPoints.length === 0)
|
|
49
50
|
return;
|
|
50
|
-
const i = h(
|
|
51
|
+
const i = h(n.modules.five, t.raycaster, { virtualPoint: !0 });
|
|
51
52
|
this.draggingPoints.forEach((r) => r.position.copy(i.point)), this.originObject.lineMesh.setPoints(this.pointMeshes.map((r) => r.position));
|
|
52
53
|
});
|
|
53
54
|
}
|
|
@@ -56,6 +57,6 @@ class B extends m {
|
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
59
|
export {
|
|
59
|
-
|
|
60
|
+
O as LineEditor,
|
|
60
61
|
m as LineEditorAbstract
|
|
61
62
|
};
|
|
@@ -9,28 +9,29 @@ var d = (i, t, e) => t in i ? g(i, t, { enumerable: !0, configurable: !0, writab
|
|
|
9
9
|
F.call(t, e) && d(i, e, t[e]);
|
|
10
10
|
return i;
|
|
11
11
|
};
|
|
12
|
-
var
|
|
12
|
+
var r = (i, t, e) => (d(i, typeof t != "symbol" ? t + "" : t, e), e);
|
|
13
13
|
import * as s from "three";
|
|
14
14
|
import { DEFAULT_COLOR as M } from "../../typings/style.js";
|
|
15
15
|
import { IObject3D as B } from "../../../shared-utils/three/IObject3D.js";
|
|
16
16
|
import "hammerjs";
|
|
17
17
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
18
18
|
import "@realsee/five/line";
|
|
19
|
+
import "../Modules/Global.js";
|
|
19
20
|
import "../../../shared-utils/three/THREESphere.js";
|
|
20
21
|
import "animejs";
|
|
21
22
|
import { notNil as m } from "../../../shared-utils/isNil.js";
|
|
22
23
|
import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
23
|
-
class
|
|
24
|
+
class _ extends B {
|
|
24
25
|
constructor(e) {
|
|
25
26
|
var h, y;
|
|
26
27
|
super();
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
r(this, "name", "ColoredMesh");
|
|
29
|
+
r(this, "meshFont");
|
|
30
|
+
r(this, "meshBackground");
|
|
31
|
+
r(this, "paramsStyle", {});
|
|
32
|
+
r(this, "_geometry", new s.BufferGeometry());
|
|
32
33
|
this.paramsStyle = e != null ? e : {};
|
|
33
|
-
const
|
|
34
|
+
const c = new s.MeshBasicMaterial({
|
|
34
35
|
color: (h = e == null ? void 0 : e.color) != null ? h : M,
|
|
35
36
|
transparent: !0,
|
|
36
37
|
side: s.DoubleSide,
|
|
@@ -42,8 +43,8 @@ class R extends B {
|
|
|
42
43
|
side: s.DoubleSide,
|
|
43
44
|
depthTest: !1,
|
|
44
45
|
depthWrite: !1,
|
|
45
|
-
opacity: 0.3 / 0.5 *
|
|
46
|
-
}), o = new s.Mesh(this.geometry,
|
|
46
|
+
opacity: 0.3 / 0.5 * c.opacity
|
|
47
|
+
}), o = new s.Mesh(this.geometry, c), n = new s.Mesh(this.geometry, l);
|
|
47
48
|
o.name = "MeshFront", n.name = "MeshBackground", o.renderOrder = 1, n.renderOrder = 0, this.meshFont = o, this.meshBackground = n, this.add(o), this.setOcclusionVisibility({ occlusionVisibility: e == null ? void 0 : e.occlusionVisibility, occlusionMode: e == null ? void 0 : e.occlusionMode });
|
|
48
49
|
}
|
|
49
50
|
get color() {
|
|
@@ -69,10 +70,10 @@ class R extends B {
|
|
|
69
70
|
}
|
|
70
71
|
setOcclusionVisibility(e) {
|
|
71
72
|
var o, n, h;
|
|
72
|
-
const
|
|
73
|
-
m(l) && (l ?
|
|
73
|
+
const c = (n = (o = e.occlusionMode) != null ? o : this.paramsStyle.occlusionMode) != null ? n : "translucence", l = (h = e.occlusionVisibility) != null ? h : this.paramsStyle.occlusionVisibility;
|
|
74
|
+
m(l) && (l ? c === "depthTest" ? (this.meshFont.material.depthTest = !1, this.remove(this.meshBackground)) : c === "translucence" && (this.meshFont.material.depthTest = !0, this.addIfNotExists(this.meshBackground)) : (this.meshFont.material.depthTest = !0, this.remove(this.meshBackground)));
|
|
74
75
|
}
|
|
75
76
|
}
|
|
76
77
|
export {
|
|
77
|
-
|
|
78
|
+
_ as ColoredMesh
|
|
78
79
|
};
|
package/libs/base/BasePlugin.js
CHANGED
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
var o = Object.defineProperty;
|
|
2
|
-
var s = (
|
|
3
|
-
var
|
|
2
|
+
var s = (e, t, r) => t in e ? o(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var i = (e, t, r) => (s(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
4
|
import { Subscribe as l } from "../shared-utils/Subscribe.js";
|
|
5
5
|
import "three";
|
|
6
6
|
import "hammerjs";
|
|
7
7
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
8
8
|
import "@realsee/five/line";
|
|
9
|
+
import "../Sculpt/utils/Modules/Global.js";
|
|
9
10
|
import "../shared-utils/three/THREESphere.js";
|
|
10
11
|
import "animejs";
|
|
11
12
|
import { FiveUtil as a } from "../shared-utils/Utils/FiveUtil.js";
|
|
12
|
-
import { absoluteUrl as
|
|
13
|
+
import { absoluteUrl as m } from "../shared-utils/url/absoluteUrl.js";
|
|
13
14
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
14
|
-
let
|
|
15
|
+
let x = class {
|
|
15
16
|
constructor(t, r) {
|
|
16
17
|
/**
|
|
17
18
|
* @realsee/dnalogel 版本号
|
|
18
19
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
i(this, "VERSION", "3.46.0");
|
|
21
|
+
i(this, "NAME");
|
|
22
|
+
i(this, "five");
|
|
23
|
+
i(this, "workUtil");
|
|
24
|
+
i(this, "fiveUtil");
|
|
24
25
|
/**
|
|
25
26
|
* @description: 插件事件钩子
|
|
26
27
|
*/
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
i(this, "hooks", new l());
|
|
29
|
+
i(this, "staticPrefix", "//vr-image-4.realsee-cdn.cn");
|
|
29
30
|
this.updateFive(t), r != null && r.staticPrefix && (this.staticPrefix = r.staticPrefix);
|
|
30
31
|
}
|
|
31
32
|
set workCode(t) {
|
|
@@ -47,11 +48,11 @@ let c = class {
|
|
|
47
48
|
* @description: 获取静态资源的url
|
|
48
49
|
*/
|
|
49
50
|
absoluteUrl(t) {
|
|
50
|
-
return
|
|
51
|
+
return m(this.staticPrefix, t);
|
|
51
52
|
}
|
|
52
53
|
onWorkCodeChange() {
|
|
53
54
|
}
|
|
54
55
|
};
|
|
55
56
|
export {
|
|
56
|
-
|
|
57
|
+
x as Controller
|
|
57
58
|
};
|
|
@@ -2,30 +2,30 @@ var F = Object.defineProperty, P = Object.defineProperties;
|
|
|
2
2
|
var E = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var w = Object.getOwnPropertySymbols;
|
|
4
4
|
var x = Object.prototype.hasOwnProperty, I = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var v = (d,
|
|
6
|
-
for (var t in
|
|
7
|
-
x.call(
|
|
5
|
+
var v = (d, n, t) => n in d ? F(d, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[n] = t, l = (d, n) => {
|
|
6
|
+
for (var t in n || (n = {}))
|
|
7
|
+
x.call(n, t) && v(d, t, n[t]);
|
|
8
8
|
if (w)
|
|
9
|
-
for (var t of w(
|
|
10
|
-
I.call(
|
|
9
|
+
for (var t of w(n))
|
|
10
|
+
I.call(n, t) && v(d, t, n[t]);
|
|
11
11
|
return d;
|
|
12
|
-
},
|
|
13
|
-
var o = (d,
|
|
14
|
-
var
|
|
15
|
-
var
|
|
12
|
+
}, u = (d, n) => P(d, E(n));
|
|
13
|
+
var o = (d, n, t) => (v(d, typeof n != "symbol" ? n + "" : n, t), t);
|
|
14
|
+
var f = (d, n, t) => new Promise((e, i) => {
|
|
15
|
+
var r = (a) => {
|
|
16
16
|
try {
|
|
17
17
|
s(t.next(a));
|
|
18
|
-
} catch (
|
|
19
|
-
i(
|
|
18
|
+
} catch (m) {
|
|
19
|
+
i(m);
|
|
20
20
|
}
|
|
21
21
|
}, h = (a) => {
|
|
22
22
|
try {
|
|
23
23
|
s(t.throw(a));
|
|
24
|
-
} catch (
|
|
25
|
-
i(
|
|
24
|
+
} catch (m) {
|
|
25
|
+
i(m);
|
|
26
26
|
}
|
|
27
|
-
}, s = (a) => a.done ? e(a.value) : Promise.resolve(a.value).then(
|
|
28
|
-
s((t = t.apply(d,
|
|
27
|
+
}, s = (a) => a.done ? e(a.value) : Promise.resolve(a.value).then(r, h);
|
|
28
|
+
s((t = t.apply(d, n)).next());
|
|
29
29
|
});
|
|
30
30
|
import * as b from "three";
|
|
31
31
|
import { to as M } from "../../shared-utils/to.js";
|
|
@@ -39,10 +39,11 @@ import { Controller as O } from "../../base/BasePluginWithData.js";
|
|
|
39
39
|
import { getPxmm as T, getAttachedY as k } from "../../shared-utils/getPxmm.js";
|
|
40
40
|
import { correctFiveState as R } from "../utils/correctFiveState.js";
|
|
41
41
|
import { changeModelCanvasOpacity as A } from "../../shared-utils/changeModelCanvasOpacity.js";
|
|
42
|
-
import { FloorplanErrorType as
|
|
42
|
+
import { FloorplanErrorType as c, SHOW_ANIME_DURATION as H } from "../utils/constant.js";
|
|
43
43
|
import "hammerjs";
|
|
44
44
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
45
45
|
import "@realsee/five/line";
|
|
46
|
+
import "../../Sculpt/utils/Modules/Global.js";
|
|
46
47
|
import "../../shared-utils/three/THREESphere.js";
|
|
47
48
|
import "animejs";
|
|
48
49
|
import { isNil as U } from "../../shared-utils/isNil.js";
|
|
@@ -87,17 +88,85 @@ import "../../shared-utils/five/getFiveModel.js";
|
|
|
87
88
|
import "../../shared-utils/url/absoluteUrl.js";
|
|
88
89
|
import "../../shared-utils/nearlyEqual.js";
|
|
89
90
|
import "../../shared-utils/five/changeMode.js";
|
|
91
|
+
import "../../Sculpt/utils/Modules/Cursor.js";
|
|
92
|
+
import "../../Object3DHelperPlugin/Controller.js";
|
|
93
|
+
import "../../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
94
|
+
import "../../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
95
|
+
import "../../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
96
|
+
import "../../shared-utils/three/IObject3D.js";
|
|
97
|
+
import "../../shared-utils/three/boundingBox.js";
|
|
98
|
+
import "../../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
99
|
+
import "../../shared-utils/Object3DHelper/utils/direction.js";
|
|
100
|
+
import "../../shared-utils/Object3DHelper/Constants/color.js";
|
|
101
|
+
import "../../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
102
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
103
|
+
import "../../shared-utils/positionToVector3.js";
|
|
104
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
105
|
+
import "../../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
|
|
106
|
+
import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
107
|
+
import "../../CSS3DRenderPlugin/utils/even.js";
|
|
108
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
109
|
+
import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
110
|
+
import "../../shared-utils/three/centerPoint.js";
|
|
111
|
+
import "../../shared-utils/three/getObjectVisible.js";
|
|
112
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
113
|
+
import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
114
|
+
import "../../shared-utils/util.js";
|
|
115
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
116
|
+
import "../../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
117
|
+
import "../../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
118
|
+
import "../../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
119
|
+
import "../../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
120
|
+
import "../../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
121
|
+
import "../../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
122
|
+
import "../../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
123
|
+
import "../../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
124
|
+
import "../../shared-utils/threex/domevents/index.js";
|
|
125
|
+
import "../../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
126
|
+
import "../../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
127
|
+
import "../../Sculpt/utils/three/rayOnLine.js";
|
|
128
|
+
import "../../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
129
|
+
import "../../shared-utils/Object3DHelper/index.js";
|
|
130
|
+
import "../../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
131
|
+
import "../../shared-utils/math/deg2Rad.js";
|
|
132
|
+
import "../../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
133
|
+
import "../../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
134
|
+
import "../../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
135
|
+
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
136
|
+
import "../../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
137
|
+
import "../../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
138
|
+
import "../../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
139
|
+
import "../../shared-utils/five/FiveDomEvents.js";
|
|
140
|
+
import "../../shared-utils/five/calculateThreeMouse.js";
|
|
141
|
+
import "../../shared-utils/three/THREERaycaster.js";
|
|
142
|
+
import "../../shared-utils/three/PointSelector/index.js";
|
|
143
|
+
import "../../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
144
|
+
import "../../shared-utils/three/Magnifier.js";
|
|
145
|
+
import "../../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
146
|
+
import "../../shared-utils/three/Assets/index.js";
|
|
147
|
+
import "../../shared-utils/three/PointSelector/utils/html.js";
|
|
148
|
+
import "../../shared-utils/five/initialCSS3DRender.js";
|
|
149
|
+
import "../../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
150
|
+
import "../../Sculpt/Meshes/Line.js";
|
|
151
|
+
import "../../Sculpt/typings/style.js";
|
|
152
|
+
import "../../shared-utils/five/FiveLine.js";
|
|
153
|
+
import "../../shared-utils/tag.js";
|
|
154
|
+
import "../../shared-utils/five/vector3ToScreen.js";
|
|
155
|
+
import "../../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
156
|
+
import "../../shared-utils/isTouchDevice.js";
|
|
157
|
+
import "../../shared-utils/five/getPosition.js";
|
|
158
|
+
import "../../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
90
159
|
function W(d) {
|
|
91
|
-
const { latitude:
|
|
160
|
+
const { latitude: n, longitude: t } = d, e = Math.abs(n - Math.PI / 2) > 5 * Math.PI / 180, i = t > 5 * (Math.PI / 180) && t < 355 * (Math.PI / 180);
|
|
92
161
|
return e || i;
|
|
93
162
|
}
|
|
94
163
|
function G(d) {
|
|
95
|
-
const { latitude:
|
|
164
|
+
const { latitude: n, longitude: t } = d, e = Math.abs(n - Math.PI / 2) < 10 * Math.PI / 180, i = t < 30 * (Math.PI / 180) || t > 330 * (Math.PI / 180);
|
|
96
165
|
return e && i;
|
|
97
166
|
}
|
|
98
|
-
class
|
|
167
|
+
class di extends O {
|
|
99
168
|
constructor(t, e) {
|
|
100
|
-
var a,
|
|
169
|
+
var a, m;
|
|
101
170
|
super(t);
|
|
102
171
|
// =============== public properties =================
|
|
103
172
|
o(this, "name", "modelFloorplanPlugin");
|
|
@@ -146,22 +215,22 @@ class Jt extends O {
|
|
|
146
215
|
* @param opts.isAutoShow 是否是自动展示
|
|
147
216
|
* @param opts.userAction 是否是用户行为
|
|
148
217
|
*/
|
|
149
|
-
o(this, "show", (...e) =>
|
|
218
|
+
o(this, "show", (...e) => f(this, [...e], function* (t = {}) {
|
|
150
219
|
if (!this.state.enabled || !this.showPromise && this.state.visible)
|
|
151
220
|
return;
|
|
152
221
|
const i = t.userAction !== void 0 ? t.userAction : !0;
|
|
153
222
|
this.updateState({ visible: !0 }, i), this._show(t);
|
|
154
223
|
}));
|
|
155
224
|
/** 隐藏户型图 */
|
|
156
|
-
o(this, "hide", (...e) =>
|
|
225
|
+
o(this, "hide", (...e) => f(this, [...e], function* (t = {}) {
|
|
157
226
|
this.state.enabled && (this.isHiddenByHideFunc = !0, this.state.visible !== !1 && (this.updateState({ visible: !1 }, t.userAction || !0), this._hide(t)));
|
|
158
227
|
}));
|
|
159
228
|
/** 更新户型图大小 */
|
|
160
229
|
o(this, "updateSize", () => {
|
|
161
230
|
if (!this.data || !this.container || !this.wrapper)
|
|
162
231
|
return !1;
|
|
163
|
-
const { min: t, max: e } = this.data.bounding, i = e.x - t.x,
|
|
164
|
-
return this.size.width === a && this.size.height ===
|
|
232
|
+
const { min: t, max: e } = this.data.bounding, i = e.x - t.x, r = e.y - t.y, h = this.state.config.attachedTo ? { attachedTo: this.state.config.attachedTo } : void 0, s = T(this.five, this.wrapper, this.floorIndex, h), a = Math.ceil(i * s), m = Math.ceil(r * s);
|
|
233
|
+
return this.size.width === a && this.size.height === m || (this.container.style.width = a + "px", this.container.style.height = m + "px", this.size = { width: a, height: m }), !0;
|
|
165
234
|
});
|
|
166
235
|
o(this, "highlight", (t) => {
|
|
167
236
|
this.state.config.highlightEnable && (this.highlightData = t, this.render());
|
|
@@ -170,22 +239,22 @@ class Jt extends O {
|
|
|
170
239
|
this.highlightData = {}, this.render();
|
|
171
240
|
});
|
|
172
241
|
o(this, "_disable", (t) => {
|
|
173
|
-
var i,
|
|
242
|
+
var i, r, h;
|
|
174
243
|
const { userAction: e } = t;
|
|
175
|
-
this.hooks.emit("disable", { userAction: e }), (i = this.showRejection) == null || i.call(this,
|
|
244
|
+
this.hooks.emit("disable", { userAction: e }), (i = this.showRejection) == null || i.call(this, c.BreakOffByDisable), this.showPromise = void 0, (r = this.app) == null || r.$destroy(), this.app = void 0, (h = this.container) == null || h.remove(), this.removeEventListener();
|
|
176
245
|
});
|
|
177
246
|
o(this, "_enable", (t) => {
|
|
178
247
|
const { userAction: e } = t;
|
|
179
248
|
this.addEventListener(), this.wrapper && (this.wrapper.append(this.container), this.hooks.emit("enable", { userAction: e }), this.state.visible && this._show({ userAction: e }));
|
|
180
249
|
});
|
|
181
|
-
o(this, "_show", (t) =>
|
|
250
|
+
o(this, "_show", (t) => f(this, null, function* () {
|
|
182
251
|
var h;
|
|
183
252
|
if (!this.state.enabled)
|
|
184
253
|
return;
|
|
185
254
|
if (!((h = this.fiveUtil.model) != null && h.loaded))
|
|
186
|
-
throw new Error(
|
|
255
|
+
throw new Error(c.ModelNotLoaded);
|
|
187
256
|
if (!this.data)
|
|
188
|
-
throw new Error(
|
|
257
|
+
throw new Error(c.DataNotLoaded);
|
|
189
258
|
if (this.showPromise)
|
|
190
259
|
return this.showPromise;
|
|
191
260
|
const e = {
|
|
@@ -194,22 +263,22 @@ class Jt extends O {
|
|
|
194
263
|
immediately: !1,
|
|
195
264
|
isAutoShow: !1,
|
|
196
265
|
userAction: !0
|
|
197
|
-
}, i = l(l({}, e), t),
|
|
266
|
+
}, i = l(l({}, e), t), r = () => f(this, null, function* () {
|
|
198
267
|
this.hooks.emit("show", { userAction: i.userAction, auto: i.isAutoShow });
|
|
199
268
|
let s = !1, a;
|
|
200
269
|
this.showRejection = (g) => {
|
|
201
270
|
s = !0, a = g;
|
|
202
271
|
};
|
|
203
|
-
const [
|
|
204
|
-
if (
|
|
205
|
-
throw
|
|
272
|
+
const [m] = yield M(R(this.five, this.showState, i.userAction));
|
|
273
|
+
if (m)
|
|
274
|
+
throw m;
|
|
206
275
|
if (s)
|
|
207
|
-
throw a ? new Error(a) : new Error(
|
|
276
|
+
throw a ? new Error(a) : new Error(c.UnknownError);
|
|
208
277
|
if (!this.updateSize())
|
|
209
|
-
throw new Error(
|
|
278
|
+
throw new Error(c.UpdateSizeError);
|
|
210
279
|
this.updatePosition(), this.floorIndex = i.floorIndex, this.fiveUtil.model.show(this.floorIndex);
|
|
211
280
|
});
|
|
212
|
-
return this.isHiddenByHideFunc = !1, this.showPromise =
|
|
281
|
+
return this.isHiddenByHideFunc = !1, this.showPromise = r().then(() => {
|
|
213
282
|
this.showPromise = void 0, this.showRejection = void 0;
|
|
214
283
|
const s = i.modelOpacity, a = i.immediately ? 0 : H;
|
|
215
284
|
A(this.five, s, a), this.render(a), this.hooks.emit("showAnimationEnded", {
|
|
@@ -222,8 +291,8 @@ class Jt extends O {
|
|
|
222
291
|
}), this.showPromise;
|
|
223
292
|
}));
|
|
224
293
|
o(this, "_hide", (t) => {
|
|
225
|
-
var
|
|
226
|
-
(
|
|
294
|
+
var r;
|
|
295
|
+
(r = this.showRejection) == null || r.call(this, c.BreakOffByHide), this.showPromise = void 0;
|
|
227
296
|
const i = l(l({}, {
|
|
228
297
|
userAction: !0,
|
|
229
298
|
isAutoHide: !1
|
|
@@ -300,7 +369,7 @@ class Jt extends O {
|
|
|
300
369
|
imageURL: this.staticPrefix + "/release/web/saas/missing-floorplan.e274c596.png",
|
|
301
370
|
imageWidth: 200,
|
|
302
371
|
imageHeight: 120,
|
|
303
|
-
text: (
|
|
372
|
+
text: (m = (a = e.i18n) == null ? void 0 : a.call(e, "暂无平面图")) != null ? m : "暂无平面图",
|
|
304
373
|
textFontSize: 14
|
|
305
374
|
};
|
|
306
375
|
const i = {
|
|
@@ -321,22 +390,22 @@ class Jt extends O {
|
|
|
321
390
|
getLabelElement: void 0,
|
|
322
391
|
adaptiveRoomLabelVisibleEnable: !0,
|
|
323
392
|
missingFloorConfig: l(l({}, this.defaultMissingFloorConfig), e.missingFloorConfig),
|
|
324
|
-
i18n: (
|
|
325
|
-
getRoomAreaText: (
|
|
326
|
-
getRoomDimensionText: (
|
|
327
|
-
getRuleDistanceText: (
|
|
328
|
-
},
|
|
393
|
+
i18n: (p) => p,
|
|
394
|
+
getRoomAreaText: (p) => (p / 1e6).toFixed(1) + "㎡",
|
|
395
|
+
getRoomDimensionText: (p, g) => (p / 1e3).toFixed(1) + "m × " + (g / 1e3).toFixed(1) + "m",
|
|
396
|
+
getRuleDistanceText: (p) => p.toString()
|
|
397
|
+
}, r = e ? C(e, ["selector", "scale"]) : {}, h = l(l({}, i.missingFloorConfig), r.missingFloorConfig), s = u(l(l({}, i), r), { missingFloorConfig: h });
|
|
329
398
|
this.state = { enabled: !0, visible: !1, config: s }, this.initContainer(), z(t).then(this.onFiveModelLoaded), t.once("dispose", this.dispose), this.addEventListener();
|
|
330
399
|
}
|
|
331
400
|
load(t, e, i = !0) {
|
|
332
|
-
return
|
|
333
|
-
function
|
|
334
|
-
return Object.prototype.hasOwnProperty.apply(
|
|
401
|
+
return f(this, null, function* () {
|
|
402
|
+
function r(p) {
|
|
403
|
+
return Object.prototype.hasOwnProperty.apply(p, ["version"]);
|
|
335
404
|
}
|
|
336
405
|
const h = t;
|
|
337
406
|
h && U(h.version) && console.warn("传入 serverData.data 的方式后续可能不再支持,请把 serverData 整体传入 load 函数");
|
|
338
|
-
const s = JSON.parse(JSON.stringify(t)), a =
|
|
339
|
-
this.data = yield S(a), this.hooks.emit("dataLoaded", this.data), this.hooks.emit("dataChange", this.data,
|
|
407
|
+
const s = JSON.parse(JSON.stringify(t)), a = r(s) ? s.data : s, m = this.data;
|
|
408
|
+
this.data = yield S(a), this.hooks.emit("dataLoaded", this.data), this.hooks.emit("dataChange", this.data, m), e && this.updateState(e, i), this.render();
|
|
340
409
|
});
|
|
341
410
|
}
|
|
342
411
|
/** 把插件的渲染DOM插入到对应的容器中去 */
|
|
@@ -360,9 +429,9 @@ class Jt extends O {
|
|
|
360
429
|
}
|
|
361
430
|
/** 更改插件 State */
|
|
362
431
|
setState(t, e = {}) {
|
|
363
|
-
const i = this.state,
|
|
364
|
-
if (this.updateState(t,
|
|
365
|
-
const h = { userAction:
|
|
432
|
+
const i = this.state, r = e.userAction !== void 0 ? e.userAction : !0;
|
|
433
|
+
if (this.updateState(t, r), t.enabled !== void 0 && i.enabled !== t.enabled && (t.enabled ? this._enable({ userAction: r }) : this._disable({ userAction: r })), t.visible !== void 0 && i.visible !== t.visible) {
|
|
434
|
+
const h = { userAction: r };
|
|
366
435
|
t.visible ? this._show(h) : this._hide(h);
|
|
367
436
|
}
|
|
368
437
|
}
|
|
@@ -375,18 +444,18 @@ class Jt extends O {
|
|
|
375
444
|
const t = k(this.five, this.floorIndex, this.state.config.attachedTo), e = (s = this.fiveUtil.model) == null ? void 0 : s.bounding.getCenter(new b.Vector3()).setY(t);
|
|
376
445
|
if (!e)
|
|
377
446
|
return;
|
|
378
|
-
const i = e.clone().project(this.five.camera),
|
|
379
|
-
this.container.style.left =
|
|
447
|
+
const i = e.clone().project(this.five.camera), r = (i.x + 1) / 2, h = -(i.y - 1) / 2;
|
|
448
|
+
this.container.style.left = r * 100 + "%", this.container.style.top = h * 100 + "%";
|
|
380
449
|
}
|
|
381
450
|
formatData(t) {
|
|
382
|
-
return
|
|
451
|
+
return f(this, null, function* () {
|
|
383
452
|
return yield S(t.data);
|
|
384
453
|
});
|
|
385
454
|
}
|
|
386
455
|
updateState(t, e) {
|
|
387
456
|
var s;
|
|
388
|
-
const i = this.state,
|
|
389
|
-
this.state =
|
|
457
|
+
const i = this.state, r = (s = t.config) != null && s.missingFloorConfig ? l(l({}, i.config.missingFloorConfig), t.config.missingFloorConfig) : i.config.missingFloorConfig, h = t.config ? u(l(l({}, i.config), t.config), { missingFloorConfig: r }) : i.config;
|
|
458
|
+
this.state = u(l(l({}, this.state), t), { config: h }), !y(this.state, i, { deep: !0 }) && this.hooks.emit("stateChange", { state: this.state, prevState: i, userAction: e });
|
|
390
459
|
}
|
|
391
460
|
/** 如果用户是通过 selector 设置父容器,需要在 modelLoaded 之后把 container 自动放到父容器里
|
|
392
461
|
*
|
|
@@ -415,7 +484,7 @@ class Jt extends O {
|
|
|
415
484
|
render(t) {
|
|
416
485
|
if (!this.state.enabled || !this.container || !this.data || this.size.width === 0 || this.showPromise)
|
|
417
486
|
return;
|
|
418
|
-
const e =
|
|
487
|
+
const e = u(l({}, this.state.config), {
|
|
419
488
|
visible: this.state.visible,
|
|
420
489
|
duration: t != null ? t : 0,
|
|
421
490
|
panoIndex: this.panoIndex,
|
|
@@ -430,5 +499,5 @@ class Jt extends O {
|
|
|
430
499
|
}
|
|
431
500
|
}
|
|
432
501
|
export {
|
|
433
|
-
|
|
502
|
+
di as Controller
|
|
434
503
|
};
|