@vsleem-realsee-viewer/bimsee-plugin 2.0.24 → 2.0.26

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.
@@ -38,19 +38,19 @@
38
38
 
39
39
  ## 1.5 BimseeStore 类型说明
40
40
 
41
- | 属性/方法 | 类型/签名 | 说明 |
42
- | ----------------------- | ------------------------------------------------------- | ------------------------------------ |
43
- | `ready` | `boolean` | 是否加载完成 |
44
- | `coordinateTree?` | `Coordinate` | 坐标树结构 |
45
- | `mappedCoordinateTree?` | `Coordinate` | 映射后的坐标树结构 |
46
- | `currentModel?` | `Coordinate` | 当前模型坐标系 |
47
- | `currentSpace?` | `Coordinate` | 当前空间坐标系 |
48
- | `currentPoint?` | `Point` | 当前模型的点 |
49
- | `reload` | `(searchInfo: SearchInfo) => Promise<void>` | 重新加载数据 |
50
- | `selectModel` | `(coordinate: Partial<Coordinate>) => void` | 选择模型(找不到对应模型时抛出错误) |
51
- | `selectPoint` | ` (point: Point) => void` | 设置模型的坐标点 |
52
- | `setReferPoint` | `(current: TrackPoint, options: ViewerOptions) => void` | 设置参考点 |
53
- | `normalizeToModelPoint` | `(current: TrackPoint) => TrackPoint \| undefined` | 设置模型的坐标点 |
41
+ | 属性/方法 | 类型/签名 | 说明 |
42
+ | ----------------------- | ----------------------------------------------------- | ------------------------------------ |
43
+ | `ready` | `boolean` | 是否加载完成 |
44
+ | `coordinateTree?` | `Coordinate` | 坐标树结构 |
45
+ | `mappedCoordinateTree?` | `Coordinate` | 映射后的坐标树结构 |
46
+ | `currentModel?` | `Coordinate` | 当前模型坐标系 |
47
+ | `currentSpace?` | `Coordinate` | 当前空间坐标系 |
48
+ | `currentPoint?` | `Point` | 当前模型的点 |
49
+ | `reload` | `(searchInfo: SearchInfo) => Promise<void>` | 重新加载数据 |
50
+ | `selectModel` | `(coordinate: Partial<Coordinate>) => void` | 选择模型(找不到对应模型时抛出错误) |
51
+ | `selectPoint` | ` (point: Point) => void` | 设置模型的坐标点 |
52
+ | `setReferPoint` | `(current: TrackPoint, options: PanoOptions) => void` | 设置参考点 |
53
+ | `normalizeToModelPoint` | `(current: TrackPoint) => TrackPoint \| undefined` | 设置模型的坐标点 |
54
54
 
55
55
  ## 1.6 BimseeElement 实例对象
56
56
 
@@ -130,7 +130,7 @@ type maskerSlot =slot & {
130
130
  | `setMouseover` | `(mouseover: boolean) => void` | 设置鼠标悬停状态 |
131
131
  | `setMinFov` | `(minFov: number) => void` | 设置最小视野 |
132
132
  | `setMaxFov` | `(maxFov: number) => void` | 设置最大视野 |
133
- | `setMaskerStatus` | `(options: ViewerOptions) => void` | 更新蒙层状态 |
133
+ | `setMaskerStatus` | `(options: PanoOptions) => void` | 更新蒙层状态 |
134
134
  | `zoom` | `(level: number) => void` | 缩放到指定级别 |
135
135
  | `rotate` | `(position: Position) => void` | 旋转蒙层到指定位置 |
136
136
  | `getState` | ` () => MaskerProps` | 获取当前蒙层状态 |
@@ -67,7 +67,7 @@ declare function __VLS_template(): {
67
67
  setMouseover: (mouseover: boolean) => void;
68
68
  setMinFov: (minFov: number) => void;
69
69
  setMaxFov: (maxFov: number) => void;
70
- setMaskerStatus: (options: import('..').ViewerOptions) => void;
70
+ setMaskerStatus: (options: import('..').PanoOptions) => void;
71
71
  zoom: (level: number) => void;
72
72
  rotate: (position: import('packages/shared/dist').Position) => void;
73
73
  getState: () => import('..').MaskerProps;
@@ -112,7 +112,7 @@ declare function __VLS_template(): {
112
112
  "onPosition-updated"?: ((...args: any[]) => any) | undefined;
113
113
  "onZoom-updated"?: ((...args: any[]) => any) | undefined;
114
114
  onReady?: ((...args: any[]) => any) | undefined;
115
- }>, "dataHelper" | "isMouseover" | "isMousedown" | "setState" | "setVisible" | "setMousedown" | "setMouseover" | "setMinFov" | "setMaxFov" | "setMaskerStatus" | "zoom" | "rotate" | "getState" | "getPosition" | "getZoomLevel" | "getCameraPosition" | "getCameraTarget" | "getCameraHFov" | "getCameraStatus"> & import('vue').ShallowUnwrapRef<{
115
+ }>, "zoom" | "dataHelper" | "isMouseover" | "isMousedown" | "setState" | "setVisible" | "setMousedown" | "setMouseover" | "setMinFov" | "setMaxFov" | "setMaskerStatus" | "rotate" | "getState" | "getPosition" | "getZoomLevel" | "getCameraPosition" | "getCameraTarget" | "getCameraHFov" | "getCameraStatus"> & import('vue').ShallowUnwrapRef<{
116
116
  dataHelper: import('../types').DataHelper;
117
117
  isMouseover: () => boolean;
118
118
  isMousedown: () => boolean;
@@ -122,7 +122,7 @@ declare function __VLS_template(): {
122
122
  setMouseover: (mouseover: boolean) => void;
123
123
  setMinFov: (minFov: number) => void;
124
124
  setMaxFov: (maxFov: number) => void;
125
- setMaskerStatus: (options: import('..').ViewerOptions) => void;
125
+ setMaskerStatus: (options: import('..').PanoOptions) => void;
126
126
  zoom: (level: number) => void;
127
127
  rotate: (position: import('packages/shared/dist').Position) => void;
128
128
  getState: () => import('..').MaskerProps;
@@ -228,7 +228,7 @@ declare const __VLS_component: import('vue').DefineComponent<BimseeProps, {
228
228
  setMouseover: (mouseover: boolean) => void;
229
229
  setMinFov: (minFov: number) => void;
230
230
  setMaxFov: (maxFov: number) => void;
231
- setMaskerStatus: (options: import('..').ViewerOptions) => void;
231
+ setMaskerStatus: (options: import('..').PanoOptions) => void;
232
232
  zoom: (level: number) => void;
233
233
  rotate: (position: import('packages/shared/dist').Position) => void;
234
234
  getState: () => import('..').MaskerProps;
@@ -273,7 +273,7 @@ declare const __VLS_component: import('vue').DefineComponent<BimseeProps, {
273
273
  "onPosition-updated"?: ((...args: any[]) => any) | undefined;
274
274
  "onZoom-updated"?: ((...args: any[]) => any) | undefined;
275
275
  onReady?: ((...args: any[]) => any) | undefined;
276
- }>, "dataHelper" | "isMouseover" | "isMousedown" | "setState" | "setVisible" | "setMousedown" | "setMouseover" | "setMinFov" | "setMaxFov" | "setMaskerStatus" | "zoom" | "rotate" | "getState" | "getPosition" | "getZoomLevel" | "getCameraPosition" | "getCameraTarget" | "getCameraHFov" | "getCameraStatus"> & import('vue').ShallowUnwrapRef<{
276
+ }>, "zoom" | "dataHelper" | "isMouseover" | "isMousedown" | "setState" | "setVisible" | "setMousedown" | "setMouseover" | "setMinFov" | "setMaxFov" | "setMaskerStatus" | "rotate" | "getState" | "getPosition" | "getZoomLevel" | "getCameraPosition" | "getCameraTarget" | "getCameraHFov" | "getCameraStatus"> & import('vue').ShallowUnwrapRef<{
277
277
  dataHelper: import('../types').DataHelper;
278
278
  isMouseover: () => boolean;
279
279
  isMousedown: () => boolean;
@@ -283,7 +283,7 @@ declare const __VLS_component: import('vue').DefineComponent<BimseeProps, {
283
283
  setMouseover: (mouseover: boolean) => void;
284
284
  setMinFov: (minFov: number) => void;
285
285
  setMaxFov: (maxFov: number) => void;
286
- setMaskerStatus: (options: import('..').ViewerOptions) => void;
286
+ setMaskerStatus: (options: import('..').PanoOptions) => void;
287
287
  zoom: (level: number) => void;
288
288
  rotate: (position: import('packages/shared/dist').Position) => void;
289
289
  getState: () => import('..').MaskerProps;
@@ -32,7 +32,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
32
32
  setMouseover: (mouseover: boolean) => void;
33
33
  setMinFov: (minFov: number) => void;
34
34
  setMaxFov: (maxFov: number) => void;
35
- setMaskerStatus: (options: import('..').ViewerOptions) => void;
35
+ setMaskerStatus: (options: import('..').PanoOptions) => void;
36
36
  zoom: (level: number) => void;
37
37
  rotate: (position: import('packages/shared/dist').Position) => void;
38
38
  getState: () => import('..').MaskerProps;
@@ -1,5 +1,5 @@
1
1
  import { Point } from '@vsleem-realsee-viewer/shared';
2
- import { Ref, ComputedRef } from 'vue';
2
+ import { ComputedRef, Ref } from 'vue';
3
3
  import { BimseeProps, BimseeStore, CameraStatus, MaskerElement } from '../types';
4
4
  export declare function useMasker(propsRef: ComputedRef<BimseeProps>, storeRef: ComputedRef<BimseeStore>, maskerElRef: Ref<HTMLDivElement | undefined>, emit: EmitType): {
5
5
  getProps: ComputedRef<Required<Partial<import('..').MaskerProps>>>;
package/dist/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  /** 组件导出 */
2
2
  export { Bimsee as BimseePlugin } from './components';
3
3
  export { default as Bimsee } from './components/Bimsee.vue';
4
+ export type { BimseeErrorCode } from './enums';
4
5
  /** 配置相关类型导出 */
5
- export type { AppSetting /** 应用设置 */, BimseeSetting /** bim配置 */, CameraStatus /** 相机状态 */, SearchInfo /** 搜索信息 */, ViewerOptions /** 视图选项 */, } from './types';
6
+ export type { AppSetting /** 应用设置 */, BimseeSetting /** bim配置 */, CameraStatus /** 相机状态 */, PanoOptions /** 视图选项 */, SearchInfo /** 搜索信息 */, } from './types';
6
7
  /** 组件属性类型导出 */
7
8
  export type { BimseeElement /** Bimsee 元素类型 */, BimseeProps /** Bimsee 组件属性 */, BimseeStore /** Bimsee 状态管理元素类型 */, MaskerElement /** 蒙层元素类型 */, MaskerProps /** 蒙层属性 */,
8
9
  /** Bimsee 相关 */
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { ref as y, computed as F, watch as $, unref as C, defineComponent as ae, onBeforeUnmount as re, createElementBlock as se, openBlock as ie, withDirectives as ke, renderSlot as H, createElementVNode as Te, vShow as Ee, normalizeProps as q, guardReactiveProps as K, onMounted as Ce, nextTick as Le, createVNode as _e, mergeProps as Ie, toHandlers as Fe, withCtx as be } from "vue";
2
- import { APP_SETTING as Re, utils as ue, Position as G, Vector3 as te, Point as xe, CoordinateModelType as ze, AppError as j, DataSource as Be, http as Ne } from "@vsleem-realsee-viewer/shared";
3
- const W = {
1
+ import { ref as g, computed as F, watch as $, unref as C, defineComponent as se, onBeforeUnmount as ie, createElementBlock as ue, openBlock as ce, withDirectives as ke, renderSlot as q, createElementVNode as Te, vShow as Ee, normalizeProps as K, guardReactiveProps as W, onMounted as Ce, nextTick as Le, createVNode as _e, mergeProps as Ie, toHandlers as Fe, withCtx as be } from "vue";
2
+ import { APP_SETTING as Re, utils as le, Position as j, Vector3 as ne, Point as ze, CoordinateModelType as xe, AppError as H, DataSource as Be, http as Ne } from "@vsleem-realsee-viewer/shared";
3
+ const J = {
4
4
  visible: !0,
5
5
  defaultYaw: 0,
6
6
  defaultPitch: 0,
@@ -9,26 +9,26 @@ const W = {
9
9
  maxFov: 120
10
10
  }, De = {
11
11
  appSetting: Re,
12
- masker: W,
12
+ masker: J,
13
13
  immediate: !0
14
- }, { cloneDeep: oe, deepMergeProps: Ye, getDiffProps: $e } = ue;
15
- function Ve(r, m, n, d) {
16
- const a = y(oe(W)), s = y(), f = y(), t = F(() => a.value), h = F(() => {
17
- const { coordinateTree: e, mappedCoordinateTree: o, currentSpace: v, currentModel: M, currentPoint: w } = m.value || {};
14
+ }, { cloneDeep: ae, deepMergeProps: Ye, getDiffProps: $e } = le;
15
+ function Ve(r, v, n, d) {
16
+ const a = g(ae(J)), i = g(), f = g(), t = F(() => a.value), h = F(() => {
17
+ const { coordinateTree: e, mappedCoordinateTree: o, currentSpace: m, currentModel: M, currentPoint: w } = v.value || {};
18
18
  return {
19
19
  coordinateTree: e,
20
20
  mappedCoordinateTree: o,
21
- currentSpace: v,
21
+ currentSpace: m,
22
22
  currentModel: M,
23
23
  currentPoint: w,
24
- cameraStatus: s.value,
24
+ cameraStatus: i.value,
25
25
  state: t.value
26
26
  };
27
27
  });
28
- $(() => oe(r.value.masker), S, { immediate: !0, deep: !0 });
29
- function S(e, o) {
30
- const v = $e(e, o);
31
- c(v);
28
+ $(() => ae(r.value.masker), y, { immediate: !0, deep: !0 });
29
+ function y(e, o) {
30
+ const m = $e(e, o);
31
+ c(m);
32
32
  }
33
33
  function u() {
34
34
  return C(t);
@@ -36,49 +36,49 @@ function Ve(r, m, n, d) {
36
36
  function c(e) {
37
37
  e && Ye(a.value, e);
38
38
  }
39
- function k() {
39
+ function S() {
40
40
  const e = C(n);
41
- e && (e.addEventListener("mousedown", L), e.addEventListener("touchstart", L), e.addEventListener("click", I), window.addEventListener("mousemove", E), window.addEventListener("touchmove", E), window.addEventListener("mouseup", p), window.addEventListener("touchend", p), e.addEventListener("mouseover", i), e.addEventListener("mouseout", l), e.addEventListener("wheel", g));
41
+ e && (e.addEventListener("mousedown", L), e.addEventListener("touchstart", L), e.addEventListener("click", I), window.addEventListener("mousemove", T), window.addEventListener("touchmove", T), window.addEventListener("mouseup", p), window.addEventListener("touchend", p), e.addEventListener("mouseover", s), e.addEventListener("mouseout", l), e.addEventListener("wheel", E));
42
42
  }
43
- function T() {
43
+ function k() {
44
44
  const e = C(n);
45
- e && (e.removeEventListener("mousedown", L), e.removeEventListener("touchstart", L), window.removeEventListener("mousemove", E), window.removeEventListener("touchmove", E), window.removeEventListener("mouseup", p), window.removeEventListener("touchend", p), e.removeEventListener("mouseover", i), e.removeEventListener("mouseout", l), e.removeEventListener("wheel", g));
45
+ e && (e.removeEventListener("mousedown", L), e.removeEventListener("touchstart", L), window.removeEventListener("mousemove", T), window.removeEventListener("touchmove", T), window.removeEventListener("mouseup", p), window.removeEventListener("touchend", p), e.removeEventListener("mouseover", s), e.removeEventListener("mouseout", l), e.removeEventListener("wheel", E));
46
46
  }
47
47
  function I(e) {
48
48
  d("click", e);
49
49
  }
50
50
  function L(e) {
51
- const o = e instanceof TouchEvent ? e.touches[0] : e, { defaultYaw: v = 0, defaultPitch: M = 0 } = t.value, w = Number(v) - Number(m.value.currentPoint?.yaw || 0);
51
+ const o = e instanceof TouchEvent ? e.touches[0] : e, { defaultYaw: m = 0, defaultPitch: M = 0 } = t.value, w = Number(m) - Number(v.value.currentPoint?.yaw || 0);
52
52
  f.value = {
53
53
  pageX: o.pageX,
54
54
  pageY: o.pageY,
55
55
  defaultYaw: w,
56
56
  defaultPitch: M
57
- }, O(!0), d("mousedown", e);
57
+ }, X(!0), d("mousedown", e);
58
58
  }
59
- function E(e) {
60
- if (!f.value || !J()) return;
61
- const o = e instanceof TouchEvent ? e.touches[0] : e, { pageX: v, pageY: M } = o, { pageX: w, pageY: _ } = f.value, { defaultYaw: b = 0, defaultPitch: Y = 0 } = f.value, z = Math.PI * 0.15 / 180;
62
- let B = (Number(b) - (v - w) * z) % (2 * Math.PI), R = (Number(Y) + (M - _) * z) % (2 * Math.PI);
59
+ function T(e) {
60
+ if (!f.value || !ee()) return;
61
+ const o = e instanceof TouchEvent ? e.touches[0] : e, { pageX: m, pageY: M } = o, { pageX: w, pageY: _ } = f.value, { defaultYaw: b = 0, defaultPitch: Y = 0 } = f.value, x = Math.PI * 0.15 / 180;
62
+ let B = (Number(b) - (m - w) * x) % (2 * Math.PI), R = (Number(Y) + (M - _) * x) % (2 * Math.PI);
63
63
  R = Math.max(-Math.PI / 2, Math.min(Math.PI / 2, R));
64
- const X = new G({ yaw: B, pitch: R });
65
- Q(X);
64
+ const G = new j({ yaw: B, pitch: R });
65
+ te(G);
66
66
  }
67
67
  function p() {
68
- O(!1), f.value = void 0;
68
+ X(!1), f.value = void 0;
69
69
  }
70
- function i() {
71
- U(!0);
70
+ function s() {
71
+ O(!0);
72
72
  }
73
73
  function l() {
74
- U(!1);
74
+ O(!1);
75
75
  }
76
- function g(e) {
76
+ function E(e) {
77
77
  e.preventDefault(), e.stopPropagation();
78
78
  const o = Math.sign(e.deltaY) * 5;
79
79
  if (o === 0) return;
80
- const { minFov: v = 0, maxFov: M = 0 } = t.value, { hFov: w = 0 } = s.value || {}, _ = Math.min(Math.max(w + o, v), M);
81
- _ !== w && ee(x.fovToZoomLevel(_));
80
+ const { minFov: m = 0, maxFov: M = 0 } = t.value, { hFov: w = 0 } = i.value || {}, _ = Math.min(Math.max(w + o, m), M);
81
+ _ !== w && oe(z.fovToZoomLevel(_));
82
82
  }
83
83
  function P() {
84
84
  const { defaultYaw: e, defaultPitch: o } = t.value;
@@ -88,33 +88,33 @@ function Ve(r, m, n, d) {
88
88
  return t.value.defaultZoomLvl;
89
89
  }
90
90
  function D() {
91
- return s.value?.position;
91
+ return i.value?.position;
92
92
  }
93
93
  function Z() {
94
- return s.value?.hFov;
94
+ return i.value?.hFov;
95
95
  }
96
- function le() {
97
- return s.value?.target;
96
+ function Q() {
97
+ return i.value?.target;
98
98
  }
99
- function de() {
100
- return s.value;
99
+ function A() {
100
+ return i.value;
101
101
  }
102
- function ve() {
102
+ function me() {
103
103
  return t.value?.mouseover ?? !1;
104
104
  }
105
- function J() {
105
+ function ee() {
106
106
  return t.value?.mousedown ?? !1;
107
107
  }
108
- function A(e) {
109
- s.value = { ...s.value, ...e };
108
+ function U(e) {
109
+ i.value = { ...i.value, ...e };
110
110
  }
111
- function me(e) {
111
+ function ve(e) {
112
112
  c({ visible: e });
113
113
  }
114
- function U(e) {
114
+ function O(e) {
115
115
  c({ mouseover: e });
116
116
  }
117
- function O(e) {
117
+ function X(e) {
118
118
  c({ mousedown: e });
119
119
  }
120
120
  function fe(e) {
@@ -124,39 +124,39 @@ function Ve(r, m, n, d) {
124
124
  c({ maxFov: e });
125
125
  }
126
126
  function he(e) {
127
- const { currentPoint: o } = m.value;
127
+ const { currentPoint: o } = v.value;
128
128
  if (o) {
129
- const { minFov: v, maxFov: M } = t.value, { yaw: w = 0, pitch: _ = 0, zoomLevel: b = 0 } = e, Y = new G({ yaw: w, pitch: _ }), z = x.modelPointToCameraPosition(o), B = x.maskerRotateToCameraTarget(Y, z), R = x.zoomLevelToFov(b);
130
- c({ defaultYaw: w, defaultPitch: _, defaultZoomLvl: b }), A({ position: z, target: B, hFov: R, minFov: v, maxFov: M });
129
+ const { minFov: m, maxFov: M } = t.value, { zoom: w = 0 } = e, { yaw: _ = 0, pitch: b = 0 } = e.position || {}, Y = new j({ yaw: _, pitch: b }), x = z.modelPointToCameraPosition(o), B = z.maskerRotateToCameraTarget(Y, x), R = z.zoomLevelToFov(w);
130
+ c({ defaultYaw: _, defaultPitch: b, defaultZoomLvl: w }), U({ position: x, target: B, hFov: R, minFov: m, maxFov: M });
131
131
  }
132
132
  }
133
- function Q(e) {
134
- const o = s.value?.position;
133
+ function te(e) {
134
+ const o = i.value?.position;
135
135
  if (!o) return;
136
- const { yaw: v, pitch: M } = e, w = Number(m.value.currentPoint?.yaw || 0) + v, _ = new G({ yaw: Number(w), pitch: Number(M) }), b = x.maskerRotateToCameraTarget(_, o);
137
- c({ defaultYaw: w, defaultPitch: M }), A({ target: b }), d("position-updated", { position: e, target: b });
136
+ const { yaw: m, pitch: M } = e, w = Number(v.value.currentPoint?.yaw || 0) + m, _ = new j({ yaw: Number(w), pitch: Number(M) }), b = z.maskerRotateToCameraTarget(_, o);
137
+ c({ defaultYaw: w, defaultPitch: M }), U({ target: b }), d("position-updated", { position: e, target: b });
138
138
  }
139
- function ee(e) {
140
- const o = x.zoomLevelToFov(e);
141
- c({ defaultZoomLvl: e }), A({ hFov: o }), d("zoom-updated", { zoomLevel: e, hFov: o });
139
+ function oe(e) {
140
+ const o = z.zoomLevelToFov(e);
141
+ c({ defaultZoomLvl: e }), U({ hFov: o }), d("zoom-updated", { zoomLevel: e, hFov: o });
142
142
  }
143
143
  function we(e) {
144
- return new te(e);
144
+ return new ne(e);
145
145
  }
146
146
  function Me(e, o) {
147
- const { x: v = 0, y: M = 0, z: w = 0 } = o, { yaw: _, pitch: b } = e, Y = -_, z = b, B = 100, R = 0, X = B * Math.cos(R + Y) + v, ye = B * Math.sin(R + Y) + M, Se = B * Math.tan(z) + w;
148
- return new te({ x: X, y: ye, z: Se });
147
+ const { x: m = 0, y: M = 0, z: w = 0 } = o, { yaw: _, pitch: b } = e, Y = -_, x = b, B = 100, R = 0, G = B * Math.cos(R + Y) + m, ye = B * Math.sin(R + Y) + M, Se = B * Math.tan(x) + w;
148
+ return new ne({ x: G, y: ye, z: Se });
149
149
  }
150
150
  function Pe(e) {
151
- const { minFov: o = 20, maxFov: v = 120 } = t.value, w = 100 - (Math.max(o, Math.min(v, e)) - o) / (v - o) * 100;
151
+ const { minFov: o = 20, maxFov: m = 120 } = t.value, w = 100 - (Math.max(o, Math.min(m, e)) - o) / (m - o) * 100;
152
152
  return Math.max(0, Math.min(100, Math.round(w)));
153
153
  }
154
154
  function ge(e) {
155
- const { minFov: o = 20, maxFov: v = 120 } = t.value;
156
- let M = v + e / 100 * (o - v);
157
- return Math.max(o, Math.min(v, M));
155
+ const { minFov: o = 20, maxFov: m = 120 } = t.value;
156
+ let M = m + e / 100 * (o - m);
157
+ return Math.max(o, Math.min(m, M));
158
158
  }
159
- const x = {
159
+ const z = {
160
160
  modelPointToCameraPosition: we,
161
161
  maskerRotateToCameraTarget: Me,
162
162
  fovToZoomLevel: Pe,
@@ -166,216 +166,218 @@ function Ve(r, m, n, d) {
166
166
  getProps: t,
167
167
  getBindValue: h,
168
168
  maskerAction: {
169
- dataHelper: x,
170
- isMouseover: ve,
171
- isMousedown: J,
169
+ dataHelper: z,
170
+ isMouseover: me,
171
+ isMousedown: ee,
172
172
  setState: c,
173
- setVisible: me,
174
- setMousedown: O,
175
- setMouseover: U,
173
+ setVisible: ve,
174
+ setMousedown: X,
175
+ setMouseover: O,
176
176
  setMinFov: fe,
177
177
  setMaxFov: pe,
178
178
  setMaskerStatus: he,
179
- zoom: ee,
180
- rotate: Q,
179
+ zoom: oe,
180
+ rotate: te,
181
181
  getState: u,
182
182
  getPosition: P,
183
183
  getZoomLevel: N,
184
184
  getCameraPosition: D,
185
- getCameraTarget: le,
185
+ getCameraTarget: Q,
186
186
  getCameraHFov: Z,
187
- getCameraStatus: de
187
+ getCameraStatus: A
188
188
  },
189
- handleMaskerEvents: k,
190
- handleUninstallEvents: T
189
+ handleMaskerEvents: S,
190
+ handleUninstallEvents: k
191
191
  };
192
192
  }
193
- const Ze = { class: "vsleem-masker" }, Ae = /* @__PURE__ */ ae({
193
+ const Ze = { class: "vsleem-masker" }, Ae = /* @__PURE__ */ se({
194
194
  __name: "Masker",
195
195
  props: {
196
196
  bimseeProps: {},
197
197
  bimseeStore: {}
198
198
  },
199
199
  emits: ["ready", "click", "mousedown", "zoom-updated", "position-updated"],
200
- setup(r, { expose: m, emit: n }) {
201
- const d = r, a = n, s = y(), f = F(() => d.bimseeProps), t = F(() => d.bimseeStore), { getProps: h, getBindValue: S, maskerAction: u, handleMaskerEvents: c, handleUninstallEvents: k } = Ve(f, t, s, a);
202
- $(() => C(t)?.ready, T, { immediate: !0 }), re(L);
203
- function T(E) {
204
- E && (I(), c());
200
+ setup(r, { expose: v, emit: n }) {
201
+ const d = r, a = n, i = g(), f = F(() => d.bimseeProps), t = F(() => d.bimseeStore), { getProps: h, getBindValue: y, maskerAction: u, handleMaskerEvents: c, handleUninstallEvents: S } = Ve(f, t, i, a);
202
+ $(() => C(t)?.ready, k, { immediate: !0 }), ie(L);
203
+ function k(T) {
204
+ T && (I(), c());
205
205
  }
206
206
  function I() {
207
207
  a("ready", u?.getCameraStatus());
208
208
  }
209
209
  function L() {
210
- k();
210
+ S();
211
211
  }
212
- return m(u), (E, p) => (ie(), se("div", Ze, [
212
+ return v(u), (T, p) => (ce(), ue("div", Ze, [
213
213
  ke(Te("div", {
214
214
  ref_key: "maskerElRef",
215
- ref: s,
215
+ ref: i,
216
216
  class: "masker-container"
217
217
  }, null, 512), [
218
218
  [Ee, C(h).visible]
219
219
  ]),
220
- H(E.$slots, "default", q(K(C(S))), void 0, !0)
220
+ q(T.$slots, "default", K(W(C(y))), void 0, !0)
221
221
  ]));
222
222
  }
223
- }), ce = (r, m) => {
223
+ }), de = (r, v) => {
224
224
  const n = r.__vccOpts || r;
225
- for (const [d, a] of m)
225
+ for (const [d, a] of v)
226
226
  n[d] = a;
227
227
  return n;
228
- }, Ue = /* @__PURE__ */ ce(Ae, [["__scopeId", "data-v-605902cc"]]);
228
+ }, Ue = /* @__PURE__ */ de(Ae, [["__scopeId", "data-v-605902cc"]]);
229
229
  var V = /* @__PURE__ */ ((r) => (r[r.StoreMissParams = 11e3] = "StoreMissParams", r[r.StoreNoCSTree = 11001] = "StoreNoCSTree", r[r.StoreSelectNoBIMModel = 11002] = "StoreSelectNoBIMModel", r))(V || {});
230
- function Oe(r, { setReferPoint: m }) {
231
- const n = y(), d = y(), a = y(!1), s = y(!1), f = y(), t = y(), h = F(() => n.value?.findCsById(f.value)), S = F(() => h.value?.findParentSpace());
232
- async function u(i) {
233
- const { projectId: l, modelCsId: g } = i || {};
230
+ function Oe(r, { setReferPoint: v }) {
231
+ const n = g(), d = g(), a = g(!1), i = g(!1), f = g(), t = g(), h = F(() => n.value?.findCsById(f.value)), y = F(() => h.value?.findParentSpace());
232
+ async function u(s) {
233
+ const { projectId: l, modelCsId: E } = s || {};
234
234
  try {
235
235
  if (!l)
236
- throw new j(V.StoreMissParams, "缺少必要的查询参数");
236
+ throw new H(V.StoreMissParams, "缺少必要的查询参数");
237
237
  if (a.value = !0, l != n.value?.projectId) {
238
238
  const N = await Be.getCoordinateTree(l), D = await r.value.handleResponseFn?.(N) || N;
239
239
  if (!D)
240
- throw new j(
240
+ throw new H(
241
241
  V.StoreNoCSTree,
242
242
  `未查询到项目ID为 ${l} 的坐标系树`
243
243
  );
244
244
  n.value = D;
245
245
  }
246
- const P = n.value?.findCsById(g);
247
- d.value = P?.getMappedCsTree(), k({ modelCsId: g }), r.value.fetchSuccess?.(n.value);
246
+ const P = n.value?.findCsById(E);
247
+ d.value = P?.getMappedCsTree(), S({ modelCsId: E }), r.value.fetchSuccess?.(n.value);
248
248
  } catch (P) {
249
249
  console.error(P), r.value.fetchError?.(P);
250
250
  } finally {
251
251
  a.value = !1;
252
252
  }
253
253
  }
254
- function c(i = !1) {
255
- s.value = i;
254
+ function c(s = !1) {
255
+ i.value = s;
256
256
  }
257
- function k(i) {
258
- const { modelCsId: l } = i;
259
- l && T({ id: l });
257
+ function S(s) {
258
+ const { modelCsId: l } = s;
259
+ l && k({ id: l });
260
260
  }
261
- function T(i) {
262
- const { id: l } = i;
263
- if (n.value?.findCsById(l)?.modelType === ze.BIMModel)
261
+ function k(s) {
262
+ const { id: l } = s;
263
+ if (n.value?.findCsById(l)?.modelType === xe.BIMModel)
264
264
  f.value = l;
265
265
  else
266
- throw new j(V.StoreSelectNoBIMModel, `未找到ID为 ${l} 的BIM模型坐标系`);
266
+ throw new H(V.StoreSelectNoBIMModel, `未找到ID为 ${l} 的BIM模型坐标系`);
267
267
  }
268
- function I(i) {
269
- t.value = i;
268
+ function I(s) {
269
+ t.value = s;
270
270
  }
271
- function L(i) {
272
- if (!h.value || !i) return;
273
- const l = n.value?.findCsById(i.coordinate?.id);
271
+ function L(s) {
272
+ if (!h.value || !s) return;
273
+ const l = n.value?.findCsById(s.coordinate?.id);
274
274
  if (!l) return;
275
- const g = l?.getDestRelativeMap(h.value);
276
- if (!g) return;
277
- const P = new xe(i.point).projection(
278
- g,
275
+ const E = l?.getDestRelativeMap(h.value);
276
+ if (!E) return;
277
+ const P = new ze(s.point).projection(
278
+ E,
279
279
  l,
280
280
  h.value
281
281
  );
282
282
  if (P)
283
283
  return P.y = -P.y, {
284
- ...i,
284
+ ...s,
285
285
  coordinate: h.value,
286
286
  point: P,
287
287
  position: P
288
288
  };
289
289
  }
290
- function E() {
290
+ function T() {
291
291
  return p.value;
292
292
  }
293
293
  const p = F(
294
294
  () => ({
295
295
  // 状态
296
- ready: s.value,
296
+ ready: i.value,
297
297
  coordinateTree: n.value,
298
298
  mappedCoordinateTree: d.value,
299
299
  currentPoint: t.value,
300
300
  // 计算属性
301
- currentSpace: S.value,
301
+ currentSpace: y.value,
302
302
  currentModel: h.value,
303
303
  // 方法
304
304
  reload: u,
305
- selectModel: T,
305
+ selectModel: k,
306
306
  selectPoint: I,
307
- setReferPoint: m,
307
+ setReferPoint: v,
308
308
  normalizeToModelPoint: L
309
309
  })
310
310
  );
311
311
  return {
312
312
  storeRef: p,
313
- getStore: E,
313
+ getStore: T,
314
314
  setReady: c
315
315
  };
316
316
  }
317
- const { cloneDeep: ne, deepMergeProps: Xe, getDiffProps: Ge } = ue;
318
- function je(r, m, n) {
319
- const d = y(ne(De)), a = F(() => d.value);
320
- $(() => ne(r), u, { immediate: !0, deep: !0 }), $(
317
+ const { cloneDeep: re, deepMergeProps: Xe, getDiffProps: Ge } = le;
318
+ function je(r, v, n) {
319
+ const d = g(re(De)), a = F(() => d.value);
320
+ $(() => re(r), u, { immediate: !0, deep: !0 }), $(
321
321
  () => a.value.searchInfo,
322
- () => I(s.value.ready),
322
+ () => I(i.value.ready),
323
323
  { deep: !0 }
324
324
  );
325
- const { storeRef: s, getStore: f, setReady: t } = Oe(a, { setReferPoint: E });
326
- Ce(h), re(S);
325
+ const { storeRef: i, getStore: f, setReady: t } = Oe(a, { setReferPoint: T });
326
+ Ce(h), ie(y);
327
327
  async function h() {
328
- const { appSetting: p, immediate: i } = C(a);
329
- p && Ne.setRequestGlobalConfig(p), i && (await I(!0), setTimeout(T, 0));
328
+ const { appSetting: p, immediate: s } = C(a);
329
+ p && Ne.setRequestGlobalConfig(p), s && (await I(!0), setTimeout(k, 0));
330
330
  }
331
- function S() {
331
+ function y() {
332
332
  n?.("destroy");
333
333
  }
334
- function u(p, i) {
335
- const l = Ge(p, i);
336
- k(l);
334
+ function u(p, s) {
335
+ const l = Ge(p, s);
336
+ S(l);
337
337
  }
338
338
  function c() {
339
339
  return C(a);
340
340
  }
341
- function k(p) {
341
+ function S(p) {
342
342
  p && Xe(d.value, p);
343
343
  }
344
- function T() {
344
+ function k() {
345
345
  t(!0), n?.("ready");
346
346
  }
347
347
  async function I(p) {
348
- const { searchInfo: i } = a.value;
349
- p && i && (await s.value?.reload(i), n?.("reload"));
348
+ const { searchInfo: s } = a.value;
349
+ p && s && (await i.value?.reload(s), n?.("reload"));
350
350
  }
351
351
  function L() {
352
- return m.value;
352
+ return v.value;
353
353
  }
354
- async function E(p, i) {
354
+ async function T(p, s) {
355
355
  const l = f();
356
356
  if (l) {
357
- const g = l.normalizeToModelPoint(p);
358
- if (!g) return;
359
- l.selectPoint(g.point), await Le();
360
- const { yaw: P = 0, pitch: N = 0, zoomLevel: D = 0 } = i, Z = g.point?.yaw + P;
361
- L()?.setMaskerStatus({ yaw: Z, pitch: N, zoomLevel: D });
357
+ const E = L();
358
+ if (!E) return;
359
+ const P = l.normalizeToModelPoint(p);
360
+ if (!P) return;
361
+ l.selectPoint(P.point), await Le();
362
+ const { zoom: N = 0 } = s, { yaw: D = 0, pitch: Z = 0 } = s.position || {}, A = { yaw: P.point?.yaw + D, pitch: Z };
363
+ E.setMaskerStatus({ position: A, zoom: N });
362
364
  }
363
365
  }
364
366
  return {
365
- storeRef: s,
367
+ storeRef: i,
366
368
  getStore: f,
367
369
  getMasker: L,
368
370
  getState: c,
369
- setState: k
371
+ setState: S
370
372
  };
371
373
  }
372
- function He(r, m, n) {
374
+ function He(r, v, n) {
373
375
  const d = F(() => r.value.ready && !!r.value.currentModel), a = F(() => {
374
- const { coordinateTree: t, mappedCoordinateTree: h, currentSpace: S, currentModel: u, currentPoint: c } = r.value || {};
376
+ const { coordinateTree: t, mappedCoordinateTree: h, currentSpace: y, currentModel: u, currentPoint: c } = r.value || {};
375
377
  return {
376
378
  coordinateTree: t,
377
379
  mappedCoordinateTree: h,
378
- currentSpace: S,
380
+ currentSpace: y,
379
381
  currentModel: u,
380
382
  currentPoint: c
381
383
  };
@@ -383,7 +385,7 @@ function He(r, m, n) {
383
385
  $(
384
386
  () => a.value?.currentModel?.id,
385
387
  (t) => {
386
- t && s(a.value?.currentModel);
388
+ t && i(a.value?.currentModel);
387
389
  },
388
390
  {
389
391
  immediate: !0
@@ -398,7 +400,7 @@ function He(r, m, n) {
398
400
  deep: !0
399
401
  }
400
402
  );
401
- function s(t) {
403
+ function i(t) {
402
404
  n("change-model", t);
403
405
  }
404
406
  function f(t) {
@@ -409,43 +411,43 @@ function He(r, m, n) {
409
411
  getBindValue: a
410
412
  };
411
413
  }
412
- function qe(r, m) {
413
- const n = y({ yaw: 0, pitch: 0 });
414
+ function qe(r, v) {
415
+ const n = g({ yaw: 0, pitch: 0 });
414
416
  function d(u) {
415
- m("masker-ready", u);
417
+ v("masker-ready", u);
416
418
  }
417
419
  function a(u) {
418
- m("masker-click", u);
420
+ v("masker-click", u);
419
421
  }
420
- function s(u) {
421
- m("masker-mousedown", u);
422
+ function i(u) {
423
+ v("masker-mousedown", u);
422
424
  }
423
425
  function f(u) {
424
- m("masker-zoom-updated", u);
426
+ v("masker-zoom-updated", u);
425
427
  }
426
428
  function t(u) {
427
- m("masker-position-updated", u, h(u));
429
+ v("masker-position-updated", u, h(u));
428
430
  }
429
431
  function h(u) {
430
- const { yaw: c, pitch: k } = u.position, { yaw: T, pitch: I } = C(n);
431
- return n.value = { yaw: c, pitch: k }, { yaw: c - T, pitch: k - I };
432
+ const { yaw: c, pitch: S } = u.position, { yaw: k, pitch: I } = C(n);
433
+ return n.value = { yaw: c, pitch: S }, { yaw: c - k, pitch: S - I };
432
434
  }
433
435
  return { maskerEvents: {
434
436
  ready: d,
435
437
  click: a,
436
- mousedown: s,
438
+ mousedown: i,
437
439
  zoomUpdated: f,
438
440
  positionUpdated: t
439
441
  } };
440
442
  }
441
- const Ke = { class: "vsleem-bimsee" }, We = /* @__PURE__ */ ae({
443
+ const Ke = { class: "vsleem-bimsee" }, We = /* @__PURE__ */ se({
442
444
  name: "Bimsee",
443
445
  __name: "Bimsee",
444
446
  props: {
445
447
  appSetting: {},
446
448
  searchInfo: {},
447
449
  bimseeSetting: {},
448
- masker: { default: () => W },
450
+ masker: { default: () => J },
449
451
  immediate: { type: Boolean, default: !0 },
450
452
  handleResponseFn: {},
451
453
  fetchSuccess: {},
@@ -463,27 +465,27 @@ const Ke = { class: "vsleem-bimsee" }, We = /* @__PURE__ */ ae({
463
465
  "masker-zoom-updated",
464
466
  "masker-position-updated"
465
467
  ],
466
- setup(r, { expose: m, emit: n }) {
467
- const d = r, a = n, s = y(), f = je(d, s, a), { storeRef: t, getMasker: h } = f, { getBindValue: S } = He(t, h, a), { maskerEvents: u } = qe(h, a);
468
- return m(f), (c, k) => (ie(), se("div", Ke, [
468
+ setup(r, { expose: v, emit: n }) {
469
+ const d = r, a = n, i = g(), f = je(d, i, a), { storeRef: t, getMasker: h } = f, { getBindValue: y } = He(t, h, a), { maskerEvents: u } = qe(h, a);
470
+ return v(f), (c, S) => (ce(), ue("div", Ke, [
469
471
  _e(Ue, Ie({
470
472
  ref_key: "maskerElRef",
471
- ref: s,
473
+ ref: i,
472
474
  bimseeProps: d,
473
475
  bimseeStore: C(t)
474
476
  }, Fe(C(u))), {
475
- default: be((T) => [
476
- H(c.$slots, "masker", q(K(T)), void 0, !0)
477
+ default: be((k) => [
478
+ q(c.$slots, "masker", K(W(k)), void 0, !0)
477
479
  ]),
478
480
  _: 3
479
481
  }, 16, ["bimseeStore"]),
480
- H(c.$slots, "default", q(K(C(S))), void 0, !0)
482
+ q(c.$slots, "default", K(W(C(y))), void 0, !0)
481
483
  ]));
482
484
  }
483
- }), tt = /* @__PURE__ */ ce(We, [["__scopeId", "data-v-348a21e7"]]);
485
+ }), tt = /* @__PURE__ */ de(We, [["__scopeId", "data-v-348a21e7"]]);
484
486
  export {
485
487
  De as BIMSEE_CONFIG,
486
488
  tt as Bimsee,
487
489
  tt as BimseePlugin,
488
- W as MASKER_CONFIG
490
+ J as MASKER_CONFIG
489
491
  };
package/dist/index.umd.js CHANGED
@@ -1 +1 @@
1
- (function(_,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@vsleem-realsee-viewer/shared")):typeof define=="function"&&define.amd?define(["exports","vue","@vsleem-realsee-viewer/shared"],e):(_=typeof globalThis<"u"?globalThis:_||self,e(_.BimseePlugin={},_.Vue,_.VSLeemShared))})(this,(function(_,e,g){"use strict";const V={visible:!0,defaultYaw:0,defaultPitch:0,defaultZoomLvl:30,minFov:20,maxFov:120},j={appSetting:g.APP_SETTING,masker:V,immediate:!0},{cloneDeep:X,deepMergeProps:ee,getDiffProps:te}=g.utils;function oe(s,p,a,f){const r=e.ref(X(V)),i=e.ref(),v=e.ref(),o=e.computed(()=>r.value),w=e.computed(()=>{const{coordinateTree:t,mappedCoordinateTree:n,currentSpace:m,currentModel:P,currentPoint:M}=p.value||{};return{coordinateTree:t,mappedCoordinateTree:n,currentSpace:m,currentModel:P,currentPoint:M,cameraStatus:i.value,state:o.value}});e.watch(()=>X(s.value.masker),k,{immediate:!0,deep:!0});function k(t,n){const m=te(t,n);l(m)}function u(){return e.unref(o)}function l(t){t&&ee(r.value,t)}function T(){const t=e.unref(a);t&&(t.addEventListener("mousedown",L),t.addEventListener("touchstart",L),t.addEventListener("click",F),window.addEventListener("mousemove",C),window.addEventListener("touchmove",C),window.addEventListener("mouseup",h),window.addEventListener("touchend",h),t.addEventListener("mouseover",c),t.addEventListener("mouseout",d),t.addEventListener("wheel",S))}function E(){const t=e.unref(a);t&&(t.removeEventListener("mousedown",L),t.removeEventListener("touchstart",L),window.removeEventListener("mousemove",C),window.removeEventListener("touchmove",C),window.removeEventListener("mouseup",h),window.removeEventListener("touchend",h),t.removeEventListener("mouseover",c),t.removeEventListener("mouseout",d),t.removeEventListener("wheel",S))}function F(t){f("click",t)}function L(t){const n=t instanceof TouchEvent?t.touches[0]:t,{defaultYaw:m=0,defaultPitch:P=0}=o.value,M=Number(m)-Number(p.value.currentPoint?.yaw||0);v.value={pageX:n.pageX,pageY:n.pageY,defaultYaw:M,defaultPitch:P},Z(!0),f("mousedown",t)}function C(t){if(!v.value||!W())return;const n=t instanceof TouchEvent?t.touches[0]:t,{pageX:m,pageY:P}=n,{pageX:M,pageY:I}=v.value,{defaultYaw:B=0,defaultPitch:Y=0}=v.value,z=Math.PI*.15/180;let N=(Number(B)-(m-M)*z)%(2*Math.PI),R=(Number(Y)+(P-I)*z)%(2*Math.PI);R=Math.max(-Math.PI/2,Math.min(Math.PI/2,R));const G=new g.Position({yaw:N,pitch:R});J(G)}function h(){Z(!1),v.value=void 0}function c(){U(!0)}function d(){U(!1)}function S(t){t.preventDefault(),t.stopPropagation();const n=Math.sign(t.deltaY)*5;if(n===0)return;const{minFov:m=0,maxFov:P=0}=o.value,{hFov:M=0}=i.value||{},I=Math.min(Math.max(M+n,m),P);I!==M&&Q(b.fovToZoomLevel(I))}function y(){const{defaultYaw:t,defaultPitch:n}=o.value;return{yaw:t,pitch:n}}function x(){return o.value.defaultZoomLvl}function D(){return i.value?.position}function A(){return i.value?.hFov}function me(){return i.value?.target}function pe(){return i.value}function ve(){return o.value?.mouseover??!1}function W(){return o.value?.mousedown??!1}function O(t){i.value={...i.value,...t}}function he(t){l({visible:t})}function U(t){l({mouseover:t})}function Z(t){l({mousedown:t})}function we(t){l({minFov:t})}function Me(t){l({maxFov:t})}function Pe(t){const{currentPoint:n}=p.value;if(n){const{minFov:m,maxFov:P}=o.value,{yaw:M=0,pitch:I=0,zoomLevel:B=0}=t,Y=new g.Position({yaw:M,pitch:I}),z=b.modelPointToCameraPosition(n),N=b.maskerRotateToCameraTarget(Y,z),R=b.zoomLevelToFov(B);l({defaultYaw:M,defaultPitch:I,defaultZoomLvl:B}),O({position:z,target:N,hFov:R,minFov:m,maxFov:P})}}function J(t){const n=i.value?.position;if(!n)return;const{yaw:m,pitch:P}=t,M=Number(p.value.currentPoint?.yaw||0)+m,I=new g.Position({yaw:Number(M),pitch:Number(P)}),B=b.maskerRotateToCameraTarget(I,n);l({defaultYaw:M,defaultPitch:P}),O({target:B}),f("position-updated",{position:t,target:B})}function Q(t){const n=b.zoomLevelToFov(t);l({defaultZoomLvl:t}),O({hFov:n}),f("zoom-updated",{zoomLevel:t,hFov:n})}function ge(t){return new g.Vector3(t)}function ye(t,n){const{x:m=0,y:P=0,z:M=0}=n,{yaw:I,pitch:B}=t,Y=-I,z=B,N=100,R=0,G=N*Math.cos(R+Y)+m,Te=N*Math.sin(R+Y)+P,Ee=N*Math.tan(z)+M;return new g.Vector3({x:G,y:Te,z:Ee})}function Se(t){const{minFov:n=20,maxFov:m=120}=o.value,M=100-(Math.max(n,Math.min(m,t))-n)/(m-n)*100;return Math.max(0,Math.min(100,Math.round(M)))}function ke(t){const{minFov:n=20,maxFov:m=120}=o.value;let P=m+t/100*(n-m);return Math.max(n,Math.min(m,P))}const b={modelPointToCameraPosition:ge,maskerRotateToCameraTarget:ye,fovToZoomLevel:Se,zoomLevelToFov:ke};return{getProps:o,getBindValue:w,maskerAction:{dataHelper:b,isMouseover:ve,isMousedown:W,setState:l,setVisible:he,setMousedown:Z,setMouseover:U,setMinFov:we,setMaxFov:Me,setMaskerStatus:Pe,zoom:Q,rotate:J,getState:u,getPosition:y,getZoomLevel:x,getCameraPosition:D,getCameraTarget:me,getCameraHFov:A,getCameraStatus:pe},handleMaskerEvents:T,handleUninstallEvents:E}}const ne={class:"vsleem-masker"},ae=e.defineComponent({__name:"Masker",props:{bimseeProps:{},bimseeStore:{}},emits:["ready","click","mousedown","zoom-updated","position-updated"],setup(s,{expose:p,emit:a}){const f=s,r=a,i=e.ref(),v=e.computed(()=>f.bimseeProps),o=e.computed(()=>f.bimseeStore),{getProps:w,getBindValue:k,maskerAction:u,handleMaskerEvents:l,handleUninstallEvents:T}=oe(v,o,i,r);e.watch(()=>e.unref(o)?.ready,E,{immediate:!0}),e.onBeforeUnmount(L);function E(C){C&&(F(),l())}function F(){r("ready",u?.getCameraStatus())}function L(){T()}return p(u),(C,h)=>(e.openBlock(),e.createElementBlock("div",ne,[e.withDirectives(e.createElementVNode("div",{ref_key:"maskerElRef",ref:i,class:"masker-container"},null,512),[[e.vShow,e.unref(w).visible]]),e.renderSlot(C.$slots,"default",e.normalizeProps(e.guardReactiveProps(e.unref(k))),void 0,!0)]))}}),q=(s,p)=>{const a=s.__vccOpts||s;for(const[f,r]of p)a[f]=r;return a},re=q(ae,[["__scopeId","data-v-605902cc"]]);var $=(s=>(s[s.StoreMissParams=11e3]="StoreMissParams",s[s.StoreNoCSTree=11001]="StoreNoCSTree",s[s.StoreSelectNoBIMModel=11002]="StoreSelectNoBIMModel",s))($||{});function se(s,{setReferPoint:p}){const a=e.ref(),f=e.ref(),r=e.ref(!1),i=e.ref(!1),v=e.ref(),o=e.ref(),w=e.computed(()=>a.value?.findCsById(v.value)),k=e.computed(()=>w.value?.findParentSpace());async function u(c){const{projectId:d,modelCsId:S}=c||{};try{if(!d)throw new g.AppError($.StoreMissParams,"缺少必要的查询参数");if(r.value=!0,d!=a.value?.projectId){const x=await g.DataSource.getCoordinateTree(d),D=await s.value.handleResponseFn?.(x)||x;if(!D)throw new g.AppError($.StoreNoCSTree,`未查询到项目ID为 ${d} 的坐标系树`);a.value=D}const y=a.value?.findCsById(S);f.value=y?.getMappedCsTree(),T({modelCsId:S}),s.value.fetchSuccess?.(a.value)}catch(y){console.error(y),s.value.fetchError?.(y)}finally{r.value=!1}}function l(c=!1){i.value=c}function T(c){const{modelCsId:d}=c;d&&E({id:d})}function E(c){const{id:d}=c;if(a.value?.findCsById(d)?.modelType===g.CoordinateModelType.BIMModel)v.value=d;else throw new g.AppError($.StoreSelectNoBIMModel,`未找到ID为 ${d} 的BIM模型坐标系`)}function F(c){o.value=c}function L(c){if(!w.value||!c)return;const d=a.value?.findCsById(c.coordinate?.id);if(!d)return;const S=d?.getDestRelativeMap(w.value);if(!S)return;const y=new g.Point(c.point).projection(S,d,w.value);if(y)return y.y=-y.y,{...c,coordinate:w.value,point:y,position:y}}function C(){return h.value}const h=e.computed(()=>({ready:i.value,coordinateTree:a.value,mappedCoordinateTree:f.value,currentPoint:o.value,currentSpace:k.value,currentModel:w.value,reload:u,selectModel:E,selectPoint:F,setReferPoint:p,normalizeToModelPoint:L}));return{storeRef:h,getStore:C,setReady:l}}const{cloneDeep:H,deepMergeProps:ie,getDiffProps:ce}=g.utils;function ue(s,p,a){const f=e.ref(H(j)),r=e.computed(()=>f.value);e.watch(()=>H(s),u,{immediate:!0,deep:!0}),e.watch(()=>r.value.searchInfo,()=>F(i.value.ready),{deep:!0});const{storeRef:i,getStore:v,setReady:o}=se(r,{setReferPoint:C});e.onMounted(w),e.onBeforeUnmount(k);async function w(){const{appSetting:h,immediate:c}=e.unref(r);h&&g.http.setRequestGlobalConfig(h),c&&(await F(!0),setTimeout(E,0))}function k(){a?.("destroy")}function u(h,c){const d=ce(h,c);T(d)}function l(){return e.unref(r)}function T(h){h&&ie(f.value,h)}function E(){o(!0),a?.("ready")}async function F(h){const{searchInfo:c}=r.value;h&&c&&(await i.value?.reload(c),a?.("reload"))}function L(){return p.value}async function C(h,c){const d=v();if(d){const S=d.normalizeToModelPoint(h);if(!S)return;d.selectPoint(S.point),await e.nextTick();const{yaw:y=0,pitch:x=0,zoomLevel:D=0}=c,A=S.point?.yaw+y;L()?.setMaskerStatus({yaw:A,pitch:x,zoomLevel:D})}}return{storeRef:i,getStore:v,getMasker:L,getState:l,setState:T}}function le(s,p,a){const f=e.computed(()=>s.value.ready&&!!s.value.currentModel),r=e.computed(()=>{const{coordinateTree:o,mappedCoordinateTree:w,currentSpace:k,currentModel:u,currentPoint:l}=s.value||{};return{coordinateTree:o,mappedCoordinateTree:w,currentSpace:k,currentModel:u,currentPoint:l}});e.watch(()=>r.value?.currentModel?.id,o=>{o&&i(r.value?.currentModel)},{immediate:!0}),e.watch(()=>r.value?.currentPoint,o=>{o&&v(r.value?.currentPoint)},{immediate:!0,deep:!0});function i(o){a("change-model",o)}function v(o){a("change-point",o)}return{getShow:f,getBindValue:r}}function de(s,p){const a=e.ref({yaw:0,pitch:0});function f(u){p("masker-ready",u)}function r(u){p("masker-click",u)}function i(u){p("masker-mousedown",u)}function v(u){p("masker-zoom-updated",u)}function o(u){p("masker-position-updated",u,w(u))}function w(u){const{yaw:l,pitch:T}=u.position,{yaw:E,pitch:F}=e.unref(a);return a.value={yaw:l,pitch:T},{yaw:l-E,pitch:T-F}}return{maskerEvents:{ready:f,click:r,mousedown:i,zoomUpdated:v,positionUpdated:o}}}const fe={class:"vsleem-bimsee"},K=q(e.defineComponent({name:"Bimsee",__name:"Bimsee",props:{appSetting:{},searchInfo:{},bimseeSetting:{},masker:{default:()=>V},immediate:{type:Boolean,default:!0},handleResponseFn:{},fetchSuccess:{},fetchError:{}},emits:["ready","reload","destroy","change-model","change-point","masker-ready","masker-click","masker-mousedown","masker-zoom-updated","masker-position-updated"],setup(s,{expose:p,emit:a}){const f=s,r=a,i=e.ref(),v=ue(f,i,r),{storeRef:o,getMasker:w}=v,{getBindValue:k}=le(o,w,r),{maskerEvents:u}=de(w,r);return p(v),(l,T)=>(e.openBlock(),e.createElementBlock("div",fe,[e.createVNode(re,e.mergeProps({ref_key:"maskerElRef",ref:i,bimseeProps:f,bimseeStore:e.unref(o)},e.toHandlers(e.unref(u))),{default:e.withCtx(E=>[e.renderSlot(l.$slots,"masker",e.normalizeProps(e.guardReactiveProps(E)),void 0,!0)]),_:3},16,["bimseeStore"]),e.renderSlot(l.$slots,"default",e.normalizeProps(e.guardReactiveProps(e.unref(k))),void 0,!0)]))}}),[["__scopeId","data-v-348a21e7"]]);_.BIMSEE_CONFIG=j,_.Bimsee=K,_.BimseePlugin=K,_.MASKER_CONFIG=V,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(_,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@vsleem-realsee-viewer/shared")):typeof define=="function"&&define.amd?define(["exports","vue","@vsleem-realsee-viewer/shared"],e):(_=typeof globalThis<"u"?globalThis:_||self,e(_.BimseePlugin={},_.Vue,_.VSLeemShared))})(this,(function(_,e,y){"use strict";const V={visible:!0,defaultYaw:0,defaultPitch:0,defaultZoomLvl:30,minFov:20,maxFov:120},X={appSetting:y.APP_SETTING,masker:V,immediate:!0},{cloneDeep:q,deepMergeProps:oe,getDiffProps:ne}=y.utils;function ae(s,p,a,f){const r=e.ref(q(V)),c=e.ref(),v=e.ref(),o=e.computed(()=>r.value),w=e.computed(()=>{const{coordinateTree:t,mappedCoordinateTree:n,currentSpace:m,currentModel:P,currentPoint:M}=p.value||{};return{coordinateTree:t,mappedCoordinateTree:n,currentSpace:m,currentModel:P,currentPoint:M,cameraStatus:c.value,state:o.value}});e.watch(()=>q(s.value.masker),S,{immediate:!0,deep:!0});function S(t,n){const m=ne(t,n);l(m)}function u(){return e.unref(o)}function l(t){t&&oe(r.value,t)}function k(){const t=e.unref(a);t&&(t.addEventListener("mousedown",I),t.addEventListener("touchstart",I),t.addEventListener("click",F),window.addEventListener("mousemove",E),window.addEventListener("touchmove",E),window.addEventListener("mouseup",h),window.addEventListener("touchend",h),t.addEventListener("mouseover",i),t.addEventListener("mouseout",d),t.addEventListener("wheel",C))}function T(){const t=e.unref(a);t&&(t.removeEventListener("mousedown",I),t.removeEventListener("touchstart",I),window.removeEventListener("mousemove",E),window.removeEventListener("touchmove",E),window.removeEventListener("mouseup",h),window.removeEventListener("touchend",h),t.removeEventListener("mouseover",i),t.removeEventListener("mouseout",d),t.removeEventListener("wheel",C))}function F(t){f("click",t)}function I(t){const n=t instanceof TouchEvent?t.touches[0]:t,{defaultYaw:m=0,defaultPitch:P=0}=o.value,M=Number(m)-Number(p.value.currentPoint?.yaw||0);v.value={pageX:n.pageX,pageY:n.pageY,defaultYaw:M,defaultPitch:P},G(!0),f("mousedown",t)}function E(t){if(!v.value||!Q())return;const n=t instanceof TouchEvent?t.touches[0]:t,{pageX:m,pageY:P}=n,{pageX:M,pageY:L}=v.value,{defaultYaw:B=0,defaultPitch:Y=0}=v.value,z=Math.PI*.15/180;let N=(Number(B)-(m-M)*z)%(2*Math.PI),R=(Number(Y)+(P-L)*z)%(2*Math.PI);R=Math.max(-Math.PI/2,Math.min(Math.PI/2,R));const j=new y.Position({yaw:N,pitch:R});ee(j)}function h(){G(!1),v.value=void 0}function i(){Z(!0)}function d(){Z(!1)}function C(t){t.preventDefault(),t.stopPropagation();const n=Math.sign(t.deltaY)*5;if(n===0)return;const{minFov:m=0,maxFov:P=0}=o.value,{hFov:M=0}=c.value||{},L=Math.min(Math.max(M+n,m),P);L!==M&&te(b.fovToZoomLevel(L))}function g(){const{defaultYaw:t,defaultPitch:n}=o.value;return{yaw:t,pitch:n}}function x(){return o.value.defaultZoomLvl}function D(){return c.value?.position}function A(){return c.value?.hFov}function J(){return c.value?.target}function O(){return c.value}function ve(){return o.value?.mouseover??!1}function Q(){return o.value?.mousedown??!1}function U(t){c.value={...c.value,...t}}function he(t){l({visible:t})}function Z(t){l({mouseover:t})}function G(t){l({mousedown:t})}function we(t){l({minFov:t})}function Me(t){l({maxFov:t})}function Pe(t){const{currentPoint:n}=p.value;if(n){const{minFov:m,maxFov:P}=o.value,{zoom:M=0}=t,{yaw:L=0,pitch:B=0}=t.position||{},Y=new y.Position({yaw:L,pitch:B}),z=b.modelPointToCameraPosition(n),N=b.maskerRotateToCameraTarget(Y,z),R=b.zoomLevelToFov(M);l({defaultYaw:L,defaultPitch:B,defaultZoomLvl:M}),U({position:z,target:N,hFov:R,minFov:m,maxFov:P})}}function ee(t){const n=c.value?.position;if(!n)return;const{yaw:m,pitch:P}=t,M=Number(p.value.currentPoint?.yaw||0)+m,L=new y.Position({yaw:Number(M),pitch:Number(P)}),B=b.maskerRotateToCameraTarget(L,n);l({defaultYaw:M,defaultPitch:P}),U({target:B}),f("position-updated",{position:t,target:B})}function te(t){const n=b.zoomLevelToFov(t);l({defaultZoomLvl:t}),U({hFov:n}),f("zoom-updated",{zoomLevel:t,hFov:n})}function ge(t){return new y.Vector3(t)}function ye(t,n){const{x:m=0,y:P=0,z:M=0}=n,{yaw:L,pitch:B}=t,Y=-L,z=B,N=100,R=0,j=N*Math.cos(R+Y)+m,Te=N*Math.sin(R+Y)+P,Ee=N*Math.tan(z)+M;return new y.Vector3({x:j,y:Te,z:Ee})}function Se(t){const{minFov:n=20,maxFov:m=120}=o.value,M=100-(Math.max(n,Math.min(m,t))-n)/(m-n)*100;return Math.max(0,Math.min(100,Math.round(M)))}function ke(t){const{minFov:n=20,maxFov:m=120}=o.value;let P=m+t/100*(n-m);return Math.max(n,Math.min(m,P))}const b={modelPointToCameraPosition:ge,maskerRotateToCameraTarget:ye,fovToZoomLevel:Se,zoomLevelToFov:ke};return{getProps:o,getBindValue:w,maskerAction:{dataHelper:b,isMouseover:ve,isMousedown:Q,setState:l,setVisible:he,setMousedown:G,setMouseover:Z,setMinFov:we,setMaxFov:Me,setMaskerStatus:Pe,zoom:te,rotate:ee,getState:u,getPosition:g,getZoomLevel:x,getCameraPosition:D,getCameraTarget:J,getCameraHFov:A,getCameraStatus:O},handleMaskerEvents:k,handleUninstallEvents:T}}const re={class:"vsleem-masker"},se=e.defineComponent({__name:"Masker",props:{bimseeProps:{},bimseeStore:{}},emits:["ready","click","mousedown","zoom-updated","position-updated"],setup(s,{expose:p,emit:a}){const f=s,r=a,c=e.ref(),v=e.computed(()=>f.bimseeProps),o=e.computed(()=>f.bimseeStore),{getProps:w,getBindValue:S,maskerAction:u,handleMaskerEvents:l,handleUninstallEvents:k}=ae(v,o,c,r);e.watch(()=>e.unref(o)?.ready,T,{immediate:!0}),e.onBeforeUnmount(I);function T(E){E&&(F(),l())}function F(){r("ready",u?.getCameraStatus())}function I(){k()}return p(u),(E,h)=>(e.openBlock(),e.createElementBlock("div",re,[e.withDirectives(e.createElementVNode("div",{ref_key:"maskerElRef",ref:c,class:"masker-container"},null,512),[[e.vShow,e.unref(w).visible]]),e.renderSlot(E.$slots,"default",e.normalizeProps(e.guardReactiveProps(e.unref(S))),void 0,!0)]))}}),H=(s,p)=>{const a=s.__vccOpts||s;for(const[f,r]of p)a[f]=r;return a},ie=H(se,[["__scopeId","data-v-605902cc"]]);var $=(s=>(s[s.StoreMissParams=11e3]="StoreMissParams",s[s.StoreNoCSTree=11001]="StoreNoCSTree",s[s.StoreSelectNoBIMModel=11002]="StoreSelectNoBIMModel",s))($||{});function ce(s,{setReferPoint:p}){const a=e.ref(),f=e.ref(),r=e.ref(!1),c=e.ref(!1),v=e.ref(),o=e.ref(),w=e.computed(()=>a.value?.findCsById(v.value)),S=e.computed(()=>w.value?.findParentSpace());async function u(i){const{projectId:d,modelCsId:C}=i||{};try{if(!d)throw new y.AppError($.StoreMissParams,"缺少必要的查询参数");if(r.value=!0,d!=a.value?.projectId){const x=await y.DataSource.getCoordinateTree(d),D=await s.value.handleResponseFn?.(x)||x;if(!D)throw new y.AppError($.StoreNoCSTree,`未查询到项目ID为 ${d} 的坐标系树`);a.value=D}const g=a.value?.findCsById(C);f.value=g?.getMappedCsTree(),k({modelCsId:C}),s.value.fetchSuccess?.(a.value)}catch(g){console.error(g),s.value.fetchError?.(g)}finally{r.value=!1}}function l(i=!1){c.value=i}function k(i){const{modelCsId:d}=i;d&&T({id:d})}function T(i){const{id:d}=i;if(a.value?.findCsById(d)?.modelType===y.CoordinateModelType.BIMModel)v.value=d;else throw new y.AppError($.StoreSelectNoBIMModel,`未找到ID为 ${d} 的BIM模型坐标系`)}function F(i){o.value=i}function I(i){if(!w.value||!i)return;const d=a.value?.findCsById(i.coordinate?.id);if(!d)return;const C=d?.getDestRelativeMap(w.value);if(!C)return;const g=new y.Point(i.point).projection(C,d,w.value);if(g)return g.y=-g.y,{...i,coordinate:w.value,point:g,position:g}}function E(){return h.value}const h=e.computed(()=>({ready:c.value,coordinateTree:a.value,mappedCoordinateTree:f.value,currentPoint:o.value,currentSpace:S.value,currentModel:w.value,reload:u,selectModel:T,selectPoint:F,setReferPoint:p,normalizeToModelPoint:I}));return{storeRef:h,getStore:E,setReady:l}}const{cloneDeep:K,deepMergeProps:ue,getDiffProps:le}=y.utils;function de(s,p,a){const f=e.ref(K(X)),r=e.computed(()=>f.value);e.watch(()=>K(s),u,{immediate:!0,deep:!0}),e.watch(()=>r.value.searchInfo,()=>F(c.value.ready),{deep:!0});const{storeRef:c,getStore:v,setReady:o}=ce(r,{setReferPoint:E});e.onMounted(w),e.onBeforeUnmount(S);async function w(){const{appSetting:h,immediate:i}=e.unref(r);h&&y.http.setRequestGlobalConfig(h),i&&(await F(!0),setTimeout(T,0))}function S(){a?.("destroy")}function u(h,i){const d=le(h,i);k(d)}function l(){return e.unref(r)}function k(h){h&&ue(f.value,h)}function T(){o(!0),a?.("ready")}async function F(h){const{searchInfo:i}=r.value;h&&i&&(await c.value?.reload(i),a?.("reload"))}function I(){return p.value}async function E(h,i){const d=v();if(d){const C=I();if(!C)return;const g=d.normalizeToModelPoint(h);if(!g)return;d.selectPoint(g.point),await e.nextTick();const{zoom:x=0}=i,{yaw:D=0,pitch:A=0}=i.position||{},O={yaw:g.point?.yaw+D,pitch:A};C.setMaskerStatus({position:O,zoom:x})}}return{storeRef:c,getStore:v,getMasker:I,getState:l,setState:k}}function fe(s,p,a){const f=e.computed(()=>s.value.ready&&!!s.value.currentModel),r=e.computed(()=>{const{coordinateTree:o,mappedCoordinateTree:w,currentSpace:S,currentModel:u,currentPoint:l}=s.value||{};return{coordinateTree:o,mappedCoordinateTree:w,currentSpace:S,currentModel:u,currentPoint:l}});e.watch(()=>r.value?.currentModel?.id,o=>{o&&c(r.value?.currentModel)},{immediate:!0}),e.watch(()=>r.value?.currentPoint,o=>{o&&v(r.value?.currentPoint)},{immediate:!0,deep:!0});function c(o){a("change-model",o)}function v(o){a("change-point",o)}return{getShow:f,getBindValue:r}}function me(s,p){const a=e.ref({yaw:0,pitch:0});function f(u){p("masker-ready",u)}function r(u){p("masker-click",u)}function c(u){p("masker-mousedown",u)}function v(u){p("masker-zoom-updated",u)}function o(u){p("masker-position-updated",u,w(u))}function w(u){const{yaw:l,pitch:k}=u.position,{yaw:T,pitch:F}=e.unref(a);return a.value={yaw:l,pitch:k},{yaw:l-T,pitch:k-F}}return{maskerEvents:{ready:f,click:r,mousedown:c,zoomUpdated:v,positionUpdated:o}}}const pe={class:"vsleem-bimsee"},W=H(e.defineComponent({name:"Bimsee",__name:"Bimsee",props:{appSetting:{},searchInfo:{},bimseeSetting:{},masker:{default:()=>V},immediate:{type:Boolean,default:!0},handleResponseFn:{},fetchSuccess:{},fetchError:{}},emits:["ready","reload","destroy","change-model","change-point","masker-ready","masker-click","masker-mousedown","masker-zoom-updated","masker-position-updated"],setup(s,{expose:p,emit:a}){const f=s,r=a,c=e.ref(),v=de(f,c,r),{storeRef:o,getMasker:w}=v,{getBindValue:S}=fe(o,w,r),{maskerEvents:u}=me(w,r);return p(v),(l,k)=>(e.openBlock(),e.createElementBlock("div",pe,[e.createVNode(ie,e.mergeProps({ref_key:"maskerElRef",ref:c,bimseeProps:f,bimseeStore:e.unref(o)},e.toHandlers(e.unref(u))),{default:e.withCtx(T=>[e.renderSlot(l.$slots,"masker",e.normalizeProps(e.guardReactiveProps(T)),void 0,!0)]),_:3},16,["bimseeStore"]),e.renderSlot(l.$slots,"default",e.normalizeProps(e.guardReactiveProps(e.unref(S))),void 0,!0)]))}}),[["__scopeId","data-v-348a21e7"]]);_.BIMSEE_CONFIG=X,_.Bimsee=W,_.BimseePlugin=W,_.MASKER_CONFIG=V,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})}));
@@ -1,4 +1,4 @@
1
- import { Position, Vector3, Point } from '@vsleem-realsee-viewer/shared';
1
+ import { Point, Position, Vector3 } from '@vsleem-realsee-viewer/shared';
2
2
  export type CameraStatus = {
3
3
  position?: Vector3 /** 相机在世界坐标系中的位置 */;
4
4
  target?: Vector3 /** 相机瞄准的目标点 */;
@@ -7,11 +7,10 @@ export type CameraStatus = {
7
7
  minFov?: number /** 最小视野角度 */;
8
8
  maxFov?: number /** 最大视野角度 */;
9
9
  };
10
- /** 视图选项 */
11
- export type ViewerOptions = {
12
- yaw: number /** 默认偏航角(球面基准) */;
13
- pitch: number /** 默认俯仰角(球面基准) */;
14
- zoomLevel: number /** 默认缩放级别(球面基准) */;
10
+ /** 部分全景图选项 */
11
+ export type PanoOptions = {
12
+ position: Partial<Position> /** 球面视角(球面基准) */;
13
+ zoom: number /** 缩放级别(球面基准) */;
15
14
  };
16
15
  /** 蒙层参数 */
17
16
  export type MaskerProps = {
@@ -48,7 +47,7 @@ export type MaskerElement = {
48
47
  setMouseover: (mouseover: boolean) => void /** 设置鼠标悬停状态 */;
49
48
  setMinFov: (minFov: number) => void /** 设置最小视野 */;
50
49
  setMaxFov: (maxFov: number) => void /** 设置最大视野 */;
51
- setMaskerStatus: (options: ViewerOptions) => void /** 更新蒙层状态 */;
50
+ setMaskerStatus: (options: PanoOptions) => void /** 更新蒙层状态 */;
52
51
  zoom: (level: number) => void /** 缩放到指定级别 */;
53
52
  rotate: (position: Position) => void /** 旋转视图到指定位置 */;
54
53
  getState: () => MaskerProps /** 获取当前蒙层状态 */;
@@ -1,5 +1,5 @@
1
1
  import { Coordinate, Point } from '@vsleem-realsee-viewer/shared';
2
- import { SearchInfo, TrackPoint, ViewerOptions } from '../types';
2
+ import { PanoOptions, SearchInfo, TrackPoint } from '../types';
3
3
  /** Bimsee 状态管理元素类型 */
4
4
  export type BimseeStore = {
5
5
  /** 是否加载完成 */
@@ -21,7 +21,7 @@ export type BimseeStore = {
21
21
  /**设置模型的点 */
22
22
  selectPoint: (point: Point) => void;
23
23
  /** 设置参考点 */
24
- setReferPoint: (current: TrackPoint, options: ViewerOptions) => void;
24
+ setReferPoint: (current: TrackPoint, options: PanoOptions) => void;
25
25
  /**将参考点坐标归一化到当前模型坐标系点 */
26
26
  normalizeToModelPoint: (current: TrackPoint) => TrackPoint | undefined;
27
27
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vsleem-realsee-viewer/bimsee-plugin",
3
- "version": "2.0.24",
3
+ "version": "2.0.26",
4
4
  "description": "Bimsee plugin for VSLeem RealSee Viewer",
5
5
  "main": "./dist/index.umd.js",
6
6
  "module": "./dist/index.mjs",
@@ -13,11 +13,11 @@
13
13
  "dist"
14
14
  ],
15
15
  "dependencies": {
16
- "@vsleem-realsee-viewer/shared": "2.0.24"
16
+ "@vsleem-realsee-viewer/shared": "2.0.26"
17
17
  },
18
18
  "peerDependencies": {
19
19
  "vue": "^3.0.0",
20
- "@vsleem-realsee-viewer/shared": "2.0.24"
20
+ "@vsleem-realsee-viewer/shared": "2.0.26"
21
21
  },
22
22
  "peerDependenciesMeta": {
23
23
  "vue": {