@realsee/dnalogel 2.20.0-dev.3 → 2.20.0-dev.4

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 (317) hide show
  1. package/dist/PanoTagPlugin/controller/TagRender.d.ts +11 -1
  2. package/dist/PanoTagPlugin/typings/tag/Utils.d.ts +4 -1
  3. package/dist/index.cjs.js +43 -43
  4. package/dist/index.js +3268 -3228
  5. package/dist/index.umd.js +31 -31
  6. package/docs/assets/search.js +1 -1
  7. package/docs/classes/CSS3DRender.html +31 -30
  8. package/docs/classes/CruisePluginController.html +26 -25
  9. package/docs/classes/GuideLineItem.GuideLineItem.html +20 -19
  10. package/docs/classes/GuideLineModeItem.GuideLineModeItem.html +31 -30
  11. package/docs/classes/Magnifier.html +20 -19
  12. package/docs/classes/ModelRoomLabelController.html +11 -10
  13. package/docs/classes/Object3DHelperController.html +25 -24
  14. package/docs/classes/PaintBrush.html +15 -14
  15. package/docs/classes/PanoMeasurePluginLine.html +23 -22
  16. package/docs/classes/PanoMeasurePluginModel.html +22 -21
  17. package/docs/classes/PanoMeasurePluginPoint.html +14 -13
  18. package/docs/classes/PanoMeasurePluginPolyline.html +26 -25
  19. package/docs/classes/PanoTagPluginController.html +72 -45
  20. package/docs/classes/Util.BetterTween.html +9 -8
  21. package/docs/classes/Util.FivePointSelector.html +12 -11
  22. package/docs/classes/Util.Interval.html +12 -11
  23. package/docs/classes/Util.Magnifier.html +17 -16
  24. package/docs/classes/Util.PointDomHelper.html +11 -10
  25. package/docs/classes/Util.PointHelper.html +11 -10
  26. package/docs/classes/Util.Rectangle.html +13 -12
  27. package/docs/enums/CameraMovementEffect.html +7 -6
  28. package/docs/enums/ContentType.html +20 -19
  29. package/docs/enums/DIRECTION.html +9 -8
  30. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +9 -8
  31. package/docs/enums/DimensionType.html +7 -6
  32. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +8 -7
  33. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +9 -8
  34. package/docs/enums/PaintBrushTypeEnum.html +8 -7
  35. package/docs/enums/PointType.html +7 -6
  36. package/docs/enums/Rotation.html +8 -7
  37. package/docs/functions/CSS3DRenderPlugin.html +4 -3
  38. package/docs/functions/CameraMovementPlugin.html +4 -3
  39. package/docs/functions/CruisePlugin.html +4 -3
  40. package/docs/functions/GuideLinePlugin.html +5 -4
  41. package/docs/functions/ItemLabelPlugin.html +4 -3
  42. package/docs/functions/MapviewFloorplanPlugin.html +4 -3
  43. package/docs/functions/ModelChassisCompassPlugin.html +4 -3
  44. package/docs/functions/ModelEntryDoorGuidePlugin.html +4 -3
  45. package/docs/functions/ModelFloorplanPlugin.html +4 -3
  46. package/docs/functions/ModelItemLabelPlugin.html +4 -3
  47. package/docs/functions/ModelRoomLabelPlugin.html +4 -3
  48. package/docs/functions/ModelTVVideoPlugin.html +4 -3
  49. package/docs/functions/ModelViewPlugin.html +4 -3
  50. package/docs/functions/Object3DHelperPlugin.html +4 -3
  51. package/docs/functions/PanoCompassPlugin.html +4 -3
  52. package/docs/functions/PanoCursorRaycasterPlugin.html +4 -3
  53. package/docs/functions/PanoDoorLabelPlugin.html +4 -3
  54. package/docs/functions/PanoFloorplanRadarPlugin.html +4 -3
  55. package/docs/functions/PanoMeasurePlugin.html +4 -3
  56. package/docs/functions/PanoRulerPlugin.html +4 -3
  57. package/docs/functions/PanoRulerProPlugin.html +4 -3
  58. package/docs/functions/PanoSpatialTagPlugin.html +4 -3
  59. package/docs/functions/PanoTagPlugin.html +4 -3
  60. package/docs/functions/PanoVideoPlugin.html +4 -3
  61. package/docs/functions/TopviewFloorplanPlugin.html +4 -3
  62. package/docs/functions/Util.getCoordsFromClient.html +5 -4
  63. package/docs/functions/Util.getCoordsFromElement.html +5 -4
  64. package/docs/functions/Util.getFrameTime.html +5 -4
  65. package/docs/functions/Util.getIntersectFromRelativePosition.html +5 -4
  66. package/docs/functions/Util.getRaycasterFromFivePointer.html +5 -4
  67. package/docs/functions/Util.isAbsoluteURL.html +5 -4
  68. package/docs/functions/Util.isModelLike.html +5 -4
  69. package/docs/functions/Util.isNil.html +5 -4
  70. package/docs/functions/Util.isPanoramaLike.html +5 -4
  71. package/docs/functions/Util.nextFrame.html +5 -4
  72. package/docs/functions/Util.notNil.html +5 -4
  73. package/docs/functions/Util.requestAnimationFrameInterval.html +5 -4
  74. package/docs/functions/Util.tweenProgress.html +5 -4
  75. package/docs/functions/Util.uuid.html +5 -4
  76. package/docs/functions/pluginFlag.html +5 -4
  77. package/docs/index.html +5 -4
  78. package/docs/interfaces/AddTagConfig.html +6 -5
  79. package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -10
  80. package/docs/interfaces/CSS3DRenderPluginState.html +8 -7
  81. package/docs/interfaces/CameraMovementPluginExportType.html +7 -6
  82. package/docs/interfaces/CruisePluginTypes.Config.html +8 -7
  83. package/docs/interfaces/CruisePluginTypes.CruiseKeyframe.html +12 -11
  84. package/docs/interfaces/CruisePluginTypes.EventMap.html +20 -19
  85. package/docs/interfaces/CruisePluginTypes.MoveAction.html +12 -11
  86. package/docs/interfaces/CruisePluginTypes.MoveWithKeyframesAction.html +14 -13
  87. package/docs/interfaces/CruisePluginTypes.MoveWithPanoIndexAction.html +14 -13
  88. package/docs/interfaces/CruisePluginTypes.PluginData.html +9 -8
  89. package/docs/interfaces/CruisePluginTypes.PluginServerData.html +7 -6
  90. package/docs/interfaces/CruisePluginTypes.PluginState.html +11 -10
  91. package/docs/interfaces/EventMap.html +15 -14
  92. package/docs/interfaces/FloorplanBounding.html +8 -7
  93. package/docs/interfaces/FloorplanData.html +10 -9
  94. package/docs/interfaces/FloorplanEntrance.html +11 -10
  95. package/docs/interfaces/FloorplanExtraObject.html +10 -9
  96. package/docs/interfaces/FloorplanExtraObject3D.html +8 -7
  97. package/docs/interfaces/FloorplanFloorData.html +9 -8
  98. package/docs/interfaces/FloorplanImagePosition.html +7 -6
  99. package/docs/interfaces/FloorplanObserver.html +9 -8
  100. package/docs/interfaces/FloorplanOutlineItem.html +9 -8
  101. package/docs/interfaces/FloorplanPosition.html +7 -6
  102. package/docs/interfaces/FloorplanRoomItem.html +13 -12
  103. package/docs/interfaces/FloorplanRoomLabelItem.html +7 -6
  104. package/docs/interfaces/FloorplanServerBounding.html +8 -7
  105. package/docs/interfaces/FloorplanServerComputedData.html +10 -9
  106. package/docs/interfaces/FloorplanServerData.html +7 -6
  107. package/docs/interfaces/FloorplanServerDoorItem.html +10 -9
  108. package/docs/interfaces/FloorplanServerDoorPosition.html +8 -7
  109. package/docs/interfaces/FloorplanServerEntrance.html +11 -10
  110. package/docs/interfaces/FloorplanServerFloorData.html +9 -8
  111. package/docs/interfaces/FloorplanServerImagePosition.html +7 -6
  112. package/docs/interfaces/FloorplanServerObserver.html +9 -8
  113. package/docs/interfaces/FloorplanServerOutlineItem.html +9 -8
  114. package/docs/interfaces/FloorplanServerPosition.html +7 -6
  115. package/docs/interfaces/FloorplanServerRoomItem.html +14 -13
  116. package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -6
  117. package/docs/interfaces/GuideLineModeItem.GuideLineTagContainer.html +8 -7
  118. package/docs/interfaces/GuideLinePluginType.CatmullRomCurve3.html +10 -9
  119. package/docs/interfaces/GuideLinePluginType.EventMap.html +13 -12
  120. package/docs/interfaces/GuideLinePluginType.GuideLineGeometryStyle.html +8 -7
  121. package/docs/interfaces/GuideLinePluginType.GuideLineItemContainer.html +6 -5
  122. package/docs/interfaces/GuideLinePluginType.GuideLineMaterialStyle.html +13 -12
  123. package/docs/interfaces/GuideLinePluginType.LineGeometriesConfig.html +8 -7
  124. package/docs/interfaces/GuideLinePluginType.ModelGuideLineStyle.html +18 -17
  125. package/docs/interfaces/GuideLinePluginType.ModelGuideLineTagData.html +7 -6
  126. package/docs/interfaces/GuideLinePluginType.PanoramaGuideLineStyle.html +18 -17
  127. package/docs/interfaces/GuideLinePluginType.PluginDataV2.html +5 -4
  128. package/docs/interfaces/GuideLinePluginType.PluginServerData.html +7 -6
  129. package/docs/interfaces/GuideLinePluginType.PluginState.html +8 -7
  130. package/docs/interfaces/GuideLinePluginType.Route.html +11 -10
  131. package/docs/interfaces/GuideLinePluginType.RouteConfig.html +9 -8
  132. package/docs/interfaces/HelperOffset.html +8 -7
  133. package/docs/interfaces/ImagePlaneGroup.html +6 -5
  134. package/docs/interfaces/ItemLabelPluginData.html +6 -5
  135. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -10
  136. package/docs/interfaces/ItemLabelPluginParametersType.html +9 -8
  137. package/docs/interfaces/MinMax.html +7 -6
  138. package/docs/interfaces/ModelChassisCompassPluginData.html +7 -6
  139. package/docs/interfaces/ModelChassisCompassPluginExportType.html +8 -7
  140. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +7 -6
  141. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +8 -7
  142. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +8 -7
  143. package/docs/interfaces/ModelItemLabelPluginData.html +6 -5
  144. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +11 -10
  145. package/docs/interfaces/ModelItemLabelPluginParametersType.html +7 -6
  146. package/docs/interfaces/ModelRoomLabelPluginData.html +6 -5
  147. package/docs/interfaces/ModelTVVideoPluginData.html +9 -8
  148. package/docs/interfaces/ModelTVVideoPluginExportType.html +8 -7
  149. package/docs/interfaces/ModelTVVideoPluginParameterType.html +6 -5
  150. package/docs/interfaces/ModelViewPluginExportType.html +11 -10
  151. package/docs/interfaces/Object3DHelperState.html +8 -7
  152. package/docs/interfaces/ObjectHelperControllers.html +9 -8
  153. package/docs/interfaces/PaintBrushAction.html +12 -11
  154. package/docs/interfaces/PaintBrushConfigs.html +12 -11
  155. package/docs/interfaces/PaintBrushState.html +10 -9
  156. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +10 -9
  157. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +5 -4
  158. package/docs/interfaces/PanoMeasureParameterType.html +14 -13
  159. package/docs/interfaces/PanoMeasurePluginLineJson.html +8 -7
  160. package/docs/interfaces/PanoMeasurePluginOpenParameter.html +7 -6
  161. package/docs/interfaces/PanoMeasurePluginPointJson.html +7 -6
  162. package/docs/interfaces/PanoMeasurePluginPolylineJson.html +8 -7
  163. package/docs/interfaces/PanoRulerPluginExportType.html +10 -9
  164. package/docs/interfaces/PanoRulerPluginOptions.html +7 -6
  165. package/docs/interfaces/PanoRulerPluginParameterType.html +8 -7
  166. package/docs/interfaces/PanoRulerProPluginExportType.html +9 -8
  167. package/docs/interfaces/PanoRulerProPluginOptions.html +7 -6
  168. package/docs/interfaces/PanoRulerProPluginParameterType.html +7 -6
  169. package/docs/interfaces/PanoRulerProPluginState.html +8 -7
  170. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +5 -4
  171. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +5 -4
  172. package/docs/interfaces/PanoSpatialTagPluginData.html +11 -10
  173. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +10 -9
  174. package/docs/interfaces/PanoSpatialTagPluginExportType.html +13 -12
  175. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +10 -9
  176. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +13 -12
  177. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +11 -10
  178. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +10 -9
  179. package/docs/interfaces/PanoVideoPluginType.LoadParams.html +6 -5
  180. package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +8 -7
  181. package/docs/interfaces/PanoVideoPluginType.PluginData.html +6 -5
  182. package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +9 -8
  183. package/docs/interfaces/PanoVideoPluginType.PluginState.html +6 -5
  184. package/docs/interfaces/PanoVideoPluginType.VideoItem.html +8 -7
  185. package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +10 -9
  186. package/docs/interfaces/Point.html +8 -7
  187. package/docs/interfaces/Room.html +9 -8
  188. package/docs/interfaces/RoomInfo.html +7 -6
  189. package/docs/interfaces/RoomLabel.html +14 -13
  190. package/docs/interfaces/RoomRules.html +5 -4
  191. package/docs/interfaces/Rooms.html +5 -4
  192. package/docs/interfaces/Scissor.html +9 -8
  193. package/docs/interfaces/State.html +8 -7
  194. package/docs/interfaces/TagCacheInterface.html +12 -11
  195. package/docs/interfaces/TagConfig.html +13 -12
  196. package/docs/interfaces/TagGLTFObjectGroup.html +6 -5
  197. package/docs/interfaces/TagIconUrl.html +12 -11
  198. package/docs/interfaces/TagObjectGroup.html +6 -5
  199. package/docs/interfaces/TagStyle.html +6 -5
  200. package/docs/interfaces/Tags.html +9 -8
  201. package/docs/interfaces/TemporaryState.html +6 -5
  202. package/docs/interfaces/Util.MagnifierParameter.html +11 -10
  203. package/docs/interfaces/Util.MouseGroupParameter.html +8 -7
  204. package/docs/modules/CruisePluginTypes.html +5 -4
  205. package/docs/modules/GuideLineItem.html +5 -4
  206. package/docs/modules/GuideLineModeItem.html +5 -4
  207. package/docs/modules/GuideLinePluginType.html +5 -4
  208. package/docs/modules/PanoVideoPluginType.html +5 -4
  209. package/docs/modules/Util.html +5 -4
  210. package/docs/modules.html +6 -4
  211. package/docs/types/ArrayPosition.html +5 -4
  212. package/docs/types/AudioAppearance.html +5 -4
  213. package/docs/types/AudioTagTypeConfigKey.html +5 -4
  214. package/docs/types/CSS3DRenderExportType.html +5 -4
  215. package/docs/types/CSS3DRenderPluginExportType.html +5 -4
  216. package/docs/types/CSS3DRenderPluginParameterType.html +5 -4
  217. package/docs/types/ClassFunctionParameters.html +5 -4
  218. package/docs/types/Color.html +5 -4
  219. package/docs/types/ContentTypeConfigKey.html +5 -4
  220. package/docs/types/ContentTypeConfigKeySplit.html +5 -4
  221. package/docs/types/ContentTypeMap.html +5 -4
  222. package/docs/types/Create3DDomContainerReturnType.html +5 -4
  223. package/docs/types/Create3DElementReturnType.html +5 -4
  224. package/docs/types/CruisePluginExportType.html +5 -4
  225. package/docs/types/CruisePluginTypes.CruiseData.html +5 -4
  226. package/docs/types/CruisePluginTypes.MoveEffect.html +5 -4
  227. package/docs/types/DeprecatedMediaPlaneProperty.html +5 -4
  228. package/docs/types/DeprecatedTagProperty.html +5 -4
  229. package/docs/types/Direction-1.html +5 -4
  230. package/docs/types/Direction4.html +5 -4
  231. package/docs/types/ElementRenderer.html +10 -7
  232. package/docs/types/FloorplanRuleLabels.html +5 -4
  233. package/docs/types/FloorplanServerRuleLabels.html +5 -4
  234. package/docs/types/GuideLinePluginExportType.html +5 -4
  235. package/docs/types/GuideLinePluginType.GuideLineItem.html +5 -4
  236. package/docs/types/GuideLinePluginType.GuideLineItemEventMap.html +5 -4
  237. package/docs/types/GuideLinePluginType.GuideLineModeItemMode.html +5 -4
  238. package/docs/types/GuideLinePluginType.GuideLineStyle.html +5 -4
  239. package/docs/types/GuideLinePluginType.ModelGuideLineTag.html +5 -4
  240. package/docs/types/GuideLinePluginType.PathItem.html +5 -4
  241. package/docs/types/GuideLinePluginType.PluginData.html +5 -4
  242. package/docs/types/HelperEventMap.html +5 -4
  243. package/docs/types/LoadTagConfig.html +5 -4
  244. package/docs/types/MapviewFloorplanPluginParameterType.html +5 -4
  245. package/docs/types/MapviewFloorplanPluginReturnType.html +5 -4
  246. package/docs/types/MediaData.html +5 -4
  247. package/docs/types/MediaStore.html +5 -4
  248. package/docs/types/ModelEntryDoorGuidePluginParameterType.html +5 -4
  249. package/docs/types/ModelFloorplanPluginParameterType.html +5 -4
  250. package/docs/types/ModelFloorplanPluginReturnType.html +5 -4
  251. package/docs/types/ModelRoomLabelPluginParameters.html +5 -4
  252. package/docs/types/ModelRoomLabelPluginReturnType.html +5 -4
  253. package/docs/types/MoveArgs.html +5 -4
  254. package/docs/types/MoveOpts.html +5 -4
  255. package/docs/types/Object3DHelperEventMap.html +5 -4
  256. package/docs/types/ObjectFit.html +5 -4
  257. package/docs/types/PaintBrushEventMap.html +5 -4
  258. package/docs/types/PanoCompassPluginData.html +5 -4
  259. package/docs/types/PanoCompassPluginExportType.html +5 -4
  260. package/docs/types/PanoCompassPluginParameterType.html +5 -4
  261. package/docs/types/PanoFloorplanRadarPluginParameterType.html +5 -4
  262. package/docs/types/PanoFloorplanRadarPluginReturnType.html +5 -4
  263. package/docs/types/PanoIndex.html +5 -4
  264. package/docs/types/PanoMeasurePluginEvent.html +5 -4
  265. package/docs/types/PanoMeasureReturnType.html +5 -4
  266. package/docs/types/PanoSpatialTagPluginId.html +5 -4
  267. package/docs/types/PanoTagPluginExportInterface.html +5 -4
  268. package/docs/types/PanoTagPluginParamsInterface.html +5 -4
  269. package/docs/types/PanoVideoPluginParameterType.html +5 -4
  270. package/docs/types/PanoVideoPluginReturnType.html +5 -4
  271. package/docs/types/PartialObjectDeep.html +5 -4
  272. package/docs/types/PickTagContentTypeInContentTypeConfigKey.html +5 -4
  273. package/docs/types/PlaneTag.html +5 -4
  274. package/docs/types/Point2DTag.html +5 -4
  275. package/docs/types/Point3DTag.html +5 -4
  276. package/docs/types/PointTag.html +5 -4
  277. package/docs/types/PointTagInstance.html +5 -4
  278. package/docs/types/Position.html +5 -4
  279. package/docs/types/RotateArgs.html +5 -4
  280. package/docs/types/RotateOpts.html +5 -4
  281. package/docs/types/RuleLabelsKey.html +5 -4
  282. package/docs/types/RuleLabelsValue.html +5 -4
  283. package/docs/types/StickType.html +5 -4
  284. package/docs/types/Tag.html +5 -4
  285. package/docs/types/Tag2D.html +5 -4
  286. package/docs/types/Tag3D.html +5 -4
  287. package/docs/types/TagContentType.html +5 -4
  288. package/docs/types/TagDimensionType.html +5 -4
  289. package/docs/types/TagElement.html +5 -4
  290. package/docs/types/TagEvents.html +5 -4
  291. package/docs/types/TagGLTFObject.html +5 -4
  292. package/docs/types/TagHooks.html +5 -4
  293. package/docs/types/TagIconSize.html +5 -4
  294. package/docs/types/TagId.html +5 -4
  295. package/docs/types/TagInstance.html +5 -4
  296. package/docs/types/TagPointType.html +5 -4
  297. package/docs/types/TagRendererMap.html +355 -0
  298. package/docs/types/TopviewFloorplanPluginParameterType.html +5 -4
  299. package/docs/types/TopviewFloorplanPluginReturnType.html +5 -4
  300. package/docs/types/WorkCode.html +5 -4
  301. package/docs/variables/FLOOR_TYPE_MAP.html +5 -4
  302. package/docs/variables/PLUGIN.html +5 -4
  303. package/docs/variables/ROOM_FETILE_TYPE_MAP.html +5 -4
  304. package/docs/variables/ROOM_TYPE_MAP.html +5 -4
  305. package/docs/variables/itemLabelPluginServerParams.html +5 -4
  306. package/docs/variables/modelItemLabelPluginServerParams.html +5 -4
  307. package/docs/variables/modelRoomLabelPluginServerParams.html +5 -4
  308. package/libs/PanoTagPlugin/Components/Tag/CustomTag.js +48 -55
  309. package/libs/PanoTagPlugin/Components/Tag/index.js +279 -266
  310. package/libs/PanoTagPlugin/Components/TagContainer.js +90 -83
  311. package/libs/PanoTagPlugin/Components/TagItem.js +156 -148
  312. package/libs/PanoTagPlugin/controller/TagRender.d.ts +11 -1
  313. package/libs/PanoTagPlugin/controller/TagRender.js +35 -16
  314. package/libs/PanoTagPlugin/typings/tag/Utils.d.ts +4 -1
  315. package/libs/base/BasePlugin.js +1 -1
  316. package/libs/shared-utils/logger.js +1 -1
  317. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
- import { SvelteComponent as Q, init as U, safe_not_equal as W, append_styles as X, element as A, space as Y, attr as u, null_to_empty as B, set_style as h, toggle_class as _, insert as C, append as E, transition_out as v, check_outros as F, transition_in as y, detach as N, getContext as Z, group_outros as G, noop as S, create_component as K, mount_component as M, destroy_component as O } from "../../vendor/svelte/internal/index.js";
2
- import x from "./Tag/index.js";
1
+ import { SvelteComponent as U, init as W, safe_not_equal as X, append_styles as Y, element as A, space as Z, attr as u, null_to_empty as B, set_style as h, toggle_class as g, insert as C, append as E, transition_out as v, check_outros as F, transition_in as y, detach as M, getContext as x, group_outros as G, noop as S, create_component as K, mount_component as O, destroy_component as Q } from "../../vendor/svelte/internal/index.js";
2
+ import $ from "./Tag/index.js";
3
3
  import "three";
4
4
  import { noTypecheck as H } from "../utils/noTypecheck.js";
5
- import $ from "./Common/TagPoint.js";
5
+ import tt from "./Common/TagPoint.js";
6
6
  import { classnames as J } from "../../vendor/classnames/index.js";
7
7
  import "./Tag/TextTag/index.js";
8
8
  import "./Tag/TextTag/TextTag.js";
@@ -90,10 +90,10 @@ import "./Tag/LinkTag.js";
90
90
  import "./Common/Icon/Icon.js";
91
91
  import "../utils/getImageInfo.js";
92
92
  import "./Tag/CustomTag.js";
93
- function tt(i) {
94
- X(i, "svelte-pzwdws", ".tag.withAnimation.svelte-pzwdws{transition:opacity 0.3s linear}.tag.hide.svelte-pzwdws{opacity:0;pointer-events:none}.tag.hide.svelte-pzwdws *{pointer-events:none !important}.tag.unClickable.svelte-pzwdws{pointer-events:none !important}.tag.unClickable.svelte-pzwdws *{pointer-events:none !important}.tag.disable.svelte-pzwdws{display:none}.wrapper.svelte-pzwdws{position:absolute;width:0rem;height:0rem;overflow:visible;pointer-events:auto}");
95
- }
96
93
  function et(i) {
94
+ Y(i, "svelte-pzwdws", ".tag.withAnimation.svelte-pzwdws{transition:opacity 0.3s linear}.tag.hide.svelte-pzwdws{opacity:0;pointer-events:none}.tag.hide.svelte-pzwdws *{pointer-events:none !important}.tag.unClickable.svelte-pzwdws{pointer-events:none !important}.tag.unClickable.svelte-pzwdws *{pointer-events:none !important}.tag.disable.svelte-pzwdws{display:none}.wrapper.svelte-pzwdws{position:absolute;width:0rem;height:0rem;overflow:visible;pointer-events:auto}");
95
+ }
96
+ function it(i) {
97
97
  let e;
98
98
  return {
99
99
  c() {
@@ -106,13 +106,13 @@ function et(i) {
106
106
  i: S,
107
107
  o: S,
108
108
  d(t) {
109
- t && N(e);
109
+ t && M(e);
110
110
  }
111
111
  };
112
112
  }
113
- function it(i) {
113
+ function ot(i) {
114
114
  let e, t;
115
- return e = new x({
115
+ return e = new $({
116
116
  props: {
117
117
  mediaStore: (
118
118
  /*mediaStore*/
@@ -128,39 +128,45 @@ function it(i) {
128
128
  ),
129
129
  hooks: (
130
130
  /*hooks*/
131
- i[14]
131
+ i[15]
132
132
  ),
133
133
  state: (
134
134
  /*state*/
135
- i[3]
135
+ i[4]
136
136
  ),
137
137
  temporaryState: (
138
138
  /*temporaryState*/
139
- i[4]
139
+ i[5]
140
+ ),
141
+ renderMap: (
142
+ /*renderMap*/
143
+ i[3]
140
144
  )
141
145
  }
142
146
  }), {
143
147
  c() {
144
148
  K(e.$$.fragment);
145
149
  },
146
- m(o, a) {
147
- M(e, o, a), t = !0;
150
+ m(o, n) {
151
+ O(e, o, n), t = !0;
148
152
  },
149
- p(o, a) {
150
- const m = {};
151
- a & /*mediaStore*/
152
- 4 && (m.mediaStore = /*mediaStore*/
153
- o[2]), a & /*withAnimation*/
154
- 1 && (m.withAnimation = /*withAnimation*/
155
- o[0]), a & /*tag*/
156
- 2 && (m.tag = H(
153
+ p(o, n) {
154
+ const l = {};
155
+ n & /*mediaStore*/
156
+ 4 && (l.mediaStore = /*mediaStore*/
157
+ o[2]), n & /*withAnimation*/
158
+ 1 && (l.withAnimation = /*withAnimation*/
159
+ o[0]), n & /*tag*/
160
+ 2 && (l.tag = H(
157
161
  /*tag*/
158
162
  o[1]
159
- )), a & /*state*/
160
- 8 && (m.state = /*state*/
161
- o[3]), a & /*temporaryState*/
162
- 16 && (m.temporaryState = /*temporaryState*/
163
- o[4]), e.$set(m);
163
+ )), n & /*state*/
164
+ 16 && (l.state = /*state*/
165
+ o[4]), n & /*temporaryState*/
166
+ 32 && (l.temporaryState = /*temporaryState*/
167
+ o[5]), n & /*renderMap*/
168
+ 8 && (l.renderMap = /*renderMap*/
169
+ o[3]), e.$set(l);
164
170
  },
165
171
  i(o) {
166
172
  t || (y(e.$$.fragment, o), t = !0);
@@ -169,11 +175,11 @@ function it(i) {
169
175
  v(e.$$.fragment, o), t = !1;
170
176
  },
171
177
  d(o) {
172
- O(e, o);
178
+ Q(e, o);
173
179
  }
174
180
  };
175
181
  }
176
- function ot(i) {
182
+ function rt(i) {
177
183
  let e;
178
184
  return {
179
185
  c() {
@@ -186,27 +192,27 @@ function ot(i) {
186
192
  i: S,
187
193
  o: S,
188
194
  d(t) {
189
- t && N(e);
195
+ t && M(e);
190
196
  }
191
197
  };
192
198
  }
193
- function rt(i) {
199
+ function nt(i) {
194
200
  let e, t;
195
- return e = new $({ props: { tag: (
201
+ return e = new tt({ props: { tag: (
196
202
  /*tag*/
197
203
  i[1]
198
204
  ) } }), {
199
205
  c() {
200
206
  K(e.$$.fragment);
201
207
  },
202
- m(o, a) {
203
- M(e, o, a), t = !0;
208
+ m(o, n) {
209
+ O(e, o, n), t = !0;
204
210
  },
205
- p(o, a) {
206
- const m = {};
207
- a & /*tag*/
208
- 2 && (m.tag = /*tag*/
209
- o[1]), e.$set(m);
211
+ p(o, n) {
212
+ const l = {};
213
+ n & /*tag*/
214
+ 2 && (l.tag = /*tag*/
215
+ o[1]), e.$set(l);
210
216
  },
211
217
  i(o) {
212
218
  t || (y(e.$$.fragment, o), t = !0);
@@ -215,30 +221,30 @@ function rt(i) {
215
221
  v(e.$$.fragment, o), t = !1;
216
222
  },
217
223
  d(o) {
218
- O(e, o);
224
+ Q(e, o);
219
225
  }
220
226
  };
221
227
  }
222
- function nt(i) {
223
- let e, t, o, a, m, s, f, g, w, l;
224
- const z = [it, et], c = [];
225
- function p(n, r) {
228
+ function at(i) {
229
+ let e, t, o, n, l, f, d, w, b, s;
230
+ const z = [ot, it], c = [];
231
+ function a(r, p) {
226
232
  return (
227
233
  /*haveContent*/
228
- n[12] ? 0 : 1
234
+ r[13] ? 0 : 1
229
235
  );
230
236
  }
231
- o = p(i), a = c[o] = z[o](i);
232
- const P = [rt, ot], d = [];
233
- function T(n, r) {
237
+ o = a(i), n = c[o] = z[o](i);
238
+ const P = [nt, rt], _ = [];
239
+ function T(r, p) {
234
240
  return (
235
241
  /*havePoint*/
236
- n[13] ? 0 : 1
242
+ r[14] ? 0 : 1
237
243
  );
238
244
  }
239
- return s = T(i), f = d[s] = P[s](i), {
245
+ return f = T(i), d = _[f] = P[f](i), {
240
246
  c() {
241
- e = A("div"), t = A("div"), a.c(), m = Y(), f.c(), u(t, "class", g = B(J(
247
+ e = A("div"), t = A("div"), n.c(), l = Z(), d.c(), u(t, "class", w = B(J(
242
248
  "wrapper",
243
249
  /*tag*/
244
250
  i[1].className ? `${/*tag*/
@@ -247,204 +253,206 @@ function nt(i) {
247
253
  t,
248
254
  "data-tag-unfolded",
249
255
  /*unfolded*/
250
- i[8]
256
+ i[9]
251
257
  ), u(
252
258
  t,
253
259
  "data-tag-id",
254
260
  /*id*/
255
- i[11]
256
- ), u(t, "data-content-type", w = /*tag*/
261
+ i[12]
262
+ ), u(t, "data-content-type", b = /*tag*/
257
263
  i[1].contentType), h(
258
264
  t,
259
265
  "left",
260
266
  /*left*/
261
- i[7]
267
+ i[8]
262
268
  ), h(
263
269
  t,
264
270
  "top",
265
271
  /*top*/
266
- i[6]
272
+ i[7]
267
273
  ), h(
268
274
  t,
269
275
  "z-index",
270
276
  /*zIndex*/
271
- i[5]
277
+ i[6]
272
278
  ), u(e, "class", "tag svelte-pzwdws"), u(
273
279
  e,
274
280
  "data-tag-id",
275
281
  /*id*/
276
- i[11]
277
- ), _(
282
+ i[12]
283
+ ), g(
278
284
  e,
279
285
  "unClickable",
280
286
  /*tag*/
281
287
  i[1].config.clickable === !1
282
- ), _(
288
+ ), g(
283
289
  e,
284
290
  "disable",
285
291
  /*disable*/
286
- i[10]
287
- ), _(
292
+ i[11]
293
+ ), g(
288
294
  e,
289
295
  "hide",
290
296
  /*hide*/
291
- i[9]
292
- ), _(
297
+ i[10]
298
+ ), g(
293
299
  e,
294
300
  "withAnimation",
295
301
  /*withAnimation*/
296
302
  i[0]
297
303
  );
298
304
  },
299
- m(n, r) {
300
- C(n, e, r), E(e, t), c[o].m(t, null), E(t, m), d[s].m(t, null), l = !0;
305
+ m(r, p) {
306
+ C(r, e, p), E(e, t), c[o].m(t, null), E(t, l), _[f].m(t, null), s = !0;
301
307
  },
302
- p(n, [r]) {
303
- let b = o;
304
- o = p(n), o === b ? c[o].p(n, r) : (G(), v(c[b], 1, 1, () => {
305
- c[b] = null;
306
- }), F(), a = c[o], a ? a.p(n, r) : (a = c[o] = z[o](n), a.c()), y(a, 1), a.m(t, m));
307
- let k = s;
308
- s = T(n), s === k ? d[s].p(n, r) : (G(), v(d[k], 1, 1, () => {
309
- d[k] = null;
310
- }), F(), f = d[s], f ? f.p(n, r) : (f = d[s] = P[s](n), f.c()), y(f, 1), f.m(t, null)), (!l || r & /*tag*/
311
- 2 && g !== (g = B(J(
308
+ p(r, [p]) {
309
+ let m = o;
310
+ o = a(r), o === m ? c[o].p(r, p) : (G(), v(c[m], 1, 1, () => {
311
+ c[m] = null;
312
+ }), F(), n = c[o], n ? n.p(r, p) : (n = c[o] = z[o](r), n.c()), y(n, 1), n.m(t, l));
313
+ let k = f;
314
+ f = T(r), f === k ? _[f].p(r, p) : (G(), v(_[k], 1, 1, () => {
315
+ _[k] = null;
316
+ }), F(), d = _[f], d ? d.p(r, p) : (d = _[f] = P[f](r), d.c()), y(d, 1), d.m(t, null)), (!s || p & /*tag*/
317
+ 2 && w !== (w = B(J(
312
318
  "wrapper",
313
319
  /*tag*/
314
- n[1].className ? `${/*tag*/
315
- n[1].className}__wrapper` : void 0
316
- )) + " svelte-pzwdws")) && u(t, "class", g), (!l || r & /*unfolded*/
317
- 256) && u(
320
+ r[1].className ? `${/*tag*/
321
+ r[1].className}__wrapper` : void 0
322
+ )) + " svelte-pzwdws")) && u(t, "class", w), (!s || p & /*unfolded*/
323
+ 512) && u(
318
324
  t,
319
325
  "data-tag-unfolded",
320
326
  /*unfolded*/
321
- n[8]
322
- ), (!l || r & /*id*/
323
- 2048) && u(
327
+ r[9]
328
+ ), (!s || p & /*id*/
329
+ 4096) && u(
324
330
  t,
325
331
  "data-tag-id",
326
332
  /*id*/
327
- n[11]
328
- ), (!l || r & /*tag*/
329
- 2 && w !== (w = /*tag*/
330
- n[1].contentType)) && u(t, "data-content-type", w), r & /*left*/
331
- 128 && h(
333
+ r[12]
334
+ ), (!s || p & /*tag*/
335
+ 2 && b !== (b = /*tag*/
336
+ r[1].contentType)) && u(t, "data-content-type", b), p & /*left*/
337
+ 256 && h(
332
338
  t,
333
339
  "left",
334
340
  /*left*/
335
- n[7]
336
- ), r & /*top*/
337
- 64 && h(
341
+ r[8]
342
+ ), p & /*top*/
343
+ 128 && h(
338
344
  t,
339
345
  "top",
340
346
  /*top*/
341
- n[6]
342
- ), r & /*zIndex*/
343
- 32 && h(
347
+ r[7]
348
+ ), p & /*zIndex*/
349
+ 64 && h(
344
350
  t,
345
351
  "z-index",
346
352
  /*zIndex*/
347
- n[5]
348
- ), (!l || r & /*id*/
349
- 2048) && u(
353
+ r[6]
354
+ ), (!s || p & /*id*/
355
+ 4096) && u(
350
356
  e,
351
357
  "data-tag-id",
352
358
  /*id*/
353
- n[11]
354
- ), (!l || r & /*tag*/
355
- 2) && _(
359
+ r[12]
360
+ ), (!s || p & /*tag*/
361
+ 2) && g(
356
362
  e,
357
363
  "unClickable",
358
364
  /*tag*/
359
- n[1].config.clickable === !1
360
- ), (!l || r & /*disable*/
361
- 1024) && _(
365
+ r[1].config.clickable === !1
366
+ ), (!s || p & /*disable*/
367
+ 2048) && g(
362
368
  e,
363
369
  "disable",
364
370
  /*disable*/
365
- n[10]
366
- ), (!l || r & /*hide*/
367
- 512) && _(
371
+ r[11]
372
+ ), (!s || p & /*hide*/
373
+ 1024) && g(
368
374
  e,
369
375
  "hide",
370
376
  /*hide*/
371
- n[9]
372
- ), (!l || r & /*withAnimation*/
373
- 1) && _(
377
+ r[10]
378
+ ), (!s || p & /*withAnimation*/
379
+ 1) && g(
374
380
  e,
375
381
  "withAnimation",
376
382
  /*withAnimation*/
377
- n[0]
383
+ r[0]
378
384
  );
379
385
  },
380
- i(n) {
381
- l || (y(a), y(f), l = !0);
386
+ i(r) {
387
+ s || (y(n), y(d), s = !0);
382
388
  },
383
- o(n) {
384
- v(a), v(f), l = !1;
389
+ o(r) {
390
+ v(n), v(d), s = !1;
385
391
  },
386
- d(n) {
387
- n && N(e), c[o].d(), d[s].d();
392
+ d(r) {
393
+ r && M(e), c[o].d(), _[f].d();
388
394
  }
389
395
  };
390
396
  }
391
- function at(i, e, t) {
392
- let o, a, m, s, f, g, w, l, z, { withAnimation: c = !1 } = e, { tag: p } = e, { mediaStore: P } = e, { state: d } = e, { temporaryState: T } = e;
393
- const n = Z("hooks");
394
- return i.$$set = (r) => {
395
- "withAnimation" in r && t(0, c = r.withAnimation), "tag" in r && t(1, p = r.tag), "mediaStore" in r && t(2, P = r.mediaStore), "state" in r && t(3, d = r.state), "temporaryState" in r && t(4, T = r.temporaryState);
397
+ function pt(i, e, t) {
398
+ let o, n, l, f, d, w, b, s, z, { withAnimation: c = !1 } = e, { tag: a } = e, { mediaStore: P } = e, { renderMap: _ = /* @__PURE__ */ new Map() } = e, { state: T } = e, { temporaryState: r } = e;
399
+ const p = x("hooks");
400
+ return i.$$set = (m) => {
401
+ "withAnimation" in m && t(0, c = m.withAnimation), "tag" in m && t(1, a = m.tag), "mediaStore" in m && t(2, P = m.mediaStore), "renderMap" in m && t(3, _ = m.renderMap), "state" in m && t(4, T = m.state), "temporaryState" in m && t(5, r = m.temporaryState);
396
402
  }, i.$$.update = () => {
397
- var r, b, k, L, I, q, D, R;
403
+ var m, k, N, L, I, q, D, R;
398
404
  i.$$.dirty & /*tag*/
399
- 2 && t(13, o = (() => {
405
+ 2 && t(14, o = (() => {
400
406
  var V, j;
401
- return !(((j = (V = p.style) == null ? void 0 : V.point) == null ? void 0 : j.enabled) === !1 || p.contentType === "Sticker" || p.contentType === "Link" || p.contentType === "VRLink" || p.contentType === "PanoLink" || p.contentType === "Audio" && p.data.appearance === "plane");
407
+ return !(((j = (V = a.style) == null ? void 0 : V.point) == null ? void 0 : j.enabled) === !1 || a.contentType === "Sticker" || a.contentType === "Link" || a.contentType === "VRLink" || a.contentType === "PanoLink" || a.contentType === "Audio" && a.data.appearance === "plane");
402
408
  })()), i.$$.dirty & /*tag*/
403
- 2 && t(12, a = (() => p.stickType === "2DPoint")()), i.$$.dirty & /*tag*/
404
- 2 && t(11, m = p.id), i.$$.dirty & /*tag*/
405
- 2 && t(10, s = !((r = p.screenPosition) != null && r.leftPercent) || !((b = p.screenPosition) != null && b.topPercent) || p.enabled === !1 || !p.state), i.$$.dirty & /*tag*/
406
- 2 && t(9, f = !((k = p.state) != null && k.visible) || ((L = p.temporaryState) == null ? void 0 : L.visible) === !1), i.$$.dirty & /*tag*/
407
- 2 && t(8, g = (I = p.state) == null ? void 0 : I.unfolded), i.$$.dirty & /*tag*/
408
- 2 && t(7, w = ((q = p.screenPosition) == null ? void 0 : q.leftPercent) + "%"), i.$$.dirty & /*tag*/
409
- 2 && t(6, l = ((D = p.screenPosition) == null ? void 0 : D.topPercent) + "%"), i.$$.dirty & /*tag*/
410
- 2 && t(5, z = (R = p.state) != null && R.unfolded ? 1 : 0);
409
+ 2 && t(13, n = (() => a.stickType === "2DPoint")()), i.$$.dirty & /*tag*/
410
+ 2 && t(12, l = a.id), i.$$.dirty & /*tag*/
411
+ 2 && t(11, f = !((m = a.screenPosition) != null && m.leftPercent) || !((k = a.screenPosition) != null && k.topPercent) || a.enabled === !1 || !a.state), i.$$.dirty & /*tag*/
412
+ 2 && t(10, d = !((N = a.state) != null && N.visible) || ((L = a.temporaryState) == null ? void 0 : L.visible) === !1), i.$$.dirty & /*tag*/
413
+ 2 && t(9, w = (I = a.state) == null ? void 0 : I.unfolded), i.$$.dirty & /*tag*/
414
+ 2 && t(8, b = ((q = a.screenPosition) == null ? void 0 : q.leftPercent) + "%"), i.$$.dirty & /*tag*/
415
+ 2 && t(7, s = ((D = a.screenPosition) == null ? void 0 : D.topPercent) + "%"), i.$$.dirty & /*tag*/
416
+ 2 && t(6, z = (R = a.state) != null && R.unfolded ? 1 : 0);
411
417
  }, [
412
418
  c,
413
- p,
419
+ a,
414
420
  P,
415
- d,
421
+ _,
416
422
  T,
423
+ r,
417
424
  z,
418
- l,
425
+ s,
426
+ b,
419
427
  w,
420
- g,
428
+ d,
421
429
  f,
422
- s,
423
- m,
424
- a,
430
+ l,
431
+ n,
425
432
  o,
426
- n
433
+ p
427
434
  ];
428
435
  }
429
- class Oe extends Q {
436
+ class Qe extends U {
430
437
  constructor(e) {
431
- super(), U(
438
+ super(), W(
432
439
  this,
433
440
  e,
441
+ pt,
434
442
  at,
435
- nt,
436
- W,
443
+ X,
437
444
  {
438
445
  withAnimation: 0,
439
446
  tag: 1,
440
447
  mediaStore: 2,
441
- state: 3,
442
- temporaryState: 4
448
+ renderMap: 3,
449
+ state: 4,
450
+ temporaryState: 5
443
451
  },
444
- tt
452
+ et
445
453
  );
446
454
  }
447
455
  }
448
456
  export {
449
- Oe as default
457
+ Qe as default
450
458
  };
@@ -1,11 +1,12 @@
1
1
  import { TagComputer } from './TagComputer';
2
- import type { Tag, TagInstance, TagGLTFObject, TagObjectGroup, TagGLTFObjectGroup, ImagePlaneGroup, TagContentType } from '../typings';
2
+ import type { Tag, TagInstance, TagGLTFObject, TagObjectGroup, TagGLTFObjectGroup, ImagePlaneGroup, TagContentType, ElementRenderer, TagRendererMap } from '../typings';
3
3
  import type { TemporaryState } from '../typings';
4
4
  import { type Object3D } from 'three';
5
5
  import TagContainerSvelte from '../Components/TagContainer.svelte';
6
6
  import type { Five } from '@realsee/five';
7
7
  export declare abstract class TagRender extends TagComputer {
8
8
  protected group: TagObjectGroup;
9
+ protected renderMap: TagRendererMap;
9
10
  protected imagePlaneGroup: ImagePlaneGroup;
10
11
  protected gltfObjectGroup: TagGLTFObjectGroup;
11
12
  /** 维护一个可用模型表,用于快速删除不应该在场景中的模型 */
@@ -15,6 +16,15 @@ export declare abstract class TagRender extends TagComputer {
15
16
  /** 点标签 */
16
17
  protected TagContainerSvelte?: TagContainerSvelte;
17
18
  constructor(five: Five);
19
+ /**
20
+ * @description: 设置 contentType 的渲染器
21
+ * @param {string} contentType
22
+ * 如果是 `TagContentType` 中的类型,将会覆盖掉插件内部默认的渲染器,
23
+ * 如果是其他任意 str
24
+ * ing 如:'Foo',则可以将类似 `{id: 1, contentType: 'Foo', position: [0,0,0]}` 的 tag 交给插件渲染
25
+ * @note 优先级低于 tag.element
26
+ */
27
+ registerRenderer(contentType: string, renderer: ElementRenderer): void;
18
28
  clearTags(): void;
19
29
  /**
20
30
  * @description: 更新所有标签
@@ -1,7 +1,7 @@
1
1
  var R = Object.defineProperty;
2
- var k = (f, h, t) => h in f ? R(f, h, { enumerable: !0, configurable: !0, writable: !0, value: t }) : f[h] = t;
3
- var b = (f, h, t) => (k(f, typeof h != "symbol" ? h + "" : h, t), t);
4
- var C = (f, h, t) => new Promise((e, o) => {
2
+ var k = (b, h, t) => h in b ? R(b, h, { enumerable: !0, configurable: !0, writable: !0, value: t }) : b[h] = t;
3
+ var f = (b, h, t) => (k(b, typeof h != "symbol" ? h + "" : h, t), t);
4
+ var C = (b, h, t) => new Promise((e, o) => {
5
5
  var i = (r) => {
6
6
  try {
7
7
  a(t.next(r));
@@ -15,10 +15,10 @@ var C = (f, h, t) => new Promise((e, o) => {
15
15
  o(s);
16
16
  }
17
17
  }, a = (r) => r.done ? e(r.value) : Promise.resolve(r.value).then(i, n);
18
- a((t = t.apply(f, h)).next());
18
+ a((t = t.apply(b, h)).next());
19
19
  });
20
- import { TagComputer as E } from "./TagComputer.js";
21
- import { Group as S, Quaternion as w, Vector3 as v, Matrix4 as D } from "three";
20
+ import { TagComputer as w } from "./TagComputer.js";
21
+ import { Group as S, Quaternion as E, Vector3 as v, Matrix4 as D } from "three";
22
22
  import O from "../Components/TagContainer.js";
23
23
  import A from "../Components/Tag/index.js";
24
24
  import { arrayPositionToVector3 as y } from "../../CSS3DRenderPlugin/utils/positionToVector3.js";
@@ -140,20 +140,21 @@ import "../../CSS3DRenderPlugin/Controller.js";
140
140
  import "../../CSS3DRenderPlugin/utils/waitFiveModelLoaded.js";
141
141
  import "@realsee/five/gltf-loader";
142
142
  const F = /* @__PURE__ */ new Map(), L = /* @__PURE__ */ new Map();
143
- class ei extends E {
143
+ class ei extends w {
144
144
  constructor(t) {
145
145
  super(t);
146
- b(this, "group", new S());
147
- b(this, "imagePlaneGroup", new S());
148
- b(this, "gltfObjectGroup", new S());
146
+ f(this, "group", new S());
147
+ f(this, "renderMap", /* @__PURE__ */ new Map());
148
+ f(this, "imagePlaneGroup", new S());
149
+ f(this, "gltfObjectGroup", new S());
149
150
  /** 维护一个可用模型表,用于快速删除不应该在场景中的模型 */
150
- b(this, "enabledModelTagSet", /* @__PURE__ */ new Set());
151
+ f(this, "enabledModelTagSet", /* @__PURE__ */ new Set());
151
152
  /** 临时状态 */
152
- b(this, "temporaryState", { visible: !0 });
153
+ f(this, "temporaryState", { visible: !0 });
153
154
  /** 点标签 */
154
- b(this, "TagContainerSvelte");
155
+ f(this, "TagContainerSvelte");
155
156
  /** 加载外部模型 */
156
- b(this, "loadModel", (t) => C(this, null, function* () {
157
+ f(this, "loadModel", (t) => C(this, null, function* () {
157
158
  var a;
158
159
  const e = t.data.modelUrl;
159
160
  if (!e)
@@ -190,6 +191,17 @@ class ei extends E {
190
191
  }));
191
192
  this.group.name = "PanoTagPluginModelGroup", this.gltfObjectGroup.name = "PanoTagPluginGLTFObjectGroup", this.imagePlaneGroup.name = "ImagePlaneGroup", this.group.add(this.gltfObjectGroup), this.group.add(this.imagePlaneGroup);
192
193
  }
194
+ /**
195
+ * @description: 设置 contentType 的渲染器
196
+ * @param {string} contentType
197
+ * 如果是 `TagContentType` 中的类型,将会覆盖掉插件内部默认的渲染器,
198
+ * 如果是其他任意 str
199
+ * ing 如:'Foo',则可以将类似 `{id: 1, contentType: 'Foo', position: [0,0,0]}` 的 tag 交给插件渲染
200
+ * @note 优先级低于 tag.element
201
+ */
202
+ registerRenderer(t, e) {
203
+ this.renderMap.set(t, { renderer: e });
204
+ }
193
205
  clearTags() {
194
206
  this.tags.forEach((t) => {
195
207
  var e, o;
@@ -246,7 +258,7 @@ class ei extends E {
246
258
  if (e.tag3DContentSvelte) {
247
259
  const { svelteApp: r, css3DInstance: s, initialNormal: u, currentNormal: p } = e.tag3DContentSvelte;
248
260
  if (r.$set({ tag: e, hooks: this.hooks, state: this.state, temporaryState: this.temporaryState }), !u.equals(p)) {
249
- const m = new w().setFromUnitVectors(u, p);
261
+ const m = new E().setFromUnitVectors(u, p);
250
262
  s.css3DObject.setRotationFromQuaternion(m);
251
263
  }
252
264
  return;
@@ -364,7 +376,14 @@ class ei extends E {
364
376
  return console.error("updateRenderPlaneTag: tag2DContainer not found");
365
377
  this.TagContainerSvelte = new O({
366
378
  target: o,
367
- props: { hooks: this.hooks, tags: t, state: this.state, temporaryState: this.temporaryState, mediaStore: this.mediaStore }
379
+ props: {
380
+ hooks: this.hooks,
381
+ tags: t,
382
+ state: this.state,
383
+ temporaryState: this.temporaryState,
384
+ mediaStore: this.mediaStore,
385
+ renderMap: this.renderMap
386
+ }
368
387
  });
369
388
  }
370
389
  }
@@ -46,7 +46,10 @@ export type TagGLTFObject = GLTFObject & {
46
46
  updateTagCss3DObjectMatrix?: () => void;
47
47
  };
48
48
  /** 返回一个销毁函数 */
49
- export type ElementRenderer = (container: HTMLElement) => () => void;
49
+ export type ElementRenderer = (container: HTMLElement, tag: TagInstance) => () => void;
50
+ export type TagRendererMap = Map<string, {
51
+ renderer: ElementRenderer;
52
+ }>;
50
53
  export interface TagObjectGroup extends Group {
51
54
  children: Array<TagGLTFObjectGroup>;
52
55
  }
@@ -14,7 +14,7 @@ let n = class {
14
14
  /**
15
15
  * @realsee/dnalogel 版本号
16
16
  */
17
- e(this, "VERSION", "2.20.0-dev.3");
17
+ e(this, "VERSION", "2.20.0-dev.4");
18
18
  e(this, "five");
19
19
  /**
20
20
  * 插件事件钩子