@realsee/dnalogel 3.49.14-alpha.0 → 3.50.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.
@@ -72,7 +72,6 @@ export declare class PointSelector extends Subscribe<EventMap> {
72
72
  private _outOfFive;
73
73
  private set enabled(value);
74
74
  private _enabled;
75
- private hammer?;
76
75
  private mode;
77
76
  /** 长按屏幕的动作触发后为true,手指抬起后为false */
78
77
  private pressDown;
@@ -80,6 +79,8 @@ export declare class PointSelector extends Subscribe<EventMap> {
80
79
  private adherePoints;
81
80
  /** 吸附点的半径 */
82
81
  private adherePointsRadius;
82
+ /** 有值时表明处于按压检查阶段 */
83
+ private setPressDown?;
83
84
  private lastFiveHelperVisible?;
84
85
  private lastIntersection?;
85
86
  private mousePosition;
@@ -108,19 +109,9 @@ export declare class PointSelector extends Subscribe<EventMap> {
108
109
  */
109
110
  private onLeave;
110
111
  private onClick;
111
- /**
112
- * 1. 如果之前没有长按行为「即没有长按点时」-> 滑动全景
113
- * 2. 如果有长按点,把长按点位置更新为当前位置
114
- */
115
- private onPan;
116
- /**
117
- * @description: 长按屏幕后,更新长按点的位置
118
- */
119
- private onPress;
120
- /**
121
- * @description: 手指抬起后,重置pressDown状态
122
- */
123
- private onPanEnd;
112
+ private onTouchStart;
113
+ private onTouchMove;
114
+ private onTouchEnd;
124
115
  private updateByMousePosition;
125
116
  /**
126
117
  * @description: 根据鼠标位置计算焦点位置并更新
@@ -11,7 +11,7 @@ var p = (e, i, t) => i in e ? g(e, i, { enumerable: !0, configurable: !0, writab
11
11
  return e;
12
12
  }, m = (e, i) => u(e, y(i));
13
13
  var c = (e, i, t) => (p(e, typeof i != "symbol" ? i + "" : i, t), t);
14
- var b = (e, i, t) => new Promise((h, n) => {
14
+ var M = (e, i, t) => new Promise((h, n) => {
15
15
  var r = (s) => {
16
16
  try {
17
17
  o(t.next(s));
@@ -27,7 +27,7 @@ var b = (e, i, t) => new Promise((h, n) => {
27
27
  }, o = (s) => s.done ? h(s.value) : Promise.resolve(s.value).then(r, f);
28
28
  o((t = t.apply(e, i)).next());
29
29
  });
30
- import { PointMesh as M } from "../../Meshes/Point.js";
30
+ import { PointMesh as b } from "../../Meshes/Point.js";
31
31
  import { BaseObject as v } from "../Base/index.js";
32
32
  import { PointEditor as x } from "./Editor.js";
33
33
  import { vector3ToArray as E } from "../../../shared-utils/three/vector3ToArray.js";
@@ -36,7 +36,7 @@ class C extends v {
36
36
  super(t, h);
37
37
  c(this, "type", "Point");
38
38
  c(this, "pointMesh");
39
- this.editor = new x(this), t && (this.pointMesh = new M(a(a({}, t.style), t)), this.add(this.pointMesh));
39
+ this.editor = new x(this), t && (this.pointMesh = new b(a(a({}, t.style), t)), this.add(this.pointMesh));
40
40
  }
41
41
  get data() {
42
42
  return m(a({}, this.baseData), {
@@ -67,8 +67,8 @@ class C extends v {
67
67
  * @description: 创建点
68
68
  */
69
69
  create(t) {
70
- return b(this, null, function* () {
71
- this.pointMesh && this.remove(this.pointMesh), this.add(this.pointMesh = new M(t)), yield U(this.pointMesh, this.pointSelector), this.editor.enable();
70
+ return M(this, null, function* () {
71
+ this.pointMesh && this.remove(this.pointMesh), this.add(this.pointMesh = new b(t)), yield U(this.pointMesh, this.pointSelector);
72
72
  });
73
73
  }
74
74
  }
@@ -18,7 +18,7 @@ let P = class {
18
18
  /**
19
19
  * @realsee/dnalogel 版本号
20
20
  */
21
- i(this, "VERSION", "3.49.14-alpha.0");
21
+ i(this, "VERSION", "3.50.0");
22
22
  i(this, "NAME");
23
23
  i(this, "five");
24
24
  i(this, "workUtil");
@@ -1,6 +1,6 @@
1
1
  function A() {
2
2
  console.debug(
3
- "%c %c@realsee/dnalogel %cv3.49.14-alpha.0",
3
+ "%c %c@realsee/dnalogel %cv3.50.0",
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",
@@ -72,7 +72,6 @@ export declare class PointSelector extends Subscribe<EventMap> {
72
72
  private _outOfFive;
73
73
  private set enabled(value);
74
74
  private _enabled;
75
- private hammer?;
76
75
  private mode;
77
76
  /** 长按屏幕的动作触发后为true,手指抬起后为false */
78
77
  private pressDown;
@@ -80,6 +79,8 @@ export declare class PointSelector extends Subscribe<EventMap> {
80
79
  private adherePoints;
81
80
  /** 吸附点的半径 */
82
81
  private adherePointsRadius;
82
+ /** 有值时表明处于按压检查阶段 */
83
+ private setPressDown?;
83
84
  private lastFiveHelperVisible?;
84
85
  private lastIntersection?;
85
86
  private mousePosition;
@@ -108,19 +109,9 @@ export declare class PointSelector extends Subscribe<EventMap> {
108
109
  */
109
110
  private onLeave;
110
111
  private onClick;
111
- /**
112
- * 1. 如果之前没有长按行为「即没有长按点时」-> 滑动全景
113
- * 2. 如果有长按点,把长按点位置更新为当前位置
114
- */
115
- private onPan;
116
- /**
117
- * @description: 长按屏幕后,更新长按点的位置
118
- */
119
- private onPress;
120
- /**
121
- * @description: 手指抬起后,重置pressDown状态
122
- */
123
- private onPanEnd;
112
+ private onTouchStart;
113
+ private onTouchMove;
114
+ private onTouchEnd;
124
115
  private updateByMousePosition;
125
116
  /**
126
117
  * @description: 根据鼠标位置计算焦点位置并更新
@@ -1,26 +1,25 @@
1
- var b = Object.defineProperty, y = Object.defineProperties;
1
+ var w = Object.defineProperty, b = Object.defineProperties;
2
2
  var E = Object.getOwnPropertyDescriptors;
3
- var p = Object.getOwnPropertySymbols;
4
- var I = Object.prototype.hasOwnProperty, w = Object.prototype.propertyIsEnumerable;
5
- var f = (n, s, e) => s in n ? b(n, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[s] = e, l = (n, s) => {
3
+ var f = Object.getOwnPropertySymbols;
4
+ var I = Object.prototype.hasOwnProperty, H = Object.prototype.propertyIsEnumerable;
5
+ var p = (n, s, e) => s in n ? w(n, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[s] = e, l = (n, s) => {
6
6
  for (var e in s || (s = {}))
7
- I.call(s, e) && f(n, e, s[e]);
8
- if (p)
9
- for (var e of p(s))
10
- w.call(s, e) && f(n, e, s[e]);
7
+ I.call(s, e) && p(n, e, s[e]);
8
+ if (f)
9
+ for (var e of f(s))
10
+ H.call(s, e) && p(n, e, s[e]);
11
11
  return n;
12
- }, m = (n, s) => y(n, E(s));
13
- var i = (n, s, e) => (f(n, typeof s != "symbol" ? s + "" : s, e), e);
14
- import { PointSelectorHelper as H } from "./utils/PointSelectorHelper.js";
15
- import { isTouchDevice as v } from "../../isTouchDevice.js";
16
- import M from "hammerjs";
12
+ }, v = (n, s) => b(n, E(s));
13
+ var i = (n, s, e) => (p(n, typeof s != "symbol" ? s + "" : s, e), e);
14
+ import { PointSelectorHelper as y } from "./utils/PointSelectorHelper.js";
15
+ import { isTouchDevice as m } from "../../isTouchDevice.js";
17
16
  import * as d from "three";
18
- import { Subscribe as N } from "../../Subscribe.js";
19
- import { getIntersectByRaycaster as F, getVirtualIntersectByRaycaster as L } from "../../five/getPosition.js";
20
- import { getRaycasterByNdcPosition as U } from "../../five/getRaycasterByNdcPosition.js";
17
+ import { Subscribe as M } from "../../Subscribe.js";
18
+ import { getIntersectByRaycaster as T, getVirtualIntersectByRaycaster as L } from "../../five/getPosition.js";
19
+ import { getRaycasterByNdcPosition as N } from "../../five/getRaycasterByNdcPosition.js";
21
20
  import { CURSOR_NOT_ALLOW_URL as P } from "./utils/contents.js";
22
- const C = new d.Vector3(), u = () => !1;
23
- class k extends N {
21
+ const F = new d.Vector3(), u = () => !1;
22
+ class V extends M {
24
23
  constructor(e, t) {
25
24
  var a, o, c;
26
25
  super();
@@ -33,7 +32,6 @@ class k extends N {
33
32
  i(this, "five");
34
33
  i(this, "_outOfFive", !1);
35
34
  i(this, "_enabled", !1);
36
- i(this, "hammer");
37
35
  i(this, "mode");
38
36
  /** 长按屏幕的动作触发后为true,手指抬起后为false */
39
37
  i(this, "pressDown", !1);
@@ -41,6 +39,8 @@ class k extends N {
41
39
  i(this, "adherePoints");
42
40
  /** 吸附点的半径 */
43
41
  i(this, "adherePointsRadius", 0.1);
42
+ /** 有值时表明处于按压检查阶段 */
43
+ i(this, "setPressDown");
44
44
  i(this, "lastFiveHelperVisible");
45
45
  i(this, "lastIntersection");
46
46
  i(this, "mousePosition");
@@ -76,32 +76,36 @@ class k extends N {
76
76
  i(this, "onClick", () => {
77
77
  this.select();
78
78
  });
79
- /**
80
- * 1. 如果之前没有长按行为「即没有长按点时」-> 滑动全景
81
- * 2. 如果有长按点,把长按点位置更新为当前位置
82
- */
83
- i(this, "onPan", (e) => {
84
- this.pressDown && (e != null && e.center && (this.mousePosition = {
85
- clientX: e.center.x,
86
- clientY: e.center.y
87
- }), this.mouseNdcPosition && this.updateByNdcPosition(this.mouseNdcPosition));
79
+ i(this, "onTouchStart", (e) => {
80
+ this.setPressDown = setTimeout(() => {
81
+ if (this.setPressDown = void 0, this.mousePosition = {
82
+ clientX: e.touches[0].clientX,
83
+ clientY: e.touches[0].clientY
84
+ }, !this.mouseNdcPosition)
85
+ return;
86
+ const t = this.updateByNdcPosition(this.mouseNdcPosition);
87
+ this.pressDown = t;
88
+ }, 300);
88
89
  });
89
- /**
90
- * @description: 长按屏幕后,更新长按点的位置
91
- */
92
- i(this, "onPress", (e) => {
93
- if (e != null && e.center && (this.mousePosition = {
94
- clientX: e.center.x,
95
- clientY: e.center.y
96
- }), !this.mouseNdcPosition)
90
+ i(this, "onTouchMove", (e) => {
91
+ if (this.setPressDown) {
92
+ clearTimeout(this.setPressDown), this.setPressDown = void 0;
97
93
  return;
98
- const t = this.updateByNdcPosition(this.mouseNdcPosition);
99
- this.pressDown = t;
94
+ }
95
+ if (this.pressDown) {
96
+ if (this.mousePosition = {
97
+ clientX: e.touches[0].clientX,
98
+ clientY: e.touches[0].clientY
99
+ }, !this.mouseNdcPosition)
100
+ return;
101
+ this.updateByNdcPosition(this.mouseNdcPosition);
102
+ }
100
103
  });
101
- /**
102
- * @description: 手指抬起后,重置pressDown状态
103
- */
104
- i(this, "onPanEnd", () => {
104
+ i(this, "onTouchEnd", (e) => {
105
+ if (this.setPressDown) {
106
+ clearTimeout(this.setPressDown), this.setPressDown = void 0;
107
+ return;
108
+ }
105
109
  this.pressDown && (setTimeout(() => {
106
110
  this.pressDown = !1;
107
111
  }, 100), this.select());
@@ -114,11 +118,11 @@ class k extends N {
114
118
  */
115
119
  i(this, "updateByNdcPosition", (e) => {
116
120
  var h, a;
117
- const t = U(this.five, e), r = F(this.five, t);
121
+ const t = N(this.five, e), r = T(this.five, t);
118
122
  if (r)
119
123
  return this.updatePointSelectorHelperIntersect(r), this.lastIntersection = r, !0;
120
124
  if (this.plane) {
121
- const o = t.ray.intersectPlane(this.plane, C);
125
+ const o = t.ray.intersectPlane(this.plane, F);
122
126
  if (o) {
123
127
  const c = {
124
128
  distance: this.five.camera.position.distanceTo(o),
@@ -181,12 +185,12 @@ class k extends N {
181
185
  });
182
186
  this.five = e, this.config = l(l({}, this.config), t), this.actionIfNoModelUnderMouse = (a = t == null ? void 0 : t.actionIfNoModelUnderMouse) != null ? a : "virtualPoint";
183
187
  const r = (o = t == null ? void 0 : t.mode) != null ? o : "auto";
184
- r === "auto" ? this.mode = v ? "fixed" : "cursor" : this.mode = r;
188
+ r === "auto" ? this.mode = m ? "fixed" : "cursor" : this.mode = r;
185
189
  const h = {
186
190
  autoFixPCPosition: this.mode === "cursor",
187
191
  initialPosition: this.mode === "fixed" ? { left: "35%", top: "20%" } : void 0
188
192
  };
189
- this.pointSelectorHelper = new H(this.five, m(l({}, t == null ? void 0 : t.helper), {
193
+ this.pointSelectorHelper = new y(this.five, v(l({}, t == null ? void 0 : t.helper), {
190
194
  magnifierParams: l(l({}, h), (c = t == null ? void 0 : t.helper) == null ? void 0 : c.magnifierParams)
191
195
  })), this.pointSelectorHelper.hide();
192
196
  }
@@ -220,18 +224,18 @@ class k extends N {
220
224
  enable() {
221
225
  if (this.enabled)
222
226
  return;
223
- this.enabled = !0, this.outOfFive = !1, this.pointSelectorHelper.enable();
227
+ this.enabled = !0, this.outOfFive = !1, this.pointSelectorHelper.enable(), this.pointSelectorHelper.hide();
224
228
  const e = this.five.getElement();
225
229
  if (!e)
226
230
  throw new Error("five element not found");
227
- this.hammer || (this.hammer = new M(e)), this.mode === "cursor" ? (this.five.on("wantsMoveToPano", u), this.five.on("wantsChangeMode", u), this.five.on("wantsTapGesture", u), e.addEventListener("mousemove", this.updateByMousePosition), v || e.addEventListener("wheel", this.onMouseWheel), e.addEventListener("click", this.onClick), e.addEventListener("mouseenter", this.onEnter), e.addEventListener("mouseout", this.onLeave), this.five.on("wantsPanGesture", this.onFiveWantsPanGesture), this.hammer.on("pan", this.onPan), this.hammer.on("press", this.onPress), this.hammer.on("panend", this.onPanEnd)) : this.mode === "fixed" && (this.five.on("panoArrived", this.renderScreenCenter), this.five.on("panGesture", this.renderScreenCenter), this.five.on("interiaPan", this.renderScreenCenter), this.renderScreenCenter(), this.pointSelectorHelper.show()), this.pointSelectorHelper.hooks.on("intersectionUpdate", this.emitIntersectionUpdate), this.lastFiveHelperVisible = this.five.helperVisible, this.five.helperVisible = !1, this.emit("enable");
231
+ this.mode === "cursor" ? (this.five.on("wantsMoveToPano", u), this.five.on("wantsChangeMode", u), this.five.on("wantsTapGesture", u), m ? (e.addEventListener("touchstart", this.onTouchStart, { passive: !0 }), e.addEventListener("touchmove", this.onTouchMove), e.addEventListener("touchend", this.onTouchEnd)) : (e.addEventListener("click", this.onClick), e.addEventListener("mousemove", this.updateByMousePosition), e.addEventListener("wheel", this.onMouseWheel), e.addEventListener("mouseenter", this.onEnter), e.addEventListener("mouseout", this.onLeave)), this.five.on("wantsPanGesture", this.onFiveWantsPanGesture)) : this.mode === "fixed" && (this.five.on("panoArrived", this.renderScreenCenter), this.five.on("panGesture", this.renderScreenCenter), this.five.on("interiaPan", this.renderScreenCenter), this.renderScreenCenter(), this.pointSelectorHelper.show()), this.pointSelectorHelper.hooks.on("intersectionUpdate", this.emitIntersectionUpdate), this.lastFiveHelperVisible = this.five.helperVisible, this.five.helperVisible = !1, this.emit("enable");
228
232
  }
229
233
  disable() {
230
234
  if (!this.enabled)
231
235
  return;
232
236
  this.enabled = !1, this.pointSelectorHelper.disable(), this.five.getElement().style.cursor = "";
233
237
  const e = this.five.getElement();
234
- this.five.off("wantsPanGesture", this.onFiveWantsPanGesture), this.five.off("wantsMoveToPano", u), this.five.off("wantsChangeMode", u), this.five.off("wantsTapGesture", u), this.five.helperVisible = this.lastFiveHelperVisible, e == null || e.removeEventListener("mousemove", this.updateByMousePosition), e == null || e.removeEventListener("wheel", this.onMouseWheel), e == null || e.removeEventListener("mouseenter", this.onEnter), e == null || e.removeEventListener("mouseout", this.onLeave), e == null || e.removeEventListener("click", this.onClick), 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");
238
+ this.five.off("wantsPanGesture", this.onFiveWantsPanGesture), this.five.off("wantsMoveToPano", u), this.five.off("wantsChangeMode", u), this.five.off("wantsTapGesture", u), this.five.helperVisible = this.lastFiveHelperVisible, e == null || e.removeEventListener("touchstart", this.onTouchStart), e == null || e.removeEventListener("touchmove", this.onTouchMove), e == null || e.removeEventListener("touchend", this.onTouchEnd), e == null || e.removeEventListener("click", this.onClick), e == null || e.removeEventListener("mousemove", this.updateByMousePosition), e == null || e.removeEventListener("wheel", this.onMouseWheel), e == null || e.removeEventListener("mouseenter", this.onEnter), e == null || e.removeEventListener("mouseout", this.onLeave), 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");
235
239
  }
236
240
  dispose() {
237
241
  this.disable(), this.pointSelectorHelper.dispose();
@@ -241,5 +245,5 @@ class k extends N {
241
245
  }
242
246
  }
243
247
  export {
244
- k as PointSelector
248
+ V as PointSelector
245
249
  };
@@ -1,7 +1,7 @@
1
- var f = Object.defineProperty;
2
- var p = (a, i, e) => i in a ? f(a, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[i] = e;
3
- var t = (a, i, e) => (p(a, typeof i != "symbol" ? i + "" : i, e), e);
4
- import * as m from "three";
1
+ var d = Object.defineProperty;
2
+ var m = (a, i, e) => i in a ? d(a, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[i] = e;
3
+ var t = (a, i, e) => (m(a, typeof i != "symbol" ? i + "" : i, e), e);
4
+ import * as p from "three";
5
5
  import { Magnifier as u } from "../../Magnifier.js";
6
6
  import { PointHelper as b } from "./PointHelper.js";
7
7
  import { Subscribe as g } from "../../../Subscribe.js";
@@ -16,7 +16,7 @@ class P {
16
16
  t(this, "magnifier", null);
17
17
  t(this, "pointHelper", null);
18
18
  t(this, "state", { enabled: !1, visible: !0 });
19
- t(this, "group", new m.Group());
19
+ t(this, "group", new p.Group());
20
20
  t(this, "show", () => {
21
21
  var i, e;
22
22
  this.state.visible || (this.state.visible = !0, (i = this.pointHelper) == null || i.show(), (e = this.magnifier) == null || e.enable(), this.five.needsRender = !0);
@@ -31,25 +31,25 @@ class P {
31
31
  return;
32
32
  this.abortUpdateMagnifier(), this.position = i, e.emitEvent && this.hooks.emit("intersectionUpdate", i), (s = this.pointHelper) == null || s.updateWithIntersect(i);
33
33
  const r = () => {
34
- var h;
35
- return (h = this.magnifier) == null ? void 0 : h.renderWithPoint(i.point);
34
+ var n;
35
+ return (n = this.magnifier) == null ? void 0 : n.renderWithPoint(i.point);
36
36
  };
37
37
  this.abortUpdateMagnifier = () => this.five.off("renderFrame", r), this.five.once("renderFrame", r), this.five.needsRender = !0;
38
38
  });
39
39
  t(this, "abortUpdateMagnifier", () => {
40
40
  });
41
- var s, h, n, l, d;
41
+ var s, n, h, l, f;
42
42
  this.five = i, this.magnifier = (e == null ? void 0 : e.magnifier) !== void 0 ? e.magnifier : new u(i, (s = e == null ? void 0 : e.magnifierParams) != null ? s : { dragEnabled: !0 });
43
43
  let r;
44
- (e == null ? void 0 : e.pointHelper) === "default" || (e == null ? void 0 : e.pointHelper) === void 0 ? r = new b(i) : (e == null ? void 0 : e.pointHelper) === "highlight" ? r = new o(i) : r = e.pointHelper, this.pointHelper = r, this.group.name = "five-point-selector", this.five.scene.add(this.group), (d = this.magnifier) == null || d.appendTo((l = (n = e.container) != null ? n : (h = i.getElement()) == null ? void 0 : h.parentElement) != null ? l : document.body);
44
+ (e == null ? void 0 : e.pointHelper) === "default" || (e == null ? void 0 : e.pointHelper) === void 0 ? r = new b(i) : (e == null ? void 0 : e.pointHelper) === "highlight" ? r = new o(i) : r = e.pointHelper, this.pointHelper = r, this.group.name = "five-point-selector", this.five.scene.add(this.group), (f = this.magnifier) == null || f.appendTo((l = (h = e.container) != null ? h : (n = i.getElement()) == null ? void 0 : n.parentElement) != null ? l : document.body);
45
45
  }
46
46
  enable() {
47
47
  var i;
48
- this.state.enabled || (this.state.enabled = !0, this.pointHelper && (this.group.add(this.pointHelper), this.pointHelper.show()), (i = this.magnifier) == null || i.enable(), this.five.needsRender = !0, this.hooks.emit("enabled"));
48
+ this.state.enabled || (this.state.enabled = !0, this.pointHelper && this.group.add(this.pointHelper), (i = this.magnifier) == null || i.enable(), this.five.needsRender = !0, this.hooks.emit("enabled"));
49
49
  }
50
50
  disable() {
51
51
  var i;
52
- this.state.enabled && (this.state.enabled = !1, this.pointHelper && (this.group.remove(this.pointHelper), this.pointHelper.hide()), (i = this.magnifier) == null || i.disable(), this.hooks.emit("disabled"));
52
+ this.state.enabled && (this.state.enabled = !1, this.pointHelper && this.group.remove(this.pointHelper), (i = this.magnifier) == null || i.disable(), this.hooks.emit("disabled"));
53
53
  }
54
54
  dispose() {
55
55
  this.hooks.off(), this.disable(), this.magnifier = null, this.pointHelper = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@realsee/dnalogel",
3
- "version": "3.49.14-alpha.0",
3
+ "version": "3.50.0",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./libs/index.js",
6
6
  "types": "./libs/index.d.ts",
package/README.md DELETED
@@ -1,116 +0,0 @@
1
- <p align="center">
2
- <a href="https://realsee.js.org/"><img src="https://vrlab-public.ljcdn.com/common/file/web/ea031fa5-ad82-46b3-86c8-7b20ec1e635a.jpg" width="60" /></a>
3
- </p>
4
-
5
-
6
- <p align="center">
7
- <a href="https://www.npmjs.com/package/@realsee/dnalogel">
8
- <img src="https://img.shields.io/npm/v/@realsee/dnalogel.svg" alt="npm version" >
9
- </a>
10
- <a href="https://packagephobia.now.sh/result?p=@realsee/dnalogel">
11
- <img src="https://packagephobia.now.sh/badge?p=@realsee/dnalogel" alt="install size" >
12
- </a>
13
- <a href="https://github.com/realsee-developer/dnalogel/blob/main/TERMS.txt">
14
- <img src="https://img.shields.io/npm/l/@realsee/dnalogel.svg" alt="license">
15
- </a>
16
- </p>
17
-
18
- <h1 align="center">@realsee/dnalogel</h1>
19
-
20
- # 👀 Overview
21
-
22
- @realsee/dnalogel 将 [如视(realsee.com)](https://realsee.com) **VR 空间交互** 常用能力沉淀,并以 `Five Plugins` 形式进行抽象。
23
- 结合[如视三维空间重建渲染引擎 Five](https://open-platform.realsee.com/developer/docs/five/intro/)
24
- 与 [如视开放 API](https://open-platform.realsee.com/developer/openapi/?id=1001) ,可以制作出丰富多彩的三维空间应用。不论是经过线上环境千锤百炼的刚需功能,还是灵感一现的炫酷尝试,所有已经落地的功能我们均毫无保留的开源至github [realsee-developer/dnalogel](https://github.com/realsee-developer/dnalogel) 。
25
-
26
- # 🔨 Usage
27
-
28
- **1、安装**
29
-
30
- ```bash
31
- npm install @realsee/dnalogel
32
- ```
33
-
34
- ```bash
35
- yarn add @realsee/dnalogel
36
- ```
37
-
38
- **2、插件注册**
39
-
40
- ```js
41
- import { Five } from '@realsee/five'
42
- import { Plugin } from '@realsee/dnalogel'
43
- const five = new Five({
44
- plugins: [[Plugin, 'PluginName', initOptions]],
45
- })
46
- ```
47
-
48
- **3、插件方法使用**
49
-
50
- ```js
51
- // 不同插件提供的方法可能存在差异,请参考各插件 API 文档
52
- five.plugins.PluginName.load(data)
53
- five.plugins.PluginName.enable()
54
- five.plugins.PluginName.disable()
55
- five.plugins.PluginName.dispose()
56
- ```
57
-
58
- **4、插件依赖数据获取**
59
-
60
- 您可以通过 [open API](https://open-platform.realsee.com/developer/open/api#/) 查看数据获取方式及相关 open API 。
61
-
62
- # 📖 Documents
63
-
64
- - [说明文档](https://open-platform.realsee.com/developer/docs/dnalogel/intro/)
65
- - [API 文档](https://open-platform.realsee.com/developer/openapi/?id=1001)
66
- - [demo 源码](https://github.com/realsee-developer/dnalogel)
67
- - [数据依赖来源:open API](https://open-platform.realsee.com/developer/openapi/?id=1001)
68
-
69
- # 💡 Preview
70
-
71
- 我们为每个插件书写了简单的效果示例,您可点击预览:
72
- [@realsee/dnalogel showcase](https://realsee-developer.github.io/dnalogel/)
73
-
74
- # 🧾 Lists
75
-
76
- - 🔌 ModelViewPlugin:模型小窗插件
77
- - 🔌 PanoFloorplanRadarPlugin:全景户型雷达图插件
78
- - 🔌 ModelRoomLabelPlugin:模型态房屋标签插件
79
- - 🔌 TopviewFloorplanPlugin:俯视模型户型图插件
80
- - 🔌 ModelChassisCompassPlugin:模型底盘指南针插件
81
- - 🔌 ModelEntryDoorGuidePlugin:模型入户门引导插件
82
- - 🔌 CSS3DRenderPlugin:CSS3D渲染插件
83
- - 🔌 CameraMovementPlugin:相机运镜插件
84
- - 🔌 ModelFloorplanPlugin:模型户型图插件
85
- - 🔌 PanoRulerPlugin:全景标尺插件
86
- - 🔌 PanoCompassPlugin:全景指南针插件
87
- - 其他插件持续更新中...
88
-
89
- # 可能遇到的问题
90
-
91
- 1. webpack打包出现以下错误
92
-
93
- ```bash
94
- Module not found: Error: Can't resolve '@realsee/five/line' in 'xxx/node_modules/@realsee/dnalogel/libs'
95
- Did you mean 'index.js'?
96
- BREAKING CHANGE: The request '@realsee/five/line' failed to resolve only because it was resolved as fully specified
97
- (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
98
- The extension in the request is mandatory for it to be fully specified.
99
- Add the extension to the request.
100
- ```
101
-
102
- 解决方案:在webpack配置里加以下rule
103
- 参考:[resolvefullyspecified](https://webpack.js.org/configuration/module/#resolvefullyspecified)
104
-
105
- ```js
106
- {
107
- test: /\.m?js$/,
108
- resolve: {
109
- fullySpecified: false, // disable the behaviour
110
- },
111
- },
112
- ```
113
-
114
- # License
115
-
116
- [TERMS](https://github.com/realsee-developer/dnalogel/blob/main/TERMS.txt)