@realsee/dnalogel 2.0.2-alpha → 2.0.3

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 (267) hide show
  1. package/dist/CSS3DRenderPlugin/ModelViewPlugin/Plugin.d.ts +13 -2
  2. package/dist/CSS3DRenderPlugin/floorplan/MapviewFloorplanPlugin/Controller.d.ts +4 -2
  3. package/dist/CSS3DRenderPlugin/floorplan/MapviewFloorplanPlugin/typing.d.ts +1 -107
  4. package/dist/CSS3DRenderPlugin/floorplan/ModelFloorplanPlugin/typing.d.ts +1 -115
  5. package/dist/CSS3DRenderPlugin/floorplan/TopviewFloorplanPlugin/Controller.d.ts +4 -2
  6. package/dist/CSS3DRenderPlugin/floorplan/TopviewFloorplanPlugin/typing.d.ts +5 -80
  7. package/dist/CSS3DRenderPlugin/floorplan/typings/index.d.ts +117 -0
  8. package/dist/CameraMovementPlugin/ModelViewPlugin/Plugin.d.ts +13 -2
  9. package/dist/CameraMovementPlugin/floorplan/MapviewFloorplanPlugin/Controller.d.ts +4 -2
  10. package/dist/CameraMovementPlugin/floorplan/MapviewFloorplanPlugin/typing.d.ts +1 -107
  11. package/dist/CameraMovementPlugin/floorplan/ModelFloorplanPlugin/typing.d.ts +1 -115
  12. package/dist/CameraMovementPlugin/floorplan/TopviewFloorplanPlugin/Controller.d.ts +4 -2
  13. package/dist/CameraMovementPlugin/floorplan/TopviewFloorplanPlugin/typing.d.ts +5 -80
  14. package/dist/CameraMovementPlugin/floorplan/typings/index.d.ts +117 -0
  15. package/dist/CruisePlugin/ModelViewPlugin/Plugin.d.ts +13 -2
  16. package/dist/CruisePlugin/floorplan/MapviewFloorplanPlugin/Controller.d.ts +4 -2
  17. package/dist/CruisePlugin/floorplan/MapviewFloorplanPlugin/typing.d.ts +1 -107
  18. package/dist/CruisePlugin/floorplan/ModelFloorplanPlugin/typing.d.ts +1 -115
  19. package/dist/CruisePlugin/floorplan/TopviewFloorplanPlugin/Controller.d.ts +4 -2
  20. package/dist/CruisePlugin/floorplan/TopviewFloorplanPlugin/typing.d.ts +5 -80
  21. package/dist/CruisePlugin/floorplan/typings/index.d.ts +117 -0
  22. package/dist/GuideLinePlugin/ModelViewPlugin/Plugin.d.ts +13 -2
  23. package/dist/GuideLinePlugin/floorplan/MapviewFloorplanPlugin/Controller.d.ts +4 -2
  24. package/dist/GuideLinePlugin/floorplan/MapviewFloorplanPlugin/typing.d.ts +1 -107
  25. package/dist/GuideLinePlugin/floorplan/ModelFloorplanPlugin/typing.d.ts +1 -115
  26. package/dist/GuideLinePlugin/floorplan/TopviewFloorplanPlugin/Controller.d.ts +4 -2
  27. package/dist/GuideLinePlugin/floorplan/TopviewFloorplanPlugin/typing.d.ts +5 -80
  28. package/dist/GuideLinePlugin/floorplan/typings/index.d.ts +117 -0
  29. package/dist/ItemLabelPlugin/ModelViewPlugin/Plugin.d.ts +13 -2
  30. package/dist/ItemLabelPlugin/floorplan/MapviewFloorplanPlugin/Controller.d.ts +4 -2
  31. package/dist/ItemLabelPlugin/floorplan/MapviewFloorplanPlugin/typing.d.ts +1 -107
  32. package/dist/ItemLabelPlugin/floorplan/ModelFloorplanPlugin/typing.d.ts +1 -115
  33. package/dist/ItemLabelPlugin/floorplan/TopviewFloorplanPlugin/Controller.d.ts +4 -2
  34. package/dist/ItemLabelPlugin/floorplan/TopviewFloorplanPlugin/typing.d.ts +5 -80
  35. package/dist/ItemLabelPlugin/floorplan/typings/index.d.ts +117 -0
  36. package/dist/ModelChassisCompassPlugin/ModelViewPlugin/Plugin.d.ts +13 -2
  37. package/dist/ModelChassisCompassPlugin/floorplan/MapviewFloorplanPlugin/Controller.d.ts +4 -2
  38. package/dist/ModelChassisCompassPlugin/floorplan/MapviewFloorplanPlugin/typing.d.ts +1 -107
  39. package/dist/ModelChassisCompassPlugin/floorplan/ModelFloorplanPlugin/typing.d.ts +1 -115
  40. package/dist/ModelChassisCompassPlugin/floorplan/TopviewFloorplanPlugin/Controller.d.ts +4 -2
  41. package/dist/ModelChassisCompassPlugin/floorplan/TopviewFloorplanPlugin/typing.d.ts +5 -80
  42. package/dist/ModelChassisCompassPlugin/floorplan/typings/index.d.ts +117 -0
  43. package/dist/ModelEntryDoorGuidePlugin/ModelViewPlugin/Plugin.d.ts +13 -2
  44. package/dist/ModelEntryDoorGuidePlugin/floorplan/MapviewFloorplanPlugin/Controller.d.ts +4 -2
  45. package/dist/ModelEntryDoorGuidePlugin/floorplan/MapviewFloorplanPlugin/typing.d.ts +1 -107
  46. package/dist/ModelEntryDoorGuidePlugin/floorplan/ModelFloorplanPlugin/typing.d.ts +1 -115
  47. package/dist/ModelEntryDoorGuidePlugin/floorplan/TopviewFloorplanPlugin/Controller.d.ts +4 -2
  48. package/dist/ModelEntryDoorGuidePlugin/floorplan/TopviewFloorplanPlugin/typing.d.ts +5 -80
  49. package/dist/ModelEntryDoorGuidePlugin/floorplan/typings/index.d.ts +117 -0
  50. package/dist/ModelItemLabelPlugin/ModelViewPlugin/Plugin.d.ts +13 -2
  51. package/dist/ModelItemLabelPlugin/floorplan/MapviewFloorplanPlugin/Controller.d.ts +4 -2
  52. package/dist/ModelItemLabelPlugin/floorplan/MapviewFloorplanPlugin/typing.d.ts +1 -107
  53. package/dist/ModelItemLabelPlugin/floorplan/ModelFloorplanPlugin/typing.d.ts +1 -115
  54. package/dist/ModelItemLabelPlugin/floorplan/TopviewFloorplanPlugin/Controller.d.ts +4 -2
  55. package/dist/ModelItemLabelPlugin/floorplan/TopviewFloorplanPlugin/typing.d.ts +5 -80
  56. package/dist/ModelItemLabelPlugin/floorplan/typings/index.d.ts +117 -0
  57. package/dist/ModelRoomLabelPlugin/ModelViewPlugin/Plugin.d.ts +13 -2
  58. package/dist/ModelRoomLabelPlugin/floorplan/MapviewFloorplanPlugin/Controller.d.ts +4 -2
  59. package/dist/ModelRoomLabelPlugin/floorplan/MapviewFloorplanPlugin/typing.d.ts +1 -107
  60. package/dist/ModelRoomLabelPlugin/floorplan/ModelFloorplanPlugin/typing.d.ts +1 -115
  61. package/dist/ModelRoomLabelPlugin/floorplan/TopviewFloorplanPlugin/Controller.d.ts +4 -2
  62. package/dist/ModelRoomLabelPlugin/floorplan/TopviewFloorplanPlugin/typing.d.ts +5 -80
  63. package/dist/ModelRoomLabelPlugin/floorplan/typings/index.d.ts +117 -0
  64. package/dist/ModelRoomLabelPlugin/index.js +19 -22
  65. package/dist/ModelTVVideoPlugin/ModelViewPlugin/Plugin.d.ts +13 -2
  66. package/dist/ModelTVVideoPlugin/floorplan/MapviewFloorplanPlugin/Controller.d.ts +4 -2
  67. package/dist/ModelTVVideoPlugin/floorplan/MapviewFloorplanPlugin/typing.d.ts +1 -107
  68. package/dist/ModelTVVideoPlugin/floorplan/ModelFloorplanPlugin/typing.d.ts +1 -115
  69. package/dist/ModelTVVideoPlugin/floorplan/TopviewFloorplanPlugin/Controller.d.ts +4 -2
  70. package/dist/ModelTVVideoPlugin/floorplan/TopviewFloorplanPlugin/typing.d.ts +5 -80
  71. package/dist/ModelTVVideoPlugin/floorplan/typings/index.d.ts +117 -0
  72. package/dist/ModelViewPlugin/ModelViewPlugin/Plugin.d.ts +13 -2
  73. package/dist/ModelViewPlugin/Plugin.d.ts +13 -2
  74. package/dist/ModelViewPlugin/floorplan/MapviewFloorplanPlugin/Controller.d.ts +4 -2
  75. package/dist/ModelViewPlugin/floorplan/MapviewFloorplanPlugin/typing.d.ts +1 -107
  76. package/dist/ModelViewPlugin/floorplan/ModelFloorplanPlugin/typing.d.ts +1 -115
  77. package/dist/ModelViewPlugin/floorplan/TopviewFloorplanPlugin/Controller.d.ts +4 -2
  78. package/dist/ModelViewPlugin/floorplan/TopviewFloorplanPlugin/typing.d.ts +5 -80
  79. package/dist/ModelViewPlugin/floorplan/typings/index.d.ts +117 -0
  80. package/dist/ModelViewPlugin/index.js +53 -28
  81. package/dist/PanoCompassPlugin/ModelViewPlugin/Plugin.d.ts +13 -2
  82. package/dist/PanoCompassPlugin/floorplan/MapviewFloorplanPlugin/Controller.d.ts +4 -2
  83. package/dist/PanoCompassPlugin/floorplan/MapviewFloorplanPlugin/typing.d.ts +1 -107
  84. package/dist/PanoCompassPlugin/floorplan/ModelFloorplanPlugin/typing.d.ts +1 -115
  85. package/dist/PanoCompassPlugin/floorplan/TopviewFloorplanPlugin/Controller.d.ts +4 -2
  86. package/dist/PanoCompassPlugin/floorplan/TopviewFloorplanPlugin/typing.d.ts +5 -80
  87. package/dist/PanoCompassPlugin/floorplan/typings/index.d.ts +117 -0
  88. package/dist/PanoCursorRaycasterPlugin/ModelViewPlugin/Plugin.d.ts +13 -2
  89. package/dist/PanoCursorRaycasterPlugin/floorplan/MapviewFloorplanPlugin/Controller.d.ts +4 -2
  90. package/dist/PanoCursorRaycasterPlugin/floorplan/MapviewFloorplanPlugin/typing.d.ts +1 -107
  91. package/dist/PanoCursorRaycasterPlugin/floorplan/ModelFloorplanPlugin/typing.d.ts +1 -115
  92. package/dist/PanoCursorRaycasterPlugin/floorplan/TopviewFloorplanPlugin/Controller.d.ts +4 -2
  93. package/dist/PanoCursorRaycasterPlugin/floorplan/TopviewFloorplanPlugin/typing.d.ts +5 -80
  94. package/dist/PanoCursorRaycasterPlugin/floorplan/typings/index.d.ts +117 -0
  95. package/dist/PanoDoorLabelPlugin/ModelViewPlugin/Plugin.d.ts +13 -2
  96. package/dist/PanoDoorLabelPlugin/floorplan/MapviewFloorplanPlugin/Controller.d.ts +4 -2
  97. package/dist/PanoDoorLabelPlugin/floorplan/MapviewFloorplanPlugin/typing.d.ts +1 -107
  98. package/dist/PanoDoorLabelPlugin/floorplan/ModelFloorplanPlugin/typing.d.ts +1 -115
  99. package/dist/PanoDoorLabelPlugin/floorplan/TopviewFloorplanPlugin/Controller.d.ts +4 -2
  100. package/dist/PanoDoorLabelPlugin/floorplan/TopviewFloorplanPlugin/typing.d.ts +5 -80
  101. package/dist/PanoDoorLabelPlugin/floorplan/typings/index.d.ts +117 -0
  102. package/dist/PanoMeasurePlugin/ModelViewPlugin/Plugin.d.ts +13 -2
  103. package/dist/PanoMeasurePlugin/floorplan/MapviewFloorplanPlugin/Controller.d.ts +4 -2
  104. package/dist/PanoMeasurePlugin/floorplan/MapviewFloorplanPlugin/typing.d.ts +1 -107
  105. package/dist/PanoMeasurePlugin/floorplan/ModelFloorplanPlugin/typing.d.ts +1 -115
  106. package/dist/PanoMeasurePlugin/floorplan/TopviewFloorplanPlugin/Controller.d.ts +4 -2
  107. package/dist/PanoMeasurePlugin/floorplan/TopviewFloorplanPlugin/typing.d.ts +5 -80
  108. package/dist/PanoMeasurePlugin/floorplan/typings/index.d.ts +117 -0
  109. package/dist/PanoRulerPlugin/ModelViewPlugin/Plugin.d.ts +13 -2
  110. package/dist/PanoRulerPlugin/floorplan/MapviewFloorplanPlugin/Controller.d.ts +4 -2
  111. package/dist/PanoRulerPlugin/floorplan/MapviewFloorplanPlugin/typing.d.ts +1 -107
  112. package/dist/PanoRulerPlugin/floorplan/ModelFloorplanPlugin/typing.d.ts +1 -115
  113. package/dist/PanoRulerPlugin/floorplan/TopviewFloorplanPlugin/Controller.d.ts +4 -2
  114. package/dist/PanoRulerPlugin/floorplan/TopviewFloorplanPlugin/typing.d.ts +5 -80
  115. package/dist/PanoRulerPlugin/floorplan/typings/index.d.ts +117 -0
  116. package/dist/PanoRulerProPlugin/ModelViewPlugin/Plugin.d.ts +13 -2
  117. package/dist/PanoRulerProPlugin/floorplan/MapviewFloorplanPlugin/Controller.d.ts +4 -2
  118. package/dist/PanoRulerProPlugin/floorplan/MapviewFloorplanPlugin/typing.d.ts +1 -107
  119. package/dist/PanoRulerProPlugin/floorplan/ModelFloorplanPlugin/typing.d.ts +1 -115
  120. package/dist/PanoRulerProPlugin/floorplan/TopviewFloorplanPlugin/Controller.d.ts +4 -2
  121. package/dist/PanoRulerProPlugin/floorplan/TopviewFloorplanPlugin/typing.d.ts +5 -80
  122. package/dist/PanoRulerProPlugin/floorplan/typings/index.d.ts +117 -0
  123. package/dist/PanoSpatialTagPlugin/ModelViewPlugin/Plugin.d.ts +13 -2
  124. package/dist/PanoSpatialTagPlugin/floorplan/MapviewFloorplanPlugin/Controller.d.ts +4 -2
  125. package/dist/PanoSpatialTagPlugin/floorplan/MapviewFloorplanPlugin/typing.d.ts +1 -107
  126. package/dist/PanoSpatialTagPlugin/floorplan/ModelFloorplanPlugin/typing.d.ts +1 -115
  127. package/dist/PanoSpatialTagPlugin/floorplan/TopviewFloorplanPlugin/Controller.d.ts +4 -2
  128. package/dist/PanoSpatialTagPlugin/floorplan/TopviewFloorplanPlugin/typing.d.ts +5 -80
  129. package/dist/PanoSpatialTagPlugin/floorplan/typings/index.d.ts +117 -0
  130. package/dist/floorplan/MapviewFloorplanPlugin/Controller.d.ts +4 -2
  131. package/dist/floorplan/MapviewFloorplanPlugin/ModelViewPlugin/Plugin.d.ts +13 -2
  132. package/dist/floorplan/MapviewFloorplanPlugin/floorplan/MapviewFloorplanPlugin/Controller.d.ts +4 -2
  133. package/dist/floorplan/MapviewFloorplanPlugin/floorplan/MapviewFloorplanPlugin/typing.d.ts +1 -107
  134. package/dist/floorplan/MapviewFloorplanPlugin/floorplan/ModelFloorplanPlugin/typing.d.ts +1 -115
  135. package/dist/floorplan/MapviewFloorplanPlugin/floorplan/TopviewFloorplanPlugin/Controller.d.ts +4 -2
  136. package/dist/floorplan/MapviewFloorplanPlugin/floorplan/TopviewFloorplanPlugin/typing.d.ts +5 -80
  137. package/dist/floorplan/MapviewFloorplanPlugin/floorplan/typings/index.d.ts +117 -0
  138. package/dist/floorplan/MapviewFloorplanPlugin/index.js +8 -1
  139. package/dist/floorplan/MapviewFloorplanPlugin/typing.d.ts +1 -107
  140. package/dist/floorplan/ModelFloorplanPlugin/ModelViewPlugin/Plugin.d.ts +13 -2
  141. package/dist/floorplan/ModelFloorplanPlugin/floorplan/MapviewFloorplanPlugin/Controller.d.ts +4 -2
  142. package/dist/floorplan/ModelFloorplanPlugin/floorplan/MapviewFloorplanPlugin/typing.d.ts +1 -107
  143. package/dist/floorplan/ModelFloorplanPlugin/floorplan/ModelFloorplanPlugin/typing.d.ts +1 -115
  144. package/dist/floorplan/ModelFloorplanPlugin/floorplan/TopviewFloorplanPlugin/Controller.d.ts +4 -2
  145. package/dist/floorplan/ModelFloorplanPlugin/floorplan/TopviewFloorplanPlugin/typing.d.ts +5 -80
  146. package/dist/floorplan/ModelFloorplanPlugin/floorplan/typings/index.d.ts +117 -0
  147. package/dist/floorplan/ModelFloorplanPlugin/typing.d.ts +1 -115
  148. package/dist/floorplan/PanoFloorplanRadarPlugin/ModelViewPlugin/Plugin.d.ts +13 -2
  149. package/dist/floorplan/PanoFloorplanRadarPlugin/floorplan/MapviewFloorplanPlugin/Controller.d.ts +4 -2
  150. package/dist/floorplan/PanoFloorplanRadarPlugin/floorplan/MapviewFloorplanPlugin/typing.d.ts +1 -107
  151. package/dist/floorplan/PanoFloorplanRadarPlugin/floorplan/ModelFloorplanPlugin/typing.d.ts +1 -115
  152. package/dist/floorplan/PanoFloorplanRadarPlugin/floorplan/TopviewFloorplanPlugin/Controller.d.ts +4 -2
  153. package/dist/floorplan/PanoFloorplanRadarPlugin/floorplan/TopviewFloorplanPlugin/typing.d.ts +5 -80
  154. package/dist/floorplan/PanoFloorplanRadarPlugin/floorplan/typings/index.d.ts +117 -0
  155. package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +4 -2
  156. package/dist/floorplan/TopviewFloorplanPlugin/ModelViewPlugin/Plugin.d.ts +13 -2
  157. package/dist/floorplan/TopviewFloorplanPlugin/floorplan/MapviewFloorplanPlugin/Controller.d.ts +4 -2
  158. package/dist/floorplan/TopviewFloorplanPlugin/floorplan/MapviewFloorplanPlugin/typing.d.ts +1 -107
  159. package/dist/floorplan/TopviewFloorplanPlugin/floorplan/ModelFloorplanPlugin/typing.d.ts +1 -115
  160. package/dist/floorplan/TopviewFloorplanPlugin/floorplan/TopviewFloorplanPlugin/Controller.d.ts +4 -2
  161. package/dist/floorplan/TopviewFloorplanPlugin/floorplan/TopviewFloorplanPlugin/typing.d.ts +5 -80
  162. package/dist/floorplan/TopviewFloorplanPlugin/floorplan/typings/index.d.ts +117 -0
  163. package/dist/floorplan/TopviewFloorplanPlugin/index.js +11 -4
  164. package/dist/floorplan/TopviewFloorplanPlugin/typing.d.ts +5 -80
  165. package/dist/floorplan/typings/index.d.ts +117 -0
  166. package/dist/index.es.js +83 -48
  167. package/dist/index.js +91 -56
  168. package/dist/index.umd.js +94 -59
  169. package/docs/assets/search.js +1 -1
  170. package/docs/classes/CruisePluginController.html +14 -14
  171. package/docs/classes/Magnifier.html +4 -4
  172. package/docs/classes/ModelRoomLabelController.html +4 -4
  173. package/docs/enums/CameraMovementEffect.html +2 -2
  174. package/docs/enums/DIRECTION.html +1 -1
  175. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -1
  176. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
  177. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -1
  178. package/docs/enums/Rotation.html +2 -2
  179. package/docs/index.html +1 -1
  180. package/docs/interfaces/CSS3DRenderPluginExportType.html +2 -2
  181. package/docs/interfaces/CameraMovementPluginExportType.html +2 -2
  182. package/docs/interfaces/FloorplanBounding.html +4 -4
  183. package/docs/interfaces/FloorplanData.html +2 -2
  184. package/docs/interfaces/FloorplanEntrance.html +7 -7
  185. package/docs/interfaces/FloorplanExtraObject.html +3 -3
  186. package/docs/interfaces/FloorplanExtraObject3D.html +2 -2
  187. package/docs/interfaces/FloorplanFloorData.html +2 -2
  188. package/docs/interfaces/FloorplanImagePosition.html +2 -2
  189. package/docs/interfaces/FloorplanObserver.html +2 -2
  190. package/docs/interfaces/FloorplanOutlineItem.html +2 -2
  191. package/docs/interfaces/FloorplanPosition.html +2 -2
  192. package/docs/interfaces/FloorplanRoomItem.html +6 -6
  193. package/docs/interfaces/FloorplanRoomLabelItem.html +3 -3
  194. package/docs/interfaces/FloorplanServerBounding.html +4 -4
  195. package/docs/interfaces/FloorplanServerComputedData.html +1 -1
  196. package/docs/interfaces/FloorplanServerData.html +2 -2
  197. package/docs/interfaces/FloorplanServerDoorItem.html +1 -1
  198. package/docs/interfaces/FloorplanServerDoorPosition.html +1 -1
  199. package/docs/interfaces/FloorplanServerEntrance.html +7 -7
  200. package/docs/interfaces/FloorplanServerFloorData.html +2 -2
  201. package/docs/interfaces/FloorplanServerImagePosition.html +2 -2
  202. package/docs/interfaces/FloorplanServerObserver.html +2 -2
  203. package/docs/interfaces/FloorplanServerOutlineItem.html +2 -2
  204. package/docs/interfaces/FloorplanServerPosition.html +2 -2
  205. package/docs/interfaces/FloorplanServerRoomItem.html +7 -7
  206. package/docs/interfaces/FloorplanServerRoomLabelItem.html +3 -3
  207. package/docs/interfaces/ItemLabelPluginData.html +1 -1
  208. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -1
  209. package/docs/interfaces/ItemLabelPluginParametersType.html +1 -1
  210. package/docs/interfaces/LineJson.html +1 -1
  211. package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
  212. package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
  213. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
  214. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
  215. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
  216. package/docs/interfaces/ModelItemLabelPluginData.html +1 -1
  217. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -1
  218. package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -1
  219. package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
  220. package/docs/interfaces/ModelTVVideoPluginData.html +1 -1
  221. package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -1
  222. package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -1
  223. package/docs/interfaces/ModelViewPluginExportType.html +1 -1
  224. package/docs/interfaces/OpenParameter.html +2 -2
  225. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
  226. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -1
  227. package/docs/interfaces/PanoMeasureParameterType.html +2 -2
  228. package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
  229. package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
  230. package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
  231. package/docs/interfaces/PanoRulerProPluginExportType.html +1 -1
  232. package/docs/interfaces/PanoRulerProPluginOptions.html +1 -1
  233. package/docs/interfaces/PanoRulerProPluginParameterType.html +1 -1
  234. package/docs/interfaces/PanoRulerProPluginState.html +1 -1
  235. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -1
  236. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -1
  237. package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
  238. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -1
  239. package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
  240. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -1
  241. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
  242. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -1
  243. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -1
  244. package/docs/interfaces/Point.html +1 -1
  245. package/docs/interfaces/PointJson.html +1 -1
  246. package/docs/interfaces/Room.html +1 -1
  247. package/docs/interfaces/RoomInfo.html +1 -1
  248. package/docs/interfaces/RoomLabel.html +7 -7
  249. package/docs/interfaces/RoomRules.html +1 -1
  250. package/docs/interfaces/Rooms.html +1 -1
  251. package/docs/modules.html +18 -18
  252. package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +19 -22
  253. package/libs/ModelViewPlugin/Plugin.d.ts +13 -2
  254. package/libs/ModelViewPlugin/Plugin.js +45 -20
  255. package/libs/floorplan/MapviewFloorplanPlugin/Controller.d.ts +4 -2
  256. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +8 -1
  257. package/libs/floorplan/MapviewFloorplanPlugin/typing.d.ts +1 -107
  258. package/libs/floorplan/MapviewFloorplanPlugin/typing.js +1 -1
  259. package/libs/floorplan/ModelFloorplanPlugin/typing.d.ts +1 -115
  260. package/libs/floorplan/ModelFloorplanPlugin/typing.js +1 -1
  261. package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +4 -2
  262. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +11 -4
  263. package/libs/floorplan/TopviewFloorplanPlugin/typing.d.ts +5 -80
  264. package/libs/floorplan/TopviewFloorplanPlugin/typing.js +1 -1
  265. package/libs/floorplan/typings/index.d.ts +117 -0
  266. package/libs/floorplan/typings/index.js +1 -0
  267. package/package.json +3 -3
@@ -34,11 +34,11 @@ function add_css(target) {
34
34
 
35
35
  function get_each_context(ctx, list, i) {
36
36
  const child_ctx = ctx.slice();
37
- child_ctx[12] = list[i];
37
+ child_ctx[13] = list[i];
38
38
  return child_ctx;
39
39
  }
40
40
 
41
- // (82:2) {#each roomLabels as roomLableItem (roomLableItem.id)}
41
+ // (79:2) {#each roomLabels as roomLableItem (roomLableItem.id)}
42
42
  function create_each_block(key_1, ctx) {
43
43
  let first;
44
44
  let roomlabelitem;
@@ -46,7 +46,7 @@ function create_each_block(key_1, ctx) {
46
46
 
47
47
  roomlabelitem = new RoomLabelItem({
48
48
  props: {
49
- roomLabel: /*roomLableItem*/ ctx[12],
49
+ roomLabel: /*roomLableItem*/ ctx[13],
50
50
  five: /*five*/ ctx[1]
51
51
  }
52
52
  });
@@ -67,7 +67,7 @@ function create_each_block(key_1, ctx) {
67
67
  p(new_ctx, dirty) {
68
68
  ctx = new_ctx;
69
69
  const roomlabelitem_changes = {};
70
- if (dirty & /*roomLabels*/ 1) roomlabelitem_changes.roomLabel = /*roomLableItem*/ ctx[12];
70
+ if (dirty & /*roomLabels*/ 1) roomlabelitem_changes.roomLabel = /*roomLableItem*/ ctx[13];
71
71
  if (dirty & /*five*/ 2) roomlabelitem_changes.five = /*five*/ ctx[1];
72
72
  roomlabelitem.$set(roomlabelitem_changes);
73
73
  },
@@ -94,7 +94,7 @@ function create_fragment(ctx) {
94
94
  let div_resize_listener;
95
95
  let current;
96
96
  let each_value = /*roomLabels*/ ctx[0];
97
- const get_key = ctx => /*roomLableItem*/ ctx[12].id;
97
+ const get_key = ctx => /*roomLableItem*/ ctx[13].id;
98
98
 
99
99
  for (let i = 0; i < each_value.length; i += 1) {
100
100
  let child_ctx = get_each_context(ctx, each_value, i);
@@ -161,13 +161,19 @@ function create_fragment(ctx) {
161
161
 
162
162
  function instance($$self, $$props, $$invalidate) {
163
163
  let rendererSize;
164
+ var _a;
164
165
  let { five } = $$props;
165
166
  let { roomLabels } = $$props;
166
167
  let containerWidth;
167
168
  let containerHeight;
168
- let shownFloor = null;
169
+
170
+ let shownFloor = (_a = five.model.shownFloor) !== null && _a !== void 0
171
+ ? _a
172
+ : null;
169
173
 
170
174
  function getLabelVisible(item) {
175
+ const isLabelInFloor = shownFloor === null || item.floorIndex === shownFloor;
176
+ if (!isLabelInFloor) return false;
171
177
  const raycaster = new Raycaster();
172
178
  const cameraPosition = five.camera.position.clone();
173
179
  const position = new Vector3(item.position.x, item.position.y, item.position.z);
@@ -186,7 +192,9 @@ function instance($$self, $$props, $$invalidate) {
186
192
  return `translate(${xOffset}px, ${yOffset}px)`;
187
193
  }
188
194
 
189
- function getFormatedRoomLabels(rendererSize) {
195
+ function getFormatedRoomLabels(params) {
196
+ const { rendererSize, shownFloor } = params;
197
+
190
198
  // 因为 item distance 需要重复计算,所以缓存一下
191
199
  const distanceMap = new Map();
192
200
 
@@ -219,7 +227,7 @@ function instance($$self, $$props, $$invalidate) {
219
227
  }
220
228
 
221
229
  function onFiveCameraUpdate() {
222
- $$invalidate(0, roomLabels = getFormatedRoomLabels(rendererSize));
230
+ $$invalidate(0, roomLabels = getFormatedRoomLabels({ rendererSize, shownFloor }));
223
231
  }
224
232
 
225
233
  function onFiveModelShownFloorChange(floorIndex) {
@@ -251,21 +259,10 @@ function instance($$self, $$props, $$invalidate) {
251
259
  $: $$invalidate(5, rendererSize = { x: containerWidth, y: containerHeight });
252
260
  }
253
261
 
254
- if ($$self.$$.dirty & /*rendererSize*/ 32) {
255
- $: {
256
- // rendererSize 变化时,触发 reRender
257
- $$invalidate(0, roomLabels = getFormatedRoomLabels(rendererSize));
258
- }
259
- }
260
-
261
- if ($$self.$$.dirty & /*roomLabels, shownFloor*/ 17) {
262
+ if ($$self.$$.dirty & /*rendererSize, shownFloor*/ 48) {
262
263
  $: {
263
- // shownFloor 变化时,更新 item visible
264
- $$invalidate(0, roomLabels = roomLabels.map(item => {
265
- const isLabelInFloor = shownFloor === null || item.floorIndex === shownFloor;
266
- const visible = isLabelInFloor ? item.visible : false;
267
- return Object.assign(Object.assign({}, item), { visible });
268
- }));
264
+ // rendererSize 和 shownFloor 变化时,触发 reRender
265
+ $$invalidate(0, roomLabels = getFormatedRoomLabels({ rendererSize, shownFloor }));
269
266
  }
270
267
  }
271
268
  };
@@ -1,4 +1,11 @@
1
- import type { FivePlugin } from '@realsee/five';
1
+ import type { PartialDeep } from 'type-fest';
2
+ import { FivePlugin } from '@realsee/five';
3
+ export interface Config {
4
+ lookAtCurrentCamera: boolean;
5
+ lockedPanoIndex: number | null;
6
+ lockedLatitude: number | null;
7
+ lockedLongitude: number | null;
8
+ }
2
9
  export interface ModelViewPluginExportType {
3
10
  appendTo: (element: HTMLElement, size?: {
4
11
  width?: number;
@@ -8,10 +15,14 @@ export interface ModelViewPluginExportType {
8
15
  width?: number;
9
16
  height?: number;
10
17
  }) => void;
18
+ changeConfigs: (config: Partial<Config>) => void;
19
+ }
20
+ export interface ModelViewPluginParameterType {
21
+ config: Config;
11
22
  }
12
23
  /**
13
24
  * Five 模型插件
14
25
  * @template ExportType 导出方法
15
26
  */
16
- export declare const ModelViewPlugin: FivePlugin<void, ModelViewPluginExportType>;
27
+ export declare const ModelViewPlugin: FivePlugin<PartialDeep<ModelViewPluginParameterType> | undefined, ModelViewPluginExportType>;
17
28
  export default ModelViewPlugin;
@@ -1,14 +1,24 @@
1
+ import { Camera } from '@realsee/five';
1
2
  import * as THREE from 'three';
2
3
  /**
3
4
  * Five 模型插件
4
5
  * @template ExportType 导出方法
5
6
  */
6
- export const ModelViewPlugin = (five) => {
7
+ export const ModelViewPlugin = (five, params) => {
7
8
  let needsRender = true;
8
9
  let renderer = null;
10
+ const defaultConfig = {
11
+ lookAtCurrentCamera: false,
12
+ lockedPanoIndex: null,
13
+ lockedLatitude: null,
14
+ lockedLongitude: null,
15
+ };
16
+ const config = Object.assign(Object.assign({}, defaultConfig), params === null || params === void 0 ? void 0 : params.config);
9
17
  const scene = new THREE.Scene();
10
- const camera = new THREE.PerspectiveCamera(60, 1, 0.1, 1000);
18
+ const camera = new Camera(60);
11
19
  let model = new THREE.Object3D();
20
+ let distance;
21
+ let offset;
12
22
  {
13
23
  const light = new THREE.DirectionalLight(0xffffff, 0.5);
14
24
  light.position.copy(new THREE.Vector3(1, 1, 1));
@@ -48,6 +58,8 @@ export const ModelViewPlugin = (five) => {
48
58
  update();
49
59
  };
50
60
  const handleModelLoaded = () => {
61
+ distance = getDistanceFromModel(five.model, camera.fov, camera.aspect);
62
+ offset = five.model.bounding.getCenter(new THREE.Vector3());
51
63
  function cloneMaterial(_material) {
52
64
  const material = _material.clone();
53
65
  material.uniforms.modelAlpha.value = 1;
@@ -107,29 +119,36 @@ export const ModelViewPlugin = (five) => {
107
119
  }
108
120
  update();
109
121
  };
110
- const cameraDistance = () => {
111
- const bounding = five.model.bounding;
112
- const { fov, aspect } = camera;
113
- const radius = Math.sqrt(Math.pow(bounding.max.x - bounding.min.x + 2, 2) +
114
- Math.pow(bounding.max.y - bounding.min.y + 2, 2) +
115
- Math.pow(bounding.max.z - bounding.min.z + 2, 2));
122
+ function getDistanceFromModel(model, fov, aspect) {
123
+ const bounding = model.bounding;
124
+ const radius = Math.pow(Math.pow(bounding.max.x - bounding.min.x + 1, 2) +
125
+ Math.pow(bounding.max.y - bounding.min.y + 1, 2) +
126
+ Math.pow(bounding.max.z - bounding.min.z + 1, 2), 1 / 2);
116
127
  // fit screen
117
128
  let distance = radius / 2 / Math.tan((Math.PI * fov) / 360);
118
129
  if (aspect < 1)
119
130
  distance = distance / aspect;
120
131
  return isNaN(distance) ? radius : distance;
121
- };
132
+ }
133
+ function getOffsetFromPanoIndex(panoIndex) {
134
+ return five.work.observers[panoIndex].standingPosition.clone();
135
+ }
122
136
  const update = () => {
123
- const { longitude, latitude } = five.getPose();
124
- const distance = cameraDistance();
125
- const lookAt = five.model.bounding.getCenter(new THREE.Vector3());
126
- const longitudeDistance = distance * Math.cos(latitude);
127
- const cameraPosition = new THREE.Vector3();
128
- cameraPosition.x = Math.sin(longitude) * longitudeDistance + lookAt.x;
129
- cameraPosition.z = Math.cos(longitude) * longitudeDistance + lookAt.z;
130
- cameraPosition.y = Math.sin(latitude) * distance + lookAt.y;
131
- camera.position.copy(cameraPosition);
132
- camera.lookAt(lookAt);
137
+ if (!distance || !offset)
138
+ return;
139
+ const pose = five.getPose();
140
+ pose.fov = camera.fov;
141
+ pose.offset = offset;
142
+ pose.distance = distance;
143
+ if (typeof config.lockedLatitude === 'number')
144
+ pose.latitude = config.lockedLatitude;
145
+ if (typeof config.lockedLongitude === 'number')
146
+ pose.longitude = config.lockedLongitude;
147
+ if (typeof config.lockedPanoIndex === 'number')
148
+ pose.offset = getOffsetFromPanoIndex(config.lockedPanoIndex);
149
+ if (config.lookAtCurrentCamera)
150
+ pose.offset = five.camera.position.clone().setY(five.camera.position.y + 1);
151
+ camera.setFromPose(pose);
133
152
  needsRender = true;
134
153
  };
135
154
  const render = () => {
@@ -150,11 +169,17 @@ export const ModelViewPlugin = (five) => {
150
169
  renderer.dispose();
151
170
  renderer = null;
152
171
  };
172
+ const changeConfigs = (userConfig) => {
173
+ Object.assign(config, userConfig);
174
+ update();
175
+ };
176
+ Object.assign(window, { camera });
153
177
  five.on('modelLoaded', handleModelLoaded);
154
178
  five.on('modelWillLoad', handleModelWillLoad);
155
179
  five.on('cameraDirectionUpdate', update);
156
180
  five.on('dispose', dispose);
157
181
  five.on('renderFrame', render);
158
- return { appendTo, refresh };
182
+ five.on('cameraPositionUpdate', update);
183
+ return { appendTo, refresh, changeConfigs };
159
184
  };
160
185
  export default ModelViewPlugin;
@@ -1,8 +1,9 @@
1
+ import type { PartialDeep } from 'type-fest';
1
2
  import type { BaseOptions } from '../../base/BasePlugin';
2
3
  import type { Five } from '@realsee/five';
3
4
  import type { ShowState } from '../utils/correctFiveState';
4
5
  import type { FloorplanServerData } from '../typings/floorplanServerData';
5
- import type { State, EventMap, ShowOptions, HideOptions, Parameters, PluginData, PluginServerData } from './typing';
6
+ import type { State, Config, EventMap, ShowOptions, HideOptions, Parameters, PluginData, PluginServerData } from './typing';
6
7
  import * as BasePlugin from '../../base/BasePluginWithData';
7
8
  export declare class Controller extends BasePlugin.Controller<State, EventMap, PluginServerData, PluginData> {
8
9
  name: string;
@@ -56,7 +57,8 @@ export declare class Controller extends BasePlugin.Controller<State, EventMap, P
56
57
  /** 隐藏户型图 */
57
58
  hide: (options?: Partial<HideOptions>) => Promise<void>;
58
59
  /** 更改插件 State */
59
- setState(state: Partial<State>, options?: BaseOptions): void;
60
+ setState(state: PartialDeep<State>, options?: BaseOptions): void;
61
+ changeConfigs(config: Partial<Config>, userAction?: boolean): void;
60
62
  /** 更新户型图大小 */
61
63
  updateSize: () => void;
62
64
  /** 更新户型图位置 */
@@ -528,6 +528,8 @@ export class Controller extends BasePlugin.Controller {
528
528
  attachedTo: FLOOR_PLAN_ATTACHED_TO.BOUNDING_CENTER,
529
529
  getLabelElement: undefined,
530
530
  adaptiveRoomLabelVisibleEnable: true,
531
+ getRoomAreaText: (size) => (size / 1000000).toFixed(1) + '㎡',
532
+ getRuleDistanceText: (distance) => distance.toString()
531
533
  };
532
534
  const paramsConfig = params ? omit(params, ['selector', 'scale']) : {};
533
535
  const config = Object.assign(Object.assign({}, baseConfig), paramsConfig);
@@ -601,6 +603,10 @@ export class Controller extends BasePlugin.Controller {
601
603
  state.visible ? this._show(options) : this._hide(options);
602
604
  }
603
605
  }
606
+ changeConfigs(config, userAction = true) {
607
+ this.updateState({ config }, userAction);
608
+ this.render();
609
+ }
604
610
  /** 更新户型图位置 */
605
611
  updatePosition() {
606
612
  var _a;
@@ -619,7 +625,8 @@ export class Controller extends BasePlugin.Controller {
619
625
  }
620
626
  updateState(state, userAction) {
621
627
  const prevState = this.state;
622
- this.state = Object.assign(Object.assign({}, this.state), state);
628
+ const config = state.config ? Object.assign(Object.assign({}, prevState.config), state.config) : prevState.config;
629
+ this.state = Object.assign(Object.assign(Object.assign({}, this.state), state), { config });
623
630
  if (equal(this.state, prevState, { deep: true }))
624
631
  return;
625
632
  this.hooks.emit('stateChange', { state: this.state, prevState, userAction });
@@ -1,107 +1 @@
1
- import type { FLOOR_PLAN_ATTACHED_TO } from '../constant';
2
- import type * as BasePlugin from '../../base/BasePluginWithData';
3
- import type { FloorplanServerData } from '../typings/floorplanServerData';
4
- import type { FloorplanData, FloorplanRoomItem } from '../typings/floorplanData';
5
- export interface State extends BasePlugin.State {
6
- visible: boolean;
7
- config: Config;
8
- }
9
- export interface Config {
10
- /** 指北针的显示文案,默认为 '北' */
11
- northDesc: string;
12
- /** 户型图展示时,模型的透明度,默认为 1 */
13
- modelOpacity: number;
14
- /** 鼠标放置在分间上时,是否要自动高亮分间,默认为 true */
15
- hoverEnable: boolean;
16
- /** 是否要启用指北针功能,默认为 true */
17
- compassEnable: boolean;
18
- /** Five 切换到 Topview Mode 时,是否自动展示户型图,默认为 true */
19
- autoShowEnable: boolean;
20
- /** 是否要启用户型图分间标尺功能,默认为 true */
21
- ruleLabelsEnable: boolean;
22
- /** 是否要启用户型图分间标签功能,默认为 true */
23
- roomLabelsEnable: boolean;
24
- /** 自定义「雷达」图标 */
25
- cameraImageUrl: string;
26
- /** 计算户型图大小时,以模型的哪个高度为依据,默认为 BOUNDING_CENTER
27
- * - FLOOR_PLAN_ATTACHED_TO.FLOOR: 户型图大小与模型的地板进行贴合
28
- * - FLOOR_PLAN_ATTACHED_TO.CEILING: 户型图大小与模型的天花板进行贴合
29
- * - FLOOR_PLAN_ATTACHED_TO.BOUNDING_CENTER: 户型图大小与模型的中心进行贴合
30
- */
31
- attachedTo: FLOOR_PLAN_ATTACHED_TO;
32
- /** 分间标签的自定义函数,通过返回自定义 DOM 替换对应分间的标签 */
33
- getLabelElement: undefined | ((room: FloorplanRoomItem) => Element | null);
34
- /** 是否支持房屋标签自适应展示,默认为 true
35
- * @description
36
- * * 标签边框超过房间边框时,自动隐藏;不超过时自动展示。
37
- * * 鼠标 hover 时,自动展示。
38
- * */
39
- adaptiveRoomLabelVisibleEnable: boolean;
40
- }
41
- export interface Parameters extends Partial<Config> {
42
- selector?: string | Element;
43
- scale?: number;
44
- }
45
- export interface ViewEvent {
46
- /** 是否是用户滑动模型导致的户型图自动展示/消失 */
47
- auto: boolean;
48
- /** 是否是用户操作 */
49
- userAction: boolean;
50
- }
51
- export interface EventMap extends BasePlugin.EventMap<State, FloorplanData> {
52
- /**
53
- * 展示结束的回调
54
- * @param event.auto 是否是自动操作
55
- * @param event.userAction 是否是用户操作
56
- */
57
- showAnimationEnded: (event: ViewEvent) => void;
58
- /** visible 从 false 到 true 的回调
59
- * @param event.userAction 是否是用户操作
60
- */
61
- show: (event: ViewEvent) => void;
62
- /** visible 从 true 到 false 的回调
63
- * @param event.auto 是否是自动操作
64
- * @param event.userAction 是否是用户操作
65
- */
66
- hide: (event: ViewEvent) => void;
67
- /** enabled 从 false 到 true 的回调
68
- * @param event.userAction 是否是用户操作
69
- */
70
- enable: (event: {
71
- userAction: boolean;
72
- }) => void;
73
- /** enabled 从 true 到 false 的回调
74
- * @param event.userAction 是否是用户操作
75
- */
76
- disable: (event: {
77
- userAction: boolean;
78
- }) => void;
79
- /**
80
- * 点击户型图的回调
81
- * @return 当返回 false 时,会阻止默认行为
82
- */
83
- click: () => boolean | void;
84
- }
85
- export interface PluginServerData extends BasePlugin.ServerData {
86
- version: number;
87
- data: FloorplanServerData;
88
- }
89
- export interface ShowOptions {
90
- /** 展示户型图时,希望到达的楼层数 */
91
- floorIndex: number;
92
- /** 是否自动展示 */
93
- isAutoShow: boolean;
94
- /** 展示户型图时,模型透明度 */
95
- modelOpacity: number;
96
- /** 是否需要 opacity 动画 */
97
- immediately: boolean;
98
- /** 是否是用户操作 */
99
- userAction: boolean;
100
- }
101
- export interface HideOptions {
102
- /** 是否自动隐藏 */
103
- isAutoHide: boolean;
104
- /** 是否是用户操作 */
105
- userAction: boolean;
106
- }
107
- export { FloorplanData as PluginData };
1
+ export * from '../typings';
@@ -1 +1 @@
1
- export {};
1
+ export * from '../typings';
@@ -1,115 +1 @@
1
- import type { FLOOR_PLAN_ATTACHED_TO } from '../constant';
2
- import type * as BasePlugin from '../../base/BasePluginWithData';
3
- import type { FloorplanServerData } from '../typings/floorplanServerData';
4
- import type { FloorplanData, FloorplanRoomItem } from '../typings/floorplanData';
5
- export interface State extends BasePlugin.State {
6
- visible: boolean;
7
- config: Config;
8
- }
9
- export interface Config {
10
- /** 指北针的显示文案,默认为 '北' */
11
- northDesc: string;
12
- /** 户型图展示时,模型的透明度,默认为 1 */
13
- modelOpacity: number;
14
- /** 鼠标放置在分间上时,是否要自动高亮分间,默认为 true */
15
- hoverEnable: boolean;
16
- /** 是否要启用指北针功能,默认为 true */
17
- compassEnable: boolean;
18
- /** Five 切换到 Topview Mode 时,是否自动展示户型图,默认为 true */
19
- autoShowEnable: boolean;
20
- /** 是否要启用户型图分间标尺功能,默认为 true */
21
- ruleLabelsEnable: boolean;
22
- /** 是否要启用户型图分间标签功能,默认为 true */
23
- roomLabelsEnable: boolean;
24
- /** 是否支持房屋标签自适应展示,默认为 true
25
- * @description
26
- * * 标签边框超过房间边框时,自动隐藏;不超过时自动展示。
27
- * * 鼠标 hover 时,自动展示。
28
- * */
29
- adaptiveRoomLabelVisibleEnable: boolean;
30
- /** 自定义「雷达」图标 */
31
- cameraImageUrl: string;
32
- /** 计算户型图大小时,以模型的哪个高度为依据,默认为 BOUNDING_CENTER
33
- * - FLOOR_PLAN_ATTACHED_TO.FLOOR: 户型图大小与模型的地板进行贴合
34
- * - FLOOR_PLAN_ATTACHED_TO.CEILING: 户型图大小与模型的天花板进行贴合
35
- * - FLOOR_PLAN_ATTACHED_TO.BOUNDING_CENTER: 户型图大小与模型的中心进行贴合
36
- */
37
- attachedTo: FLOOR_PLAN_ATTACHED_TO;
38
- /** 分间标签的自定义函数,通过返回自定义 DOM 替换对应分间的标签 */
39
- getLabelElement: undefined | ((room: FloorplanRoomItem) => Element | null);
40
- /** 自定义分间面积文本
41
- * @param area 分间原始面积,单位是 mm²
42
- */
43
- getRoomAreaText: (areaSize: number) => string;
44
- /** 自定义标尺距离文本
45
- * @param distance 原始标尺距离,单位是 mm
46
- */
47
- getRuleDistanceText: (distance: number) => string;
48
- }
49
- export interface Parameters extends Partial<Config> {
50
- selector?: string | Element;
51
- scale?: number;
52
- }
53
- export interface ViewEvent {
54
- /** 是否是用户滑动模型导致的户型图自动展示/消失 */
55
- auto: boolean;
56
- /** 是否是用户操作 */
57
- userAction: boolean;
58
- }
59
- export interface EventMap extends BasePlugin.EventMap<State, FloorplanData> {
60
- /**
61
- * 展示结束的回调
62
- * @param event.auto 是否是自动操作
63
- * @param event.userAction 是否是用户操作
64
- */
65
- showAnimationEnded: (event: ViewEvent) => void;
66
- /** visible 从 false 到 true 的回调
67
- * @param event.userAction 是否是用户操作
68
- */
69
- show: (event: ViewEvent) => void;
70
- /** visible 从 true 到 false 的回调
71
- * @param event.auto 是否是自动操作
72
- * @param event.userAction 是否是用户操作
73
- */
74
- hide: (event: ViewEvent) => void;
75
- /** enabled 从 false 到 true 的回调
76
- * @param event.userAction 是否是用户操作
77
- */
78
- enable: (event: {
79
- userAction: boolean;
80
- }) => void;
81
- /** enabled 从 true 到 false 的回调
82
- * @param event.userAction 是否是用户操作
83
- */
84
- disable: (event: {
85
- userAction: boolean;
86
- }) => void;
87
- /**
88
- * 点击户型图的回调
89
- * @return 当返回 false 时,会阻止默认行为
90
- */
91
- click: () => boolean | undefined;
92
- }
93
- export interface PluginServerData extends BasePlugin.ServerData {
94
- version: number;
95
- data: FloorplanServerData;
96
- }
97
- export interface ShowOptions {
98
- /** 展示户型图时,希望到达的楼层数 */
99
- floorIndex: number;
100
- /** 是否自动展示 */
101
- isAutoShow: boolean;
102
- /** 展示户型图时,模型透明度 */
103
- modelOpacity: number;
104
- /** 是否需要 opacity 动画 */
105
- immediately: boolean;
106
- /** 是否是用户操作 */
107
- userAction: boolean;
108
- }
109
- export interface HideOptions {
110
- /** 是否自动隐藏 */
111
- isAutoHide: boolean;
112
- /** 是否是用户操作 */
113
- userAction: boolean;
114
- }
115
- export { FloorplanData as PluginData };
1
+ export * from '../typings';
@@ -1 +1 @@
1
- export {};
1
+ export * from '../typings';
@@ -1,7 +1,8 @@
1
+ import type { PartialDeep } from 'type-fest';
1
2
  import type { BaseOptions } from '../../base/BasePlugin';
2
3
  import type { Five } from '@realsee/five';
3
4
  import type { FloorplanServerData } from '../typings/floorplanServerData';
4
- import type { State, EventMap, Parameters, PluginData, PluginServerData } from './typing';
5
+ import type { State, Config, EventMap, Parameters, PluginData, PluginServerData } from './typing';
5
6
  import * as BasePlugin from '../../base/BasePluginWithData';
6
7
  export declare class Controller extends BasePlugin.Controller<State, EventMap, PluginServerData, PluginData> {
7
8
  name: string;
@@ -38,7 +39,8 @@ export declare class Controller extends BasePlugin.Controller<State, EventMap, P
38
39
  /** 销毁插件 */
39
40
  dispose: () => void;
40
41
  /** 更改插件 State */
41
- setState(state: Partial<State>, options?: BaseOptions): void;
42
+ setState(state: PartialDeep<State>, options?: BaseOptions): void;
43
+ changeConfigs(config: Partial<Config>, userAction?: boolean): void;
42
44
  protected formatData(serverData: PluginServerData): Promise<PluginData>;
43
45
  private _show;
44
46
  private _hide;
@@ -280,6 +280,8 @@ export class Controller extends BasePlugin.Controller {
280
280
  attachedTo: FLOOR_PLAN_ATTACHED_TO.BOUNDING_CENTER,
281
281
  getLabelElement: undefined,
282
282
  adaptiveRoomLabelVisibleEnable: true,
283
+ getRoomAreaText: (size) => (size / 1000000).toFixed(1) + '㎡',
284
+ getRuleDistanceText: (distance) => distance.toString()
283
285
  };
284
286
  const paramsConfig = params ? omit(params, ['selector', 'scale']) : {};
285
287
  const config = Object.assign(Object.assign({}, baseConfig), paramsConfig);
@@ -381,6 +383,10 @@ export class Controller extends BasePlugin.Controller {
381
383
  state.visible ? this._show(options) : this._hide(options);
382
384
  }
383
385
  }
386
+ changeConfigs(config, userAction = true) {
387
+ this.updateState({ config }, userAction);
388
+ this.render();
389
+ }
384
390
  async formatData(serverData) {
385
391
  return await formatData(serverData.data);
386
392
  }
@@ -389,7 +395,7 @@ export class Controller extends BasePlugin.Controller {
389
395
  return;
390
396
  this.isHiddenByHideFunc = false;
391
397
  const { userAction } = options;
392
- this.hooks.emit('show', { userAction });
398
+ this.hooks.emit('show', { userAction, auto: false });
393
399
  if (this.five.getCurrentState().mode !== 'Topview') {
394
400
  await changeMode(this.five, ['Topview', undefined, undefined, userAction]);
395
401
  }
@@ -399,14 +405,14 @@ export class Controller extends BasePlugin.Controller {
399
405
  const renderDuration = 500;
400
406
  const modelOpacity = this.state.config.modelOpacity;
401
407
  changeModelCanvasOpacity(this.five, modelOpacity, renderDuration);
402
- this.hooks.emit('showAnimationEnded', { userAction });
408
+ this.hooks.emit('showAnimationEnded', { userAction, auto: false });
403
409
  this.render();
404
410
  }
405
411
  async _hide(options) {
406
412
  if (!this.state.enabled)
407
413
  return;
408
414
  const { userAction } = options;
409
- this.hooks.emit('hide', { userAction });
415
+ this.hooks.emit('hide', { userAction, auto: false });
410
416
  const modelOpacity = 1;
411
417
  const renderDuration = 0;
412
418
  changeModelCanvasOpacity(this.five, modelOpacity, renderDuration);
@@ -423,7 +429,8 @@ export class Controller extends BasePlugin.Controller {
423
429
  }
424
430
  updateState(state, userAction) {
425
431
  const prevState = this.state;
426
- this.state = Object.assign(Object.assign({}, this.state), state);
432
+ const config = state.config ? Object.assign(Object.assign({}, prevState.config), state.config) : prevState.config;
433
+ this.state = Object.assign(Object.assign(Object.assign({}, this.state), state), { config });
427
434
  if (equal(this.state, prevState, { deep: true }))
428
435
  return;
429
436
  this.hooks.emit('stateChange', { state: this.state, prevState, userAction });