@realsee/dnalogel 3.50.15-alpha.1 → 3.50.16

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.
@@ -19,7 +19,7 @@ let b = class {
19
19
  /**
20
20
  * @realsee/dnalogel 版本号
21
21
  */
22
- i(this, "VERSION", "3.50.15-alpha.1");
22
+ i(this, "VERSION", "3.50.16");
23
23
  i(this, "NAME");
24
24
  i(this, "five");
25
25
  i(this, "workUtil");
@@ -1,6 +1,6 @@
1
1
  function A() {
2
2
  console.debug(
3
- "%c %c@realsee/dnalogel %cv3.50.15-alpha.1",
3
+ "%c %c@realsee/dnalogel %cv3.50.16",
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,23 +1,23 @@
1
- var w = Object.defineProperty, b = Object.defineProperties;
2
- var E = Object.getOwnPropertyDescriptors;
1
+ var S = Object.defineProperty, w = Object.defineProperties;
2
+ var b = Object.getOwnPropertyDescriptors;
3
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) => {
4
+ var E = Object.prototype.hasOwnProperty, I = Object.prototype.propertyIsEnumerable;
5
+ var p = (n, s, e) => s in n ? S(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) && p(n, e, s[e]);
7
+ E.call(s, e) && p(n, e, s[e]);
8
8
  if (f)
9
9
  for (var e of f(s))
10
- H.call(s, e) && p(n, e, s[e]);
10
+ I.call(s, e) && p(n, e, s[e]);
11
11
  return n;
12
- }, v = (n, s) => b(n, E(s));
12
+ }, v = (n, s) => w(n, b(s));
13
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";
14
+ import { PointSelectorHelper as H } from "./utils/PointSelectorHelper.js";
15
+ import { isTouchDevice as y } from "../../isTouchDevice.js";
16
16
  import * as d from "three";
17
17
  import { Subscribe as M } from "../../Subscribe.js";
18
18
  import { getIntersectByRaycaster as T, getVirtualIntersectByRaycaster as L } from "../../five/getPosition.js";
19
19
  import { getRaycasterByNdcPosition as N } from "../../five/getRaycasterByNdcPosition.js";
20
- import { CURSOR_NOT_ALLOW_URL as P } from "./utils/contents.js";
20
+ import { CURSOR_NOT_ALLOW_URL as m } from "./utils/contents.js";
21
21
  const F = new d.Vector3(), u = () => !1;
22
22
  class V extends M {
23
23
  constructor(e, t) {
@@ -148,7 +148,7 @@ class V extends M {
148
148
  */
149
149
  i(this, "updatePointSelectorHelperIntersect", (e) => {
150
150
  if (!e) {
151
- this.onLeave(), this.five.getElement().style.cursor = P;
151
+ this.onLeave(), this.five.getElement().style.cursor = m;
152
152
  return;
153
153
  }
154
154
  this.onEnter(), this.cursorError || (this.five.getElement().style.cursor = "");
@@ -167,10 +167,10 @@ class V extends M {
167
167
  const t = this.five.getElement();
168
168
  if (!t)
169
169
  return null;
170
- const { top: r, left: h, width: a, height: o } = t.getBoundingClientRect(), { clientX: c, clientY: S } = e;
170
+ const { top: r, left: h, width: a, height: o } = t.getBoundingClientRect(), { clientX: c, clientY: P } = e;
171
171
  return {
172
172
  x: (c - h) / a,
173
- y: 1 - (S - r) / o
173
+ y: 1 - (P - r) / o
174
174
  };
175
175
  });
176
176
  i(this, "onFiveWantsPanGesture", () => {
@@ -185,12 +185,12 @@ class V extends M {
185
185
  });
186
186
  this.five = e, this.config = l(l({}, this.config), t), this.actionIfNoModelUnderMouse = (a = t == null ? void 0 : t.actionIfNoModelUnderMouse) != null ? a : "virtualPoint";
187
187
  const r = (o = t == null ? void 0 : t.mode) != null ? o : "auto";
188
- r === "auto" ? this.mode = m ? "fixed" : "cursor" : this.mode = r;
188
+ r === "auto" ? this.mode = y ? "fixed" : "cursor" : this.mode = r;
189
189
  const h = {
190
190
  autoFixPCPosition: this.mode === "cursor",
191
191
  initialPosition: this.mode === "fixed" ? { left: "35%", top: "20%" } : void 0
192
192
  };
193
- this.pointSelectorHelper = new y(this.five, v(l({}, t == null ? void 0 : t.helper), {
193
+ this.pointSelectorHelper = new H(this.five, v(l({}, t == null ? void 0 : t.helper), {
194
194
  magnifierParams: l(l({}, h), (c = t == null ? void 0 : t.helper) == null ? void 0 : c.magnifierParams)
195
195
  })), this.pointSelectorHelper.hide();
196
196
  }
@@ -210,7 +210,7 @@ class V extends M {
210
210
  return this._cursorError;
211
211
  }
212
212
  set cursorError(e) {
213
- this._cursorError = e, this.five.getElement().style.cursor = e ? P : "", e ? this.pointSelectorHelper.hide() : this.pointSelectorHelper.show();
213
+ this._cursorError = e, this.five.getElement().style.cursor = e ? m : "", e ? this.pointSelectorHelper.hide() : this.pointSelectorHelper.show();
214
214
  }
215
215
  set outOfFive(e) {
216
216
  this._outOfFive = e;
@@ -228,7 +228,7 @@ class V extends M {
228
228
  const e = this.five.getElement();
229
229
  if (!e)
230
230
  throw new Error("five element not found");
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");
231
+ this.mode === "cursor" ? (this.five.on("wantsMoveToPano", u), this.five.on("wantsChangeMode", u), this.five.on("wantsTapGesture", u), 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");
232
232
  }
233
233
  disable() {
234
234
  if (!this.enabled)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@realsee/dnalogel",
3
- "version": "3.50.15-alpha.1",
3
+ "version": "3.50.16",
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)