@realsee/dnalogel 2.11.0 → 2.11.2

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 (296) hide show
  1. package/dist/ModelRoomLabelPlugin/Controller.d.ts +2 -0
  2. package/dist/floorplan/MapviewFloorplanPlugin/Controller.d.ts +5 -1
  3. package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +5 -1
  4. package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +5 -1
  5. package/dist/floorplan/typings/index.d.ts +12 -0
  6. package/dist/index.cjs.js +48 -48
  7. package/dist/index.js +3024 -2919
  8. package/dist/index.umd.js +41 -41
  9. package/docs/classes/CSS3DRender.html +31 -31
  10. package/docs/classes/CruisePluginController.html +25 -25
  11. package/docs/classes/Magnifier.html +20 -20
  12. package/docs/classes/ModelRoomLabelController.html +11 -11
  13. package/docs/classes/Object3DHelperController.html +25 -25
  14. package/docs/classes/PaintBrush.html +15 -15
  15. package/docs/classes/PanoMeasurePluginLine.html +23 -23
  16. package/docs/classes/PanoMeasurePluginModel.html +22 -22
  17. package/docs/classes/PanoMeasurePluginPoint.html +14 -14
  18. package/docs/classes/PanoMeasurePluginPolyline.html +26 -26
  19. package/docs/classes/PanoTagPluginController.html +47 -47
  20. package/docs/classes/Util.BetterTween.html +8 -8
  21. package/docs/classes/Util.FivePointSelector.html +12 -12
  22. package/docs/classes/Util.Interval.html +12 -12
  23. package/docs/classes/Util.Magnifier.html +17 -17
  24. package/docs/classes/Util.PointDomHelper.html +11 -11
  25. package/docs/classes/Util.PointHelper.html +11 -11
  26. package/docs/classes/Util.Rectangle.html +13 -13
  27. package/docs/enums/CameraMovementEffect.html +7 -7
  28. package/docs/enums/ContentType.html +19 -19
  29. package/docs/enums/DIRECTION.html +9 -9
  30. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +9 -9
  31. package/docs/enums/DimensionType.html +7 -7
  32. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +8 -8
  33. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +9 -9
  34. package/docs/enums/PaintBrushTypeEnum.html +8 -8
  35. package/docs/enums/PointType.html +7 -7
  36. package/docs/enums/Rotation.html +8 -8
  37. package/docs/functions/CSS3DRenderPlugin.html +4 -4
  38. package/docs/functions/CameraMovementPlugin.html +4 -4
  39. package/docs/functions/CruisePlugin.html +4 -4
  40. package/docs/functions/GuideLinePlugin.html +5 -5
  41. package/docs/functions/ItemLabelPlugin.html +4 -4
  42. package/docs/functions/MapviewFloorplanPlugin.html +4 -4
  43. package/docs/functions/ModelChassisCompassPlugin.html +4 -4
  44. package/docs/functions/ModelEntryDoorGuidePlugin.html +4 -4
  45. package/docs/functions/ModelFloorplanPlugin.html +4 -4
  46. package/docs/functions/ModelItemLabelPlugin.html +4 -4
  47. package/docs/functions/ModelRoomLabelPlugin.html +4 -4
  48. package/docs/functions/ModelTVVideoPlugin.html +4 -4
  49. package/docs/functions/ModelViewPlugin.html +4 -4
  50. package/docs/functions/Object3DHelperPlugin.html +4 -4
  51. package/docs/functions/PanoCompassPlugin.html +4 -4
  52. package/docs/functions/PanoCursorRaycasterPlugin.html +4 -4
  53. package/docs/functions/PanoDoorLabelPlugin.html +4 -4
  54. package/docs/functions/PanoFloorplanRadarPlugin.html +4 -4
  55. package/docs/functions/PanoMeasurePlugin.html +4 -4
  56. package/docs/functions/PanoRulerPlugin.html +4 -4
  57. package/docs/functions/PanoRulerProPlugin.html +4 -4
  58. package/docs/functions/PanoSpatialTagPlugin.html +4 -4
  59. package/docs/functions/PanoTagPlugin.html +4 -4
  60. package/docs/functions/PanoVideoPlugin.html +4 -4
  61. package/docs/functions/TopviewFloorplanPlugin.html +4 -4
  62. package/docs/functions/Util.getCoordsFromClient.html +5 -5
  63. package/docs/functions/Util.getCoordsFromElement.html +5 -5
  64. package/docs/functions/Util.getFrameTime.html +5 -5
  65. package/docs/functions/Util.getIntersectFromRelativePosition.html +5 -5
  66. package/docs/functions/Util.getRaycasterFromFivePointer.html +5 -5
  67. package/docs/functions/Util.isNil.html +5 -5
  68. package/docs/functions/Util.nextFrame.html +5 -5
  69. package/docs/functions/Util.notNil.html +5 -5
  70. package/docs/functions/Util.requestAnimationFrameInterval.html +5 -5
  71. package/docs/functions/Util.tweenProgress.html +5 -5
  72. package/docs/functions/pluginFlag.html +5 -5
  73. package/docs/index.html +4 -4
  74. package/docs/interfaces/AddTagConfig.html +6 -6
  75. package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -11
  76. package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
  77. package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
  78. package/docs/interfaces/EventMap.html +15 -15
  79. package/docs/interfaces/FloorplanBounding.html +8 -8
  80. package/docs/interfaces/FloorplanData.html +10 -10
  81. package/docs/interfaces/FloorplanEntrance.html +11 -11
  82. package/docs/interfaces/FloorplanExtraObject.html +10 -10
  83. package/docs/interfaces/FloorplanExtraObject3D.html +8 -8
  84. package/docs/interfaces/FloorplanFloorData.html +9 -9
  85. package/docs/interfaces/FloorplanImagePosition.html +7 -7
  86. package/docs/interfaces/FloorplanObserver.html +9 -9
  87. package/docs/interfaces/FloorplanOutlineItem.html +9 -9
  88. package/docs/interfaces/FloorplanPosition.html +7 -7
  89. package/docs/interfaces/FloorplanRoomItem.html +13 -13
  90. package/docs/interfaces/FloorplanRoomLabelItem.html +7 -7
  91. package/docs/interfaces/FloorplanServerBounding.html +8 -8
  92. package/docs/interfaces/FloorplanServerComputedData.html +10 -10
  93. package/docs/interfaces/FloorplanServerData.html +7 -7
  94. package/docs/interfaces/FloorplanServerDoorItem.html +10 -10
  95. package/docs/interfaces/FloorplanServerDoorPosition.html +8 -8
  96. package/docs/interfaces/FloorplanServerEntrance.html +11 -11
  97. package/docs/interfaces/FloorplanServerFloorData.html +9 -9
  98. package/docs/interfaces/FloorplanServerImagePosition.html +7 -7
  99. package/docs/interfaces/FloorplanServerObserver.html +9 -9
  100. package/docs/interfaces/FloorplanServerOutlineItem.html +9 -9
  101. package/docs/interfaces/FloorplanServerPosition.html +7 -7
  102. package/docs/interfaces/FloorplanServerRoomItem.html +14 -14
  103. package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -7
  104. package/docs/interfaces/HelperOffset.html +8 -8
  105. package/docs/interfaces/ItemLabelPluginData.html +6 -6
  106. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -11
  107. package/docs/interfaces/ItemLabelPluginParametersType.html +9 -9
  108. package/docs/interfaces/MinMax.html +7 -7
  109. package/docs/interfaces/ModelChassisCompassPluginData.html +7 -7
  110. package/docs/interfaces/ModelChassisCompassPluginExportType.html +8 -8
  111. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +7 -7
  112. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +8 -8
  113. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +8 -8
  114. package/docs/interfaces/ModelItemLabelPluginData.html +6 -6
  115. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +11 -11
  116. package/docs/interfaces/ModelItemLabelPluginParametersType.html +7 -7
  117. package/docs/interfaces/ModelRoomLabelPluginData.html +6 -6
  118. package/docs/interfaces/ModelTVVideoPluginData.html +9 -9
  119. package/docs/interfaces/ModelTVVideoPluginExportType.html +8 -8
  120. package/docs/interfaces/ModelTVVideoPluginParameterType.html +6 -6
  121. package/docs/interfaces/ModelViewPluginExportType.html +11 -11
  122. package/docs/interfaces/Object3DHelperState.html +8 -8
  123. package/docs/interfaces/ObjectHelperControllers.html +9 -9
  124. package/docs/interfaces/PaintBrushAction.html +12 -12
  125. package/docs/interfaces/PaintBrushConfigs.html +12 -12
  126. package/docs/interfaces/PaintBrushState.html +10 -10
  127. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +10 -10
  128. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +5 -5
  129. package/docs/interfaces/PanoMeasureParameterType.html +12 -12
  130. package/docs/interfaces/PanoMeasurePluginLineJson.html +8 -8
  131. package/docs/interfaces/PanoMeasurePluginOpenParameter.html +7 -7
  132. package/docs/interfaces/PanoMeasurePluginPointJson.html +7 -7
  133. package/docs/interfaces/PanoMeasurePluginPolylineJson.html +8 -8
  134. package/docs/interfaces/PanoRulerPluginExportType.html +10 -10
  135. package/docs/interfaces/PanoRulerPluginOptions.html +7 -7
  136. package/docs/interfaces/PanoRulerPluginParameterType.html +8 -8
  137. package/docs/interfaces/PanoRulerProPluginExportType.html +9 -9
  138. package/docs/interfaces/PanoRulerProPluginOptions.html +7 -7
  139. package/docs/interfaces/PanoRulerProPluginParameterType.html +7 -7
  140. package/docs/interfaces/PanoRulerProPluginState.html +8 -8
  141. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +5 -5
  142. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +5 -5
  143. package/docs/interfaces/PanoSpatialTagPluginData.html +11 -11
  144. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +10 -10
  145. package/docs/interfaces/PanoSpatialTagPluginExportType.html +13 -13
  146. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +10 -10
  147. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +13 -13
  148. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +11 -11
  149. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +10 -10
  150. package/docs/interfaces/PanoVideoPluginType.LoadParams.html +6 -6
  151. package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +8 -8
  152. package/docs/interfaces/PanoVideoPluginType.PluginData.html +6 -6
  153. package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +9 -9
  154. package/docs/interfaces/PanoVideoPluginType.PluginState.html +6 -6
  155. package/docs/interfaces/PanoVideoPluginType.VideoItem.html +8 -8
  156. package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +10 -10
  157. package/docs/interfaces/Point.html +8 -8
  158. package/docs/interfaces/Room.html +9 -9
  159. package/docs/interfaces/RoomInfo.html +7 -7
  160. package/docs/interfaces/RoomLabel.html +14 -14
  161. package/docs/interfaces/RoomRules.html +5 -5
  162. package/docs/interfaces/Rooms.html +5 -5
  163. package/docs/interfaces/Scissor.html +9 -9
  164. package/docs/interfaces/State.html +8 -8
  165. package/docs/interfaces/TagCache.html +12 -12
  166. package/docs/interfaces/TagConfig.html +10 -10
  167. package/docs/interfaces/TagIconUrl.html +11 -11
  168. package/docs/interfaces/TagStyle.html +6 -6
  169. package/docs/interfaces/Tags.html +9 -9
  170. package/docs/interfaces/TemporaryState.html +6 -6
  171. package/docs/interfaces/Util.MagnifierParameter.html +11 -11
  172. package/docs/interfaces/Util.MouseGroupParameter.html +8 -8
  173. package/docs/modules/PanoVideoPluginType.html +5 -5
  174. package/docs/modules/Util.html +5 -5
  175. package/docs/modules.html +4 -4
  176. package/docs/types/ArrayPosition.html +5 -5
  177. package/docs/types/AudioAppearance.html +5 -5
  178. package/docs/types/AudioTagTypeConfigKey.html +5 -5
  179. package/docs/types/CSS3DRenderExportType.html +5 -5
  180. package/docs/types/CSS3DRenderPluginExportType.html +5 -5
  181. package/docs/types/CSS3DRenderPluginParameterType.html +5 -5
  182. package/docs/types/ClassFunctionParameters.html +5 -5
  183. package/docs/types/Color.html +5 -5
  184. package/docs/types/ContentTypeConfigKey.html +5 -5
  185. package/docs/types/ContentTypeConfigKeySplit.html +5 -5
  186. package/docs/types/ContentTypeMap.html +5 -5
  187. package/docs/types/Create3DDomContainerReturnType.html +5 -5
  188. package/docs/types/Create3DElementReturnType.html +5 -5
  189. package/docs/types/CruisePluginExportType.html +5 -5
  190. package/docs/types/Direction-1.html +5 -5
  191. package/docs/types/Direction4.html +5 -5
  192. package/docs/types/FloorplanRuleLabels.html +5 -5
  193. package/docs/types/FloorplanServerRuleLabels.html +5 -5
  194. package/docs/types/GuideLinePluginExportType.html +5 -5
  195. package/docs/types/HelperEventMap.html +5 -5
  196. package/docs/types/LoadTagConfig.html +5 -5
  197. package/docs/types/MapviewFloorplanPluginParameterType.html +5 -5
  198. package/docs/types/MapviewFloorplanPluginReturnType.html +5 -5
  199. package/docs/types/MediaData.html +5 -5
  200. package/docs/types/MediaStore.html +5 -5
  201. package/docs/types/ModelElement.html +5 -5
  202. package/docs/types/ModelEntryDoorGuidePluginParameterType.html +5 -5
  203. package/docs/types/ModelFloorplanPluginParameterType.html +5 -5
  204. package/docs/types/ModelFloorplanPluginReturnType.html +5 -5
  205. package/docs/types/ModelRoomLabelPluginParameters.html +5 -5
  206. package/docs/types/ModelRoomLabelPluginReturnType.html +5 -5
  207. package/docs/types/MoveArgs.html +5 -5
  208. package/docs/types/MoveOpts.html +5 -5
  209. package/docs/types/Object3DHelperEventMap.html +5 -5
  210. package/docs/types/ObjectFit.html +5 -5
  211. package/docs/types/PaintBrushEventMap.html +5 -5
  212. package/docs/types/PanoCompassPluginData.html +5 -5
  213. package/docs/types/PanoCompassPluginExportType.html +5 -5
  214. package/docs/types/PanoCompassPluginParameterType.html +5 -5
  215. package/docs/types/PanoFloorplanRadarPluginParameterType.html +5 -5
  216. package/docs/types/PanoFloorplanRadarPluginReturnType.html +5 -5
  217. package/docs/types/PanoIndex.html +5 -5
  218. package/docs/types/PanoMeasurePluginEvent.html +5 -5
  219. package/docs/types/PanoMeasureReturnType.html +5 -5
  220. package/docs/types/PanoSpatialTagPluginId.html +5 -5
  221. package/docs/types/PanoTagPluginExportInterface.html +5 -5
  222. package/docs/types/PanoTagPluginParamsInterface.html +5 -5
  223. package/docs/types/PanoVideoPluginParameterType.html +5 -5
  224. package/docs/types/PanoVideoPluginReturnType.html +5 -5
  225. package/docs/types/PlaneTag.html +5 -5
  226. package/docs/types/PlaneTagElement.html +5 -5
  227. package/docs/types/Point2DElement.html +5 -5
  228. package/docs/types/Point2DTag.html +5 -5
  229. package/docs/types/Point3DElement.html +5 -5
  230. package/docs/types/Point3DTag.html +5 -5
  231. package/docs/types/PointTag.html +5 -5
  232. package/docs/types/PointTagElement.html +5 -5
  233. package/docs/types/Position.html +5 -5
  234. package/docs/types/RotateArgs.html +5 -5
  235. package/docs/types/RotateOpts.html +5 -5
  236. package/docs/types/RuleLabelsKey.html +5 -5
  237. package/docs/types/RuleLabelsValue.html +5 -5
  238. package/docs/types/StickType.html +5 -5
  239. package/docs/types/Tag.html +5 -5
  240. package/docs/types/Tag2D.html +5 -5
  241. package/docs/types/Tag3D.html +5 -5
  242. package/docs/types/TagContentType.html +5 -5
  243. package/docs/types/TagDimensionType.html +5 -5
  244. package/docs/types/TagElement.html +5 -5
  245. package/docs/types/TagEvents.html +5 -5
  246. package/docs/types/TagGLTFObject.html +5 -5
  247. package/docs/types/TagHooks.html +5 -5
  248. package/docs/types/TagIconSize.html +5 -5
  249. package/docs/types/TagId.html +5 -5
  250. package/docs/types/TagPointType.html +5 -5
  251. package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
  252. package/docs/types/TopviewFloorplanPluginReturnType.html +5 -5
  253. package/docs/types/WorkCode.html +5 -5
  254. package/docs/variables/FLOOR_TYPE_MAP.html +5 -5
  255. package/docs/variables/PLUGIN.html +5 -5
  256. package/docs/variables/ROOM_FETILE_TYPE_MAP.html +5 -5
  257. package/docs/variables/ROOM_TYPE_MAP.html +5 -5
  258. package/docs/variables/VERSION.html +5 -5
  259. package/docs/variables/itemLabelPluginServerParams.html +5 -5
  260. package/docs/variables/modelItemLabelPluginServerParams.html +5 -5
  261. package/docs/variables/modelRoomLabelPluginServerParams.html +5 -5
  262. package/libs/ModelRoomLabelPlugin/Controller.d.ts +2 -0
  263. package/libs/ModelRoomLabelPlugin/Controller.js +18 -15
  264. package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +74 -72
  265. package/libs/base/BasePlugin.js +1 -1
  266. package/libs/floorplan/Components/CurrentFloor.js +123 -117
  267. package/libs/floorplan/Components/Main.js +222 -187
  268. package/libs/floorplan/Components/RoomHighlight/Room.js +55 -38
  269. package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +77 -65
  270. package/libs/floorplan/MapviewFloorplanPlugin/Controller.d.ts +5 -1
  271. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +60 -50
  272. package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +5 -1
  273. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +31 -21
  274. package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +5 -1
  275. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +79 -69
  276. package/libs/floorplan/typings/index.d.ts +12 -0
  277. package/package.json +15 -17
  278. package/libs/PanoTagPlugin/mocks/v1/mock-80P6A03eQRQKY3oqLj.d.ts +0 -4
  279. package/libs/PanoTagPlugin/mocks/v1/mock-80P6A03eQRQKY3oqLj.js +0 -6
  280. package/libs/PanoTagPlugin/mocks/v1/mock-80QG2vMPboNv5DWrom.d.ts +0 -93
  281. package/libs/PanoTagPlugin/mocks/v1/mock-80QG2vMPboNv5DWrom.js +0 -5622
  282. package/libs/PanoTagPlugin/mocks/v1/mock-test3-realsee-cn-4zr0A5.js +0 -1325
  283. package/libs/PanoTagPlugin/mocks/v1/mock1.d.ts +0 -173
  284. package/libs/PanoTagPlugin/mocks/v1/mock1.js +0 -121
  285. package/libs/PanoTagPlugin/mocks/v1/mock2.d.ts +0 -233
  286. package/libs/PanoTagPlugin/mocks/v1/mock2.js +0 -296
  287. package/libs/PanoTagPlugin/mocks/v1/mock3.d.ts +0 -22
  288. package/libs/PanoTagPlugin/mocks/v1/mock3.js +0 -32
  289. package/libs/PanoTagPlugin/mocks/v1/mock4.d.ts +0 -56
  290. package/libs/PanoTagPlugin/mocks/v1/mock4.js +0 -60
  291. package/libs/PanoTagPlugin/mocks/v1/mock5.d.ts +0 -13
  292. package/libs/PanoTagPlugin/mocks/v1/mock5.js +0 -17
  293. package/libs/PanoTagPlugin/mocks/v1/mock6.d.ts +0 -16
  294. package/libs/PanoTagPlugin/mocks/v1/mock6.js +0 -27
  295. package/libs/PanoTagPlugin/mocks/v1/mock7.d.ts +0 -22
  296. package/libs/PanoTagPlugin/mocks/v1/mock7.js +0 -228
@@ -2,7 +2,7 @@ import type { PartialDeep } from 'type-fest';
2
2
  import type { BaseOptions } from '../../base/BasePlugin';
3
3
  import type { Five } from '@realsee/five';
4
4
  import type { FloorplanServerData } from '../typings/floorplanServerData';
5
- import type { State, Config, EventMap, Parameters, PluginData, PluginServerData } from './typing';
5
+ import type { State, Config, EventMap, Parameters, PluginData, PluginServerData, HighlightData } from './typing';
6
6
  import * as BasePlugin from '../../base/BasePluginWithData';
7
7
  export declare class Controller extends BasePlugin.Controller<State, EventMap, PluginServerData, PluginData> {
8
8
  name: string;
@@ -24,6 +24,8 @@ export declare class Controller extends BasePlugin.Controller<State, EventMap, P
24
24
  private hasAddedEventListener;
25
25
  /** 上一次隐藏是否是用户调用了 hide 导致的 */
26
26
  private isHiddenByHideFunc;
27
+ /** 高亮区域 */
28
+ private highlightData;
27
29
  constructor(five: Five, params?: Parameters);
28
30
  load(serverData: PluginServerData | FloorplanServerData, state?: Partial<State>, userAction?: boolean): Promise<void>;
29
31
  /** 更新户型图大小 */
@@ -41,6 +43,8 @@ export declare class Controller extends BasePlugin.Controller<State, EventMap, P
41
43
  /** 更改插件 State */
42
44
  setState(state: PartialDeep<State>, options?: BaseOptions): void;
43
45
  changeConfigs(config: Partial<Config>, userAction?: boolean): void;
46
+ highlight: (highlightData: HighlightData) => void;
47
+ unhighlight: () => void;
44
48
  protected formatData(serverData: PluginServerData): Promise<PluginData>;
45
49
  private _show;
46
50
  private _hide;
@@ -1,28 +1,28 @@
1
- var w = Object.defineProperty, E = Object.defineProperties;
1
+ var E = Object.defineProperty, w = Object.defineProperties;
2
2
  var F = Object.getOwnPropertyDescriptors;
3
- var v = Object.getOwnPropertySymbols;
3
+ var m = Object.getOwnPropertySymbols;
4
4
  var A = Object.prototype.hasOwnProperty, C = Object.prototype.propertyIsEnumerable;
5
- var p = (h, n, t) => n in h ? w(h, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[n] = t, l = (h, n) => {
5
+ var p = (h, n, t) => n in h ? E(h, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[n] = t, u = (h, n) => {
6
6
  for (var t in n || (n = {}))
7
7
  A.call(n, t) && p(h, t, n[t]);
8
- if (v)
9
- for (var t of v(n))
8
+ if (m)
9
+ for (var t of m(n))
10
10
  C.call(n, t) && p(h, t, n[t]);
11
11
  return h;
12
- }, f = (h, n) => E(h, F(n));
13
- var o = (h, n, t) => (p(h, typeof n != "symbol" ? n + "" : n, t), t);
14
- var c = (h, n, t) => new Promise((e, i) => {
12
+ }, f = (h, n) => w(h, F(n));
13
+ var i = (h, n, t) => (p(h, typeof n != "symbol" ? n + "" : n, t), t);
14
+ var c = (h, n, t) => new Promise((e, o) => {
15
15
  var s = (d) => {
16
16
  try {
17
17
  a(t.next(d));
18
- } catch (u) {
19
- i(u);
18
+ } catch (l) {
19
+ o(l);
20
20
  }
21
21
  }, r = (d) => {
22
22
  try {
23
23
  a(t.throw(d));
24
- } catch (u) {
25
- i(u);
24
+ } catch (l) {
25
+ o(l);
26
26
  }
27
27
  }, a = (d) => d.done ? e(d.value) : Promise.resolve(d.value).then(s, r);
28
28
  a((t = t.apply(h, n)).next());
@@ -30,14 +30,14 @@ var c = (h, n, t) => new Promise((e, i) => {
30
30
  import * as x from "three";
31
31
  import { equal as S } from "../../shared-utils/equal.js";
32
32
  import { Main as y } from "../Components/Main.js";
33
- import { formatData as m } from "../utils/formatData.js";
34
- import { CAMERA_IMAGE as I } from "../Assets/camera.js";
35
- import { omit as _ } from "../../shared-utils/filter.js";
36
- import { FLOOR_PLAN_ATTACHED_TO as D } from "../constant.js";
33
+ import { formatData as v } from "../utils/formatData.js";
34
+ import { CAMERA_IMAGE as D } from "../Assets/camera.js";
35
+ import { omit as I } from "../../shared-utils/filter.js";
36
+ import { FLOOR_PLAN_ATTACHED_TO as _ } from "../constant.js";
37
37
  import { Controller as L } from "../../base/BasePluginWithData.js";
38
38
  import { changeMode as T } from "../../shared-utils/five/changeMode.js";
39
39
  import { getPxmm as M, getAttachedY as P } from "../../shared-utils/getPxmm.js";
40
- import { changeModelCanvasOpacity as b } from "../../shared-utils/changeModelCanvasOpacity.js";
40
+ import { changeModelCanvasOpacity as g } from "../../shared-utils/changeModelCanvasOpacity.js";
41
41
  import "../../shared-utils/isTruelyObject.js";
42
42
  import "../../vendor/svelte/internal/index.js";
43
43
  import "../../vendor/svelte/transition/index.js";
@@ -67,38 +67,45 @@ import "../../shared-utils/tap.js";
67
67
  import "../../base/BasePlugin.js";
68
68
  import "../../shared-utils/Subscribe.js";
69
69
  import "../../shared-utils/nearlyEqual.js";
70
- class Et extends L {
70
+ class wt extends L {
71
71
  constructor(t, e) {
72
72
  super(t);
73
- o(this, "name", "topviewFloorplanPlugin");
74
- o(this, "state");
75
- o(this, "data");
76
- o(this, "app");
77
- o(this, "selector");
78
- o(this, "panoIndex", 0);
79
- o(this, "floorIndex", 0);
80
- o(this, "wrapper");
81
- o(this, "container", document.createElement("div"));
82
- o(this, "lastPanoramaLongitude", 0);
83
- o(this, "size", { width: 0, height: 0 });
84
- o(this, "hasAddedEventListener", !1);
85
- o(this, "isHiddenByHideFunc", !1);
86
- o(this, "updateSize", () => {
73
+ i(this, "name", "topviewFloorplanPlugin");
74
+ i(this, "state");
75
+ i(this, "data");
76
+ i(this, "app");
77
+ i(this, "selector");
78
+ i(this, "panoIndex", 0);
79
+ i(this, "floorIndex", 0);
80
+ i(this, "wrapper");
81
+ i(this, "container", document.createElement("div"));
82
+ i(this, "lastPanoramaLongitude", 0);
83
+ i(this, "size", { width: 0, height: 0 });
84
+ i(this, "hasAddedEventListener", !1);
85
+ i(this, "isHiddenByHideFunc", !1);
86
+ i(this, "highlightData", {});
87
+ i(this, "updateSize", () => {
87
88
  if (!this.data || !this.container || !this.wrapper || this.five.getCurrentState().mode !== "Topview")
88
89
  return;
89
- const { min: t, max: e } = this.data.bounding, i = e.x - t.x, s = e.y - t.y, r = this.state.config.attachedTo ? { attachedTo: this.state.config.attachedTo } : void 0, a = M(this.five, this.wrapper, this.floorIndex, r), d = Math.ceil(i * a), u = Math.ceil(s * a);
90
- this.size.width === d && this.size.height === u || (this.container.style.width = d + "px", this.container.style.height = u + "px", this.size = { width: d, height: u });
90
+ const { min: t, max: e } = this.data.bounding, o = e.x - t.x, s = e.y - t.y, r = this.state.config.attachedTo ? { attachedTo: this.state.config.attachedTo } : void 0, a = M(this.five, this.wrapper, this.floorIndex, r), d = Math.ceil(o * a), l = Math.ceil(s * a);
91
+ this.size.width === d && this.size.height === l || (this.container.style.width = d + "px", this.container.style.height = l + "px", this.size = { width: d, height: l });
91
92
  });
92
- o(this, "dispose", () => {
93
+ i(this, "dispose", () => {
93
94
  var t, e;
94
95
  this.removeEventListener(), (t = this.app) == null || t.$destroy(), this.app = void 0, (e = this.container) == null || e.remove(), this.data = void 0, this.wrapper = void 0, this.selector = void 0, this.hooks.emit("dispose");
95
96
  });
96
- o(this, "_disable", (t) => {
97
- var i, s;
97
+ i(this, "highlight", (t) => {
98
+ !this.state.config.highlightEnable || (this.highlightData = t, this.render());
99
+ });
100
+ i(this, "unhighlight", () => {
101
+ this.highlightData = {}, this.render();
102
+ });
103
+ i(this, "_disable", (t) => {
104
+ var o, s;
98
105
  const { userAction: e } = t;
99
- (i = this.app) == null || i.$destroy(), this.app = void 0, (s = this.container) == null || s.remove(), this.removeEventListener(), this.hooks.emit("disable", { userAction: e });
106
+ (o = this.app) == null || o.$destroy(), this.app = void 0, (s = this.container) == null || s.remove(), this.removeEventListener(), this.hooks.emit("disable", { userAction: e });
100
107
  });
101
- o(this, "onFiveModelLoaded", () => {
108
+ i(this, "onFiveModelLoaded", () => {
102
109
  if (this.state.enabled === !1 || this.wrapper || !this.selector)
103
110
  return;
104
111
  const t = this.selector instanceof Element ? this.selector : document.querySelector(this.selector);
@@ -106,29 +113,29 @@ class Et extends L {
106
113
  throw new Error("\u4E0D\u6B63\u786E\u7684\u7236\u5BB9\u5668\u9009\u62E9\u5668");
107
114
  this.wrapper = t, t.append(this.container);
108
115
  });
109
- o(this, "onFiveModeChange", (...[t, , , , e]) => {
116
+ i(this, "onFiveModeChange", (...[t, , , , e]) => {
110
117
  t !== "Topview" && this.state.visible && (this.updateState({ visible: !1 }, e), this._hide({ userAction: e }));
111
118
  });
112
- o(this, "onFivePanoArrived", (t) => {
119
+ i(this, "onFivePanoArrived", (t) => {
113
120
  var e;
114
121
  !((e = this.five) != null && e.work) || (this.panoIndex = t, this.floorIndex = this.five.work.observers[t].floorIndex);
115
122
  });
116
- o(this, "onFiveCameraUpdate", (t, e) => {
123
+ i(this, "onFiveCameraUpdate", (t, e) => {
117
124
  !this.state.visible || (this.updatePosition(), this.updateSize());
118
125
  });
119
- o(this, "onFiveWantsGesture", (t) => {
126
+ i(this, "onFiveWantsGesture", (t) => {
120
127
  if (!(t !== "pan" && t !== "pinch" && t !== "mouseWheel") && this.state.visible && !this.state.config.gestureEnable)
121
128
  return !1;
122
129
  });
123
- o(this, "onFiveWantsMoveToPano", () => {
130
+ i(this, "onFiveWantsMoveToPano", () => {
124
131
  if (this.state.visible && this.state.config.preventRoomClick)
125
132
  return !1;
126
133
  });
127
- o(this, "onFiveInitAnimationEnded", (...[, , t]) => {
134
+ i(this, "onFiveInitAnimationEnded", (...[, , t]) => {
128
135
  const { mode: e } = this.five.getCurrentState();
129
136
  e === "Topview" && !this.isHiddenByHideFunc && !this.state.visible && this.state.config.autoShowEnable && (this.updateState({ visible: !0 }, t), this._show({ userAction: t }));
130
137
  });
131
- o(this, "onModelShownFloorChange", (t) => {
138
+ i(this, "onModelShownFloorChange", (t) => {
132
139
  if (this.floorIndex !== t) {
133
140
  if (t === null) {
134
141
  const e = this.five.getCurrentState().panoIndex;
@@ -139,10 +146,12 @@ class Et extends L {
139
146
  }
140
147
  });
141
148
  e != null && e.selector && (this.selector = e.selector, console.warn("\u4E0D\u63A8\u8350\u7EE7\u7EED\u4F7F\u7528 params.selector \u914D\u7F6E\u7236\u5BB9\u5668\uFF0C\u8BF7\u4F7F\u7528 appendTo \u65B9\u6CD5"));
142
- const i = {
149
+ const o = {
143
150
  northDesc: "\u5317",
144
151
  modelOpacity: 1,
152
+ cameraEnable: !0,
145
153
  hoverEnable: !0,
154
+ highlightEnable: !1,
146
155
  compassEnable: !0,
147
156
  gestureEnable: !1,
148
157
  autoShowEnable: !0,
@@ -150,28 +159,28 @@ class Et extends L {
150
159
  roomLabelsEnable: !0,
151
160
  roomAreaEnable: !0,
152
161
  roomNameEnable: !0,
153
- cameraImageUrl: I,
154
- attachedTo: D.BOUNDING_CENTER,
162
+ cameraImageUrl: D,
163
+ attachedTo: _.BOUNDING_CENTER,
155
164
  getLabelElement: void 0,
156
165
  adaptiveRoomLabelVisibleEnable: !0,
157
166
  getRoomAreaText: (a) => (a / 1e6).toFixed(1) + "\u33A1",
158
167
  getRuleDistanceText: (a) => a.toString()
159
- }, s = e ? _(e, ["selector", "scale"]) : {}, r = l(l({}, i), s);
168
+ }, s = e ? I(e, ["selector", "scale"]) : {}, r = u(u({}, o), s);
160
169
  this.state = {
161
170
  enabled: !0,
162
171
  visible: !1,
163
172
  config: r
164
173
  }, this.initContainer(), t.model.loaded ? this.onFiveModelLoaded() : t.once("modelLoaded", this.onFiveModelLoaded), t.once("dispose", this.dispose), this.addEventListener();
165
174
  }
166
- load(t, e, i = !0) {
175
+ load(t, e, o = !0) {
167
176
  return c(this, null, function* () {
168
- function s(g) {
169
- return Object.prototype.hasOwnProperty.apply(g, ["version"]);
177
+ function s(b) {
178
+ return Object.prototype.hasOwnProperty.apply(b, ["version"]);
170
179
  }
171
180
  const r = t;
172
181
  r && !r.version && console.warn("\u4F20\u5165 serverData.data \u7684\u65B9\u5F0F\u540E\u7EED\u53EF\u80FD\u4E0D\u518D\u652F\u6301\uFF0C\u8BF7\u628A serverData \u6574\u4F53\u4F20\u5165 load \u51FD\u6570");
173
- const a = JSON.parse(JSON.stringify(t)), d = s(a) ? a.data : a, u = this.data;
174
- this.data = yield m(d), this.hooks.emit("dataLoaded", this.data), this.hooks.emit("dataChange", this.data, u), e && this.updateState(e, i), this.render();
182
+ const a = JSON.parse(JSON.stringify(t)), d = s(a) ? a.data : a, l = this.data;
183
+ this.data = yield v(d), this.hooks.emit("dataLoaded", this.data), this.hooks.emit("dataChange", this.data, l), e && this.updateState(e, o), this.render();
175
184
  });
176
185
  }
177
186
  updatePosition() {
@@ -179,7 +188,7 @@ class Et extends L {
179
188
  const t = P(this.five, this.floorIndex, this.state.config.attachedTo), e = (a = this.five.model) == null ? void 0 : a.bounding.getCenter(new x.Vector3()).setY(t);
180
189
  if (!e)
181
190
  return;
182
- const i = e.clone().project(this.five.camera), s = (i.x + 1) / 2, r = -(i.y - 1) / 2;
191
+ const o = e.clone().project(this.five.camera), s = (o.x + 1) / 2, r = -(o.y - 1) / 2;
183
192
  this.container.style.left = s * 100 + "%", this.container.style.top = r * 100 + "%";
184
193
  }
185
194
  appendTo(t) {
@@ -215,12 +224,12 @@ class Et extends L {
215
224
  this.updateState({ enabled: !1 }, t.userAction || e), this._disable({ userAction: e });
216
225
  }
217
226
  setState(t, e = {}) {
218
- const i = this.state, s = e.userAction !== void 0 ? e.userAction : !0;
219
- if (this.updateState(t, s), t.enabled !== void 0 && i.enabled !== t.enabled) {
227
+ const o = this.state, s = e.userAction !== void 0 ? e.userAction : !0;
228
+ if (this.updateState(t, s), t.enabled !== void 0 && o.enabled !== t.enabled) {
220
229
  const r = { userAction: s };
221
230
  t.enabled ? this._enable(r) : this._disable(r);
222
231
  }
223
- if (t.visible !== void 0 && i.visible !== t.visible) {
232
+ if (t.visible !== void 0 && o.visible !== t.visible) {
224
233
  const r = { userAction: s };
225
234
  t.visible ? this._show(r) : this._hide(r);
226
235
  }
@@ -230,7 +239,7 @@ class Et extends L {
230
239
  }
231
240
  formatData(t) {
232
241
  return c(this, null, function* () {
233
- return yield m(t.data);
242
+ return yield v(t.data);
234
243
  });
235
244
  }
236
245
  _show(t) {
@@ -240,8 +249,8 @@ class Et extends L {
240
249
  this.isHiddenByHideFunc = !1;
241
250
  const { userAction: e } = t;
242
251
  this.hooks.emit("show", { userAction: e, auto: !1 }), this.five.getCurrentState().mode !== "Topview" && (yield T(this.five, ["Topview", void 0, void 0, e])), this.five.model.show(this.floorIndex), this.updatePosition(), this.updateSize();
243
- const i = 500, s = this.state.config.modelOpacity;
244
- b(this.five, s, i), this.hooks.emit("showAnimationEnded", { userAction: e, auto: !1 }), this.render();
252
+ const o = 500, s = this.state.config.modelOpacity;
253
+ g(this.five, s, o), this.hooks.emit("showAnimationEnded", { userAction: e, auto: !1 }), this.render();
245
254
  });
246
255
  }
247
256
  _hide(t) {
@@ -250,8 +259,8 @@ class Et extends L {
250
259
  return;
251
260
  const { userAction: e } = t;
252
261
  this.hooks.emit("hide", { userAction: e, auto: !1 });
253
- const i = 1, s = 0;
254
- b(this.five, i, s), this.render();
262
+ const o = 1, s = 0;
263
+ g(this.five, o, s), this.render();
255
264
  });
256
265
  }
257
266
  _enable(t) {
@@ -259,8 +268,8 @@ class Et extends L {
259
268
  this.addEventListener(), this.wrapper && this.wrapper.append(this.container), this.hooks.emit("enable", { userAction: e }), this.state.visible && this._show({ userAction: e });
260
269
  }
261
270
  updateState(t, e) {
262
- const i = this.state, s = t.config ? l(l({}, i.config), t.config) : i.config;
263
- this.state = f(l(l({}, this.state), t), { config: s }), !S(this.state, i, { deep: !0 }) && this.hooks.emit("stateChange", { state: this.state, prevState: i, userAction: e });
271
+ const o = this.state, s = t.config ? u(u({}, o.config), t.config) : o.config;
272
+ this.state = f(u(u({}, this.state), t), { config: s }), !S(this.state, o, { deep: !0 }) && this.hooks.emit("stateChange", { state: this.state, prevState: o, userAction: e });
264
273
  }
265
274
  addEventListener() {
266
275
  if (!this.state.enabled || this.hasAddedEventListener)
@@ -286,13 +295,14 @@ class Et extends L {
286
295
  render(t) {
287
296
  if (!this.state.enabled || !this.container || !this.data || this.size.width === 0)
288
297
  return;
289
- const e = f(l({}, this.state.config), {
298
+ const e = f(u({}, this.state.config), {
290
299
  visible: this.state.visible,
291
300
  duration: t != null ? t : 0,
292
301
  panoIndex: this.panoIndex,
293
302
  floorIndex: this.floorIndex,
294
303
  floorplanData: this.data,
295
- lastPanoramaLongitude: this.lastPanoramaLongitude
304
+ lastPanoramaLongitude: this.lastPanoramaLongitude,
305
+ highlightData: this.highlightData
296
306
  });
297
307
  if (this.app)
298
308
  return this.app.$set(e);
@@ -300,5 +310,5 @@ class Et extends L {
300
310
  }
301
311
  }
302
312
  export {
303
- Et as Controller
313
+ wt as Controller
304
314
  };
@@ -14,6 +14,10 @@ export interface Config {
14
14
  modelOpacity: number;
15
15
  /** 鼠标放置在分间上时,是否要自动高亮分间,默认为 true */
16
16
  hoverEnable: boolean;
17
+ /** 支持highlight功能,默认为 false */
18
+ highlightEnable: boolean;
19
+ /** 支持Camera功能,默认为 true */
20
+ cameraEnable: boolean;
17
21
  /** 是否要启用指北针功能,默认为 true */
18
22
  compassEnable: boolean;
19
23
  /** Five 切换到 Topview Mode 时,是否自动展示户型图,默认为 true */
@@ -118,4 +122,12 @@ export interface HideOptions {
118
122
  /** 是否是用户操作 */
119
123
  userAction: boolean;
120
124
  }
125
+ export interface HighlightData {
126
+ /** id: floorIndex_roomId */
127
+ [id: string]: {
128
+ color: string;
129
+ opacity: number;
130
+ disabled?: boolean;
131
+ };
132
+ }
121
133
  export { FloorplanData as PluginData };
package/package.json CHANGED
@@ -7,23 +7,8 @@
7
7
  "repository": "https://github.com/realsee-developer/dnalogel.git",
8
8
  "description": "如视 VR 看房插件合集",
9
9
  "private": false,
10
- "version": "2.11.0",
10
+ "version": "2.11.2",
11
11
  "license": "SEE LICENSE IN TERMS.txt",
12
- "scripts": {
13
- "clean": "rm -rf components dist docs libs types ./vite.config.js.timestamp*",
14
- "dev": "run-p dev:*",
15
- "light-dev": "npm run dev:dist",
16
- "dev:libs": "NODE_ENV=development BUILD_MODULE=libs vite build -m development",
17
- "dev:dist": "NODE_ENV=development BUILD_MODULE=dist vite build -m development",
18
- "dev:components": "NODE_ENV=development BUILD_MODULE=components vite build -m development",
19
- "build": "run-p build:*",
20
- "build:libs": "NODE_ENV=production BUILD_MODULE=libs vite build -m production",
21
- "build:dist": "NODE_ENV=production BUILD_MODULE=dist vite build -m production",
22
- "build:components": "NODE_ENV=production BUILD_MODULE=components vite build -m production",
23
- "docs": "typedoc --options ./typedoc.json",
24
- "prepublishOnly": "run-p build docs",
25
- "postpublish": "cnpm sync @realsee/dnalogel"
26
- },
27
12
  "files": [
28
13
  "libs",
29
14
  "dist",
@@ -88,5 +73,18 @@
88
73
  "peerDependencies": {
89
74
  "@realsee/five": "^5.0.0",
90
75
  "three": ">=0.115.0 <=0.117.1"
76
+ },
77
+ "scripts": {
78
+ "clean": "rm -rf components dist docs libs types ./vite.config.js.timestamp*",
79
+ "dev": "run-p dev:*",
80
+ "light-dev": "npm run dev:dist",
81
+ "dev:libs": "NODE_ENV=development BUILD_MODULE=libs vite build -m development",
82
+ "dev:dist": "NODE_ENV=development BUILD_MODULE=dist vite build -m development",
83
+ "dev:components": "NODE_ENV=development BUILD_MODULE=components vite build -m development",
84
+ "build": "run-p build:*",
85
+ "build:libs": "NODE_ENV=production BUILD_MODULE=libs vite build -m production",
86
+ "build:dist": "NODE_ENV=production BUILD_MODULE=dist vite build -m production",
87
+ "build:components": "NODE_ENV=production BUILD_MODULE=components vite build -m production",
88
+ "docs": "typedoc --options ./typedoc.json"
91
89
  }
92
- }
90
+ }
@@ -1,4 +0,0 @@
1
- declare const data: {
2
- tagList: any[];
3
- };
4
- export default data;
@@ -1,6 +0,0 @@
1
- const t = {
2
- tagList: []
3
- };
4
- export {
5
- t as default
6
- };
@@ -1,93 +0,0 @@
1
- declare const _default: ({
2
- id: number;
3
- pointType: string;
4
- dimensionType: string;
5
- position: number[];
6
- normal: number[];
7
- style: {
8
- point: {
9
- iconUrl: string;
10
- style: string;
11
- };
12
- style: string;
13
- };
14
- contentType: string;
15
- data: {
16
- text: string;
17
- extraData: {
18
- baseNormal: number[];
19
- fiveState: {
20
- distance: number;
21
- fov: number;
22
- latitude: number;
23
- longitude: number;
24
- mode: string;
25
- offset: {
26
- x: number;
27
- y: number;
28
- z: number;
29
- };
30
- panoIndex: number;
31
- };
32
- style: {
33
- point: {
34
- iconUrl: string;
35
- style: string;
36
- };
37
- style: string;
38
- };
39
- tagClosedStyle: string;
40
- tagIconUrl: string;
41
- };
42
- mediaData?: undefined;
43
- };
44
- } | {
45
- id: number;
46
- pointType: string;
47
- dimensionType: string;
48
- position: number[];
49
- normal: number[];
50
- style: {
51
- point: {
52
- iconUrl: string;
53
- style: string;
54
- };
55
- style?: undefined;
56
- };
57
- contentType: string;
58
- data: {
59
- text: string;
60
- mediaData: {
61
- type: string;
62
- url: string;
63
- videoCoverUrl: string;
64
- name: string;
65
- }[];
66
- extraData: {
67
- baseNormal: number[];
68
- fiveState: {
69
- distance: number;
70
- fov: number;
71
- latitude: number;
72
- longitude: number;
73
- mode: string;
74
- offset: {
75
- x: number;
76
- y: number;
77
- z: number;
78
- };
79
- panoIndex: number;
80
- };
81
- style: {
82
- point: {
83
- iconUrl: string;
84
- style: string;
85
- };
86
- style?: undefined;
87
- };
88
- tagClosedStyle: string;
89
- tagIconUrl: string;
90
- };
91
- };
92
- })[];
93
- export default _default;