@realsee/dnalogel 3.50.13 → 3.50.14

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 (104) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/dist/index.cjs.js +194 -194
  3. package/dist/index.js +3617 -3596
  4. package/dist/index.umd.js +191 -191
  5. package/dist/shared-utils/equal.d.ts +1 -1
  6. package/dist/shared-utils/index.d.ts +2 -1
  7. package/dist/shared-utils/tag.d.ts +18 -7
  8. package/libs/AreaMakerPlugin/Controller.js +3 -3
  9. package/libs/AreaMakerPlugin/index.js +6 -6
  10. package/libs/AreaMakerPlugin/utils/Item.js +3 -3
  11. package/libs/CSS3DRenderPlugin/Controller.js +3 -3
  12. package/libs/CSS3DRenderPlugin/index.js +7 -7
  13. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +3 -3
  14. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +5 -5
  15. package/libs/CruisePlugin/BaseController.js +13 -13
  16. package/libs/CruisePlugin/Move.js +3 -3
  17. package/libs/CruisePlugin/Work.js +2 -2
  18. package/libs/CruisePlugin/index.js +8 -8
  19. package/libs/CurrentPanoImagePlugin/Controller.js +3 -3
  20. package/libs/CurrentPanoImagePlugin/index.js +6 -6
  21. package/libs/GuideLinePlugin/Controller.js +19 -19
  22. package/libs/GuideLinePlugin/GuideLineItem.js +7 -7
  23. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +1 -1
  24. package/libs/GuideLinePlugin/GuideLineModeItem.js +3 -3
  25. package/libs/GuideLinePlugin/index.js +8 -8
  26. package/libs/ModelMakerPlugin/Controller.js +3 -3
  27. package/libs/ModelMakerPlugin/index.js +7 -7
  28. package/libs/ModelTVVideoPlugin/Plugin.js +5 -5
  29. package/libs/ModelTVVideoPlugin/index.js +5 -5
  30. package/libs/Object3DHelperPlugin/Controller.js +6 -6
  31. package/libs/Object3DHelperPlugin/index.js +7 -7
  32. package/libs/PanoCompassPlugin/Controller.js +6 -6
  33. package/libs/PanoCompassPlugin/index.js +6 -6
  34. package/libs/PanoDoorLabelPlugin/BaseController.js +7 -7
  35. package/libs/PanoDoorLabelPlugin/Controller.js +6 -6
  36. package/libs/PanoDoorLabelPlugin/index.js +6 -6
  37. package/libs/PanoMeasurePlugin/Components/Controller0.js +5 -5
  38. package/libs/PanoMeasurePlugin/Components/Controller1.js +5 -5
  39. package/libs/PanoMeasurePlugin/Controller/EditController.js +5 -5
  40. package/libs/PanoMeasurePlugin/Controller/WatchController.js +4 -4
  41. package/libs/PanoMeasurePlugin/Controller/index.js +3 -3
  42. package/libs/PanoMeasurePlugin/Model/area.js +5 -5
  43. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +7 -7
  44. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +5 -5
  45. package/libs/PanoMeasurePlugin/index.js +3 -3
  46. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +3 -3
  47. package/libs/PanoRulerProPlugin/Controller.js +52 -33
  48. package/libs/PanoRulerProPlugin/RulerItems.js +104 -85
  49. package/libs/PanoRulerProPlugin/index.js +23 -4
  50. package/libs/PanoSpatialTagPlugin/Plugin.js +5 -5
  51. package/libs/PanoSpatialTagPlugin/index.js +5 -5
  52. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +3 -3
  53. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +3 -3
  54. package/libs/PanoTagPlugin/Components/Tag/index.js +3 -3
  55. package/libs/PanoTagPlugin/Components/TagContainer.js +6 -6
  56. package/libs/PanoTagPlugin/Components/TagItem.js +3 -3
  57. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +3 -3
  58. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +7 -7
  59. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +7 -7
  60. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +7 -7
  61. package/libs/PanoTagPlugin/controller/TagRender.js +6 -6
  62. package/libs/PanoTagPlugin/controller/TagUtil.js +5 -5
  63. package/libs/PanoTagPlugin/controller/index.js +3 -3
  64. package/libs/PanoTagPlugin/index.js +6 -6
  65. package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +3 -3
  66. package/libs/PanoVideoPlugin/Controller.js +7 -7
  67. package/libs/PanoVideoPlugin/VideoMeshController.js +3 -3
  68. package/libs/PanoVideoPlugin/index.js +7 -7
  69. package/libs/PipelinePlugin/Controller.js +15 -15
  70. package/libs/PipelinePlugin/index.js +7 -7
  71. package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +3 -3
  72. package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +3 -3
  73. package/libs/PipelinePlugin/utils/Objects/Pipe.js +3 -3
  74. package/libs/Sculpt/Meshes/Box.js +1 -1
  75. package/libs/Sculpt/Meshes/Cylinder.js +1 -1
  76. package/libs/Sculpt/Meshes/Line.js +4 -4
  77. package/libs/Sculpt/Meshes/LineWithDots.js +3 -2
  78. package/libs/Sculpt/Meshes/Point.js +1 -1
  79. package/libs/Sculpt/Meshes/Prism.js +9 -8
  80. package/libs/Sculpt/Meshes/Rectangle.js +1 -1
  81. package/libs/Sculpt/Objects/Line/Editor.js +1 -1
  82. package/libs/Sculpt/index.js +1 -1
  83. package/libs/Sculpt/utils/three/ColoredMesh.js +1 -1
  84. package/libs/base/BasePlugin.js +2 -2
  85. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +3 -3
  86. package/libs/floorplan/MapviewFloorplanPlugin/index.js +6 -6
  87. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +3 -3
  88. package/libs/floorplan/ModelFloorplanPlugin/index.js +6 -6
  89. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +7 -7
  90. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +7 -7
  91. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +3 -3
  92. package/libs/floorplan/TopviewFloorplanPlugin/index.js +6 -6
  93. package/libs/floorplan/index.js +1 -1
  94. package/libs/index.js +6 -6
  95. package/libs/shared-utils/equal.d.ts +1 -1
  96. package/libs/shared-utils/five/index.js +1 -1
  97. package/libs/shared-utils/five/lookObject.js +1 -1
  98. package/libs/shared-utils/index.d.ts +2 -1
  99. package/libs/shared-utils/index.js +57 -54
  100. package/libs/shared-utils/logger.js +1 -1
  101. package/libs/shared-utils/tag.d.ts +18 -7
  102. package/libs/shared-utils/tag.js +80 -61
  103. package/libs/shared-utils/three/index.js +1 -1
  104. package/package.json +1 -1
@@ -2,67 +2,70 @@ import { Interval as r } from "./math/Interval.js";
2
2
  import { Rectangle as e } from "./math/Rectangle.js";
3
3
  import { convexHull as t } from "./math/convexHull.js";
4
4
  import { inside as o } from "./math/inside.js";
5
- import { checkFiveModelLoaded as i } from "./five/index.js";
6
- import { Magnifier as m } from "./three/Magnifier.js";
7
- import { getCoordsFromClient as n, getCoordsFromElement as l } from "./three/getCoords.js";
8
- import { PointHelper as p } from "./three/PointSelector/utils/PointHelper.js";
9
- import { PointSelectorHelper as f } from "./three/PointSelector/utils/PointSelectorHelper.js";
10
- import { Object3D as a } from "./three/core/Object3D.js";
11
- import { LineSegments as d } from "./three/core/LineSegments.js";
12
- import { bounding as g, boundingBox as u, boundingSphere as s, boxVertex as b, boxVertexes as x, worldBounding as c, worldBoundingBox as k, worldBoundingSphere as F } from "./three/boundingBox.js";
13
- import { animeMap as P, blink as w, reblink as B } from "./three/blink.js";
14
- import { isNil as S, notNil as v } from "./isNil.js";
15
- import { uuid as L } from "./uuid.js";
16
- import { absoluteUrl as M, isAbsoluteURL as j } from "./url/absoluteUrl.js";
17
- import { awaitNextFrame as O, getFrameTime as _, nextFrame as h, requestAnimationFrameInterval as y } from "./animationFrame/index.js";
18
- import { equal as C } from "./equal.js";
19
- import { isModelLike as H, isPanoramaLike as I } from "./five/mode.js";
20
- import { lookObject as N } from "./five/lookObject.js";
21
- import { lookPoint as T } from "./five/lookPoint.js";
22
- import { BetterTween as q, tweenProgress as A } from "./animationFrame/BetterTween.js";
23
- const lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5
+ import { LightTag as i, tag as m } from "./tag.js";
6
+ import { checkFiveModelLoaded as n } from "./five/index.js";
7
+ import { Magnifier as p } from "./three/Magnifier.js";
8
+ import { getCoordsFromClient as l, getCoordsFromElement as f } from "./three/getCoords.js";
9
+ import { PointHelper as a } from "./three/PointSelector/utils/PointHelper.js";
10
+ import { PointSelectorHelper as d } from "./three/PointSelector/utils/PointSelectorHelper.js";
11
+ import { Object3D as g } from "./three/core/Object3D.js";
12
+ import { LineSegments as u } from "./three/core/LineSegments.js";
13
+ import { bounding as s, boundingBox as b, boundingSphere as x, boxVertex as c, boxVertexes as k, worldBounding as F, worldBoundingBox as P, worldBoundingSphere as w } from "./three/boundingBox.js";
14
+ import { animeMap as B, blink as L, reblink as S } from "./three/blink.js";
15
+ import { isNil as v, notNil as M } from "./isNil.js";
16
+ import { uuid as h } from "./uuid.js";
17
+ import { absoluteUrl as j, isAbsoluteURL as O } from "./url/absoluteUrl.js";
18
+ import { awaitNextFrame as T, getFrameTime as _, nextFrame as y, requestAnimationFrameInterval as C } from "./animationFrame/index.js";
19
+ import { equal as H } from "./equal.js";
20
+ import { isModelLike as I, isPanoramaLike as N } from "./five/mode.js";
21
+ import { lookObject as q } from "./five/lookObject.js";
22
+ import { lookPoint as A } from "./five/lookPoint.js";
23
+ import { BetterTween as R, tweenProgress as U } from "./animationFrame/BetterTween.js";
24
+ const ao = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
24
25
  __proto__: null,
25
- BetterTween: q,
26
+ BetterTween: R,
26
27
  Interval: r,
27
- LineSegments: d,
28
- Magnifier: m,
29
- Object3D: a,
30
- PointHelper: p,
31
- PointSelectorHelper: f,
28
+ LightTag: i,
29
+ LineSegments: u,
30
+ Magnifier: p,
31
+ Object3D: g,
32
+ PointHelper: a,
33
+ PointSelectorHelper: d,
32
34
  Rectangle: e,
33
- absoluteUrl: M,
34
- animeMap: P,
35
- awaitNextFrame: O,
36
- blink: w,
37
- bounding: g,
38
- boundingBox: u,
39
- boundingSphere: s,
40
- boxVertex: b,
41
- boxVertexes: x,
42
- checkFiveModelLoaded: i,
35
+ absoluteUrl: j,
36
+ animeMap: B,
37
+ awaitNextFrame: T,
38
+ blink: L,
39
+ bounding: s,
40
+ boundingBox: b,
41
+ boundingSphere: x,
42
+ boxVertex: c,
43
+ boxVertexes: k,
44
+ checkFiveModelLoaded: n,
43
45
  convexHull: t,
44
- equal: C,
45
- getCoordsFromClient: n,
46
- getCoordsFromElement: l,
46
+ equal: H,
47
+ getCoordsFromClient: l,
48
+ getCoordsFromElement: f,
47
49
  getFrameTime: _,
48
50
  inside: o,
49
- isAbsoluteURL: j,
50
- isModelLike: H,
51
- isNil: S,
52
- isPanoramaLike: I,
53
- lookObject: N,
54
- lookPoint: T,
55
- nextFrame: h,
56
- notNil: v,
51
+ isAbsoluteURL: O,
52
+ isModelLike: I,
53
+ isNil: v,
54
+ isPanoramaLike: N,
55
+ lookObject: q,
56
+ lookPoint: A,
57
+ nextFrame: y,
58
+ notNil: M,
57
59
  pointInPolygon: o,
58
- reblink: B,
59
- requestAnimationFrameInterval: y,
60
- tweenProgress: A,
61
- uuid: L,
62
- worldBounding: c,
63
- worldBoundingBox: k,
64
- worldBoundingSphere: F
60
+ reblink: S,
61
+ requestAnimationFrameInterval: C,
62
+ tag: m,
63
+ tweenProgress: U,
64
+ uuid: h,
65
+ worldBounding: F,
66
+ worldBoundingBox: P,
67
+ worldBoundingSphere: w
65
68
  }, Symbol.toStringTag, { value: "Module" }));
66
69
  export {
67
- lo as index
70
+ ao as index
68
71
  };
@@ -1,6 +1,6 @@
1
1
  function A() {
2
2
  console.debug(
3
- "%c %c@realsee/dnalogel %cv3.50.13",
3
+ "%c %c@realsee/dnalogel %cv3.50.14",
4
4
  [
5
5
  "background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAMAAACHgmeRAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABLFBMVEUAAAAapPoap/oaqvkbrfkbr/gZnfwZoPsaqfnD4v/E4/8Ylv0clPm93/+/4P/B4f8Yj/683/8Wif+33P8Uhv+x2f8ShP+s1v8Pgf+n0/8Nf/+h0f8Lff8Lff8Nf/9dl/+czv8KfP8KfP+Lxf+Uyv+Xy/+Hwv+Jw/+Mxf+Oxv+RyP8aovsapfoap/oZmfwZm/wZnvsYnPsYkf4YlP0NePsDYfgYcfi43f+63v8Xiv8Xjf4EWfwCV/sWZ/qz2v+02/8Vh/8WiP8EUf8CTf4WXv2u1/+v2P8Thf8Thv8ETf8CR/8VV/+o1f+q1f8Qgv8Rg/8DSv8BRf8UVP+j0v+k0v8OgP8Pgf8DR/8DQv9Nhf+dzv+fz/+Kv/+Vyv+Xy/+azf+Oxv+Qx/+SyP////8MUhLdAAAAK3RSTlMACEWQ2bd98uQECPXxqO7c+Pb49vj2+Pb49vj23Oul8fMHA+TwerXXjEIG2P+bHgAAAAFiS0dEY1y+LaoAAAB+SURBVAjXY2BgZGJmYWVgYGBgY9fW0eVg4ORi4NbTNzDk4eXjZxAwMjYxNTO3EGQQsrSytrG1sxdmEHFwdHJ2cXUTZRBz9/D08vbxFWeQ8PMPCAwKDpFkkAoNC4+IjIqWZpCRlZOPiY2LV2BQVGJQTkhMUlEFWaOmrqGpxQAAyg0S9Dq+VPYAAAAASUVORK5CYII=')",
6
6
  "background-repeat: no-repeat",
@@ -1,10 +1,22 @@
1
1
  import type { Five } from '@realsee/five';
2
2
  import { type AnyPosition } from './positionToVector3';
3
3
  import * as THREE from 'three';
4
+ interface LightTagConfig {
5
+ wrapper?: HTMLElement;
6
+ positionsForRotate?: AnyPosition[];
7
+ namespace?: string;
8
+ }
4
9
  export declare class LightTag {
10
+ /**
11
+ * @description 单个标签 dom
12
+ */
5
13
  container: HTMLDivElement;
6
14
  visible: boolean;
7
15
  enabled: boolean;
16
+ /**
17
+ * @description 标签容器的父容器
18
+ * @default this.five.getElement()?.parentElement
19
+ */
8
20
  wrapper: HTMLElement;
9
21
  positionsForRotate?: THREE.Vector3[];
10
22
  /**
@@ -17,6 +29,9 @@ export declare class LightTag {
17
29
  * @default true
18
30
  */
19
31
  simulate3D: boolean;
32
+ /**
33
+ * @description 标签的容器,根据 namespace 区分
34
+ */
20
35
  private tagWrapper;
21
36
  private five;
22
37
  private originPosition?;
@@ -25,10 +40,7 @@ export declare class LightTag {
25
40
  private config;
26
41
  private fiveUtil;
27
42
  private disposers;
28
- constructor(five: Five, position?: AnyPosition, config?: {
29
- wrapper?: HTMLElement;
30
- positionsForRotate?: AnyPosition[];
31
- });
43
+ constructor(five: Five, position?: AnyPosition, config?: LightTagConfig);
32
44
  show(): void;
33
45
  hide(): void;
34
46
  enable(): void;
@@ -41,6 +53,5 @@ export declare class LightTag {
41
53
  private onFiveEveryReady;
42
54
  private addResizeListener;
43
55
  }
44
- export declare function tag(five: Five, position: AnyPosition, config?: {
45
- wrapper?: HTMLElement;
46
- }): LightTag;
56
+ export declare function tag(five: Five, position: AnyPosition, config?: LightTagConfig): LightTag;
57
+ export {};
@@ -1,56 +1,68 @@
1
- var P = Object.defineProperty;
2
- var g = (h, t, e) => t in h ? P(h, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[t] = e;
3
- var s = (h, t, e) => (g(h, typeof t != "symbol" ? t + "" : t, e), e);
1
+ var u = Object.defineProperty;
2
+ var P = (l, t, e) => t in l ? u(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
3
+ var i = (l, t, e) => (P(l, typeof t != "symbol" ? t + "" : t, e), e);
4
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 U } from "./five/getFiveModel.js";
8
- import { FiveUtil as x } from "./Utils/FiveUtil.js";
5
+ import * as g from "three";
6
+ import { vector3ToScreen as f } from "./five/vector3ToScreen.js";
7
+ import { getFiveModel as b } from "./five/getFiveModel.js";
8
+ import { FiveUtil as U } from "./Utils/FiveUtil.js";
9
9
  import { _raycaster as m } from "./three/temp.js";
10
- import { resizeObserver as E } from "./dom/resizeObserver.js";
11
- const v = "LightTagContainer_shgjakdhwakjdhsja", w = new b.Vector2();
12
- class R {
10
+ import { resizeObserver as x } from "./dom/resizeObserver.js";
11
+ const E = new g.Vector2();
12
+ class w {
13
13
  constructor(t, e, o) {
14
- s(this, "container");
15
- s(this, "visible", !1);
16
- s(this, "enabled", !1);
17
- s(this, "wrapper");
18
- s(this, "positionsForRotate");
14
+ /**
15
+ * @description 单个标签 dom
16
+ */
17
+ i(this, "container");
18
+ i(this, "visible", !1);
19
+ i(this, "enabled", !1);
20
+ /**
21
+ * @description 标签容器的父容器
22
+ * @default this.five.getElement()?.parentElement
23
+ */
24
+ i(this, "wrapper");
25
+ i(this, "positionsForRotate");
19
26
  /**
20
27
  * @description 碰撞检测
21
28
  * @default true
22
29
  */
23
- s(this, "intersectCheck", !0);
30
+ i(this, "intersectCheck", !0);
24
31
  /**
25
32
  * @description 模拟3D
26
33
  * @default true
27
34
  */
28
- s(this, "simulate3D", !1);
29
- s(this, "tagWrapper");
30
- s(this, "five");
31
- s(this, "originPosition");
32
- s(this, "transformedPosition");
33
- s(this, "disposer");
34
- s(this, "config");
35
- s(this, "fiveUtil");
36
- s(this, "disposers", []);
37
- s(this, "onCameraUpdate", () => {
35
+ i(this, "simulate3D", !1);
36
+ /**
37
+ * @description 标签的容器,根据 namespace 区分
38
+ */
39
+ i(this, "tagWrapper");
40
+ i(this, "five");
41
+ i(this, "originPosition");
42
+ i(this, "transformedPosition");
43
+ i(this, "disposer");
44
+ i(this, "config");
45
+ i(this, "fiveUtil");
46
+ i(this, "disposers", []);
47
+ i(this, "onCameraUpdate", () => {
38
48
  this.visible !== !1 && this.updateScreenPosition();
39
49
  });
40
- s(this, "onFiveEveryReady", () => {
50
+ i(this, "onFiveEveryReady", () => {
41
51
  var t;
42
52
  if (this.intersectCheck && this.visible && this.five.state.mode !== "Panorama") {
43
- let e = 0.01;
44
- this.fiveUtil.workUtil.fromType === "poincare" && (e = 0.05), m.set(this.five.camera.position, this.transformedPosition.clone().sub(this.five.camera.position));
45
- const o = (t = U(this.five).intersectRaycaster(m)) == null ? void 0 : t[0];
46
- (o == null ? void 0 : o.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");
53
+ let e = !1, o = 0.01;
54
+ this.fiveUtil.workUtil.fromType === "poincare" && (o = 0.05);
55
+ const a = this.transformedPosition.clone().sub(this.five.camera.position).normalize();
56
+ m.set(this.five.camera.position, a);
57
+ const n = (t = b(this.five).intersectRaycaster(m)) == null ? void 0 : t[0];
58
+ n ? e = (n == null ? void 0 : n.distance) + o > this.transformedPosition.distanceTo(this.five.camera.position) : e = !0, e ? (this.container.style.opacity = "1", this.container.style.pointerEvents = "auto") : (this.container.style.opacity = "0", this.container.style.pointerEvents = "none");
47
59
  }
48
60
  });
49
- var n, r, a;
50
- this.five = t, this.fiveUtil = (n = t.__fiveUtil__) != null ? n : t.__fiveUtil__ = new x(t), this.originPosition = e ? d(e).clone() : void 0, this.transformedPosition = (r = this.originPosition) == null ? void 0 : r.clone(), this.positionsForRotate = (a = o == null ? void 0 : o.positionsForRotate) == null ? void 0 : a.map((i) => d(i).clone()), this.container = (() => {
51
- const i = document.createElement("div");
52
- return i.style.width = "0", i.style.height = "0", i.style.position = "absolute", i.style.transition = "opacity 0.2s linear", i;
53
- })(), this.config = o != null ? o : {}, this.enable(), this.show(), this.addResizeListener();
61
+ var a, n, h;
62
+ this.five = t, this.fiveUtil = (a = t.__fiveUtil__) != null ? a : t.__fiveUtil__ = new U(t), this.originPosition = e ? d(e).clone() : void 0, this.transformedPosition = (n = this.originPosition) == null ? void 0 : n.clone(), this.positionsForRotate = (h = o == null ? void 0 : o.positionsForRotate) == null ? void 0 : h.map((s) => d(s).clone()), this.config = o != null ? o : {}, this.container = (() => {
63
+ const s = document.createElement("div");
64
+ return s.classList.add("light-tag"), s.style.width = "0", s.style.height = "0", s.style.position = "absolute", s.style.transition = "opacity 0.2s linear", s;
65
+ })(), this.enable(), this.show(), this.addResizeListener();
54
66
  }
55
67
  show() {
56
68
  this.visible = !0, this.container.style.opacity = "1", this.container.style.pointerEvents = "auto", this.onCameraUpdate();
@@ -59,21 +71,28 @@ class R {
59
71
  this.visible = !1, this.container.style.opacity = "0", this.container.style.pointerEvents = "none";
60
72
  }
61
73
  enable() {
62
- var o, n, r, a;
74
+ var a, n, h, s, c;
63
75
  if (this.enabled)
64
76
  return;
65
- this.enabled = !0, this.wrapper = (r = (n = this.config.wrapper) != null ? n : (o = this.five.getElement()) == null ? void 0 : o.parentElement) != null ? r : document.body, this.tagWrapper || (this.tagWrapper = (a = document.getElementById(v)) != null ? a : (() => {
66
- const i = document.createElement("div");
67
- 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.style.zIndex = "1", i;
68
- })(), this.wrapper.contains(this.tagWrapper) || this.wrapper.appendChild(this.tagWrapper)), this.tagWrapper.appendChild(this.container);
69
- let t = !1;
70
- const e = () => {
71
- t || (t = !0, this.five.ready().then(() => {
72
- this.onFiveEveryReady(), t = !1;
77
+ this.enabled = !0, this.wrapper = (h = (n = this.config.wrapper) != null ? n : (a = this.five.getElement()) == null ? void 0 : a.parentElement) != null ? h : document.body;
78
+ const t = `light-tag-wrapper-${(c = (s = this.config) == null ? void 0 : s.namespace) != null ? c : "default"}`;
79
+ if (!this.tagWrapper) {
80
+ let p = Array.from(this.wrapper.children).find((r) => r.id === t);
81
+ if (!p) {
82
+ const r = document.createElement("div");
83
+ p = r, r.id = t, r.style.position = "absolute", r.style.overflow = "hidden", r.style.top = "0", r.style.left = "0", r.style.width = "100%", r.style.height = "100%", r.style.pointerEvents = "none", r.style.zIndex = "1", this.wrapper.appendChild(p);
84
+ }
85
+ this.tagWrapper = p;
86
+ }
87
+ this.tagWrapper.appendChild(this.container);
88
+ let e = !1;
89
+ const o = () => {
90
+ e || (e = !0, this.five.ready().then(() => {
91
+ this.onFiveEveryReady(), e = !1;
73
92
  }));
74
93
  };
75
- this.five.on("cameraUpdate", e), this.five.on("cameraUpdate", this.onCameraUpdate), this.disposer = () => {
76
- this.five.off("cameraUpdate", e), this.five.off("cameraUpdate", this.onCameraUpdate);
94
+ this.five.on("cameraUpdate", o), this.five.on("cameraUpdate", this.onCameraUpdate), this.disposer = () => {
95
+ this.five.off("cameraUpdate", o), this.five.off("cameraUpdate", this.onCameraUpdate);
77
96
  };
78
97
  }
79
98
  disable() {
@@ -95,7 +114,7 @@ class R {
95
114
  this.container.style.left = "-100%", this.container.style.top = "-100%";
96
115
  return;
97
116
  }
98
- const t = this.five.renderer.getSize(w), e = l(this.five.camera, this.transformedPosition, t);
117
+ const t = this.five.renderer.getSize(E), e = f(this.five.camera, this.transformedPosition, t);
99
118
  if (!e) {
100
119
  this.container.style.left = "-100%", this.container.style.top = "-100%";
101
120
  return;
@@ -103,31 +122,31 @@ class R {
103
122
  const o = (() => {
104
123
  if (!this.simulate3D)
105
124
  return 1;
106
- const r = 2 * Math.tan(0.5 * this.five.camera.fov / 180 * Math.PI), a = this.transformedPosition.distanceTo(this.five.camera.position);
107
- return Math.max(Math.min(1 - r * a / 40, 1), 0.5);
108
- })(), n = (() => {
125
+ const n = 2 * Math.tan(0.5 * this.five.camera.fov / 180 * Math.PI), h = this.transformedPosition.distanceTo(this.five.camera.position);
126
+ return Math.max(Math.min(1 - n * h / 40, 1), 0.5);
127
+ })(), a = (() => {
109
128
  if (this.positionsForRotate === void 0 || this.positionsForRotate.length !== 2)
110
129
  return 0;
111
- const [r, a] = this.positionsForRotate, i = l(this.five.camera, r, t), c = l(this.five.camera, a, t);
112
- if (!i || !c)
130
+ const [n, h] = this.positionsForRotate, s = f(this.five.camera, n, t), c = f(this.five.camera, h, t);
131
+ if (!s || !c)
113
132
  return 0;
114
- const p = i.leftPx > c.leftPx ? c : i, f = i.leftPx > c.leftPx ? i : c, y = f.leftPx - p.leftPx, u = f.topPx - p.topPx;
115
- return Math.atan2(u, y) * (180 / Math.PI);
133
+ const p = s.leftPx > c.leftPx ? c : s, r = s.leftPx > c.leftPx ? s : c, v = r.leftPx - p.leftPx, y = r.topPx - p.topPx;
134
+ return Math.atan2(y, v) * (180 / Math.PI);
116
135
  })();
117
- this.container.style.left = e.leftPx + "px", this.container.style.top = e.topPx + "px", this.container.style.transformOrigin = "center", this.container.style.transform = `scale(${o})`, n && (this.container.style.transform += ` rotate(${n}deg)`);
136
+ this.container.style.left = e.leftPx + "px", this.container.style.top = e.topPx + "px", this.container.style.transformOrigin = "center", this.container.style.transform = `scale(${o})`, a && (this.container.style.transform += ` rotate(${a}deg)`);
118
137
  }
119
138
  addResizeListener() {
120
139
  const t = this.five.getElement();
121
140
  if (t) {
122
- const { observe: e, unobserve: o } = E(this.onCameraUpdate, t);
141
+ const { observe: e, unobserve: o } = x(this.onCameraUpdate, t);
123
142
  e(), this.disposers.push(o);
124
143
  }
125
144
  }
126
145
  }
127
- function z(h, t, e) {
128
- return new R(h, t, e);
146
+ function S(l, t, e) {
147
+ return new w(l, t, e);
129
148
  }
130
149
  export {
131
- R as LightTag,
132
- z as tag
150
+ w as LightTag,
151
+ S as tag
133
152
  };
@@ -1,9 +1,9 @@
1
1
  import "hammerjs";
2
2
  import "three";
3
3
  import "three/examples/jsm/renderers/CSS3DRenderer";
4
+ import "../tag.js";
4
5
  import "@realsee/five/line";
5
6
  import "../../vendor/three/examples/jsm/lines/LineGeometry.js";
6
- import "../tag.js";
7
7
  import "./core/Sphere.js";
8
8
  import "animejs";
9
9
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@realsee/dnalogel",
3
- "version": "3.50.13",
3
+ "version": "3.50.14",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./libs/index.js",
6
6
  "types": "./libs/index.d.ts",