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

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 (577) hide show
  1. package/dist/CSS3DRenderPlugin/CSS3DRender.d.ts +167 -0
  2. package/dist/CSS3DRenderPlugin/Controller.d.ts +81 -0
  3. package/dist/CSS3DRenderPlugin/index.d.ts +5 -0
  4. package/dist/CSS3DRenderPlugin/typing.d.ts +26 -0
  5. package/dist/CSS3DRenderPlugin/utils/CSS3DObjectPlus.d.ts +34 -0
  6. package/dist/CSS3DRenderPlugin/utils/centerPoint.d.ts +2 -0
  7. package/dist/CSS3DRenderPlugin/utils/evenNumber.d.ts +3 -0
  8. package/dist/CSS3DRenderPlugin/utils/index.d.ts +4 -0
  9. package/dist/CSS3DRenderPlugin/utils/positionToVector3.d.ts +13 -0
  10. package/dist/CSS3DRenderPlugin/utils/random.d.ts +1 -0
  11. package/dist/CameraMovementPlugin/CameraMovementPlugin.d.ts +7 -0
  12. package/dist/CameraMovementPlugin/index.d.ts +5 -0
  13. package/dist/CameraMovementPlugin/typing.d.ts +68 -0
  14. package/dist/CruisePlugin/Controller.d.ts +172 -0
  15. package/dist/CruisePlugin/index.d.ts +6 -0
  16. package/dist/CruisePlugin/typing.d.ts +134 -0
  17. package/dist/CruisePlugin/utils/coordinatesAngle.d.ts +12 -0
  18. package/dist/CruisePlugin/utils/coordinatesToVector.d.ts +7 -0
  19. package/dist/CruisePlugin/utils/formatRad.d.ts +7 -0
  20. package/dist/CruisePlugin/utils/linerValue.d.ts +1 -0
  21. package/dist/CruisePlugin/utils/safeCall.d.ts +1 -0
  22. package/dist/CruisePlugin/utils/sleep.d.ts +1 -0
  23. package/dist/CruisePlugin/utils/vectorToCoordinates.d.ts +7 -0
  24. package/dist/GuideLinePlugin/Controller.d.ts +51 -0
  25. package/dist/GuideLinePlugin/index.d.ts +5 -0
  26. package/dist/GuideLinePlugin/typing.d.ts +34 -0
  27. package/dist/GuideLinePlugin/utils/getArrowMaterial.d.ts +4 -0
  28. package/dist/GuideLinePlugin/utils/getLineGeometries.d.ts +16 -0
  29. package/dist/GuideLinePlugin/utils/polyline-normals.d.ts +3 -0
  30. package/dist/ItemLabelPlugin/Plugin.d.ts +4 -0
  31. package/dist/ItemLabelPlugin/events.type.d.ts +9 -0
  32. package/dist/ItemLabelPlugin/index.d.ts +9 -0
  33. package/dist/ItemLabelPlugin/typings.d.ts +65 -0
  34. package/dist/ItemLabelPlugin/utils/getLabelTransform.d.ts +1 -0
  35. package/dist/ItemLabelPlugin/utils/getStrokeLength.d.ts +5 -0
  36. package/dist/ItemLabelPlugin/utils/isImpacted.d.ts +8 -0
  37. package/dist/ItemLabelPlugin/utils/parseData.d.ts +3 -0
  38. package/dist/ItemLabelPlugin/utils/transform2RenderData.d.ts +3 -0
  39. package/dist/ModelChassisCompassPlugin/Plugin.d.ts +19 -0
  40. package/dist/ModelChassisCompassPlugin/index.d.ts +4 -0
  41. package/dist/ModelEntryDoorGuidePlugin/Plugin.d.ts +26 -0
  42. package/dist/ModelEntryDoorGuidePlugin/index.d.ts +4 -0
  43. package/dist/ModelItemLabelPlugin/ModelItemLabelPlugin.d.ts +4 -0
  44. package/dist/ModelItemLabelPlugin/events.type.d.ts +9 -0
  45. package/dist/ModelItemLabelPlugin/index.d.ts +9 -0
  46. package/dist/ModelItemLabelPlugin/typings.d.ts +56 -0
  47. package/dist/ModelItemLabelPlugin/utils/parseData.d.ts +3 -0
  48. package/dist/ModelRoomLabelPlugin/Assets/roomLabelBg.d.ts +1 -0
  49. package/dist/ModelRoomLabelPlugin/Controller.d.ts +36 -0
  50. package/dist/ModelRoomLabelPlugin/index.d.ts +12 -0
  51. package/dist/ModelRoomLabelPlugin/typings.d.ts +35 -0
  52. package/dist/ModelRoomLabelPlugin/utils/parseData.d.ts +3 -0
  53. package/dist/ModelTVVideoPlugin/Plugin.d.ts +4 -0
  54. package/dist/ModelTVVideoPlugin/index.d.ts +5 -0
  55. package/dist/ModelTVVideoPlugin/typings.d.ts +25 -0
  56. package/dist/ModelTVVideoPlugin/utils/parseData.d.ts +2 -0
  57. package/dist/ModelViewPlugin/Plugin.d.ts +28 -0
  58. package/dist/ModelViewPlugin/index.d.ts +4 -0
  59. package/dist/Object3DHelperPlugin/Controller.d.ts +65 -0
  60. package/dist/Object3DHelperPlugin/FiveControllerWrapper.d.ts +19 -0
  61. package/dist/Object3DHelperPlugin/index.d.ts +6 -0
  62. package/dist/Object3DHelperPlugin/typings.d.ts +24 -0
  63. package/dist/PanoCompassPlugin/Assets/roomInfoIcon.d.ts +1 -0
  64. package/dist/PanoCompassPlugin/Controller.d.ts +84 -0
  65. package/dist/PanoCompassPlugin/getRoomInfoInstance.d.ts +8 -0
  66. package/dist/PanoCompassPlugin/index.d.ts +7 -0
  67. package/dist/PanoCompassPlugin/typings.d.ts +57 -0
  68. package/dist/PanoCursorRaycasterPlugin/index.d.ts +48 -0
  69. package/dist/PanoDoorLabelPlugin/BaseController.d.ts +60 -0
  70. package/dist/PanoDoorLabelPlugin/Controller.d.ts +37 -0
  71. package/dist/PanoDoorLabelPlugin/index.d.ts +7 -0
  72. package/dist/PanoDoorLabelPlugin/typings.d.ts +38 -0
  73. package/dist/PanoDoorLabelPlugin/utils.d.ts +5 -0
  74. package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +43 -0
  75. package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +48 -0
  76. package/dist/PanoMeasurePlugin/Controller/MixedController.d.ts +42 -0
  77. package/dist/PanoMeasurePlugin/Controller/ShortcutKeyController.d.ts +12 -0
  78. package/dist/PanoMeasurePlugin/Controller/ViewController.d.ts +16 -0
  79. package/dist/PanoMeasurePlugin/Controller/WatchController.d.ts +26 -0
  80. package/dist/PanoMeasurePlugin/Controller/index.d.ts +73 -0
  81. package/dist/PanoMeasurePlugin/Model/index.d.ts +35 -0
  82. package/dist/PanoMeasurePlugin/Model/line.d.ts +30 -0
  83. package/dist/PanoMeasurePlugin/Model/point.d.ts +16 -0
  84. package/dist/PanoMeasurePlugin/Model/polyline.d.ts +16 -0
  85. package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete.svg.d.ts +2 -0
  86. package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_bg.png.d.ts +2 -0
  87. package/dist/PanoMeasurePlugin/Modules/DeleteDom/_Assets/delete_hover_bg.png.d.ts +2 -0
  88. package/dist/PanoMeasurePlugin/Modules/DeleteDom/index.d.ts +25 -0
  89. package/dist/PanoMeasurePlugin/Modules/FiveHelper.d.ts +11 -0
  90. package/dist/PanoMeasurePlugin/Modules/GuideController.d.ts +18 -0
  91. package/dist/PanoMeasurePlugin/Modules/Magnifier.d.ts +59 -0
  92. package/dist/PanoMeasurePlugin/Modules/UIController/HTML.d.ts +2 -0
  93. package/dist/PanoMeasurePlugin/Modules/UIController/MainBtnController.d.ts +15 -0
  94. package/dist/PanoMeasurePlugin/Modules/UIController/Revoke/index.d.ts +13 -0
  95. package/dist/PanoMeasurePlugin/Modules/UIController/index.d.ts +20 -0
  96. package/dist/PanoMeasurePlugin/Modules/UIController/mobileHTML.d.ts +4 -0
  97. package/dist/PanoMeasurePlugin/Modules/UIController/mobileMainBtnController.d.ts +12 -0
  98. package/dist/PanoMeasurePlugin/Modules/UIController/style.d.ts +16 -0
  99. package/dist/PanoMeasurePlugin/Modules/rangePiece/html.d.ts +4 -0
  100. package/dist/PanoMeasurePlugin/Modules/rangePiece/index.d.ts +44 -0
  101. package/dist/PanoMeasurePlugin/index.d.ts +10 -0
  102. package/dist/PanoMeasurePlugin/typings/data.d.ts +37 -0
  103. package/dist/PanoMeasurePlugin/typings/event.type.d.ts +37 -0
  104. package/dist/PanoMeasurePlugin/typings/index.d.ts +8 -0
  105. package/dist/PanoMeasurePlugin/utils/calculateThreeMouse.d.ts +10 -0
  106. package/dist/PanoMeasurePlugin/utils/constants.d.ts +4 -0
  107. package/dist/PanoMeasurePlugin/utils/distanceDom.d.ts +28 -0
  108. package/dist/PanoMeasurePlugin/utils/findAssociatedLines.d.ts +2 -0
  109. package/dist/PanoMeasurePlugin/utils/findClosestPoint.d.ts +10 -0
  110. package/dist/PanoMeasurePlugin/utils/getIntersectionFromEvent.d.ts +4 -0
  111. package/dist/PanoMeasurePlugin/utils/getPointFromHammerEvent.d.ts +10 -0
  112. package/dist/PanoMeasurePlugin/utils/ironbox.d.ts +1 -0
  113. package/dist/PanoMeasurePlugin/utils/isNDCPointInScreen.d.ts +2 -0
  114. package/dist/PanoMeasurePlugin/utils/line.d.ts +17 -0
  115. package/dist/PanoMeasurePlugin/utils/math.d.ts +17 -0
  116. package/dist/PanoMeasurePlugin/utils/mouseGroup.d.ts +7 -0
  117. package/dist/PanoMeasurePlugin/utils/ndc2Screen.d.ts +5 -0
  118. package/dist/PanoRulerPlugin/Plugin.d.ts +34 -0
  119. package/dist/PanoRulerPlugin/index.d.ts +5 -0
  120. package/dist/PanoRulerPlugin/style.d.ts +2 -0
  121. package/dist/PanoRulerPlugin/typings.d.ts +21 -0
  122. package/dist/PanoRulerProPlugin/Controller.d.ts +15 -0
  123. package/dist/PanoRulerProPlugin/index.d.ts +8 -0
  124. package/dist/PanoRulerProPlugin/typings.d.ts +46 -0
  125. package/dist/PanoSpatialTagPlugin/Plugin.d.ts +35 -0
  126. package/dist/PanoSpatialTagPlugin/index.d.ts +5 -0
  127. package/dist/PanoSpatialTagPlugin/store.d.ts +1 -0
  128. package/dist/PanoSpatialTagPlugin/style.d.ts +1 -0
  129. package/dist/PanoSpatialTagPlugin/typings.d.ts +40 -0
  130. package/dist/PanoTagPlugin/Assets/Icon.d.ts +3 -0
  131. package/dist/PanoTagPlugin/controller/TagCacheController.d.ts +22 -0
  132. package/dist/PanoTagPlugin/controller/TagComputer.d.ts +69 -0
  133. package/dist/PanoTagPlugin/controller/index.d.ts +144 -0
  134. package/dist/PanoTagPlugin/index.d.ts +8 -0
  135. package/dist/PanoTagPlugin/tag.config.d.ts +7 -0
  136. package/dist/PanoTagPlugin/typings/controller.d.ts +103 -0
  137. package/dist/PanoTagPlugin/typings/index.d.ts +2 -0
  138. package/dist/PanoTagPlugin/typings/tag.d.ts +247 -0
  139. package/dist/PanoTagPlugin/utils/actionAfterFiveModelLoad.d.ts +2 -0
  140. package/dist/PanoTagPlugin/utils/addDebugPoints.d.ts +3 -0
  141. package/dist/PanoTagPlugin/utils/checkRange.d.ts +4 -0
  142. package/dist/PanoTagPlugin/utils/constants.d.ts +3 -0
  143. package/dist/PanoTagPlugin/utils/debounce.d.ts +7 -0
  144. package/dist/PanoTagPlugin/utils/doUtil.d.ts +1 -0
  145. package/dist/PanoTagPlugin/utils/index.d.ts +12 -0
  146. package/dist/PanoTagPlugin/utils/noTypecheck.d.ts +1 -0
  147. package/dist/PanoTagPlugin/utils/normalPositionToPositions.d.ts +2 -0
  148. package/dist/PanoTagPlugin/utils/planeNormal.d.ts +4 -0
  149. package/dist/PanoTagPlugin/utils/resizeObserver.d.ts +4 -0
  150. package/dist/PanoTagPlugin/utils/search.d.ts +11 -0
  151. package/dist/PanoTagPlugin/utils/tagPosition.d.ts +3 -0
  152. package/dist/PanoTagPlugin/utils/throttle.d.ts +7 -0
  153. package/dist/base/BasePlugin.d.ts +106 -0
  154. package/dist/base/BasePluginWithData.d.ts +34 -0
  155. package/dist/components/PaintBrush/Controller.d.ts +43 -0
  156. package/dist/components/PaintBrush/Subscribe.d.ts +76 -0
  157. package/dist/components/PaintBrush/index.d.ts +27 -0
  158. package/dist/components/PaintBrush/style.d.ts +2 -0
  159. package/dist/components/PaintBrush/tween.d.ts +7 -0
  160. package/dist/components/PaintBrush/typings.d.ts +58 -0
  161. package/dist/components/PaintBrush/utils.d.ts +26 -0
  162. package/dist/components/index.d.ts +2 -0
  163. package/dist/env.d.ts +1 -0
  164. package/dist/floorplan/Assets/camera.d.ts +1 -0
  165. package/dist/floorplan/Assets/compass.d.ts +1 -0
  166. package/dist/floorplan/Assets/floorplanExtraObject.d.ts +1 -0
  167. package/dist/floorplan/MapviewFloorplanPlugin/Controller.d.ts +97 -0
  168. package/dist/floorplan/MapviewFloorplanPlugin/index.d.ts +7 -0
  169. package/dist/floorplan/MapviewFloorplanPlugin/typing.d.ts +1 -0
  170. package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +99 -0
  171. package/dist/floorplan/ModelFloorplanPlugin/index.d.ts +7 -0
  172. package/dist/floorplan/ModelFloorplanPlugin/typing.d.ts +1 -0
  173. package/dist/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +36 -0
  174. package/dist/floorplan/PanoFloorplanRadarPlugin/index.d.ts +7 -0
  175. package/dist/floorplan/PanoFloorplanRadarPlugin/typing.d.ts +52 -0
  176. package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +69 -0
  177. package/dist/floorplan/TopviewFloorplanPlugin/index.d.ts +7 -0
  178. package/dist/floorplan/TopviewFloorplanPlugin/typing.d.ts +11 -0
  179. package/dist/floorplan/constant.d.ts +5 -0
  180. package/dist/floorplan/index.d.ts +7 -0
  181. package/dist/floorplan/typings/floorplanData.d.ts +137 -0
  182. package/dist/floorplan/typings/floorplanServerData.d.ts +144 -0
  183. package/dist/floorplan/typings/index.d.ts +117 -0
  184. package/dist/floorplan/typings/utility.d.ts +2 -0
  185. package/dist/floorplan/utils/constant.d.ts +22 -0
  186. package/dist/floorplan/utils/correctFiveState.d.ts +15 -0
  187. package/dist/floorplan/utils/formatData.d.ts +5 -0
  188. package/dist/floorplan/utils/formatPosition.d.ts +36 -0
  189. package/dist/index.d.ts +23 -0
  190. package/dist/index.es.js +16650 -0
  191. package/dist/index.js +556 -0
  192. package/dist/index.umd.js +556 -0
  193. package/dist/shared-utils/Object3DHelper/Base/BaseController.d.ts +48 -0
  194. package/dist/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +91 -0
  195. package/dist/shared-utils/Object3DHelper/Constants/color.d.ts +12 -0
  196. package/dist/shared-utils/Object3DHelper/Controller/CSS3DScaleController.d.ts +6 -0
  197. package/dist/shared-utils/Object3DHelper/Controller/MoveController.d.ts +13 -0
  198. package/dist/shared-utils/Object3DHelper/Controller/RectangleScaleController.d.ts +37 -0
  199. package/dist/shared-utils/Object3DHelper/Controller/RotateController.d.ts +22 -0
  200. package/dist/shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.d.ts +11 -0
  201. package/dist/shared-utils/Object3DHelper/Helper/HTML/tipsDom.d.ts +6 -0
  202. package/dist/shared-utils/Object3DHelper/Helper/HTML/utils/createElement.d.ts +2 -0
  203. package/dist/shared-utils/Object3DHelper/Helper/MoveHelper.d.ts +13 -0
  204. package/dist/shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.d.ts +17 -0
  205. package/dist/shared-utils/Object3DHelper/Helper/OutlineHelper.d.ts +11 -0
  206. package/dist/shared-utils/Object3DHelper/Helper/RectangleScaleHelper.d.ts +40 -0
  207. package/dist/shared-utils/Object3DHelper/Helper/RotateHelper.d.ts +55 -0
  208. package/dist/shared-utils/Object3DHelper/Helper/index.d.ts +5 -0
  209. package/dist/shared-utils/Object3DHelper/index.d.ts +71 -0
  210. package/dist/shared-utils/Object3DHelper/typings/Direction.d.ts +2 -0
  211. package/dist/shared-utils/Object3DHelper/typings/Hooks.d.ts +45 -0
  212. package/dist/shared-utils/Object3DHelper/typings/Scissor.d.ts +17 -0
  213. package/dist/shared-utils/Object3DHelper/typings/index.d.ts +5 -0
  214. package/dist/shared-utils/Object3DHelper/utils/calculateThreeMouse.d.ts +14 -0
  215. package/dist/shared-utils/Object3DHelper/utils/direction.d.ts +14 -0
  216. package/dist/shared-utils/Object3DHelper/utils/filterNotColinearPoints.d.ts +2 -0
  217. package/dist/shared-utils/Object3DHelper/utils/getMouseRaycaster.d.ts +5 -0
  218. package/dist/shared-utils/Object3DHelper/utils/getPoint.d.ts +3 -0
  219. package/dist/shared-utils/Object3DHelper/utils/index.d.ts +8 -0
  220. package/dist/shared-utils/Object3DHelper/utils/normalPositionToPositions.d.ts +5 -0
  221. package/dist/shared-utils/Object3DHelper/utils/object3DBoundingPosition.d.ts +1 -0
  222. package/dist/shared-utils/Object3DHelper/utils/threex/domevents/index.d.ts +34 -0
  223. package/dist/shared-utils/Object3DHelper/utils/vectorIsEqual.d.ts +2 -0
  224. package/dist/shared-utils/Subscribe.d.ts +60 -0
  225. package/dist/shared-utils/animationFrame/BetterTween.d.ts +11 -0
  226. package/dist/shared-utils/animationFrame/calculateProgress.d.ts +8 -0
  227. package/dist/shared-utils/animationFrame/formatRad.d.ts +15 -0
  228. package/dist/shared-utils/animationFrame/index.d.ts +16 -0
  229. package/dist/shared-utils/animationFrame/tween.d.ts +75 -0
  230. package/dist/shared-utils/changeModelCanvasOpacity.d.ts +2 -0
  231. package/dist/shared-utils/createCanvasTextTexture.d.ts +8 -0
  232. package/dist/shared-utils/createLine/index.d.ts +3 -0
  233. package/dist/shared-utils/debounce.d.ts +6 -0
  234. package/dist/shared-utils/equal.d.ts +11 -0
  235. package/dist/shared-utils/filter.d.ts +27 -0
  236. package/dist/shared-utils/five/changeMode.d.ts +5 -0
  237. package/dist/shared-utils/getPxmm.d.ts +19 -0
  238. package/dist/shared-utils/index.d.ts +4 -0
  239. package/dist/shared-utils/isNil.d.ts +10 -0
  240. package/dist/shared-utils/isTruelyObject.d.ts +18 -0
  241. package/dist/shared-utils/math/Interval.d.ts +13 -0
  242. package/dist/shared-utils/math/Rectangle.d.ts +27 -0
  243. package/dist/shared-utils/math/index.d.ts +2 -0
  244. package/dist/shared-utils/math/planimetry.d.ts +116 -0
  245. package/dist/shared-utils/math/rad2Deg.d.ts +1 -0
  246. package/dist/shared-utils/nearlyEqual.d.ts +7 -0
  247. package/dist/shared-utils/nextFrame.d.ts +1 -0
  248. package/dist/shared-utils/noop.d.ts +5 -0
  249. package/dist/shared-utils/object3d2LocalMatrix.d.ts +12 -0
  250. package/dist/shared-utils/removeArrayItem.d.ts +7 -0
  251. package/dist/shared-utils/tap.d.ts +8 -0
  252. package/dist/shared-utils/three/Assets/index.d.ts +3 -0
  253. package/dist/shared-utils/three/FivePointSelector.d.ts +36 -0
  254. package/dist/shared-utils/three/Magnifier.d.ts +53 -0
  255. package/dist/shared-utils/three/PointDomHelper.d.ts +18 -0
  256. package/dist/shared-utils/three/PointHelper.d.ts +21 -0
  257. package/dist/shared-utils/three/getCoords.d.ts +9 -0
  258. package/dist/shared-utils/three/getIntersect.d.ts +6 -0
  259. package/dist/shared-utils/three/getRaycaster.d.ts +6 -0
  260. package/dist/shared-utils/three/index.d.ts +7 -0
  261. package/dist/shared-utils/three/loadTexture.d.ts +2 -0
  262. package/dist/shared-utils/three/transformPositionToVector3.d.ts +7 -0
  263. package/dist/shared-utils/three/transfromToMeshBasicMaterial.d.ts +2 -0
  264. package/dist/shared-utils/throttle.d.ts +7 -0
  265. package/dist/shared-utils/tinyEJSrender.d.ts +5 -0
  266. package/dist/shared-utils/to.d.ts +8 -0
  267. package/dist/shared-utils/uuid.d.ts +5 -0
  268. package/dist/typings/math.type.d.ts +44 -0
  269. package/docs/classes/CruisePluginController.html +24 -24
  270. package/docs/classes/Magnifier.html +16 -16
  271. package/docs/classes/ModelRoomLabelController.html +11 -11
  272. package/docs/classes/Object3DHelperController.html +24 -24
  273. package/docs/classes/PaintBrush.html +15 -15
  274. package/docs/classes/PanoTagPluginController.html +39 -39
  275. package/docs/classes/Util.BetterTween.html +8 -8
  276. package/docs/classes/Util.FivePointSelector.html +12 -12
  277. package/docs/classes/Util.Interval.html +12 -12
  278. package/docs/classes/Util.Magnifier.html +17 -17
  279. package/docs/classes/Util.PointDomHelper.html +11 -11
  280. package/docs/classes/Util.PointHelper.html +11 -11
  281. package/docs/classes/Util.Rectangle.html +13 -13
  282. package/docs/enums/CameraMovementEffect.html +7 -7
  283. package/docs/enums/ContentType.html +12 -12
  284. package/docs/enums/DIRECTION.html +9 -9
  285. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +9 -9
  286. package/docs/enums/DimensionType.html +7 -7
  287. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +8 -8
  288. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +9 -9
  289. package/docs/enums/LinkType.html +7 -7
  290. package/docs/enums/PaintBrushTypeEnum.html +8 -8
  291. package/docs/enums/PointType.html +7 -7
  292. package/docs/enums/Rotation.html +8 -8
  293. package/docs/functions/CSS3DRenderPlugin.html +4 -4
  294. package/docs/functions/CameraMovementPlugin.html +4 -4
  295. package/docs/functions/CruisePlugin.html +4 -4
  296. package/docs/functions/GuideLinePlugin.html +5 -5
  297. package/docs/functions/ItemLabelPlugin.html +4 -4
  298. package/docs/functions/MapviewFloorplanPlugin.html +4 -4
  299. package/docs/functions/ModelChassisCompassPlugin.html +4 -4
  300. package/docs/functions/ModelEntryDoorGuidePlugin.html +4 -4
  301. package/docs/functions/ModelFloorplanPlugin.html +4 -4
  302. package/docs/functions/ModelItemLabelPlugin.html +4 -4
  303. package/docs/functions/ModelRoomLabelPlugin.html +4 -4
  304. package/docs/functions/ModelTVVideoPlugin.html +4 -4
  305. package/docs/functions/ModelViewPlugin.html +4 -4
  306. package/docs/functions/Object3DHelperPlugin.html +4 -4
  307. package/docs/functions/PanoCompassPlugin.html +4 -4
  308. package/docs/functions/PanoCursorRaycasterPlugin.html +4 -4
  309. package/docs/functions/PanoDoorLabelPlugin.html +4 -4
  310. package/docs/functions/PanoFloorplanRadarPlugin.html +4 -4
  311. package/docs/functions/PanoMeasurePlugin.html +4 -4
  312. package/docs/functions/PanoRulerPlugin.html +4 -4
  313. package/docs/functions/PanoRulerProPlugin.html +4 -4
  314. package/docs/functions/PanoSpatialTagPlugin.html +4 -4
  315. package/docs/functions/PanoTagPlugin.html +4 -4
  316. package/docs/functions/TopviewFloorplanPlugin.html +4 -4
  317. package/docs/functions/Util.getCoordsFromClient.html +5 -5
  318. package/docs/functions/Util.getCoordsFromElement.html +5 -5
  319. package/docs/functions/Util.getFrameTime.html +5 -5
  320. package/docs/functions/Util.getIntersectFromRelativePosition.html +5 -5
  321. package/docs/functions/Util.getRaycasterFromFivePointer.html +5 -5
  322. package/docs/functions/Util.isNil.html +5 -5
  323. package/docs/functions/Util.nextFrame.html +5 -5
  324. package/docs/functions/Util.notNil.html +5 -5
  325. package/docs/functions/Util.requestAnimationFrameInterval.html +5 -5
  326. package/docs/functions/Util.tweenProgress.html +5 -5
  327. package/docs/functions/pluginFlag.html +5 -5
  328. package/docs/index.html +4 -4
  329. package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -11
  330. package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
  331. package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
  332. package/docs/interfaces/ContentTypeMap.html +12 -12
  333. package/docs/interfaces/FloorplanBounding.html +8 -8
  334. package/docs/interfaces/FloorplanData.html +10 -10
  335. package/docs/interfaces/FloorplanEntrance.html +11 -11
  336. package/docs/interfaces/FloorplanExtraObject.html +10 -10
  337. package/docs/interfaces/FloorplanExtraObject3D.html +8 -8
  338. package/docs/interfaces/FloorplanFloorData.html +9 -9
  339. package/docs/interfaces/FloorplanImagePosition.html +7 -7
  340. package/docs/interfaces/FloorplanObserver.html +9 -9
  341. package/docs/interfaces/FloorplanOutlineItem.html +9 -9
  342. package/docs/interfaces/FloorplanPosition.html +7 -7
  343. package/docs/interfaces/FloorplanRoomItem.html +13 -13
  344. package/docs/interfaces/FloorplanRoomLabelItem.html +7 -7
  345. package/docs/interfaces/FloorplanServerBounding.html +8 -8
  346. package/docs/interfaces/FloorplanServerComputedData.html +10 -10
  347. package/docs/interfaces/FloorplanServerData.html +7 -7
  348. package/docs/interfaces/FloorplanServerDoorItem.html +10 -10
  349. package/docs/interfaces/FloorplanServerDoorPosition.html +8 -8
  350. package/docs/interfaces/FloorplanServerEntrance.html +11 -11
  351. package/docs/interfaces/FloorplanServerFloorData.html +9 -9
  352. package/docs/interfaces/FloorplanServerImagePosition.html +7 -7
  353. package/docs/interfaces/FloorplanServerObserver.html +9 -9
  354. package/docs/interfaces/FloorplanServerOutlineItem.html +9 -9
  355. package/docs/interfaces/FloorplanServerPosition.html +7 -7
  356. package/docs/interfaces/FloorplanServerRoomItem.html +14 -14
  357. package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -7
  358. package/docs/interfaces/ItemLabelPluginData.html +6 -6
  359. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -11
  360. package/docs/interfaces/ItemLabelPluginParametersType.html +9 -9
  361. package/docs/interfaces/LineJson.html +7 -7
  362. package/docs/interfaces/ModelChassisCompassPluginData.html +7 -7
  363. package/docs/interfaces/ModelChassisCompassPluginExportType.html +8 -8
  364. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +7 -7
  365. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +8 -8
  366. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +8 -8
  367. package/docs/interfaces/ModelItemLabelPluginData.html +6 -6
  368. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +11 -11
  369. package/docs/interfaces/ModelItemLabelPluginParametersType.html +7 -7
  370. package/docs/interfaces/ModelRoomLabelPluginData.html +6 -6
  371. package/docs/interfaces/ModelTVVideoPluginData.html +9 -9
  372. package/docs/interfaces/ModelTVVideoPluginExportType.html +8 -8
  373. package/docs/interfaces/ModelTVVideoPluginParameterType.html +6 -6
  374. package/docs/interfaces/ModelViewPluginExportType.html +8 -8
  375. package/docs/interfaces/Object3DHelperState.html +8 -8
  376. package/docs/interfaces/OpenParameter.html +7 -7
  377. package/docs/interfaces/PaintBrushAction.html +12 -12
  378. package/docs/interfaces/PaintBrushConfigs.html +12 -12
  379. package/docs/interfaces/PaintBrushState.html +10 -10
  380. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +10 -10
  381. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +5 -5
  382. package/docs/interfaces/PanoMeasureParameterType.html +11 -11
  383. package/docs/interfaces/PanoRulerPluginExportType.html +10 -10
  384. package/docs/interfaces/PanoRulerPluginOptions.html +7 -7
  385. package/docs/interfaces/PanoRulerPluginParameterType.html +8 -8
  386. package/docs/interfaces/PanoRulerProPluginExportType.html +9 -9
  387. package/docs/interfaces/PanoRulerProPluginOptions.html +7 -7
  388. package/docs/interfaces/PanoRulerProPluginParameterType.html +7 -7
  389. package/docs/interfaces/PanoRulerProPluginState.html +8 -8
  390. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +5 -5
  391. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +5 -5
  392. package/docs/interfaces/PanoSpatialTagPluginData.html +11 -11
  393. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +10 -10
  394. package/docs/interfaces/PanoSpatialTagPluginExportType.html +13 -13
  395. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +10 -10
  396. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +13 -13
  397. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +11 -11
  398. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +10 -10
  399. package/docs/interfaces/Point.html +8 -8
  400. package/docs/interfaces/PointJson.html +8 -8
  401. package/docs/interfaces/Room.html +9 -9
  402. package/docs/interfaces/RoomInfo.html +7 -7
  403. package/docs/interfaces/RoomLabel.html +14 -14
  404. package/docs/interfaces/RoomRules.html +5 -5
  405. package/docs/interfaces/Rooms.html +5 -5
  406. package/docs/interfaces/Scissor.html +9 -9
  407. package/docs/interfaces/TagConfig.html +10 -10
  408. package/docs/interfaces/Tags.html +9 -9
  409. package/docs/interfaces/Util.MagnifierParameter.html +11 -11
  410. package/docs/interfaces/Util.MouseGroupParameter.html +8 -8
  411. package/docs/modules/Util.html +5 -5
  412. package/docs/modules.html +4 -4
  413. package/docs/types/ArrayPosition.html +5 -5
  414. package/docs/types/CSS3DRenderExportType.html +5 -5
  415. package/docs/types/CSS3DRenderPluginExportType.html +5 -5
  416. package/docs/types/CSS3DRenderPluginParameterType.html +5 -5
  417. package/docs/types/Color.html +5 -5
  418. package/docs/types/ContentTypeConfigKey.html +5 -5
  419. package/docs/types/ContentTypeConfigKeyArray.html +5 -5
  420. package/docs/types/Create3DDomContainerReturnType.html +5 -5
  421. package/docs/types/Create3DElementReturnType.html +5 -5
  422. package/docs/types/CruisePluginExportType.html +5 -5
  423. package/docs/types/Direction-1.html +5 -5
  424. package/docs/types/Direction4.html +5 -5
  425. package/docs/types/FloorplanRuleLabels.html +5 -5
  426. package/docs/types/FloorplanServerRuleLabels.html +5 -5
  427. package/docs/types/GuideLinePluginExportType.html +5 -5
  428. package/docs/types/HelperEventMap.html +5 -5
  429. package/docs/types/MapviewFloorplanPluginParameterType.html +5 -5
  430. package/docs/types/MapviewFloorplanPluginReturnType.html +5 -5
  431. package/docs/types/MediaData.html +5 -5
  432. package/docs/types/ModelEntryDoorGuidePluginParameterType.html +5 -5
  433. package/docs/types/ModelFloorplanPluginParameterType.html +5 -5
  434. package/docs/types/ModelFloorplanPluginReturnType.html +5 -5
  435. package/docs/types/ModelRoomLabelPluginParameters.html +5 -5
  436. package/docs/types/ModelRoomLabelPluginReturnType.html +5 -5
  437. package/docs/types/MoveArgs.html +5 -5
  438. package/docs/types/MoveOpts.html +5 -5
  439. package/docs/types/Object3DHelperEventMap.html +5 -5
  440. package/docs/types/ObjectFit.html +5 -5
  441. package/docs/types/PaintBrushEventMap.html +5 -5
  442. package/docs/types/PanoCompassPluginData.html +5 -5
  443. package/docs/types/PanoCompassPluginExportType.html +5 -5
  444. package/docs/types/PanoCompassPluginParameterType.html +5 -5
  445. package/docs/types/PanoFloorplanRadarPluginParameterType.html +5 -5
  446. package/docs/types/PanoFloorplanRadarPluginReturnType.html +5 -5
  447. package/docs/types/PanoMeasurePluginEvent.html +5 -5
  448. package/docs/types/PanoMeasureReturnType.html +5 -5
  449. package/docs/types/PanoSpatialTagPluginId.html +5 -5
  450. package/docs/types/PanoTagPluginExportInterface.html +5 -5
  451. package/docs/types/PanoTagPluginParamsInterface.html +5 -5
  452. package/docs/types/PlaneTag.html +5 -5
  453. package/docs/types/PointTag.html +5 -5
  454. package/docs/types/Position.html +5 -5
  455. package/docs/types/RotateArgs.html +5 -5
  456. package/docs/types/RotateOpts.html +5 -5
  457. package/docs/types/RuleLabelsKey.html +5 -5
  458. package/docs/types/RuleLabelsValue.html +5 -5
  459. package/docs/types/Tag.html +5 -5
  460. package/docs/types/Tag2D.html +5 -5
  461. package/docs/types/Tag3D.html +5 -5
  462. package/docs/types/TagId.html +5 -5
  463. package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
  464. package/docs/types/TopviewFloorplanPluginReturnType.html +5 -5
  465. package/docs/variables/FLOOR_TYPE_MAP.html +5 -5
  466. package/docs/variables/PLUGIN.html +5 -5
  467. package/docs/variables/ROOM_FETILE_TYPE_MAP.html +5 -5
  468. package/docs/variables/ROOM_TYPE_MAP.html +5 -5
  469. package/docs/variables/VERSION.html +5 -5
  470. package/docs/variables/itemLabelPluginServerParams.html +5 -5
  471. package/docs/variables/modelItemLabelPluginServerParams.html +5 -5
  472. package/docs/variables/modelRoomLabelPluginServerParams.html +5 -5
  473. package/package.json +5 -7
  474. package/dist/CSS3DRenderPlugin/index..js +0 -88
  475. package/dist/CSS3DRenderPlugin/index.cjs.js +0 -1
  476. package/dist/CameraMovementPlugin/index..js +0 -11
  477. package/dist/CameraMovementPlugin/index.cjs.js +0 -1
  478. package/dist/CruisePlugin/index..js +0 -527
  479. package/dist/CruisePlugin/index.cjs.js +0 -1
  480. package/dist/GuideLinePlugin/index..js +0 -214
  481. package/dist/GuideLinePlugin/index.cjs.js +0 -1
  482. package/dist/ItemLabelPlugin/index..js +0 -508
  483. package/dist/ItemLabelPlugin/index.cjs.js +0 -10
  484. package/dist/ModelChassisCompassPlugin/index..js +0 -9
  485. package/dist/ModelChassisCompassPlugin/index.cjs.js +0 -1
  486. package/dist/ModelEntryDoorGuidePlugin/index..js +0 -9
  487. package/dist/ModelEntryDoorGuidePlugin/index.cjs.js +0 -1
  488. package/dist/ModelItemLabelPlugin/index..js +0 -334
  489. package/dist/ModelItemLabelPlugin/index.cjs.js +0 -10
  490. package/dist/ModelRoomLabelPlugin/index..js +0 -274
  491. package/dist/ModelRoomLabelPlugin/index.cjs.js +0 -1
  492. package/dist/ModelTVVideoPlugin/index..js +0 -12
  493. package/dist/ModelTVVideoPlugin/index.cjs.js +0 -1
  494. package/dist/ModelViewPlugin/index..js +0 -8
  495. package/dist/ModelViewPlugin/index.cjs.js +0 -1
  496. package/dist/Object3DHelperPlugin/index..js +0 -1414
  497. package/dist/Object3DHelperPlugin/index.cjs.js +0 -1
  498. package/dist/PanoCompassPlugin/index..js +0 -258
  499. package/dist/PanoCompassPlugin/index.cjs.js +0 -1
  500. package/dist/PanoCursorRaycasterPlugin/index..js +0 -63
  501. package/dist/PanoCursorRaycasterPlugin/index.cjs.js +0 -1
  502. package/dist/PanoDoorLabelPlugin/index..js +0 -340
  503. package/dist/PanoDoorLabelPlugin/index.cjs.js +0 -1
  504. package/dist/PanoMeasurePlugin/index..js +0 -15
  505. package/dist/PanoMeasurePlugin/index.cjs.js +0 -1
  506. package/dist/PanoRulerPlugin/index..js +0 -9
  507. package/dist/PanoRulerPlugin/index.cjs.js +0 -1
  508. package/dist/PanoRulerProPlugin/index..js +0 -395
  509. package/dist/PanoRulerProPlugin/index.cjs.js +0 -1
  510. package/dist/PanoSpatialTagPlugin/index..js +0 -15
  511. package/dist/PanoSpatialTagPlugin/index.cjs.js +0 -1
  512. package/dist/PanoTagPlugin/index..js +0 -4522
  513. package/dist/PanoTagPlugin/index.cjs.js +0 -17
  514. package/dist/chunks/cjs/BasePlugin.57e5204f.cjs.js +0 -1
  515. package/dist/chunks/cjs/BasePluginWithData.0a28882d.cjs.js +0 -1
  516. package/dist/chunks/cjs/CSS3DRender.15349564.cjs.js +0 -1
  517. package/dist/chunks/cjs/CameraMovementPlugin.2b342576.cjs.js +0 -1
  518. package/dist/chunks/cjs/Plugin.5f616fb3.cjs.js +0 -1
  519. package/dist/chunks/cjs/Plugin.609da4aa.cjs.js +0 -94
  520. package/dist/chunks/cjs/Plugin.67936d0e.cjs.js +0 -16
  521. package/dist/chunks/cjs/Plugin.8a110c53.cjs.js +0 -1
  522. package/dist/chunks/cjs/Plugin.9971108a.cjs.js +0 -1
  523. package/dist/chunks/cjs/Plugin.fd42bf8a.cjs.js +0 -1
  524. package/dist/chunks/cjs/Subscribe.5398d5c6.cjs.js +0 -1
  525. package/dist/chunks/cjs/changeModelCanvasOpacity.8d84f111.cjs.js +0 -1
  526. package/dist/chunks/cjs/correctFiveState.4c8472bd.cjs.js +0 -1
  527. package/dist/chunks/cjs/debounce.93dfb637.cjs.js +0 -1
  528. package/dist/chunks/cjs/equal.e9fcbd4e.cjs.js +0 -1
  529. package/dist/chunks/cjs/filter.cf9ebbb3.cjs.js +0 -1
  530. package/dist/chunks/cjs/formatData.81e95011.cjs.js +0 -10
  531. package/dist/chunks/cjs/index.30b7baeb.cjs.js +0 -101
  532. package/dist/chunks/cjs/index.686e84d1.cjs.js +0 -290
  533. package/dist/chunks/cjs/index.7d2010ce.cjs.js +0 -1
  534. package/dist/chunks/cjs/isNil.b3a58990.cjs.js +0 -1
  535. package/dist/chunks/cjs/planimetry.7fce816a.cjs.js +0 -1
  536. package/dist/chunks/cjs/throttle.86c209eb.cjs.js +0 -1
  537. package/dist/chunks/cjs/transfromToMeshBasicMaterial.9db6d46a.cjs.js +0 -1
  538. package/dist/chunks/cjs/uuid.29ed9c88.cjs.js +0 -1
  539. package/dist/chunks/es/BasePlugin.813e25f7.es.js +0 -18
  540. package/dist/chunks/es/BasePluginWithData.4bf4e649.es.js +0 -6
  541. package/dist/chunks/es/CSS3DRender.5652510e.es.js +0 -393
  542. package/dist/chunks/es/CameraMovementPlugin.4a7c3e46.es.js +0 -120
  543. package/dist/chunks/es/Plugin.26c2df05.es.js +0 -106
  544. package/dist/chunks/es/Plugin.435485ed.es.js +0 -584
  545. package/dist/chunks/es/Plugin.a98418f0.es.js +0 -82
  546. package/dist/chunks/es/Plugin.ae4ee6f8.es.js +0 -82
  547. package/dist/chunks/es/Plugin.dd11e0ad.es.js +0 -180
  548. package/dist/chunks/es/Plugin.f4cf895f.es.js +0 -355
  549. package/dist/chunks/es/Subscribe.c73e0f91.es.js +0 -50
  550. package/dist/chunks/es/changeModelCanvasOpacity.45ef9fd6.es.js +0 -1551
  551. package/dist/chunks/es/correctFiveState.e7feab9f.es.js +0 -66
  552. package/dist/chunks/es/debounce.ef83f417.es.js +0 -11
  553. package/dist/chunks/es/equal.7db4a6f7.es.js +0 -56
  554. package/dist/chunks/es/filter.97ec06c4.es.js +0 -12
  555. package/dist/chunks/es/formatData.a2b39ef9.es.js +0 -483
  556. package/dist/chunks/es/index.a273f06e.es.js +0 -532
  557. package/dist/chunks/es/index.b8fdb59b.es.js +0 -50
  558. package/dist/chunks/es/index.f74f4851.es.js +0 -1787
  559. package/dist/chunks/es/isNil.212842d9.es.js +0 -10
  560. package/dist/chunks/es/planimetry.b0b4a28d.es.js +0 -43
  561. package/dist/chunks/es/throttle.db66bac3.es.js +0 -11
  562. package/dist/chunks/es/transfromToMeshBasicMaterial.849ee069.es.js +0 -24
  563. package/dist/chunks/es/uuid.676cb2c8.es.js +0 -9
  564. package/dist/components/PaintBrush/index..js +0 -6
  565. package/dist/components/PaintBrush/index.cjs.js +0 -1
  566. package/dist/components/index..js +0 -7
  567. package/dist/components/index.cjs.js +0 -1
  568. package/dist/floorplan/MapviewFloorplanPlugin/index..js +0 -324
  569. package/dist/floorplan/MapviewFloorplanPlugin/index.cjs.js +0 -1
  570. package/dist/floorplan/ModelFloorplanPlugin/index..js +0 -320
  571. package/dist/floorplan/ModelFloorplanPlugin/index.cjs.js +0 -1
  572. package/dist/floorplan/PanoFloorplanRadarPlugin/index..js +0 -613
  573. package/dist/floorplan/PanoFloorplanRadarPlugin/index.cjs.js +0 -1
  574. package/dist/floorplan/TopviewFloorplanPlugin/index..js +0 -277
  575. package/dist/floorplan/TopviewFloorplanPlugin/index.cjs.js +0 -1
  576. package/dist/index..js +0 -530
  577. package/dist/index.cjs.js +0 -16
@@ -1 +0,0 @@
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;
@@ -1,258 +0,0 @@
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+XizCDzfbMvT8CBwIAIhkgMBy9c3g0CIZDNdn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zPNJAOvvD4QjkOAj0hUAbdUOVMoHrqudT1OgSk2zgLkAl2n/LYvh9s900kutYV4UIvQiBXMMlBEAgCQWA1CBRCgUjmHAkI5vk+PACR1BcZmGmfH64GzTQkCASBILBhBAqhgEC9rDFGJI7FGJEcB4EgEASCQBAIAkEgCASBIBAEgkAQCAJBIAgEgSAQBIJAEAgCm0fg/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
- };
@@ -1 +0,0 @@
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+kAuJhkI55OSPi75pyIcvKNIEFgcgRDJ4hD3ewMZLDwDXqfOq9RNFCYOCAMPYx851BDjIXiWzky9Tpyvw0kOL/nc+Jh7DyGqko+P+cznVLwMf31Uypz7jZLJ0GEy8jqURnl8zPjyObDEsxknztsDUnFvMfF8e+4X6j88F4hlTDT3de6BiAYsI0HgxgiES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ACIU2xIuGreB8CIdIvAtJzNogMosHI4mYkCDSHgPTUXspU2ItoEIvzEArlxWRvIlGFWTSnsnWF+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;
@@ -1,63 +0,0 @@
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
- };
@@ -1 +0,0 @@
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;