@realsee/dnalogel 2.27.3-dev.0 → 2.27.4-0

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 (379) hide show
  1. package/dist/AreaMakerPlugin/Controller.d.ts +94 -0
  2. package/dist/AreaMakerPlugin/index.d.ts +4 -0
  3. package/dist/AreaMakerPlugin/typing.d.ts +148 -0
  4. package/dist/AreaMakerPlugin/utils/Item.d.ts +114 -0
  5. package/dist/GuideLinePlugin/utils/createLineGeometry.d.ts +0 -5
  6. package/dist/PanoTagPlugin/typings/tag/Tag.d.ts +0 -2
  7. package/dist/PanoTagPlugin/typings/tag/TagConfig.d.ts +1 -1
  8. package/dist/base/BasePluginWithData.d.ts +1 -1
  9. package/dist/components/AreaLabel/Assets/roomLabelBg.d.ts +1 -0
  10. package/dist/components/AreaLabel/LabelItem.svelte.d.ts +1 -0
  11. package/dist/index.cjs.js +52 -52
  12. package/dist/index.d.ts +1 -0
  13. package/dist/index.js +4946 -4289
  14. package/dist/index.umd.js +54 -54
  15. package/dist/shared-utils/index.d.ts +1 -0
  16. package/dist/shared-utils/math/planimetry.d.ts +1 -1
  17. package/dist/shared-utils/three/core/Object3D.d.ts +8 -0
  18. package/dist/shared-utils/three/index.d.ts +2 -0
  19. package/dist/shared-utils/three/objects/LineSegments.d.ts +9 -0
  20. package/docs/assets/search.js +1 -1
  21. package/docs/classes/AreaMakerPluginPluginType.AreaMakerController.html +711 -0
  22. package/docs/classes/AreaMakerPluginPluginType.AreaMakerItem.html +671 -0
  23. package/docs/classes/CSS3DRender.html +33 -31
  24. package/docs/classes/CruisePluginController.html +29 -27
  25. package/docs/classes/GuideLineItem.GuideLineItem.html +22 -20
  26. package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +37 -35
  27. package/docs/classes/Magnifier.html +22 -20
  28. package/docs/classes/ModelRoomLabelController.html +13 -11
  29. package/docs/classes/Object3DHelperController.html +27 -25
  30. package/docs/classes/PaintBrush.html +17 -15
  31. package/docs/classes/PanoMeasurePluginLine.html +29 -27
  32. package/docs/classes/PanoMeasurePluginModel.html +29 -27
  33. package/docs/classes/PanoMeasurePluginPoint.html +13 -11
  34. package/docs/classes/PanoMeasurePluginPolyline.html +29 -27
  35. package/docs/classes/PanoTagPluginController.html +49 -47
  36. package/docs/classes/Util.BetterTween.html +13 -8
  37. package/docs/classes/Util.Interval.html +16 -11
  38. package/docs/classes/Util.LineSegments.html +379 -0
  39. package/docs/classes/Util.Magnifier.html +24 -19
  40. package/docs/classes/Util.Object3D.html +401 -0
  41. package/docs/classes/Util.PointDomHelper.html +15 -10
  42. package/docs/classes/Util.PointHelper.html +15 -10
  43. package/docs/classes/Util.PointSelectorHelper.html +20 -15
  44. package/docs/classes/Util.Rectangle.html +17 -12
  45. package/docs/enums/CameraMovementEffect.html +9 -7
  46. package/docs/enums/ContentType.html +22 -20
  47. package/docs/enums/DIRECTION.html +11 -9
  48. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +11 -9
  49. package/docs/enums/DimensionType.html +9 -7
  50. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +10 -8
  51. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +11 -9
  52. package/docs/enums/PaintBrushTypeEnum.html +10 -8
  53. package/docs/enums/PointType.html +9 -7
  54. package/docs/enums/Rotation.html +10 -8
  55. package/docs/functions/AreaMakerPluginPlugin.html +284 -0
  56. package/docs/functions/CSS3DRenderPlugin.html +6 -4
  57. package/docs/functions/CameraMovementPlugin.html +6 -4
  58. package/docs/functions/CruisePlugin.html +7 -5
  59. package/docs/functions/GuideLinePlugin.html +7 -5
  60. package/docs/functions/ItemLabelPlugin.html +6 -4
  61. package/docs/functions/MapviewFloorplanPlugin.html +6 -4
  62. package/docs/functions/ModelChassisCompassPlugin.html +6 -4
  63. package/docs/functions/ModelEntryDoorGuidePlugin.html +6 -4
  64. package/docs/functions/ModelFloorplanPlugin.html +6 -4
  65. package/docs/functions/ModelItemLabelPlugin.html +6 -4
  66. package/docs/functions/ModelRoomLabelPlugin.html +6 -4
  67. package/docs/functions/ModelTVVideoPlugin.html +6 -4
  68. package/docs/functions/ModelViewPlugin.html +6 -4
  69. package/docs/functions/Object3DHelperPlugin.html +6 -4
  70. package/docs/functions/PanoCompassPlugin.html +6 -4
  71. package/docs/functions/PanoCursorRaycasterPlugin.html +6 -4
  72. package/docs/functions/PanoDoorLabelPlugin.html +6 -4
  73. package/docs/functions/PanoFloorplanRadarPlugin.html +6 -4
  74. package/docs/functions/PanoMeasurePlugin.html +6 -4
  75. package/docs/functions/PanoRulerPlugin.html +6 -4
  76. package/docs/functions/PanoRulerProPlugin.html +6 -4
  77. package/docs/functions/PanoSpatialTagPlugin.html +6 -4
  78. package/docs/functions/PanoTagPlugin.html +6 -4
  79. package/docs/functions/PanoVideoPlugin.html +6 -4
  80. package/docs/functions/PipelinePlugin.html +6 -4
  81. package/docs/functions/TopviewFloorplanPlugin.html +6 -4
  82. package/docs/functions/Util.absoluteUrl.html +9 -4
  83. package/docs/functions/Util.equal.html +333 -0
  84. package/docs/functions/Util.getCoordsFromClient.html +9 -4
  85. package/docs/functions/Util.getCoordsFromElement.html +9 -4
  86. package/docs/functions/Util.getFrameTime.html +9 -4
  87. package/docs/functions/Util.getIntersectFromRelativePosition.html +9 -4
  88. package/docs/functions/Util.getRaycasterFromFivePointer.html +9 -4
  89. package/docs/functions/Util.isAbsoluteURL.html +9 -4
  90. package/docs/functions/Util.isModelLike.html +9 -4
  91. package/docs/functions/Util.isNil.html +9 -4
  92. package/docs/functions/Util.isPanoramaLike.html +9 -4
  93. package/docs/functions/Util.nextFrame.html +9 -4
  94. package/docs/functions/Util.notNil.html +9 -4
  95. package/docs/functions/Util.requestAnimationFrameInterval.html +9 -4
  96. package/docs/functions/Util.tweenProgress.html +9 -4
  97. package/docs/functions/Util.uuid.html +9 -4
  98. package/docs/functions/pluginFlag.html +7 -5
  99. package/docs/index.html +7 -5
  100. package/docs/interfaces/AddTagConfig.html +8 -6
  101. package/docs/interfaces/AreaMakerPluginPluginType.AnimeOptions.html +325 -0
  102. package/docs/interfaces/AreaMakerPluginPluginType.Config.html +330 -0
  103. package/docs/interfaces/AreaMakerPluginPluginType.EventMap.html +616 -0
  104. package/docs/interfaces/AreaMakerPluginPluginType.Params.html +329 -0
  105. package/docs/interfaces/AreaMakerPluginPluginType.ServerAreaMakerItem.html +379 -0
  106. package/docs/interfaces/AreaMakerPluginPluginType.ServerAreaMakerItemV1.html +364 -0
  107. package/docs/interfaces/AreaMakerPluginPluginType.ServerDataV1.html +329 -0
  108. package/docs/interfaces/AreaMakerPluginPluginType.ServerDataV2.html +322 -0
  109. package/docs/interfaces/AreaMakerPluginPluginType.ShowHideOptions.html +321 -0
  110. package/docs/interfaces/AreaMakerPluginPluginType.State.html +350 -0
  111. package/docs/interfaces/CSS3DRenderPluginEventMap.html +13 -11
  112. package/docs/interfaces/CSS3DRenderPluginState.html +10 -8
  113. package/docs/interfaces/CameraMovementPluginExportType.html +9 -7
  114. package/docs/interfaces/CruisePluginTypes.Config.html +10 -8
  115. package/docs/interfaces/CruisePluginTypes.CruiseKeyframe.html +14 -12
  116. package/docs/interfaces/CruisePluginTypes.EventMap.html +22 -20
  117. package/docs/interfaces/CruisePluginTypes.MoveAction.html +14 -12
  118. package/docs/interfaces/CruisePluginTypes.MoveWithKeyframesAction.html +16 -14
  119. package/docs/interfaces/CruisePluginTypes.MoveWithPanoIndexAction.html +16 -14
  120. package/docs/interfaces/CruisePluginTypes.PluginData.html +11 -9
  121. package/docs/interfaces/CruisePluginTypes.PluginServerData.html +8 -6
  122. package/docs/interfaces/CruisePluginTypes.PluginState.html +13 -11
  123. package/docs/interfaces/EventMap.html +17 -15
  124. package/docs/interfaces/FloorplanBounding.html +10 -8
  125. package/docs/interfaces/FloorplanData.html +12 -10
  126. package/docs/interfaces/FloorplanEntrance.html +13 -11
  127. package/docs/interfaces/FloorplanExtraObject.html +12 -10
  128. package/docs/interfaces/FloorplanExtraObject3D.html +10 -8
  129. package/docs/interfaces/FloorplanFloorData.html +11 -9
  130. package/docs/interfaces/FloorplanImagePosition.html +9 -7
  131. package/docs/interfaces/FloorplanObserver.html +11 -9
  132. package/docs/interfaces/FloorplanOutlineItem.html +11 -9
  133. package/docs/interfaces/FloorplanPosition.html +9 -7
  134. package/docs/interfaces/FloorplanRoomItem.html +15 -13
  135. package/docs/interfaces/FloorplanRoomLabelItem.html +9 -7
  136. package/docs/interfaces/FloorplanServerBounding.html +10 -8
  137. package/docs/interfaces/FloorplanServerComputedData.html +12 -10
  138. package/docs/interfaces/FloorplanServerData.html +9 -7
  139. package/docs/interfaces/FloorplanServerDoorItem.html +12 -10
  140. package/docs/interfaces/FloorplanServerDoorPosition.html +10 -8
  141. package/docs/interfaces/FloorplanServerEntrance.html +13 -11
  142. package/docs/interfaces/FloorplanServerFloorData.html +11 -9
  143. package/docs/interfaces/FloorplanServerImagePosition.html +9 -7
  144. package/docs/interfaces/FloorplanServerObserver.html +11 -9
  145. package/docs/interfaces/FloorplanServerOutlineItem.html +11 -9
  146. package/docs/interfaces/FloorplanServerPosition.html +9 -7
  147. package/docs/interfaces/FloorplanServerRoomItem.html +16 -14
  148. package/docs/interfaces/FloorplanServerRoomLabelItem.html +9 -7
  149. package/docs/interfaces/GuideLineModeItem.GuideLineTagContainer.html +10 -8
  150. package/docs/interfaces/GuideLinePluginType.CatmullRomCurve3.html +12 -10
  151. package/docs/interfaces/GuideLinePluginType.EventMap.html +15 -13
  152. package/docs/interfaces/GuideLinePluginType.GuideLineGeometryStyle.html +10 -8
  153. package/docs/interfaces/GuideLinePluginType.GuideLineItemContainer.html +8 -6
  154. package/docs/interfaces/GuideLinePluginType.GuideLineMaterialStyle.html +15 -13
  155. package/docs/interfaces/GuideLinePluginType.LineGeometriesConfig.html +10 -8
  156. package/docs/interfaces/GuideLinePluginType.ModelGuideLineStyle.html +20 -18
  157. package/docs/interfaces/GuideLinePluginType.ModelGuideLineTagData.html +9 -7
  158. package/docs/interfaces/GuideLinePluginType.PanoramaGuideLineStyle.html +20 -18
  159. package/docs/interfaces/GuideLinePluginType.PluginDataV2.html +7 -5
  160. package/docs/interfaces/GuideLinePluginType.PluginServerData.html +8 -6
  161. package/docs/interfaces/GuideLinePluginType.PluginState.html +10 -8
  162. package/docs/interfaces/GuideLinePluginType.Route.html +13 -11
  163. package/docs/interfaces/GuideLinePluginType.RouteConfig.html +11 -9
  164. package/docs/interfaces/HelperOffset.html +10 -8
  165. package/docs/interfaces/ImagePlaneGroup.html +8 -6
  166. package/docs/interfaces/ItemLabelPluginData.html +8 -6
  167. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +13 -11
  168. package/docs/interfaces/ItemLabelPluginParametersType.html +11 -9
  169. package/docs/interfaces/MinMax.html +9 -7
  170. package/docs/interfaces/ModelChassisCompassPluginData.html +9 -7
  171. package/docs/interfaces/ModelChassisCompassPluginExportType.html +10 -8
  172. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +9 -7
  173. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +10 -8
  174. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +10 -8
  175. package/docs/interfaces/ModelItemLabelPluginData.html +8 -6
  176. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +13 -11
  177. package/docs/interfaces/ModelItemLabelPluginParametersType.html +9 -7
  178. package/docs/interfaces/ModelRoomLabelPluginData.html +8 -6
  179. package/docs/interfaces/ModelTVVideoPluginData.html +11 -9
  180. package/docs/interfaces/ModelTVVideoPluginExportType.html +10 -8
  181. package/docs/interfaces/ModelTVVideoPluginParameterType.html +8 -6
  182. package/docs/interfaces/ModelViewPluginExportType.html +13 -11
  183. package/docs/interfaces/Object3DHelperState.html +10 -8
  184. package/docs/interfaces/ObjectHelperControllers.html +11 -9
  185. package/docs/interfaces/PaintBrushAction.html +14 -12
  186. package/docs/interfaces/PaintBrushConfigs.html +14 -12
  187. package/docs/interfaces/PaintBrushState.html +12 -10
  188. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +12 -10
  189. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +7 -5
  190. package/docs/interfaces/PanoMeasureParameterType.html +18 -16
  191. package/docs/interfaces/PanoMeasurePluginLineJson.html +10 -8
  192. package/docs/interfaces/PanoMeasurePluginOpenParameter.html +9 -7
  193. package/docs/interfaces/PanoMeasurePluginPointJson.html +9 -7
  194. package/docs/interfaces/PanoMeasurePluginPolylineJson.html +10 -8
  195. package/docs/interfaces/PanoRulerPluginExportType.html +12 -10
  196. package/docs/interfaces/PanoRulerPluginOptions.html +9 -7
  197. package/docs/interfaces/PanoRulerPluginParameterType.html +10 -8
  198. package/docs/interfaces/PanoRulerProPluginExportType.html +11 -9
  199. package/docs/interfaces/PanoRulerProPluginOptions.html +9 -7
  200. package/docs/interfaces/PanoRulerProPluginParameterType.html +9 -7
  201. package/docs/interfaces/PanoRulerProPluginState.html +10 -8
  202. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +7 -5
  203. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +7 -5
  204. package/docs/interfaces/PanoSpatialTagPluginData.html +13 -11
  205. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +12 -10
  206. package/docs/interfaces/PanoSpatialTagPluginExportType.html +15 -13
  207. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +12 -10
  208. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +15 -13
  209. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +13 -11
  210. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +12 -10
  211. package/docs/interfaces/PanoVideoPluginType.LoadParams.html +8 -6
  212. package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +10 -8
  213. package/docs/interfaces/PanoVideoPluginType.PluginData.html +8 -6
  214. package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +11 -9
  215. package/docs/interfaces/PanoVideoPluginType.PluginState.html +8 -6
  216. package/docs/interfaces/PanoVideoPluginType.VideoItem.html +10 -8
  217. package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +12 -10
  218. package/docs/interfaces/Point.html +10 -8
  219. package/docs/interfaces/Room.html +11 -9
  220. package/docs/interfaces/RoomInfo.html +9 -7
  221. package/docs/interfaces/RoomLabel.html +16 -14
  222. package/docs/interfaces/RoomRules.html +7 -5
  223. package/docs/interfaces/Rooms.html +7 -5
  224. package/docs/interfaces/Scissor.html +11 -9
  225. package/docs/interfaces/State.html +10 -8
  226. package/docs/interfaces/TagCacheInterface.html +14 -12
  227. package/docs/interfaces/TagConfig.html +16 -14
  228. package/docs/interfaces/TagGLTFObjectGroup.html +8 -6
  229. package/docs/interfaces/TagIconUrl.html +14 -12
  230. package/docs/interfaces/TagObjectGroup.html +8 -6
  231. package/docs/interfaces/TagStyle.html +8 -6
  232. package/docs/interfaces/Tags.html +11 -9
  233. package/docs/interfaces/TemporaryState.html +8 -6
  234. package/docs/interfaces/Util.MagnifierParameter.html +15 -10
  235. package/docs/interfaces/Util.MouseGroupParameter.html +12 -7
  236. package/docs/interfaces/Util.PointIntersection.html +12 -7
  237. package/docs/modules/AreaMakerPluginPluginType.html +319 -0
  238. package/docs/modules/CruisePluginTypes.html +7 -5
  239. package/docs/modules/GuideLineItem.html +7 -5
  240. package/docs/modules/GuideLineModeItem.html +7 -5
  241. package/docs/modules/GuideLinePluginType.html +7 -5
  242. package/docs/modules/PanoVideoPluginType.html +7 -5
  243. package/docs/modules/Util.html +12 -4
  244. package/docs/modules.html +10 -6
  245. package/docs/types/AreaMakerPluginPluginType.AreaMakerItemEventMap.html +327 -0
  246. package/docs/types/AreaMakerPluginPluginType.PluginData.html +297 -0
  247. package/docs/types/AreaMakerPluginPluginType.ServerData.html +297 -0
  248. package/docs/types/ArrayPosition.html +7 -5
  249. package/docs/types/AudioAppearance.html +7 -5
  250. package/docs/types/AudioTagTypeConfigKey.html +7 -5
  251. package/docs/types/CSS3DRenderExportType.html +7 -5
  252. package/docs/types/CSS3DRenderPluginExportType.html +7 -5
  253. package/docs/types/CSS3DRenderPluginParameterType.html +7 -5
  254. package/docs/types/ClassFunctionParameters.html +7 -5
  255. package/docs/types/Color.html +7 -5
  256. package/docs/types/ContentTypeConfigKey.html +7 -5
  257. package/docs/types/ContentTypeConfigKeySplit.html +7 -5
  258. package/docs/types/ContentTypeMap.html +7 -5
  259. package/docs/types/Create3DDomContainerReturnType.html +7 -5
  260. package/docs/types/Create3DElementReturnType.html +7 -5
  261. package/docs/types/CruisePluginExportType.html +7 -5
  262. package/docs/types/CruisePluginTypes.CruiseData.html +7 -5
  263. package/docs/types/CruisePluginTypes.MoveEffect.html +7 -5
  264. package/docs/types/DeprecatedMediaPlaneProperty.html +7 -5
  265. package/docs/types/DeprecatedTagProperty.html +7 -5
  266. package/docs/types/Direction-1.html +7 -5
  267. package/docs/types/Direction4.html +7 -5
  268. package/docs/types/ElementRenderer.html +7 -5
  269. package/docs/types/FloorplanRuleLabels.html +7 -5
  270. package/docs/types/FloorplanServerRuleLabels.html +7 -5
  271. package/docs/types/GuideLinePluginExportType.html +7 -5
  272. package/docs/types/GuideLinePluginType.GuideLineItem.html +7 -5
  273. package/docs/types/GuideLinePluginType.GuideLineItemEventMap.html +7 -5
  274. package/docs/types/GuideLinePluginType.GuideLineModeItemMode.html +7 -5
  275. package/docs/types/GuideLinePluginType.GuideLineStyle.html +7 -5
  276. package/docs/types/GuideLinePluginType.ModelGuideLineTag.html +7 -5
  277. package/docs/types/GuideLinePluginType.PathItem.html +7 -5
  278. package/docs/types/GuideLinePluginType.PluginData.html +7 -5
  279. package/docs/types/HelperEventMap.html +7 -5
  280. package/docs/types/LoadTagConfig.html +7 -5
  281. package/docs/types/MapviewFloorplanPluginParameterType.html +7 -5
  282. package/docs/types/MapviewFloorplanPluginReturnType.html +7 -5
  283. package/docs/types/MediaData.html +7 -5
  284. package/docs/types/MediaStore.html +7 -5
  285. package/docs/types/ModelEntryDoorGuidePluginParameterType.html +7 -5
  286. package/docs/types/ModelFloorplanPluginParameterType.html +7 -5
  287. package/docs/types/ModelFloorplanPluginReturnType.html +7 -5
  288. package/docs/types/ModelRoomLabelPluginParameters.html +7 -5
  289. package/docs/types/ModelRoomLabelPluginReturnType.html +7 -5
  290. package/docs/types/MoveArgs.html +7 -5
  291. package/docs/types/MoveOpts.html +7 -5
  292. package/docs/types/Object3DHelperEventMap.html +7 -5
  293. package/docs/types/ObjectFit.html +7 -5
  294. package/docs/types/PaintBrushEventMap.html +7 -5
  295. package/docs/types/PanoCompassPluginData.html +7 -5
  296. package/docs/types/PanoCompassPluginExportType.html +7 -5
  297. package/docs/types/PanoCompassPluginParameterType.html +7 -5
  298. package/docs/types/PanoFloorplanRadarPluginParameterType.html +7 -5
  299. package/docs/types/PanoFloorplanRadarPluginReturnType.html +7 -5
  300. package/docs/types/PanoIndex.html +7 -5
  301. package/docs/types/PanoMeasurePluginEvent.html +7 -5
  302. package/docs/types/PanoMeasureReturnType.html +7 -5
  303. package/docs/types/PanoSpatialTagPluginId.html +7 -5
  304. package/docs/types/PanoTagPluginExportInterface.html +7 -5
  305. package/docs/types/PanoTagPluginParamsInterface.html +7 -5
  306. package/docs/types/PanoVideoPluginParameterType.html +7 -5
  307. package/docs/types/PanoVideoPluginReturnType.html +7 -5
  308. package/docs/types/PickTagContentTypeInContentTypeConfigKey.html +7 -5
  309. package/docs/types/PipelinePluginParameterType.html +7 -5
  310. package/docs/types/PipelinePluginReturnType.html +7 -5
  311. package/docs/types/PlaneTag.html +7 -5
  312. package/docs/types/Point2DTag.html +7 -5
  313. package/docs/types/Point3DTag.html +7 -5
  314. package/docs/types/PointTag.html +7 -5
  315. package/docs/types/PointTagInstance.html +7 -5
  316. package/docs/types/Position.html +7 -5
  317. package/docs/types/RotateArgs.html +7 -5
  318. package/docs/types/RotateOpts.html +7 -5
  319. package/docs/types/RuleLabelsKey.html +7 -5
  320. package/docs/types/RuleLabelsValue.html +7 -5
  321. package/docs/types/StickType.html +7 -5
  322. package/docs/types/Tag.html +9 -12
  323. package/docs/types/Tag2D.html +7 -5
  324. package/docs/types/Tag3D.html +7 -5
  325. package/docs/types/TagConfigByKey.html +7 -5
  326. package/docs/types/TagContentType.html +7 -5
  327. package/docs/types/TagDimensionType.html +7 -5
  328. package/docs/types/TagElement.html +7 -5
  329. package/docs/types/TagEvents.html +7 -5
  330. package/docs/types/TagGLTFObject.html +7 -5
  331. package/docs/types/TagHooks.html +7 -5
  332. package/docs/types/TagId.html +7 -5
  333. package/docs/types/TagInstance.html +7 -5
  334. package/docs/types/TagPointType.html +7 -5
  335. package/docs/types/TagRendererMap.html +7 -5
  336. package/docs/types/TopviewFloorplanPluginParameterType.html +7 -5
  337. package/docs/types/TopviewFloorplanPluginReturnType.html +7 -5
  338. package/docs/types/WorkCode.html +7 -5
  339. package/docs/variables/FLOOR_TYPE_MAP.html +7 -5
  340. package/docs/variables/PLUGIN.html +7 -5
  341. package/docs/variables/ROOM_FETILE_TYPE_MAP.html +7 -5
  342. package/docs/variables/ROOM_TYPE_MAP.html +7 -5
  343. package/docs/variables/defaultGlobalConfig.html +8 -6
  344. package/docs/variables/itemLabelPluginServerParams.html +7 -5
  345. package/docs/variables/modelItemLabelPluginServerParams.html +7 -5
  346. package/docs/variables/modelRoomLabelPluginServerParams.html +7 -5
  347. package/libs/AreaMakerPlugin/Controller.d.ts +94 -0
  348. package/libs/AreaMakerPlugin/Controller.js +336 -0
  349. package/libs/AreaMakerPlugin/index.d.ts +4 -0
  350. package/libs/AreaMakerPlugin/index.js +37 -0
  351. package/libs/AreaMakerPlugin/typing.d.ts +148 -0
  352. package/libs/AreaMakerPlugin/typing.js +1 -0
  353. package/libs/AreaMakerPlugin/utils/Item.d.ts +114 -0
  354. package/libs/AreaMakerPlugin/utils/Item.js +263 -0
  355. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +42 -39
  356. package/libs/GuideLinePlugin/utils/createLineGeometry.d.ts +0 -5
  357. package/libs/GuideLinePlugin/utils/createLineGeometry.js +13 -13
  358. package/libs/PanoTagPlugin/typings/tag/Tag.d.ts +0 -2
  359. package/libs/PanoTagPlugin/typings/tag/TagConfig.d.ts +1 -1
  360. package/libs/PanoTagPlugin/utils/model/mediaPlane.js +10 -10
  361. package/libs/base/BasePlugin.js +1 -1
  362. package/libs/base/BasePluginWithData.d.ts +1 -1
  363. package/libs/components/AreaLabel/Assets/roomLabelBg.d.ts +1 -0
  364. package/libs/components/AreaLabel/Assets/roomLabelBg.js +4 -0
  365. package/libs/components/AreaLabel/LabelItem.js +125 -0
  366. package/libs/components/AreaLabel/LabelItem.svelte.d.ts +1 -0
  367. package/libs/index.d.ts +1 -0
  368. package/libs/index.js +120 -112
  369. package/libs/shared-utils/index.d.ts +1 -0
  370. package/libs/shared-utils/index.js +27 -21
  371. package/libs/shared-utils/logger.js +1 -1
  372. package/libs/shared-utils/math/planimetry.d.ts +1 -1
  373. package/libs/shared-utils/math/planimetry.js +36 -29
  374. package/libs/shared-utils/three/core/Object3D.d.ts +8 -0
  375. package/libs/shared-utils/three/core/Object3D.js +22 -0
  376. package/libs/shared-utils/three/index.d.ts +2 -0
  377. package/libs/shared-utils/three/objects/LineSegments.d.ts +9 -0
  378. package/libs/shared-utils/three/objects/LineSegments.js +9 -0
  379. package/package.json +1 -1
@@ -0,0 +1,148 @@
1
+ import type * as BasePlugin from '../base/BasePluginWithData';
2
+ import type * as THREE from 'three';
3
+ import type { AreaMakerItem } from './utils/Item';
4
+ export type { Controller as AreaMakerController } from './Controller';
5
+ export type { AreaMakerItem };
6
+ /** 插件初始化参数 */
7
+ export interface Params {
8
+ config?: Partial<Config>;
9
+ initialState?: Partial<State>;
10
+ }
11
+ /** 插件状态 */
12
+ export interface State extends BasePlugin.State {
13
+ /** 插件是否启用 */
14
+ enabled: boolean;
15
+ /** 插件整体是否可见 */
16
+ visible: boolean;
17
+ }
18
+ /** 插件配置 */
19
+ export interface Config {
20
+ /** 标注模型是否开启深度检测,此配置仅对模型生效,不会影响标签的展示效果。
21
+ * @default true
22
+ * @description 关闭后,标注模型不会被其他模型遮挡
23
+ */
24
+ modelDepthTest: boolean;
25
+ }
26
+ /** 插件事件 */
27
+ export interface EventMap extends BasePlugin.EventMap<State, ServerData> {
28
+ /** visible 从 false 到 true 的回调
29
+ * @param event.userAction 是否是用户操作
30
+ */
31
+ show: (event: {
32
+ userAction: boolean;
33
+ }) => void;
34
+ /** visible 从 true 到 false 的回调
35
+ * @param event.userAction 是否是用户操作
36
+ */
37
+ hide: (event: {
38
+ userAction: boolean;
39
+ }) => void;
40
+ /** enabled 从 false 到 true 的回调
41
+ * @param event.userAction 是否是用户操作
42
+ */
43
+ enable: (event: {
44
+ userAction: boolean;
45
+ }) => void;
46
+ /** enabled 从 true 到 false 的回调
47
+ * @param event.userAction 是否是用户操作
48
+ */
49
+ disable: (event: {
50
+ userAction: boolean;
51
+ }) => void;
52
+ /** config 变更的回调
53
+ * @param event.prevConfig 变更前的 config
54
+ * @param event.config 变更后的 config
55
+ * @param event.userAction 是否是用户操作
56
+ */
57
+ configChange: (event: {
58
+ prevConfig: Config;
59
+ config: Config;
60
+ userAction: boolean;
61
+ }) => void;
62
+ /** 插件内容点击的回调
63
+ * @param event.target 点击的标注实例
64
+ * @param event.intersectObjects 射线与标注模型的交点集合
65
+ * @param event.wantsFiveTapGestureParams Five wantsFiveTapGesture 的回调参数
66
+ * @returns <boolean> | <void> 返回 false 会阻止 Five wantsFiveTapGesture 的回调,其余 return 值会被忽略
67
+ */
68
+ wantsTap: (event: {
69
+ target: AreaMakerItem;
70
+ intersectObjects: THREE.Intersection[];
71
+ }) => boolean | void;
72
+ }
73
+ /** 标注实例事件 */
74
+ export type AreaMakerItemEventMap = {
75
+ /** 标注标签点击的回调
76
+ * @param event.target 点击的标注实例
77
+ * @param event.nativeEvent 点击事件的的原始 MouseEvent
78
+ */
79
+ tagClick: (event: {
80
+ target: AreaMakerItem;
81
+ nativeEvent: MouseEvent;
82
+ }) => void;
83
+ };
84
+ /** 动画相关的配置 */
85
+ export interface AnimeOptions {
86
+ /** 动画时长,单位是毫秒 */
87
+ duration?: number;
88
+ }
89
+ export interface ShowHideOptions extends BasePlugin.BaseOptions {
90
+ userAction: boolean;
91
+ }
92
+ /** 第一版数据
93
+ * @description 为什么会存在两种数据?
94
+ * 目前数据是线上已经存在的,这一版数据目前存在以下问题:
95
+ * 1. 无法描述弧线。
96
+ * 2. 数据结构不够清晰,数据存在一定产品逻辑上的抽象,比如说标注的高度,是由楼层高度和人工设置的高度修正组成的。
97
+ */
98
+ export interface ServerDataV1 {
99
+ list: ServerAreaMakerItemV1[];
100
+ }
101
+ /** 第二版数据 */
102
+ export interface ServerDataV2 {
103
+ list: ServerAreaMakerItem[];
104
+ }
105
+ /** load 的数据 */
106
+ export type ServerData = ServerDataV1 | ServerDataV2;
107
+ /** 插件使用的数据 */
108
+ export type PluginData = ServerDataV2;
109
+ export interface ServerAreaMakerItem {
110
+ id: number | string;
111
+ /** 标注名称 */
112
+ name?: string;
113
+ /** 标注所在楼层 */
114
+ floor_index: number;
115
+ /** 标注物体 */
116
+ object_data: {
117
+ /** 标注底面形状,THREE.Shape().toJSON() 的结果 */
118
+ shape: Record<string, any>;
119
+ /** 标注底面 y 坐标 */
120
+ bottom_y: number;
121
+ /** 标注高度,指标注顶部距离底部的距离。只能为正值,单位是米 */
122
+ height: number;
123
+ /** 标注颜色
124
+ * @example "#ffffff"
125
+ */
126
+ color?: string;
127
+ /** 标注透明度 */
128
+ opacity?: number;
129
+ };
130
+ }
131
+ export interface ServerAreaMakerItemV1 {
132
+ id: number;
133
+ name: string;
134
+ object_data: {
135
+ /** 绘制平面的三维世界坐标点集合 */
136
+ points: number[][];
137
+ /** 楼层索引 */
138
+ floorIndex: number;
139
+ /** 楼层高度 */
140
+ height: number;
141
+ /** 人工设置的y坐标方向偏移 */
142
+ fixedY: number;
143
+ /** 人工设置的高度修正 */
144
+ fixedHeight: number;
145
+ color: string;
146
+ opacity?: number;
147
+ };
148
+ }
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,114 @@
1
+ import * as THREE from 'three';
2
+ import { Object3D } from '../../shared-utils';
3
+ import { LineSegments } from '../../shared-utils';
4
+ import type { Controller } from '../Controller';
5
+ import type * as PluginType from '../typing';
6
+ import LabelItem from '../../components/AreaLabel/LabelItem.svelte';
7
+ import { Subscribe } from '../../shared-utils/Subscribe';
8
+ declare class AreaMakerModelGroup extends Object3D {
9
+ private areaMakerItem;
10
+ constructor(areaMakerItem: AreaMakerItem);
11
+ raycast(raycaster: THREE.Raycaster, intersects: THREE.Intersection[]): void;
12
+ }
13
+ export declare class AreaMakerItem {
14
+ id: string | number;
15
+ /** 标注名称 */
16
+ name: string;
17
+ /** 标注几何体 */
18
+ makerObject: THREE.Mesh<THREE.ExtrudeBufferGeometry, THREE.MeshBasicMaterial>;
19
+ /** 标注几何体的边框 */
20
+ outline: LineSegments<THREE.EdgesGeometry, THREE.LineBasicMaterial>;
21
+ /** 标注底面 Y 坐标 */
22
+ bottomY: PluginType.ServerAreaMakerItem['object_data']['bottom_y'];
23
+ /** 标注透明度 */
24
+ opacity: PluginType.ServerAreaMakerItem['object_data']['opacity'];
25
+ /** 标注高度 */
26
+ height: PluginType.ServerAreaMakerItem['object_data']['height'];
27
+ /** 标注所在楼层 */
28
+ floorIndex: PluginType.ServerAreaMakerItem['floor_index'];
29
+ /** 标注底面形状 */
30
+ shape: THREE.Shape;
31
+ /** 是否被挂载 */
32
+ mounted: boolean;
33
+ /** 查询问题使用的调试对象 */
34
+ checkMsg: {
35
+ /** 当标注没有展示时,可以通过这个字段查看原因 */
36
+ checkVisibleMsg: string;
37
+ /** 当标注标签没有展示时,可以通过这个字段查看原因 */
38
+ checkTagVisibleMsg: string;
39
+ };
40
+ /** 模型容器 */
41
+ modelGroup: AreaMakerModelGroup;
42
+ /** 标注是否可见 */
43
+ visible: boolean;
44
+ /** 标注标签实例 */
45
+ tagApp: LabelItem | null;
46
+ /** 标注标签是否可见 */
47
+ tagVisible: boolean;
48
+ /** 标注标签的世界坐标 */
49
+ tagPosition: THREE.Vector3;
50
+ /** 标注标签的 NDC 坐标 */
51
+ tagNDCPosition: THREE.Vector3;
52
+ /** 标注标签的 transform */
53
+ tagTransform: {
54
+ left: number;
55
+ top: number;
56
+ };
57
+ /** 标注标签的显示层级 */
58
+ tagZIndex: number;
59
+ hooks: Subscribe<PluginType.AreaMakerItemEventMap>;
60
+ /** Plugin 实例 */
61
+ private plugin;
62
+ /** 标注透明度动画 */
63
+ private opacityAnime?;
64
+ constructor(plugin: Controller, data: PluginType.ServerAreaMakerItem);
65
+ /** 挂载标注 */
66
+ mount(): void;
67
+ /** 卸载标注 */
68
+ unmount(): void;
69
+ /** 更改标注透明度
70
+ * @param opacity 标注透明度,范围:0-1
71
+ */
72
+ setOpacity(opacity: number): void;
73
+ /** 更改标注颜色
74
+ * @param color 标注颜色,支持 hex
75
+ * @example setColor('#FF0000')
76
+ */
77
+ setColor(color: string): void;
78
+ /** 更改标注高度
79
+ * @param height 标注高度,单位:米
80
+ */
81
+ setHeight(height: number): void;
82
+ /** 更改标注标签的显示层级
83
+ * @description 为什么需要这个方法
84
+ * 在相机朝向或位置发生变化时,各个标签所在的坐标与相机的远近关系发生了变化,所以标签的层级也会有变化。
85
+ * 比如:
86
+ * - 相机 -> 标签 A -> 标签 B: 标签 A 在标签 B 的前面
87
+ * - 标签 A <- 标签 B <- 相机: 标签 A 在标签 B 的后面
88
+ * 但是当前元素是无法感知到这种变化的,所以需要通过父元素调用这个方法来更新标签的层级。
89
+ */
90
+ setTagZIndex(zIndex: number): void;
91
+ /** 显示标注 */
92
+ /** 隐藏标注 */
93
+ /** 透明度动画 */
94
+ private doOpacityAnime;
95
+ /** 插件 Config 变化时更新自身 depthTest */
96
+ private onPluginConfigChange;
97
+ /** 更新标注可见性 */
98
+ private updateVisible;
99
+ /** 检测标注是否可见 */
100
+ private checkVisible;
101
+ /** 更新标注标签 */
102
+ private updateTag;
103
+ /** 更新标注标签的 NDC Position */
104
+ private updateTagNDCPosition;
105
+ /** 更新标注标签的 transform */
106
+ private updateTagDomTransform;
107
+ /** 更新标注标签可见性 */
108
+ private updateTagVisible;
109
+ /** 检测标注标签是否可见 */
110
+ private checkTagVisible;
111
+ /** 相机位姿发生变化时,更新标签 */
112
+ private onFiveCameraUpdate;
113
+ }
114
+ export {};
@@ -0,0 +1,263 @@
1
+ var f = Object.defineProperty;
2
+ var d = (n, t, e) => t in n ? f(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
+ var i = (n, t, e) => (d(n, typeof t != "symbol" ? t + "" : t, e), e);
4
+ import * as a from "three";
5
+ import "hammerjs";
6
+ import "@realsee/five";
7
+ import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
8
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
9
+ import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
10
+ import { Object3D as b } from "../../shared-utils/three/core/Object3D.js";
11
+ import { LineSegments as k } from "../../shared-utils/three/objects/LineSegments.js";
12
+ import { BetterTween as y } from "../../shared-utils/animationFrame/BetterTween.js";
13
+ import { LabelItem as O } from "../../components/AreaLabel/LabelItem.js";
14
+ import { getCenterPointOfPoints as T } from "../../shared-utils/math/planimetry.js";
15
+ import { Subscribe as C } from "../../shared-utils/Subscribe.js";
16
+ import "../../shared-utils/positionToVector3.js";
17
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
18
+ import "three/examples/jsm/renderers/CSS3DRenderer";
19
+ import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
20
+ import "../../CSS3DRenderPlugin/utils/createResizeObserver.js";
21
+ import "../../CSS3DRenderPlugin/utils/even.js";
22
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
23
+ import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
24
+ import "../../shared-utils/three/centerPoint.js";
25
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
26
+ import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
27
+ import "../../shared-utils/animationFrame/index.js";
28
+ import "../../vendor/svelte/internal/index.js";
29
+ import "../../components/AreaLabel/Assets/roomLabelBg.js";
30
+ class M extends b {
31
+ constructor(e) {
32
+ super();
33
+ i(this, "areaMakerItem");
34
+ this.areaMakerItem = e;
35
+ }
36
+ raycast(e, s) {
37
+ this.areaMakerItem.makerObject.raycast(e, s);
38
+ }
39
+ }
40
+ class q {
41
+ constructor(t, e) {
42
+ i(this, "id");
43
+ /** 标注名称 */
44
+ i(this, "name", "");
45
+ /** 标注几何体 */
46
+ i(this, "makerObject");
47
+ /** 标注几何体的边框 */
48
+ i(this, "outline");
49
+ /** 标注底面 Y 坐标 */
50
+ i(this, "bottomY");
51
+ /** 标注透明度 */
52
+ i(this, "opacity");
53
+ /** 标注高度 */
54
+ i(this, "height");
55
+ /** 标注所在楼层 */
56
+ i(this, "floorIndex");
57
+ /** 标注底面形状 */
58
+ i(this, "shape");
59
+ /** 是否被挂载 */
60
+ i(this, "mounted", !1);
61
+ /** 查询问题使用的调试对象 */
62
+ i(this, "checkMsg", {
63
+ /** 当标注没有展示时,可以通过这个字段查看原因 */
64
+ checkVisibleMsg: "",
65
+ /** 当标注标签没有展示时,可以通过这个字段查看原因 */
66
+ checkTagVisibleMsg: ""
67
+ });
68
+ /** 模型容器 */
69
+ i(this, "modelGroup");
70
+ /** 标注是否可见 */
71
+ i(this, "visible", !1);
72
+ // ==================== 标签相关 ====================
73
+ /** 标注标签实例 */
74
+ i(this, "tagApp");
75
+ /** 标注标签是否可见 */
76
+ i(this, "tagVisible", !1);
77
+ /** 标注标签的世界坐标 */
78
+ i(this, "tagPosition", new a.Vector3());
79
+ /** 标注标签的 NDC 坐标 */
80
+ i(this, "tagNDCPosition", new a.Vector3());
81
+ /** 标注标签的 transform */
82
+ i(this, "tagTransform", { left: 0, top: 0 });
83
+ /** 标注标签的显示层级 */
84
+ i(this, "tagZIndex", 0);
85
+ i(this, "hooks", new C());
86
+ /** Plugin 实例 */
87
+ i(this, "plugin");
88
+ /** 标注透明度动画 */
89
+ i(this, "opacityAnime");
90
+ /** 显示标注 */
91
+ // public show() {
92
+ // return this.doOpacityAnime({
93
+ // duration: 500,
94
+ // makerObjectOpacity: [this.makerObject.material.opacity, this.opacity],
95
+ // outlineOpacity: [this.outline.material.opacity, 1],
96
+ // ...options,
97
+ // })
98
+ // }
99
+ /** 隐藏标注 */
100
+ // public hide() {
101
+ // return this.doOpacityAnime({
102
+ // duration: 500,
103
+ // makerObjectOpacity: [this.makerObject.material.opacity, 0],
104
+ // outlineOpacity: [this.outline.material.opacity, 0],
105
+ // ...options,
106
+ // })
107
+ // }
108
+ /** 透明度动画 */
109
+ i(this, "doOpacityAnime", (t) => {
110
+ var h;
111
+ (h = this.opacityAnime) == null || h.dispose();
112
+ const e = t.duration, [s, o] = t.makerObjectOpacity, [r, l] = t.outlineOpacity;
113
+ if (e === 0) {
114
+ this.makerObject.material.opacity = o, this.outline.material.opacity = l;
115
+ return;
116
+ }
117
+ return new Promise((p) => {
118
+ this.opacityAnime = new y({ makerObjectOpacity: s, outlineOpacity: r }).to({
119
+ makerObjectOpacity: o,
120
+ outlineOpacity: l
121
+ }).onUpdate(({ makerObjectOpacity: c, outlineOpacity: m }) => {
122
+ this.makerObject.material.opacity = c, this.outline.material.opacity = m, this.plugin.five.needsRender = !0;
123
+ }).onComplete(() => p(!0)).onDispose(() => {
124
+ this.makerObject.material.opacity = o, this.outline.material.opacity = l, this.plugin.five.needsRender = !0, p(!1);
125
+ }).play();
126
+ });
127
+ });
128
+ /** 插件 Config 变化时更新自身 depthTest */
129
+ i(this, "onPluginConfigChange", (t) => {
130
+ this.makerObject.material.depthTest = t.config.modelDepthTest, this.outline.material.depthTest = t.config.modelDepthTest, this.plugin.five.needsRender = !0;
131
+ });
132
+ /** 更新标注可见性 */
133
+ i(this, "updateVisible", () => {
134
+ const { result: t, msg: e } = this.checkVisible();
135
+ this.checkMsg.checkVisibleMsg = e, this.visible !== t && (this.visible = t, this.modelGroup.visible = t, this.plugin.five.needsRender = !0);
136
+ });
137
+ /** 检测标注是否可见 */
138
+ i(this, "checkVisible", () => {
139
+ if (!this.plugin.state.visible)
140
+ return { result: !1, msg: "插件不可见" };
141
+ const e = this.plugin.five.model.shownFloor;
142
+ return e === null || e === this.floorIndex ? { result: !0, msg: "" } : { result: !1, msg: `模型高亮楼层不符合展示条件, 当前高亮楼层为:${e}` };
143
+ });
144
+ /** 更新标注标签 */
145
+ i(this, "updateTag", () => {
146
+ this.tagApp && (this.updateTagNDCPosition(), this.updateTagDomTransform(), this.updateTagVisible());
147
+ });
148
+ /** 更新标注标签的 NDC Position */
149
+ i(this, "updateTagNDCPosition", () => {
150
+ const e = this.tagPosition.clone().project(this.plugin.five.camera);
151
+ this.tagNDCPosition.copy(e);
152
+ });
153
+ /** 更新标注标签的 transform */
154
+ i(this, "updateTagDomTransform", () => {
155
+ var o;
156
+ const t = this.tagNDCPosition, e = Math.round((t.x + 1) / 2 * this.plugin.tagDomContainer.clientWidth), s = Math.round((-t.y + 1) / 2 * this.plugin.tagDomContainer.clientHeight);
157
+ this.tagTransform.left === e && this.tagTransform.top === s || (this.tagTransform = { left: e, top: s }, (o = this.tagApp) == null || o.$set({ transform: `translate(${e}px, ${s}px)` }));
158
+ });
159
+ /** 更新标注标签可见性 */
160
+ i(this, "updateTagVisible", () => {
161
+ var s;
162
+ const { result: t, msg: e } = this.checkTagVisible();
163
+ this.checkMsg.checkTagVisibleMsg = e, this.tagVisible !== t && (this.tagVisible = t, (s = this.tagApp) == null || s.$set({ visible: t }));
164
+ });
165
+ /** 检测标注标签是否可见 */
166
+ i(this, "checkTagVisible", () => {
167
+ if (!this.visible)
168
+ return { result: !1, msg: "标注整体不可见" };
169
+ const e = this.plugin.five, s = new a.Raycaster(), o = e.camera.position.clone();
170
+ s.set(o.clone(), this.tagPosition.clone().sub(o).normalize());
171
+ const [r] = e.model.intersectRaycaster(s), l = this.tagPosition.distanceTo(e.camera.position);
172
+ if (r && r.distance + 0.1 < l)
173
+ return { result: !1, msg: "标注标签被 Five 模型遮挡" };
174
+ const h = this.tagNDCPosition;
175
+ return Math.abs(h.x) > 1.2 || Math.abs(h.y) > 1.2 || Math.abs(h.z) > 1 ? { result: !1, msg: "标注标签不在屏幕内" } : { result: !0, msg: "" };
176
+ });
177
+ /** 相机位姿发生变化时,更新标签 */
178
+ i(this, "onFiveCameraUpdate", () => {
179
+ this.tagApp && this.visible && (this.updateTagNDCPosition(), this.updateTagDomTransform(), this.updateTagVisible());
180
+ });
181
+ var p, c, m;
182
+ const s = e.object_data, o = s.bottom_y, r = s.height, l = new a.Color((p = s.color) != null ? p : "#FFFFFF"), h = (c = s.opacity) != null ? c : 0.4;
183
+ this.id = e.id, this.name = (m = e.name) != null ? m : "", this.plugin = t, this.height = r, this.bottomY = o, this.opacity = h, this.shape = new a.Shape().fromJSON(s.shape), this.floorIndex = e.floor_index, this.makerObject = new a.Mesh(u(this.shape, r), v(l, h)), g(this.makerObject, o), this.makerObject.material.depthTest = this.plugin.config.modelDepthTest, this.outline = new k(
184
+ new a.EdgesGeometry(this.makerObject.geometry),
185
+ new a.LineBasicMaterial({ color: l, transparent: !0 })
186
+ ), g(this.outline, o), this.outline.material.depthTest = this.plugin.config.modelDepthTest, this.setHeight(r), this.modelGroup = new M(this);
187
+ }
188
+ /** 挂载标注 */
189
+ mount() {
190
+ if (this.mounted = !0, this.updateVisible(), this.makerObject.material.depthTest = this.plugin.config.modelDepthTest, this.outline.material.depthTest = this.plugin.config.modelDepthTest, this.modelGroup.add(this.makerObject, this.outline), !!this.name) {
191
+ const e = this.plugin.tagDomContainer, s = {
192
+ content: this.name,
193
+ visible: this.tagVisible,
194
+ transform: `translate(${this.tagTransform.left}px, ${this.tagTransform.top}px)`,
195
+ onClick: (o) => this.hooks.emit("tagClick", { target: this, nativeEvent: o })
196
+ };
197
+ this.tagApp = new O({ target: e, props: s }), this.updateTag();
198
+ }
199
+ this.plugin.five.needsRender = !0, this.plugin.hooks.on("configChange", this.onPluginConfigChange), this.plugin.hooks.on("stateChange", this.updateVisible), this.plugin.five.on("modeChange", this.updateVisible), this.plugin.five.on("modelShownFloorChange", this.updateVisible), this.plugin.five.on("cameraUpdate", this.onFiveCameraUpdate);
200
+ }
201
+ /** 卸载标注 */
202
+ unmount() {
203
+ var t;
204
+ this.mounted = !1, this.modelGroup.remove(...this.modelGroup.children), (t = this.tagApp) == null || t.$destroy(), this.tagApp = null, this.plugin.hooks.off("configChange", this.onPluginConfigChange), this.plugin.hooks.off("stateChange", this.updateVisible), this.plugin.five.off("modeChange", this.updateVisible), this.plugin.five.off("modelShownFloorChange", this.updateVisible), this.plugin.five.off("cameraUpdate", this.onFiveCameraUpdate);
205
+ }
206
+ /** 更改标注透明度
207
+ * @param opacity 标注透明度,范围:0-1
208
+ */
209
+ setOpacity(t) {
210
+ var e;
211
+ this.opacity = t, (e = this.opacityAnime) == null || e.dispose(), this.makerObject.material.opacity = t, this.plugin.five.needsRender = !0;
212
+ }
213
+ /** 更改标注颜色
214
+ * @param color 标注颜色,支持 hex
215
+ * @example setColor('#FF0000')
216
+ */
217
+ setColor(t) {
218
+ const e = new a.Color(t);
219
+ this.makerObject.material.color = e, this.outline.material.color = e, this.plugin.five.needsRender = !0;
220
+ }
221
+ /** 更改标注高度
222
+ * @param height 标注高度,单位:米
223
+ */
224
+ setHeight(t) {
225
+ if (t <= 0)
226
+ throw new Error("高度必须大于 0");
227
+ this.height = t, this.makerObject.geometry = u(this.shape, t), this.outline.geometry = new a.EdgesGeometry(this.makerObject.geometry);
228
+ const e = this.shape.extractPoints(10).shape.slice(0, -1), s = T(e), o = new a.Vector3(s.x, s.y, t);
229
+ g(o, this.bottomY), this.tagPosition.copy(o), this.updateTag(), this.plugin.five.needsRender = !0;
230
+ }
231
+ /** 更改标注标签的显示层级
232
+ * @description 为什么需要这个方法
233
+ * 在相机朝向或位置发生变化时,各个标签所在的坐标与相机的远近关系发生了变化,所以标签的层级也会有变化。
234
+ * 比如:
235
+ * - 相机 -> 标签 A -> 标签 B: 标签 A 在标签 B 的前面
236
+ * - 标签 A <- 标签 B <- 相机: 标签 A 在标签 B 的后面
237
+ * 但是当前元素是无法感知到这种变化的,所以需要通过父元素调用这个方法来更新标签的层级。
238
+ */
239
+ setTagZIndex(t) {
240
+ var e;
241
+ this.tagZIndex !== t && ((e = this.tagApp) == null || e.$set({ zIndex: t }));
242
+ }
243
+ }
244
+ function u(n, t) {
245
+ return new a.ExtrudeBufferGeometry(n, {
246
+ depth: t,
247
+ bevelEnabled: !1
248
+ });
249
+ }
250
+ function v(n, t) {
251
+ return new a.MeshBasicMaterial({
252
+ color: n,
253
+ opacity: t,
254
+ transparent: !0
255
+ });
256
+ }
257
+ function g(n, t) {
258
+ const e = new a.Matrix4(), s = new a.Matrix4().makeRotationX(Math.PI / 2), o = new a.Matrix4().makeTranslation(0, 0, -t), r = new a.Matrix4().makeScale(1, 1, -1);
259
+ e.multiply(s), e.multiply(o), e.multiply(r), n.applyMatrix4(e);
260
+ }
261
+ export {
262
+ q as AreaMakerItem
263
+ };