@realsee/dnalogel 2.1.2-alpha.0 → 2.1.2-alpha.10

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 (494) hide show
  1. package/README.md +3 -12
  2. package/dist/CSS3DRenderPlugin/index..js +88 -0
  3. package/dist/CSS3DRenderPlugin/index.cjs.js +1 -0
  4. package/dist/CameraMovementPlugin/index..js +11 -0
  5. package/dist/CameraMovementPlugin/index.cjs.js +1 -0
  6. package/dist/CruisePlugin/index..js +527 -0
  7. package/dist/CruisePlugin/index.cjs.js +1 -0
  8. package/dist/GuideLinePlugin/index..js +214 -0
  9. package/dist/GuideLinePlugin/index.cjs.js +1 -0
  10. package/dist/ItemLabelPlugin/index..js +508 -0
  11. package/dist/ItemLabelPlugin/index.cjs.js +10 -0
  12. package/dist/ModelChassisCompassPlugin/index..js +9 -0
  13. package/dist/ModelChassisCompassPlugin/index.cjs.js +1 -0
  14. package/dist/ModelEntryDoorGuidePlugin/index..js +9 -0
  15. package/dist/ModelEntryDoorGuidePlugin/index.cjs.js +1 -0
  16. package/dist/ModelItemLabelPlugin/index..js +334 -0
  17. package/dist/ModelItemLabelPlugin/index.cjs.js +10 -0
  18. package/dist/ModelRoomLabelPlugin/index..js +274 -0
  19. package/dist/ModelRoomLabelPlugin/index.cjs.js +1 -0
  20. package/dist/ModelTVVideoPlugin/index..js +12 -0
  21. package/dist/ModelTVVideoPlugin/index.cjs.js +1 -0
  22. package/dist/ModelViewPlugin/index..js +8 -0
  23. package/dist/ModelViewPlugin/index.cjs.js +1 -0
  24. package/dist/Object3DHelperPlugin/index..js +1414 -0
  25. package/dist/Object3DHelperPlugin/index.cjs.js +1 -0
  26. package/dist/PanoCompassPlugin/index..js +258 -0
  27. package/dist/PanoCompassPlugin/index.cjs.js +1 -0
  28. package/dist/PanoCursorRaycasterPlugin/index..js +63 -0
  29. package/dist/PanoCursorRaycasterPlugin/index.cjs.js +1 -0
  30. package/dist/PanoDoorLabelPlugin/index..js +340 -0
  31. package/dist/PanoDoorLabelPlugin/index.cjs.js +1 -0
  32. package/dist/PanoMeasurePlugin/index..js +15 -0
  33. package/dist/PanoMeasurePlugin/index.cjs.js +1 -0
  34. package/dist/PanoRulerPlugin/index..js +9 -0
  35. package/dist/PanoRulerPlugin/index.cjs.js +1 -0
  36. package/dist/PanoRulerProPlugin/index..js +395 -0
  37. package/dist/PanoRulerProPlugin/index.cjs.js +1 -0
  38. package/dist/PanoSpatialTagPlugin/index..js +15 -0
  39. package/dist/PanoSpatialTagPlugin/index.cjs.js +1 -0
  40. package/dist/PanoTagPlugin/index..js +4522 -0
  41. package/dist/PanoTagPlugin/index.cjs.js +17 -0
  42. package/dist/chunks/cjs/BasePlugin.57e5204f.cjs.js +1 -0
  43. package/dist/chunks/cjs/BasePluginWithData.0a28882d.cjs.js +1 -0
  44. package/dist/chunks/cjs/CSS3DRender.15349564.cjs.js +1 -0
  45. package/dist/chunks/cjs/CameraMovementPlugin.2b342576.cjs.js +1 -0
  46. package/dist/chunks/cjs/Plugin.5f616fb3.cjs.js +1 -0
  47. package/dist/chunks/cjs/Plugin.609da4aa.cjs.js +94 -0
  48. package/dist/chunks/cjs/Plugin.67936d0e.cjs.js +16 -0
  49. package/dist/chunks/cjs/Plugin.8a110c53.cjs.js +1 -0
  50. package/dist/chunks/cjs/Plugin.9971108a.cjs.js +1 -0
  51. package/dist/chunks/cjs/Plugin.fd42bf8a.cjs.js +1 -0
  52. package/dist/chunks/cjs/Subscribe.5398d5c6.cjs.js +1 -0
  53. package/dist/chunks/cjs/changeModelCanvasOpacity.8d84f111.cjs.js +1 -0
  54. package/dist/chunks/cjs/correctFiveState.4c8472bd.cjs.js +1 -0
  55. package/dist/chunks/cjs/debounce.93dfb637.cjs.js +1 -0
  56. package/dist/chunks/cjs/equal.e9fcbd4e.cjs.js +1 -0
  57. package/dist/chunks/cjs/filter.cf9ebbb3.cjs.js +1 -0
  58. package/dist/chunks/cjs/formatData.81e95011.cjs.js +10 -0
  59. package/dist/chunks/cjs/index.30b7baeb.cjs.js +101 -0
  60. package/dist/chunks/cjs/index.686e84d1.cjs.js +290 -0
  61. package/dist/chunks/cjs/index.7d2010ce.cjs.js +1 -0
  62. package/dist/chunks/cjs/isNil.b3a58990.cjs.js +1 -0
  63. package/dist/chunks/cjs/planimetry.7fce816a.cjs.js +1 -0
  64. package/dist/chunks/cjs/throttle.86c209eb.cjs.js +1 -0
  65. package/dist/chunks/cjs/transfromToMeshBasicMaterial.9db6d46a.cjs.js +1 -0
  66. package/dist/chunks/cjs/uuid.29ed9c88.cjs.js +1 -0
  67. package/dist/chunks/es/BasePlugin.813e25f7.es.js +18 -0
  68. package/dist/chunks/es/BasePluginWithData.4bf4e649.es.js +6 -0
  69. package/dist/chunks/es/CSS3DRender.5652510e.es.js +393 -0
  70. package/dist/chunks/es/CameraMovementPlugin.4a7c3e46.es.js +120 -0
  71. package/dist/chunks/es/Plugin.26c2df05.es.js +106 -0
  72. package/dist/chunks/es/Plugin.435485ed.es.js +584 -0
  73. package/dist/chunks/es/Plugin.a98418f0.es.js +82 -0
  74. package/dist/chunks/es/Plugin.ae4ee6f8.es.js +82 -0
  75. package/dist/chunks/es/Plugin.dd11e0ad.es.js +180 -0
  76. package/dist/chunks/es/Plugin.f4cf895f.es.js +355 -0
  77. package/dist/chunks/es/Subscribe.c73e0f91.es.js +50 -0
  78. package/dist/chunks/es/changeModelCanvasOpacity.45ef9fd6.es.js +1551 -0
  79. package/dist/chunks/es/correctFiveState.e7feab9f.es.js +66 -0
  80. package/dist/chunks/es/debounce.ef83f417.es.js +11 -0
  81. package/dist/chunks/es/equal.7db4a6f7.es.js +56 -0
  82. package/dist/chunks/es/filter.97ec06c4.es.js +12 -0
  83. package/dist/chunks/es/formatData.a2b39ef9.es.js +483 -0
  84. package/dist/chunks/es/index.a273f06e.es.js +532 -0
  85. package/dist/chunks/es/index.b8fdb59b.es.js +50 -0
  86. package/dist/chunks/es/index.f74f4851.es.js +1787 -0
  87. package/dist/chunks/es/isNil.212842d9.es.js +10 -0
  88. package/dist/chunks/es/planimetry.b0b4a28d.es.js +43 -0
  89. package/dist/chunks/es/throttle.db66bac3.es.js +11 -0
  90. package/dist/chunks/es/transfromToMeshBasicMaterial.849ee069.es.js +24 -0
  91. package/dist/chunks/es/uuid.676cb2c8.es.js +9 -0
  92. package/dist/components/PaintBrush/index..js +6 -0
  93. package/dist/components/PaintBrush/index.cjs.js +1 -0
  94. package/dist/components/index..js +7 -0
  95. package/dist/components/index.cjs.js +1 -0
  96. package/dist/floorplan/MapviewFloorplanPlugin/index..js +324 -0
  97. package/dist/floorplan/MapviewFloorplanPlugin/index.cjs.js +1 -0
  98. package/dist/floorplan/ModelFloorplanPlugin/index..js +320 -0
  99. package/dist/floorplan/ModelFloorplanPlugin/index.cjs.js +1 -0
  100. package/dist/floorplan/PanoFloorplanRadarPlugin/index..js +613 -0
  101. package/dist/floorplan/PanoFloorplanRadarPlugin/index.cjs.js +1 -0
  102. package/dist/floorplan/TopviewFloorplanPlugin/index..js +277 -0
  103. package/dist/floorplan/TopviewFloorplanPlugin/index.cjs.js +1 -0
  104. package/dist/index..js +530 -0
  105. package/dist/index.cjs.js +3 -543
  106. package/docs/classes/CruisePluginController.html +24 -24
  107. package/docs/classes/Magnifier.html +16 -16
  108. package/docs/classes/ModelRoomLabelController.html +11 -11
  109. package/docs/classes/Object3DHelperController.html +24 -24
  110. package/docs/classes/PaintBrush.html +15 -15
  111. package/docs/classes/PanoTagPluginController.html +39 -39
  112. package/docs/classes/Util.BetterTween.html +8 -8
  113. package/docs/classes/Util.FivePointSelector.html +12 -12
  114. package/docs/classes/Util.Interval.html +12 -12
  115. package/docs/classes/Util.Magnifier.html +17 -17
  116. package/docs/classes/Util.PointDomHelper.html +11 -11
  117. package/docs/classes/Util.PointHelper.html +11 -11
  118. package/docs/classes/Util.Rectangle.html +13 -13
  119. package/docs/enums/CameraMovementEffect.html +7 -7
  120. package/docs/enums/ContentType.html +12 -12
  121. package/docs/enums/DIRECTION.html +9 -9
  122. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +9 -9
  123. package/docs/enums/DimensionType.html +7 -7
  124. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +8 -8
  125. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +9 -9
  126. package/docs/enums/LinkType.html +7 -7
  127. package/docs/enums/PaintBrushTypeEnum.html +8 -8
  128. package/docs/enums/PointType.html +7 -7
  129. package/docs/enums/Rotation.html +8 -8
  130. package/docs/functions/CSS3DRenderPlugin.html +4 -4
  131. package/docs/functions/CameraMovementPlugin.html +4 -4
  132. package/docs/functions/CruisePlugin.html +4 -4
  133. package/docs/functions/GuideLinePlugin.html +5 -5
  134. package/docs/functions/ItemLabelPlugin.html +4 -4
  135. package/docs/functions/MapviewFloorplanPlugin.html +4 -4
  136. package/docs/functions/ModelChassisCompassPlugin.html +4 -4
  137. package/docs/functions/ModelEntryDoorGuidePlugin.html +4 -4
  138. package/docs/functions/ModelFloorplanPlugin.html +4 -4
  139. package/docs/functions/ModelItemLabelPlugin.html +4 -4
  140. package/docs/functions/ModelRoomLabelPlugin.html +4 -4
  141. package/docs/functions/ModelTVVideoPlugin.html +4 -4
  142. package/docs/functions/ModelViewPlugin.html +4 -4
  143. package/docs/functions/Object3DHelperPlugin.html +4 -4
  144. package/docs/functions/PanoCompassPlugin.html +4 -4
  145. package/docs/functions/PanoCursorRaycasterPlugin.html +4 -4
  146. package/docs/functions/PanoDoorLabelPlugin.html +4 -4
  147. package/docs/functions/PanoFloorplanRadarPlugin.html +4 -4
  148. package/docs/functions/PanoMeasurePlugin.html +4 -4
  149. package/docs/functions/PanoRulerPlugin.html +4 -4
  150. package/docs/functions/PanoRulerProPlugin.html +4 -4
  151. package/docs/functions/PanoSpatialTagPlugin.html +4 -4
  152. package/docs/functions/PanoTagPlugin.html +4 -4
  153. package/docs/functions/TopviewFloorplanPlugin.html +4 -4
  154. package/docs/functions/Util.getCoordsFromClient.html +5 -5
  155. package/docs/functions/Util.getCoordsFromElement.html +5 -5
  156. package/docs/functions/Util.getFrameTime.html +5 -5
  157. package/docs/functions/Util.getIntersectFromRelativePosition.html +5 -5
  158. package/docs/functions/Util.getRaycasterFromFivePointer.html +5 -5
  159. package/docs/functions/Util.isNil.html +5 -5
  160. package/docs/functions/Util.nextFrame.html +5 -5
  161. package/docs/functions/Util.notNil.html +5 -5
  162. package/docs/functions/Util.requestAnimationFrameInterval.html +5 -5
  163. package/docs/functions/Util.tweenProgress.html +5 -5
  164. package/docs/functions/pluginFlag.html +5 -5
  165. package/docs/index.html +6 -11
  166. package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -11
  167. package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
  168. package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
  169. package/docs/interfaces/ContentTypeMap.html +12 -12
  170. package/docs/interfaces/FloorplanBounding.html +8 -8
  171. package/docs/interfaces/FloorplanData.html +10 -10
  172. package/docs/interfaces/FloorplanEntrance.html +11 -11
  173. package/docs/interfaces/FloorplanExtraObject.html +10 -10
  174. package/docs/interfaces/FloorplanExtraObject3D.html +8 -8
  175. package/docs/interfaces/FloorplanFloorData.html +9 -9
  176. package/docs/interfaces/FloorplanImagePosition.html +7 -7
  177. package/docs/interfaces/FloorplanObserver.html +9 -9
  178. package/docs/interfaces/FloorplanOutlineItem.html +9 -9
  179. package/docs/interfaces/FloorplanPosition.html +7 -7
  180. package/docs/interfaces/FloorplanRoomItem.html +13 -13
  181. package/docs/interfaces/FloorplanRoomLabelItem.html +7 -7
  182. package/docs/interfaces/FloorplanServerBounding.html +8 -8
  183. package/docs/interfaces/FloorplanServerComputedData.html +10 -10
  184. package/docs/interfaces/FloorplanServerData.html +7 -7
  185. package/docs/interfaces/FloorplanServerDoorItem.html +10 -10
  186. package/docs/interfaces/FloorplanServerDoorPosition.html +8 -8
  187. package/docs/interfaces/FloorplanServerEntrance.html +11 -11
  188. package/docs/interfaces/FloorplanServerFloorData.html +9 -9
  189. package/docs/interfaces/FloorplanServerImagePosition.html +7 -7
  190. package/docs/interfaces/FloorplanServerObserver.html +9 -9
  191. package/docs/interfaces/FloorplanServerOutlineItem.html +9 -9
  192. package/docs/interfaces/FloorplanServerPosition.html +7 -7
  193. package/docs/interfaces/FloorplanServerRoomItem.html +14 -14
  194. package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -7
  195. package/docs/interfaces/ItemLabelPluginData.html +6 -6
  196. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -11
  197. package/docs/interfaces/ItemLabelPluginParametersType.html +9 -9
  198. package/docs/interfaces/LineJson.html +7 -7
  199. package/docs/interfaces/ModelChassisCompassPluginData.html +7 -7
  200. package/docs/interfaces/ModelChassisCompassPluginExportType.html +8 -8
  201. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +7 -7
  202. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +8 -8
  203. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +8 -8
  204. package/docs/interfaces/ModelItemLabelPluginData.html +6 -6
  205. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +11 -11
  206. package/docs/interfaces/ModelItemLabelPluginParametersType.html +7 -7
  207. package/docs/interfaces/ModelRoomLabelPluginData.html +6 -6
  208. package/docs/interfaces/ModelTVVideoPluginData.html +9 -9
  209. package/docs/interfaces/ModelTVVideoPluginExportType.html +8 -8
  210. package/docs/interfaces/ModelTVVideoPluginParameterType.html +6 -6
  211. package/docs/interfaces/ModelViewPluginExportType.html +8 -8
  212. package/docs/interfaces/Object3DHelperState.html +8 -8
  213. package/docs/interfaces/OpenParameter.html +7 -7
  214. package/docs/interfaces/PaintBrushAction.html +12 -12
  215. package/docs/interfaces/PaintBrushConfigs.html +12 -12
  216. package/docs/interfaces/PaintBrushState.html +10 -10
  217. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +10 -10
  218. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +5 -5
  219. package/docs/interfaces/PanoMeasureParameterType.html +11 -11
  220. package/docs/interfaces/PanoRulerPluginExportType.html +10 -10
  221. package/docs/interfaces/PanoRulerPluginOptions.html +7 -7
  222. package/docs/interfaces/PanoRulerPluginParameterType.html +8 -8
  223. package/docs/interfaces/PanoRulerProPluginExportType.html +9 -9
  224. package/docs/interfaces/PanoRulerProPluginOptions.html +7 -7
  225. package/docs/interfaces/PanoRulerProPluginParameterType.html +7 -7
  226. package/docs/interfaces/PanoRulerProPluginState.html +8 -8
  227. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +5 -5
  228. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +5 -5
  229. package/docs/interfaces/PanoSpatialTagPluginData.html +11 -11
  230. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +10 -10
  231. package/docs/interfaces/PanoSpatialTagPluginExportType.html +13 -13
  232. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +10 -10
  233. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +13 -13
  234. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +11 -11
  235. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +10 -10
  236. package/docs/interfaces/Point.html +8 -8
  237. package/docs/interfaces/PointJson.html +8 -8
  238. package/docs/interfaces/Room.html +9 -9
  239. package/docs/interfaces/RoomInfo.html +7 -7
  240. package/docs/interfaces/RoomLabel.html +14 -14
  241. package/docs/interfaces/RoomRules.html +5 -5
  242. package/docs/interfaces/Rooms.html +5 -5
  243. package/docs/interfaces/Scissor.html +9 -9
  244. package/docs/interfaces/TagConfig.html +10 -10
  245. package/docs/interfaces/Tags.html +9 -9
  246. package/docs/interfaces/Util.MagnifierParameter.html +11 -11
  247. package/docs/interfaces/Util.MouseGroupParameter.html +8 -8
  248. package/docs/modules/Util.html +5 -5
  249. package/docs/modules.html +4 -4
  250. package/docs/types/ArrayPosition.html +5 -5
  251. package/docs/types/CSS3DRenderExportType.html +5 -5
  252. package/docs/types/CSS3DRenderPluginExportType.html +5 -5
  253. package/docs/types/CSS3DRenderPluginParameterType.html +5 -5
  254. package/docs/types/Color.html +5 -5
  255. package/docs/types/ContentTypeConfigKey.html +5 -5
  256. package/docs/types/ContentTypeConfigKeyArray.html +5 -5
  257. package/docs/types/Create3DDomContainerReturnType.html +5 -5
  258. package/docs/types/Create3DElementReturnType.html +5 -5
  259. package/docs/types/CruisePluginExportType.html +5 -5
  260. package/docs/types/Direction-1.html +5 -5
  261. package/docs/types/Direction4.html +5 -5
  262. package/docs/types/FloorplanRuleLabels.html +5 -5
  263. package/docs/types/FloorplanServerRuleLabels.html +5 -5
  264. package/docs/types/GuideLinePluginExportType.html +5 -5
  265. package/docs/types/HelperEventMap.html +5 -5
  266. package/docs/types/MapviewFloorplanPluginParameterType.html +5 -5
  267. package/docs/types/MapviewFloorplanPluginReturnType.html +5 -5
  268. package/docs/types/MediaData.html +5 -5
  269. package/docs/types/ModelEntryDoorGuidePluginParameterType.html +5 -5
  270. package/docs/types/ModelFloorplanPluginParameterType.html +5 -5
  271. package/docs/types/ModelFloorplanPluginReturnType.html +5 -5
  272. package/docs/types/ModelRoomLabelPluginParameters.html +5 -5
  273. package/docs/types/ModelRoomLabelPluginReturnType.html +5 -5
  274. package/docs/types/MoveArgs.html +5 -5
  275. package/docs/types/MoveOpts.html +5 -5
  276. package/docs/types/Object3DHelperEventMap.html +5 -5
  277. package/docs/types/ObjectFit.html +5 -5
  278. package/docs/types/PaintBrushEventMap.html +5 -5
  279. package/docs/types/PanoCompassPluginData.html +5 -5
  280. package/docs/types/PanoCompassPluginExportType.html +5 -5
  281. package/docs/types/PanoCompassPluginParameterType.html +5 -5
  282. package/docs/types/PanoFloorplanRadarPluginParameterType.html +5 -5
  283. package/docs/types/PanoFloorplanRadarPluginReturnType.html +5 -5
  284. package/docs/types/PanoMeasurePluginEvent.html +5 -5
  285. package/docs/types/PanoMeasureReturnType.html +5 -5
  286. package/docs/types/PanoSpatialTagPluginId.html +5 -5
  287. package/docs/types/PanoTagPluginExportInterface.html +5 -5
  288. package/docs/types/PanoTagPluginParamsInterface.html +5 -5
  289. package/docs/types/PlaneTag.html +5 -5
  290. package/docs/types/PointTag.html +5 -5
  291. package/docs/types/Position.html +5 -5
  292. package/docs/types/RotateArgs.html +5 -5
  293. package/docs/types/RotateOpts.html +5 -5
  294. package/docs/types/RuleLabelsKey.html +5 -5
  295. package/docs/types/RuleLabelsValue.html +5 -5
  296. package/docs/types/Tag.html +5 -5
  297. package/docs/types/Tag2D.html +5 -5
  298. package/docs/types/Tag3D.html +5 -5
  299. package/docs/types/TagId.html +5 -5
  300. package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
  301. package/docs/types/TopviewFloorplanPluginReturnType.html +5 -5
  302. package/docs/variables/FLOOR_TYPE_MAP.html +5 -5
  303. package/docs/variables/PLUGIN.html +5 -5
  304. package/docs/variables/ROOM_FETILE_TYPE_MAP.html +5 -5
  305. package/docs/variables/ROOM_TYPE_MAP.html +5 -5
  306. package/docs/variables/VERSION.html +5 -5
  307. package/docs/variables/itemLabelPluginServerParams.html +5 -5
  308. package/docs/variables/modelItemLabelPluginServerParams.html +5 -5
  309. package/docs/variables/modelRoomLabelPluginServerParams.html +5 -5
  310. package/libs/CSS3DRenderPlugin/CSS3DRender.js +1 -5
  311. package/libs/CSS3DRenderPlugin/Controller.js +6 -7
  312. package/libs/CSS3DRenderPlugin/index.js +3 -4
  313. package/libs/CSS3DRenderPlugin/typing.js +1 -0
  314. package/libs/CSS3DRenderPlugin/utils/CSS3DObjectPlus.js +1 -3
  315. package/libs/CSS3DRenderPlugin/utils/index.js +1 -0
  316. package/libs/CSS3DRenderPlugin/utils/positionToVector3.js +1 -2
  317. package/libs/CSS3DRenderPlugin/utils/random.js +1 -0
  318. package/libs/CameraMovementPlugin/CameraMovementPlugin.js +16 -17
  319. package/libs/CameraMovementPlugin/index.js +3 -0
  320. package/libs/CruisePlugin/Controller.js +4 -4
  321. package/libs/CruisePlugin/index.js +3 -6
  322. package/libs/CruisePlugin/utils/linerValue.js +4 -4
  323. package/libs/GuideLinePlugin/Controller.js +3 -4
  324. package/libs/GuideLinePlugin/index.js +3 -4
  325. package/libs/GuideLinePlugin/utils/getLineGeometries.js +1 -1
  326. package/libs/ItemLabelPlugin/ItemLabelComponent.js +34 -32
  327. package/libs/ItemLabelPlugin/Plugin.js +5 -6
  328. package/libs/ModelChassisCompassPlugin/Plugin.js +3 -4
  329. package/libs/ModelChassisCompassPlugin/index.js +2 -0
  330. package/libs/ModelEntryDoorGuidePlugin/Plugin.js +22 -23
  331. package/libs/ModelEntryDoorGuidePlugin/index.js +2 -0
  332. package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +4 -3
  333. package/libs/ModelItemLabelPlugin/ModelItemLabelPlugin.js +5 -6
  334. package/libs/ModelItemLabelPlugin/events.type.js +1 -0
  335. package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +11 -10
  336. package/libs/ModelRoomLabelPlugin/index.js +0 -1
  337. package/libs/ModelTVVideoPlugin/Plugin.js +1 -2
  338. package/libs/ModelTVVideoPlugin/index.js +2 -0
  339. package/libs/ModelViewPlugin/Plugin.js +1 -2
  340. package/libs/ModelViewPlugin/index.js +2 -0
  341. package/libs/Object3DHelperPlugin/FiveControllerWrapper.js +6 -7
  342. package/libs/Object3DHelperPlugin/index.js +1 -6
  343. package/libs/PanoCompassPlugin/index.js +3 -4
  344. package/libs/PanoCursorRaycasterPlugin/index.js +7 -8
  345. package/libs/PanoDoorLabelPlugin/index.js +1 -2
  346. package/libs/PanoMeasurePlugin/Controller/BaseController.js +3 -3
  347. package/libs/PanoMeasurePlugin/Controller/EditController.js +5 -5
  348. package/libs/PanoMeasurePlugin/Controller/MixedController.js +17 -17
  349. package/libs/PanoMeasurePlugin/Controller/ViewController.js +3 -3
  350. package/libs/PanoMeasurePlugin/Controller/WatchController.js +9 -9
  351. package/libs/PanoMeasurePlugin/Controller/index.js +8 -8
  352. package/libs/PanoMeasurePlugin/Model/index.js +3 -3
  353. package/libs/PanoMeasurePlugin/Model/line.js +11 -11
  354. package/libs/PanoMeasurePlugin/Model/point.js +7 -7
  355. package/libs/PanoMeasurePlugin/Model/polyline.js +1 -1
  356. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.js +1 -1
  357. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.js +1 -1
  358. package/libs/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.js +1 -1
  359. package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +4 -4
  360. package/libs/PanoMeasurePlugin/Modules/FiveHelper.js +3 -3
  361. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +30 -30
  362. package/libs/PanoMeasurePlugin/Modules/UIController/HTML.js +2 -2
  363. package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +2 -2
  364. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +3 -3
  365. package/libs/PanoMeasurePlugin/Modules/UIController/mobileHTML.js +1 -1
  366. package/libs/PanoMeasurePlugin/Modules/rangePiece/html.js +3 -4
  367. package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +5 -5
  368. package/libs/PanoMeasurePlugin/index.js +3 -4
  369. package/libs/PanoMeasurePlugin/utils/calculateThreeMouse.js +1 -1
  370. package/libs/PanoMeasurePlugin/utils/distanceDom.js +1 -1
  371. package/libs/PanoMeasurePlugin/utils/findClosestPoint.js +2 -2
  372. package/libs/PanoMeasurePlugin/utils/isNDCPointInScreen.js +3 -3
  373. package/libs/PanoMeasurePlugin/utils/line.js +0 -1
  374. package/libs/PanoMeasurePlugin/utils/math.js +1 -2
  375. package/libs/PanoMeasurePlugin/utils/ndc2Screen.js +2 -2
  376. package/libs/PanoRulerPlugin/Plugin.js +2 -3
  377. package/libs/PanoRulerPlugin/index.js +2 -0
  378. package/libs/PanoRulerPlugin/style.js +1 -1
  379. package/libs/PanoRulerProPlugin/Controller.js +15 -15
  380. package/libs/PanoRulerProPlugin/RulerItems.js +7 -4
  381. package/libs/PanoRulerProPlugin/index.js +3 -4
  382. package/libs/PanoSpatialTagPlugin/Components/origins.js +3 -2
  383. package/libs/PanoSpatialTagPlugin/Components/tag.js +3 -2
  384. package/libs/PanoSpatialTagPlugin/Plugin.js +2 -3
  385. package/libs/PanoSpatialTagPlugin/index.js +6 -0
  386. package/libs/PanoSpatialTagPlugin/typings.js +1 -0
  387. package/libs/PanoTagPlugin/Components/Common/Line/Polyline.js +1 -1
  388. package/libs/PanoTagPlugin/Components/Common/Line/Straight.js +1 -1
  389. package/libs/PanoTagPlugin/Components/Common/Media.js +43 -36
  390. package/libs/PanoTagPlugin/Components/Common/MultiLineText.js +88 -78
  391. package/libs/PanoTagPlugin/Components/Common/Point/CustomPoint.js +5 -4
  392. package/libs/PanoTagPlugin/Components/Common/Point/DefaultPoint.js +3 -2
  393. package/libs/PanoTagPlugin/Components/Common/Point/PointSwitch.js +30 -27
  394. package/libs/PanoTagPlugin/Components/Common/TextItem.js +106 -0
  395. package/libs/PanoTagPlugin/Components/Tag/AudioTag.js +20 -14
  396. package/libs/PanoTagPlugin/Components/Tag/ImageTextTag.js +114 -92
  397. package/libs/PanoTagPlugin/Components/Tag/LinkTag.js +3 -2
  398. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +3 -2
  399. package/libs/PanoTagPlugin/Components/Tag/MediaPlane.js +71 -52
  400. package/libs/PanoTagPlugin/Components/Tag/TextTag.js +62 -50
  401. package/libs/PanoTagPlugin/Components/Tag/index.js +92 -63
  402. package/libs/PanoTagPlugin/Components/TagContainer.js +108 -64
  403. package/libs/PanoTagPlugin/Components/TagWrapper.js +113 -75
  404. package/libs/PanoTagPlugin/controller/index.js +0 -1
  405. package/libs/PanoTagPlugin/index.js +3 -7
  406. package/libs/PanoTagPlugin/tag.config.js +1 -2
  407. package/libs/PanoTagPlugin/typings/controller.js +1 -0
  408. package/libs/PanoTagPlugin/typings/index.js +1 -0
  409. package/libs/PanoTagPlugin/utils/constants.js +1 -2
  410. package/libs/PanoTagPlugin/utils/doUtil.js +6 -6
  411. package/libs/PanoTagPlugin/utils/index.js +1 -0
  412. package/libs/components/PaintBrush/Controller.js +3 -3
  413. package/libs/components/PaintBrush/style.js +1 -1
  414. package/libs/components/PaintBrush/tween.js +4 -4
  415. package/libs/components/index.js +2 -0
  416. package/libs/floorplan/Components/Camera.js +1 -1
  417. package/libs/floorplan/Components/CurrentFloor.js +51 -41
  418. package/libs/floorplan/Components/Main.js +41 -22
  419. package/libs/floorplan/Components/RoomHighlight/Room.js +3 -3
  420. package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +3 -2
  421. package/libs/floorplan/Components/RoomLabels/RoomLabels.js +37 -36
  422. package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +1 -1
  423. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +7 -7
  424. package/libs/floorplan/MapviewFloorplanPlugin/index.js +3 -4
  425. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +7 -7
  426. package/libs/floorplan/ModelFloorplanPlugin/index.js +2 -3
  427. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.js +1 -1
  428. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +6 -2
  429. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.js +74 -65
  430. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +2 -2
  431. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +2 -3
  432. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +5 -5
  433. package/libs/floorplan/TopviewFloorplanPlugin/index.js +3 -4
  434. package/libs/floorplan/index.js +6 -0
  435. package/libs/floorplan/typings/floorplanData.js +1 -0
  436. package/libs/floorplan/utils/correctFiveState.js +19 -19
  437. package/libs/floorplan/utils/formatData.js +16 -16
  438. package/libs/floorplan/utils/formatPosition.js +7 -7
  439. package/libs/index.js +344 -90
  440. package/libs/shared-utils/Object3DHelper/Base/BaseController.js +2 -3
  441. package/libs/shared-utils/Object3DHelper/Base/BaseHelper.js +1 -3
  442. package/libs/shared-utils/Object3DHelper/Constants/color.js +0 -1
  443. package/libs/shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js +1 -2
  444. package/libs/shared-utils/Object3DHelper/Helper/index.js +3 -0
  445. package/libs/shared-utils/Object3DHelper/typings/Direction.js +1 -0
  446. package/libs/shared-utils/Object3DHelper/typings/Hooks.js +1 -0
  447. package/libs/shared-utils/Object3DHelper/typings/Scissor.js +1 -0
  448. package/libs/shared-utils/Object3DHelper/typings/index.js +1 -0
  449. package/libs/shared-utils/Object3DHelper/utils/filterNotColinearPoints.js +1 -0
  450. package/libs/shared-utils/Object3DHelper/utils/getPoint.js +1 -0
  451. package/libs/shared-utils/Object3DHelper/utils/index.js +1 -0
  452. package/libs/shared-utils/Object3DHelper/utils/normalPositionToPositions.js +1 -0
  453. package/libs/shared-utils/Object3DHelper/utils/object3DBoundingPosition.js +1 -0
  454. package/libs/shared-utils/Object3DHelper/utils/threex/domevents/index.js +1 -1
  455. package/libs/shared-utils/animationFrame/index.js +13 -16
  456. package/libs/shared-utils/animationFrame/tween.js +0 -2
  457. package/libs/shared-utils/changeModelCanvasOpacity.js +1 -1
  458. package/libs/shared-utils/createCanvasTextTexture.js +6 -6
  459. package/libs/shared-utils/createLine/index.js +3 -3
  460. package/libs/shared-utils/debounce.js +5 -5
  461. package/libs/shared-utils/equal.js +16 -16
  462. package/libs/shared-utils/filter.js +1 -1
  463. package/libs/shared-utils/five/changeMode.js +14 -14
  464. package/libs/shared-utils/getPxmm.js +7 -8
  465. package/libs/shared-utils/index.js +33 -29
  466. package/libs/shared-utils/isTruelyObject.js +1 -1
  467. package/libs/shared-utils/math/index.js +1 -0
  468. package/libs/shared-utils/math/planimetry.js +1 -6
  469. package/libs/shared-utils/math/rad2Deg.js +3 -3
  470. package/libs/shared-utils/nearlyEqual.js +3 -3
  471. package/libs/shared-utils/noop.js +1 -1
  472. package/libs/shared-utils/object3d2LocalMatrix.js +6 -7
  473. package/libs/shared-utils/removeArrayItem.js +5 -5
  474. package/libs/shared-utils/tap.js +3 -3
  475. package/libs/shared-utils/three/index.js +6 -0
  476. package/libs/shared-utils/three/transformPositionToVector3.js +2 -2
  477. package/libs/shared-utils/three/transfromToMeshBasicMaterial.js +12 -12
  478. package/libs/shared-utils/throttle.js +2 -2
  479. package/libs/shared-utils/tinyEJSrender.js +7 -7
  480. package/libs/shared-utils/to.js +14 -15
  481. package/libs/shared-utils/uuid.js +0 -1
  482. package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/components-shared/get-changed-params.js +0 -0
  483. package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/components-shared/get-params.js +0 -0
  484. package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/components-shared/mount-swiper.js +0 -0
  485. package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/components-shared/params-list.js +0 -0
  486. package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/components-shared/update-swiper.js +0 -0
  487. package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/components-shared/utils.js +0 -0
  488. package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/svelte/swiper-slide.js +1 -1
  489. package/libs/vendor/swiper/svelte/swiper-svelte.js +3 -0
  490. package/libs/{node_modules/.pnpm/swiper@8.4.4/node_modules → vendor}/swiper/svelte/swiper.js +1 -1
  491. package/package.json +19 -17
  492. package/dist/index.es.js +0 -16650
  493. package/dist/index.js +0 -16650
  494. package/dist/index.umd.js +0 -556
@@ -0,0 +1 @@
1
+ "use strict";var ge=Object.defineProperty;var ie=Object.getOwnPropertySymbols;var be=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable;var G=(o,s,e)=>s in o?ge(o,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[s]=e,v=(o,s)=>{for(var e in s||(s={}))be.call(s,e)&&G(o,e,s[e]);if(ie)for(var e of ie(s))ye.call(s,e)&&G(o,e,s[e]);return o};var l=(o,s,e)=>(G(o,typeof s!="symbol"?s+"":s,e),e);var A=(o,s,e)=>new Promise((t,n)=>{var i=c=>{try{a(e.next(c))}catch(p){n(p)}},r=c=>{try{a(e.throw(c))}catch(p){n(p)}},a=c=>c.done?t(c.value):Promise.resolve(c.value).then(i,r);a((e=e.apply(o,s)).next())});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const me=require("../chunks/cjs/BasePlugin.57e5204f.cjs.js"),y=require("three"),ve=require("three/examples/jsm/renderers/CSS3DRenderer"),le=require("../chunks/cjs/CSS3DRender.15349564.cjs.js"),ce=require("../chunks/cjs/Subscribe.5398d5c6.cjs.js"),we=require("../chunks/cjs/isNil.b3a58990.cjs.js");function De(o){if(o&&o.__esModule)return o;const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const e in o)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(o,e);Object.defineProperty(s,e,t.get?t:{enumerable:!0,get:()=>o[e]})}}return s.default=o,Object.freeze(s)}const h=De(y);class N extends y.Object3D{constructor(e,t){var n;super();l(this,"originObject3D");l(this,"onRender");this.originObject3D=e,this.onRender=(n=t==null?void 0:t.onRender)!=null?n:()=>{}}get helperObject(){return this}render(){this.onRender()}show(){this.visible=!0,this.render()}hide(){this.visible=!1,this.render()}updatePosition(){this.position.copy(this.originObject3D.position)}updateQuaternion(){this.quaternion.copy(this.originObject3D.quaternion)}applyHelperScaleMatrix4(e,t){this.scale.applyMatrix4(e)}applyHelperQuaternion(e,t){this.applyQuaternion(e)}}class xe extends N{}class Ce extends N{}class je extends N{}class Oe extends je{}class Ee extends h.Group{constructor(e){super();l(this,"direction");this.direction=e||"x"}}class ae extends h.Mesh{constructor(e,t,n){super(e,t);l(this,"direction");this.direction=n||"x"}}function _e(o,s){const{offsetWidth:e,offsetHeight:t}=s,{top:n,left:i}=s.getBoundingClientRect();return Object.assign(new h.Vector2,{x:(o.x-i)/e*2-1,y:-(o.y-n)/t*2+1})}function Z(o,s,e){if(!s||!e||!o)return;const t=_e(s,e);if(Math.abs(t.x)===1||Math.abs(t.y)===1)return;const n=new h.Raycaster;return n.setFromCamera(t,o),n}function He(o,s){return!(Math.abs(o.x-s.x)>1e-5||Math.abs(o.y-s.y)>1e-5||Math.abs(o.z-s.z)>1e-5)}class q extends Ee{constructor(e){var u;super(e.direction);l(this,"line");l(this,"arrow");l(this,"lineHeight",.4);l(this,"arrowHeight",.1);this.name="ArrowGroup";const t=new h.Color((u=e.color)!=null?u:16214315),n=new h.MeshBasicMaterial({color:t,depthTest:!1,opacity:1,transparent:!0,side:h.DoubleSide}),i=new h.ConeGeometry(.04,.1,32),r=new ae(i,n.clone(),e.direction);r.name=`arrow-${e.direction}`,this.arrow=r;const a=.004,c=new h.CylinderGeometry(a,a,.4,32),p=new ae(c,n.clone(),e.direction);p.name=`line-${e.direction}`,this.line=p,this.formatArrow(),this.formatLine(),this.add(this.arrow,this.line)}formatArrow(){this.arrow.geometry.translate(0,this.lineHeight+this.arrowHeight/2,0),this.direction==="x"?(this.arrow.geometry.rotateX(Math.PI/2),this.arrow.geometry.rotateY(Math.PI/2)):this.direction==="z"&&this.arrow.geometry.rotateX(Math.PI/2)}formatLine(){this.line.geometry.translate(0,this.lineHeight/2,0),this.direction==="x"?(this.line.geometry.rotateX(Math.PI/2),this.line.geometry.rotateY(Math.PI/2)):this.direction==="z"&&this.line.geometry.rotateX(Math.PI/2)}}const F={X:15618642,Y:4765519,Z:4227839};class O{static get X(){return new h.Color(F.X).convertSRGBToLinear().clone()}static get Y(){return new h.Color(F.Y).convertSRGBToLinear().clone()}static get Z(){return new h.Color(F.Z).convertSRGBToLinear().clone()}}class Se extends xe{constructor(e){super(e);l(this,"xArrow",new q({direction:"x",color:O.X}));l(this,"yArrow",new q({direction:"y",color:O.Y}));l(this,"zArrow",new q({direction:"z",color:O.Z}));this.add(this.xArrow),this.add(this.yArrow),this.add(this.zArrow)}show(){super.show(),this.xArrow.visible=!0,this.yArrow.visible=!0,this.zArrow.visible=!0}showDraggingHelper(e){this.xArrow.visible=e.includes("x"),this.yArrow.visible=e.includes("y"),this.zArrow.visible=e.includes("z")}dispose(){this.remove(this.xArrow,this.yArrow,this.zArrow)}}function R(o,s){return Me(document.createElement(s!=null?s:"div"),o)}function Me(o,s){if(!s)return o;for(const e in s)e&&s[e]&&(o.style[e]=s[e]);return o}function Ie(o){const s=R(v({position:"absolute",display:"block",borderRadius:"4px",paddingTop:"1px",paddingBottom:"1px",paddingLeft:"4px",paddingRight:"4px",pointerEvents:"none",userSelect:"none",zIndex:"9999",backgroundColor:"rgba(0,0,0,0.7)",fontSize:"12px",color:"#fff",letterSpacing:"0",lineHeight:"18px"},o)),e=()=>{s.style.display!=="block"&&(!s.style.top||!s.style.left||(s.style.display="block"))};return{element:s,show:e,hide:()=>{s.style.display="none",s.style.top="",s.style.left=""},setLeftTop:(i,r)=>{s.style.left=i,s.style.top=r,e()}}}class Pe extends Ce{constructor(e,t){var n;super(e);l(this,"yzCircle",new U({direction:"x",color:O.X}));l(this,"xzCircle",new U({direction:"y",color:O.Y}));l(this,"xyCircle",new U({direction:"z",color:O.Z}));l(this,"xRingHelper",new X({direction:"x"}));l(this,"yRingHelper",new X({direction:"y"}));l(this,"zRingHelper",new X({direction:"z"}));l(this,"xAngleHelper",new B({direction:"x",color:O.X}));l(this,"yAngleHelper",new B({direction:"y",color:O.Y}));l(this,"zAngleHelper",new B({direction:"z",color:O.Z}));l(this,"angleTips");l(this,"container");t&&(this.container=t==null?void 0:t.container,this.angleTips=Ie({display:"none"}),(n=this.container)==null||n.appendChild(this.angleTips.element)),this.show()}updateAngleHelperQuaternion(){this.xAngleHelper.quaternion.copy(this.yzCircle.quaternion),this.yAngleHelper.quaternion.copy(this.xzCircle.quaternion),this.zAngleHelper.quaternion.copy(this.xyCircle.quaternion),this.xRingHelper.quaternion.copy(this.yzCircle.quaternion),this.yRingHelper.quaternion.copy(this.xzCircle.quaternion),this.zRingHelper.quaternion.copy(this.xyCircle.quaternion)}applyHelperQuaternion(e,t){this.yzCircle.applyQuaternion(e),this.xzCircle.applyQuaternion(e),this.xyCircle.applyQuaternion(e),this.xAngleHelper.baseAxes.applyQuaternion(e),this.yAngleHelper.baseAxes.applyQuaternion(e),this.zAngleHelper.baseAxes.applyQuaternion(e)}hide(){this.remove(this.yzCircle,this.xzCircle,this.xyCircle,this.xRingHelper,this.yRingHelper,this.zRingHelper,this.xAngleHelper,this.yAngleHelper,this.zAngleHelper)}show(){var e;this.add(this.xyCircle,this.xzCircle,this.yzCircle),this.remove(this.xRingHelper,this.yRingHelper,this.zRingHelper,this.xAngleHelper,this.yAngleHelper,this.zAngleHelper),(e=this.angleTips)==null||e.hide()}showDraggingHelper(e){var t;this.hide(),this.add(...this.filterRingHelper(e)),this.add(...this.filterAngleHelper(e)),(t=this.angleTips)==null||t.show()}dispose(){var e,t;this.remove(this.yzCircle,this.xzCircle,this.xyCircle,this.xRingHelper,this.yRingHelper,this.zRingHelper,this.xAngleHelper,this.yAngleHelper,this.zAngleHelper),(e=this.angleTips)!=null&&e.element&&((t=this.container)==null||t.removeChild(this.angleTips.element))}filterRingHelper(e){return[this.xRingHelper,this.yRingHelper,this.zRingHelper].filter(t=>e.includes(t.direction))}filterAngleHelper(e){return[this.xAngleHelper,this.yAngleHelper,this.zAngleHelper].filter(t=>e.includes(t.direction))}}class U extends h.Mesh{constructor(e){var t;super();l(this,"direction");l(this,"gapAngle",.02);l(this,"geometry",new h.RingGeometry(.25,.3,20,8,this.gapAngle,Math.PI/2-this.gapAngle*2));this.material=new h.MeshBasicMaterial({opacity:.6,color:(t=e.color)!=null?t:16777215,transparent:!0,side:h.DoubleSide,depthTest:!1}),this.direction=e.direction,this.geometry.name=`RotateHelperCircleGeometry-${this.direction}`,this.direction==="y"?this.rotateX(Math.PI/2):this.direction==="x"&&this.rotateY(-Math.PI/2)}}class X extends h.Group{constructor(e){super();l(this,"direction");this.direction=e.direction;const t=.015,n=new Array(8).fill(null).map((i,r)=>{const a=new h.RingGeometry(.25,.3,20,8,Math.PI/4*r+t,Math.PI/4-t*2),c=new h.MeshBasicMaterial({opacity:1,color:16777215,depthTest:!1,transparent:!0,side:h.DoubleSide}),p=new h.Mesh(a,c);return p.name=`AxesDashedRing-${this.direction}-${r}`,p});this.add(...n),this.direction==="y"?this.rotateX(Math.PI/2):this.direction==="x"&&this.rotateY(-Math.PI/2)}}class B extends h.Mesh{constructor(e){var n;super();l(this,"direction");l(this,"baseAxes");switch(e.direction){case"x":this.baseAxes=new h.Vector3(0,0,1);break;case"y":this.baseAxes=new h.Vector3(1,0,0);break;case"z":this.baseAxes=new h.Vector3(1,0,0);break}const t=.3+5e-4;this.geometry=new h.CircleGeometry(t,48,0,1e-4),this.material=new h.MeshBasicMaterial({opacity:.4,color:(n=e.color)!=null?n:16777215,depthTest:!1,transparent:!0,side:h.DoubleSide}),this.direction=e.direction,this.direction==="y"?this.rotateX(Math.PI/2):this.direction==="x"&&this.rotateY(-Math.PI/2)}}function Re(){const o=R({width:"100%",height:"100%",left:"0",top:"0",position:"absolute",pointerEvents:"none"}),s=R({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"relative",display:"flex",alignItems:"center",justifyContent:"center"}),e=R({boxSizing:"border-box",width:"100%",height:"100%",left:"0",top:"0",position:"absolute",border:"1px solid rgba(255,255,255,0.4)"});o.appendChild(s),s.appendChild(e);const t="-4px",n={direction:"nesw",element:_({cursor:"nesw-resize",left:t,bottom:t})},i={direction:"ns",element:_({cursor:"ns-resize",bottom:t})},r={direction:"nwse",element:_({cursor:"nwse-resize",right:t,bottom:t})},a={direction:"ew",element:_({cursor:"ew-resize",right:t})},c={direction:"nesw",element:_({cursor:"nesw-resize",right:t,top:t})},p={direction:"ns",element:_({cursor:"ns-resize",top:t})},u={direction:"nwse",element:_({cursor:"nwse-resize",left:t,top:t})},g={direction:"ew",element:_({cursor:"ew-resize",left:t})};return new Array(i,a,p,g,n,r,c,u).forEach(m=>s.appendChild(m.element)),{container:o,squares:[n,i,r,a,c,p,u,g]}}function _(o){const s=R(v({background:"#FFFFFF",width:"9px",height:"9px",position:"absolute",pointerEvents:"none"},o)),e=R({width:"15px",height:"15px",position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"}),t=R({width:"15px",height:"15px",cursor:o==null?void 0:o.cursor,pointerEvents:"auto",background:"transparent"});return t.draggable=!0,e.appendChild(t),s.appendChild(e),s}class Ae extends Oe{constructor(e,t,n,i){super(e);l(this,"points",[]);l(this,"cornerPositions",[]);l(this,"css3DInstance");l(this,"plane");l(this,"css3DRenderer",new le.CSS3DRender);l(this,"camera");l(this,"scene");l(this,"container");l(this,"enabled",!1);this.camera=n,this.scene=i,this.container=t,this.initRectangleScaleHelper()}get helperObject(){var e;if(!((e=this.css3DInstance)!=null&&e.css3DObject))throw new Error("css3DInstance is not initialized");return this.css3DInstance.css3DObject}updatePosition(){var e;this.helperObject.position.copy(this.originObject3D.position),(e=this.plane)==null||e.position.copy(this.originObject3D.position)}updateQuaternion(){var e;(e=this.plane)==null||e.quaternion.copy(this.originObject3D.quaternion)}applyMatrix4(e){var t;super.applyMatrix4(e),this.helperObject.applyMatrix4(e),(t=this.plane)==null||t.applyMatrix4(e),this.cornerPositions.forEach(n=>n.applyMatrix4(e))}showDraggingHelper(){}applyHelperScaleMatrix4(e,t){var n;(n=this.plane)==null||n.scale.applyMatrix4(e),this.helperObject.applyScaleMatrix4(e)}updatePoints(){const e=this.calculatePointPosition(this.cornerPositions);this.points.forEach((t,n)=>{t.position.copy(e[n])})}applyHelperQuaternion(e,t){var i;const n=(i=this.css3DInstance)==null?void 0:i.css3DObject;if(n){const r=new h.Vector3().subVectors(n.position,t).applyQuaternion(e).add(t);n.position.copy(r),n.applyQuaternion(e)}if(this.plane){const r=new h.Vector3().subVectors(this.plane.position,t).applyQuaternion(e).add(t);this.plane.position.copy(r),this.plane.applyQuaternion(e)}this.cornerPositions.forEach(r=>{const a=new h.Vector3().subVectors(r,t).applyQuaternion(e).add(t);r.copy(a)})}enable(){var e;this.enabled||(this.enabled=!0,(e=this.css3DInstance)==null||e.enable(),this.plane&&this.scene.add(this.plane))}disable(){var e;!this.enabled||(this.enabled=!1,(e=this.css3DInstance)==null||e.disable(),this.plane&&this.scene.remove(this.plane))}show(){var e;(e=this.css3DInstance)==null||e.show(),this.plane&&(this.plane.visible=!0)}hide(){var e;(e=this.css3DInstance)==null||e.hide(),this.plane&&(this.plane.visible=!1)}dispose(){this.disable(),this.css3DRenderer.dispose()}initRectangleScaleHelper(){var u;const e=this.getCornerPositions();if(!e)return;this.cornerPositions=e;const t=this.css3DRenderer.create3DElement(this.camera,e,{ratio:.003});if(!t)return;this.css3DInstance=t,t.appendToElement(this.container);const n=t.css3DObject.container,{container:i,squares:r}=Re();this.points=r.map((g,d)=>({direction:g.direction,point:g.element,position:this.calculatePointPosition(e)[d]})),n.insertBefore(i,(u=n.children[0])!=null?u:null);const a=new h.PlaneGeometry(t.css3DObject.width,t.css3DObject.height),c=new h.MeshBasicMaterial({color:0,opacity:.15,transparent:!0,side:h.DoubleSide}),p=new h.Mesh(a,c);this.scene.add(p),this.updatePosition()}getCornerPositions(){const{originObject3D:e}=this;if(e instanceof ve.CSS3DObject){if(e.isCSS3DObjectPlus)return e.cornerPoints;console.error("\u6682\u65F6\u53EA\u652F\u6301 CSS3DRenderPlugin \u751F\u6210\u7684\u7269\u4F53")}else console.error("\u5F53\u524D\u7269\u4F53\u6682\u65F6\u4E0D\u652F\u6301 ScaleHelper")}calculatePointPosition(e){return[e[0].clone(),e[0].clone().add(e[1]).divideScalar(2),e[1].clone(),e[1].clone().add(e[2]).divideScalar(2),e[2].clone(),e[2].clone().add(e[3]).divideScalar(2),e[3].clone(),e[3].clone().add(e[0]).divideScalar(2)]}}new h.Vector3;function f(o,s){this._camera=o||null,this._domElement=s||document,this._raycaster=new h.Raycaster,this._selected=null,this._boundObjs={};var e=this;this._$onClick=function(){e._onClick.apply(e,arguments)},this._$onDblClick=function(){e._onDblClick.apply(e,arguments)},this._$onMouseMove=function(){e._onMouseMove.apply(e,arguments)},this._$onMouseDown=function(){e._onMouseDown.apply(e,arguments)},this._$onMouseUp=function(){e._onMouseUp.apply(e,arguments)},this._$onTouchMove=function(){e._onTouchMove.apply(e,arguments)},this._$onTouchStart=function(){e._onTouchStart.apply(e,arguments)},this._$onTouchEnd=function(){e._onTouchEnd.apply(e,arguments)},this._$onContextmenu=function(){e._onContextmenu.apply(e,arguments)},this._domElement.addEventListener("click",this._$onClick,!1),this._domElement.addEventListener("dblclick",this._$onDblClick,!1),this._domElement.addEventListener("mousemove",this._$onMouseMove,!1),this._domElement.addEventListener("mousedown",this._$onMouseDown,!1),this._domElement.addEventListener("mouseup",this._$onMouseUp,!1),this._domElement.addEventListener("touchmove",this._$onTouchMove,!1),this._domElement.addEventListener("touchstart",this._$onTouchStart,!1),this._domElement.addEventListener("touchend",this._$onTouchEnd,!1),this._domElement.addEventListener("contextmenu",this._$onContextmenu,!1)}f.prototype.destroy=function(){this._domElement.removeEventListener("click",this._$onClick,!1),this._domElement.removeEventListener("dblclick",this._$onDblClick,!1),this._domElement.removeEventListener("mousemove",this._$onMouseMove,!1),this._domElement.removeEventListener("mousedown",this._$onMouseDown,!1),this._domElement.removeEventListener("mouseup",this._$onMouseUp,!1),this._domElement.removeEventListener("touchmove",this._$onTouchMove,!1),this._domElement.removeEventListener("touchstart",this._$onTouchStart,!1),this._domElement.removeEventListener("touchend",this._$onTouchEnd,!1),this._domElement.removeEventListener("contextmenu",this._$onContextmenu,!1)};f.eventNames=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","contextmenu","touchstart","touchend"];f.prototype._getRelativeMouseXY=function(o){var s=o.target||o.srcElement;s.nodeType===3&&(s=s.parentNode);var e={x:0,y:0},t=s,n=getComputedStyle(t,null);e.y+=parseInt(n.getPropertyValue("padding-top"),10),e.x+=parseInt(n.getPropertyValue("padding-left"),10);do e.x+=t.offsetLeft,e.y+=t.offsetTop,n=getComputedStyle(t,null),e.x+=parseInt(n.getPropertyValue("border-left-width"),10),e.y+=parseInt(n.getPropertyValue("border-top-width"),10);while(t=t.offsetParent);var i={width:s===window?window.innerWidth:s.offsetWidth,height:s===window?window.innerHeight:s.offsetHeight};return{x:Number((o.pageX-e.x)/i.width)*2-1,y:-((o.pageY-e.y)/i.height)*2+1}};f.prototype._objectCtxInit=function(o){o._3xDomEvent={}};f.prototype._objectCtxDeinit=function(o){delete o._3xDomEvent};f.prototype._objectCtxIsInit=function(o){return!!o._3xDomEvent};f.prototype._objectCtxGet=function(o){return o._3xDomEvent};f.prototype.camera=function(o){return o&&(this._camera=o),this._camera};f.prototype.bind=function(o,s,e,t){console.assert(f.eventNames.indexOf(s)!==-1,"not available events:"+s),this._objectCtxIsInit(o)||this._objectCtxInit(o);var n=this._objectCtxGet(o);n[s+"Handlers"]||(n[s+"Handlers"]=[]),n[s+"Handlers"].push({callback:e,useCapture:t}),this._boundObjs[s]===void 0&&(this._boundObjs[s]=[]),this._boundObjs[s].push(o)};f.prototype.addEventListener=f.prototype.bind;f.prototype.unbind=function(o,s,e,t){console.assert(f.eventNames.indexOf(s)!==-1,"not available events:"+s),this._objectCtxIsInit(o)||this._objectCtxInit(o);var n=this._objectCtxGet(o);n[s+"Handlers"]||(n[s+"Handlers"]=[]);for(var i=n[s+"Handlers"],r=0;r<i.length;r++){var a=i[r];if(e==a.callback&&t==a.useCapture){i.splice(r,1);break}}var c=this._boundObjs[s].indexOf(o);console.assert(c!==-1),this._boundObjs[s].splice(c,1)};f.prototype.removeEventListener=f.prototype.unbind;f.prototype._bound=function(o,s){var e=this._objectCtxGet(s);return e?!!e[o+"Handlers"]:!1};f.prototype._onMove=function(o,s,e,t){var n=this._boundObjs[o];if(!(n===void 0||n.length===0)){var i=new h.Vector2;i.set(s,e),this._raycaster.setFromCamera(i,this._camera);var r=this._raycaster.intersectObjects(n),a=this._selected;if(r.length>0){var c,p,u,g=r[0],d=g.object;this._selected=d,u=this._bound("mousemove",d),a!=d&&(c=this._bound("mouseover",d),p=a&&this._bound("mouseout",a))}else p=a&&this._bound("mouseout",a),this._selected=null;u&&this._notify("mousemove",d,t,g),c&&this._notify("mouseover",d,t,g),p&&this._notify("mouseout",a,t,g)}};f.prototype._onEvent=function(o,s,e,t){var n=this._boundObjs[o];if(!(n===void 0||n.length===0)){var i=new h.Vector2;i.set(s,e),this._raycaster.setFromCamera(i,this._camera);var r=this._raycaster.intersectObjects(n,!0);if(r.length!==0){for(var a=r[0],c=a.object,p=this._objectCtxGet(c),u=c.parent;typeof p=="undefined"&&u;)p=this._objectCtxGet(u),u=u.parent;!p||this._notify(o,c,t,a)}}};f.prototype._notify=function(o,s,e,t){var n=this._objectCtxGet(s),i=n?n[o+"Handlers"]:null;if(console.assert(arguments.length===4),!n||!i||i.length===0){s.parent&&this._notify(o,s.parent,e,t);return}for(var i=n[o+"Handlers"],r=0;r<i.length;r++){var a=i[r],c=!0;a.callback({type:o,target:s,origDomEvent:e,intersect:t,stopPropagation:function(){c=!1}}),!!c&&a.useCapture===!1&&s.parent&&this._notify(o,s.parent,e,t)}};f.prototype._onMouseDown=function(o){return this._onMouseEvent("mousedown",o)};f.prototype._onMouseUp=function(o){return this._onMouseEvent("mouseup",o)};f.prototype._onMouseEvent=function(o,s){var e=this._getRelativeMouseXY(s);this._onEvent(o,e.x,e.y,s)};f.prototype._onMouseMove=function(o){var s=this._getRelativeMouseXY(o);this._onMove("mousemove",s.x,s.y,o),this._onMove("mouseover",s.x,s.y,o),this._onMove("mouseout",s.x,s.y,o)};f.prototype._onClick=function(o){this._onMouseEvent("click",o)};f.prototype._onDblClick=function(o){this._onMouseEvent("dblclick",o)};f.prototype._onContextmenu=function(o){this._onMouseEvent("contextmenu",o)};f.prototype._onTouchStart=function(o){return this._onTouchEvent("touchstart",o)};f.prototype._onTouchEnd=function(o){return this._onTouchEvent("touchend",o)};f.prototype._onTouchMove=function(o){if(o.touches.length==1){o.preventDefault();var s=Number(o.touches[0].pageX/window.innerWidth)*2-1,e=-(o.touches[0].pageY/window.innerHeight)*2+1;this._onMove("mousemove",s,e,o),this._onMove("mouseover",s,e,o),this._onMove("mouseout",s,e,o)}};f.prototype._onTouchEvent=function(o,s){if(s.touches.length==1){s.preventDefault();var e=Number(s.touches[0].pageX/window.innerWidth)*2-1,t=-(s.touches[0].pageY/window.innerHeight)*2+1;this._onEvent(o,e,t,s)}};let P=null;class J{constructor(s,e,t,n,i,r,a){l(this,"hooks",new ce.Subscribe);l(this,"helperObject3D");l(this,"originObject3D");l(this,"camera");l(this,"model");l(this,"scene");l(this,"container");l(this,"domEvents");l(this,"isDragging",!1);l(this,"onRender");l(this,"enabled",!1);l(this,"onWantsTapGesture",s=>{if(this.getIntersectObject(s))return!1});this.camera=s,this.model=e,this.originObject3D=t,this.helperObject3D=n,this.container=i,this.scene=r,this.domEvents=new f(s,i),this.onRender=a!=null?a:()=>{},this.initialHelperPosition(),this.initialHelperQuaternion(),this.enable()}initialHelperPosition(){this.helperObject3D.updatePosition()}initialHelperQuaternion(){this.helperObject3D.updateQuaternion()}enable(){this.enabled||(this.enabled=!0,this.scene.add(this.helperObject3D),this.render())}disable(){!this.enabled||(this.enabled=!1,this.scene.remove(this.helperObject3D),this.render())}show(){this.helperObject3D.show(),this.render()}hide(){this.helperObject3D.hide(),this.render()}dispose(){this.helperObject3D.dispose(),this.scene.remove(this.helperObject3D),this.render()}setOpacity(s){this.setOriginOpacityProperty();const e=this.originObject3D;if(e instanceof h.Mesh&&(e.material.opacity=s),e.isCSS3DObjectPlus){const t=e;t.container.style.opacity=s.toString()}this.render()}restoreOpacity(){if(P===null)return;const s=this.originObject3D;if(s instanceof h.Mesh&&(s.material.opacity=P.opacity),s.isCSS3DObjectPlus){const e=s;e.container.style.opacity=P.opacity.toString()}this.render()}setOriginOpacityProperty(){var s,e;if(P===null){const t=this.originObject3D;t instanceof h.Mesh&&(P={opacity:t.material.opacity}),t instanceof le.CSS3DObjectPlus&&(P={opacity:(s=t.container.style.opacity)!=null?s:1}),t.isCSS3DObjectPlus&&(P={opacity:Number((e=t.container.style.opacity)!=null?e:1)})}}updateHelperPosition(){this.helperObject3D.updatePosition()}updateHelperQuaternion(){this.helperObject3D.updateQuaternion()}applyHelperMatrix4(s){this.helperObject3D.applyMatrix4(s)}applyHelperQuaternion(s,e){this.helperObject3D.applyHelperQuaternion(s,e)}applyHelperScaleMatrix4(s,e){this.helperObject3D.applyHelperScaleMatrix4(s,e)}onWantsGesture(s,e,t){if(this.isDragging)return!1}render(){this.onRender()}hoverListener(s,e=16777215,t=1){const n=(Array.isArray(s)?s:[s]).filter(we.notNil),i=[];for(const r of n)if(r instanceof h.Mesh||r instanceof h.Group){const a=r instanceof h.Group?r.children.filter(d=>d instanceof h.Mesh):[r];a.forEach(d=>{d.__originalColor__=d.material.color.clone(),d.__originalOpacity__=d.material.opacity});const c=()=>{a.forEach(d=>{d.material.color.set(e),d.material.opacity=t}),this.render()},p=()=>{a.forEach(d=>{d.material.color.copy(d.__originalColor__),d.material.opacity=d.__originalOpacity__}),this.render()},u=()=>{this.isDragging||c()},g=()=>{this.isDragging||p()};for(const d of a)this.domEvents.addEventListener(d,"mouseover",u),this.domEvents.addEventListener(d,"mouseout",g),this.hooks.on("moveStart",c),this.hooks.on("moveEnd",p),this.hooks.on("rotateEnd",p),i.push(()=>{this.domEvents.removeEventListener(d,"mouseover",u),this.domEvents.removeEventListener(d,"mouseout",g),this.hooks.off("moveStart",c),this.hooks.off("moveEnd",p),this.hooks.off("rotateEnd",p)})}return()=>i.forEach(r=>r==null?void 0:r())}getIntersectObject(s){const e=this.camera.position,t=this.helperObject3D;if(!t)return;let n;const i=s.intersectObject(t,!0)[0];if(!!i&&(n=i,n.object=t,!!n)){if(this.model.intersectRaycaster){const r=this.model.intersectRaycaster(s)[0];if(r&&r.point.distanceTo(e)<n.point.distanceTo(e))return}return n.object}}}class ke extends J{constructor(...e){super(...e);l(this,"startInfo");const t=this.helperObject3D;this.hoverListener([t.xArrow,t.yArrow,t.zArrow]);const n=this.dragStart.bind(this),i=this.dragging.bind(this),r=this.dragEnd.bind(this);this.domEvents.addEventListener(this.helperObject3D,"mousedown",n),document.addEventListener("mousemove",i),document.addEventListener("mouseup",r)}dragStart(e){if(this.isDragging)return;const t=e==null?void 0:e.intersect;if(!t)return this.dragEnd();const n=(t==null?void 0:t.object).direction;if(!n)return this.dragEnd();const i=new h.Vector3(1,0,0).applyQuaternion(this.helperObject3D.quaternion),r=new h.Vector3(0,1,0).applyQuaternion(this.helperObject3D.quaternion),a=new h.Vector3(0,0,1).applyQuaternion(this.helperObject3D.quaternion),c=(()=>{switch(n){case"x":return i;case"y":return r;case"z":return a}})(),p=(()=>{switch(n){case"x":case"y":return a;case"z":return i}})(),u=t.point.clone(),g=new h.Plane;g.setFromNormalAndCoplanarPoint(p,u),this.startInfo={startVectorProject:u.clone().projectOnVector(c),directionVector:c,plane:g},this.helperObject3D.showDraggingHelper([n]),this.hooks.emit("moveStart"),this.isDragging=!0,console.log("%c MoveController dragStart","color: #e5af2e")}dragging(e){if(!this.isDragging||!this.startInfo)return;const t=Z(this.camera,e,this.container);return t?(console.log("%c RotateController dragging","color: #49de1b"),this.move(t),!1):this.dragEnd()}move(e){if(!this.startInfo)return this.dragEnd();const{plane:t,directionVector:n,startVectorProject:i}=this.startInfo,r=this.originObject3D,a=e.ray.intersectPlane(t,new h.Vector3);if(!a)return;const c=a.clone().projectOnVector(n),p=c.clone().sub(i),u=new h.Matrix4;u.setPosition(p),r.applyMatrix4(u),this.helperObject3D.applyMatrix4(u),i.copy(c),this.hooks.emit("positionUpdate",{matrix4:u})}dragEnd(){!this.isDragging||(console.log("%c MoveController dragEnd","color: #e94e4e"),this.startInfo=void 0,this.isDragging=!1,this.helperObject3D.show(),this.hooks.emit("moveEnd"))}}class Y{constructor(s,e,t,n){l(this,"helperController");l(this,"five");l(this,"onFiveWantsTapGesture",s=>{if(!this.helperController)return;const e=this.helperController.onWantsTapGesture(s);return this.five.needsRender=!0,e});l(this,"onFiveWantsGesture",(...s)=>{if(!this.helperController)return;const e=this.helperController.onWantsGesture(...s);return this.five.needsRender=!0,e});const{camera:i,model:r,scene:a}=s,c=s.getElement();if(this.five=s,!i||!r||!c||!a)return;const p=()=>{s.needsRender=!0};this.helperController=new e(i,r,t,n,c,a,p),s.on("wantsTapGesture",this.onFiveWantsTapGesture),s.on("wantsGesture",this.onFiveWantsGesture)}}const Le="v1.0.1",Ve="Object3DHelper",K=`${Ve}@${Le}`,ze=()=>{console.error(`${K} is disposed`)},Te=()=>{console.warn(`${K} is disabled`)},$e=()=>{console.error(`${K} is disabled`)};class Qe{constructor(s,e){l(this,"controllers",{});l(this,"state",{visible:!0,enabled:!0,disposed:!1});l(this,"hooks",new ce.Subscribe);l(this,"helpers");l(this,"eventListener",{});l(this,"handlePositionUpdate",(s,...e)=>{var i,r,a,c;const[t]=e,n=t==null?void 0:t.matrix4;n&&(s!==this.controllers.moveController&&((i=this.controllers.moveController)==null||i.applyHelperMatrix4(n)),s!==this.controllers.rotateController&&((r=this.controllers.rotateController)==null||r.applyHelperMatrix4(n)),s!==this.controllers.scaleController&&((a=this.controllers.scaleController)==null||a.applyHelperMatrix4(n)),(c=this.helpers.outlineHelper)==null||c.applyMatrix4(n))});l(this,"handleScaleUpdate",(s,...e)=>{var i,r;const[t]=e,n=t==null?void 0:t.matrix4;n&&((i=this.controllers.scaleController)==null||i.applyHelperScaleMatrix4(n,t),(r=this.helpers.outlineHelper)==null||r.scale.applyMatrix4(n))});l(this,"handleRotateUpdate",(s,...e)=>{var n,i,r,a;const[t]=e;if(t){const{quaternion:c,origin:p}=t;c&&(s!==this.controllers.moveController&&((n=this.controllers.moveController)==null||n.applyHelperQuaternion(c,p)),s!==this.controllers.rotateController&&((i=this.controllers.rotateController)==null||i.applyHelperQuaternion(c,p)),s!==this.controllers.scaleController&&((r=this.controllers.scaleController)==null||r.applyHelperQuaternion(c,p)),(a=this.helpers.outlineHelper)==null||a.applyQuaternion(c))}});s&&this.addControllers(s),this.helpers=e!=null?e:{},this.setState(this.state)}show(s){return A(this,null,function*(){this.setState({visible:!0},s)})}hide(s){return A(this,null,function*(){this.setState({visible:!1},s)})}enable(s){this.setState({enabled:!0},s)}disable(s){this.setState({enabled:!1},s)}dispose(){this.setState({disposed:!0})}setState(s,e){if(this.state.disposed)return ze();if(!this.state.enabled&&s.enabled!==!0&&s.disposed!==!0)return $e();const t=v({},this.state);this.state=v(v({},this.state),s),s.disposed!==void 0&&s.disposed!==t.disposed&&s.disposed&&this.handleDispose(),s.visible!==void 0&&this.handleVisible(s.visible),s.enabled!==void 0&&this.handleEnable(s.enabled),this.hooks.emit("stateChange",{state:this.state,prevState:t})}addControllers(s){this.controllers=v(v({},this.controllers),s),this.addEventListener(),this.setState(this.state)}addHelpers(s){this.helpers=v(v({},this.helpers),s)}getCurrentState(){return this.state}addEventListener(){for(const s in this.controllers){if(!s)continue;const e=s;this.eventListener[e]||(this.eventListener[e]=(()=>{const t=this.controllers[e];if(!t)return;const n=()=>this.handleStart(t),i=()=>this.handleEnd(t),r=(...p)=>this.handlePositionUpdate(t,...p),a=(...p)=>this.handleRotateUpdate(t,...p),c=(...p)=>this.handleScaleUpdate(t,...p);return t.hooks.on("moveStart",n),t.hooks.on("rotateStart",n),t.hooks.on("scaleStart",n),t.hooks.on("positionUpdate",r),t.hooks.on("rotateUpdate",a),t.hooks.on("scaleUpdate",c),t.hooks.on("moveEnd",i),t.hooks.on("rotateEnd",i),t.hooks.on("scaleEnd",i),()=>{t.hooks.off("moveStart",n),t.hooks.off("rotateStart",n),t.hooks.off("scaleStart",n),t.hooks.off("positionUpdate",r),t.hooks.off("rotateUpdate",a),t.hooks.off("scaleUpdate",c),t.hooks.off("moveEnd",i),t.hooks.off("rotateEnd",i),t.hooks.off("scaleEnd",i)}})())}}handleEnd(s){s&&this.setOtherHelpersVisible(!0,s)}handleStart(s){s&&this.setOtherHelpersVisible(!1,s)}setOtherHelpersVisible(s,e){var t,n,i,r;s?((i=this.controllers.moveController)==null||i.helperObject3D.show(),(r=this.controllers.rotateController)==null||r.helperObject3D.show()):(e!==this.controllers.moveController&&((t=this.controllers.moveController)==null||t.helperObject3D.hide()),e!==this.controllers.rotateController&&((n=this.controllers.rotateController)==null||n.helperObject3D.hide()))}handleEnable(s,e=!0){s?(this.everyControllerDo(t=>{t.enable()}),this.hooks.emit("enable",{userAction:e})):(this.everyControllerDo(t=>{t.disable(),t.restoreOpacity()}),this.hooks.emit("disable",{userAction:e})),this.state.enabled=s}handleVisible(s,e=!0){s?(this.everyControllerDo(t=>{t.show()}),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:e}))):(this.everyControllerDo(t=>{t.hide(),t.restoreOpacity()}),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:e}))),this.state.visible=s}everyControllerDo(s){Object.values(this.controllers).forEach(e=>{e&&s(e)})}handleDispose(){var s,e;Object.values(this.controllers).forEach(t=>{t==null||t.dispose(),t==null||t.restoreOpacity()});for(const t in this.controllers){if(!t)continue;const n=t;(e=(s=this.eventListener)[n])==null||e.call(s)}}actionIfStateIsEnabled(s,e){if(this.state.enabled)return s();e!=null&&e.warnLog&&Te()}}class Ge extends J{constructor(...e){super(...e);l(this,"startInfo");l(this,"lastRotation");l(this,"rotations",[]);l(this,"helperObject3DQuaternion",this.originObject3D.quaternion.clone());const t=this.helperObject3D;this.hoverListener([t.xyCircle,t.xzCircle,t.yzCircle]);const n=this.dragStart.bind(this),i=this.dragging.bind(this),r=this.dragEnd.bind(this);this.domEvents.addEventListener(this.helperObject3D,"mousedown",n),document.addEventListener("mousemove",i),document.addEventListener("mouseup",r)}initialHelperQuaternion(){this.helperObject3D.updateAngleHelperQuaternion(),this.helperObject3D.applyHelperQuaternion(this.originObject3D.quaternion)}dragStart(e){if(this.isDragging)return;const t=e==null?void 0:e.intersect;if(!t)return this.dragEnd();const n=(t==null?void 0:t.object).direction;if(!n)return this.dragEnd();this.helperObject3D.updateAngleHelperQuaternion();const i=t.point,r=this.originObject3D.position.clone(),a=this.getAngleHelper(n);this.setTipsAngle(0);const c=i.clone();c.y+=.2,this.setTipsPosition(c);const p=new h.Vector3(1,0,0).applyQuaternion(this.helperObject3DQuaternion),u=new h.Vector3(0,1,0).applyQuaternion(this.helperObject3DQuaternion),g=new h.Vector3(0,0,1).applyQuaternion(this.helperObject3DQuaternion),d=(()=>{switch(n){case"x":return p;case"y":return u;case"z":return g}})(),m=new h.Plane().setFromNormalAndCoplanarPoint(d,i),x=new h.Vector3;m.projectPoint(i.clone(),x);const w=x.clone().sub(r),H=w.clone(),D=w.angleTo(a.baseAxes);this.setAngleHelperStart(n,D),this.setAngleHelperLength(n,0),this.rotations.push({vector:w.clone(),direction:!0}),this.startInfo={direction:n,startVector:w,staticStartVector:H,plane:m,angleHelper:a},this.helperObject3D.showDraggingHelper([n]),this.hooks.emit("rotateStart"),this.isDragging=!0,console.log(`%c RotateController dragStart ${n}`,"color: #e5af2e")}dragging(e){var n;if(!this.isDragging)return;const t=Z(this.camera,e,this.container);return t?(console.log(`%c RotateController dragging ${(n=this.startInfo)==null?void 0:n.direction}`,"color: #49de1b"),this.rotate(t),!1):this.dragEnd()}rotate(e){if(!this.startInfo)return this.dragEnd();const{startVector:t,plane:n,angleHelper:i,staticStartVector:r,direction:a}=this.startInfo,c=this.originObject3D,p=e.ray.intersectPlane(n,new h.Vector3);if(!p)return;const u=c.position.clone(),g=new h.Vector3;n.projectPoint(p.clone(),g);const d=g.clone().sub(u);if(t.angleTo(d)===0||(this.lastRotation===void 0&&(this.lastRotation={angle:0}),this.rotations.length===0))return;const m=(()=>{if(this.rotations.length===1)return d.angleTo(i.baseAxes)>r.angleTo(i.baseAxes);{const w=this.rotations[this.rotations.length-1],H=this.rotations[this.rotations.length-2],D=d.angleTo(H.vector),S=d.angleTo(w.vector),M=w.vector.angleTo(H.vector);if(M===0||S===0||D===0)return;if(D>S&&D>M)return w.direction;if(D<M&&S<M||D<S&&S>M)return!w.direction}})();if(m===void 0)return console.warn("rotationDirection is undefined");this.rotations.push({vector:d,direction:m}),this.rotations=this.rotations.slice(-2),this.lastRotation.angle=this.lastRotation.angle+d.angleTo(t)*(m?1:-1),this.setAngleHelperLength(a,this.lastRotation.angle),this.setTipsAngle(this.lastRotation.angle/Math.PI*180);const x=new h.Quaternion().setFromUnitVectors(t.clone().normalize(),d.clone().normalize());c.applyQuaternion(x),this.helperObject3D.applyHelperQuaternion(x),this.helperObject3DQuaternion.premultiply(x),this.hooks.emit("rotateUpdate",{quaternion:x,origin:u}),this.startInfo.startVector=d}dragEnd(){!this.isDragging||(console.log("%c RotateController dragEnd","color: #e94e4e"),this.startInfo=void 0,this.isDragging=!1,this.lastRotation=void 0,this.rotations=[],this.helperObject3D.show(),this.hooks.emit("rotateEnd"))}getAngleHelper(e){switch(e){case"x":return this.helperObject3D.xAngleHelper;case"y":return this.helperObject3D.yAngleHelper;case"z":return this.helperObject3D.zAngleHelper}}setAngleHelperStart(e,t){const n=this.getAngleHelper(e);if(n instanceof h.Mesh&&n.geometry instanceof h.CircleGeometry){const{radius:i,segments:r,thetaLength:a}=n.geometry.parameters;n.geometry=new h.CircleGeometry(i,r,t,a)}else console.warn("only support THREE.CircleGeometry")}setAngleHelperLength(e,t){const i=t>=0?Math.max(t,.001):Math.min(t,-.001),r=this.getAngleHelper(e);if(r instanceof h.Mesh&&r.geometry instanceof h.CircleGeometry){const{radius:a,thetaStart:c}=r.geometry.parameters,p=Math.ceil(Math.abs(i)*(40/(2*Math.PI)));r.geometry=new h.CircleGeometry(a,p,c,i)}else console.warn("only support THREE.CircleGeometry")}setTipsAngle(e){var n;const t=(n=this.helperObject3D.angleTips)==null?void 0:n.element;!t||(t.innerText=`${e.toFixed(0)}\xB0`)}setTipsPosition(e){const t=this.helperObject3D.angleTips;if(!t)return;const n=e.project(this.camera),{x:i,y:r,z:a}=n;if(a>1)return;const c=(i+1)/2*100+"%",p=(-r+1)/2*100+"%";t.setLeftTop(c,p)}}class qe extends J{constructor(...e){super(...e);l(this,"startInfo")}enable(){this.helperObject3D.enable(),super.enable()}disable(){this.helperObject3D.disable(),super.disable()}show(){this.helperObject3D.show(),super.show()}hide(){this.helperObject3D.hide(),super.hide()}getDragPlane(){const e=new h.Plane,t=this.helperObject3D.cornerPositions;if(t.length!==0)return t.length<3?e.setFromNormalAndCoplanarPoint(this.originObject3D.getWorldDirection(new y.Vector3),t[0]):e.setFromCoplanarPoints(t[0],t[1],t[2]),e}dragStart(e,t){var i,r;(r=(i=this.helperObject3D).updatePoints)==null||r.call(i);const n=this.getDragPlane();if(!n)return this.dragEnd();this.startInfo={startPoint:{position:t.position.clone(),direction:t.direction},plane:n},this.hooks.emit("scaleStart"),this.render(),this.isDragging=!0,console.log("%c RectangleScaleController dragStart","color: #e5af2e")}dragging(e){if(!this.isDragging)return;const t=Z(this.camera,e,this.container);if(!t)return this.dragEnd();this.scale(t),console.log("%c RectangleScaleController dragging","color: #49de1b")}scale(e){var te,se;if(!this.startInfo)return;const t=this.originObject3D,{startPoint:n,plane:i}=this.startInfo,r=this.helperObject3D.cornerPositions;if(r.length<4)return this.dragEnd();const a=e.ray.intersectPlane(i,new y.Vector3);if(!a||He(a,this.camera.position))return;const c=new y.Vector3().addVectors(r[0],r[2]).divideScalar(2),{position:p,direction:u}=n,g=new y.Vector3().subVectors(r[1],r[0]),d=new y.Vector3().subVectors(r[3],r[0]),m=C=>{const j=new y.Vector3(0,0,0);if(!this.startInfo)return j;const b=(C==="ew"?g:d).clone(),E=p.clone().projectOnVector(b),L=a.clone().projectOnVector(b),ne=c.clone().projectOnVector(b);if(L.equals(E))return j;if(C==="ns"&&typeof this.startInfo.dragPointInCenterBottom!="boolean"){const I=new y.Vector3().subVectors(L,ne),T=I.x<0&&b.x>=0,$=I.y<0&&b.y>=0,Q=I.z<0&&b.z>=0;this.startInfo.dragPointInCenterBottom=T||$||Q}if(C==="ew"&&typeof this.startInfo.dragPointInCenterLeft!="boolean"){const I=new y.Vector3().subVectors(L,ne),T=I.x<0&&b.x>=0,$=I.y<0&&b.y>=0,Q=I.z<0&&b.z>=0;this.startInfo.dragPointInCenterLeft=T||$||Q}const oe=new y.Vector3().subVectors(L,E),re=oe.length();return re>.3?(console.warn("offset.length() > 0.3, skipped",re),j):oe},x=m("ew"),w=m("ns"),H=()=>{const C=x;this.helperObject3D.cornerPositions.forEach((j,b)=>{var E;(E=this.startInfo)!=null&&E.dragPointInCenterLeft?(b===0||b===3)&&j.add(C):(b===1||b===2)&&j.add(C)})},D=()=>{const C=w;this.helperObject3D.cornerPositions.forEach((j,b)=>{var E;(E=this.startInfo)!=null&&E.dragPointInCenterBottom?(b===0||b===1)&&j.add(C):(b===2||b===3)&&j.add(C)})};switch(u){case"ew":H();break;case"ns":D();break;case"nesw":case"nwse":H(),D()}const S=new y.Vector3().subVectors(r[1],r[0]).length()/g.length(),M=new y.Vector3().subVectors(r[3],r[0]).length()/d.length(),de=new y.Vector3(S,M,1),z=new h.Matrix4().scale(de);t.isCSS3DObjectPlus?t.applyScaleMatrix4(z):t.scale.applyMatrix4(z),n.position.copy(a);const ue=new y.Vector3().addVectors(r[0],r[2]).divideScalar(2),fe=new y.Vector3().subVectors(ue,c),k=new h.Matrix4().setPosition(fe);t.applyMatrix4(k),(te=this.helperObject3D.css3DInstance)==null||te.css3DObject.applyMatrix4(k),(se=this.helperObject3D.plane)==null||se.applyMatrix4(k),this.hooks.emit("scaleUpdate",{matrix4:z,helperOrigin:c}),this.hooks.emit("positionUpdate",{matrix4:k}),this.render()}dragEnd(){!this.isDragging||(this.startInfo=void 0,this.isDragging=!1,this.hooks.emit("scaleEnd"),this.render(),console.log("%c RectangleScaleController dragEnd","color: #e94e4e"))}}class Fe extends qe{constructor(...s){super(...s),this.addHTMLEventListener()}addHTMLEventListener(){this.helperObject3D.points.forEach(s=>{if(!s)return;const e=s.point,t=r=>this.dragStart(r,s),n=this.dragging.bind(this),i=this.dragEnd.bind(this);e.addEventListener("dragstart",t),e.addEventListener("drag",n),e.addEventListener("dragend",i)})}}const ee="v1.0.0",W="Object3DHelperPlugin",V=`${W}@${ee}`,Ue=()=>{console.error(`${V} is disposed`)},Xe=()=>{console.warn(`${V} is disabled`)},Be=()=>{console.error(`${V} is disabled`)};class he extends me.Controller{constructor(e){super(e);l(this,"version",ee);l(this,"name",W);l(this,"state",{visible:!0,enabled:!0,disposed:!1});l(this,"objectHelperMap",new Map);this.five=e,console.warn("Object3DHelper: \u4F7F\u7528\u6B64\u63D2\u4EF6\u9700\u8981\u5728\u521D\u59CB\u5316five\u65F6\uFF0C\u8BBE\u7F6Efive\u53C2\u6570: { backgroundAlpha: 0, backgroundColor: 0x000000 }"),Object.assign(window,{[`__${W.toUpperCase()}_DEBUG__`]:this})}show(e){return A(this,null,function*(){this.setState({visible:!0},e)})}hide(e){return A(this,null,function*(){this.setState({visible:!1},e)})}enable(e){this.setState({enabled:!0},e)}disable(e){this.setState({enabled:!1},e)}dispose(){this.setState({disposed:!0})}setState(e,t){if(this.state.disposed)return Ue();if(!this.state.enabled&&e.enabled!==!0&&e.disposed!==!0)return Be();const n=v({},this.state);this.state=v(v({},this.state),e),e.disposed!==void 0&&e.disposed!==n.disposed&&e.disposed&&this.handleDispose(),e.visible!==void 0&&e.visible!==n.visible&&this.handleVisible(e.visible),e.enabled!==void 0&&e.enabled!==n.enabled&&this.handleEnable(e.enabled),this.hooks.emit("stateChange",{state:this.state,prevState:n})}getObject3DHelper(e){return this.objectHelperMap.get(e)}addObject3DHelper(e,t={}){var u;if(!e)return console.error("Object3D is undefined");if(this.objectHelperMap.has(e)){console.warn(`Object3DHelperPlugin: object3D ${e.name} is already has helper`);return}const n=new Qe;this.objectHelperMap.set(e,n);const i=(u=this.five.getElement())==null?void 0:u.parentElement,r=this.five.camera,{moveHelper:a=!0,rotateHelper:c=!0,scaleHelper:p=!0}=t;if(a){const g=new Se(e),d=new Y(this.five,ke,e,g);n.addControllers({moveController:d.helperController})}if(c){let g;i&&r&&(g={container:i});const d=new Pe(e,g),m=new Y(this.five,Ge,e,d);n.addControllers({rotateController:m.helperController})}if(p&&i){const g=new Ae(e,i,r,this.five.scene),d=new Y(this.five,Fe,e,g);n.addControllers({scaleController:d.helperController})}e.isCSS3DObjectPlus&&e.changeMode("behind",this.five.scene)}removeObject3DHelper(e){const t=this.objectHelperMap.get(e);!t||(e.isCSS3DObjectPlus&&e.changeMode("front"),this.objectHelperMap.delete(e),t.dispose())}handleEnable(e,t=!0){e?(this.everyHelperDo(n=>n.enable()),this.hooks.emit("enable",{userAction:t})):(this.everyHelperDo(n=>n.disable()),this.hooks.emit("disable",{userAction:t})),this.state.enabled=e}handleVisible(e,t=!0){e?(this.everyHelperDo(n=>n.show()),this.actionIfStateIsEnabled(()=>this.hooks.emit("show",{userAction:t}))):(this.everyHelperDo(n=>n.hide()),this.actionIfStateIsEnabled(()=>this.hooks.emit("hide",{userAction:t}))),this.state.visible=e}handleDispose(){this.everyHelperDo(e=>e.dispose())}everyHelperDo(e){this.objectHelperMap.forEach(t=>{t&&e(t)})}actionIfStateIsEnabled(e,t){if(this.state.enabled)return e();t!=null&&t.warnLog&&Xe()}}const pe=o=>new he(o);exports.Object3DHelperController=he;exports.Object3DHelperPlugin=pe;exports.PLUGIN=V;exports.VERSION=ee;exports.default=pe;
@@ -0,0 +1,258 @@
1
+ var D = Object.defineProperty;
2
+ var v = Object.getOwnPropertySymbols;
3
+ var E = Object.prototype.hasOwnProperty, B = Object.prototype.propertyIsEnumerable;
4
+ var A = (o, s, e) => s in o ? D(o, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[s] = e, m = (o, s) => {
5
+ for (var e in s || (s = {}))
6
+ E.call(s, e) && A(o, e, s[e]);
7
+ if (v)
8
+ for (var e of v(s))
9
+ B.call(s, e) && A(o, e, s[e]);
10
+ return o;
11
+ };
12
+ var r = (o, s, e) => (A(o, typeof s != "symbol" ? s + "" : s, e), e);
13
+ var d = (o, s, e) => new Promise((t, i) => {
14
+ var n = (c) => {
15
+ try {
16
+ l(e.next(c));
17
+ } catch (p) {
18
+ i(p);
19
+ }
20
+ }, a = (c) => {
21
+ try {
22
+ l(e.throw(c));
23
+ } catch (p) {
24
+ i(p);
25
+ }
26
+ }, l = (c) => c.done ? t(c.value) : Promise.resolve(c.value).then(n, a);
27
+ l((e = e.apply(o, s)).next());
28
+ });
29
+ import * as h from "three";
30
+ import { Five as M } from "@realsee/five";
31
+ import { Controller as k } from "../chunks/es/BasePluginWithData.4bf4e649.es.js";
32
+ import { CSS3DRenderPlugin as S } from "../CSS3DRenderPlugin/index..js";
33
+ import { tweenProgress as b } from "../chunks/es/index.b8fdb59b.es.js";
34
+ import "../chunks/es/BasePlugin.813e25f7.es.js";
35
+ import "../chunks/es/Subscribe.c73e0f91.es.js";
36
+ import "../chunks/es/CSS3DRender.5652510e.es.js";
37
+ import "three/examples/jsm/renderers/CSS3DRenderer";
38
+ import "@tweenjs/tween.js";
39
+ const Q = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZIAAABCCAYAAAB9y1BhAAAAAXNSR0IArs4c6QAADh5JREFUeAHtnVuPLDcVhedwC/dACKAICDxEIBQpygNI/Ab+MX8B8YCQEAjxgBAQLsm5Jjkn58r6Sl4jT52qnu4zXd121dqSx67q7ip7eXsv721XzcVFJAgEgSAQBIJAEAgCQeC4CLx48eKbSu+RH/fKuVoQWB8Cn1tfk9KiIHAUBH6tq/xKiTwSBILADgRCJDvAyUebRuAbpfXxSDatBmn8Pgh8YZ8v5TtBYIMIvFCbSZEgEASuQSBEcg1A+XizCDzfbMvT8CBwIAIhkgMBy9c3g0CIZDNdnYbeFIEQyU0RzO/XikCIZK09m3YdHYEQydEhzQVXgkCIZCUdmWYsj0CIZHmMc4c+EchCe5/9llqfAYEQyRlAzy27QCAeSRfdlEq2gECIpIVeSB1aRAAiudVixVKnINAaA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BAqhgEC9rDFGJI7FGJEcB4EgEASCQBAIAkEgCASBIBAEgkAQCAJBIAgEgSAQBIJAEAgCm0fg/x4jQQWGalpFAAAAAElFTkSuQmCC";
40
+ function R() {
41
+ const o = document.createElement("div"), s = document.createElement("i"), e = document.createElement("span");
42
+ return o.appendChild(s), o.appendChild(e), o.style.position = "relative", o.style.width = "100%", o.style.display = "flex", o.style.flexDirection = "column", o.style.alignItems = "center", o.style.marginTop = `${150 / 16}rem`, o.style.opacity = "0", o.style.transition = "opacity 1000ms linear", s.style.display = "block", s.style.width = `${134 / 16}rem`, s.style.height = `${22 / 16}rem`, s.style.backgroundSize = "100%", s.style.backgroundRepeat = "no-repeat", s.style.backgroundImage = `url(${Q})`, e.style.marginTop = `${10 / 16}rem`, e.style.fontSize = `${16 / 16}rem`, e.style.color = "#fff", e.style.opacity = "0.7", e.style.textShadow = "0 2px 16px rgb(22 34 83 / 24%)", e.style.fontWeight = "bold", {
43
+ appendTo(t) {
44
+ t.appendChild(o);
45
+ },
46
+ dispose() {
47
+ o.remove();
48
+ },
49
+ setRoom(t) {
50
+ e.innerHTML = t.name + " " + Math.floor(t.size / 1e6) + "\u33A1";
51
+ },
52
+ show() {
53
+ o.style.opacity = "1";
54
+ },
55
+ hide() {
56
+ o.style.opacity = "0";
57
+ }
58
+ };
59
+ }
60
+ const P = new h.TextureLoader();
61
+ function C(o) {
62
+ return d(this, null, function* () {
63
+ return new Promise((s, e) => {
64
+ P.load(o, s, void 0, e);
65
+ }).then((s) => (s.encoding = h.sRGBEncoding, s));
66
+ });
67
+ }
68
+ const f = { userAction: !0 };
69
+ class w extends k {
70
+ constructor(e, t) {
71
+ super(e);
72
+ r(this, "state", {
73
+ visible: !0,
74
+ enabled: !0,
75
+ config: {
76
+ compassImageUrl: "//vrlab-image4.ljcdn.com/release/web/v3/north-point-circle.96498e69.png",
77
+ entryDoorImageUrl: "//vrlab-image4.ljcdn.com/release/web/enterDoor.831b8208.png"
78
+ }
79
+ });
80
+ r(this, "data");
81
+ r(this, "group", new h.Group());
82
+ r(this, "roomInfoInstance");
83
+ r(this, "roomInfoWrapperInstance");
84
+ r(this, "compassMeshTween");
85
+ r(this, "compassMesh");
86
+ r(this, "entryDoorMesh");
87
+ r(this, "dispose", () => {
88
+ var e, t, i, n;
89
+ this.five.scene.remove(this.group), this.group.remove(...this.group.children), (t = (e = this.compassMesh) == null ? void 0 : e.material.map) == null || t.dispose(), (n = (i = this.entryDoorMesh) == null ? void 0 : i.material.map) == null || n.dispose(), this.five.off("dispose", this.dispose), this.five.off("panoArrived", this.onFivePanoArrived), this.five.off("panoWillArrive", this.onFivePanoWillArrive), this.five.off("cameraDirectionUpdate", this.onFiveCameraDirectionUpdate);
90
+ });
91
+ r(this, "_addEventListener", () => {
92
+ this.five.on("panoArrived", this.onFivePanoArrived), this.five.on("panoWillArrive", this.onFivePanoWillArrive), this.five.on("modeChange", this.onFiveModeChange), this.five.on("cameraDirectionUpdate", this.onFiveCameraDirectionUpdate);
93
+ });
94
+ r(this, "_removeEventListener", () => {
95
+ this.five.off("panoArrived", this.onFivePanoArrived), this.five.off("panoWillArrive", this.onFivePanoWillArrive), this.five.off("modeChange", this.onFiveModeChange), this.five.off("cameraDirectionUpdate", this.onFiveCameraDirectionUpdate);
96
+ });
97
+ r(this, "_enable", () => {
98
+ this.five.scene.add(this.group), this.init(), this.onFivePanoArrived(this.five.panoIndex || 0), this._addEventListener();
99
+ });
100
+ r(this, "_disable", () => {
101
+ this._clearCompassIfNeed(), this._clearEntryDoorIfNeed(), this.five.scene.remove(this.group), this._removeEventListener();
102
+ });
103
+ r(this, "_toggleVisible", () => {
104
+ this.group.visible = this.state.visible, this.five.needsRender = !0;
105
+ });
106
+ r(this, "_clearCompassIfNeed", () => {
107
+ var e;
108
+ this.compassMesh && (this.group.remove(this.compassMesh), (e = this.compassMesh.material.map) == null || e.dispose(), this.compassMesh = null);
109
+ });
110
+ r(this, "_clearEntryDoorIfNeed", () => {
111
+ var e;
112
+ this.entryDoorMesh && (this.group.remove(this.entryDoorMesh), (e = this.entryDoorMesh.material.map) == null || e.dispose(), this.entryDoorMesh = null), this.roomInfoInstance && (this.roomInfoInstance.dispose(), this.roomInfoInstance = null), this.roomInfoWrapperInstance && (this.roomInfoWrapperInstance.dispose(), this.roomInfoWrapperInstance = null);
113
+ });
114
+ r(this, "onFivePanoWillArrive", (e) => {
115
+ var t, i;
116
+ e !== this.five.panoIndex && ((t = this.compassMeshTween) == null || t.dispose(), (i = this.compassMesh) == null || i.material.setValues({ opacity: 0 }));
117
+ });
118
+ r(this, "onFivePanoArrived", (e) => {
119
+ var i, n, a, l, c, p, g;
120
+ const t = (a = (n = (i = this.five.work) == null ? void 0 : i.observers) == null ? void 0 : n[e]) == null ? void 0 : a.standingPosition;
121
+ if (this.compassMesh && (this.compassMesh.position.copy(t.clone().setY(t.y + 0.01)), this.compassMesh.material.opacity === 0 && ((l = this.compassMeshTween) == null || l.dispose(), this.compassMeshTween = b(1e3).onUpdate(({ progress: y }) => {
122
+ var I;
123
+ (I = this.compassMesh) == null || I.material.setValues({ opacity: y }), this.five.needsRender = !0;
124
+ }).play())), this.entryDoorMesh) {
125
+ const I = new h.Vector3(
126
+ this.data.entrance.position.x,
127
+ this.data.entrance.position.y,
128
+ this.data.entrance.position.z
129
+ ).clone().setY(t.y).sub(t).normalize(), u = t.clone().add(I.clone().multiplyScalar(0.7)).setY(t.y + 0.01);
130
+ this.entryDoorMesh.rotation.z = new h.Vector3(0, 0, -1).angleTo(I), this.entryDoorMesh.position.copy(u), ((c = this.data) == null ? void 0 : c.room_observers[e].room.type) === 1 ? (p = this.entryDoorMesh) == null || p.material.setValues({ opacity: 1 }) : (g = this.entryDoorMesh) == null || g.material.setValues({ opacity: 0 });
131
+ }
132
+ this.roomInfoInstance && this.roomInfoWrapperInstance && (this.roomInfoWrapperInstance.css3DObject.position.copy(
133
+ t.clone().setY(t.y + 0.01)
134
+ ), this.roomInfoInstance.setRoom(this.data.room_observers[e].room)), this.five.needsRender = !0;
135
+ });
136
+ r(this, "onFiveCameraDirectionUpdate", ({
137
+ longitude: e,
138
+ latitude: t
139
+ }) => {
140
+ var i, n;
141
+ !this.roomInfoWrapperInstance || (this.roomInfoWrapperInstance.css3DObject.rotation.z = e, t > 0.66 && this.five.getCurrentState().mode === "Panorama" ? (i = this.roomInfoInstance) == null || i.show() : (n = this.roomInfoInstance) == null || n.hide());
142
+ });
143
+ r(this, "onFiveModeChange", (e, t, i, n, a) => {
144
+ e !== t && this.setState(
145
+ {
146
+ visible: e === M.Mode.Panorama
147
+ },
148
+ { userAction: a }
149
+ );
150
+ });
151
+ this.five.scene.add(this.group), this.five.once("dispose", this.dispose), this.setState({
152
+ visible: !0,
153
+ enabled: !0,
154
+ config: m(m({}, this.state.config), t || {})
155
+ });
156
+ }
157
+ enable(e = f) {
158
+ this.setState(
159
+ {
160
+ enabled: !0
161
+ },
162
+ e
163
+ );
164
+ }
165
+ disable(e = f) {
166
+ this.setState(
167
+ {
168
+ enabled: !1
169
+ },
170
+ e
171
+ );
172
+ }
173
+ show(e = f) {
174
+ if (!!this.state.enabled)
175
+ return this.setState(
176
+ {
177
+ visible: !0
178
+ },
179
+ e
180
+ ), Promise.resolve();
181
+ }
182
+ hide(e = f) {
183
+ if (!!this.state.enabled)
184
+ return this.setState(
185
+ {
186
+ visible: !1
187
+ },
188
+ e
189
+ ), Promise.resolve();
190
+ }
191
+ setState(e, t = { userAction: !0 }) {
192
+ var n, a;
193
+ const i = JSON.parse(JSON.stringify(this.state));
194
+ this.state = {
195
+ visible: (n = e.visible) != null ? n : i.visible,
196
+ enabled: (a = e.enabled) != null ? a : i.enabled,
197
+ config: m(m({}, i.config), e.config || {})
198
+ }, this.hooks.emit("stateChange", {
199
+ state: this.state,
200
+ prevState: i,
201
+ userAction: t.userAction
202
+ }), e.enabled === !0 && (this._enable(), this.hooks.emit("enable", t)), e.enabled === !1 && (this._disable(), this.hooks.emit("disable", t)), e.visible === !1 && (this._toggleVisible(), this.hooks.emit("hide", t)), e.visible === !0 && (this._toggleVisible(), this.hooks.emit("show", t)), e.config && this.init();
203
+ }
204
+ load(e, t, i = !0) {
205
+ return d(this, null, function* () {
206
+ const n = yield this.formatData(e);
207
+ JSON.stringify(this.data) !== JSON.stringify(n) && (this.hooks.emit("dataChange", n, this.data), this.data = m({}, n), this.init(), t && this.setState(t, { userAction: i }), this.hooks.emit("dataLoaded", this.data));
208
+ });
209
+ }
210
+ formatData(e) {
211
+ return e.version && e.data ? Promise.resolve(e.data) : Promise.resolve(e);
212
+ }
213
+ init() {
214
+ return d(this, null, function* () {
215
+ var i, n, a, l;
216
+ const e = (n = (i = this.data) == null ? void 0 : i.north_rad) != null ? n : null;
217
+ this._clearCompassIfNeed(), e !== null && (this.compassMesh = yield this.loadCompassMesh(), this.compassMesh.rotateX(-Math.PI / 2), this.compassMesh.rotateZ(e - Math.PI / 2), this.group.add(this.compassMesh));
218
+ const t = (l = (a = this.data) == null ? void 0 : a.entrance) != null ? l : null;
219
+ this._clearEntryDoorIfNeed(), t !== null && (this.entryDoorMesh = yield this.loadEntryDoorMesh(), this.roomInfoWrapperInstance = this.loadRoomInfo(), this.roomInfoInstance = R(), this.entryDoorMesh.rotateX(-Math.PI / 2), this.roomInfoWrapperInstance && this.roomInfoInstance.appendTo(this.roomInfoWrapperInstance.container), this.group.add(this.entryDoorMesh)), this.onFivePanoArrived(this.five.panoIndex || 0), this.five.needsRender = !0;
220
+ });
221
+ }
222
+ loadCompassMesh() {
223
+ return d(this, null, function* () {
224
+ const e = this.state.config.compassImageUrl, t = yield C(e), i = new h.CircleGeometry(0.7, 32), n = new h.MeshBasicMaterial({
225
+ map: t,
226
+ transparent: !0,
227
+ opacity: 0,
228
+ depthTest: !1
229
+ }), a = new h.Mesh(i, n);
230
+ return a.name = "pano-compass-mesh", a;
231
+ });
232
+ }
233
+ loadEntryDoorMesh() {
234
+ return d(this, null, function* () {
235
+ const e = this.state.config.entryDoorImageUrl, t = yield C(e), i = new h.PlaneGeometry(0.2, 0.16), n = new h.MeshBasicMaterial({
236
+ map: t,
237
+ transparent: !0,
238
+ opacity: 0.8,
239
+ depthTest: !1
240
+ }), a = new h.Mesh(i, n);
241
+ return a.name = "pano-compass-entry-door", a;
242
+ });
243
+ }
244
+ loadRoomInfo() {
245
+ const e = [
246
+ new h.Vector3(-0.7, 0, -0.7),
247
+ new h.Vector3(0.7, 0, -0.7),
248
+ new h.Vector3(0.7, 0, 0.7),
249
+ new h.Vector3(-0.7, 0, 0.7)
250
+ ];
251
+ return S(this.five).create3DDomContainer(e);
252
+ }
253
+ }
254
+ const K = (o, s) => new w(o, s);
255
+ export {
256
+ K as PanoCompassPlugin,
257
+ K as default
258
+ };
@@ -0,0 +1 @@
1
+ "use strict";var E=Object.defineProperty;var y=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable;var A=(t,o,e)=>o in t?E(t,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[o]=e,p=(t,o)=>{for(var e in o||(o={}))B.call(o,e)&&A(t,e,o[e]);if(y)for(var e of y(o))M.call(o,e)&&A(t,e,o[e]);return t};var r=(t,o,e)=>(A(t,typeof o!="symbol"?o+"":o,e),e);var m=(t,o,e)=>new Promise((s,i)=>{var n=c=>{try{l(e.next(c))}catch(d){i(d)}},a=c=>{try{l(e.throw(c))}catch(d){i(d)}},l=c=>c.done?s(c.value):Promise.resolve(c.value).then(n,a);l((e=e.apply(t,o)).next())});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const S=require("three"),k=require("@realsee/five"),b=require("../chunks/cjs/BasePluginWithData.0a28882d.cjs.js"),P=require("../CSS3DRenderPlugin/index.cjs.js"),R=require("../chunks/cjs/index.7d2010ce.cjs.js");require("../chunks/cjs/BasePlugin.57e5204f.cjs.js");require("../chunks/cjs/Subscribe.5398d5c6.cjs.js");require("../chunks/cjs/CSS3DRender.15349564.cjs.js");require("three/examples/jsm/renderers/CSS3DRenderer");require("@tweenjs/tween.js");function Q(t){if(t&&t.__esModule)return t;const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(o,e,s.get?s:{enumerable:!0,get:()=>t[e]})}}return o.default=t,Object.freeze(o)}const h=Q(S),w="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZIAAABCCAYAAAB9y1BhAAAAAXNSR0IArs4c6QAADh5JREFUeAHtnVuPLDcVhedwC/dACKAICDxEIBQpygNI/Ab+MX8B8YCQEAjxgBAQLsm5Jjkn58r6Sl4jT52qnu4zXd121dqSx67q7ip7eXsv721XzcVFJAgEgSAQBIJAEAgCQeC4CLx48eKbSu+RH/fKuVoQWB8Cn1tfk9KiIHAUBH6tq/xKiTwSBILADgRCJDvAyUebRuAbpfXxSDatBmn8Pgh8YZ8v5TtBYIMIvFCbSZEgEASuQSBEcg1A+XizCDzfbMvT8CBwIAIhkgMBy9c3g0CIZDNdnYbeFIEQyU0RzO/XikCIZK09m3YdHYEQydEhzQVXgkCIZCUdmWYsj0CIZHmMc4c+EchCe5/9llqfAYEQyRlAzy27QCAeSRfdlEq2gECIpIVeSB1aRAAiudVixVKnINAaAiGS1nok9WkFAUJb8Upa6Y3Uo2kEQiRNd08qd0YEQiJnBD+37guBEElf/ZXang6BEMnpsM6dOkcgRNJ5B66x+nrjLmsTX1J6bSJHZ7+o9HklynWaOse1eKcc+XVlvxYFEnlfaThWfb7mcsn5nPRM6WmVU55KfO+J0mdKj8f5rVu3skNMoET6RSBE0m/fdVNzGWII4StKXy65y18t58aEAVGcUjDkGHsLhIOYfCC1xUT4QDJjgnmkc58qkT8saSiLeCCkSBBoBoEQSTNd0V9FZADRH8iAGfvXS06Zc5CFCePQt0y3EFaq61CX1ayjC56U8br24sKd+kAuJhkI55OSPi75pyIcvKNIEFgcgRDJ4hD3ewMZLDwDXqfOq9RNFCYOCAMPYx851BDjIXiWzky9Tpy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iIJ1kZyshL9LUOjNEwkT9sXT2pBP1VyaSQiCse9Coqa27LApBIPE+BEKkLwSk32zRHESDkp0zkSDQBALF9uKdYHunnkthwo7tfXQqQjmYSNQImBACIU2xIuGreB8CIdIvAtJzNogMosHI4mYkCDSHgPTUXspU2ItoEIvzEArlxWRvIlGFWTSnsnWF+b1dKAhk8QrrHpEgsDgC0ndi0oNoEBIuiASBZhGQvnqCz/KCJ/jYZtto7DPRoUU2N11LJIXxqNyUC0VFqeCTpRlP94gEgZMhIL0nbDCIdJswQSQINI9AIRRsNRP+KfvOkgNrKEddr5660YUqw3k8EAhkbvsuCztPVSF7JDqMBIF1IKAxcOl5S8eZLEWCQDcIFBtO2Kv2UOr645lAKkex4VeIpLo5jHbls1KD4eYaWIu4R+UeyYLA2RHQWGAADiJ9P9u2StcheRB4VQSkyzgD2PQppwBH4MaEMpBFRSDcqCYQx9ggDphr0QUb3SMSBJpAQGPiciei9P6oYYAmGphKbA4B6TRrJ+j1HKHYzh8cZbpVBowXZ8bgQhzPNJAOvvD4QjkOAj0hUAbdUOVMoHrqudT1OgSk2zgLkAl2n/LYvh9s900kutYV4UIvQiBXMMlBEAgCQWA1CBRCgUjmHAkI5vk+PACR1BcZmGmfH64GzTQkCASBILBhBAqhgEC9rDFGJI7FGJEcB4EgEASCQBAIAkEgCASBIBAEgkAQCAJBIAgEgSAQBIJAEAgCm0fg/x4jQQWGalpFAAAAAElFTkSuQmCC";function j(){const t=document.createElement("div"),o=document.createElement("i"),e=document.createElement("span");return t.appendChild(o),t.appendChild(e),t.style.position="relative",t.style.width="100%",t.style.display="flex",t.style.flexDirection="column",t.style.alignItems="center",t.style.marginTop=`${150/16}rem`,t.style.opacity="0",t.style.transition="opacity 1000ms linear",o.style.display="block",o.style.width=`${134/16}rem`,o.style.height=`${22/16}rem`,o.style.backgroundSize="100%",o.style.backgroundRepeat="no-repeat",o.style.backgroundImage=`url(${w})`,e.style.marginTop=`${10/16}rem`,e.style.fontSize=`${16/16}rem`,e.style.color="#fff",e.style.opacity="0.7",e.style.textShadow="0 2px 16px rgb(22 34 83 / 24%)",e.style.fontWeight="bold",{appendTo(s){s.appendChild(t)},dispose(){t.remove()},setRoom(s){e.innerHTML=s.name+" "+Math.floor(s.size/1e6)+"\u33A1"},show(){t.style.opacity="1"},hide(){t.style.opacity="0"}}}const x=new h.TextureLoader;function v(t){return m(this,null,function*(){return new Promise((o,e)=>{x.load(t,o,void 0,e)}).then(o=>(o.encoding=h.sRGBEncoding,o))})}const I={userAction:!0};class T extends b.Controller{constructor(e,s){super(e);r(this,"state",{visible:!0,enabled:!0,config:{compassImageUrl:"//vrlab-image4.ljcdn.com/release/web/v3/north-point-circle.96498e69.png",entryDoorImageUrl:"//vrlab-image4.ljcdn.com/release/web/enterDoor.831b8208.png"}});r(this,"data");r(this,"group",new h.Group);r(this,"roomInfoInstance");r(this,"roomInfoWrapperInstance");r(this,"compassMeshTween");r(this,"compassMesh");r(this,"entryDoorMesh");r(this,"dispose",()=>{var e,s,i,n;this.five.scene.remove(this.group),this.group.remove(...this.group.children),(s=(e=this.compassMesh)==null?void 0:e.material.map)==null||s.dispose(),(n=(i=this.entryDoorMesh)==null?void 0:i.material.map)==null||n.dispose(),this.five.off("dispose",this.dispose),this.five.off("panoArrived",this.onFivePanoArrived),this.five.off("panoWillArrive",this.onFivePanoWillArrive),this.five.off("cameraDirectionUpdate",this.onFiveCameraDirectionUpdate)});r(this,"_addEventListener",()=>{this.five.on("panoArrived",this.onFivePanoArrived),this.five.on("panoWillArrive",this.onFivePanoWillArrive),this.five.on("modeChange",this.onFiveModeChange),this.five.on("cameraDirectionUpdate",this.onFiveCameraDirectionUpdate)});r(this,"_removeEventListener",()=>{this.five.off("panoArrived",this.onFivePanoArrived),this.five.off("panoWillArrive",this.onFivePanoWillArrive),this.five.off("modeChange",this.onFiveModeChange),this.five.off("cameraDirectionUpdate",this.onFiveCameraDirectionUpdate)});r(this,"_enable",()=>{this.five.scene.add(this.group),this.init(),this.onFivePanoArrived(this.five.panoIndex||0),this._addEventListener()});r(this,"_disable",()=>{this._clearCompassIfNeed(),this._clearEntryDoorIfNeed(),this.five.scene.remove(this.group),this._removeEventListener()});r(this,"_toggleVisible",()=>{this.group.visible=this.state.visible,this.five.needsRender=!0});r(this,"_clearCompassIfNeed",()=>{var e;this.compassMesh&&(this.group.remove(this.compassMesh),(e=this.compassMesh.material.map)==null||e.dispose(),this.compassMesh=null)});r(this,"_clearEntryDoorIfNeed",()=>{var e;this.entryDoorMesh&&(this.group.remove(this.entryDoorMesh),(e=this.entryDoorMesh.material.map)==null||e.dispose(),this.entryDoorMesh=null),this.roomInfoInstance&&(this.roomInfoInstance.dispose(),this.roomInfoInstance=null),this.roomInfoWrapperInstance&&(this.roomInfoWrapperInstance.dispose(),this.roomInfoWrapperInstance=null)});r(this,"onFivePanoWillArrive",e=>{var s,i;e!==this.five.panoIndex&&((s=this.compassMeshTween)==null||s.dispose(),(i=this.compassMesh)==null||i.material.setValues({opacity:0}))});r(this,"onFivePanoArrived",e=>{var i,n,a,l,c,d,u;const s=(a=(n=(i=this.five.work)==null?void 0:i.observers)==null?void 0:n[e])==null?void 0:a.standingPosition;if(this.compassMesh&&(this.compassMesh.position.copy(s.clone().setY(s.y+.01)),this.compassMesh.material.opacity===0&&((l=this.compassMeshTween)==null||l.dispose(),this.compassMeshTween=R.tweenProgress(1e3).onUpdate(({progress:g})=>{var f;(f=this.compassMesh)==null||f.material.setValues({opacity:g}),this.five.needsRender=!0}).play())),this.entryDoorMesh){const f=new h.Vector3(this.data.entrance.position.x,this.data.entrance.position.y,this.data.entrance.position.z).clone().setY(s.y).sub(s).normalize(),D=s.clone().add(f.clone().multiplyScalar(.7)).setY(s.y+.01);this.entryDoorMesh.rotation.z=new h.Vector3(0,0,-1).angleTo(f),this.entryDoorMesh.position.copy(D),((c=this.data)==null?void 0:c.room_observers[e].room.type)===1?(d=this.entryDoorMesh)==null||d.material.setValues({opacity:1}):(u=this.entryDoorMesh)==null||u.material.setValues({opacity:0})}this.roomInfoInstance&&this.roomInfoWrapperInstance&&(this.roomInfoWrapperInstance.css3DObject.position.copy(s.clone().setY(s.y+.01)),this.roomInfoInstance.setRoom(this.data.room_observers[e].room)),this.five.needsRender=!0});r(this,"onFiveCameraDirectionUpdate",({longitude:e,latitude:s})=>{var i,n;!this.roomInfoWrapperInstance||(this.roomInfoWrapperInstance.css3DObject.rotation.z=e,s>.66&&this.five.getCurrentState().mode==="Panorama"?(i=this.roomInfoInstance)==null||i.show():(n=this.roomInfoInstance)==null||n.hide())});r(this,"onFiveModeChange",(e,s,i,n,a)=>{e!==s&&this.setState({visible:e===k.Five.Mode.Panorama},{userAction:a})});this.five.scene.add(this.group),this.five.once("dispose",this.dispose),this.setState({visible:!0,enabled:!0,config:p(p({},this.state.config),s||{})})}enable(e=I){this.setState({enabled:!0},e)}disable(e=I){this.setState({enabled:!1},e)}show(e=I){if(!!this.state.enabled)return this.setState({visible:!0},e),Promise.resolve()}hide(e=I){if(!!this.state.enabled)return this.setState({visible:!1},e),Promise.resolve()}setState(e,s={userAction:!0}){var n,a;const i=JSON.parse(JSON.stringify(this.state));this.state={visible:(n=e.visible)!=null?n:i.visible,enabled:(a=e.enabled)!=null?a:i.enabled,config:p(p({},i.config),e.config||{})},this.hooks.emit("stateChange",{state:this.state,prevState:i,userAction:s.userAction}),e.enabled===!0&&(this._enable(),this.hooks.emit("enable",s)),e.enabled===!1&&(this._disable(),this.hooks.emit("disable",s)),e.visible===!1&&(this._toggleVisible(),this.hooks.emit("hide",s)),e.visible===!0&&(this._toggleVisible(),this.hooks.emit("show",s)),e.config&&this.init()}load(e,s,i=!0){return m(this,null,function*(){const n=yield this.formatData(e);JSON.stringify(this.data)!==JSON.stringify(n)&&(this.hooks.emit("dataChange",n,this.data),this.data=p({},n),this.init(),s&&this.setState(s,{userAction:i}),this.hooks.emit("dataLoaded",this.data))})}formatData(e){return e.version&&e.data?Promise.resolve(e.data):Promise.resolve(e)}init(){return m(this,null,function*(){var i,n,a,l;const e=(n=(i=this.data)==null?void 0:i.north_rad)!=null?n:null;this._clearCompassIfNeed(),e!==null&&(this.compassMesh=yield this.loadCompassMesh(),this.compassMesh.rotateX(-Math.PI/2),this.compassMesh.rotateZ(e-Math.PI/2),this.group.add(this.compassMesh));const s=(l=(a=this.data)==null?void 0:a.entrance)!=null?l:null;this._clearEntryDoorIfNeed(),s!==null&&(this.entryDoorMesh=yield this.loadEntryDoorMesh(),this.roomInfoWrapperInstance=this.loadRoomInfo(),this.roomInfoInstance=j(),this.entryDoorMesh.rotateX(-Math.PI/2),this.roomInfoWrapperInstance&&this.roomInfoInstance.appendTo(this.roomInfoWrapperInstance.container),this.group.add(this.entryDoorMesh)),this.onFivePanoArrived(this.five.panoIndex||0),this.five.needsRender=!0})}loadCompassMesh(){return m(this,null,function*(){const e=this.state.config.compassImageUrl,s=yield v(e),i=new h.CircleGeometry(.7,32),n=new h.MeshBasicMaterial({map:s,transparent:!0,opacity:0,depthTest:!1}),a=new h.Mesh(i,n);return a.name="pano-compass-mesh",a})}loadEntryDoorMesh(){return m(this,null,function*(){const e=this.state.config.entryDoorImageUrl,s=yield v(e),i=new h.PlaneGeometry(.2,.16),n=new h.MeshBasicMaterial({map:s,transparent:!0,opacity:.8,depthTest:!1}),a=new h.Mesh(i,n);return a.name="pano-compass-entry-door",a})}loadRoomInfo(){const e=[new h.Vector3(-.7,0,-.7),new h.Vector3(.7,0,-.7),new h.Vector3(.7,0,.7),new h.Vector3(-.7,0,.7)];return P.CSS3DRenderPlugin(this.five).create3DDomContainer(e)}}const C=(t,o)=>new T(t,o);exports.PanoCompassPlugin=C;exports.default=C;
@@ -0,0 +1,63 @@
1
+ import { Vector3 as s, Group as L, Raycaster as M } from "three";
2
+ import { Line as g } from "@realsee/five/line";
3
+ function w(e, i, l = new s(1, 1, 1), p = !1) {
4
+ const d = new g(e, i);
5
+ return d.setMaterial({ dashed: p, color: l, linewidth: 1 }), d.remove(d.points), d;
6
+ }
7
+ const O = (e) => {
8
+ const i = {
9
+ intersection: null,
10
+ disposers: []
11
+ }, l = (t) => {
12
+ i.intersection = t;
13
+ }, p = () => {
14
+ i.intersection = null;
15
+ };
16
+ e.on("modelLoaded", () => {
17
+ e.on("intersectionOnModelUpdate", l), e.on("intersectionHidden", p);
18
+ }), e.on("dispose", () => {
19
+ e.off("intersectionOnModelUpdate", l), e.off("intersectionHidden", p);
20
+ });
21
+ const d = (t, c = 2, o = 0.1) => {
22
+ const r = c / 2, n = y(t, o), a = new L();
23
+ a.add(
24
+ w(
25
+ new s(n.x + r, n.y, n.z),
26
+ new s(n.x - r, n.y, n.z),
27
+ new s(1, 0, 0)
28
+ ),
29
+ w(
30
+ new s(n.x, n.y + r, n.z),
31
+ new s(n.x, n.y - r, n.z),
32
+ new s(0, 1, 0)
33
+ ),
34
+ w(
35
+ new s(n.x, n.y, n.z + r),
36
+ new s(n.x, n.y, n.z - r),
37
+ new s(0, 0, 1)
38
+ )
39
+ ), e.scene.add(a), e.needsRender = !0;
40
+ const u = () => {
41
+ e.scene.remove(a);
42
+ };
43
+ return i.disposers.push(u), { clear: u, pointAxesHelperMesh: a };
44
+ }, h = (t, c = 0) => {
45
+ var u, P;
46
+ const o = (u = e == null ? void 0 : e.camera) == null ? void 0 : u.position;
47
+ if (!o)
48
+ return !1;
49
+ const r = t.distanceTo(o), m = t.sub(o).normalize(), n = new M(o, m), a = (P = e.model.intersectRaycaster(n)) == null ? void 0 : P[0];
50
+ return !(a && a.distance + c < r);
51
+ }, z = () => i.intersection, x = () => {
52
+ var t, c;
53
+ (c = (t = i.disposers) == null ? void 0 : t.forEach) == null || c.call(t, (o) => o == null ? void 0 : o()), e.off("intersectionOnModelUpdate", l), e.off("intersectionHidden", p);
54
+ }, H = x, y = (t, c) => {
55
+ const o = t.clone();
56
+ return e.camera.position.clone().sub(o).setLength(c).add(o);
57
+ };
58
+ return { intersection: z, pointAxesHelper: d, movePointTowardsCamera: y, destroy: x, dispose: H, canSeePoint: h };
59
+ };
60
+ export {
61
+ O as PanoCursorRaycasterPlugin,
62
+ O as default
63
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("three"),M=require("@realsee/five/line");function m(n,i,l=new r.Vector3(1,1,1),u=!1){const d=new M.Line(n,i);return d.setMaterial({dashed:u,color:l,linewidth:1}),d.remove(d.points),d}const h=n=>{const i={intersection:null,disposers:[]},l=t=>{i.intersection=t},u=()=>{i.intersection=null};n.on("modelLoaded",()=>{n.on("intersectionOnModelUpdate",l),n.on("intersectionHidden",u)}),n.on("dispose",()=>{n.off("intersectionOnModelUpdate",l),n.off("intersectionHidden",u)});const d=(t,c=2,o=.1)=>{const s=c/2,e=P(t,o),a=new r.Group;a.add(m(new r.Vector3(e.x+s,e.y,e.z),new r.Vector3(e.x-s,e.y,e.z),new r.Vector3(1,0,0)),m(new r.Vector3(e.x,e.y+s,e.z),new r.Vector3(e.x,e.y-s,e.z),new r.Vector3(0,1,0)),m(new r.Vector3(e.x,e.y,e.z+s),new r.Vector3(e.x,e.y,e.z-s),new r.Vector3(0,0,1))),n.scene.add(a),n.needsRender=!0;const p=()=>{n.scene.remove(a)};return i.disposers.push(p),{clear:p,pointAxesHelperMesh:a}},x=(t,c=0)=>{var p,V;const o=(p=n==null?void 0:n.camera)==null?void 0:p.position;if(!o)return!1;const s=t.distanceTo(o),w=t.sub(o).normalize(),e=new r.Raycaster(o,w),a=(V=n.model.intersectRaycaster(e))==null?void 0:V[0];return!(a&&a.distance+c<s)},g=()=>i.intersection,y=()=>{var t,c;(c=(t=i.disposers)==null?void 0:t.forEach)==null||c.call(t,o=>o==null?void 0:o()),n.off("intersectionOnModelUpdate",l),n.off("intersectionHidden",u)},z=y,P=(t,c)=>{const o=t.clone();return n.camera.position.clone().sub(o).setLength(c).add(o)};return{intersection:g,pointAxesHelper:d,movePointTowardsCamera:P,destroy:y,dispose:z,canSeePoint:x}};exports.PanoCursorRaycasterPlugin=h;exports.default=h;