@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.
Files changed (113) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/README.md +116 -0
  3. package/dist/Sculpt/Objects/Base/index.d.ts +1 -1
  4. package/dist/Sculpt/index.d.ts +2 -2
  5. package/dist/index.cjs.js +264 -264
  6. package/dist/index.js +4111 -4089
  7. package/dist/index.umd.js +266 -266
  8. package/dist/shared-utils/equal.d.ts +1 -1
  9. package/dist/shared-utils/index.d.ts +2 -1
  10. package/dist/shared-utils/tag.d.ts +19 -8
  11. package/dist/shared-utils/three/index.d.ts +1 -0
  12. package/libs/AreaMakerPlugin/Controller.js +107 -77
  13. package/libs/AreaMakerPlugin/index.js +39 -9
  14. package/libs/AreaMakerPlugin/utils/Item.js +68 -38
  15. package/libs/CSS3DRenderPlugin/Controller.js +38 -18
  16. package/libs/CSS3DRenderPlugin/index.js +41 -21
  17. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +63 -38
  18. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +103 -83
  19. package/libs/CruisePlugin/BaseController.js +72 -42
  20. package/libs/CruisePlugin/Move.js +35 -16
  21. package/libs/CruisePlugin/Work.js +67 -48
  22. package/libs/CruisePlugin/index.js +45 -26
  23. package/libs/CurrentPanoImagePlugin/Controller.js +71 -41
  24. package/libs/CurrentPanoImagePlugin/index.js +40 -10
  25. package/libs/GuideLinePlugin/Controller.js +76 -57
  26. package/libs/GuideLinePlugin/GuideLineItem.js +40 -21
  27. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +4 -3
  28. package/libs/GuideLinePlugin/GuideLineModeItem.js +34 -15
  29. package/libs/GuideLinePlugin/index.js +45 -26
  30. package/libs/ModelMakerPlugin/Controller.js +53 -35
  31. package/libs/ModelMakerPlugin/index.js +40 -22
  32. package/libs/ModelTVVideoPlugin/Plugin.js +52 -32
  33. package/libs/ModelTVVideoPlugin/index.js +28 -8
  34. package/libs/Object3DHelperPlugin/Controller.js +55 -36
  35. package/libs/Object3DHelperPlugin/index.js +43 -24
  36. package/libs/PanoCompassPlugin/Controller.js +39 -19
  37. package/libs/PanoCompassPlugin/index.js +40 -20
  38. package/libs/PanoDoorLabelPlugin/BaseController.js +62 -32
  39. package/libs/PanoDoorLabelPlugin/Controller.js +105 -75
  40. package/libs/PanoDoorLabelPlugin/index.js +40 -10
  41. package/libs/PanoMeasurePlugin/Components/Controller0.js +9 -9
  42. package/libs/PanoMeasurePlugin/Components/Controller1.js +9 -9
  43. package/libs/PanoMeasurePlugin/Controller/EditController.js +5 -5
  44. package/libs/PanoMeasurePlugin/Controller/WatchController.js +79 -53
  45. package/libs/PanoMeasurePlugin/Controller/index.js +18 -18
  46. package/libs/PanoMeasurePlugin/Model/area.js +46 -20
  47. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +36 -7
  48. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +9 -9
  49. package/libs/PanoMeasurePlugin/index.js +4 -4
  50. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +46 -18
  51. package/libs/PanoRulerProPlugin/Controller.js +88 -39
  52. package/libs/PanoRulerProPlugin/RulerItems.js +151 -102
  53. package/libs/PanoRulerProPlugin/index.js +53 -4
  54. package/libs/PanoSpatialTagPlugin/Plugin.js +58 -38
  55. package/libs/PanoSpatialTagPlugin/index.js +26 -6
  56. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +82 -52
  57. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +238 -209
  58. package/libs/PanoTagPlugin/Components/Tag/index.js +155 -128
  59. package/libs/PanoTagPlugin/Components/TagContainer.js +103 -76
  60. package/libs/PanoTagPlugin/Components/TagItem.js +34 -7
  61. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +32 -5
  62. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +62 -35
  63. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +60 -33
  64. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +61 -34
  65. package/libs/PanoTagPlugin/controller/TagRender.js +53 -34
  66. package/libs/PanoTagPlugin/controller/TagUtil.js +37 -18
  67. package/libs/PanoTagPlugin/controller/index.js +48 -29
  68. package/libs/PanoTagPlugin/index.js +46 -27
  69. package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +62 -32
  70. package/libs/PanoVideoPlugin/Controller.js +98 -68
  71. package/libs/PanoVideoPlugin/VideoMeshController.js +58 -28
  72. package/libs/PanoVideoPlugin/index.js +43 -13
  73. package/libs/PipelinePlugin/Controller.js +95 -66
  74. package/libs/PipelinePlugin/index.js +40 -11
  75. package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +46 -16
  76. package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +45 -15
  77. package/libs/PipelinePlugin/utils/Objects/Pipe.js +63 -33
  78. package/libs/Sculpt/Meshes/Box.js +4 -3
  79. package/libs/Sculpt/Meshes/Cylinder.js +4 -3
  80. package/libs/Sculpt/Meshes/Line.js +13 -12
  81. package/libs/Sculpt/Meshes/LineWithDots.js +9 -7
  82. package/libs/Sculpt/Meshes/Point.js +4 -3
  83. package/libs/Sculpt/Meshes/Polygon.js +3 -2
  84. package/libs/Sculpt/Meshes/Prism.js +12 -10
  85. package/libs/Sculpt/Meshes/Rectangle.js +4 -3
  86. package/libs/Sculpt/Objects/Base/index.d.ts +1 -1
  87. package/libs/Sculpt/Objects/Line/Editor.js +8 -7
  88. package/libs/Sculpt/index.d.ts +2 -2
  89. package/libs/Sculpt/index.js +4 -3
  90. package/libs/Sculpt/utils/three/ColoredMesh.js +7 -6
  91. package/libs/base/BasePlugin.js +5 -4
  92. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +91 -62
  93. package/libs/floorplan/MapviewFloorplanPlugin/index.js +40 -11
  94. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +82 -53
  95. package/libs/floorplan/ModelFloorplanPlugin/index.js +40 -11
  96. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +75 -45
  97. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +41 -11
  98. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +107 -78
  99. package/libs/floorplan/TopviewFloorplanPlugin/index.js +40 -11
  100. package/libs/floorplan/index.js +2 -1
  101. package/libs/index.js +34 -34
  102. package/libs/shared-utils/equal.d.ts +1 -1
  103. package/libs/shared-utils/five/index.js +4 -3
  104. package/libs/shared-utils/five/lookObject.js +4 -3
  105. package/libs/shared-utils/index.d.ts +2 -1
  106. package/libs/shared-utils/index.js +60 -55
  107. package/libs/shared-utils/logger.js +1 -1
  108. package/libs/shared-utils/tag.d.ts +19 -8
  109. package/libs/shared-utils/tag.js +68 -49
  110. package/libs/shared-utils/three/PointSelector/utils/PointSelectorHelper.js +3 -2
  111. package/libs/shared-utils/three/index.d.ts +1 -0
  112. package/libs/shared-utils/three/index.js +2 -1
  113. 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 m = (i, o, t) => o in i ? u(i, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[o] = t, p = (i, o) => {
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) && m(i, t, 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) && m(i, t, 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) => (m(i, typeof o != "symbol" ? o + "" : o, t), 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
- class Y extends y {
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(p({}, t.containerStyle), {
70
+ t.containerStyle = s(n({}, t.containerStyle), {
43
71
  zIndex: "1"
44
- }), t.contentStyle = s(p({}, t.contentStyle), {
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, e) {
83
+ updateArea(t, r) {
56
84
  var c, d;
57
- const n = e != null ? e : this.area.polygon.geometry, r = I(n);
58
- if (!r) {
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 } = r;
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, e) {
66
- const { unit: n = "m²", fix: r } = e != null ? e : {};
67
- this.contentDom.innerText = `${P(r) ? t : t.toFixed(r)}${n}`;
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
- Y as AreaItem
99
+ Ft as AreaItem
72
100
  };
@@ -1,49 +1,98 @@
1
- var m = Object.defineProperty;
2
- var f = Object.getOwnPropertySymbols;
1
+ var f = Object.defineProperty;
2
+ var c = Object.getOwnPropertySymbols;
3
3
  var v = Object.prototype.hasOwnProperty, b = Object.prototype.propertyIsEnumerable;
4
- var p = (i, t, e) => t in i ? m(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e, c = (i, t) => {
5
- for (var e in t || (t = {}))
6
- v.call(t, e) && p(i, e, t[e]);
7
- if (f)
8
- for (var e of f(t))
9
- b.call(t, e) && p(i, e, t[e]);
10
- return i;
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 r = (i, t, e) => (p(i, typeof t != "symbol" ? t + "" : t, e), e);
13
- var d = (i, t, e) => new Promise((a, o) => {
14
- var n = (s) => {
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
- h(e.next(s));
17
- } catch (u) {
18
- o(u);
16
+ l(i.next(r));
17
+ } catch (d) {
18
+ s(d);
19
19
  }
20
- }, l = (s) => {
20
+ }, n = (r) => {
21
21
  try {
22
- h(e.throw(s));
23
- } catch (u) {
24
- o(u);
22
+ l(i.throw(r));
23
+ } catch (d) {
24
+ s(d);
25
25
  }
26
- }, h = (s) => s.done ? a(s.value) : Promise.resolve(s.value).then(n, l);
27
- h((e = e.apply(i, t)).next());
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 A {
41
- constructor(t, e) {
42
- r(this, "five");
43
- r(this, "container", document.createElement("div"));
44
- r(this, "panoRulerProData");
45
- r(this, "rulerItems");
46
- r(this, "state", {
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 a, o;
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
- ), e && (e.data && this.load(e.data), this.state.options = c(c({}, this.state.options), e.options || {}), (a = e.options) != null && a.className && this.container.classList.add((o = e.options) == null ? void 0 : o.className)), this.five.once("modelLoaded", () => d(this, null, function* () {
59
- var n, l;
60
- (l = (n = this.five.getElement()) == null ? void 0 : n.parentNode) == null || l.append(this.container);
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 d(this, null, function* () {
113
+ return m(this, null, function* () {
65
114
  if (!this.five.work)
66
115
  return;
67
- const e = t.data;
68
- if (!e)
116
+ const i = t.data;
117
+ if (!i)
69
118
  throw new Error("标尺数据依赖不齐全!");
70
- this.panoRulerProData = e, this.state.loaded = !0;
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 d(this, null, function* () {
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
- A as default
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 nt, destroy_each as ot, onMount as rt, onDestroy as st, create_component as at, mount_component as ct, destroy_component as it, group_outros as lt } from "../vendor/svelte/internal/index.js";
2
- import { Five as ft } from "@realsee/five";
3
- import { nextFrame as mt } from "../shared-utils/animationFrame/index.js";
4
- import { equal as z } from "../shared-utils/equal.js";
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 dt from "./RulerItem.js";
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(p, r, i) {
12
- const t = p.slice();
13
- return t[12] = r[i], t;
60
+ function J(d, r, c) {
61
+ const t = d.slice();
62
+ return t[12] = r[c], t;
14
63
  }
15
- function K(p) {
16
- let r, i;
17
- return r = new dt({
64
+ function K(d) {
65
+ let r, c;
66
+ return r = new ht({
18
67
  props: { rulerItemProp: (
19
68
  /*itemData*/
20
- p[12]
69
+ d[12]
21
70
  ) }
22
71
  }), {
23
72
  c() {
24
- at(r.$$.fragment);
73
+ st(r.$$.fragment);
25
74
  },
26
75
  m(t, e) {
27
- ct(r, t, e), i = !0;
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
- i || (C(r.$$.fragment, t), i = !0);
85
+ c || (C(r.$$.fragment, t), c = !0);
37
86
  },
38
87
  o(t) {
39
- k(r.$$.fragment, t), i = !1;
88
+ k(r.$$.fragment, t), c = !1;
40
89
  },
41
90
  d(t) {
42
- it(r, t);
91
+ ct(r, t);
43
92
  }
44
93
  };
45
94
  }
46
- function pt(p) {
47
- let r, i, t = (
95
+ function dt(d) {
96
+ let r, c, t = (
48
97
  /*rulerItemProp*/
49
- p[0]
98
+ d[0]
50
99
  ), e = [];
51
- for (let o = 0; o < t.length; o += 1)
52
- e[o] = K(J(p, t, o));
53
- const w = (o) => k(e[o], 1, 1, () => {
54
- e[o] = null;
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] && e[n].m(r, null);
66
- i = !0;
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(o, [a]) {
69
- if (a & /*rulerItemProp*/
117
+ p(n, [s]) {
118
+ if (s & /*rulerItemProp*/
70
119
  1) {
71
120
  t = /*rulerItemProp*/
72
- o[0];
73
- let n;
74
- for (n = 0; n < t.length; n += 1) {
75
- const A = J(o, t, n);
76
- e[n] ? (e[n].p(A, a), C(e[n], 1)) : (e[n] = K(A), e[n].c(), C(e[n], 1), e[n].m(r, null));
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 (lt(), n = t.length; n < e.length; n += 1)
79
- w(n);
127
+ for (mt(), o = t.length; o < e.length; o += 1)
128
+ w(o);
80
129
  et();
81
130
  }
82
131
  },
83
- i(o) {
84
- if (!i) {
85
- for (let a = 0; a < t.length; a += 1)
86
- C(e[a]);
87
- i = !0;
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(o) {
139
+ o(n) {
91
140
  e = e.filter(Boolean);
92
- for (let a = 0; a < e.length; a += 1)
93
- k(e[a]);
94
- i = !1;
141
+ for (let s = 0; s < e.length; s += 1)
142
+ k(e[s]);
143
+ c = !1;
95
144
  },
96
- d(o) {
97
- o && nt(r), ot(e, o);
145
+ d(n) {
146
+ n && ot(r), nt(e, n);
98
147
  }
99
148
  };
100
149
  }
101
- function gt(p, r, i) {
150
+ function gt(d, r, c) {
102
151
  var B, G, H, U;
103
- let { five: t } = r, { rulerDatas: e } = r, { options: w } = r, o = [];
104
- const a = ((G = (B = t.getElement()) == null ? void 0 : B.parentElement) == null ? void 0 : G.clientWidth) || 0, n = ((U = (H = t.getElement()) == null ? void 0 : H.parentElement) == null ? void 0 : U.clientHeight) || 0, A = (c, l) => {
105
- const f = [
106
- [{ x: 0, y: 0 }, { x: a, y: 0 }],
107
- [{ x: 0, y: 0 }, { x: 0, y: n }],
108
- [{ x: a, y: 0 }, { x: a, y: n }],
109
- [{ x: 0, y: n }, { x: a, y: n }]
110
- ], u = [];
111
- for (let h = 0; h < f.length; h++) {
112
- const g = ut([c, l], [f[h][0], f[h][1]], !0);
113
- g && u.push(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 u.length === 0 ? !1 : u;
116
- }, j = (c, l) => {
117
- const f = c.clone().project(t.camera), u = (f.x + 1) / 2 * a, h = (-f.y + 1) / 2 * n, g = l.clone().project(t.camera), L = (g.x + 1) / 2 * a, y = (-g.y + 1) / 2 * n, s = Math.sqrt(Math.pow(L - u, 2) + Math.pow(y - h, 2));
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: u,
120
- startTop: h,
168
+ startLeft: f,
169
+ startTop: u,
121
170
  endLeft: L,
122
171
  endTop: y,
123
- distance: s
172
+ distance: i
124
173
  };
125
- }, N = (c, l, f) => {
126
- const u = t.camera.position, h = t.camera.getWorldDirection(new M()), g = c.clone().sub(u).normalize().angleTo(h), L = l.clone().sub(u).normalize().angleTo(h), y = c.distanceTo(l), T = l.clone().sub(l.clone().sub(c).divide(new M(2, 2, 2))).distanceTo(u), { startLeft: d, startTop: x, endLeft: v, endTop: q, distance: D } = j(c, l), S = -((Math.PI / 2 - Math.atan2(v - d, x - q)) / Math.PI) * 180;
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
- f || (P = !1), !z(c, f) && !z(l, f) && (P = !1), y < 0.3 && (P = !1), g > Math.PI / 2 && (P = !1), L > Math.PI / 2 && (P = !1), T / y > 8 && (P = !1);
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 m = A({ x: ~~d, y: ~~x }, { x: ~~v, y: ~~q });
131
- if (m && m.length === 1 && (z(c, f) ? (b = Math.sqrt(Math.pow(m[0].x - d, 2) + Math.pow(m[0].y - x, 2)), I = b / D * 50) : z(l, f) && (b = Math.sqrt(Math.pow(m[0].x - v, 2) + Math.pow(m[0].y - q, 2)), I = 100 - b / D * 50)), m && m.length === 2) {
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: (m[0].x + m[1].x) / 2,
134
- y: (m[0].y + m[1].y) / 2
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 - d, 2) + Math.pow(F.y - x, 2)) / D * 100;
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: d,
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 c = t.panoIndex, l = e.find((s) => s.panoIndex === c);
149
- if (!l)
150
- return i(0, o = []);
151
- if (t.currentMode !== ft.Mode.Panorama)
152
- return i(0, o = []);
153
- const f = t.camera.position, u = t.camera.getWorldDirection(new M()), h = l.lines.map((s) => new M(s.start[0], -s.start[1], -s.start[2])), g = l.lines.map((s) => new M(s.end[0], -s.end[1], -s.end[2])), [L] = h.concat(g).sort((s, T) => {
154
- const d = s.clone().setY(0).sub(f).normalize().angleTo(u.clone().setY(0)), x = T.clone().setY(0).sub(f).normalize().angleTo(u.clone().setY(0));
155
- return d - x;
156
- }), y = l.lines.map((s) => {
157
- var b, m;
158
- const T = s.start, d = s.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(d[0], -d[1], -d[2]), L), I = [];
159
- return s.children && ((b = s.children) == null ? void 0 : b.length) > 0 && ((m = s.children) == null || m.forEach((F) => {
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: s.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
- i(0, o = y);
175
- }, E = () => mt(_), R = ht(_, 80);
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
- }), st(() => {
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
- }), p.$$set = (c) => {
181
- "five" in c && i(1, t = c.five), "rulerDatas" in c && i(2, e = c.rulerDatas), "options" in c && i(3, w = c.options);
182
- }, [o, t, e, w];
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 Lt extends Q {
233
+ class _e extends Q {
185
234
  constructor(r) {
186
- super(), X(this, r, gt, pt, Z, { five: 1, rulerDatas: 2, options: 3 });
235
+ super(), X(this, r, gt, dt, Z, { five: 1, rulerDatas: 2, options: 3 });
187
236
  }
188
237
  }
189
238
  export {
190
- Lt as default
239
+ _e as default
191
240
  };