@realsee/dnalogel 2.0.0-alpha.18 → 2.0.0-alpha.19

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.
Files changed (175) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/CSS3DRenderPlugin/index.d.ts +2 -2
  3. package/dist/CameraMovementPlugin/index.js +15 -40
  4. package/dist/CameraMovementPlugin/typing.d.ts +1 -1
  5. package/dist/ModelChassisCompassPlugin/index.js +3 -28
  6. package/dist/ModelEntryDoorGuidePlugin/index.d.ts +1 -1
  7. package/dist/ModelEntryDoorGuidePlugin/index.js +8 -33
  8. package/dist/ModelItemLabelPlugin/events.type.d.ts +2 -2
  9. package/dist/ModelItemLabelPlugin/typings.d.ts +2 -2
  10. package/dist/ModelItemLabelPlugin/utils/parseData.d.ts +1 -1
  11. package/dist/ModelRoomLabelPlugin/utils/parseData.d.ts +1 -1
  12. package/dist/ModelTVVideoPlugin/index.d.ts +1 -1
  13. package/dist/ModelTVVideoPlugin/index.js +3 -28
  14. package/dist/PanoCompassPlugin/index.js +53 -86
  15. package/dist/PanoCursorRaycasterPlugin/index.d.ts +1 -1
  16. package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +8 -8
  17. package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +1 -1
  18. package/dist/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +2 -2
  19. package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +1 -1
  20. package/dist/PanoMeasurePlugin/Controller/index.d.ts +3 -3
  21. package/dist/PanoMeasurePlugin/Model/index.d.ts +2 -2
  22. package/dist/PanoMeasurePlugin/Model/line.d.ts +5 -5
  23. package/dist/PanoMeasurePlugin/Model/point.d.ts +2 -2
  24. package/dist/PanoMeasurePlugin/Model/polyline.d.ts +3 -3
  25. package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +2 -2
  26. package/dist/PanoMeasurePlugin/Modules/FiveHelper.d.ts +1 -1
  27. package/dist/PanoMeasurePlugin/Modules/GuideController.d.ts +1 -1
  28. package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +1 -1
  29. package/dist/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +1 -1
  30. package/dist/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +2 -1
  31. package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +1 -1
  32. package/dist/PanoMeasurePlugin/index.d.ts +1 -1
  33. package/dist/PanoMeasurePlugin/typings/event.type.d.ts +4 -4
  34. package/dist/PanoMeasurePlugin/utils/clearGroup.d.ts +1 -1
  35. package/dist/PanoMeasurePlugin/utils/constants.d.ts +1 -1
  36. package/dist/PanoMeasurePlugin/utils/distanceDom.d.ts +3 -3
  37. package/dist/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +1 -1
  38. package/dist/PanoMeasurePlugin/utils/findClosestPoint.d.ts +3 -3
  39. package/dist/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +2 -2
  40. package/dist/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +1 -1
  41. package/dist/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +1 -1
  42. package/dist/PanoMeasurePlugin/utils/line.d.ts +1 -1
  43. package/dist/PanoRulerPlugin/index.d.ts +1 -1
  44. package/dist/PanoRulerPlugin/index.js +3 -28
  45. package/dist/PanoSpatialTagPlugin/typings.d.ts +1 -1
  46. package/dist/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.d.ts +0 -0
  47. package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +2 -2
  48. package/dist/floorplan/ModelFloorplanPlugin/index.js +1253 -1284
  49. package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +61 -183
  50. package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +28 -15
  51. package/dist/floorplan/TopviewFloorplanPlugin/index.d.ts +1 -1
  52. package/dist/floorplan/TopviewFloorplanPlugin/index.js +1243 -1235
  53. package/dist/floorplan/utils/formatPosition.d.ts +1 -1
  54. package/dist/index.es.js +1429 -1435
  55. package/dist/index.js +1428 -1434
  56. package/dist/index.umd.js +1428 -1434
  57. package/dist/shared-utils/three/getExtraModelLoader.d.ts +1 -1
  58. package/dist/shared-utils/three/getNormal.d.ts +1 -1
  59. package/dist/shared-utils/three/getTextureLoader.d.ts +1 -1
  60. package/dist/shared-utils/three/loadFbxObj.d.ts +1 -1
  61. package/dist/shared-utils/vectorTocoordinates.d.ts +1 -1
  62. package/docs/assets/search.js +1 -1
  63. package/docs/classes/ModelRoomLabelController.html +6 -6
  64. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
  65. package/docs/enums/ModelFloorplanErrorType.html +1 -1
  66. package/docs/interfaces/LineJson.html +1 -1
  67. package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
  68. package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
  69. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
  70. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
  71. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
  72. package/docs/interfaces/ModelFloorplanParameterType.html +1 -1
  73. package/docs/interfaces/ModelFloorplanViewEvent.html +2 -2
  74. package/docs/interfaces/ModelItemLabelPluginData.html +1 -1
  75. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -1
  76. package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -1
  77. package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
  78. package/docs/interfaces/ModelTVVideoPluginData.html +1 -1
  79. package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -1
  80. package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -1
  81. package/docs/interfaces/PanoCompassPluginData.html +1 -1
  82. package/docs/interfaces/PanoCompassPluginParameterType.html +1 -1
  83. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
  84. package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
  85. package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
  86. package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
  87. package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
  88. package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
  89. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
  90. package/docs/interfaces/PointJson.html +1 -1
  91. package/docs/interfaces/RoomLabel.html +7 -7
  92. package/docs/interfaces/TopviewFloorplanPluginParameterType.html +19 -1
  93. package/docs/modules.html +12 -12
  94. package/libs/CSS3DRenderPlugin/index.d.ts +2 -2
  95. package/libs/CameraMovementPlugin/index.js +15 -24
  96. package/libs/CameraMovementPlugin/typing.d.ts +1 -1
  97. package/libs/ModelChassisCompassPlugin/index.js +3 -12
  98. package/libs/ModelEntryDoorGuidePlugin/index.d.ts +1 -1
  99. package/libs/ModelEntryDoorGuidePlugin/index.js +8 -17
  100. package/libs/ModelItemLabelPlugin/events.type.d.ts +2 -2
  101. package/libs/ModelItemLabelPlugin/typings.d.ts +2 -2
  102. package/libs/ModelItemLabelPlugin/utils/parseData.d.ts +1 -1
  103. package/libs/ModelRoomLabelPlugin/utils/parseData.d.ts +1 -1
  104. package/libs/ModelTVVideoPlugin/index.d.ts +1 -1
  105. package/libs/ModelTVVideoPlugin/index.js +3 -12
  106. package/libs/ModelTVVideoPlugin/typings.js +1 -0
  107. package/libs/PanoCompassPlugin/index.js +49 -64
  108. package/libs/PanoCursorRaycasterPlugin/index.d.ts +1 -1
  109. package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +8 -8
  110. package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +1 -1
  111. package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +2 -2
  112. package/libs/PanoMeasurePlugin/Controller/WatchController.d.ts +1 -1
  113. package/libs/PanoMeasurePlugin/Controller/index.d.ts +3 -3
  114. package/libs/PanoMeasurePlugin/Model/index.d.ts +2 -2
  115. package/libs/PanoMeasurePlugin/Model/line.d.ts +5 -5
  116. package/libs/PanoMeasurePlugin/Model/line.js +1 -1
  117. package/libs/PanoMeasurePlugin/Model/point.d.ts +2 -2
  118. package/libs/PanoMeasurePlugin/Model/polyline.d.ts +3 -3
  119. package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +2 -2
  120. package/libs/PanoMeasurePlugin/Modules/FiveHelper.d.ts +1 -1
  121. package/libs/PanoMeasurePlugin/Modules/GuideController.d.ts +1 -1
  122. package/libs/PanoMeasurePlugin/Modules/Magnifier.d.ts +1 -1
  123. package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +1 -1
  124. package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +2 -1
  125. package/libs/PanoMeasurePlugin/Modules/UIController/index.d.ts +1 -1
  126. package/libs/PanoMeasurePlugin/index.d.ts +1 -1
  127. package/libs/PanoMeasurePlugin/typings/event.type.d.ts +4 -4
  128. package/libs/PanoMeasurePlugin/utils/clearGroup.d.ts +1 -1
  129. package/libs/PanoMeasurePlugin/utils/constants.d.ts +1 -1
  130. package/libs/PanoMeasurePlugin/utils/distanceDom.d.ts +3 -3
  131. package/libs/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +1 -1
  132. package/libs/PanoMeasurePlugin/utils/findClosestPoint.d.ts +3 -3
  133. package/libs/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +2 -2
  134. package/libs/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +1 -1
  135. package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +1 -1
  136. package/libs/PanoMeasurePlugin/utils/line.d.ts +1 -1
  137. package/libs/PanoMeasurePlugin/utils/mouseGroup.js +1 -0
  138. package/libs/PanoRulerPlugin/index.d.ts +1 -1
  139. package/libs/PanoRulerPlugin/index.js +3 -12
  140. package/libs/PanoSpatialTagPlugin/typings.d.ts +1 -1
  141. package/libs/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.d.ts +0 -0
  142. package/libs/floorplan/{ModelFloorplanPlugin/Assets → Assets}/compass.js +0 -0
  143. package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/Camera.js +2 -2
  144. package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/Compass.js +0 -0
  145. package/libs/floorplan/{ModelFloorplanPlugin/Components/CurrentFloor → Components}/CurrentFloor.js +73 -80
  146. package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/Main.js +186 -105
  147. package/libs/floorplan/Components/RoomHighlight/Room.js +5 -7
  148. package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +24 -116
  149. package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/RoomLabels/RoomLabel.js +0 -0
  150. package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/RoomLabels/RoomLabels.js +2 -2
  151. package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +26 -22
  152. package/libs/floorplan/Components/RuleLabels/RuleItem.js +284 -0
  153. package/libs/floorplan/{ModelFloorplanPlugin/Components → Components}/RuleLabels/RuleLabels.js +82 -32
  154. package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +2 -2
  155. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +34 -43
  156. package/libs/floorplan/ModelFloorplanPlugin/utils/correctFiveState.js +22 -33
  157. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +3 -12
  158. package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +28 -15
  159. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +80 -54
  160. package/libs/floorplan/TopviewFloorplanPlugin/index.d.ts +1 -1
  161. package/libs/floorplan/TopviewFloorplanPlugin/style.js +0 -1
  162. package/libs/floorplan/utils/formatData.js +28 -43
  163. package/libs/floorplan/utils/formatPosition.d.ts +1 -1
  164. package/libs/floorplan/utils/formatPosition.js +2 -2
  165. package/libs/shared-utils/five/changeMode.js +12 -23
  166. package/libs/shared-utils/three/getExtraModelLoader.d.ts +1 -1
  167. package/libs/shared-utils/three/getNormal.d.ts +1 -1
  168. package/libs/shared-utils/three/getTextureLoader.d.ts +1 -1
  169. package/libs/shared-utils/three/loadFbxObj.d.ts +1 -1
  170. package/libs/shared-utils/three/loadFbxObj.js +9 -20
  171. package/libs/shared-utils/three/loadTexture.js +6 -17
  172. package/libs/shared-utils/to.js +10 -21
  173. package/libs/shared-utils/vectorTocoordinates.d.ts +1 -1
  174. package/package.json +1 -1
  175. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.js +0 -301
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2.0.0-alpha.19
4
+ - 1.fix: 修复在模型中切换全部楼层,切换回户型图,展示的是上一次展示时的楼层;
5
+ - 2.fix: 修复户型图界面切换楼层时,图片与SVG渲染有时间差导致闪烁的问题;
6
+ - 3.feat: TopviewFloorplanPlugin 插件支持放大缩小;
7
+ - 4.feat: ModelFloorplanPlugin 插件,autoShowEnable 和 hoverEnable 能同时支持;
8
+ - 5.chore: 设置 tsconfig.json importsNotUsedAsValues 为 error,在引用类型时,必须显示写为 import type。
9
+
3
10
  ## 2.0.0-alpha.18
4
11
  - 1.fix: 修复 PanoMeasurePlugin 使用时 hammerjs 报错问题。
5
12
 
@@ -1,7 +1,7 @@
1
- import { FivePlugin } from '@realsee/five';
1
+ import type { FivePlugin } from '@realsee/five';
2
+ import type { Vector3Position } from '../typings/math.type';
2
3
  import { Vector3 } from 'three';
3
4
  import { CSS3DObject } from 'three/examples/jsm/renderers/CSS3DRenderer';
4
- import { Vector3Position } from '../typings/math.type';
5
5
  export declare type CSS3DRenderPluginParameterType = undefined;
6
6
  export interface CSS3DRenderPluginExportType {
7
7
  /**
@@ -25,31 +25,6 @@ function _interopNamespace(e) {
25
25
 
26
26
  var TWEEN__namespace = /*#__PURE__*/_interopNamespace(TWEEN);
27
27
 
28
- /*! *****************************************************************************
29
- Copyright (c) Microsoft Corporation.
30
-
31
- Permission to use, copy, modify, and/or distribute this software for any
32
- purpose with or without fee is hereby granted.
33
-
34
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
35
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
36
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
37
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
38
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
39
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
40
- PERFORMANCE OF THIS SOFTWARE.
41
- ***************************************************************************** */
42
-
43
- function __awaiter(thisArg, _arguments, P, generator) {
44
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
45
- return new (P || (P = Promise))(function (resolve, reject) {
46
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
47
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
48
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
49
- step((generator = generator.apply(thisArg, _arguments || [])).next());
50
- });
51
- }
52
-
53
28
  const _requestAnimationFrame = window.requestAnimationFrame || ((fn) => setTimeout(fn, 16));
54
29
  const _cancelAnimationFrame = window.cancelAnimationFrame || clearTimeout;
55
30
  function nextFrame(fn, delay = 0) {
@@ -195,21 +170,21 @@ const getLongitudeParams = (from, to, rotation) => {
195
170
  */
196
171
  const CameraMovementPlugin = (five$1) => {
197
172
  const state = {};
198
- const move = (args, duration, opts = { preload: true }) => __awaiter(void 0, void 0, void 0, function* () {
173
+ const move = async (args, duration, opts = { preload: true }) => {
199
174
  if (state.interruptCallback) {
200
175
  state.interruptCallback(false);
201
176
  }
202
177
  if (opts.asyncStartCallback) {
203
- yield opts.asyncStartCallback();
178
+ await opts.asyncStartCallback();
204
179
  }
205
180
  if (args.mode && args.mode !== five$1.currentMode) {
206
- yield five$1.changeMode(args.mode);
181
+ await five$1.changeMode(args.mode);
207
182
  }
208
183
  if (opts.preload && args.panoIndex !== undefined && args.panoIndex !== five$1.panoIndex) {
209
- yield five$1.preloadPano(args.panoIndex);
184
+ await five$1.preloadPano(args.panoIndex);
210
185
  }
211
186
  if (opts.asyncEndCallback) {
212
- yield opts.asyncEndCallback();
187
+ await opts.asyncEndCallback();
213
188
  }
214
189
  if (args.panoIndex === undefined &&
215
190
  args.fov === undefined &&
@@ -217,7 +192,7 @@ const CameraMovementPlugin = (five$1) => {
217
192
  args.longitude === undefined) {
218
193
  return true;
219
194
  }
220
- return yield new Promise((resolve, reject) => {
195
+ return await new Promise((resolve, reject) => {
221
196
  const panoIndex = args.panoIndex !== undefined ? args.panoIndex : five$1.panoIndex;
222
197
  if (panoIndex !== undefined) {
223
198
  five$1.moveToPano(panoIndex, Object.assign({
@@ -230,7 +205,7 @@ const CameraMovementPlugin = (five$1) => {
230
205
  reject(false);
231
206
  }
232
207
  });
233
- });
208
+ };
234
209
  const getAnimeParams = (args) => {
235
210
  const currentFiveState = five$1.state;
236
211
  // latitude
@@ -246,20 +221,20 @@ const CameraMovementPlugin = (five$1) => {
246
221
  to: { latitude: toLatitude, longitude: toLongitude, fov: toFov },
247
222
  };
248
223
  };
249
- const rotate = (args, duration, opts = {}) => __awaiter(void 0, void 0, void 0, function* () {
224
+ const rotate = async (args, duration, opts = {}) => {
250
225
  if (state.interruptCallback) {
251
226
  state.interruptCallback(false);
252
227
  }
253
228
  if (opts.asyncStartCallback) {
254
- yield opts.asyncStartCallback();
229
+ await opts.asyncStartCallback();
255
230
  }
256
231
  if (five$1.currentMode !== five.Five.Mode.Panorama) {
257
- yield five$1.changeMode(five.Five.Mode.Panorama);
232
+ await five$1.changeMode(five.Five.Mode.Panorama);
258
233
  }
259
234
  if (args.panoIndex !== undefined && args.panoIndex !== five$1.panoIndex) {
260
235
  if (opts.preload)
261
- yield five$1.preloadPano(args.panoIndex);
262
- yield new Promise((resolve, reject) => {
236
+ await five$1.preloadPano(args.panoIndex);
237
+ await new Promise((resolve, reject) => {
263
238
  if (!args.panoIndex) {
264
239
  resolve(true);
265
240
  return;
@@ -271,10 +246,10 @@ const CameraMovementPlugin = (five$1) => {
271
246
  });
272
247
  }
273
248
  if (opts.asyncEndCallback) {
274
- yield opts.asyncEndCallback();
249
+ await opts.asyncEndCallback();
275
250
  }
276
251
  const { from, to } = getAnimeParams(args);
277
- return yield new Promise((resolve) => {
252
+ return await new Promise((resolve) => {
278
253
  const onUpdate = ({ progress }) => {
279
254
  const state = {};
280
255
  state.longitude = progressNumber(from.longitude, to.longitude, progress);
@@ -316,7 +291,7 @@ const CameraMovementPlugin = (five$1) => {
316
291
  state.interruptCallback(true);
317
292
  }, duration);
318
293
  });
319
- });
294
+ };
320
295
  return {
321
296
  move,
322
297
  rotate,
@@ -1,4 +1,4 @@
1
- import { Mode, Pose } from '@realsee/five';
1
+ import type { Mode, Pose } from '@realsee/five';
2
2
  export interface CameraMovementPluginParameterType {
3
3
  }
4
4
  export interface CameraMovementPluginExportType {
@@ -25,31 +25,6 @@ function _interopNamespace(e) {
25
25
 
26
26
  var THREE__namespace = /*#__PURE__*/_interopNamespace(THREE);
27
27
 
28
- /*! *****************************************************************************
29
- Copyright (c) Microsoft Corporation.
30
-
31
- Permission to use, copy, modify, and/or distribute this software for any
32
- purpose with or without fee is hereby granted.
33
-
34
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
35
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
36
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
37
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
38
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
39
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
40
- PERFORMANCE OF THIS SOFTWARE.
41
- ***************************************************************************** */
42
-
43
- function __awaiter(thisArg, _arguments, P, generator) {
44
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
45
- return new (P || (P = Promise))(function (resolve, reject) {
46
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
47
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
48
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
49
- step((generator = generator.apply(thisArg, _arguments || [])).next());
50
- });
51
- }
52
-
53
28
  const genRotationMatrix = (x, y, z) => {
54
29
  const matrix = new THREE__namespace.Matrix4();
55
30
  const euler = new THREE__namespace.Euler(x, y, z, 'YXZ');
@@ -101,7 +76,7 @@ const ModelChassisCompassPlugin = (five, params) => {
101
76
  const defaultNorthRad = params.north_rad || undefined;
102
77
  // 局部状态
103
78
  const state = {};
104
- const load = (data) => __awaiter(void 0, void 0, void 0, function* () {
79
+ const load = async (data) => {
105
80
  const fbxUrl = (data === null || data === void 0 ? void 0 : data.fbx_url) || defaultFbxUrl;
106
81
  const northRad = (data === null || data === void 0 ? void 0 : data.north_rad) || defaultNorthRad;
107
82
  if (!northRad) {
@@ -112,7 +87,7 @@ const ModelChassisCompassPlugin = (five, params) => {
112
87
  const zOffset = bounding.max.z - bounding.min.z;
113
88
  const maxOffset = Math.max(xOffset, zOffset);
114
89
  const fbxLoader = new FBXLoader.FBXLoader();
115
- const object = yield fbxLoader.loadAsync(fbxUrl);
90
+ const object = await fbxLoader.loadAsync(fbxUrl);
116
91
  transfromToMeshBasicMaterial(object, {
117
92
  transparent: true,
118
93
  side: THREE__namespace.DoubleSide,
@@ -126,7 +101,7 @@ const ModelChassisCompassPlugin = (five, params) => {
126
101
  bject3d2LocalMatrix(object, { position, rotation, scale });
127
102
  state.object = object;
128
103
  return true;
129
- });
104
+ };
130
105
  const onCameraUpdate = ({ latitude }) => {
131
106
  if (!state.object)
132
107
  return;
@@ -1,5 +1,5 @@
1
1
  import type { FivePlugin } from '@realsee/five';
2
- import { Vector3Position } from '../typings/math.type';
2
+ import type { Vector3Position } from '../typings/math.type';
3
3
  export interface ModelEntryDoorGuidePluginData {
4
4
  position?: Vector3Position;
5
5
  rad?: number;
@@ -25,31 +25,6 @@ function _interopNamespace(e) {
25
25
 
26
26
  var THREE__namespace = /*#__PURE__*/_interopNamespace(THREE);
27
27
 
28
- /*! *****************************************************************************
29
- Copyright (c) Microsoft Corporation.
30
-
31
- Permission to use, copy, modify, and/or distribute this software for any
32
- purpose with or without fee is hereby granted.
33
-
34
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
35
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
36
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
37
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
38
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
39
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
40
- PERFORMANCE OF THIS SOFTWARE.
41
- ***************************************************************************** */
42
-
43
- function __awaiter(thisArg, _arguments, P, generator) {
44
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
45
- return new (P || (P = Promise))(function (resolve, reject) {
46
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
47
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
48
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
49
- step((generator = generator.apply(thisArg, _arguments || [])).next());
50
- });
51
- }
52
-
53
28
  function createCanvasTextTexture(text, config) {
54
29
  var _a, _b, _c, _d, _e;
55
30
  const size = (_a = config === null || config === void 0 ? void 0 : config.size) !== null && _a !== void 0 ? _a : 512;
@@ -99,25 +74,25 @@ const ModelEntryDoorGuidePlugin = (five, params) => {
99
74
  const defaultRad = (_c = params.rad) !== null && _c !== void 0 ? _c : undefined;
100
75
  const defaultFbxUrl = params.fbx_url || '//vrlab-image4.ljcdn.com/release/web/entryDoorMini/Anim_Door1.fbx';
101
76
  const mixers = [];
102
- const load = (data) => __awaiter(void 0, void 0, void 0, function* () {
103
- var _d, _e, _f, _g, _h, _j, _k;
104
- const position = (_d = data === null || data === void 0 ? void 0 : data.position) !== null && _d !== void 0 ? _d : defaultModelPosition;
77
+ const load = async (data) => {
78
+ var _a, _b, _c, _d, _e, _f, _g;
79
+ const position = (_a = data === null || data === void 0 ? void 0 : data.position) !== null && _a !== void 0 ? _a : defaultModelPosition;
105
80
  if (!position)
106
81
  return Promise.reject(`ModelEntryDoorGuidePlugin.load(): position is undefined`);
107
82
  const modelPosition = transformPositionToVector3(position);
108
- const rad = (_e = data === null || data === void 0 ? void 0 : data.rad) !== null && _e !== void 0 ? _e : defaultRad;
109
- const fbxUrl = (_f = data === null || data === void 0 ? void 0 : data.fbx_url) !== null && _f !== void 0 ? _f : defaultFbxUrl;
83
+ const rad = (_b = data === null || data === void 0 ? void 0 : data.rad) !== null && _b !== void 0 ? _b : defaultRad;
84
+ const fbxUrl = (_c = data === null || data === void 0 ? void 0 : data.fbx_url) !== null && _c !== void 0 ? _c : defaultFbxUrl;
110
85
  state.rad = rad;
111
86
  if (rad === undefined)
112
87
  return Promise.reject(`ModelEntryDoorGuidePlugin.load(): rad is ${rad}`);
113
88
  // 加载模型
114
- const object = yield new FBXLoader.FBXLoader().loadAsync(fbxUrl);
89
+ const object = await new FBXLoader.FBXLoader().loadAsync(fbxUrl);
115
90
  // 设置位置
116
91
  object.position.copy(modelPosition);
117
92
  object.rotation.z = rad;
118
93
  object.scale.set(0.8, 0.8, 0.8);
119
94
  transfromToMeshBasicMaterial(object, { transparent: true, side: THREE__namespace.DoubleSide });
120
- const textMesh = (_k = (_j = (_h = (_g = object.children) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.children) === null || _j === void 0 ? void 0 : _j[3]) === null || _k === void 0 ? void 0 : _k.clone();
95
+ const textMesh = (_g = (_f = (_e = (_d = object.children) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.children) === null || _f === void 0 ? void 0 : _f[3]) === null || _g === void 0 ? void 0 : _g.clone();
121
96
  if (!textMesh)
122
97
  return Promise.reject(`ModelEntryDoorGuidePlugin.load(): textMesh is ${textMesh}`);
123
98
  textMesh.material = new THREE.MeshBasicMaterial({ transparent: true, map: createCanvasTextTexture('入户门') });
@@ -125,7 +100,7 @@ const ModelEntryDoorGuidePlugin = (five, params) => {
125
100
  object.children[0].add(textMesh);
126
101
  state.object = object;
127
102
  return true;
128
- });
103
+ };
129
104
  const initAnimation = () => {
130
105
  if (state.animation)
131
106
  return;
@@ -1,5 +1,5 @@
1
- import { SubscribeEventMap } from '@realsee/five';
2
- import { ItemLabel } from "./typings";
1
+ import type { SubscribeEventMap } from '@realsee/five';
2
+ import type { ItemLabel } from "./typings";
3
3
  export interface ItemLabelEvent extends SubscribeEventMap {
4
4
  /**
5
5
  * 点击标签
@@ -1,6 +1,6 @@
1
- import ItemLabelComponent from './ItemLabelComponent.svelte';
2
1
  import type { Subscribe } from "@realsee/five";
3
- import { PluginEvent } from "./events.type";
2
+ import type { PluginEvent } from "./events.type";
3
+ import type ItemLabelComponent from './ItemLabelComponent.svelte';
4
4
  export declare enum DISPLAY_STRATEGY_TYPE {
5
5
  SMALL = "small",
6
6
  MIDLLE = "middle",
@@ -1,3 +1,3 @@
1
- import { ModelItemLabelPluginData, ItemLabel } from '../typings';
1
+ import type { ModelItemLabelPluginData, ItemLabel } from '../typings';
2
2
  /** @description 转成内部所需数据 */
3
3
  export declare function parseModelItemLabelPluginData(data: ModelItemLabelPluginData): ItemLabel[];
@@ -1,3 +1,3 @@
1
- import { ModelRoomLabelPluginData, RoomLabel } from '../typings';
1
+ import type { ModelRoomLabelPluginData, RoomLabel } from '../typings';
2
2
  /** @description 下划线转驼峰 */
3
3
  export declare function parseModelRoomLabelPluginData(data: ModelRoomLabelPluginData): RoomLabel[];
@@ -1,4 +1,4 @@
1
1
  import type { FivePlugin } from '@realsee/five';
2
- import { ModelTVVideoPluginExportType, ModelTVVideoPluginParameterType } from "./typings";
2
+ import type { ModelTVVideoPluginExportType, ModelTVVideoPluginParameterType } from "./typings";
3
3
  export declare const ModelTVVideoPlugin: FivePlugin<ModelTVVideoPluginParameterType, ModelTVVideoPluginExportType>;
4
4
  export default ModelTVVideoPlugin;
@@ -24,31 +24,6 @@ function _interopNamespace(e) {
24
24
 
25
25
  var THREE__namespace = /*#__PURE__*/_interopNamespace(THREE);
26
26
 
27
- /*! *****************************************************************************
28
- Copyright (c) Microsoft Corporation.
29
-
30
- Permission to use, copy, modify, and/or distribute this software for any
31
- purpose with or without fee is hereby granted.
32
-
33
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
34
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
35
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
36
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
37
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
38
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
39
- PERFORMANCE OF THIS SOFTWARE.
40
- ***************************************************************************** */
41
-
42
- function __awaiter(thisArg, _arguments, P, generator) {
43
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
44
- return new (P || (P = Promise))(function (resolve, reject) {
45
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
46
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
47
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
48
- step((generator = generator.apply(thisArg, _arguments || [])).next());
49
- });
50
- }
51
-
52
27
  var DIRECTION;
53
28
  (function (DIRECTION) {
54
29
  DIRECTION["TOP_LEFT"] = "topLeft";
@@ -222,7 +197,7 @@ const ModelTVVideoPlugin = (five, { videoElement }) => {
222
197
  xhr.send();
223
198
  });
224
199
  };
225
- const load = (data, videoElement) => __awaiter(void 0, void 0, void 0, function* () {
200
+ const load = async (data, videoElement) => {
226
201
  const { video_src, video_poster_src, points } = data;
227
202
  state.videoSource = video_src;
228
203
  // TODO 存疑,先处理多一次遍历 o(2n)
@@ -232,11 +207,11 @@ const ModelTVVideoPlugin = (five, { videoElement }) => {
232
207
  if (videoElement) {
233
208
  state.videoElement = videoElement;
234
209
  }
235
- state.videoTexture = yield getVideoTexture(state.videoSource, state.videoElement);
210
+ state.videoTexture = await getVideoTexture(state.videoSource, state.videoElement);
236
211
  state.enabled = !!data.enable;
237
212
  if (state.enabled)
238
213
  enable();
239
- });
214
+ };
240
215
  const dispose = () => {
241
216
  disable();
242
217
  state.videoTexture = undefined;
@@ -29,31 +29,6 @@ function _interopNamespace(e) {
29
29
  var THREE__namespace = /*#__PURE__*/_interopNamespace(THREE);
30
30
  var TWEEN__default = /*#__PURE__*/_interopDefaultLegacy(TWEEN);
31
31
 
32
- /*! *****************************************************************************
33
- Copyright (c) Microsoft Corporation.
34
-
35
- Permission to use, copy, modify, and/or distribute this software for any
36
- purpose with or without fee is hereby granted.
37
-
38
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
39
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
40
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
41
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
42
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
43
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
44
- PERFORMANCE OF THIS SOFTWARE.
45
- ***************************************************************************** */
46
-
47
- function __awaiter(thisArg, _arguments, P, generator) {
48
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
49
- return new (P || (P = Promise))(function (resolve, reject) {
50
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
51
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
52
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
53
- step((generator = generator.apply(thisArg, _arguments || [])).next());
54
- });
55
- }
56
-
57
32
  const roomInfoIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZIAAABCCAYAAAB9y1BhAAAAAXNSR0IArs4c6QAADh5JREFUeAHtnVuPLDcVhedwC/dACKAICDxEIBQpygNI/Ab+MX8B8YCQEAjxgBAQLsm5Jjkn58r6Sl4jT52qnu4zXd121dqSx67q7ip7eXsv721XzcVFJAgEgSAQBIJAEAgCQeC4CLx48eKbSu+RH/fKuVoQWB8Cn1tfk9KiIHAUBH6tq/xKiTwSBILADgRCJDvAyUebRuAbpfXxSDatBmn8Pgh8YZ8v5TtBYIMIvFCbSZEgEASuQSBEcg1A+XizCDzfbMvT8CBwIAIhkgMBy9c3g0CIZDNdnYbeFIEQyU0RzO/XikCIZK09m3YdHYEQydEhzQVXgkCIZCUdmWYsj0CIZHmMc4c+EchCe5/9llqfAYEQyRlAzy27QCAeSRfdlEq2gECIpI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BcZmGmfH64GzTQkCASBILBhBAqhgEC9rDFGJI7FGJEcB4EgEASCQBAIAkEgCASBIBAEgkAQCAJBIAgEgSAQBIJAEAgCm0fg/x4jQQWGalpFAAAAAElFTkSuQmCC';
58
33
 
59
34
  function getRoomInfoInstance() {
@@ -105,14 +80,12 @@ function getRoomInfoInstance() {
105
80
  }
106
81
 
107
82
  const textureLoader = new THREE__namespace.TextureLoader();
108
- function loadTexture(url) {
109
- return __awaiter(this, void 0, void 0, function* () {
110
- return new Promise((resolve, reject) => {
111
- textureLoader.load(url, resolve, undefined, reject);
112
- }).then((texture) => {
113
- texture.encoding = THREE__namespace.sRGBEncoding;
114
- return texture;
115
- });
83
+ async function loadTexture(url) {
84
+ return new Promise((resolve, reject) => {
85
+ textureLoader.load(url, resolve, undefined, reject);
86
+ }).then((texture) => {
87
+ texture.encoding = THREE__namespace.sRGBEncoding;
88
+ return texture;
116
89
  });
117
90
  }
118
91
 
@@ -591,65 +564,59 @@ class PanoCompassController {
591
564
  if (this.modelLoaded)
592
565
  this.init();
593
566
  }
594
- init() {
595
- return __awaiter(this, void 0, void 0, function* () {
596
- if (!this.data || !this.modelLoaded)
597
- return;
598
- const northRad = this.data.north_rad;
599
- if (northRad != null) {
600
- this.compassMesh = yield this.loadCompassMesh();
601
- this.compassMesh.rotateX(-Math.PI / 2);
602
- this.compassMesh.rotateZ(northRad - Math.PI / 2);
603
- this.group.add(this.compassMesh);
604
- }
605
- if (this.data.entrance != null) {
606
- this.entryDoorMesh = yield this.loadEntryDoorMesh();
607
- this.roomInfoWrapperInstance = this.loadRoomInfo();
608
- this.roomInfoInstance = getRoomInfoInstance();
609
- this.entryDoorMesh.rotateX(-Math.PI / 2);
610
- if (this.roomInfoWrapperInstance)
611
- this.roomInfoInstance.appendTo(this.roomInfoWrapperInstance.container);
612
- this.group.add(this.entryDoorMesh);
613
- }
614
- this.onFivePanoArrived(this.five.panoIndex || 0);
615
- this.five.needsRender = true;
616
- });
567
+ async init() {
568
+ if (!this.data || !this.modelLoaded)
569
+ return;
570
+ const northRad = this.data.north_rad;
571
+ if (northRad != null) {
572
+ this.compassMesh = await this.loadCompassMesh();
573
+ this.compassMesh.rotateX(-Math.PI / 2);
574
+ this.compassMesh.rotateZ(northRad - Math.PI / 2);
575
+ this.group.add(this.compassMesh);
576
+ }
577
+ if (this.data.entrance != null) {
578
+ this.entryDoorMesh = await this.loadEntryDoorMesh();
579
+ this.roomInfoWrapperInstance = this.loadRoomInfo();
580
+ this.roomInfoInstance = getRoomInfoInstance();
581
+ this.entryDoorMesh.rotateX(-Math.PI / 2);
582
+ if (this.roomInfoWrapperInstance)
583
+ this.roomInfoInstance.appendTo(this.roomInfoWrapperInstance.container);
584
+ this.group.add(this.entryDoorMesh);
585
+ }
586
+ this.onFivePanoArrived(this.five.panoIndex || 0);
587
+ this.five.needsRender = true;
617
588
  }
618
- loadCompassMesh() {
589
+ async loadCompassMesh() {
619
590
  var _a;
620
- return __awaiter(this, void 0, void 0, function* () {
621
- const compassImageUrl = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.compassImageUrl) ||
622
- '//vrlab-image4.ljcdn.com/release/web/v3/north-point-circle.96498e69.png';
623
- const compassTexture = yield loadTexture(compassImageUrl);
624
- const compassGeometry = new THREE__namespace.CircleGeometry(0.7, 32);
625
- const compassMaterial = new THREE__namespace.MeshBasicMaterial({
626
- map: compassTexture,
627
- transparent: true,
628
- opacity: 0,
629
- depthTest: false,
630
- });
631
- const compassMesh = new THREE__namespace.Mesh(compassGeometry, compassMaterial);
632
- compassMesh.name = 'pano-compass-mesh';
633
- return compassMesh;
591
+ const compassImageUrl = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.compassImageUrl) ||
592
+ '//vrlab-image4.ljcdn.com/release/web/v3/north-point-circle.96498e69.png';
593
+ const compassTexture = await loadTexture(compassImageUrl);
594
+ const compassGeometry = new THREE__namespace.CircleGeometry(0.7, 32);
595
+ const compassMaterial = new THREE__namespace.MeshBasicMaterial({
596
+ map: compassTexture,
597
+ transparent: true,
598
+ opacity: 0,
599
+ depthTest: false,
634
600
  });
601
+ const compassMesh = new THREE__namespace.Mesh(compassGeometry, compassMaterial);
602
+ compassMesh.name = 'pano-compass-mesh';
603
+ return compassMesh;
635
604
  }
636
- loadEntryDoorMesh() {
605
+ async loadEntryDoorMesh() {
637
606
  var _a;
638
- return __awaiter(this, void 0, void 0, function* () {
639
- const entryDoorImageUrl = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.entryDoorImageUrl) ||
640
- '//vrlab-image4.ljcdn.com/release/web/enterDoor.831b8208.png';
641
- const entryDoorTexture = yield loadTexture(entryDoorImageUrl);
642
- const entryDoorGeometry = new THREE__namespace.PlaneGeometry(0.2, 0.16);
643
- const entryDoorMaterial = new THREE__namespace.MeshBasicMaterial({
644
- map: entryDoorTexture,
645
- transparent: true,
646
- opacity: 0.8,
647
- depthTest: false,
648
- });
649
- const entryDoorMesh = new THREE__namespace.Mesh(entryDoorGeometry, entryDoorMaterial);
650
- entryDoorMesh.name = 'pano-compass-entry-door';
651
- return entryDoorMesh;
607
+ const entryDoorImageUrl = ((_a = this.config) === null || _a === void 0 ? void 0 : _a.entryDoorImageUrl) ||
608
+ '//vrlab-image4.ljcdn.com/release/web/enterDoor.831b8208.png';
609
+ const entryDoorTexture = await loadTexture(entryDoorImageUrl);
610
+ const entryDoorGeometry = new THREE__namespace.PlaneGeometry(0.2, 0.16);
611
+ const entryDoorMaterial = new THREE__namespace.MeshBasicMaterial({
612
+ map: entryDoorTexture,
613
+ transparent: true,
614
+ opacity: 0.8,
615
+ depthTest: false,
652
616
  });
617
+ const entryDoorMesh = new THREE__namespace.Mesh(entryDoorGeometry, entryDoorMaterial);
618
+ entryDoorMesh.name = 'pano-compass-entry-door';
619
+ return entryDoorMesh;
653
620
  }
654
621
  loadRoomInfo() {
655
622
  const points = [
@@ -1,5 +1,5 @@
1
- import { Group, Vector3 } from 'three';
2
1
  import type { FivePlugin, Intersection } from '@realsee/five';
2
+ import { Group, Vector3 } from 'three';
3
3
  export interface PanoCursorRaycasterPluginParameterType {
4
4
  }
5
5
  export interface PanoCursorRaycasterPluginExportType {
@@ -1,11 +1,11 @@
1
- import Line from '../Model/line';
2
- import Magnifier from '../Modules/Magnifier';
3
- import FiveHelper from '../Modules/FiveHelper';
4
- import { Group } from 'three';
5
- import { Model } from '../Model';
6
- import { PluginEvent } from '../typings/event.type';
7
- import { Five, Intersection, IntersectMeshInterface, Subscribe } from '@realsee/five';
8
- import { UserDistanceItem } from '../utils/distanceDom';
1
+ import type Line from '../Model/line';
2
+ import type Magnifier from '../Modules/Magnifier';
3
+ import type FiveHelper from '../Modules/FiveHelper';
4
+ import type { Group } from 'three';
5
+ import type { Model } from '../Model';
6
+ import type { PluginEvent } from '../typings/event.type';
7
+ import type { UserDistanceItem } from '../utils/distanceDom';
8
+ import type { Five, Intersection, IntersectMeshInterface, Subscribe } from '@realsee/five';
9
9
  export interface IControllerParams {
10
10
  five: Five;
11
11
  group: Group;
@@ -1,6 +1,6 @@
1
+ import type { LineJson } from '../typings/data';
1
2
  import { Model } from '../Model';
2
3
  import Line from '../Model/line';
3
- import { LineJson } from '../typings/data';
4
4
  import BaseController, { IControllerParams } from './BaseController';
5
5
  export interface EditEvent {
6
6
  editedLineChange: (lines: LineJson[]) => void;
@@ -1,5 +1,5 @@
1
- import MeasureController from '.';
2
- import { Five } from '@realsee/five';
1
+ import type MeasureController from '.';
2
+ import type { Five } from '@realsee/five';
3
3
  /** 快捷键控制器 */
4
4
  export declare class ShortcutKeyController {
5
5
  five: Five;
@@ -1,4 +1,4 @@
1
- import Line from '../Model/line';
1
+ import type Line from '../Model/line';
2
2
  import BaseController, { IControllerParams } from './BaseController';
3
3
  export default class WatchController extends BaseController {
4
4
  type: string;
@@ -1,7 +1,7 @@
1
- import { PluginData } from '../typings/data';
1
+ import type { PluginData } from '../typings/data';
2
+ import type { PluginEvent } from '../typings/event.type';
3
+ import type { UserDistanceItem } from '../utils/distanceDom';
2
4
  import { Five, Subscribe } from '@realsee/five';
3
- import { PluginEvent } from '../typings/event.type';
4
- import { UserDistanceItem } from '../utils/distanceDom';
5
5
  export declare type Mode = 'Watch' | 'Edit';
6
6
  export interface MeasurePluginParameter {
7
7
  useUIController?: boolean;