@realsee/dnalogel 3.50.13 → 3.50.15-alpha.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/README.md +116 -0
- package/dist/Sculpt/Objects/Base/index.d.ts +1 -1
- package/dist/Sculpt/index.d.ts +2 -2
- package/dist/index.cjs.js +264 -264
- package/dist/index.js +4111 -4089
- package/dist/index.umd.js +266 -266
- package/dist/shared-utils/equal.d.ts +1 -1
- package/dist/shared-utils/index.d.ts +2 -1
- package/dist/shared-utils/tag.d.ts +19 -8
- package/dist/shared-utils/three/index.d.ts +1 -0
- package/libs/AreaMakerPlugin/Controller.js +107 -77
- package/libs/AreaMakerPlugin/index.js +39 -9
- package/libs/AreaMakerPlugin/utils/Item.js +68 -38
- package/libs/CSS3DRenderPlugin/Controller.js +38 -18
- package/libs/CSS3DRenderPlugin/index.js +41 -21
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +63 -38
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +103 -83
- package/libs/CruisePlugin/BaseController.js +72 -42
- package/libs/CruisePlugin/Move.js +35 -16
- package/libs/CruisePlugin/Work.js +67 -48
- package/libs/CruisePlugin/index.js +45 -26
- package/libs/CurrentPanoImagePlugin/Controller.js +71 -41
- package/libs/CurrentPanoImagePlugin/index.js +40 -10
- package/libs/GuideLinePlugin/Controller.js +76 -57
- package/libs/GuideLinePlugin/GuideLineItem.js +40 -21
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +4 -3
- package/libs/GuideLinePlugin/GuideLineModeItem.js +34 -15
- package/libs/GuideLinePlugin/index.js +45 -26
- package/libs/ModelMakerPlugin/Controller.js +53 -35
- package/libs/ModelMakerPlugin/index.js +40 -22
- package/libs/ModelTVVideoPlugin/Plugin.js +52 -32
- package/libs/ModelTVVideoPlugin/index.js +28 -8
- package/libs/Object3DHelperPlugin/Controller.js +55 -36
- package/libs/Object3DHelperPlugin/index.js +43 -24
- package/libs/PanoCompassPlugin/Controller.js +39 -19
- package/libs/PanoCompassPlugin/index.js +40 -20
- package/libs/PanoDoorLabelPlugin/BaseController.js +62 -32
- package/libs/PanoDoorLabelPlugin/Controller.js +105 -75
- package/libs/PanoDoorLabelPlugin/index.js +40 -10
- package/libs/PanoMeasurePlugin/Components/Controller0.js +9 -9
- package/libs/PanoMeasurePlugin/Components/Controller1.js +9 -9
- package/libs/PanoMeasurePlugin/Controller/EditController.js +5 -5
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +79 -53
- package/libs/PanoMeasurePlugin/Controller/index.js +18 -18
- package/libs/PanoMeasurePlugin/Model/area.js +46 -20
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +36 -7
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +9 -9
- package/libs/PanoMeasurePlugin/index.js +4 -4
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +46 -18
- package/libs/PanoRulerProPlugin/Controller.js +88 -39
- package/libs/PanoRulerProPlugin/RulerItems.js +151 -102
- package/libs/PanoRulerProPlugin/index.js +53 -4
- package/libs/PanoSpatialTagPlugin/Plugin.js +58 -38
- package/libs/PanoSpatialTagPlugin/index.js +26 -6
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +82 -52
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +238 -209
- package/libs/PanoTagPlugin/Components/Tag/index.js +155 -128
- package/libs/PanoTagPlugin/Components/TagContainer.js +103 -76
- package/libs/PanoTagPlugin/Components/TagItem.js +34 -7
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +32 -5
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +62 -35
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +60 -33
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +61 -34
- package/libs/PanoTagPlugin/controller/TagRender.js +53 -34
- package/libs/PanoTagPlugin/controller/TagUtil.js +37 -18
- package/libs/PanoTagPlugin/controller/index.js +48 -29
- package/libs/PanoTagPlugin/index.js +46 -27
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +62 -32
- package/libs/PanoVideoPlugin/Controller.js +98 -68
- package/libs/PanoVideoPlugin/VideoMeshController.js +58 -28
- package/libs/PanoVideoPlugin/index.js +43 -13
- package/libs/PipelinePlugin/Controller.js +95 -66
- package/libs/PipelinePlugin/index.js +40 -11
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +46 -16
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +45 -15
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +63 -33
- package/libs/Sculpt/Meshes/Box.js +4 -3
- package/libs/Sculpt/Meshes/Cylinder.js +4 -3
- package/libs/Sculpt/Meshes/Line.js +13 -12
- package/libs/Sculpt/Meshes/LineWithDots.js +9 -7
- package/libs/Sculpt/Meshes/Point.js +4 -3
- package/libs/Sculpt/Meshes/Polygon.js +3 -2
- package/libs/Sculpt/Meshes/Prism.js +12 -10
- package/libs/Sculpt/Meshes/Rectangle.js +4 -3
- package/libs/Sculpt/Objects/Base/index.d.ts +1 -1
- package/libs/Sculpt/Objects/Line/Editor.js +8 -7
- package/libs/Sculpt/index.d.ts +2 -2
- package/libs/Sculpt/index.js +4 -3
- package/libs/Sculpt/utils/three/ColoredMesh.js +7 -6
- package/libs/base/BasePlugin.js +5 -4
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +91 -62
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +40 -11
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +82 -53
- package/libs/floorplan/ModelFloorplanPlugin/index.js +40 -11
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +75 -45
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +41 -11
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +107 -78
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +40 -11
- package/libs/floorplan/index.js +2 -1
- package/libs/index.js +34 -34
- package/libs/shared-utils/equal.d.ts +1 -1
- package/libs/shared-utils/five/index.js +4 -3
- package/libs/shared-utils/five/lookObject.js +4 -3
- package/libs/shared-utils/index.d.ts +2 -1
- package/libs/shared-utils/index.js +60 -55
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/tag.d.ts +19 -8
- package/libs/shared-utils/tag.js +68 -49
- package/libs/shared-utils/three/PointSelector/utils/PointSelectorHelper.js +3 -2
- package/libs/shared-utils/three/index.d.ts +1 -0
- package/libs/shared-utils/three/index.js +2 -1
- package/package.json +1 -1
|
@@ -2,31 +2,30 @@ var u = Object.defineProperty, D = Object.defineProperties;
|
|
|
2
2
|
var f = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var h = Object.getOwnPropertySymbols;
|
|
4
4
|
var A = Object.prototype.hasOwnProperty, T = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
5
|
+
var e = (i, o, t) => o in i ? u(i, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[o] = t, n = (i, o) => {
|
|
6
6
|
for (var t in o || (o = {}))
|
|
7
|
-
A.call(o, t) &&
|
|
7
|
+
A.call(o, t) && e(i, t, o[t]);
|
|
8
8
|
if (h)
|
|
9
9
|
for (var t of h(o))
|
|
10
|
-
T.call(o, t) &&
|
|
10
|
+
T.call(o, t) && e(i, t, o[t]);
|
|
11
11
|
return i;
|
|
12
12
|
}, s = (i, o) => D(i, f(o));
|
|
13
|
-
var l = (i, o, t) => (
|
|
13
|
+
var l = (i, o, t) => (e(i, typeof o != "symbol" ? o + "" : o, t), t);
|
|
14
14
|
import { ItemDom as y } from "./base.js";
|
|
15
15
|
import { getGeometryInfo as I } from "../../../shared-utils/three/geometryUtil.js";
|
|
16
|
+
import "../../../shared-utils/tag.js";
|
|
16
17
|
import "three";
|
|
17
18
|
import "hammerjs";
|
|
19
|
+
import "../../../shared-utils/three/PointSelector/index.js";
|
|
18
20
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
19
21
|
import "@realsee/five/line";
|
|
20
22
|
import "../../../vendor/three/examples/jsm/lines/LineGeometry.js";
|
|
21
|
-
import "../../../shared-utils/tag.js";
|
|
22
23
|
import "../../../shared-utils/three/core/Sphere.js";
|
|
23
24
|
import "animejs";
|
|
24
25
|
import { isNil as P } from "../../../shared-utils/isNil.js";
|
|
25
26
|
import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
26
27
|
import "../isNDCPointInScreen.js";
|
|
27
28
|
import "../../../shared-utils/three/centerPoint.js";
|
|
28
|
-
import "../../../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
|
|
29
|
-
import "../../../vendor/three/build/three.module.js";
|
|
30
29
|
import "../../../shared-utils/positionToVector3.js";
|
|
31
30
|
import "../../../shared-utils/five/vector3ToScreen.js";
|
|
32
31
|
import "../../../shared-utils/five/getFiveModel.js";
|
|
@@ -37,11 +36,40 @@ import "../../../shared-utils/Utils/WorkUtil.js";
|
|
|
37
36
|
import "../../../shared-utils/five/transformPosition.js";
|
|
38
37
|
import "../../../shared-utils/three/temp.js";
|
|
39
38
|
import "../../../shared-utils/dom/resizeObserver.js";
|
|
40
|
-
|
|
39
|
+
import "../../../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
40
|
+
import "../../../shared-utils/three/Magnifier.js";
|
|
41
|
+
import "../../../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
42
|
+
import "../../../shared-utils/three/Assets/index.js";
|
|
43
|
+
import "../../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
44
|
+
import "../../../CSS3DRenderPlugin/utils/even.js";
|
|
45
|
+
import "../../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
46
|
+
import "../../../shared-utils/three/getObjectVisible.js";
|
|
47
|
+
import "../../../shared-utils/three/PointSelector/utils/html.js";
|
|
48
|
+
import "../../../shared-utils/five/initialCSS3DRender.js";
|
|
49
|
+
import "../../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
50
|
+
import "../../../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
|
|
51
|
+
import "../../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
52
|
+
import "../../../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
53
|
+
import "../../../Sculpt/Meshes/Line.js";
|
|
54
|
+
import "../../../Sculpt/typings/style.js";
|
|
55
|
+
import "../../../shared-utils/five/FiveLine.js";
|
|
56
|
+
import "../../../shared-utils/three/IObject3D.js";
|
|
57
|
+
import "../../../Sculpt/utils/removeAllTag.js";
|
|
58
|
+
import "../../../Sculpt/utils/Meshes/getLengthHTML.js";
|
|
59
|
+
import "../../../shared-utils/three/applyObjectMatrixWorld.js";
|
|
60
|
+
import "../../../shared-utils/util.js";
|
|
61
|
+
import "../../../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
62
|
+
import "../../../shared-utils/isTouchDevice.js";
|
|
63
|
+
import "../../../shared-utils/five/getPosition.js";
|
|
64
|
+
import "../../../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
65
|
+
import "../../../shared-utils/three/PointSelector/utils/contents.js";
|
|
66
|
+
import "../../../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
|
|
67
|
+
import "../../../vendor/three/build/three.module.js";
|
|
68
|
+
class Ft extends y {
|
|
41
69
|
constructor(t) {
|
|
42
|
-
t.containerStyle = s(
|
|
70
|
+
t.containerStyle = s(n({}, t.containerStyle), {
|
|
43
71
|
zIndex: "1"
|
|
44
|
-
}), t.contentStyle = s(
|
|
72
|
+
}), t.contentStyle = s(n({}, t.contentStyle), {
|
|
45
73
|
background: "#6386FF",
|
|
46
74
|
borderRadius: "2px"
|
|
47
75
|
});
|
|
@@ -52,21 +80,21 @@ class Y extends y {
|
|
|
52
80
|
/**
|
|
53
81
|
* @description: dom 依赖的多边形的顶点的位置更新时,更新 dom 的位置和面积
|
|
54
82
|
*/
|
|
55
|
-
updateArea(t,
|
|
83
|
+
updateArea(t, r) {
|
|
56
84
|
var c, d;
|
|
57
|
-
const
|
|
58
|
-
if (!
|
|
85
|
+
const p = r != null ? r : this.area.polygon.geometry, m = I(p);
|
|
86
|
+
if (!m) {
|
|
59
87
|
this.ndcPosition = null, this.updateDomPosition(t);
|
|
60
88
|
return;
|
|
61
89
|
}
|
|
62
|
-
const { area: a, center: x } =
|
|
90
|
+
const { area: a, center: x } = m;
|
|
63
91
|
this.ndcPosition = x, this.updateDomPosition(t), (d = (c = this.area.model) == null ? void 0 : c.config) != null && d.getAreaText ? this.contentDom.innerText = this.area.model.config.getAreaText(a) : this.updateAreaText(a, { fix: 2 });
|
|
64
92
|
}
|
|
65
|
-
updateAreaText(t,
|
|
66
|
-
const { unit:
|
|
67
|
-
this.contentDom.innerText = `${P(
|
|
93
|
+
updateAreaText(t, r) {
|
|
94
|
+
const { unit: p = "m²", fix: m } = r != null ? r : {};
|
|
95
|
+
this.contentDom.innerText = `${P(m) ? t : t.toFixed(m)}${p}`;
|
|
68
96
|
}
|
|
69
97
|
}
|
|
70
98
|
export {
|
|
71
|
-
|
|
99
|
+
Ft as AreaItem
|
|
72
100
|
};
|
|
@@ -1,49 +1,98 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var f = Object.defineProperty;
|
|
2
|
+
var c = Object.getOwnPropertySymbols;
|
|
3
3
|
var v = Object.prototype.hasOwnProperty, b = Object.prototype.propertyIsEnumerable;
|
|
4
|
-
var
|
|
5
|
-
for (var
|
|
6
|
-
v.call(t,
|
|
7
|
-
if (
|
|
8
|
-
for (var
|
|
9
|
-
b.call(t,
|
|
10
|
-
return
|
|
4
|
+
var h = (e, t, i) => t in e ? f(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i, u = (e, t) => {
|
|
5
|
+
for (var i in t || (t = {}))
|
|
6
|
+
v.call(t, i) && h(e, i, t[i]);
|
|
7
|
+
if (c)
|
|
8
|
+
for (var i of c(t))
|
|
9
|
+
b.call(t, i) && h(e, i, t[i]);
|
|
10
|
+
return e;
|
|
11
11
|
};
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
12
|
+
var o = (e, t, i) => (h(e, typeof t != "symbol" ? t + "" : t, i), i);
|
|
13
|
+
var m = (e, t, i) => new Promise((p, s) => {
|
|
14
|
+
var a = (r) => {
|
|
15
15
|
try {
|
|
16
|
-
|
|
17
|
-
} catch (
|
|
18
|
-
|
|
16
|
+
l(i.next(r));
|
|
17
|
+
} catch (d) {
|
|
18
|
+
s(d);
|
|
19
19
|
}
|
|
20
|
-
},
|
|
20
|
+
}, n = (r) => {
|
|
21
21
|
try {
|
|
22
|
-
|
|
23
|
-
} catch (
|
|
24
|
-
|
|
22
|
+
l(i.throw(r));
|
|
23
|
+
} catch (d) {
|
|
24
|
+
s(d);
|
|
25
25
|
}
|
|
26
|
-
},
|
|
27
|
-
|
|
26
|
+
}, l = (r) => r.done ? p(r.value) : Promise.resolve(r.value).then(a, n);
|
|
27
|
+
l((i = i.apply(e, t)).next());
|
|
28
28
|
});
|
|
29
29
|
import I from "./RulerItems.js";
|
|
30
30
|
import "../vendor/svelte/internal/index.js";
|
|
31
31
|
import "@realsee/five";
|
|
32
32
|
import "../shared-utils/animationFrame/index.js";
|
|
33
33
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
34
|
+
import "../shared-utils/tag.js";
|
|
35
|
+
import "../shared-utils/positionToVector3.js";
|
|
36
|
+
import "three";
|
|
37
|
+
import "../shared-utils/five/vector3ToScreen.js";
|
|
38
|
+
import "../shared-utils/five/getFiveModel.js";
|
|
39
|
+
import "../shared-utils/Utils/FiveUtil.js";
|
|
40
|
+
import "../shared-utils/Utils/BaseUtil.js";
|
|
41
|
+
import "../shared-utils/Subscribe.js";
|
|
42
|
+
import "../shared-utils/Utils/WorkUtil.js";
|
|
43
|
+
import "../shared-utils/five/transformPosition.js";
|
|
44
|
+
import "../shared-utils/three/temp.js";
|
|
45
|
+
import "../shared-utils/dom/resizeObserver.js";
|
|
46
|
+
import "hammerjs";
|
|
47
|
+
import "../shared-utils/three/PointSelector/index.js";
|
|
48
|
+
import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
49
|
+
import "../shared-utils/three/Magnifier.js";
|
|
50
|
+
import "../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
51
|
+
import "../shared-utils/three/Assets/index.js";
|
|
52
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
53
|
+
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
54
|
+
import "../CSS3DRenderPlugin/utils/even.js";
|
|
55
|
+
import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
56
|
+
import "../shared-utils/three/centerPoint.js";
|
|
57
|
+
import "../shared-utils/three/getObjectVisible.js";
|
|
58
|
+
import "@realsee/five/line";
|
|
59
|
+
import "../vendor/three/examples/jsm/lines/LineGeometry.js";
|
|
60
|
+
import "../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
|
|
61
|
+
import "../vendor/three/build/three.module.js";
|
|
62
|
+
import "../shared-utils/three/core/Sphere.js";
|
|
63
|
+
import "animejs";
|
|
64
|
+
import "../shared-utils/isNil.js";
|
|
65
|
+
import "../shared-utils/three/PointSelector/utils/html.js";
|
|
66
|
+
import "../shared-utils/five/initialCSS3DRender.js";
|
|
67
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
68
|
+
import "../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
|
|
69
|
+
import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
70
|
+
import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
71
|
+
import "../Sculpt/Meshes/Line.js";
|
|
72
|
+
import "../Sculpt/typings/style.js";
|
|
73
|
+
import "../shared-utils/five/FiveLine.js";
|
|
74
|
+
import "../shared-utils/three/IObject3D.js";
|
|
75
|
+
import "../Sculpt/utils/removeAllTag.js";
|
|
76
|
+
import "../Sculpt/utils/Meshes/getLengthHTML.js";
|
|
77
|
+
import "../shared-utils/three/applyObjectMatrixWorld.js";
|
|
78
|
+
import "../shared-utils/util.js";
|
|
79
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
80
|
+
import "../shared-utils/isTouchDevice.js";
|
|
81
|
+
import "../shared-utils/five/getPosition.js";
|
|
82
|
+
import "../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
83
|
+
import "../shared-utils/three/PointSelector/utils/contents.js";
|
|
34
84
|
import "../shared-utils/equal.js";
|
|
35
85
|
import "../shared-utils/isTruelyObject.js";
|
|
36
86
|
import "../shared-utils/math/planimetry.js";
|
|
37
87
|
import "../shared-utils/throttle.js";
|
|
38
|
-
import "three";
|
|
39
88
|
import "./RulerItem.js";
|
|
40
|
-
class
|
|
41
|
-
constructor(t,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
89
|
+
class xt {
|
|
90
|
+
constructor(t, i) {
|
|
91
|
+
o(this, "five");
|
|
92
|
+
o(this, "container", document.createElement("div"));
|
|
93
|
+
o(this, "panoRulerProData");
|
|
94
|
+
o(this, "rulerItems");
|
|
95
|
+
o(this, "state", {
|
|
47
96
|
enabled: !1,
|
|
48
97
|
loaded: !1,
|
|
49
98
|
options: {
|
|
@@ -51,23 +100,23 @@ class A {
|
|
|
51
100
|
distanceText: (t) => `${t.toFixed(1)}m`
|
|
52
101
|
}
|
|
53
102
|
});
|
|
54
|
-
var
|
|
103
|
+
var p, s;
|
|
55
104
|
this.five = t, this.container.classList.add("panoRulerProPlugin-container"), this.container.setAttribute(
|
|
56
105
|
"style",
|
|
57
106
|
"position: absolute;pointer-events: none;width: 100%;height: 100%;left: 0;top: 0;overflow: hidden;"
|
|
58
|
-
),
|
|
59
|
-
var
|
|
60
|
-
(
|
|
107
|
+
), i && (i.data && this.load(i.data), this.state.options = u(u({}, this.state.options), i.options || {}), (p = i.options) != null && p.className && this.container.classList.add((s = i.options) == null ? void 0 : s.className)), this.five.once("modelLoaded", () => m(this, null, function* () {
|
|
108
|
+
var a, n;
|
|
109
|
+
(n = (a = this.five.getElement()) == null ? void 0 : a.parentNode) == null || n.append(this.container);
|
|
61
110
|
})), this.five.once("dispose", () => this.dispose());
|
|
62
111
|
}
|
|
63
112
|
load(t) {
|
|
64
|
-
return
|
|
113
|
+
return m(this, null, function* () {
|
|
65
114
|
if (!this.five.work)
|
|
66
115
|
return;
|
|
67
|
-
const
|
|
68
|
-
if (!
|
|
116
|
+
const i = t.data;
|
|
117
|
+
if (!i)
|
|
69
118
|
throw new Error("标尺数据依赖不齐全!");
|
|
70
|
-
this.panoRulerProData =
|
|
119
|
+
this.panoRulerProData = i, this.state.loaded = !0;
|
|
71
120
|
});
|
|
72
121
|
}
|
|
73
122
|
enable() {
|
|
@@ -77,7 +126,7 @@ class A {
|
|
|
77
126
|
return this.state.enabled && (this.state.enabled = !1, this.render()), !0;
|
|
78
127
|
}
|
|
79
128
|
render() {
|
|
80
|
-
return
|
|
129
|
+
return m(this, null, function* () {
|
|
81
130
|
var t;
|
|
82
131
|
if (this.state.enabled) {
|
|
83
132
|
if (!this.panoRulerProData || !this.container)
|
|
@@ -100,5 +149,5 @@ class A {
|
|
|
100
149
|
}
|
|
101
150
|
}
|
|
102
151
|
export {
|
|
103
|
-
|
|
152
|
+
xt as default
|
|
104
153
|
};
|
|
@@ -1,30 +1,79 @@
|
|
|
1
|
-
import { SvelteComponent as Q, init as X, safe_not_equal as Z, element as $, insert as tt, transition_in as C, check_outros as et, transition_out as k, detach as
|
|
2
|
-
import { Five as
|
|
3
|
-
import { nextFrame as
|
|
4
|
-
import
|
|
5
|
-
import { intersectionOfLine as ut } from "../shared-utils/math/planimetry.js";
|
|
6
|
-
import { throttle as ht } from "../shared-utils/throttle.js";
|
|
1
|
+
import { SvelteComponent as Q, init as X, safe_not_equal as Z, element as $, insert as tt, transition_in as C, check_outros as et, transition_out as k, detach as ot, destroy_each as nt, onMount as rt, onDestroy as it, create_component as st, mount_component as at, destroy_component as ct, group_outros as mt } from "../vendor/svelte/internal/index.js";
|
|
2
|
+
import { Five as lt } from "@realsee/five";
|
|
3
|
+
import { nextFrame as pt } from "../shared-utils/animationFrame/index.js";
|
|
4
|
+
import "../shared-utils/tag.js";
|
|
7
5
|
import { Vector3 as M } from "three";
|
|
8
|
-
import
|
|
6
|
+
import "hammerjs";
|
|
7
|
+
import "../shared-utils/three/PointSelector/index.js";
|
|
8
|
+
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
9
|
+
import "@realsee/five/line";
|
|
10
|
+
import "../vendor/three/examples/jsm/lines/LineGeometry.js";
|
|
11
|
+
import "../shared-utils/three/core/Sphere.js";
|
|
12
|
+
import "animejs";
|
|
13
|
+
import { equal as z } from "../shared-utils/equal.js";
|
|
14
|
+
import { intersectionOfLine as ft } from "../shared-utils/math/planimetry.js";
|
|
15
|
+
import { throttle as ut } from "../shared-utils/throttle.js";
|
|
16
|
+
import ht from "./RulerItem.js";
|
|
9
17
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
18
|
+
import "../shared-utils/positionToVector3.js";
|
|
19
|
+
import "../shared-utils/five/vector3ToScreen.js";
|
|
20
|
+
import "../shared-utils/five/getFiveModel.js";
|
|
21
|
+
import "../shared-utils/Utils/FiveUtil.js";
|
|
22
|
+
import "../shared-utils/Utils/BaseUtil.js";
|
|
23
|
+
import "../shared-utils/Subscribe.js";
|
|
24
|
+
import "../shared-utils/Utils/WorkUtil.js";
|
|
25
|
+
import "../shared-utils/five/transformPosition.js";
|
|
26
|
+
import "../shared-utils/three/temp.js";
|
|
27
|
+
import "../shared-utils/dom/resizeObserver.js";
|
|
28
|
+
import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
29
|
+
import "../shared-utils/three/Magnifier.js";
|
|
30
|
+
import "../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
31
|
+
import "../shared-utils/three/Assets/index.js";
|
|
32
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
33
|
+
import "../CSS3DRenderPlugin/utils/even.js";
|
|
34
|
+
import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
35
|
+
import "../shared-utils/three/centerPoint.js";
|
|
36
|
+
import "../shared-utils/three/getObjectVisible.js";
|
|
37
|
+
import "../shared-utils/isNil.js";
|
|
38
|
+
import "../shared-utils/three/PointSelector/utils/html.js";
|
|
39
|
+
import "../shared-utils/five/initialCSS3DRender.js";
|
|
40
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
41
|
+
import "../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
|
|
42
|
+
import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
43
|
+
import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
44
|
+
import "../Sculpt/Meshes/Line.js";
|
|
45
|
+
import "../Sculpt/typings/style.js";
|
|
46
|
+
import "../shared-utils/five/FiveLine.js";
|
|
47
|
+
import "../shared-utils/three/IObject3D.js";
|
|
48
|
+
import "../Sculpt/utils/removeAllTag.js";
|
|
49
|
+
import "../Sculpt/utils/Meshes/getLengthHTML.js";
|
|
50
|
+
import "../shared-utils/three/applyObjectMatrixWorld.js";
|
|
51
|
+
import "../shared-utils/util.js";
|
|
52
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
53
|
+
import "../shared-utils/isTouchDevice.js";
|
|
54
|
+
import "../shared-utils/five/getPosition.js";
|
|
55
|
+
import "../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
56
|
+
import "../shared-utils/three/PointSelector/utils/contents.js";
|
|
57
|
+
import "../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
|
|
58
|
+
import "../vendor/three/build/three.module.js";
|
|
10
59
|
import "../shared-utils/isTruelyObject.js";
|
|
11
|
-
function J(
|
|
12
|
-
const t =
|
|
13
|
-
return t[12] = r[
|
|
60
|
+
function J(d, r, c) {
|
|
61
|
+
const t = d.slice();
|
|
62
|
+
return t[12] = r[c], t;
|
|
14
63
|
}
|
|
15
|
-
function K(
|
|
16
|
-
let r,
|
|
17
|
-
return r = new
|
|
64
|
+
function K(d) {
|
|
65
|
+
let r, c;
|
|
66
|
+
return r = new ht({
|
|
18
67
|
props: { rulerItemProp: (
|
|
19
68
|
/*itemData*/
|
|
20
|
-
|
|
69
|
+
d[12]
|
|
21
70
|
) }
|
|
22
71
|
}), {
|
|
23
72
|
c() {
|
|
24
|
-
|
|
73
|
+
st(r.$$.fragment);
|
|
25
74
|
},
|
|
26
75
|
m(t, e) {
|
|
27
|
-
|
|
76
|
+
at(r, t, e), c = !0;
|
|
28
77
|
},
|
|
29
78
|
p(t, e) {
|
|
30
79
|
const w = {};
|
|
@@ -33,110 +82,110 @@ function K(p) {
|
|
|
33
82
|
t[12]), r.$set(w);
|
|
34
83
|
},
|
|
35
84
|
i(t) {
|
|
36
|
-
|
|
85
|
+
c || (C(r.$$.fragment, t), c = !0);
|
|
37
86
|
},
|
|
38
87
|
o(t) {
|
|
39
|
-
k(r.$$.fragment, t),
|
|
88
|
+
k(r.$$.fragment, t), c = !1;
|
|
40
89
|
},
|
|
41
90
|
d(t) {
|
|
42
|
-
|
|
91
|
+
ct(r, t);
|
|
43
92
|
}
|
|
44
93
|
};
|
|
45
94
|
}
|
|
46
|
-
function
|
|
47
|
-
let r,
|
|
95
|
+
function dt(d) {
|
|
96
|
+
let r, c, t = (
|
|
48
97
|
/*rulerItemProp*/
|
|
49
|
-
|
|
98
|
+
d[0]
|
|
50
99
|
), e = [];
|
|
51
|
-
for (let
|
|
52
|
-
e[
|
|
53
|
-
const w = (
|
|
54
|
-
e[
|
|
100
|
+
for (let n = 0; n < t.length; n += 1)
|
|
101
|
+
e[n] = K(J(d, t, n));
|
|
102
|
+
const w = (n) => k(e[n], 1, 1, () => {
|
|
103
|
+
e[n] = null;
|
|
55
104
|
});
|
|
56
105
|
return {
|
|
57
106
|
c() {
|
|
58
107
|
r = $("div");
|
|
59
|
-
for (let o = 0; o < e.length; o += 1)
|
|
60
|
-
e[o].c();
|
|
61
|
-
},
|
|
62
|
-
m(o, a) {
|
|
63
|
-
tt(o, r, a);
|
|
64
108
|
for (let n = 0; n < e.length; n += 1)
|
|
65
|
-
e[n]
|
|
66
|
-
|
|
109
|
+
e[n].c();
|
|
110
|
+
},
|
|
111
|
+
m(n, s) {
|
|
112
|
+
tt(n, r, s);
|
|
113
|
+
for (let o = 0; o < e.length; o += 1)
|
|
114
|
+
e[o] && e[o].m(r, null);
|
|
115
|
+
c = !0;
|
|
67
116
|
},
|
|
68
|
-
p(
|
|
69
|
-
if (
|
|
117
|
+
p(n, [s]) {
|
|
118
|
+
if (s & /*rulerItemProp*/
|
|
70
119
|
1) {
|
|
71
120
|
t = /*rulerItemProp*/
|
|
72
|
-
|
|
73
|
-
let
|
|
74
|
-
for (
|
|
75
|
-
const A = J(
|
|
76
|
-
e[
|
|
121
|
+
n[0];
|
|
122
|
+
let o;
|
|
123
|
+
for (o = 0; o < t.length; o += 1) {
|
|
124
|
+
const A = J(n, t, o);
|
|
125
|
+
e[o] ? (e[o].p(A, s), C(e[o], 1)) : (e[o] = K(A), e[o].c(), C(e[o], 1), e[o].m(r, null));
|
|
77
126
|
}
|
|
78
|
-
for (
|
|
79
|
-
w(
|
|
127
|
+
for (mt(), o = t.length; o < e.length; o += 1)
|
|
128
|
+
w(o);
|
|
80
129
|
et();
|
|
81
130
|
}
|
|
82
131
|
},
|
|
83
|
-
i(
|
|
84
|
-
if (!
|
|
85
|
-
for (let
|
|
86
|
-
C(e[
|
|
87
|
-
|
|
132
|
+
i(n) {
|
|
133
|
+
if (!c) {
|
|
134
|
+
for (let s = 0; s < t.length; s += 1)
|
|
135
|
+
C(e[s]);
|
|
136
|
+
c = !0;
|
|
88
137
|
}
|
|
89
138
|
},
|
|
90
|
-
o(
|
|
139
|
+
o(n) {
|
|
91
140
|
e = e.filter(Boolean);
|
|
92
|
-
for (let
|
|
93
|
-
k(e[
|
|
94
|
-
|
|
141
|
+
for (let s = 0; s < e.length; s += 1)
|
|
142
|
+
k(e[s]);
|
|
143
|
+
c = !1;
|
|
95
144
|
},
|
|
96
|
-
d(
|
|
97
|
-
|
|
145
|
+
d(n) {
|
|
146
|
+
n && ot(r), nt(e, n);
|
|
98
147
|
}
|
|
99
148
|
};
|
|
100
149
|
}
|
|
101
|
-
function gt(
|
|
150
|
+
function gt(d, r, c) {
|
|
102
151
|
var B, G, H, U;
|
|
103
|
-
let { five: t } = r, { rulerDatas: e } = r, { options: w } = r,
|
|
104
|
-
const
|
|
105
|
-
const
|
|
106
|
-
[{ x: 0, y: 0 }, { x:
|
|
107
|
-
[{ x: 0, y: 0 }, { x: 0, y:
|
|
108
|
-
[{ x:
|
|
109
|
-
[{ x: 0, y:
|
|
110
|
-
],
|
|
111
|
-
for (let
|
|
112
|
-
const g =
|
|
113
|
-
g &&
|
|
152
|
+
let { five: t } = r, { rulerDatas: e } = r, { options: w } = r, n = [];
|
|
153
|
+
const s = ((G = (B = t.getElement()) == null ? void 0 : B.parentElement) == null ? void 0 : G.clientWidth) || 0, o = ((U = (H = t.getElement()) == null ? void 0 : H.parentElement) == null ? void 0 : U.clientHeight) || 0, A = (a, m) => {
|
|
154
|
+
const l = [
|
|
155
|
+
[{ x: 0, y: 0 }, { x: s, y: 0 }],
|
|
156
|
+
[{ x: 0, y: 0 }, { x: 0, y: o }],
|
|
157
|
+
[{ x: s, y: 0 }, { x: s, y: o }],
|
|
158
|
+
[{ x: 0, y: o }, { x: s, y: o }]
|
|
159
|
+
], f = [];
|
|
160
|
+
for (let u = 0; u < l.length; u++) {
|
|
161
|
+
const g = ft([a, m], [l[u][0], l[u][1]], !0);
|
|
162
|
+
g && f.push(g);
|
|
114
163
|
}
|
|
115
|
-
return
|
|
116
|
-
}, j = (
|
|
117
|
-
const
|
|
164
|
+
return f.length === 0 ? !1 : f;
|
|
165
|
+
}, j = (a, m) => {
|
|
166
|
+
const l = a.clone().project(t.camera), f = (l.x + 1) / 2 * s, u = (-l.y + 1) / 2 * o, g = m.clone().project(t.camera), L = (g.x + 1) / 2 * s, y = (-g.y + 1) / 2 * o, i = Math.sqrt(Math.pow(L - f, 2) + Math.pow(y - u, 2));
|
|
118
167
|
return {
|
|
119
|
-
startLeft:
|
|
120
|
-
startTop:
|
|
168
|
+
startLeft: f,
|
|
169
|
+
startTop: u,
|
|
121
170
|
endLeft: L,
|
|
122
171
|
endTop: y,
|
|
123
|
-
distance:
|
|
172
|
+
distance: i
|
|
124
173
|
};
|
|
125
|
-
}, N = (
|
|
126
|
-
const
|
|
174
|
+
}, N = (a, m, l) => {
|
|
175
|
+
const f = t.camera.position, u = t.camera.getWorldDirection(new M()), g = a.clone().sub(f).normalize().angleTo(u), L = m.clone().sub(f).normalize().angleTo(u), y = a.distanceTo(m), T = m.clone().sub(m.clone().sub(a).divide(new M(2, 2, 2))).distanceTo(f), { startLeft: h, startTop: x, endLeft: v, endTop: q, distance: D } = j(a, m), S = -((Math.PI / 2 - Math.atan2(v - h, x - q)) / Math.PI) * 180;
|
|
127
176
|
let P = !0;
|
|
128
|
-
|
|
177
|
+
l || (P = !1), !z(a, l) && !z(m, l) && (P = !1), y < 0.3 && (P = !1), g > Math.PI / 2 && (P = !1), L > Math.PI / 2 && (P = !1), T / y > 8 && (P = !1);
|
|
129
178
|
let I = 50, b = D;
|
|
130
|
-
const
|
|
131
|
-
if (
|
|
179
|
+
const p = A({ x: ~~h, y: ~~x }, { x: ~~v, y: ~~q });
|
|
180
|
+
if (p && p.length === 1 && (z(a, l) ? (b = Math.sqrt(Math.pow(p[0].x - h, 2) + Math.pow(p[0].y - x, 2)), I = b / D * 50) : z(m, l) && (b = Math.sqrt(Math.pow(p[0].x - v, 2) + Math.pow(p[0].y - q, 2)), I = 100 - b / D * 50)), p && p.length === 2) {
|
|
132
181
|
const F = {
|
|
133
|
-
x: (
|
|
134
|
-
y: (
|
|
182
|
+
x: (p[0].x + p[1].x) / 2,
|
|
183
|
+
y: (p[0].y + p[1].y) / 2
|
|
135
184
|
};
|
|
136
|
-
I = Math.sqrt(Math.pow(F.x -
|
|
185
|
+
I = Math.sqrt(Math.pow(F.x - h, 2) + Math.pow(F.y - x, 2)) / D * 100;
|
|
137
186
|
}
|
|
138
187
|
return {
|
|
139
|
-
startLeft:
|
|
188
|
+
startLeft: h,
|
|
140
189
|
startTop: x,
|
|
141
190
|
distance: D,
|
|
142
191
|
deg: S,
|
|
@@ -145,18 +194,18 @@ function gt(p, r, i) {
|
|
|
145
194
|
ruleLength: y
|
|
146
195
|
};
|
|
147
196
|
}, _ = () => {
|
|
148
|
-
const
|
|
149
|
-
if (!
|
|
150
|
-
return
|
|
151
|
-
if (t.currentMode !==
|
|
152
|
-
return
|
|
153
|
-
const
|
|
154
|
-
const
|
|
155
|
-
return
|
|
156
|
-
}), y =
|
|
157
|
-
var b,
|
|
158
|
-
const T =
|
|
159
|
-
return
|
|
197
|
+
const a = t.panoIndex, m = e.find((i) => i.panoIndex === a);
|
|
198
|
+
if (!m)
|
|
199
|
+
return c(0, n = []);
|
|
200
|
+
if (t.currentMode !== lt.Mode.Panorama)
|
|
201
|
+
return c(0, n = []);
|
|
202
|
+
const l = t.camera.position, f = t.camera.getWorldDirection(new M()), u = m.lines.map((i) => new M(i.start[0], -i.start[1], -i.start[2])), g = m.lines.map((i) => new M(i.end[0], -i.end[1], -i.end[2])), [L] = u.concat(g).sort((i, T) => {
|
|
203
|
+
const h = i.clone().setY(0).sub(l).normalize().angleTo(f.clone().setY(0)), x = T.clone().setY(0).sub(l).normalize().angleTo(f.clone().setY(0));
|
|
204
|
+
return h - x;
|
|
205
|
+
}), y = m.lines.map((i) => {
|
|
206
|
+
var b, p;
|
|
207
|
+
const T = i.start, h = i.end, { startLeft: x, startTop: v, distance: q, deg: D, visible: V, labelOffset: S, ruleLength: P } = N(new M(T[0], -T[1], -T[2]), new M(h[0], -h[1], -h[2]), L), I = [];
|
|
208
|
+
return i.children && ((b = i.children) == null ? void 0 : b.length) > 0 && ((p = i.children) == null || p.forEach((F) => {
|
|
160
209
|
const W = F.start, Y = F.end, { distance: O } = j(new M(W[0], -W[1], -W[2]), new M(Y[0], -Y[1], -Y[2]));
|
|
161
210
|
I.push({ width: O, state: F.state });
|
|
162
211
|
})), {
|
|
@@ -164,28 +213,28 @@ function gt(p, r, i) {
|
|
|
164
213
|
left: x,
|
|
165
214
|
top: v,
|
|
166
215
|
rotateDeg: D,
|
|
167
|
-
state:
|
|
216
|
+
state: i.state,
|
|
168
217
|
children: I,
|
|
169
218
|
labelOffset: S,
|
|
170
219
|
visible: V,
|
|
171
220
|
labelElement: w.distanceText(P)
|
|
172
221
|
};
|
|
173
222
|
});
|
|
174
|
-
|
|
175
|
-
}, E = () =>
|
|
223
|
+
c(0, n = y);
|
|
224
|
+
}, E = () => pt(_), R = ut(_, 80);
|
|
176
225
|
return rt(() => {
|
|
177
226
|
_(), t.on("panoArrived", _), t.on("modeChange", _), t.on("cameraDirectionUpdate", E), t.on("movingToPano", E), t.on("mouseWheel", () => R()), t.on("pinchGesture", () => R());
|
|
178
|
-
}),
|
|
227
|
+
}), it(() => {
|
|
179
228
|
t.off("panoArrived", _), t.off("modeChange", _), t.off("cameraDirectionUpdate", E), t.off("movingToPano", E), t.off("mouseWheel", () => R()), t.off("pinchGesture", () => R());
|
|
180
|
-
}),
|
|
181
|
-
"five" in
|
|
182
|
-
}, [
|
|
229
|
+
}), d.$$set = (a) => {
|
|
230
|
+
"five" in a && c(1, t = a.five), "rulerDatas" in a && c(2, e = a.rulerDatas), "options" in a && c(3, w = a.options);
|
|
231
|
+
}, [n, t, e, w];
|
|
183
232
|
}
|
|
184
|
-
class
|
|
233
|
+
class _e extends Q {
|
|
185
234
|
constructor(r) {
|
|
186
|
-
super(), X(this, r, gt,
|
|
235
|
+
super(), X(this, r, gt, dt, Z, { five: 1, rulerDatas: 2, options: 3 });
|
|
187
236
|
}
|
|
188
237
|
}
|
|
189
238
|
export {
|
|
190
|
-
|
|
239
|
+
_e as default
|
|
191
240
|
};
|