@realsee/dnalogel 3.44.3 → 3.44.5

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.
@@ -1,16 +1,55 @@
1
- var l = Object.defineProperty;
2
- var t = (s, i, e) => i in s ? l(s, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[i] = e;
3
- var n = (s, i, e) => (t(s, typeof i != "symbol" ? i + "" : i, e), e);
4
- import { safeObj as a } from "../../shared-utils/safeObj.js";
5
- class r {
1
+ var c = Object.defineProperty;
2
+ var a = (t, i, e) => i in t ? c(t, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[i] = e;
3
+ var o = (t, i, e) => (a(t, typeof i != "symbol" ? i + "" : i, e), e);
4
+ import { safeObj as g } from "../../shared-utils/safeObj.js";
5
+ import { addDebugPoints as d } from "./addDebugPoints.js";
6
+ import "three";
7
+ import "../../shared-utils/positionToVector3.js";
8
+ class y {
6
9
  constructor(i) {
7
- n(this, "plugin");
10
+ o(this, "plugin");
11
+ o(this, "logBinded", !1);
8
12
  this.plugin = i;
9
13
  }
14
+ get debug() {
15
+ return this.plugin.debug;
16
+ }
17
+ addDebugPoints() {
18
+ try {
19
+ d(this.plugin.five, this.plugin.tags);
20
+ } catch (i) {
21
+ console.error(i);
22
+ }
23
+ }
24
+ bindLog() {
25
+ if (this.logBinded)
26
+ return;
27
+ this.logBinded = !0;
28
+ const i = (e) => {
29
+ Object.getOwnPropertyNames(e).forEach((n) => {
30
+ typeof e[n] == "function" && (e[n] = new Proxy(e[n], {
31
+ apply: (s, l, r) => (["render"].includes(n) || this.addLog(n, ...r), s.apply(l, r))
32
+ }));
33
+ });
34
+ };
35
+ i(this.plugin), i(this.plugin.constructor.prototype);
36
+ }
37
+ addLog(i, ...e) {
38
+ if (this.debug) {
39
+ let n = new Error().stack;
40
+ console.debug(
41
+ `%cPanoTagPlugin%c${i}`,
42
+ "background-color: #35e0ed; color: black; padding:0 6px; border-radius: 3px",
43
+ "padding: 0 3px; color: #f3f47c",
44
+ ...e,
45
+ { stack: n }
46
+ );
47
+ }
48
+ }
10
49
  closeIntersectRaycaster() {
11
50
  this.plugin.tags.forEach((i) => {
12
51
  var e;
13
- a((e = i == null ? void 0 : i.initialConfig) == null ? void 0 : e.visibleConfig).intersectRaycaster && (i.initialConfig.visibleConfig.intersectRaycaster.enabled = !1);
52
+ g((e = i == null ? void 0 : i.initialConfig) == null ? void 0 : e.visibleConfig).intersectRaycaster && (i.initialConfig.visibleConfig.intersectRaycaster.enabled = !1);
14
53
  }), this.plugin.changeGlobalConfig({
15
54
  visibleConfig: {
16
55
  intersectRaycaster: {
@@ -21,5 +60,5 @@ class r {
21
60
  }
22
61
  }
23
62
  export {
24
- r as DebugUtil
63
+ y as DebugUtil
25
64
  };
@@ -16,7 +16,7 @@ let c = class {
16
16
  /**
17
17
  * @realsee/dnalogel 版本号
18
18
  */
19
- e(this, "VERSION", "3.44.3");
19
+ e(this, "VERSION", "3.44.5");
20
20
  e(this, "NAME");
21
21
  e(this, "five");
22
22
  e(this, "workUtil");
package/libs/index.js CHANGED
@@ -276,7 +276,6 @@ import "./vendor/gl-vec2/dot.js";
276
276
  import "./shared-utils/math/intersecting.js";
277
277
  import "./shared-utils/five/mode.js";
278
278
  import "./shared-utils/three/blink.js";
279
- import "./PanoTagPlugin/utils/addDebugPoints.js";
280
279
  import "./PanoTagPlugin/utils/tag/tagCheck.js";
281
280
  import "./PanoTagPlugin/utils/debounce.js";
282
281
  import "./PanoTagPlugin/utils/throttle.js";
@@ -376,6 +375,7 @@ import "./PanoTagPlugin/utils/normalPositionToPositions.js";
376
375
  import "./shared-utils/five/FiveDomEvents.js";
377
376
  import "./shared-utils/three/THREERaycaster.js";
378
377
  import "./PanoTagPlugin/utils/DebugUtil.js";
378
+ import "./PanoTagPlugin/utils/addDebugPoints.js";
379
379
  import "./PanoTagPlugin/controller/Tag/PointTag.js";
380
380
  import "./PanoTagPlugin/utils/requestIdleCallback.js";
381
381
  import "./PanoTagPlugin/controller/Tag/PlaneTag.js";
@@ -1,6 +1,6 @@
1
1
  function A() {
2
2
  console.debug(
3
- "%c %c@realsee/dnalogel %cv3.44.3",
3
+ "%c %c@realsee/dnalogel %cv3.44.5",
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",
@@ -2,22 +2,22 @@ var P = Object.defineProperty, E = Object.defineProperties;
2
2
  var S = Object.getOwnPropertyDescriptors;
3
3
  var p = Object.getOwnPropertySymbols;
4
4
  var w = Object.prototype.hasOwnProperty, C = Object.prototype.propertyIsEnumerable;
5
- var f = (n, s, e) => s in n ? P(n, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[s] = e, l = (n, s) => {
5
+ var f = (o, s, e) => s in o ? P(o, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[s] = e, l = (o, s) => {
6
6
  for (var e in s || (s = {}))
7
- w.call(s, e) && f(n, e, s[e]);
7
+ w.call(s, e) && f(o, e, s[e]);
8
8
  if (p)
9
9
  for (var e of p(s))
10
- C.call(s, e) && f(n, e, s[e]);
11
- return n;
12
- }, c = (n, s) => E(n, S(s));
13
- var i = (n, s, e) => (f(n, typeof s != "symbol" ? s + "" : s, e), e);
14
- import { PointSelectorHelper as b } from "./utils/PointSelectorHelper.js";
15
- import { isTouchDevice as y } from "../../isTouchDevice.js";
10
+ C.call(s, e) && f(o, e, s[e]);
11
+ return o;
12
+ }, c = (o, s) => E(o, S(s));
13
+ var i = (o, s, e) => (f(o, typeof s != "symbol" ? s + "" : s, e), e);
14
+ import { PointSelectorHelper as y } from "./utils/PointSelectorHelper.js";
15
+ import { isTouchDevice as b } from "../../isTouchDevice.js";
16
16
  import H from "hammerjs";
17
17
  import { Subscribe as F } from "../../Subscribe.js";
18
18
  import { getIntersectByNdcPosition as d } from "../../five/getPosition.js";
19
19
  const h = () => !1;
20
- class B extends F {
20
+ class M extends F {
21
21
  constructor(e, t) {
22
22
  var a, u;
23
23
  super();
@@ -122,24 +122,24 @@ class B extends F {
122
122
  }
123
123
  this.onEnter(), this.five.getElement().style.cursor = "";
124
124
  const t = l({}, e);
125
- let o = !1;
125
+ let n = !1;
126
126
  if (typeof this.adherePoints == "function" && typeof this.adherePointsRadius == "number") {
127
127
  for (const r of this.adherePoints({ intersection: e, pointSelectorInstance: this }))
128
128
  if (r.distanceTo(e.point) < this.adherePointsRadius) {
129
- t.point = r.clone(), o = !0;
129
+ t.point = r.clone(), n = !0;
130
130
  break;
131
131
  }
132
132
  }
133
- this.pointSelectorHelper.updateWithIntersect(t, { emitEvent: !1 }), this.emit("intersectionUpdate", t, o);
133
+ this.pointSelectorHelper.updateWithIntersect(t, { emitEvent: !1 }), this.emit("intersectionUpdate", t, n);
134
134
  });
135
135
  i(this, "mousePositionToNdcPosition", (e) => {
136
136
  const t = this.five.getElement();
137
137
  if (!t)
138
138
  return null;
139
- const { top: o, left: r, width: a, height: u } = t.getBoundingClientRect(), { clientX: m, clientY: v } = e;
139
+ const { top: n, left: r, width: a, height: u } = t.getBoundingClientRect(), { clientX: m, clientY: v } = e;
140
140
  return {
141
141
  x: (m - r) / a,
142
- y: 1 - (v - o) / u
142
+ y: 1 - (v - n) / u
143
143
  };
144
144
  });
145
145
  i(this, "onFiveWantsPanGesture", () => {
@@ -153,13 +153,13 @@ class B extends F {
153
153
  this.emit("intersectionUpdate", e);
154
154
  });
155
155
  this.five = e, this.config = t != null ? t : {};
156
- const o = (a = t == null ? void 0 : t.mode) != null ? a : "auto";
157
- o === "auto" ? this.mode = y ? "fixed" : "cursor" : this.mode = o;
156
+ const n = (a = t == null ? void 0 : t.mode) != null ? a : "auto";
157
+ n === "auto" ? this.mode = b ? "fixed" : "cursor" : this.mode = n;
158
158
  const r = {
159
159
  autoFixPCPosition: this.mode === "cursor",
160
160
  initialPosition: this.mode === "fixed" ? { left: "35%", top: "20%" } : void 0
161
161
  };
162
- this.pointSelectorHelper = new b(e, c(l({}, t == null ? void 0 : t.helper), {
162
+ this.pointSelectorHelper = new y(e, c(l({}, t == null ? void 0 : t.helper), {
163
163
  magnifierParams: l(l({}, r), (u = t == null ? void 0 : t.helper) == null ? void 0 : u.magnifierParams)
164
164
  })), this.pointSelectorHelper.hide();
165
165
  }
@@ -188,7 +188,7 @@ class B extends F {
188
188
  return;
189
189
  this.enabled = !1, this.pointSelectorHelper.disable(), this.five.getElement().style.cursor = "";
190
190
  const e = this.five.getElement();
191
- this.five.off("wantsPanGesture", this.onFiveWantsPanGesture), this.five.off("wantsMoveToPano", h), this.five.off("wantsChangeMode", h), this.five.off("wantsTapGesture", h), this.five.helperVisible = this.lastFiveHelperVisible, e == null || e.removeEventListener("mousemove", this.updateByMousePosition), e == null || e.removeEventListener("mouseenter", this.onEnter), e == null || e.removeEventListener("mouseout", this.onLeave), this.hammer.off("tap", this.onTap), this.hammer.off("pan", this.onPan), this.hammer.off("press", this.onPress), this.hammer.off("panend", this.onPanEnd), this.five.off("panoArrived", this.renderScreenCenter), this.five.off("panGesture", this.renderScreenCenter), this.five.off("interiaPan", this.renderScreenCenter), this.pointSelectorHelper.hooks.off("intersectionUpdate", this.emitIntersectionUpdate), this.emit("disable");
191
+ this.five.off("wantsPanGesture", this.onFiveWantsPanGesture), this.five.off("wantsMoveToPano", h), this.five.off("wantsChangeMode", h), this.five.off("wantsTapGesture", h), this.five.helperVisible = this.lastFiveHelperVisible, e == null || e.removeEventListener("mousemove", this.updateByMousePosition), e == null || e.removeEventListener("wheel", this.updateByMousePosition), e == null || e.removeEventListener("mouseenter", this.onEnter), e == null || e.removeEventListener("mouseout", this.onLeave), this.hammer.off("tap", this.onTap), this.hammer.off("pan", this.onPan), this.hammer.off("press", this.onPress), this.hammer.off("panend", this.onPanEnd), this.five.off("panoArrived", this.renderScreenCenter), this.five.off("panGesture", this.renderScreenCenter), this.five.off("interiaPan", this.renderScreenCenter), this.pointSelectorHelper.hooks.off("intersectionUpdate", this.emitIntersectionUpdate), this.emit("disable");
192
192
  }
193
193
  dispose() {
194
194
  this.disable(), this.pointSelectorHelper.dispose();
@@ -198,5 +198,5 @@ class B extends F {
198
198
  }
199
199
  }
200
200
  export {
201
- B as PointSelector
201
+ M as PointSelector
202
202
  };
@@ -1,10 +1,10 @@
1
- var a = Object.defineProperty;
2
- var i = (r, n, e) => n in r ? a(r, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[n] = e;
3
- var s = (r, n, e) => (i(r, typeof n != "symbol" ? n + "" : n, e), e);
1
+ var i = Object.defineProperty;
2
+ var a = (n, r, e) => r in n ? i(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
3
+ var s = (n, r, e) => (a(n, typeof r != "symbol" ? r + "" : r, e), e);
4
4
  import * as t from "three";
5
5
  import { POINT_HELPER_TEXTURE_URL as l } from "../../Assets/index.js";
6
- import { CSS3DObjectPlus as c } from "../../../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
7
- import { rangePieceImg as h } from "./html.js";
6
+ import { CSS3DObjectPlus as h } from "../../../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
7
+ import { rangePieceImg as c } from "./html.js";
8
8
  import { initialCSS3DRender as d } from "../../../five/initialCSS3DRender.js";
9
9
  const p = `
10
10
  varying vec2 vUv;
@@ -23,37 +23,37 @@ void main() {
23
23
  }
24
24
  `;
25
25
  function M() {
26
- const r = new t.PlaneGeometry(0.4, 0.4), n = l, e = new t.TextureLoader().load(n);
26
+ const n = new t.PlaneGeometry(0.4, 0.4), r = l, e = new t.TextureLoader().load(r);
27
27
  e.encoding = t.sRGBEncoding, e.minFilter = t.LinearFilter;
28
28
  const o = new t.MeshBasicMaterial({
29
29
  map: e,
30
30
  transparent: !0,
31
31
  depthTest: !1
32
32
  });
33
- return new t.Mesh(r, o);
33
+ return new t.Mesh(n, o);
34
34
  }
35
35
  function m() {
36
- const r = new t.CurvePath();
37
- r.add(new t.LineCurve3(new t.Vector3(0, 0, 0), new t.Vector3(0, 0, 0.1)));
38
- const n = new t.TubeGeometry(r, 8, 3e-3), e = new t.ShaderMaterial({
36
+ const n = new t.CurvePath();
37
+ n.add(new t.LineCurve3(new t.Vector3(0, 0, 0), new t.Vector3(0, 0, 0.1)));
38
+ const r = new t.TubeGeometry(n, 8, 3e-3), e = new t.ShaderMaterial({
39
39
  vertexShader: p,
40
40
  fragmentShader: u,
41
41
  depthTest: !1,
42
42
  transparent: !0
43
43
  });
44
- return new t.Mesh(n, e);
44
+ return new t.Mesh(r, e);
45
45
  }
46
46
  function v() {
47
- const r = new t.SphereGeometry(0.01, 20, 20), n = new t.MeshBasicMaterial({
47
+ const n = new t.SphereGeometry(0.01, 20, 20), r = new t.MeshBasicMaterial({
48
48
  color: 10349931,
49
49
  depthTest: !1,
50
50
  transparent: !0,
51
51
  side: t.DoubleSide
52
- }), e = new t.Mesh(r, n);
52
+ }), e = new t.Mesh(n, r);
53
53
  return e.position.set(0, 0, 0.1), e;
54
54
  }
55
55
  function w() {
56
- const n = new c({
56
+ const r = new h({
57
57
  pointerEvents: "none",
58
58
  cornerPoints: [
59
59
  new t.Vector3(-0.2, 0.2, 0),
@@ -62,7 +62,7 @@ function w() {
62
62
  new t.Vector3(0.2, 0.2, 0)
63
63
  ]
64
64
  }), e = document.createElement("div");
65
- return e.style.width = "100%", e.style.height = "100%", e.style.backgroundImage = `url(${h})`, e.style.backgroundSize = "100%", e.style.backgroundRepeat = "no-repeat", n.container.appendChild(e), n;
65
+ return e.style.width = "100%", e.style.height = "100%", e.style.backgroundImage = `url(${c})`, e.style.backgroundSize = "100%", e.style.backgroundRepeat = "no-repeat", r.container.appendChild(e), r;
66
66
  }
67
67
  class x extends t.Object3D {
68
68
  constructor(e) {
@@ -80,10 +80,10 @@ class x extends t.Object3D {
80
80
  this.position.copy(e.point), this.lookAt(o);
81
81
  }
82
82
  show() {
83
- this.visible = !0;
83
+ this.visible = !0, this.borderMesh.parent || this.add(this.borderMesh);
84
84
  }
85
85
  hide() {
86
- this.visible = !1;
86
+ this.visible = !1, this.remove(this.borderMesh);
87
87
  }
88
88
  dispose() {
89
89
  var e;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@realsee/dnalogel",
3
- "version": "3.44.3",
3
+ "version": "3.44.5",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./libs/index.js",
6
6
  "types": "./libs/index.d.ts",
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "devDependencies": {
44
44
  "@babel/core": "^7.22.9",
45
- "@realsee/five": "6.2.0-alpha.1",
45
+ "@realsee/five": "6.1.2",
46
46
  "@sveltejs/vite-plugin-svelte": "^2.4.2",
47
47
  "@tsconfig/svelte": "^4.0.1",
48
48
  "@tweenjs/tween.js": "^23.1.1",