@realsee/dnalogel 2.1.0-alpha.5 → 2.1.0-alpha.7

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 (311) hide show
  1. package/dist/CSS3DRenderPlugin/index.js +8 -1
  2. package/dist/CSS3DRenderPlugin/shared-utils/Object3DHelper/Base/BaseController.d.ts +3 -1
  3. package/dist/CSS3DRenderPlugin/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +2 -2
  4. package/dist/CSS3DRenderPlugin/shared-utils/Object3DHelper/Controller/RotateController.d.ts +2 -1
  5. package/dist/CSS3DRenderPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -0
  6. package/dist/CSS3DRenderPlugin/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
  7. package/dist/CameraMovementPlugin/shared-utils/Object3DHelper/Base/BaseController.d.ts +3 -1
  8. package/dist/CameraMovementPlugin/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +2 -2
  9. package/dist/CameraMovementPlugin/shared-utils/Object3DHelper/Controller/RotateController.d.ts +2 -1
  10. package/dist/CameraMovementPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -0
  11. package/dist/CameraMovementPlugin/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
  12. package/dist/CruisePlugin/shared-utils/Object3DHelper/Base/BaseController.d.ts +3 -1
  13. package/dist/CruisePlugin/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +2 -2
  14. package/dist/CruisePlugin/shared-utils/Object3DHelper/Controller/RotateController.d.ts +2 -1
  15. package/dist/CruisePlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -0
  16. package/dist/CruisePlugin/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
  17. package/dist/GuideLinePlugin/shared-utils/Object3DHelper/Base/BaseController.d.ts +3 -1
  18. package/dist/GuideLinePlugin/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +2 -2
  19. package/dist/GuideLinePlugin/shared-utils/Object3DHelper/Controller/RotateController.d.ts +2 -1
  20. package/dist/GuideLinePlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -0
  21. package/dist/GuideLinePlugin/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
  22. package/dist/ItemLabelPlugin/shared-utils/Object3DHelper/Base/BaseController.d.ts +3 -1
  23. package/dist/ItemLabelPlugin/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +2 -2
  24. package/dist/ItemLabelPlugin/shared-utils/Object3DHelper/Controller/RotateController.d.ts +2 -1
  25. package/dist/ItemLabelPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -0
  26. package/dist/ItemLabelPlugin/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
  27. package/dist/ModelChassisCompassPlugin/shared-utils/Object3DHelper/Base/BaseController.d.ts +3 -1
  28. package/dist/ModelChassisCompassPlugin/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +2 -2
  29. package/dist/ModelChassisCompassPlugin/shared-utils/Object3DHelper/Controller/RotateController.d.ts +2 -1
  30. package/dist/ModelChassisCompassPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -0
  31. package/dist/ModelChassisCompassPlugin/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
  32. package/dist/ModelEntryDoorGuidePlugin/shared-utils/Object3DHelper/Base/BaseController.d.ts +3 -1
  33. package/dist/ModelEntryDoorGuidePlugin/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +2 -2
  34. package/dist/ModelEntryDoorGuidePlugin/shared-utils/Object3DHelper/Controller/RotateController.d.ts +2 -1
  35. package/dist/ModelEntryDoorGuidePlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -0
  36. package/dist/ModelEntryDoorGuidePlugin/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
  37. package/dist/ModelItemLabelPlugin/shared-utils/Object3DHelper/Base/BaseController.d.ts +3 -1
  38. package/dist/ModelItemLabelPlugin/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +2 -2
  39. package/dist/ModelItemLabelPlugin/shared-utils/Object3DHelper/Controller/RotateController.d.ts +2 -1
  40. package/dist/ModelItemLabelPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -0
  41. package/dist/ModelItemLabelPlugin/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
  42. package/dist/ModelRoomLabelPlugin/shared-utils/Object3DHelper/Base/BaseController.d.ts +3 -1
  43. package/dist/ModelRoomLabelPlugin/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +2 -2
  44. package/dist/ModelRoomLabelPlugin/shared-utils/Object3DHelper/Controller/RotateController.d.ts +2 -1
  45. package/dist/ModelRoomLabelPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -0
  46. package/dist/ModelRoomLabelPlugin/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
  47. package/dist/ModelTVVideoPlugin/shared-utils/Object3DHelper/Base/BaseController.d.ts +3 -1
  48. package/dist/ModelTVVideoPlugin/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +2 -2
  49. package/dist/ModelTVVideoPlugin/shared-utils/Object3DHelper/Controller/RotateController.d.ts +2 -1
  50. package/dist/ModelTVVideoPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -0
  51. package/dist/ModelTVVideoPlugin/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
  52. package/dist/ModelViewPlugin/shared-utils/Object3DHelper/Base/BaseController.d.ts +3 -1
  53. package/dist/ModelViewPlugin/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +2 -2
  54. package/dist/ModelViewPlugin/shared-utils/Object3DHelper/Controller/RotateController.d.ts +2 -1
  55. package/dist/ModelViewPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -0
  56. package/dist/ModelViewPlugin/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
  57. package/dist/Object3DHelperPlugin/index.js +134 -113
  58. package/dist/Object3DHelperPlugin/shared-utils/Object3DHelper/Base/BaseController.d.ts +3 -1
  59. package/dist/Object3DHelperPlugin/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +2 -2
  60. package/dist/Object3DHelperPlugin/shared-utils/Object3DHelper/Controller/RotateController.d.ts +2 -1
  61. package/dist/Object3DHelperPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -0
  62. package/dist/Object3DHelperPlugin/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
  63. package/dist/PanoCompassPlugin/index.js +8 -1
  64. package/dist/PanoCompassPlugin/shared-utils/Object3DHelper/Base/BaseController.d.ts +3 -1
  65. package/dist/PanoCompassPlugin/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +2 -2
  66. package/dist/PanoCompassPlugin/shared-utils/Object3DHelper/Controller/RotateController.d.ts +2 -1
  67. package/dist/PanoCompassPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -0
  68. package/dist/PanoCompassPlugin/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
  69. package/dist/PanoCursorRaycasterPlugin/shared-utils/Object3DHelper/Base/BaseController.d.ts +3 -1
  70. package/dist/PanoCursorRaycasterPlugin/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +2 -2
  71. package/dist/PanoCursorRaycasterPlugin/shared-utils/Object3DHelper/Controller/RotateController.d.ts +2 -1
  72. package/dist/PanoCursorRaycasterPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -0
  73. package/dist/PanoCursorRaycasterPlugin/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
  74. package/dist/PanoDoorLabelPlugin/shared-utils/Object3DHelper/Base/BaseController.d.ts +3 -1
  75. package/dist/PanoDoorLabelPlugin/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +2 -2
  76. package/dist/PanoDoorLabelPlugin/shared-utils/Object3DHelper/Controller/RotateController.d.ts +2 -1
  77. package/dist/PanoDoorLabelPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -0
  78. package/dist/PanoDoorLabelPlugin/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
  79. package/dist/PanoMeasurePlugin/shared-utils/Object3DHelper/Base/BaseController.d.ts +3 -1
  80. package/dist/PanoMeasurePlugin/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +2 -2
  81. package/dist/PanoMeasurePlugin/shared-utils/Object3DHelper/Controller/RotateController.d.ts +2 -1
  82. package/dist/PanoMeasurePlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -0
  83. package/dist/PanoMeasurePlugin/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
  84. package/dist/PanoRulerPlugin/shared-utils/Object3DHelper/Base/BaseController.d.ts +3 -1
  85. package/dist/PanoRulerPlugin/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +2 -2
  86. package/dist/PanoRulerPlugin/shared-utils/Object3DHelper/Controller/RotateController.d.ts +2 -1
  87. package/dist/PanoRulerPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -0
  88. package/dist/PanoRulerPlugin/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
  89. package/dist/PanoRulerProPlugin/shared-utils/Object3DHelper/Base/BaseController.d.ts +3 -1
  90. package/dist/PanoRulerProPlugin/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +2 -2
  91. package/dist/PanoRulerProPlugin/shared-utils/Object3DHelper/Controller/RotateController.d.ts +2 -1
  92. package/dist/PanoRulerProPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -0
  93. package/dist/PanoRulerProPlugin/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
  94. package/dist/PanoSpatialTagPlugin/index.js +8 -1
  95. package/dist/PanoSpatialTagPlugin/shared-utils/Object3DHelper/Base/BaseController.d.ts +3 -1
  96. package/dist/PanoSpatialTagPlugin/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +2 -2
  97. package/dist/PanoSpatialTagPlugin/shared-utils/Object3DHelper/Controller/RotateController.d.ts +2 -1
  98. package/dist/PanoSpatialTagPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -0
  99. package/dist/PanoSpatialTagPlugin/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
  100. package/dist/PanoTagPlugin/index.js +25 -18
  101. package/dist/PanoTagPlugin/shared-utils/Object3DHelper/Base/BaseController.d.ts +3 -1
  102. package/dist/PanoTagPlugin/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +2 -2
  103. package/dist/PanoTagPlugin/shared-utils/Object3DHelper/Controller/RotateController.d.ts +2 -1
  104. package/dist/PanoTagPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -0
  105. package/dist/PanoTagPlugin/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
  106. package/dist/floorplan/MapviewFloorplanPlugin/shared-utils/Object3DHelper/Base/BaseController.d.ts +3 -1
  107. package/dist/floorplan/MapviewFloorplanPlugin/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +2 -2
  108. package/dist/floorplan/MapviewFloorplanPlugin/shared-utils/Object3DHelper/Controller/RotateController.d.ts +2 -1
  109. package/dist/floorplan/MapviewFloorplanPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -0
  110. package/dist/floorplan/MapviewFloorplanPlugin/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
  111. package/dist/floorplan/ModelFloorplanPlugin/shared-utils/Object3DHelper/Base/BaseController.d.ts +3 -1
  112. package/dist/floorplan/ModelFloorplanPlugin/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +2 -2
  113. package/dist/floorplan/ModelFloorplanPlugin/shared-utils/Object3DHelper/Controller/RotateController.d.ts +2 -1
  114. package/dist/floorplan/ModelFloorplanPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -0
  115. package/dist/floorplan/ModelFloorplanPlugin/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
  116. package/dist/floorplan/PanoFloorplanRadarPlugin/shared-utils/Object3DHelper/Base/BaseController.d.ts +3 -1
  117. package/dist/floorplan/PanoFloorplanRadarPlugin/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +2 -2
  118. package/dist/floorplan/PanoFloorplanRadarPlugin/shared-utils/Object3DHelper/Controller/RotateController.d.ts +2 -1
  119. package/dist/floorplan/PanoFloorplanRadarPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -0
  120. package/dist/floorplan/PanoFloorplanRadarPlugin/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
  121. package/dist/floorplan/TopviewFloorplanPlugin/shared-utils/Object3DHelper/Base/BaseController.d.ts +3 -1
  122. package/dist/floorplan/TopviewFloorplanPlugin/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +2 -2
  123. package/dist/floorplan/TopviewFloorplanPlugin/shared-utils/Object3DHelper/Controller/RotateController.d.ts +2 -1
  124. package/dist/floorplan/TopviewFloorplanPlugin/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -0
  125. package/dist/floorplan/TopviewFloorplanPlugin/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
  126. package/dist/index.es.js +151 -130
  127. package/dist/index.js +151 -130
  128. package/dist/index.umd.js +151 -130
  129. package/dist/shared-utils/Object3DHelper/Base/BaseController.d.ts +3 -1
  130. package/dist/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +2 -2
  131. package/dist/shared-utils/Object3DHelper/Controller/RotateController.d.ts +2 -1
  132. package/dist/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -0
  133. package/dist/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
  134. package/docs/classes/CruisePluginController.html +14 -14
  135. package/docs/classes/Magnifier.html +4 -4
  136. package/docs/classes/ModelRoomLabelController.html +4 -4
  137. package/docs/classes/Object3DHelperController.html +9 -9
  138. package/docs/classes/PanoTagPluginController.html +25 -25
  139. package/docs/enums/CameraMovementEffect.html +2 -2
  140. package/docs/enums/ContentType.html +7 -7
  141. package/docs/enums/DIRECTION.html +1 -1
  142. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -1
  143. package/docs/enums/DimensionType.html +1 -1
  144. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
  145. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -1
  146. package/docs/enums/LinkType.html +1 -1
  147. package/docs/enums/PointType.html +1 -1
  148. package/docs/enums/Rotation.html +2 -2
  149. package/docs/index.html +1 -1
  150. package/docs/interfaces/CSS3DRenderPluginEventMap.html +2 -2
  151. package/docs/interfaces/CSS3DRenderPluginState.html +2 -2
  152. package/docs/interfaces/CameraMovementPluginExportType.html +2 -2
  153. package/docs/interfaces/FloorplanBounding.html +4 -4
  154. package/docs/interfaces/FloorplanData.html +2 -2
  155. package/docs/interfaces/FloorplanEntrance.html +7 -7
  156. package/docs/interfaces/FloorplanExtraObject.html +3 -3
  157. package/docs/interfaces/FloorplanExtraObject3D.html +2 -2
  158. package/docs/interfaces/FloorplanFloorData.html +2 -2
  159. package/docs/interfaces/FloorplanImagePosition.html +2 -2
  160. package/docs/interfaces/FloorplanObserver.html +2 -2
  161. package/docs/interfaces/FloorplanOutlineItem.html +2 -2
  162. package/docs/interfaces/FloorplanPosition.html +2 -2
  163. package/docs/interfaces/FloorplanRoomItem.html +6 -6
  164. package/docs/interfaces/FloorplanRoomLabelItem.html +3 -3
  165. package/docs/interfaces/FloorplanServerBounding.html +4 -4
  166. package/docs/interfaces/FloorplanServerComputedData.html +1 -1
  167. package/docs/interfaces/FloorplanServerData.html +2 -2
  168. package/docs/interfaces/FloorplanServerDoorItem.html +1 -1
  169. package/docs/interfaces/FloorplanServerDoorPosition.html +1 -1
  170. package/docs/interfaces/FloorplanServerEntrance.html +7 -7
  171. package/docs/interfaces/FloorplanServerFloorData.html +2 -2
  172. package/docs/interfaces/FloorplanServerImagePosition.html +2 -2
  173. package/docs/interfaces/FloorplanServerObserver.html +2 -2
  174. package/docs/interfaces/FloorplanServerOutlineItem.html +2 -2
  175. package/docs/interfaces/FloorplanServerPosition.html +2 -2
  176. package/docs/interfaces/FloorplanServerRoomItem.html +7 -7
  177. package/docs/interfaces/FloorplanServerRoomLabelItem.html +3 -3
  178. package/docs/interfaces/ItemLabelPluginData.html +1 -1
  179. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -1
  180. package/docs/interfaces/ItemLabelPluginParametersType.html +1 -1
  181. package/docs/interfaces/LineJson.html +1 -1
  182. package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
  183. package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
  184. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
  185. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
  186. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
  187. package/docs/interfaces/ModelItemLabelPluginData.html +1 -1
  188. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -1
  189. package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -1
  190. package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
  191. package/docs/interfaces/ModelTVVideoPluginData.html +1 -1
  192. package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -1
  193. package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -1
  194. package/docs/interfaces/ModelViewPluginExportType.html +1 -1
  195. package/docs/interfaces/Object3DHelperState.html +1 -1
  196. package/docs/interfaces/OpenParameter.html +2 -2
  197. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
  198. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -1
  199. package/docs/interfaces/PanoMeasureParameterType.html +1 -1
  200. package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
  201. package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
  202. package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
  203. package/docs/interfaces/PanoRulerProPluginExportType.html +1 -1
  204. package/docs/interfaces/PanoRulerProPluginOptions.html +1 -1
  205. package/docs/interfaces/PanoRulerProPluginParameterType.html +1 -1
  206. package/docs/interfaces/PanoRulerProPluginState.html +1 -1
  207. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -1
  208. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -1
  209. package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
  210. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -1
  211. package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
  212. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -1
  213. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
  214. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -1
  215. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -1
  216. package/docs/interfaces/Point.html +1 -1
  217. package/docs/interfaces/PointJson.html +1 -1
  218. package/docs/interfaces/Room.html +1 -1
  219. package/docs/interfaces/RoomInfo.html +1 -1
  220. package/docs/interfaces/RoomLabel.html +7 -7
  221. package/docs/interfaces/RoomRules.html +1 -1
  222. package/docs/interfaces/Rooms.html +1 -1
  223. package/docs/interfaces/Scissor.html +5 -5
  224. package/docs/interfaces/TagConfig.html +3 -3
  225. package/docs/interfaces/Tags.html +3 -3
  226. package/docs/modules.html +21 -21
  227. package/libs/CSS3DRenderPlugin/CSS3DRender.js +7 -1
  228. package/libs/CSS3DRenderPlugin/utils/CSS3DObjectPlus.js +1 -0
  229. package/libs/ItemLabelPlugin/Plugin.js +1 -1
  230. package/libs/ItemLabelPlugin/typings.d.ts +1 -1
  231. package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.js +1 -1
  232. package/libs/ModelItemLabelPlugin/typings.d.ts +1 -1
  233. package/libs/ModelRoomLabelPlugin/Controller.js +1 -1
  234. package/libs/Object3DHelperPlugin/Controller.js +3 -2
  235. package/libs/PanoDoorLabelPlugin/Controller.js +1 -1
  236. package/libs/PanoRulerProPlugin/Controller.js +1 -1
  237. package/libs/PanoSpatialTagPlugin/Plugin.js +2 -2
  238. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +15 -15
  239. package/libs/PanoTagPlugin/controller/index.js +6 -6
  240. package/libs/PanoTagPlugin/tag.config.js +1 -1
  241. package/libs/PanoTagPlugin/typings/controller.d.ts +1 -1
  242. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +1 -1
  243. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +1 -1
  244. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +1 -1
  245. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +1 -1
  246. package/libs/shared-utils/Object3DHelper/Base/BaseController.d.ts +3 -1
  247. package/libs/shared-utils/Object3DHelper/Base/BaseController.js +9 -3
  248. package/libs/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +2 -2
  249. package/libs/shared-utils/Object3DHelper/Controller/RectangleScaleController.js +92 -86
  250. package/libs/shared-utils/Object3DHelper/Controller/RotateController.d.ts +2 -1
  251. package/libs/shared-utils/Object3DHelper/Controller/RotateController.js +17 -8
  252. package/libs/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +1 -0
  253. package/libs/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.js +5 -7
  254. package/libs/shared-utils/Object3DHelper/index.js +3 -3
  255. package/libs/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
  256. package/libs/shared-utils/Object3DHelper/utils/finiteNumber.js +9 -0
  257. package/package.json +1 -1
  258. package/libs/ItemLabelPlugin/ItemLabelComponent.svelte +0 -251
  259. package/libs/ItemLabelPlugin/ItemLabelItem.svelte +0 -183
  260. package/libs/ModelItemLabelPlugin/ItemLabelComponent.svelte +0 -155
  261. package/libs/ModelItemLabelPlugin/ItemLabelItem.svelte +0 -100
  262. package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte +0 -63
  263. package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte +0 -94
  264. package/libs/PanoDoorLabelPlugin/DoorLabelItem.svelte +0 -200
  265. package/libs/PanoRulerProPlugin/RulerItem.svelte +0 -166
  266. package/libs/PanoRulerProPlugin/RulerItems.svelte +0 -212
  267. package/libs/PanoSpatialTagPlugin/Components/origins.svelte +0 -58
  268. package/libs/PanoSpatialTagPlugin/Components/tag.svelte +0 -292
  269. package/libs/PanoTagPlugin/Components/Common/Arrow.svelte +0 -56
  270. package/libs/PanoTagPlugin/Components/Common/Audio.svelte +0 -82
  271. package/libs/PanoTagPlugin/Components/Common/Line/Polyline.svelte +0 -36
  272. package/libs/PanoTagPlugin/Components/Common/Line/Straight.svelte +0 -36
  273. package/libs/PanoTagPlugin/Components/Common/Media.svelte +0 -70
  274. package/libs/PanoTagPlugin/Components/Common/MultiLineText.svelte +0 -56
  275. package/libs/PanoTagPlugin/Components/Common/Point/CustomPoint.svelte +0 -120
  276. package/libs/PanoTagPlugin/Components/Common/Point/DefaultPoint.svelte +0 -81
  277. package/libs/PanoTagPlugin/Components/Common/Point/PointSwitch.svelte +0 -30
  278. package/libs/PanoTagPlugin/Components/Common/Shadow.svelte +0 -46
  279. package/libs/PanoTagPlugin/Components/Common/Text.svelte +0 -69
  280. package/libs/PanoTagPlugin/Components/Common/TextItem.svelte +0 -42
  281. package/libs/PanoTagPlugin/Components/PointTag.svelte +0 -55
  282. package/libs/PanoTagPlugin/Components/Tag/AudioTag.svelte +0 -105
  283. package/libs/PanoTagPlugin/Components/Tag/CustomTag.svelte +0 -33
  284. package/libs/PanoTagPlugin/Components/Tag/ImageTextTag.svelte +0 -63
  285. package/libs/PanoTagPlugin/Components/Tag/LinkTag.svelte +0 -166
  286. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.svelte +0 -234
  287. package/libs/PanoTagPlugin/Components/Tag/MediaPlane.svelte +0 -30
  288. package/libs/PanoTagPlugin/Components/Tag/TextTag.svelte +0 -63
  289. package/libs/PanoTagPlugin/Components/Tag/index.svelte +0 -145
  290. package/libs/PanoTagPlugin/Components/TagWrapper.svelte +0 -69
  291. package/libs/floorplan/Components/BaseImage.svelte +0 -26
  292. package/libs/floorplan/Components/Camera.svelte +0 -46
  293. package/libs/floorplan/Components/Compass.svelte +0 -51
  294. package/libs/floorplan/Components/CurrentFloor.svelte +0 -46
  295. package/libs/floorplan/Components/Main.svelte +0 -51
  296. package/libs/floorplan/Components/Normalmage.svelte +0 -11
  297. package/libs/floorplan/Components/RoomHighlight/Room.svelte +0 -27
  298. package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte +0 -29
  299. package/libs/floorplan/Components/RoomLabels/RoomLabel.svelte +0 -119
  300. package/libs/floorplan/Components/RoomLabels/RoomLabels.svelte +0 -35
  301. package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte +0 -42
  302. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte +0 -7
  303. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte +0 -24
  304. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte +0 -33
  305. package/libs/floorplan/Components/RuleLabels/RuleItem.svelte +0 -174
  306. package/libs/floorplan/Components/RuleLabels/RuleLabels.svelte +0 -32
  307. package/libs/floorplan/Components/SvgImage.svelte +0 -28
  308. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte +0 -85
  309. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte +0 -18
  310. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte +0 -40
  311. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte +0 -64
@@ -2,8 +2,9 @@ import { BaseController } from '../Base/BaseController';
2
2
  import * as THREE from 'three';
3
3
  import { getMouseRaycaster, vectorIsEqual } from '../utils';
4
4
  import { Vector3 } from 'three';
5
- import { negateScale } from '../utils/negateScale';
5
+ import '../utils/negateScale';
6
6
  import '../utils/getPoint';
7
+ import '../utils/finiteNumber';
7
8
  export class RectangleScaleController extends BaseController {
8
9
  constructor(...params) {
9
10
  super(...params);
@@ -40,10 +41,6 @@ export class RectangleScaleController extends BaseController {
40
41
  plane.setFromNormalAndCoplanarPoint(this.originObject3D.getWorldDirection(new Vector3()), positions[0]);
41
42
  else
42
43
  plane.setFromCoplanarPoints(positions[0], positions[1], positions[2]);
43
- // const p0 = getPoint(positions[0]!, 0)
44
- // const p1 = getPoint(positions[1]!, 1)
45
- // const p2 = getPoint(positions[2]!, 2)
46
- // this.scene.add(p0, p1, p2)
47
44
  return plane;
48
45
  }
49
46
  dragStart(mousePoint, point) {
@@ -53,6 +50,7 @@ export class RectangleScaleController extends BaseController {
53
50
  if (!plane)
54
51
  return this.dragEnd();
55
52
  this.startInfo = { startPoint: { position: point.position.clone(), direction: point.direction }, plane };
53
+ // this.scene.add(getPoint(point.position.clone(), 3))
56
54
  this.hooks.emit('scaleStart');
57
55
  this.needsRender();
58
56
  this.isDragging = true;
@@ -65,7 +63,7 @@ export class RectangleScaleController extends BaseController {
65
63
  if (!raycaster)
66
64
  return this.dragEnd();
67
65
  this.scale(raycaster);
68
- console.log('%c RectangleScaleController dragging', 'color: #49de1b');
66
+ // console.log('%c RectangleScaleController dragging', 'color: #49de1b')
69
67
  }
70
68
  scale(raycaster) {
71
69
  var _a, _b;
@@ -81,100 +79,108 @@ export class RectangleScaleController extends BaseController {
81
79
  return;
82
80
  if (vectorIsEqual(planeIntersection, this.camera.position))
83
81
  return;
84
- const referencePosition = cornerPositions[0].clone();
85
82
  const planeCenter = new Vector3().addVectors(cornerPositions[0], cornerPositions[2]).divideScalar(2);
86
83
  const { position: startPosition, direction } = startPoint;
87
- const ewVector = new Vector3().subVectors(cornerPositions[1], referencePosition); // west -> east vector
88
- const nsVector = new Vector3().subVectors(cornerPositions[3], referencePosition); // south -> north vector
84
+ const ewVector = new Vector3().subVectors(cornerPositions[1], cornerPositions[0]); // west -> east vector
85
+ const nsVector = new Vector3().subVectors(cornerPositions[3], cornerPositions[0]); // south -> north vector
89
86
  // eslint-disable-next-line complexity
90
- const getScale = (direction) => {
87
+ const getOffset = (direction) => {
88
+ const defaultVector = new Vector3(0, 0, 0);
89
+ if (!this.startInfo)
90
+ return defaultVector;
91
91
  const baseVector = (direction === 'ew' ? ewVector : nsVector).clone();
92
92
  const startPositionProject = startPosition.clone().projectOnVector(baseVector);
93
93
  const nowPositionProject = planeIntersection.clone().projectOnVector(baseVector);
94
94
  const planeCenterProject = planeCenter.clone().projectOnVector(baseVector);
95
- if (this.startInfo) {
96
- if (direction === 'ns' && typeof this.startInfo.nsMoveIsNegative !== 'boolean') {
97
- const offset = new Vector3().subVectors(nowPositionProject, planeCenterProject);
98
- const xIsNegative = offset.x < 0 && baseVector.x >= 0;
99
- const yIsNegative = offset.y < 0 && baseVector.y >= 0;
100
- const zIsNegative = offset.z < 0 && baseVector.z >= 0;
101
- this.startInfo.nsMoveIsNegative = xIsNegative || yIsNegative || zIsNegative;
95
+ // this.scene.add(getPoint(startPosition, 0))
96
+ // this.scene.add(getPoint(planeIntersection, 0))
97
+ if (nowPositionProject.equals(startPositionProject))
98
+ return defaultVector;
99
+ if (direction === 'ns' && typeof this.startInfo.dragPointInCenterBottom !== 'boolean') {
100
+ const offset = new Vector3().subVectors(nowPositionProject, planeCenterProject);
101
+ const xIsNegative = offset.x < 0 && baseVector.x >= 0;
102
+ const yIsNegative = offset.y < 0 && baseVector.y >= 0;
103
+ const zIsNegative = offset.z < 0 && baseVector.z >= 0;
104
+ this.startInfo.dragPointInCenterBottom = xIsNegative || yIsNegative || zIsNegative;
105
+ }
106
+ if (direction === 'ew' && typeof this.startInfo.dragPointInCenterLeft !== 'boolean') {
107
+ const offset = new Vector3().subVectors(nowPositionProject, planeCenterProject);
108
+ const xIsNegative = offset.x < 0 && baseVector.x >= 0;
109
+ const yIsNegative = offset.y < 0 && baseVector.y >= 0;
110
+ const zIsNegative = offset.z < 0 && baseVector.z >= 0;
111
+ this.startInfo.dragPointInCenterLeft = xIsNegative || yIsNegative || zIsNegative;
112
+ }
113
+ const offset = new Vector3().subVectors(nowPositionProject, startPositionProject);
114
+ // TODO
115
+ if (offset.length() > 0.1)
116
+ return defaultVector;
117
+ return offset;
118
+ };
119
+ const ewOffset = getOffset('ew');
120
+ const nsOffset = getOffset('ns');
121
+ const setEWScale = () => {
122
+ const offset = ewOffset;
123
+ this.helperObject3D.cornerPositions.forEach((position, index) => {
124
+ var _a;
125
+ if ((_a = this.startInfo) === null || _a === void 0 ? void 0 : _a.dragPointInCenterLeft) {
126
+ if (index === 0 || index === 3)
127
+ position.add(offset); // 拖左边,只改左边点
102
128
  }
103
- if (direction === 'ew' && typeof this.startInfo.ewMoveIsNegative !== 'boolean') {
104
- const offset = new Vector3().subVectors(nowPositionProject, planeCenterProject);
105
- const xIsNegative = offset.x < 0 && baseVector.x >= 0;
106
- const yIsNegative = offset.y < 0 && baseVector.y >= 0;
107
- const zIsNegative = offset.z < 0 && baseVector.z >= 0;
108
- this.startInfo.ewMoveIsNegative = xIsNegative || yIsNegative || zIsNegative;
129
+ else {
130
+ if (index === 1 || index === 2)
131
+ position.add(offset); // 拖右边,只改右边点
109
132
  }
110
- }
111
- if (nowPositionProject.equals(startPositionProject))
112
- return;
113
- const startPositionProjectOffset = new Vector3().subVectors(startPositionProject, planeCenterProject);
114
- const nowPositionProjectOffset = new Vector3().subVectors(nowPositionProject, planeCenterProject);
115
- const scale = nowPositionProjectOffset.clone().divide(startPositionProjectOffset);
116
- scale.x = isNaN(scale.x) ? 1 : scale.x;
117
- scale.y = isNaN(scale.y) ? 1 : scale.y;
118
- scale.z = isNaN(scale.z) ? 1 : scale.z;
119
- return scale;
133
+ });
120
134
  };
121
- const nsScale = (_a = getScale('ns')) !== null && _a !== void 0 ? _a : new Vector3(1, 1, 1);
122
- const ewScale = (_b = getScale('ew')) !== null && _b !== void 0 ? _b : new Vector3(1, 1, 1);
123
- const scale = (() => {
124
- switch (direction) {
125
- case 'ew':
126
- return ewScale;
127
- case 'ns':
128
- return nsScale;
129
- case 'nesw':
130
- case 'nwse':
131
- return new Vector3().multiplyVectors(nsScale, ewScale);
132
- }
133
- })();
134
- const halfScale = scale.clone().sub(new Vector3(1, 1, 1)).multiplyScalar(0.5).add(new Vector3(1, 1, 1));
135
- const scaleMatrix = new THREE.Matrix4().scale(halfScale);
135
+ const setNSScale = () => {
136
+ const offset = nsOffset;
137
+ this.helperObject3D.cornerPositions.forEach((position, index) => {
138
+ var _a;
139
+ if ((_a = this.startInfo) === null || _a === void 0 ? void 0 : _a.dragPointInCenterBottom) {
140
+ if (index === 0 || index === 1)
141
+ position.add(offset); // 拖下边,只改下边点
142
+ }
143
+ else {
144
+ if (index === 2 || index === 3)
145
+ position.add(offset); // 拖上边,只改上边点
146
+ }
147
+ });
148
+ };
149
+ switch (direction) {
150
+ case 'ew':
151
+ setEWScale();
152
+ break;
153
+ case 'ns':
154
+ setNSScale();
155
+ break;
156
+ case 'nesw':
157
+ case 'nwse':
158
+ setEWScale();
159
+ setNSScale();
160
+ }
161
+ (_b = (_a = this.helperObject3D).updatePoints) === null || _b === void 0 ? void 0 : _b.call(_a);
162
+ // this.helperObject3D.cornerPositions.forEach((position, index) => {
163
+ // this.scene.add(getPoint(position, index))
164
+ // })
165
+ const scaleX = new Vector3().subVectors(cornerPositions[1], cornerPositions[0]).length() / ewVector.length();
166
+ const scaleY = new Vector3().subVectors(cornerPositions[3], cornerPositions[0]).length() / nsVector.length();
167
+ const scaleXY = new Vector3(scaleX, scaleY, 1);
168
+ console.log(scaleXY);
169
+ const scaleMatrix = new THREE.Matrix4().scale(scaleXY);
136
170
  const newScale = object.scale.clone().applyMatrix4(scaleMatrix);
137
- // const minScale = 0.000001
138
- // newScale.x = Math.max(newScale.x, minScale)
139
- // newScale.y = Math.max(newScale.y, minScale)
140
- // newScale.z = Math.max(newScale.z, minScale)
141
- // if (direction === 'ew' || direction === 'ns') {
142
- // if (newScale.x === minScale || newScale.y === minScale || newScale.z === minScale) return
143
- // }
144
- // if (direction === 'nesw' || direction === 'nwse') {
145
- // if (newScale.x === minScale && newScale.y === minScale) return
146
- // if (newScale.x === minScale && newScale.z === minScale) return
147
- // if (newScale.y === minScale && newScale.z === minScale) return
148
- // }
149
171
  object.scale.copy(newScale); // 或者 object.scale.applyMatrix4(scaleMatrix)
150
- startPoint.position.copy(planeIntersection);
151
172
  this.hooks.emit('scaleUpdate', { matrix4: scaleMatrix, helperOrigin: planeCenter });
173
+ startPoint.position.copy(planeIntersection);
174
+ // =================================================================================================================================================================
175
+ // =================================================================================================================================================================
152
176
  // 移动位置
153
- if (referencePosition) {
154
- const ewMoveScale = this.startInfo.ewMoveIsNegative ? negateScale(ewScale) : ewScale;
155
- const nsMoveScale = this.startInfo.nsMoveIsNegative ? negateScale(nsScale) : nsScale;
156
- const moveScale = (() => {
157
- switch (direction) {
158
- case 'ew':
159
- return ewMoveScale;
160
- case 'ns':
161
- return nsMoveScale;
162
- case 'nesw':
163
- case 'nwse':
164
- return new Vector3().multiplyVectors(ewMoveScale, nsMoveScale);
165
- }
166
- })();
167
- const halfMoveScale = moveScale.clone().sub(new Vector3(1, 1, 1)).multiplyScalar(0.5).add(new Vector3(1, 1, 1));
168
- const objectPosition = object.position.clone();
169
- const newPosition = new Vector3()
170
- .subVectors(objectPosition, referencePosition)
171
- .multiply(halfMoveScale)
172
- .add(referencePosition)
173
- .sub(objectPosition);
174
- const transform = new THREE.Matrix4().setPosition(newPosition);
175
- object.applyMatrix4(transform);
176
- this.hooks.emit('positionUpdate', { matrix4: transform });
177
- }
177
+ const centerPosition = new Vector3().addVectors(cornerPositions[0], cornerPositions[2]).divideScalar(2);
178
+ const offset = new Vector3().subVectors(centerPosition, planeCenter);
179
+ const transform = new THREE.Matrix4().setPosition(offset);
180
+ object.applyMatrix4(transform);
181
+ // this.hooks.emit('scaleUpdate', { matrix4: scaleMatrix, helperOrigin: planeCenter })
182
+ this.hooks.emit('positionUpdate', { matrix4: transform });
183
+ // 移动位置end
178
184
  this.needsRender();
179
185
  }
180
186
  dragEnd() {
@@ -3,10 +3,11 @@ import type { RotateHelperAbstract } from '../Helper';
3
3
  export declare class RotateController<T extends RotateHelperAbstract = RotateHelperAbstract> extends BaseController<T> {
4
4
  private startInfo?;
5
5
  private lastRotation?;
6
+ private a?;
6
7
  private rotations;
7
- private a;
8
8
  private helperObject3DQuaternion;
9
9
  constructor(...params: ConstructorParameters<typeof BaseController<T>>);
10
+ initialHelperQuaternion(): void;
10
11
  /**
11
12
  * @description: 拖动开始,找出拖的Direction
12
13
  */
@@ -17,23 +17,23 @@ export class RotateController extends BaseController {
17
17
  writable: true,
18
18
  value: void 0
19
19
  });
20
- Object.defineProperty(this, "rotations", {
20
+ Object.defineProperty(this, "a", {
21
21
  enumerable: true,
22
22
  configurable: true,
23
23
  writable: true,
24
- value: []
24
+ value: void 0
25
25
  });
26
- Object.defineProperty(this, "a", {
26
+ Object.defineProperty(this, "rotations", {
27
27
  enumerable: true,
28
28
  configurable: true,
29
29
  writable: true,
30
- value: void 0
30
+ value: []
31
31
  });
32
32
  Object.defineProperty(this, "helperObject3DQuaternion", {
33
33
  enumerable: true,
34
34
  configurable: true,
35
35
  writable: true,
36
- value: this.helperObject3D.quaternion.clone()
36
+ value: this.originObject3D.quaternion.clone()
37
37
  });
38
38
  // add hover listener
39
39
  const helper = this.helperObject3D;
@@ -45,6 +45,10 @@ export class RotateController extends BaseController {
45
45
  document.addEventListener('mousemove', dragging);
46
46
  document.addEventListener('mouseup', dragEnd);
47
47
  }
48
+ initialHelperQuaternion() {
49
+ this.helperObject3D.updateAngleHelperQuaternion();
50
+ this.helperObject3D.applyHelperQuaternion(this.originObject3D.quaternion);
51
+ }
48
52
  /**
49
53
  * @description: 拖动开始,找出拖的Direction
50
54
  */
@@ -69,9 +73,9 @@ export class RotateController extends BaseController {
69
73
  this.setTipsPosition(tipsPosition);
70
74
  // end
71
75
  // init plane
72
- const directionX = new THREE.Vector3(1, 0, 0).applyQuaternion(this.helperObject3DQuaternion.clone());
73
- const directionY = new THREE.Vector3(0, 1, 0).applyQuaternion(this.helperObject3DQuaternion.clone());
74
- const directionZ = new THREE.Vector3(0, 0, 1).applyQuaternion(this.helperObject3DQuaternion.clone());
76
+ const directionX = new THREE.Vector3(1, 0, 0).applyQuaternion(this.helperObject3DQuaternion);
77
+ const directionY = new THREE.Vector3(0, 1, 0).applyQuaternion(this.helperObject3DQuaternion);
78
+ const directionZ = new THREE.Vector3(0, 0, 1).applyQuaternion(this.helperObject3DQuaternion);
75
79
  const directionVector = (() => {
76
80
  switch (direction) {
77
81
  case 'x':
@@ -83,6 +87,11 @@ export class RotateController extends BaseController {
83
87
  }
84
88
  })();
85
89
  const plane = new THREE.Plane().setFromNormalAndCoplanarPoint(directionVector, startIntersect);
90
+ // this.a && this.scene.remove(this.a)
91
+ // const h = new THREE.PlaneHelper(plane, 1)
92
+ // console.log(h.position)
93
+ // this.scene.add(h)
94
+ // this.a = h
86
95
  // end
87
96
  // init startVectorProject
88
97
  const projectPoint = new THREE.Vector3();
@@ -19,6 +19,7 @@ export declare class RectangleScaleHelper<T extends OriginObjectType = OriginObj
19
19
  private enabled;
20
20
  constructor(originObject3D: T, container: Element, camera: THREE.Camera, scene: THREE.Scene);
21
21
  updatePosition(): void;
22
+ updateQuaternion(): void;
22
23
  updateMatrix4(matrix: THREE.Matrix4): void;
23
24
  showDraggingHelper(): void;
24
25
  applyHelperScaleMatrix4(matrix: THREE.Matrix4, params?: {
@@ -4,6 +4,7 @@ import { RectangleScaleHelperAbstract } from '.';
4
4
  import { CSS3DObject } from 'three/examples/jsm/renderers/CSS3DRenderer';
5
5
  import { rectangleScaleDom } from './HTML/rectangleScaleDom';
6
6
  import { CSS3DObjectPlus } from '../../../CSS3DRenderPlugin/utils/CSS3DObjectPlus';
7
+ import '../utils/getPoint';
7
8
  export class RectangleScaleHelper extends RectangleScaleHelperAbstract {
8
9
  constructor(originObject3D, container, camera, scene) {
9
10
  super(originObject3D);
@@ -77,6 +78,10 @@ export class RectangleScaleHelper extends RectangleScaleHelperAbstract {
77
78
  (_a = this.css3DInstance) === null || _a === void 0 ? void 0 : _a.css3DObject.position.copy(this.originObject3D.position);
78
79
  (_b = this.plane) === null || _b === void 0 ? void 0 : _b.position.copy(this.originObject3D.position);
79
80
  }
81
+ updateQuaternion() {
82
+ var _a;
83
+ (_a = this.plane) === null || _a === void 0 ? void 0 : _a.quaternion.copy(this.originObject3D.quaternion);
84
+ }
80
85
  // public setPosition(position: Vector3) {
81
86
  // this.css3DInstance?.css3DObject.position.copy(position)
82
87
  // this.plane?.position.copy(position)
@@ -94,13 +99,6 @@ export class RectangleScaleHelper extends RectangleScaleHelperAbstract {
94
99
  var _a, _b;
95
100
  (_a = this.css3DInstance) === null || _a === void 0 ? void 0 : _a.css3DObject.scale.applyMatrix4(matrix);
96
101
  (_b = this.plane) === null || _b === void 0 ? void 0 : _b.scale.applyMatrix4(matrix);
97
- const { origin, helperOrigin } = params !== null && params !== void 0 ? params : {};
98
- if (!helperOrigin)
99
- return;
100
- this.cornerPositions.forEach((position) => {
101
- position.subVectors(position, helperOrigin).applyMatrix4(matrix).add(helperOrigin);
102
- });
103
- this.updatePoints();
104
102
  }
105
103
  updatePoints() {
106
104
  const position8 = this.calculatePointPosition(this.cornerPositions);
@@ -96,11 +96,11 @@ export class Object3DHelper {
96
96
  const { quaternion, origin } = rotate;
97
97
  if (quaternion) {
98
98
  if (controller !== this.controllers.moveController)
99
- (_a = this.controllers.moveController) === null || _a === void 0 ? void 0 : _a.setHelperQuaternion(quaternion, origin);
99
+ (_a = this.controllers.moveController) === null || _a === void 0 ? void 0 : _a.applyHelperQuaternion(quaternion, origin);
100
100
  if (controller !== this.controllers.rotateController)
101
- (_b = this.controllers.rotateController) === null || _b === void 0 ? void 0 : _b.setHelperQuaternion(quaternion, origin);
101
+ (_b = this.controllers.rotateController) === null || _b === void 0 ? void 0 : _b.applyHelperQuaternion(quaternion, origin);
102
102
  if (controller !== this.controllers.scaleController)
103
- (_c = this.controllers.scaleController) === null || _c === void 0 ? void 0 : _c.setHelperQuaternion(quaternion, origin);
103
+ (_c = this.controllers.scaleController) === null || _c === void 0 ? void 0 : _c.applyHelperQuaternion(quaternion, origin);
104
104
  (_d = this.helpers.outlineHelper) === null || _d === void 0 ? void 0 : _d.applyQuaternion(quaternion);
105
105
  }
106
106
  }
@@ -0,0 +1 @@
1
+ export default function finiteNumber(value: number | undefined | null | void, defaultValue?: number): number;
@@ -0,0 +1,9 @@
1
+ export default function finiteNumber(value, defaultValue = 0) {
2
+ if (typeof value === 'undefined' || value === null)
3
+ return defaultValue;
4
+ if (typeof value === 'number') {
5
+ if (Number.isNaN(value) || !Number.isFinite(value))
6
+ return defaultValue;
7
+ }
8
+ return value;
9
+ }
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "repository": "https://github.com/realsee-developer/dnalogel.git",
9
9
  "description": "如视 VR 看房插件合集",
10
10
  "private": false,
11
- "version": "2.1.0-alpha.5",
11
+ "version": "2.1.0-alpha.7",
12
12
  "license": "SEE LICENSE IN TERMS.txt",
13
13
  "scripts": {
14
14
  "build": "yarn run tsb && yarn run build:rollup && yarn run build:components && yarn build:docs",
@@ -1,251 +0,0 @@
1
- <script>import { Five } from '@realsee/five';
2
- import "./typings";
3
- import { beforeUpdate, onDestroy, onMount } from "svelte";
4
- import * as THREE from 'three';
5
- import ItemLabelItem from './ItemLabelItem.svelte';
6
- import "./events.type";
7
- import debounce from '../shared-utils/debounce';
8
- import { isImpacted } from "./utils/isImpacted";
9
- import { getStrokeLength } from "./utils/getStrokeLength";
10
- import { getLabelTransform } from './utils/getLabelTransform';
11
- import { transform2RenderData } from "./utils/transform2RenderData";
12
- const { Raycaster, Vector3 } = THREE;
13
- export let five;
14
- export let modelOcclusionEnable;
15
- export let onlyVisibleInPanorama;
16
- export let itemLabels;
17
- export let hooks;
18
- export let displayStrategyType;
19
- export let maxVisibleDistance;
20
- let curItemLabels = null;
21
- let renderItemLabels = null;
22
- let anchorEnabled = (five === null || five === void 0 ? void 0 : five.currentMode) === Five.Mode.Panorama;
23
- let containerWidth;
24
- let containerHeight;
25
- // 计算重叠
26
- let cssOffsetLists = [];
27
- let cssHeight = 26;
28
- let basicWidth = 11;
29
- // 动画过程中 itemsVisible 为 false
30
- let itemsVisible = true;
31
- /**
32
- * 可见性策略:
33
- * 1、当前楼层(假设先不考虑多楼层)
34
- * 2、模型未被遮挡(一个 box 有没有被遮挡的计算? TODO)
35
- * */
36
- const judgeImpacted = (five, itemLabel) => {
37
- // 虚拟 VR 仅有一层,不考虑楼层信息
38
- const cameraPosition = five.camera.position.clone();
39
- const modelPosition = new Vector3(itemLabel.modelPosition[0], itemLabel.modelPosition[1], itemLabel.modelPosition[2]);
40
- // 计算点到相机的位置
41
- const vectorDistance = modelPosition.distanceTo(cameraPosition);
42
- // 判断距离,大于最大可见距离直接不可见 TODO 把距离计算和碰撞拆分开
43
- if (maxVisibleDistance !== undefined && five.state.mode === Five.Mode.Panorama) {
44
- if (vectorDistance > maxVisibleDistance) {
45
- return false;
46
- }
47
- }
48
- return isImpacted(five, modelPosition.clone().sub(cameraPosition).normalize(), cameraPosition, vectorDistance);
49
- };
50
- const judgeInViewport = (modelPoint) => {
51
- const { camera, model } = five;
52
- const { x: offsetXFromCenter, y: offsetYFromCenter, z: offsetZFromCenter, } = modelPoint.clone().project(camera);
53
- const ratioFromLeft = (offsetXFromCenter + 1) / 2;
54
- const ratioFromTop = (2 - (offsetYFromCenter + 1)) / 2;
55
- const isFront = Math.abs(offsetZFromCenter) < 1;
56
- const cssOffset = [ratioFromLeft, ratioFromTop];
57
- // 只计算在前面就行
58
- const isInViewport = isFront && cssOffset.every((ratio) => ratio < 1 && ratio >= 0);
59
- return Boolean(isInViewport);
60
- };
61
- // cssOffset 获取
62
- const getLabelCssOffset = (five, itemLabel) => {
63
- const modelPosition = new Vector3(itemLabel.modelPosition[0], itemLabel.modelPosition[1], itemLabel.modelPosition[2]);
64
- const cssPosition = five.project2d(modelPosition);
65
- const xOffset = cssPosition === null || cssPosition === void 0 ? void 0 : cssPosition.x;
66
- const yOffset = cssPosition === null || cssPosition === void 0 ? void 0 : cssPosition.y;
67
- return [xOffset, yOffset];
68
- };
69
- // 重叠计算
70
- const isOverlap = (cssOffset, widthOffset) => {
71
- if (cssOffsetLists.length === 0) {
72
- return false;
73
- }
74
- const hasOverlapPoint = cssOffsetLists.find(item => ((cssOffset[0] >= item[0] - widthOffset && cssOffset[0] <= item[0] + widthOffset)
75
- || (cssOffset[1] >= item[1] - cssHeight && cssOffset[1] <= item[1] + cssHeight)));
76
- return !!hasOverlapPoint;
77
- };
78
- const getFormatedItemLabels = (five, labels) => {
79
- // 计算位置 & 可见性
80
- const newLabels = labels.map(label => {
81
- // 不在绑定点位则直接不可见
82
- if (five.state.panoIndex !== label.panoIndex) {
83
- return Object.assign(Object.assign({}, label), { visible: false });
84
- }
85
- const cssOffset = getLabelCssOffset(five, label);
86
- const curLabelWidth = label.name.length * basicWidth;
87
- const strokeLength = getStrokeLength(label.modelPosition[1], displayStrategyType);
88
- // 是否加入碰撞检测
89
- // 配置加入碰撞检测,则判断碰撞检测
90
- // 在可见范围内, 仅在 Panorama 模态计算
91
- const isInViewport = five.currentMode === Five.Mode.Panorama
92
- ? judgeInViewport(new Vector3(label.position[0], label.position[1], label.position[2]))
93
- : true;
94
- // 碰撞
95
- const isBlocked = modelOcclusionEnable
96
- ? judgeImpacted(five, label)
97
- : false;
98
- const visible = isInViewport && !isBlocked;
99
- // 关掉重叠计算
100
- // const visible = naturalVisible && !isOverlap([cssOffset[0], cssOffset[1] + strokeLength], curLabelWidth)
101
- if (!visible)
102
- return Object.assign(Object.assign({}, label), { visible });
103
- cssOffsetLists.push(cssOffset);
104
- // position
105
- const transform = getLabelTransform(cssOffset);
106
- return Object.assign(Object.assign({}, label), { visible, transform, strokeLength });
107
- });
108
- const sortedItemLabelItems = newLabels
109
- .filter(({ visible }) => visible)
110
- .map(label => ({
111
- itemLabelItem: label,
112
- distance: new Vector3(label.modelPosition[0], label.modelPosition[1], label.modelPosition[2]).clone().distanceTo(five.camera.position)
113
- }))
114
- .sort((a, b) => a.distance - b.distance);
115
- return newLabels.map(label => {
116
- const sortIndex = sortedItemLabelItems.findIndex(item => item.itemLabelItem.id === label.id);
117
- if (sortIndex !== undefined)
118
- return Object.assign(Object.assign({}, label), { zIndex: sortIndex * 10 });
119
- return label;
120
- });
121
- };
122
- const onItemLabelUpdate = () => {
123
- cssOffsetLists = [];
124
- renderItemLabels = getFormatedItemLabels(five, renderItemLabels);
125
- };
126
- const handleCameraUpdateCallback = () => {
127
- itemsVisible = false;
128
- handleCameraUpdate();
129
- };
130
- const onFiveModeChange = (mode) => {
131
- itemsVisible = false;
132
- five.once('initAnimationEnded', (panoIndex, pose, userAction) => {
133
- anchorEnabled = mode === Five.Mode.Panorama;
134
- itemsVisible = true;
135
- if (!userAction)
136
- return;
137
- else
138
- onItemLabelUpdate();
139
- });
140
- };
141
- const handleCameraUpdate = debounce(() => {
142
- itemsVisible = true;
143
- onItemLabelUpdate();
144
- }, 300);
145
- const onResize = () => {
146
- five.once('renderFrame', onItemLabelUpdate);
147
- };
148
- const addResizeListener = () => {
149
- window.addEventListener('resize', onResize, false);
150
- };
151
- const addDataUpdateListener = () => {
152
- if (curItemLabels !== itemLabels) {
153
- renderItemLabels = transform2RenderData(itemLabels);
154
- curItemLabels = itemLabels;
155
- onItemLabelUpdate();
156
- }
157
- };
158
- const getNearObserverPano = (fromPositionVector, observers) => {
159
- let candidates = [];
160
- for (let i = 0; i < observers.length; i++) {
161
- const { position: obVector, panoIndex } = observers[i];
162
- const distance = fromPositionVector.distanceTo(obVector);
163
- if (maxVisibleDistance === undefined || distance <= maxVisibleDistance || five.state.mode !== Five.Mode.Panorama) {
164
- candidates.push({
165
- panoIndex,
166
- obVector,
167
- distance
168
- });
169
- }
170
- }
171
- candidates = candidates.sort((a, b) => a.distance - b.distance);
172
- let observerIndex;
173
- for (let i = 0; i < candidates.length; i++) {
174
- const { obVector, distance, panoIndex } = candidates[i];
175
- const isImpactedRes = isImpacted(five, fromPositionVector, obVector, distance);
176
- if (!isImpactedRes) {
177
- observerIndex = panoIndex;
178
- break;
179
- }
180
- }
181
- return typeof observerIndex === "number" ? observers[observerIndex] : undefined;
182
- };
183
- const onIconClick = (itemLabel) => {
184
- if (five.state.mode === Five.Mode.Panorama)
185
- return;
186
- const observers = five.work.observers;
187
- const fromPositionVector = new Vector3().fromArray(itemLabel.position);
188
- const observer = getNearObserverPano(fromPositionVector, observers);
189
- if (observer) {
190
- itemLabel.observerIndex = observer.panoIndex;
191
- }
192
- if (typeof itemLabel.observerIndex === "number") {
193
- const observer = observers[itemLabel.observerIndex];
194
- const direction = fromPositionVector.clone().sub(observer.position).normalize();
195
- const cameraCoord = {
196
- longitude: Math.PI + Math.atan2(direction.x, direction.z),
197
- latitude: Math.acos(direction.y / direction.length()) - Math.PI / 2,
198
- };
199
- five.setState(Object.assign(Object.assign({}, cameraCoord), { mode: Five.Mode.Panorama, panoIndex: itemLabel.observerIndex }));
200
- // 游走结束更新 render list
201
- five.once('initAnimationEnded', () => {
202
- renderItemLabels = renderItemLabels.map(item => {
203
- return Object.assign(Object.assign({}, item), { isFold: item.id !== itemLabel.id });
204
- });
205
- five.once('cameraUpdate', () => {
206
- renderItemLabels = renderItemLabels.map(item => {
207
- return Object.assign(Object.assign({}, item), { isFold: false });
208
- });
209
- });
210
- });
211
- }
212
- };
213
- beforeUpdate(() => {
214
- addDataUpdateListener();
215
- });
216
- onMount(() => {
217
- renderItemLabels = transform2RenderData(itemLabels);
218
- curItemLabels = itemLabels;
219
- onItemLabelUpdate();
220
- addResizeListener();
221
- five.on('cameraUpdate', handleCameraUpdateCallback);
222
- // five.on('modeChange', onFiveModeChange)
223
- });
224
- onDestroy(() => {
225
- five.off('cameraUpdate', handleCameraUpdateCallback);
226
- // five.off('modeChange', onFiveModeChange)
227
- window.removeEventListener('resize', onResize, false);
228
- });
229
- </script>
230
-
231
- <div class="item-labels-container" bind:clientWidth="{containerWidth}" bind:clientHeight="{containerHeight}"
232
- style:opacity="{itemsVisible ? 1 : 0}">
233
- {#each renderItemLabels as itemLabelItem (itemLabelItem.id)}
234
- {#if itemLabelItem.visible}
235
- <ItemLabelItem
236
- itemLabel="{itemLabelItem}"
237
- hooks="{hooks}"
238
- anchorEnabled="{anchorEnabled}"
239
- onIconClick="{onIconClick}"
240
- />
241
- {/if}
242
- {/each}
243
- </div>
244
-
245
- <style>
246
- .item-labels-container {
247
- width: 100%;
248
- height: 100%;
249
- position: relative;
250
- }
251
- </style>