@realsee/dnalogel 2.2.0 → 2.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/dist/index.cjs.js +13 -13
  2. package/dist/index.js +1005 -1003
  3. package/dist/index.umd.js +15 -15
  4. package/docs/classes/CruisePluginController.html +24 -24
  5. package/docs/classes/Magnifier.html +16 -16
  6. package/docs/classes/ModelRoomLabelController.html +11 -11
  7. package/docs/classes/Object3DHelperController.html +24 -24
  8. package/docs/classes/PaintBrush.html +15 -15
  9. package/docs/classes/PanoTagPluginController.html +39 -39
  10. package/docs/classes/Util.BetterTween.html +8 -8
  11. package/docs/classes/Util.FivePointSelector.html +12 -12
  12. package/docs/classes/Util.Interval.html +12 -12
  13. package/docs/classes/Util.Magnifier.html +17 -17
  14. package/docs/classes/Util.PointDomHelper.html +11 -11
  15. package/docs/classes/Util.PointHelper.html +11 -11
  16. package/docs/classes/Util.Rectangle.html +13 -13
  17. package/docs/enums/CameraMovementEffect.html +7 -7
  18. package/docs/enums/ContentType.html +12 -12
  19. package/docs/enums/DIRECTION.html +9 -9
  20. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +9 -9
  21. package/docs/enums/DimensionType.html +7 -7
  22. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +8 -8
  23. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +9 -9
  24. package/docs/enums/LinkType.html +7 -7
  25. package/docs/enums/PaintBrushTypeEnum.html +8 -8
  26. package/docs/enums/PointType.html +7 -7
  27. package/docs/enums/Rotation.html +8 -8
  28. package/docs/functions/CSS3DRenderPlugin.html +4 -4
  29. package/docs/functions/CameraMovementPlugin.html +4 -4
  30. package/docs/functions/CruisePlugin.html +4 -4
  31. package/docs/functions/GuideLinePlugin.html +5 -5
  32. package/docs/functions/ItemLabelPlugin.html +4 -4
  33. package/docs/functions/MapviewFloorplanPlugin.html +4 -4
  34. package/docs/functions/ModelChassisCompassPlugin.html +4 -4
  35. package/docs/functions/ModelEntryDoorGuidePlugin.html +4 -4
  36. package/docs/functions/ModelFloorplanPlugin.html +4 -4
  37. package/docs/functions/ModelItemLabelPlugin.html +4 -4
  38. package/docs/functions/ModelRoomLabelPlugin.html +4 -4
  39. package/docs/functions/ModelTVVideoPlugin.html +4 -4
  40. package/docs/functions/ModelViewPlugin.html +4 -4
  41. package/docs/functions/Object3DHelperPlugin.html +4 -4
  42. package/docs/functions/PanoCompassPlugin.html +4 -4
  43. package/docs/functions/PanoCursorRaycasterPlugin.html +4 -4
  44. package/docs/functions/PanoDoorLabelPlugin.html +4 -4
  45. package/docs/functions/PanoFloorplanRadarPlugin.html +4 -4
  46. package/docs/functions/PanoMeasurePlugin.html +4 -4
  47. package/docs/functions/PanoRulerPlugin.html +4 -4
  48. package/docs/functions/PanoRulerProPlugin.html +4 -4
  49. package/docs/functions/PanoSpatialTagPlugin.html +4 -4
  50. package/docs/functions/PanoTagPlugin.html +4 -4
  51. package/docs/functions/TopviewFloorplanPlugin.html +4 -4
  52. package/docs/functions/Util.getCoordsFromClient.html +5 -5
  53. package/docs/functions/Util.getCoordsFromElement.html +5 -5
  54. package/docs/functions/Util.getFrameTime.html +5 -5
  55. package/docs/functions/Util.getIntersectFromRelativePosition.html +5 -5
  56. package/docs/functions/Util.getRaycasterFromFivePointer.html +5 -5
  57. package/docs/functions/Util.isNil.html +5 -5
  58. package/docs/functions/Util.nextFrame.html +5 -5
  59. package/docs/functions/Util.notNil.html +5 -5
  60. package/docs/functions/Util.requestAnimationFrameInterval.html +5 -5
  61. package/docs/functions/Util.tweenProgress.html +5 -5
  62. package/docs/functions/pluginFlag.html +5 -5
  63. package/docs/index.html +4 -4
  64. package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -11
  65. package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
  66. package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
  67. package/docs/interfaces/ContentTypeMap.html +12 -12
  68. package/docs/interfaces/FloorplanBounding.html +8 -8
  69. package/docs/interfaces/FloorplanData.html +10 -10
  70. package/docs/interfaces/FloorplanEntrance.html +11 -11
  71. package/docs/interfaces/FloorplanExtraObject.html +10 -10
  72. package/docs/interfaces/FloorplanExtraObject3D.html +8 -8
  73. package/docs/interfaces/FloorplanFloorData.html +9 -9
  74. package/docs/interfaces/FloorplanImagePosition.html +7 -7
  75. package/docs/interfaces/FloorplanObserver.html +9 -9
  76. package/docs/interfaces/FloorplanOutlineItem.html +9 -9
  77. package/docs/interfaces/FloorplanPosition.html +7 -7
  78. package/docs/interfaces/FloorplanRoomItem.html +13 -13
  79. package/docs/interfaces/FloorplanRoomLabelItem.html +7 -7
  80. package/docs/interfaces/FloorplanServerBounding.html +8 -8
  81. package/docs/interfaces/FloorplanServerComputedData.html +10 -10
  82. package/docs/interfaces/FloorplanServerData.html +7 -7
  83. package/docs/interfaces/FloorplanServerDoorItem.html +10 -10
  84. package/docs/interfaces/FloorplanServerDoorPosition.html +8 -8
  85. package/docs/interfaces/FloorplanServerEntrance.html +11 -11
  86. package/docs/interfaces/FloorplanServerFloorData.html +9 -9
  87. package/docs/interfaces/FloorplanServerImagePosition.html +7 -7
  88. package/docs/interfaces/FloorplanServerObserver.html +9 -9
  89. package/docs/interfaces/FloorplanServerOutlineItem.html +9 -9
  90. package/docs/interfaces/FloorplanServerPosition.html +7 -7
  91. package/docs/interfaces/FloorplanServerRoomItem.html +14 -14
  92. package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -7
  93. package/docs/interfaces/ItemLabelPluginData.html +6 -6
  94. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -11
  95. package/docs/interfaces/ItemLabelPluginParametersType.html +9 -9
  96. package/docs/interfaces/LineJson.html +7 -7
  97. package/docs/interfaces/ModelChassisCompassPluginData.html +7 -7
  98. package/docs/interfaces/ModelChassisCompassPluginExportType.html +8 -8
  99. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +7 -7
  100. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +8 -8
  101. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +8 -8
  102. package/docs/interfaces/ModelItemLabelPluginData.html +6 -6
  103. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +11 -11
  104. package/docs/interfaces/ModelItemLabelPluginParametersType.html +7 -7
  105. package/docs/interfaces/ModelRoomLabelPluginData.html +6 -6
  106. package/docs/interfaces/ModelTVVideoPluginData.html +9 -9
  107. package/docs/interfaces/ModelTVVideoPluginExportType.html +8 -8
  108. package/docs/interfaces/ModelTVVideoPluginParameterType.html +6 -6
  109. package/docs/interfaces/ModelViewPluginExportType.html +8 -8
  110. package/docs/interfaces/Object3DHelperState.html +8 -8
  111. package/docs/interfaces/OpenParameter.html +7 -7
  112. package/docs/interfaces/PaintBrushAction.html +12 -12
  113. package/docs/interfaces/PaintBrushConfigs.html +12 -12
  114. package/docs/interfaces/PaintBrushState.html +10 -10
  115. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +10 -10
  116. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +5 -5
  117. package/docs/interfaces/PanoMeasureParameterType.html +11 -11
  118. package/docs/interfaces/PanoRulerPluginExportType.html +10 -10
  119. package/docs/interfaces/PanoRulerPluginOptions.html +7 -7
  120. package/docs/interfaces/PanoRulerPluginParameterType.html +8 -8
  121. package/docs/interfaces/PanoRulerProPluginExportType.html +9 -9
  122. package/docs/interfaces/PanoRulerProPluginOptions.html +7 -7
  123. package/docs/interfaces/PanoRulerProPluginParameterType.html +7 -7
  124. package/docs/interfaces/PanoRulerProPluginState.html +8 -8
  125. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +5 -5
  126. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +5 -5
  127. package/docs/interfaces/PanoSpatialTagPluginData.html +11 -11
  128. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +10 -10
  129. package/docs/interfaces/PanoSpatialTagPluginExportType.html +13 -13
  130. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +10 -10
  131. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +13 -13
  132. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +11 -11
  133. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +10 -10
  134. package/docs/interfaces/Point.html +8 -8
  135. package/docs/interfaces/PointJson.html +8 -8
  136. package/docs/interfaces/Room.html +9 -9
  137. package/docs/interfaces/RoomInfo.html +7 -7
  138. package/docs/interfaces/RoomLabel.html +14 -14
  139. package/docs/interfaces/RoomRules.html +5 -5
  140. package/docs/interfaces/Rooms.html +5 -5
  141. package/docs/interfaces/Scissor.html +9 -9
  142. package/docs/interfaces/TagConfig.html +10 -10
  143. package/docs/interfaces/Tags.html +9 -9
  144. package/docs/interfaces/Util.MagnifierParameter.html +11 -11
  145. package/docs/interfaces/Util.MouseGroupParameter.html +8 -8
  146. package/docs/modules/Util.html +5 -5
  147. package/docs/modules.html +4 -4
  148. package/docs/types/ArrayPosition.html +5 -5
  149. package/docs/types/CSS3DRenderExportType.html +5 -5
  150. package/docs/types/CSS3DRenderPluginExportType.html +5 -5
  151. package/docs/types/CSS3DRenderPluginParameterType.html +5 -5
  152. package/docs/types/Color.html +5 -5
  153. package/docs/types/ContentTypeConfigKey.html +5 -5
  154. package/docs/types/ContentTypeConfigKeyArray.html +5 -5
  155. package/docs/types/Create3DDomContainerReturnType.html +5 -5
  156. package/docs/types/Create3DElementReturnType.html +5 -5
  157. package/docs/types/CruisePluginExportType.html +5 -5
  158. package/docs/types/Direction-1.html +5 -5
  159. package/docs/types/Direction4.html +5 -5
  160. package/docs/types/FloorplanRuleLabels.html +5 -5
  161. package/docs/types/FloorplanServerRuleLabels.html +5 -5
  162. package/docs/types/GuideLinePluginExportType.html +5 -5
  163. package/docs/types/HelperEventMap.html +5 -5
  164. package/docs/types/MapviewFloorplanPluginParameterType.html +5 -5
  165. package/docs/types/MapviewFloorplanPluginReturnType.html +5 -5
  166. package/docs/types/MediaData.html +5 -5
  167. package/docs/types/ModelEntryDoorGuidePluginParameterType.html +5 -5
  168. package/docs/types/ModelFloorplanPluginParameterType.html +5 -5
  169. package/docs/types/ModelFloorplanPluginReturnType.html +5 -5
  170. package/docs/types/ModelRoomLabelPluginParameters.html +5 -5
  171. package/docs/types/ModelRoomLabelPluginReturnType.html +5 -5
  172. package/docs/types/MoveArgs.html +5 -5
  173. package/docs/types/MoveOpts.html +5 -5
  174. package/docs/types/Object3DHelperEventMap.html +5 -5
  175. package/docs/types/ObjectFit.html +5 -5
  176. package/docs/types/PaintBrushEventMap.html +5 -5
  177. package/docs/types/PanoCompassPluginData.html +5 -5
  178. package/docs/types/PanoCompassPluginExportType.html +5 -5
  179. package/docs/types/PanoCompassPluginParameterType.html +5 -5
  180. package/docs/types/PanoFloorplanRadarPluginParameterType.html +5 -5
  181. package/docs/types/PanoFloorplanRadarPluginReturnType.html +5 -5
  182. package/docs/types/PanoMeasurePluginEvent.html +5 -5
  183. package/docs/types/PanoMeasureReturnType.html +5 -5
  184. package/docs/types/PanoSpatialTagPluginId.html +5 -5
  185. package/docs/types/PanoTagPluginExportInterface.html +5 -5
  186. package/docs/types/PanoTagPluginParamsInterface.html +5 -5
  187. package/docs/types/PlaneTag.html +5 -5
  188. package/docs/types/PointTag.html +5 -5
  189. package/docs/types/Position.html +5 -5
  190. package/docs/types/RotateArgs.html +5 -5
  191. package/docs/types/RotateOpts.html +5 -5
  192. package/docs/types/RuleLabelsKey.html +5 -5
  193. package/docs/types/RuleLabelsValue.html +5 -5
  194. package/docs/types/Tag.html +5 -5
  195. package/docs/types/Tag2D.html +5 -5
  196. package/docs/types/Tag3D.html +5 -5
  197. package/docs/types/TagId.html +5 -5
  198. package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
  199. package/docs/types/TopviewFloorplanPluginReturnType.html +5 -5
  200. package/docs/variables/FLOOR_TYPE_MAP.html +5 -5
  201. package/docs/variables/PLUGIN.html +5 -5
  202. package/docs/variables/ROOM_FETILE_TYPE_MAP.html +5 -5
  203. package/docs/variables/ROOM_TYPE_MAP.html +5 -5
  204. package/docs/variables/VERSION.html +5 -5
  205. package/docs/variables/itemLabelPluginServerParams.html +5 -5
  206. package/docs/variables/modelItemLabelPluginServerParams.html +5 -5
  207. package/docs/variables/modelRoomLabelPluginServerParams.html +5 -5
  208. package/libs/PanoDoorLabelPlugin/Controller.js +117 -116
  209. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +85 -84
  210. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>modelRoomLabelPluginServerParams | 如视看房插件合集 - v2.2.0</title><meta name="description" content="Documentation for 如视看房插件合集 - v2.2.0"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>modelRoomLabelPluginServerParams | 如视看房插件合集 - v2.2.2</title><meta name="description" content="Documentation for 如视看房插件合集 - v2.2.2"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
2
2
  <div class="tsd-toolbar-contents container">
3
3
  <div class="table-cell" id="tsd-search" data-base="..">
4
4
  <div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
@@ -6,13 +6,13 @@
6
6
  <div id="tsd-toolbar-links"></div></div>
7
7
  <ul class="results">
8
8
  <li class="state loading">Preparing search index...</li>
9
- <li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">如视看房插件合集 - v2.2.0</a></div>
9
+ <li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">如视看房插件合集 - v2.2.2</a></div>
10
10
  <div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
11
11
  <div class="container container-main">
12
12
  <div class="col-8 col-content">
13
13
  <div class="tsd-page-title">
14
14
  <ul class="tsd-breadcrumb">
15
- <li><a href="../modules.html">如视看房插件合集 - v2.2.0</a></li>
15
+ <li><a href="../modules.html">如视看房插件合集 - v2.2.2</a></li>
16
16
  <li><a href="modelRoomLabelPluginServerParams.html">modelRoomLabelPluginServerParams</a></li></ul>
17
17
  <h1>Variable modelRoomLabelPluginServerParams<code class="tsd-tag ts-flagConst">Const</code> </h1></div>
18
18
  <div class="tsd-signature">model<wbr/>Room<wbr/>Label<wbr/>Plugin<wbr/>Server<wbr/>Params<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span><br/><span>    </span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span>    </span>version<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol"> = ...</span></div>
@@ -24,7 +24,7 @@
24
24
  <li class="tsd-parameter">
25
25
  <h5>version<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></h5></li></ul></div><aside class="tsd-sources">
26
26
  <ul>
27
- <li>Defined in <a href="https://github.com/realsee-developer/dnalogel/blob/96fe92e/plugins/src/ModelRoomLabelPlugin/index.ts#L12">plugins/src/ModelRoomLabelPlugin/index.ts:12</a></li></ul></aside></div>
27
+ <li>Defined in <a href="https://github.com/realsee-developer/dnalogel/blob/e4f49e5/plugins/src/ModelRoomLabelPlugin/index.ts#L12">plugins/src/ModelRoomLabelPlugin/index.ts:12</a></li></ul></aside></div>
28
28
  <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
29
29
  <div class="tsd-navigation settings">
30
30
  <details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
@@ -41,7 +41,7 @@
41
41
  <h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
42
42
  <div class="tsd-accordion-details">
43
43
  <ul>
44
- <li><a href="../modules.html">如视看房插件合集 -<wbr/> v2.2.0</a>
44
+ <li><a href="../modules.html">如视看房插件合集 -<wbr/> v2.2.2</a>
45
45
  <ul>
46
46
  <li class="tsd-kind-namespace"><a href="../modules/Util.html">Util</a></li></ul></li></ul></div></details></nav>
47
47
  <nav class="tsd-navigation secondary menu-sticky">
@@ -1,177 +1,178 @@
1
- var y = Object.defineProperty, E = Object.defineProperties;
2
- var O = Object.getOwnPropertyDescriptors;
3
- var w = Object.getOwnPropertySymbols;
4
- var _ = Object.prototype.hasOwnProperty, S = Object.prototype.propertyIsEnumerable;
5
- var D = (b, l, e) => l in b ? y(b, l, { enumerable: !0, configurable: !0, writable: !0, value: e }) : b[l] = e, L = (b, l) => {
6
- for (var e in l || (l = {}))
7
- _.call(l, e) && D(b, e, l[e]);
8
- if (w)
9
- for (var e of w(l))
10
- S.call(l, e) && D(b, e, l[e]);
1
+ var R = Object.defineProperty, F = Object.defineProperties;
2
+ var $ = Object.getOwnPropertyDescriptors;
3
+ var S = Object.getOwnPropertySymbols;
4
+ var B = Object.prototype.hasOwnProperty, U = Object.prototype.propertyIsEnumerable;
5
+ var E = (b, a, e) => a in b ? R(b, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : b[a] = e, k = (b, a) => {
6
+ for (var e in a || (a = {}))
7
+ B.call(a, e) && E(b, e, a[e]);
8
+ if (S)
9
+ for (var e of S(a))
10
+ U.call(a, e) && E(b, e, a[e]);
11
11
  return b;
12
- }, V = (b, l) => E(b, O(l));
13
- var a = (b, l, e) => (D(b, typeof l != "symbol" ? l + "" : l, e), e);
14
- import { Raycaster as k, Vector3 as P, Quaternion as C, Euler as A } from "three";
15
- import { BasePanoPluginController as H } from "./BaseController.js";
16
- import W from "./DoorLabelItem.js";
17
- import { getCameraToward as z, isTwoRectOverlaped as R, getDistance as F, getToward as $ } from "./utils.js";
18
- const B = { userAction: !0 };
19
- class q extends H {
12
+ }, C = (b, a) => F(b, $(a));
13
+ var r = (b, a, e) => (E(b, typeof a != "symbol" ? a + "" : a, e), e);
14
+ import { Raycaster as G, Vector3 as V, Quaternion as N, Euler as H } from "three";
15
+ import { BasePanoPluginController as Q } from "./BaseController.js";
16
+ import j from "./DoorLabelItem.js";
17
+ import { getCameraToward as q, isTwoRectOverlaped as X, getDistance as Y, getToward as Z } from "./utils.js";
18
+ const J = { userAction: !0 };
19
+ class se extends Q {
20
20
  constructor(e) {
21
21
  super(e);
22
- a(this, "MinVisibledistance", 1.8);
23
- a(this, "MaxVisibledistance", 5);
24
- a(this, "OffsetHeight", -1.3);
25
- a(this, "rooms");
26
- a(this, "floorplanServerData");
27
- a(this, "doorLabelItems");
28
- a(this, "visibleLabelMap", /* @__PURE__ */ new Map());
29
- a(this, "labelItems", []);
30
- a(this, "doorLabels");
31
- a(this, "roomObservers");
32
- a(this, "loadData", (e, n) => {
22
+ r(this, "MinVisibledistance", 1.8);
23
+ r(this, "MaxVisibledistance", 5);
24
+ r(this, "OffsetHeight", -1.3);
25
+ r(this, "rooms");
26
+ r(this, "floorplanServerData");
27
+ r(this, "doorLabelItems");
28
+ r(this, "visibleLabelMap", /* @__PURE__ */ new Map());
29
+ r(this, "labelItems", []);
30
+ r(this, "doorLabels");
31
+ r(this, "roomObservers");
32
+ r(this, "loadData", (e, n) => {
33
33
  n && (this.MaxVisibledistance = n.MaxVisibledistance, this.MinVisibledistance = n.MinVisibledistance, this.OffsetHeight = n.OffsetHeight), this.doorLabelItems && this.doorLabelItems.length > 0 && this.doorLabelItems.forEach((f) => {
34
34
  f.$destroy();
35
35
  }), this.labelItems = [], this.doorLabels = [], this.doorLabelItems = [], this.floorplanServerData = e, this.five.once("panoArrived", () => {
36
36
  console.log("doorplugin", "panoArrived"), this.initData();
37
37
  });
38
38
  });
39
- a(this, "initRoomObservers", () => {
40
- var h, c;
41
- const e = this.floorplanServerData.computed_data.floor_datas || [], f = (((c = (h = this.five) == null ? void 0 : h.work) == null ? void 0 : c.observers) || []).map((s) => {
42
- const o = s.panoIndex, d = s.floorIndex, i = e == null ? void 0 : e.find((t) => t.floor_index === d);
43
- if (i) {
44
- const t = i.rooms.find((r) => r.observer_indexs.includes(o));
39
+ r(this, "initRoomObservers", () => {
40
+ var l, h;
41
+ const e = this.floorplanServerData.computed_data.floor_datas || [], f = (((h = (l = this.five) == null ? void 0 : l.work) == null ? void 0 : h.observers) || []).map((o) => {
42
+ const i = o.panoIndex, d = o.floorIndex, s = e == null ? void 0 : e.find((t) => t.floor_index === d);
43
+ if (s) {
44
+ const t = s.rooms.find((c) => c.observer_indexs.includes(i));
45
45
  if (t)
46
- return { panoIndex: o, floorIndex: d, name: t.name };
46
+ return { panoIndex: i, floorIndex: d, name: t.name };
47
47
  }
48
48
  }).filter(Boolean);
49
49
  this.roomObservers = f;
50
50
  });
51
- a(this, "hideAllLabels", () => {
51
+ r(this, "hideAllLabels", () => {
52
52
  this.labelItems.forEach((e) => {
53
53
  e.visible = !1, e.inSight = !1;
54
54
  }), this.render();
55
55
  });
56
- a(this, "fixDoorVisibleAndPosition", () => {
56
+ r(this, "fixDoorVisibleAndPosition", () => {
57
57
  this.initRoomObservers();
58
58
  const { panoIndex: e } = this.five;
59
- if (!this.visible || this.five.model.empty || e === null || !this.roomObservers.find((s) => s.panoIndex === e))
59
+ if (!this.visible || this.five.model.empty || e === null || !this.roomObservers.find((o) => o.panoIndex === e))
60
60
  return;
61
- const n = this.roomObservers.find((s) => s.panoIndex === e), h = this.five.work.observers.find((s) => s.panoIndex === e).position.clone(), c = (() => {
61
+ const n = this.roomObservers.find((o) => o.panoIndex === e), l = this.five.work.observers.find((o) => o.panoIndex === e).position.clone(), h = (() => {
62
62
  if (this.visibleLabelMap.has(e))
63
63
  return this.visibleLabelMap.get(e);
64
64
  {
65
- const s = [];
66
- return this.doorLabels.forEach((o, d) => {
67
- if (o.roomName === n.name)
65
+ const o = [];
66
+ return this.doorLabels.forEach((i, d) => {
67
+ if (i.roomName === n.name)
68
68
  return;
69
- const i = o.position.clone(), t = i.distanceTo(h);
69
+ const s = i.position.clone(), t = s.distanceTo(l);
70
70
  if (t < this.MinVisibledistance || t > this.MaxVisibledistance)
71
71
  return;
72
- const r = new k(), m = i.clone().sub(h).normalize();
73
- r.set(h, m);
74
- const [u] = this.five.model.intersectRaycaster(r);
75
- u && u.distance + 0.1 < t || s.push(d);
76
- }), this.visibleLabelMap.set(e, s), s;
72
+ const c = new G(), v = s.clone().sub(l).normalize();
73
+ c.set(l, v);
74
+ const [x] = this.five.model.intersectRaycaster(c);
75
+ x && x.distance + 0.1 < t || o.push(d);
76
+ }), this.visibleLabelMap.set(e, o), o;
77
77
  }
78
78
  })();
79
- this.labelItems.forEach((s, o) => {
80
- s.visible = c.includes(o);
79
+ this.labelItems.forEach((o, i) => {
80
+ o.visible = h.includes(i);
81
81
  }), this.fixDoorPosition();
82
82
  });
83
- a(this, "fixDoorPosition", () => {
83
+ r(this, "fixDoorPosition", () => {
84
+ var s, t, c, v, x, A, P, w, L, O;
84
85
  const { panoIndex: e, camera: n } = this.five;
85
86
  if (e === null)
86
87
  return;
87
88
  if (this.five.currentMode !== "Panorama")
88
89
  return this.hideAllLabels();
89
- const f = this.five.getElement(), h = f.clientWidth, c = f.clientHeight, s = n.getWorldDirection(new P()), o = [], d = [...this.labelItems];
90
- if (d.forEach((i, t) => {
91
- if (i.visible) {
92
- const r = n.position.distanceTo(i.position), m = i.position.clone().add(new P(0, this.OffsetHeight, 0)), g = m.clone().sub(n.position).normalize().angleTo(s), x = m.clone().project(n), p = (x.x + 1) / 2.2 * 100, v = (-x.y + 1) / 2.2 * 100, I = p >= 0 && p <= 100 && v >= 0 && v <= 100 && r > this.MinVisibledistance && r <= this.MaxVisibledistance;
93
- i.left = p, i.top = v, i.inSight = I && g < Math.PI / 2, i.cameraToward = z(this.five), I ? o.push({ disFromCameraToLabel: r, left: p, top: v, index: t }) : i.transform = "translate(-50%, -50%)";
90
+ const f = this.five.getElement(), l = f.clientWidth, h = f.clientHeight, o = n.getWorldDirection(new V()), i = [], d = [...this.labelItems];
91
+ if (d.forEach((m, g) => {
92
+ if (m.visible) {
93
+ const I = n.position.distanceTo(m.position), M = m.position.clone().add(new V(0, this.OffsetHeight, 0)), T = M.clone().sub(n.position).normalize().angleTo(o), y = M.clone().project(n), D = (y.x + 1) / 2.2 * 100, p = (-y.y + 1) / 2.2 * 100, u = D >= 0 && D <= 100 && p >= 0 && p <= 100 && I > this.MinVisibledistance && I <= this.MaxVisibledistance;
94
+ m.left = D, m.top = p, m.inSight = u && T < Math.PI / 2, m.cameraToward = q(this.five), u ? i.push({ disFromCameraToLabel: I, left: D, top: p, index: g }) : m.transform = "translate(-50%, -50%)";
94
95
  } else
95
- i.inSight = !1;
96
- }), o.length > 1) {
97
- let i = 0;
98
- o.sort((t, r) => r.disFromCameraToLabel - t.disFromCameraToLabel);
99
- for (let t = 1; t < o.length; t++) {
100
- const { index: r, left: m, top: u } = o[t - 1], { index: g, left: x, top: p } = o[t], v = this.container.children[r], I = this.container.children[g];
101
- if (!v || !I)
96
+ m.inSight = !1;
97
+ }), i.length > 1) {
98
+ let m = 0;
99
+ i.sort((g, I) => I.disFromCameraToLabel - g.disFromCameraToLabel);
100
+ for (let g = 1; g < i.length; g++) {
101
+ const { index: I, left: M, top: _ } = i[g - 1], { index: T, left: y, top: D } = i[g], p = this.container.children[I], u = this.container.children[T];
102
+ if (!p || !u || !((s = p == null ? void 0 : p.children) != null && s[0]) || !((t = u == null ? void 0 : u.children) != null && t[0]))
102
103
  return;
103
- const M = {
104
- left: h * m / 100,
105
- top: c * u / 100,
106
- width: v.children[0].clientWidth,
107
- height: v.children[0].clientHeight
108
- }, T = {
109
- left: h * x / 100,
110
- top: c * p / 100,
111
- width: I.children[0].clientWidth,
112
- height: I.children[0].clientHeight
104
+ const W = {
105
+ left: l * M / 100,
106
+ top: h * _ / 100,
107
+ width: (v = (c = p.children[0]) == null ? void 0 : c.clientWidth) != null ? v : 0,
108
+ height: (A = (x = p.children[0]) == null ? void 0 : x.clientHeight) != null ? A : 0
109
+ }, z = {
110
+ left: l * y / 100,
111
+ top: h * D / 100,
112
+ width: (w = (P = u.children[0]) == null ? void 0 : P.clientWidth) != null ? w : 0,
113
+ height: (O = (L = u.children[0]) == null ? void 0 : L.clientHeight) != null ? O : 0
113
114
  };
114
- R(M, T) && (i++, d[r].transform = `translate(-50%, ${(i - 1) * 100 - 50}%)`, d[g].transform = `translate(-50%, ${i * 100 - 50}%)`);
115
+ X(W, z) && (m++, d[I].transform = `translate(-50%, ${(m - 1) * 100 - 50}%)`, d[T].transform = `translate(-50%, ${m * 100 - 50}%)`);
115
116
  }
116
117
  }
117
118
  this.labelItems = d, this.render();
118
119
  });
119
- a(this, "onClick", (e, n) => {
120
+ r(this, "onClick", (e, n) => {
120
121
  if (!this.roomObservers)
121
122
  return;
122
123
  const { work: f } = this.five;
123
- let h, c, s = 1 / 0;
124
- for (let o = 0; o < f.observers.length; o++) {
125
- if (this.roomObservers[o].name !== e)
124
+ let l, h, o = 1 / 0;
125
+ for (let i = 0; i < f.observers.length; i++) {
126
+ if (this.roomObservers[i].name !== e)
126
127
  continue;
127
- const i = f.observers[o].standingPosition, t = n.distanceTo(i);
128
- t < s && (h = o, c = i.clone().sub(n).normalize(), s = t);
128
+ const s = f.observers[i].standingPosition, t = n.distanceTo(s);
129
+ t < o && (l = i, h = s.clone().sub(n).normalize(), o = t);
129
130
  }
130
- if (c !== null && h !== null) {
131
- const o = {};
132
- if (s > 0) {
133
- const i = new P(0, 0, -1), t = c.clone(), r = new C();
134
- r.setFromUnitVectors(i, t);
135
- const m = new A();
136
- m.setFromQuaternion(r, "YXZ"), o.longitude = m.y;
131
+ if (h !== null && l !== null) {
132
+ const i = {};
133
+ if (o > 0) {
134
+ const s = new V(0, 0, -1), t = h.clone(), c = new N();
135
+ c.setFromUnitVectors(s, t);
136
+ const v = new H();
137
+ v.setFromQuaternion(c, "YXZ"), i.longitude = v.y;
137
138
  }
138
- this.five.emit("wantsToMoveToPano", h, {}, !0) || this.five.moveToPano(h, { longitude: o.longitude });
139
+ this.five.emit("wantsToMoveToPano", l, {}, !0) || this.five.moveToPano(l, { longitude: i.longitude });
139
140
  }
140
141
  });
141
- a(this, "initData", () => {
142
- var h;
142
+ r(this, "initData", () => {
143
+ var l;
143
144
  this.doorLabels = [];
144
- const e = this.five.panoIndex, n = this.floorplanServerData.computed_data.observers[e].floor_index, f = n !== void 0 && ((h = this.floorplanServerData.computed_data.floor_datas[n]) == null ? void 0 : h.rooms);
145
- this.rooms = f, this.rooms && this.rooms.length > 0 && this.rooms.forEach((c) => {
145
+ const e = this.five.panoIndex, n = this.floorplanServerData.computed_data.observers[e].floor_index, f = n !== void 0 && ((l = this.floorplanServerData.computed_data.floor_datas[n]) == null ? void 0 : l.rooms);
146
+ this.rooms = f, this.rooms && this.rooms.length > 0 && this.rooms.forEach((h) => {
146
147
  var d;
147
- const s = (d = this.floorplanServerData.computed_data.doors) == null ? void 0 : d.filter((i) => !!(i && i.name === c.name)), o = this.five.work.observers.filter((i, t) => !!c.observer_indexs.find((r) => r === t));
148
- s && s.forEach((i) => {
149
- const t = i.position;
150
- let r = 1 / 0, m;
151
- o.forEach((g) => {
152
- const x = g.standingPosition, p = {
153
- x: x.x,
154
- y: x.y,
155
- z: x.z
156
- }, v = F(t, p);
157
- v < r && (r = v, m = p);
158
- }), m && (t.y = m.y + 0.01);
159
- const u = new P(t.x, t.y, t.z);
160
- u.add(new P(-0.2, 1.8, 0).applyEuler(new A(0, i.rad, 0))), this.doorLabels.push({
161
- roomName: c.name,
162
- name: i.name,
163
- position: u,
164
- toward: $(i.rad)
148
+ const o = (d = this.floorplanServerData.computed_data.doors) == null ? void 0 : d.filter((s) => !!(s && s.name === h.name)), i = this.five.work.observers.filter((s, t) => !!h.observer_indexs.find((c) => c === t));
149
+ o && o.forEach((s) => {
150
+ const t = s.position;
151
+ let c = 1 / 0, v;
152
+ i.forEach((A) => {
153
+ const P = A.standingPosition, w = {
154
+ x: P.x,
155
+ y: P.y,
156
+ z: P.z
157
+ }, L = Y(t, w);
158
+ L < c && (c = L, v = w);
159
+ }), v && (t.y = v.y + 0.01);
160
+ const x = new V(t.x, t.y, t.z);
161
+ x.add(new V(-0.2, 1.8, 0).applyEuler(new H(0, s.rad, 0))), this.doorLabels.push({
162
+ roomName: h.name,
163
+ name: s.name,
164
+ position: x,
165
+ toward: Z(s.rad)
165
166
  });
166
167
  });
167
- }), this.labelItems = this.doorLabels.map((c) => V(L({}, c), {
168
+ }), this.labelItems = this.doorLabels.map((h) => C(k({}, h), {
168
169
  left: 0,
169
170
  top: 0,
170
171
  visible: !1,
171
172
  inSight: !1,
172
173
  transform: "",
173
174
  cameraToward: ""
174
- })), console.log("doorplugin", "labelItems", this.labelItems), this.five.on("wantsToMoveToPano", this.hideAllLabels), this.five.on("modelLoaded", this.fixDoorVisibleAndPosition), this.five.on("panoArrived", this.fixDoorVisibleAndPosition), this.five.on("initAnimationEnded", this.fixDoorPosition), this.five.on("cameraUpdate", this.fixDoorPosition), this.five.on("mouseWheel", this.fixDoorPosition), this.five.on("pinchGesture", this.fixDoorPosition), this.fixDoorVisibleAndPosition();
175
+ })), this.five.on("wantsToMoveToPano", this.hideAllLabels), this.five.on("modelLoaded", this.fixDoorVisibleAndPosition), this.five.on("panoArrived", this.fixDoorVisibleAndPosition), this.five.on("initAnimationEnded", this.fixDoorPosition), this.five.on("cameraUpdate", this.fixDoorPosition), this.five.on("mouseWheel", this.fixDoorPosition), this.five.on("pinchGesture", this.fixDoorPosition), this.fixDoorVisibleAndPosition();
175
176
  });
176
177
  }
177
178
  stateChangedCallback(e, n) {
@@ -179,7 +180,7 @@ class q extends H {
179
180
  const f = {
180
181
  state: this.state,
181
182
  prevState: e,
182
- userAction: n ? n.userAction : B.userAction
183
+ userAction: n ? n.userAction : J.userAction
183
184
  };
184
185
  this.hooks.emit("stateChange", f);
185
186
  }
@@ -195,7 +196,7 @@ class q extends H {
195
196
  e.$destroy();
196
197
  }), this.doorLabelItems = [], this.labelItems.forEach((e) => {
197
198
  this.doorLabelItems.push(
198
- new W({
199
+ new j({
199
200
  target: this.container,
200
201
  props: {
201
202
  props: e,
@@ -215,5 +216,5 @@ class q extends H {
215
216
  }
216
217
  }
217
218
  export {
218
- q as PanoDoorLabelPluginController
219
+ se as PanoDoorLabelPluginController
219
220
  };