@realsee/dnalogel 3.47.5 → 3.47.7

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 (77) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/index.cjs.js +47 -47
  3. package/dist/index.js +3909 -3904
  4. package/dist/index.umd.js +38 -38
  5. package/dist/shared-utils/tag.d.ts +4 -1
  6. package/libs/AreaMakerPlugin/index.js +4 -4
  7. package/libs/AreaMakerPlugin/utils/Item.js +4 -4
  8. package/libs/CSS3DRenderPlugin/Controller.js +4 -4
  9. package/libs/CSS3DRenderPlugin/index.js +5 -5
  10. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +4 -4
  11. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +4 -4
  12. package/libs/CruisePlugin/BaseController.js +4 -4
  13. package/libs/CruisePlugin/index.js +4 -4
  14. package/libs/CurrentPanoImagePlugin/index.js +4 -4
  15. package/libs/GuideLinePlugin/GuideLineItem.js +4 -4
  16. package/libs/GuideLinePlugin/GuideLineModeItem.js +5 -5
  17. package/libs/GuideLinePlugin/index.js +4 -4
  18. package/libs/ModelMakerPlugin/index.js +4 -4
  19. package/libs/ModelMakerPlugin/item/baseItem.js +10 -6
  20. package/libs/ModelMakerPlugin/item/boxItem.js +6 -2
  21. package/libs/ModelMakerPlugin/item/polygonItem.js +6 -2
  22. package/libs/ModelMakerPlugin/item/prismItem.js +13 -9
  23. package/libs/ModelTVVideoPlugin/Plugin.js +4 -4
  24. package/libs/ModelTVVideoPlugin/index.js +4 -4
  25. package/libs/Object3DHelperPlugin/Controller.js +4 -4
  26. package/libs/Object3DHelperPlugin/index.js +4 -4
  27. package/libs/PanoCompassPlugin/Controller.js +4 -4
  28. package/libs/PanoCompassPlugin/index.js +4 -4
  29. package/libs/PanoDoorLabelPlugin/BaseController.js +4 -4
  30. package/libs/PanoDoorLabelPlugin/Controller.js +4 -4
  31. package/libs/PanoDoorLabelPlugin/index.js +4 -4
  32. package/libs/PanoMeasurePlugin/Components/Controller0.js +5 -5
  33. package/libs/PanoMeasurePlugin/Components/Controller1.js +5 -5
  34. package/libs/PanoMeasurePlugin/Controller/EditController.js +5 -5
  35. package/libs/PanoMeasurePlugin/Controller/WatchController.js +5 -5
  36. package/libs/PanoMeasurePlugin/Controller/index.js +4 -4
  37. package/libs/PanoMeasurePlugin/Model/area.js +5 -5
  38. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +4 -4
  39. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +5 -5
  40. package/libs/PanoMeasurePlugin/index.js +5 -5
  41. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +5 -5
  42. package/libs/PanoSpatialTagPlugin/Plugin.js +4 -4
  43. package/libs/PanoSpatialTagPlugin/index.js +4 -4
  44. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +5 -5
  45. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +5 -5
  46. package/libs/PanoTagPlugin/Components/Tag/index.js +5 -5
  47. package/libs/PanoTagPlugin/Components/TagContainer.js +5 -5
  48. package/libs/PanoTagPlugin/Components/TagItem.js +5 -5
  49. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +3 -3
  50. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +4 -4
  51. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +4 -4
  52. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +4 -4
  53. package/libs/PanoTagPlugin/controller/TagRender.js +5 -5
  54. package/libs/PanoTagPlugin/controller/TagUtil.js +4 -4
  55. package/libs/PanoTagPlugin/controller/index.js +5 -5
  56. package/libs/PanoTagPlugin/index.js +5 -5
  57. package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +5 -5
  58. package/libs/PanoVideoPlugin/Controller.js +5 -5
  59. package/libs/PanoVideoPlugin/VideoMeshController.js +5 -5
  60. package/libs/PanoVideoPlugin/index.js +5 -5
  61. package/libs/PipelinePlugin/Controller.js +4 -4
  62. package/libs/PipelinePlugin/index.js +4 -4
  63. package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +5 -5
  64. package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +5 -5
  65. package/libs/PipelinePlugin/utils/Objects/Pipe.js +5 -5
  66. package/libs/Sculpt/Meshes/Line.js +53 -57
  67. package/libs/base/BasePlugin.js +1 -1
  68. package/libs/floorplan/MapviewFloorplanPlugin/index.js +4 -4
  69. package/libs/floorplan/ModelFloorplanPlugin/index.js +4 -4
  70. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +4 -4
  71. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +4 -4
  72. package/libs/floorplan/TopviewFloorplanPlugin/index.js +4 -4
  73. package/libs/index.js +5 -5
  74. package/libs/shared-utils/logger.js +1 -1
  75. package/libs/shared-utils/tag.d.ts +4 -1
  76. package/libs/shared-utils/tag.js +54 -45
  77. package/package.json +1 -1
@@ -1,39 +1,43 @@
1
- var l = Object.defineProperty;
2
- var d = (n, t, e) => t in n ? l(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
- var i = (n, t, e) => (d(n, typeof t != "symbol" ? t + "" : t, e), e);
4
- import { anyPositionToVector3 as f } from "./positionToVector3.js";
5
- import * as m from "three";
6
- import { vector3ToScreen as v } from "./five/vector3ToScreen.js";
7
- import { getFiveModel as y } from "./five/getFiveModel.js";
8
- import { _raycaster as c } from "./three/raycaster.js";
9
- const p = "LightTagContainer_shgjakdhwakjdhsja", u = new m.Vector2();
10
- class g {
1
+ var u = Object.defineProperty;
2
+ var g = (h, t, e) => t in h ? u(h, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[t] = e;
3
+ var o = (h, t, e) => (g(h, typeof t != "symbol" ? t + "" : t, e), e);
4
+ import { anyPositionToVector3 as d } from "./positionToVector3.js";
5
+ import * as b from "three";
6
+ import { vector3ToScreen as l } from "./five/vector3ToScreen.js";
7
+ import { getFiveModel as x } from "./five/getFiveModel.js";
8
+ import { _raycaster as m } from "./three/raycaster.js";
9
+ import { FiveUtil as U } from "./Utils/FiveUtil.js";
10
+ const v = "LightTagContainer_shgjakdhwakjdhsja", w = new b.Vector2();
11
+ class E {
11
12
  constructor(t, e, s) {
12
- i(this, "container");
13
- i(this, "visible", !1);
14
- i(this, "enabled", !1);
15
- i(this, "wrapper");
16
- i(this, "tagWrapper");
17
- i(this, "five");
18
- i(this, "originPosition");
19
- i(this, "transformedPosition");
20
- i(this, "disposer");
21
- i(this, "config");
22
- i(this, "onCameraUpdate", () => {
13
+ o(this, "container");
14
+ o(this, "visible", !1);
15
+ o(this, "enabled", !1);
16
+ o(this, "wrapper");
17
+ o(this, "positionsForRotate");
18
+ o(this, "tagWrapper");
19
+ o(this, "five");
20
+ o(this, "originPosition");
21
+ o(this, "transformedPosition");
22
+ o(this, "disposer");
23
+ o(this, "config");
24
+ o(this, "fiveUtil");
25
+ o(this, "onCameraUpdate", () => {
23
26
  this.visible !== !1 && this.updateScreenPosition();
24
27
  });
25
- i(this, "onFiveEveryReady", () => {
28
+ o(this, "onFiveEveryReady", () => {
26
29
  var t;
27
30
  if (this.visible && this.five.state.mode !== "Panorama") {
28
- c.set(this.five.camera.position, this.transformedPosition.clone().sub(this.five.camera.position));
29
- const s = (t = y(this.five).intersectRaycaster(c)) == null ? void 0 : t[0];
30
- (s == null ? void 0 : s.distance) + 0.01 > this.transformedPosition.distanceTo(this.five.camera.position) ? (this.container.style.opacity = "1", this.container.style.pointerEvents = "auto") : (this.container.style.opacity = "0", this.container.style.pointerEvents = "none");
31
+ let e = 0.01;
32
+ this.fiveUtil.workUtil.fromType === "poincare" && (e = 0.05), m.set(this.five.camera.position, this.transformedPosition.clone().sub(this.five.camera.position));
33
+ const s = (t = x(this.five).intersectRaycaster(m)) == null ? void 0 : t[0];
34
+ (s == null ? void 0 : s.distance) + e > this.transformedPosition.distanceTo(this.five.camera.position) ? (this.container.style.opacity = "1", this.container.style.pointerEvents = "auto") : (this.container.style.opacity = "0", this.container.style.pointerEvents = "none");
31
35
  }
32
36
  });
33
- var o;
34
- this.five = t, this.originPosition = e ? f(e).clone() : void 0, this.transformedPosition = (o = this.originPosition) == null ? void 0 : o.clone(), this.container = (() => {
35
- const r = document.createElement("div");
36
- return r.style.width = "0", r.style.height = "0", r.style.position = "absolute", r.style.transition = "opacity 0.2s linear", r;
37
+ var n, r, a;
38
+ this.five = t, this.fiveUtil = (n = t.__fiveUtil__) != null ? n : t.__fiveUtil__ = new U(t), this.originPosition = e ? d(e).clone() : void 0, this.transformedPosition = (r = this.originPosition) == null ? void 0 : r.clone(), this.positionsForRotate = (a = s == null ? void 0 : s.positionsForRotate) == null ? void 0 : a.map((i) => d(i).clone()), this.container = (() => {
39
+ const i = document.createElement("div");
40
+ return i.style.width = "0", i.style.height = "0", i.style.position = "absolute", i.style.transition = "opacity 0.2s linear", i;
37
41
  })(), this.config = s != null ? s : {}, this.enable(), this.show();
38
42
  }
39
43
  show() {
@@ -43,12 +47,12 @@ class g {
43
47
  this.visible = !1, this.container.style.opacity = "0", this.container.style.pointerEvents = "none";
44
48
  }
45
49
  enable() {
46
- var s, o, r, h;
50
+ var s, n, r, a;
47
51
  if (this.enabled)
48
52
  return;
49
- this.enabled = !0, this.wrapper = (r = (o = this.config.wrapper) != null ? o : (s = this.five.getElement()) == null ? void 0 : s.parentElement) != null ? r : document.body, this.tagWrapper || (this.tagWrapper = (h = document.getElementById(p)) != null ? h : (() => {
50
- const a = document.createElement("div");
51
- return a.id = p, a.style.position = "absolute", a.style.top = "0", a.style.left = "0", a.style.width = "100%", a.style.height = "100%", a.style.pointerEvents = "none", a;
53
+ this.enabled = !0, this.wrapper = (r = (n = this.config.wrapper) != null ? n : (s = this.five.getElement()) == null ? void 0 : s.parentElement) != null ? r : document.body, this.tagWrapper || (this.tagWrapper = (a = document.getElementById(v)) != null ? a : (() => {
54
+ const i = document.createElement("div");
55
+ return i.id = v, i.style.position = "absolute", i.style.top = "0", i.style.left = "0", i.style.width = "100%", i.style.height = "100%", i.style.pointerEvents = "none", i;
52
56
  })(), this.wrapper.contains(this.tagWrapper) || this.wrapper.appendChild(this.tagWrapper)), this.tagWrapper.appendChild(this.container);
53
57
  let t = !1;
54
58
  const e = () => {
@@ -71,30 +75,35 @@ class g {
71
75
  var e;
72
76
  this.transformedPosition = (e = this.originPosition) == null ? void 0 : e.clone().applyMatrix4(t), this.onCameraUpdate();
73
77
  }
74
- setPosition(t) {
75
- this.transformedPosition = t, this.onCameraUpdate();
78
+ setPosition(t, e) {
79
+ this.transformedPosition = t, this.positionsForRotate = e, this.onCameraUpdate();
76
80
  }
77
81
  updateScreenPosition() {
78
82
  if (!this.transformedPosition) {
79
83
  this.container.style.left = "-100%", this.container.style.top = "-100%";
80
84
  return;
81
85
  }
82
- const t = v(this.five.camera, this.transformedPosition, this.five.renderer.getSize(u));
83
- if (!t) {
86
+ const t = this.five.renderer.getSize(w), e = l(this.five.camera, this.transformedPosition, t);
87
+ if (!e) {
84
88
  this.container.style.left = "-100%", this.container.style.top = "-100%";
85
89
  return;
86
90
  }
87
- const e = (() => {
88
- const s = 2 * Math.tan(0.5 * this.five.camera.fov / 180 * Math.PI), o = this.transformedPosition.distanceTo(this.five.camera.position);
89
- return Math.max(Math.min(1 - s * o / 40, 1), 0.5);
91
+ const s = (() => {
92
+ const r = 2 * Math.tan(0.5 * this.five.camera.fov / 180 * Math.PI), a = this.transformedPosition.distanceTo(this.five.camera.position);
93
+ return Math.max(Math.min(1 - r * a / 40, 1), 0.5);
94
+ })(), n = (() => {
95
+ if (this.positionsForRotate === void 0 || this.positionsForRotate.length !== 2)
96
+ return 0;
97
+ const [r, a] = this.positionsForRotate, i = l(this.five.camera, r, t), c = l(this.five.camera, a, t), p = i.leftPx > c.leftPx ? c : i, f = i.leftPx > c.leftPx ? i : c, y = f.leftPx - p.leftPx, P = f.topPx - p.topPx;
98
+ return Math.atan2(P, y) * (180 / Math.PI);
90
99
  })();
91
- this.container.style.left = t.leftPx + "px", this.container.style.top = t.topPx + "px", this.container.style.transform = `scale(${e})`;
100
+ this.container.style.left = e.leftPx + "px", this.container.style.top = e.topPx + "px", this.container.style.transformOrigin = "center", this.container.style.transform = `scale(${s})`, n && (this.container.style.transform += ` rotate(${n}deg)`);
92
101
  }
93
102
  }
94
- function T(n, t, e) {
95
- return new g(n, t, e);
103
+ function S(h, t, e) {
104
+ return new E(h, t, e);
96
105
  }
97
106
  export {
98
- g as LightTag,
99
- T as tag
107
+ E as LightTag,
108
+ S as tag
100
109
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@realsee/dnalogel",
3
- "version": "3.47.5",
3
+ "version": "3.47.7",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./libs/index.js",
6
6
  "types": "./libs/index.d.ts",