@vsleem-realsee-viewer/bimsee-plugin 2.0.6 → 2.0.8

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