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

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,1414 +0,0 @@
1
- var de = Object.defineProperty;
2
- var ie = Object.getOwnPropertySymbols;
3
- var ue = Object.prototype.hasOwnProperty, fe = Object.prototype.propertyIsEnumerable;
4
- var Q = (o, s, e) => s in o ? de(o, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[s] = e, v = (o, s) => {
5
- for (var e in s || (s = {}))
6
- ue.call(s, e) && Q(o, e, s[e]);
7
- if (ie)
8
- for (var e of ie(s))
9
- fe.call(s, e) && Q(o, e, s[e]);
10
- return o;
11
- };
12
- var l = (o, s, e) => (Q(o, typeof s != "symbol" ? s + "" : s, e), e);
13
- var R = (o, s, e) => new Promise((t, n) => {
14
- var r = (c) => {
15
- try {
16
- a(e.next(c));
17
- } catch (p) {
18
- n(p);
19
- }
20
- }, i = (c) => {
21
- try {
22
- a(e.throw(c));
23
- } catch (p) {
24
- n(p);
25
- }
26
- }, a = (c) => c.done ? t(c.value) : Promise.resolve(c.value).then(r, i);
27
- a((e = e.apply(o, s)).next());
28
- });
29
- import { Controller as ge } from "../chunks/es/BasePlugin.813e25f7.es.js";
30
- import * as h from "three";
31
- import { Object3D as be, Vector3 as y } from "three";
32
- import { CSS3DObject as ye } from "three/examples/jsm/renderers/CSS3DRenderer";
33
- import { CSS3DRender as me, CSS3DObjectPlus as ve } from "../chunks/es/CSS3DRender.5652510e.es.js";
34
- import { Subscribe as ae } from "../chunks/es/Subscribe.c73e0f91.es.js";
35
- import { notNil as we } from "../chunks/es/isNil.212842d9.es.js";
36
- class W extends be {
37
- constructor(e, t) {
38
- var n;
39
- super();
40
- l(this, "originObject3D");
41
- l(this, "onRender");
42
- this.originObject3D = e, this.onRender = (n = t == null ? void 0 : t.onRender) != null ? n : () => {
43
- };
44
- }
45
- get helperObject() {
46
- return this;
47
- }
48
- render() {
49
- this.onRender();
50
- }
51
- show() {
52
- this.visible = !0, this.render();
53
- }
54
- hide() {
55
- this.visible = !1, this.render();
56
- }
57
- updatePosition() {
58
- this.position.copy(this.originObject3D.position);
59
- }
60
- updateQuaternion() {
61
- this.quaternion.copy(this.originObject3D.quaternion);
62
- }
63
- applyHelperScaleMatrix4(e, t) {
64
- this.scale.applyMatrix4(e);
65
- }
66
- applyHelperQuaternion(e, t) {
67
- this.applyQuaternion(e);
68
- }
69
- }
70
- class xe extends W {
71
- }
72
- class De extends W {
73
- }
74
- class Ce extends W {
75
- }
76
- class Ee extends Ce {
77
- }
78
- class je extends h.Group {
79
- constructor(e) {
80
- super();
81
- l(this, "direction");
82
- this.direction = e || "x";
83
- }
84
- }
85
- class re extends h.Mesh {
86
- constructor(e, t, n) {
87
- super(e, t);
88
- l(this, "direction");
89
- this.direction = n || "x";
90
- }
91
- }
92
- function He(o, s) {
93
- const { offsetWidth: e, offsetHeight: t } = s, { top: n, left: r } = s.getBoundingClientRect();
94
- return Object.assign(new h.Vector2(), {
95
- x: (o.x - r) / e * 2 - 1,
96
- y: -(o.y - n) / t * 2 + 1
97
- });
98
- }
99
- function Z(o, s, e) {
100
- if (!s || !e || !o)
101
- return;
102
- const t = He(s, e);
103
- if (Math.abs(t.x) === 1 || Math.abs(t.y) === 1)
104
- return;
105
- const n = new h.Raycaster();
106
- return n.setFromCamera(t, o), n;
107
- }
108
- function Oe(o, s) {
109
- 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);
110
- }
111
- class G extends je {
112
- constructor(e) {
113
- var u;
114
- super(e.direction);
115
- l(this, "line");
116
- l(this, "arrow");
117
- l(this, "lineHeight", 0.4);
118
- l(this, "arrowHeight", 0.1);
119
- this.name = "ArrowGroup";
120
- const t = new h.Color((u = e.color) != null ? u : 16214315), n = new h.MeshBasicMaterial({
121
- color: t,
122
- depthTest: !1,
123
- opacity: 1,
124
- transparent: !0,
125
- side: h.DoubleSide
126
- }), r = new h.ConeGeometry(0.04, 0.1, 32), i = new re(r, n.clone(), e.direction);
127
- i.name = `arrow-${e.direction}`, this.arrow = i;
128
- const a = 4e-3, c = new h.CylinderGeometry(a, a, 0.4, 32), p = new re(c, n.clone(), e.direction);
129
- p.name = `line-${e.direction}`, this.line = p, this.formatArrow(), this.formatLine(), this.add(this.arrow, this.line);
130
- }
131
- formatArrow() {
132
- 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);
133
- }
134
- formatLine() {
135
- 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);
136
- }
137
- }
138
- const F = {
139
- X: 15618642,
140
- Y: 4765519,
141
- Z: 4227839
142
- };
143
- class j {
144
- static get X() {
145
- return new h.Color(F.X).convertSRGBToLinear().clone();
146
- }
147
- static get Y() {
148
- return new h.Color(F.Y).convertSRGBToLinear().clone();
149
- }
150
- static get Z() {
151
- return new h.Color(F.Z).convertSRGBToLinear().clone();
152
- }
153
- }
154
- class _e extends xe {
155
- constructor(e) {
156
- super(e);
157
- l(this, "xArrow", new G({ direction: "x", color: j.X }));
158
- l(this, "yArrow", new G({ direction: "y", color: j.Y }));
159
- l(this, "zArrow", new G({ direction: "z", color: j.Z }));
160
- this.add(this.xArrow), this.add(this.yArrow), this.add(this.zArrow);
161
- }
162
- show() {
163
- super.show(), this.xArrow.visible = !0, this.yArrow.visible = !0, this.zArrow.visible = !0;
164
- }
165
- showDraggingHelper(e) {
166
- this.xArrow.visible = e.includes("x"), this.yArrow.visible = e.includes("y"), this.zArrow.visible = e.includes("z");
167
- }
168
- dispose() {
169
- this.remove(this.xArrow, this.yArrow, this.zArrow);
170
- }
171
- }
172
- function A(o, s) {
173
- return Me(document.createElement(s != null ? s : "div"), o);
174
- }
175
- function Me(o, s) {
176
- if (!s)
177
- return o;
178
- for (const e in s)
179
- e && s[e] && (o.style[e] = s[e]);
180
- return o;
181
- }
182
- function Se(o) {
183
- const s = A(v({
184
- position: "absolute",
185
- display: "block",
186
- borderRadius: "4px",
187
- paddingTop: "1px",
188
- paddingBottom: "1px",
189
- paddingLeft: "4px",
190
- paddingRight: "4px",
191
- pointerEvents: "none",
192
- userSelect: "none",
193
- zIndex: "9999",
194
- backgroundColor: "rgba(0,0,0,0.7)",
195
- fontSize: "12px",
196
- color: "#fff",
197
- letterSpacing: "0",
198
- lineHeight: "18px"
199
- }, o)), e = () => {
200
- s.style.display !== "block" && (!s.style.top || !s.style.left || (s.style.display = "block"));
201
- };
202
- return { element: s, show: e, hide: () => {
203
- s.style.display = "none", s.style.top = "", s.style.left = "";
204
- }, setLeftTop: (r, i) => {
205
- s.style.left = r, s.style.top = i, e();
206
- } };
207
- }
208
- class Ie extends De {
209
- constructor(e, t) {
210
- var n;
211
- super(e);
212
- l(this, "yzCircle", new q({ direction: "x", color: j.X }));
213
- l(this, "xzCircle", new q({ direction: "y", color: j.Y }));
214
- l(this, "xyCircle", new q({ direction: "z", color: j.Z }));
215
- l(this, "xRingHelper", new U({ direction: "x" }));
216
- l(this, "yRingHelper", new U({ direction: "y" }));
217
- l(this, "zRingHelper", new U({ direction: "z" }));
218
- l(this, "xAngleHelper", new X({ direction: "x", color: j.X }));
219
- l(this, "yAngleHelper", new X({ direction: "y", color: j.Y }));
220
- l(this, "zAngleHelper", new X({ direction: "z", color: j.Z }));
221
- l(this, "angleTips");
222
- l(this, "container");
223
- t && (this.container = t == null ? void 0 : t.container, this.angleTips = Se({ display: "none" }), (n = this.container) == null || n.appendChild(this.angleTips.element)), this.show();
224
- }
225
- updateAngleHelperQuaternion() {
226
- 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);
227
- }
228
- applyHelperQuaternion(e, t) {
229
- 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);
230
- }
231
- hide() {
232
- this.remove(
233
- this.yzCircle,
234
- this.xzCircle,
235
- this.xyCircle,
236
- this.xRingHelper,
237
- this.yRingHelper,
238
- this.zRingHelper,
239
- this.xAngleHelper,
240
- this.yAngleHelper,
241
- this.zAngleHelper
242
- );
243
- }
244
- show() {
245
- var e;
246
- 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();
247
- }
248
- showDraggingHelper(e) {
249
- var t;
250
- this.hide(), this.add(...this.filterRingHelper(e)), this.add(...this.filterAngleHelper(e)), (t = this.angleTips) == null || t.show();
251
- }
252
- dispose() {
253
- var e, t;
254
- this.remove(
255
- this.yzCircle,
256
- this.xzCircle,
257
- this.xyCircle,
258
- this.xRingHelper,
259
- this.yRingHelper,
260
- this.zRingHelper,
261
- this.xAngleHelper,
262
- this.yAngleHelper,
263
- this.zAngleHelper
264
- ), (e = this.angleTips) != null && e.element && ((t = this.container) == null || t.removeChild(this.angleTips.element));
265
- }
266
- filterRingHelper(e) {
267
- return [this.xRingHelper, this.yRingHelper, this.zRingHelper].filter((t) => e.includes(t.direction));
268
- }
269
- filterAngleHelper(e) {
270
- return [this.xAngleHelper, this.yAngleHelper, this.zAngleHelper].filter((t) => e.includes(t.direction));
271
- }
272
- }
273
- class q extends h.Mesh {
274
- constructor(e) {
275
- var t;
276
- super();
277
- l(this, "direction");
278
- l(this, "gapAngle", 0.02);
279
- l(this, "geometry", new h.RingGeometry(0.25, 0.3, 20, 8, this.gapAngle, Math.PI / 2 - this.gapAngle * 2));
280
- this.material = new h.MeshBasicMaterial({
281
- opacity: 0.6,
282
- color: (t = e.color) != null ? t : 16777215,
283
- transparent: !0,
284
- side: h.DoubleSide,
285
- depthTest: !1
286
- }), 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);
287
- }
288
- }
289
- class U extends h.Group {
290
- constructor(e) {
291
- super();
292
- l(this, "direction");
293
- this.direction = e.direction;
294
- const t = 0.015, n = new Array(8).fill(null).map((r, i) => {
295
- const a = new h.RingGeometry(0.25, 0.3, 20, 8, Math.PI / 4 * i + t, Math.PI / 4 - t * 2), c = new h.MeshBasicMaterial({
296
- opacity: 1,
297
- color: 16777215,
298
- depthTest: !1,
299
- transparent: !0,
300
- side: h.DoubleSide
301
- }), p = new h.Mesh(a, c);
302
- return p.name = `AxesDashedRing-${this.direction}-${i}`, p;
303
- });
304
- this.add(...n), this.direction === "y" ? this.rotateX(Math.PI / 2) : this.direction === "x" && this.rotateY(-Math.PI / 2);
305
- }
306
- }
307
- class X extends h.Mesh {
308
- constructor(e) {
309
- var n;
310
- super();
311
- l(this, "direction");
312
- l(this, "baseAxes");
313
- switch (e.direction) {
314
- case "x":
315
- this.baseAxes = new h.Vector3(0, 0, 1);
316
- break;
317
- case "y":
318
- this.baseAxes = new h.Vector3(1, 0, 0);
319
- break;
320
- case "z":
321
- this.baseAxes = new h.Vector3(1, 0, 0);
322
- break;
323
- }
324
- const t = 0.3 + 5e-4;
325
- this.geometry = new h.CircleGeometry(t, 48, 0, 1e-4), this.material = new h.MeshBasicMaterial({
326
- opacity: 0.4,
327
- color: (n = e.color) != null ? n : 16777215,
328
- depthTest: !1,
329
- transparent: !0,
330
- side: h.DoubleSide
331
- }), this.direction = e.direction, this.direction === "y" ? this.rotateX(Math.PI / 2) : this.direction === "x" && this.rotateY(-Math.PI / 2);
332
- }
333
- }
334
- function Pe() {
335
- const o = A({
336
- width: "100%",
337
- height: "100%",
338
- left: "0",
339
- top: "0",
340
- position: "absolute",
341
- pointerEvents: "none"
342
- }), s = A({
343
- boxSizing: "border-box",
344
- width: "100%",
345
- height: "100%",
346
- left: "0",
347
- top: "0",
348
- position: "relative",
349
- display: "flex",
350
- alignItems: "center",
351
- justifyContent: "center"
352
- }), e = A({
353
- boxSizing: "border-box",
354
- width: "100%",
355
- height: "100%",
356
- left: "0",
357
- top: "0",
358
- position: "absolute",
359
- border: "1px solid rgba(255,255,255,0.4)"
360
- });
361
- o.appendChild(s), s.appendChild(e);
362
- const t = "-4px", n = { direction: "nesw", element: O({ cursor: "nesw-resize", left: t, bottom: t }) }, r = { direction: "ns", element: O({ cursor: "ns-resize", bottom: t }) }, i = { direction: "nwse", element: O({ cursor: "nwse-resize", right: t, bottom: t }) }, a = { direction: "ew", element: O({ cursor: "ew-resize", right: t }) }, c = { direction: "nesw", element: O({ cursor: "nesw-resize", right: t, top: t }) }, p = { direction: "ns", element: O({ cursor: "ns-resize", top: t }) }, u = { direction: "nwse", element: O({ cursor: "nwse-resize", left: t, top: t }) }, g = { direction: "ew", element: O({ cursor: "ew-resize", left: t }) };
363
- return new Array(r, a, p, g, n, i, c, u).forEach((m) => s.appendChild(m.element)), { container: o, squares: [
364
- n,
365
- r,
366
- i,
367
- a,
368
- c,
369
- p,
370
- u,
371
- g
372
- ] };
373
- }
374
- function O(o) {
375
- const s = A(v({
376
- background: "#FFFFFF",
377
- width: "9px",
378
- height: "9px",
379
- position: "absolute",
380
- pointerEvents: "none"
381
- }, o)), e = A({
382
- width: "15px",
383
- height: "15px",
384
- position: "absolute",
385
- left: "50%",
386
- top: "50%",
387
- transform: "translate(-50%, -50%)",
388
- pointerEvents: "none"
389
- }), t = A({
390
- width: "15px",
391
- height: "15px",
392
- cursor: o == null ? void 0 : o.cursor,
393
- pointerEvents: "auto",
394
- background: "transparent"
395
- });
396
- return t.draggable = !0, e.appendChild(t), s.appendChild(e), s;
397
- }
398
- class Ae extends Ee {
399
- constructor(e, t, n, r) {
400
- super(e);
401
- l(this, "points", []);
402
- l(this, "cornerPositions", []);
403
- l(this, "css3DInstance");
404
- l(this, "plane");
405
- l(this, "css3DRenderer", new me());
406
- l(this, "camera");
407
- l(this, "scene");
408
- l(this, "container");
409
- l(this, "enabled", !1);
410
- this.camera = n, this.scene = r, this.container = t, this.initRectangleScaleHelper();
411
- }
412
- get helperObject() {
413
- var e;
414
- if (!((e = this.css3DInstance) != null && e.css3DObject))
415
- throw new Error("css3DInstance is not initialized");
416
- return this.css3DInstance.css3DObject;
417
- }
418
- updatePosition() {
419
- var e;
420
- this.helperObject.position.copy(this.originObject3D.position), (e = this.plane) == null || e.position.copy(this.originObject3D.position);
421
- }
422
- updateQuaternion() {
423
- var e;
424
- (e = this.plane) == null || e.quaternion.copy(this.originObject3D.quaternion);
425
- }
426
- applyMatrix4(e) {
427
- var t;
428
- super.applyMatrix4(e), this.helperObject.applyMatrix4(e), (t = this.plane) == null || t.applyMatrix4(e), this.cornerPositions.forEach((n) => n.applyMatrix4(e));
429
- }
430
- showDraggingHelper() {
431
- }
432
- applyHelperScaleMatrix4(e, t) {
433
- var n;
434
- (n = this.plane) == null || n.scale.applyMatrix4(e), this.helperObject.applyScaleMatrix4(e);
435
- }
436
- updatePoints() {
437
- const e = this.calculatePointPosition(this.cornerPositions);
438
- this.points.forEach((t, n) => {
439
- t.position.copy(e[n]);
440
- });
441
- }
442
- applyHelperQuaternion(e, t) {
443
- var r;
444
- const n = (r = this.css3DInstance) == null ? void 0 : r.css3DObject;
445
- if (n) {
446
- const i = new h.Vector3().subVectors(n.position, t).applyQuaternion(e).add(t);
447
- n.position.copy(i), n.applyQuaternion(e);
448
- }
449
- if (this.plane) {
450
- const i = new h.Vector3().subVectors(this.plane.position, t).applyQuaternion(e).add(t);
451
- this.plane.position.copy(i), this.plane.applyQuaternion(e);
452
- }
453
- this.cornerPositions.forEach((i) => {
454
- const a = new h.Vector3().subVectors(i, t).applyQuaternion(e).add(t);
455
- i.copy(a);
456
- });
457
- }
458
- enable() {
459
- var e;
460
- this.enabled || (this.enabled = !0, (e = this.css3DInstance) == null || e.enable(), this.plane && this.scene.add(this.plane));
461
- }
462
- disable() {
463
- var e;
464
- !this.enabled || (this.enabled = !1, (e = this.css3DInstance) == null || e.disable(), this.plane && this.scene.remove(this.plane));
465
- }
466
- show() {
467
- var e;
468
- (e = this.css3DInstance) == null || e.show(), this.plane && (this.plane.visible = !0);
469
- }
470
- hide() {
471
- var e;
472
- (e = this.css3DInstance) == null || e.hide(), this.plane && (this.plane.visible = !1);
473
- }
474
- dispose() {
475
- this.disable(), this.css3DRenderer.dispose();
476
- }
477
- initRectangleScaleHelper() {
478
- var u;
479
- const e = this.getCornerPositions();
480
- if (!e)
481
- return;
482
- this.cornerPositions = e;
483
- const t = this.css3DRenderer.create3DElement(this.camera, e, { ratio: 3e-3 });
484
- if (!t)
485
- return;
486
- this.css3DInstance = t, t.appendToElement(this.container);
487
- const n = t.css3DObject.container, { container: r, squares: i } = Pe();
488
- this.points = i.map((g, d) => ({
489
- direction: g.direction,
490
- point: g.element,
491
- position: this.calculatePointPosition(e)[d]
492
- })), n.insertBefore(r, (u = n.children[0]) != null ? u : null);
493
- const a = new h.PlaneGeometry(t.css3DObject.width, t.css3DObject.height), c = new h.MeshBasicMaterial({
494
- color: 0,
495
- opacity: 0.15,
496
- transparent: !0,
497
- side: h.DoubleSide
498
- }), p = new h.Mesh(a, c);
499
- this.scene.add(p), this.updatePosition();
500
- }
501
- getCornerPositions() {
502
- const { originObject3D: e } = this;
503
- if (e instanceof ye) {
504
- if (e.isCSS3DObjectPlus)
505
- return e.cornerPoints;
506
- console.error("\u6682\u65F6\u53EA\u652F\u6301 CSS3DRenderPlugin \u751F\u6210\u7684\u7269\u4F53");
507
- } else
508
- console.error("\u5F53\u524D\u7269\u4F53\u6682\u65F6\u4E0D\u652F\u6301 ScaleHelper");
509
- }
510
- calculatePointPosition(e) {
511
- return [
512
- e[0].clone(),
513
- e[0].clone().add(e[1]).divideScalar(2),
514
- e[1].clone(),
515
- e[1].clone().add(e[2]).divideScalar(2),
516
- e[2].clone(),
517
- e[2].clone().add(e[3]).divideScalar(2),
518
- e[3].clone(),
519
- e[3].clone().add(e[0]).divideScalar(2)
520
- ];
521
- }
522
- }
523
- new h.Vector3();
524
- function f(o, s) {
525
- this._camera = o || null, this._domElement = s || document, this._raycaster = new h.Raycaster(), this._selected = null, this._boundObjs = {};
526
- var e = this;
527
- this._$onClick = function() {
528
- e._onClick.apply(e, arguments);
529
- }, this._$onDblClick = function() {
530
- e._onDblClick.apply(e, arguments);
531
- }, this._$onMouseMove = function() {
532
- e._onMouseMove.apply(e, arguments);
533
- }, this._$onMouseDown = function() {
534
- e._onMouseDown.apply(e, arguments);
535
- }, this._$onMouseUp = function() {
536
- e._onMouseUp.apply(e, arguments);
537
- }, this._$onTouchMove = function() {
538
- e._onTouchMove.apply(e, arguments);
539
- }, this._$onTouchStart = function() {
540
- e._onTouchStart.apply(e, arguments);
541
- }, this._$onTouchEnd = function() {
542
- e._onTouchEnd.apply(e, arguments);
543
- }, this._$onContextmenu = function() {
544
- e._onContextmenu.apply(e, arguments);
545
- }, 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);
546
- }
547
- f.prototype.destroy = function() {
548
- 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);
549
- };
550
- f.eventNames = [
551
- "click",
552
- "dblclick",
553
- "mouseover",
554
- "mouseout",
555
- "mousemove",
556
- "mousedown",
557
- "mouseup",
558
- "contextmenu",
559
- "touchstart",
560
- "touchend"
561
- ];
562
- f.prototype._getRelativeMouseXY = function(o) {
563
- var s = o.target || o.srcElement;
564
- s.nodeType === 3 && (s = s.parentNode);
565
- var e = { x: 0, y: 0 }, t = s, n = getComputedStyle(t, null);
566
- e.y += parseInt(n.getPropertyValue("padding-top"), 10), e.x += parseInt(n.getPropertyValue("padding-left"), 10);
567
- do
568
- 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);
569
- while (t = t.offsetParent);
570
- var r = {
571
- width: s === window ? window.innerWidth : s.offsetWidth,
572
- height: s === window ? window.innerHeight : s.offsetHeight
573
- };
574
- return {
575
- x: Number((o.pageX - e.x) / r.width) * 2 - 1,
576
- y: -((o.pageY - e.y) / r.height) * 2 + 1
577
- };
578
- };
579
- f.prototype._objectCtxInit = function(o) {
580
- o._3xDomEvent = {};
581
- };
582
- f.prototype._objectCtxDeinit = function(o) {
583
- delete o._3xDomEvent;
584
- };
585
- f.prototype._objectCtxIsInit = function(o) {
586
- return !!o._3xDomEvent;
587
- };
588
- f.prototype._objectCtxGet = function(o) {
589
- return o._3xDomEvent;
590
- };
591
- f.prototype.camera = function(o) {
592
- return o && (this._camera = o), this._camera;
593
- };
594
- f.prototype.bind = function(o, s, e, t) {
595
- console.assert(f.eventNames.indexOf(s) !== -1, "not available events:" + s), this._objectCtxIsInit(o) || this._objectCtxInit(o);
596
- var n = this._objectCtxGet(o);
597
- n[s + "Handlers"] || (n[s + "Handlers"] = []), n[s + "Handlers"].push({
598
- callback: e,
599
- useCapture: t
600
- }), this._boundObjs[s] === void 0 && (this._boundObjs[s] = []), this._boundObjs[s].push(o);
601
- };
602
- f.prototype.addEventListener = f.prototype.bind;
603
- f.prototype.unbind = function(o, s, e, t) {
604
- console.assert(f.eventNames.indexOf(s) !== -1, "not available events:" + s), this._objectCtxIsInit(o) || this._objectCtxInit(o);
605
- var n = this._objectCtxGet(o);
606
- n[s + "Handlers"] || (n[s + "Handlers"] = []);
607
- for (var r = n[s + "Handlers"], i = 0; i < r.length; i++) {
608
- var a = r[i];
609
- if (e == a.callback && t == a.useCapture) {
610
- r.splice(i, 1);
611
- break;
612
- }
613
- }
614
- var c = this._boundObjs[s].indexOf(o);
615
- console.assert(c !== -1), this._boundObjs[s].splice(c, 1);
616
- };
617
- f.prototype.removeEventListener = f.prototype.unbind;
618
- f.prototype._bound = function(o, s) {
619
- var e = this._objectCtxGet(s);
620
- return e ? !!e[o + "Handlers"] : !1;
621
- };
622
- f.prototype._onMove = function(o, s, e, t) {
623
- var n = this._boundObjs[o];
624
- if (!(n === void 0 || n.length === 0)) {
625
- var r = new h.Vector2();
626
- r.set(s, e), this._raycaster.setFromCamera(r, this._camera);
627
- var i = this._raycaster.intersectObjects(n), a = this._selected;
628
- if (i.length > 0) {
629
- var c, p, u, g = i[0], d = g.object;
630
- this._selected = d, u = this._bound("mousemove", d), a != d && (c = this._bound("mouseover", d), p = a && this._bound("mouseout", a));
631
- } else
632
- p = a && this._bound("mouseout", a), this._selected = null;
633
- u && this._notify("mousemove", d, t, g), c && this._notify("mouseover", d, t, g), p && this._notify("mouseout", a, t, g);
634
- }
635
- };
636
- f.prototype._onEvent = function(o, s, e, t) {
637
- var n = this._boundObjs[o];
638
- if (!(n === void 0 || n.length === 0)) {
639
- var r = new h.Vector2();
640
- r.set(s, e), this._raycaster.setFromCamera(r, this._camera);
641
- var i = this._raycaster.intersectObjects(n, !0);
642
- if (i.length !== 0) {
643
- for (var a = i[0], c = a.object, p = this._objectCtxGet(c), u = c.parent; typeof p == "undefined" && u; )
644
- p = this._objectCtxGet(u), u = u.parent;
645
- !p || this._notify(o, c, t, a);
646
- }
647
- }
648
- };
649
- f.prototype._notify = function(o, s, e, t) {
650
- var n = this._objectCtxGet(s), r = n ? n[o + "Handlers"] : null;
651
- if (console.assert(arguments.length === 4), !n || !r || r.length === 0) {
652
- s.parent && this._notify(o, s.parent, e, t);
653
- return;
654
- }
655
- for (var r = n[o + "Handlers"], i = 0; i < r.length; i++) {
656
- var a = r[i], c = !0;
657
- a.callback({
658
- type: o,
659
- target: s,
660
- origDomEvent: e,
661
- intersect: t,
662
- stopPropagation: function() {
663
- c = !1;
664
- }
665
- }), !!c && a.useCapture === !1 && s.parent && this._notify(o, s.parent, e, t);
666
- }
667
- };
668
- f.prototype._onMouseDown = function(o) {
669
- return this._onMouseEvent("mousedown", o);
670
- };
671
- f.prototype._onMouseUp = function(o) {
672
- return this._onMouseEvent("mouseup", o);
673
- };
674
- f.prototype._onMouseEvent = function(o, s) {
675
- var e = this._getRelativeMouseXY(s);
676
- this._onEvent(o, e.x, e.y, s);
677
- };
678
- f.prototype._onMouseMove = function(o) {
679
- var s = this._getRelativeMouseXY(o);
680
- this._onMove("mousemove", s.x, s.y, o), this._onMove("mouseover", s.x, s.y, o), this._onMove("mouseout", s.x, s.y, o);
681
- };
682
- f.prototype._onClick = function(o) {
683
- this._onMouseEvent("click", o);
684
- };
685
- f.prototype._onDblClick = function(o) {
686
- this._onMouseEvent("dblclick", o);
687
- };
688
- f.prototype._onContextmenu = function(o) {
689
- this._onMouseEvent("contextmenu", o);
690
- };
691
- f.prototype._onTouchStart = function(o) {
692
- return this._onTouchEvent("touchstart", o);
693
- };
694
- f.prototype._onTouchEnd = function(o) {
695
- return this._onTouchEvent("touchend", o);
696
- };
697
- f.prototype._onTouchMove = function(o) {
698
- if (o.touches.length == 1) {
699
- o.preventDefault();
700
- var s = Number(o.touches[0].pageX / window.innerWidth) * 2 - 1, e = -(o.touches[0].pageY / window.innerHeight) * 2 + 1;
701
- this._onMove("mousemove", s, e, o), this._onMove("mouseover", s, e, o), this._onMove("mouseout", s, e, o);
702
- }
703
- };
704
- f.prototype._onTouchEvent = function(o, s) {
705
- if (s.touches.length == 1) {
706
- s.preventDefault();
707
- var e = Number(s.touches[0].pageX / window.innerWidth) * 2 - 1, t = -(s.touches[0].pageY / window.innerHeight) * 2 + 1;
708
- this._onEvent(o, e, t, s);
709
- }
710
- };
711
- let P = null;
712
- class N {
713
- constructor(s, e, t, n, r, i, a) {
714
- l(this, "hooks", new ae());
715
- l(this, "helperObject3D");
716
- l(this, "originObject3D");
717
- l(this, "camera");
718
- l(this, "model");
719
- l(this, "scene");
720
- l(this, "container");
721
- l(this, "domEvents");
722
- l(this, "isDragging", !1);
723
- l(this, "onRender");
724
- l(this, "enabled", !1);
725
- l(this, "onWantsTapGesture", (s) => {
726
- if (this.getIntersectObject(s))
727
- return !1;
728
- });
729
- this.camera = s, this.model = e, this.originObject3D = t, this.helperObject3D = n, this.container = r, this.scene = i, this.domEvents = new f(s, r), this.onRender = a != null ? a : () => {
730
- }, this.initialHelperPosition(), this.initialHelperQuaternion(), this.enable();
731
- }
732
- initialHelperPosition() {
733
- this.helperObject3D.updatePosition();
734
- }
735
- initialHelperQuaternion() {
736
- this.helperObject3D.updateQuaternion();
737
- }
738
- enable() {
739
- this.enabled || (this.enabled = !0, this.scene.add(this.helperObject3D), this.render());
740
- }
741
- disable() {
742
- !this.enabled || (this.enabled = !1, this.scene.remove(this.helperObject3D), this.render());
743
- }
744
- show() {
745
- this.helperObject3D.show(), this.render();
746
- }
747
- hide() {
748
- this.helperObject3D.hide(), this.render();
749
- }
750
- dispose() {
751
- this.helperObject3D.dispose(), this.scene.remove(this.helperObject3D), this.render();
752
- }
753
- setOpacity(s) {
754
- this.setOriginOpacityProperty();
755
- const e = this.originObject3D;
756
- if (e instanceof h.Mesh && (e.material.opacity = s), e.isCSS3DObjectPlus) {
757
- const t = e;
758
- t.container.style.opacity = s.toString();
759
- }
760
- this.render();
761
- }
762
- restoreOpacity() {
763
- if (P === null)
764
- return;
765
- const s = this.originObject3D;
766
- if (s instanceof h.Mesh && (s.material.opacity = P.opacity), s.isCSS3DObjectPlus) {
767
- const e = s;
768
- e.container.style.opacity = P.opacity.toString();
769
- }
770
- this.render();
771
- }
772
- setOriginOpacityProperty() {
773
- var s, e;
774
- if (P === null) {
775
- const t = this.originObject3D;
776
- t instanceof h.Mesh && (P = {
777
- opacity: t.material.opacity
778
- }), t instanceof ve && (P = {
779
- opacity: (s = t.container.style.opacity) != null ? s : 1
780
- }), t.isCSS3DObjectPlus && (P = {
781
- opacity: Number((e = t.container.style.opacity) != null ? e : 1)
782
- });
783
- }
784
- }
785
- updateHelperPosition() {
786
- this.helperObject3D.updatePosition();
787
- }
788
- updateHelperQuaternion() {
789
- this.helperObject3D.updateQuaternion();
790
- }
791
- applyHelperMatrix4(s) {
792
- this.helperObject3D.applyMatrix4(s);
793
- }
794
- applyHelperQuaternion(s, e) {
795
- this.helperObject3D.applyHelperQuaternion(s, e);
796
- }
797
- applyHelperScaleMatrix4(s, e) {
798
- this.helperObject3D.applyHelperScaleMatrix4(s, e);
799
- }
800
- onWantsGesture(s, e, t) {
801
- if (this.isDragging)
802
- return !1;
803
- }
804
- render() {
805
- this.onRender();
806
- }
807
- hoverListener(s, e = 16777215, t = 1) {
808
- const n = (Array.isArray(s) ? s : [s]).filter(we), r = [];
809
- for (const i of n)
810
- if (i instanceof h.Mesh || i instanceof h.Group) {
811
- const a = i instanceof h.Group ? i.children.filter((d) => d instanceof h.Mesh) : [i];
812
- a.forEach((d) => {
813
- d.__originalColor__ = d.material.color.clone(), d.__originalOpacity__ = d.material.opacity;
814
- });
815
- const c = () => {
816
- a.forEach((d) => {
817
- d.material.color.set(e), d.material.opacity = t;
818
- }), this.render();
819
- }, p = () => {
820
- a.forEach((d) => {
821
- d.material.color.copy(d.__originalColor__), d.material.opacity = d.__originalOpacity__;
822
- }), this.render();
823
- }, u = () => {
824
- this.isDragging || c();
825
- }, g = () => {
826
- this.isDragging || p();
827
- };
828
- for (const d of a)
829
- 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), r.push(() => {
830
- 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);
831
- });
832
- }
833
- return () => r.forEach((i) => i == null ? void 0 : i());
834
- }
835
- getIntersectObject(s) {
836
- const e = this.camera.position, t = this.helperObject3D;
837
- if (!t)
838
- return;
839
- let n;
840
- const r = s.intersectObject(t, !0)[0];
841
- if (!!r && (n = r, n.object = t, !!n)) {
842
- if (this.model.intersectRaycaster) {
843
- const i = this.model.intersectRaycaster(s)[0];
844
- if (i && i.point.distanceTo(e) < n.point.distanceTo(e))
845
- return;
846
- }
847
- return n.object;
848
- }
849
- }
850
- }
851
- class Re extends N {
852
- constructor(...e) {
853
- super(...e);
854
- l(this, "startInfo");
855
- const t = this.helperObject3D;
856
- this.hoverListener([t.xArrow, t.yArrow, t.zArrow]);
857
- const n = this.dragStart.bind(this), r = this.dragging.bind(this), i = this.dragEnd.bind(this);
858
- this.domEvents.addEventListener(this.helperObject3D, "mousedown", n), document.addEventListener("mousemove", r), document.addEventListener("mouseup", i);
859
- }
860
- dragStart(e) {
861
- if (this.isDragging)
862
- return;
863
- const t = e == null ? void 0 : e.intersect;
864
- if (!t)
865
- return this.dragEnd();
866
- const n = (t == null ? void 0 : t.object).direction;
867
- if (!n)
868
- return this.dragEnd();
869
- const r = new h.Vector3(1, 0, 0).applyQuaternion(this.helperObject3D.quaternion), i = new h.Vector3(0, 1, 0).applyQuaternion(this.helperObject3D.quaternion), a = new h.Vector3(0, 0, 1).applyQuaternion(this.helperObject3D.quaternion), c = (() => {
870
- switch (n) {
871
- case "x":
872
- return r;
873
- case "y":
874
- return i;
875
- case "z":
876
- return a;
877
- }
878
- })(), p = (() => {
879
- switch (n) {
880
- case "x":
881
- case "y":
882
- return a;
883
- case "z":
884
- return r;
885
- }
886
- })(), u = t.point.clone(), g = new h.Plane();
887
- 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");
888
- }
889
- dragging(e) {
890
- if (!this.isDragging || !this.startInfo)
891
- return;
892
- const t = Z(this.camera, e, this.container);
893
- return t ? (console.log("%c RotateController dragging", "color: #49de1b"), this.move(t), !1) : this.dragEnd();
894
- }
895
- move(e) {
896
- if (!this.startInfo)
897
- return this.dragEnd();
898
- const { plane: t, directionVector: n, startVectorProject: r } = this.startInfo, i = this.originObject3D, a = e.ray.intersectPlane(t, new h.Vector3());
899
- if (!a)
900
- return;
901
- const c = a.clone().projectOnVector(n), p = c.clone().sub(r), u = new h.Matrix4();
902
- u.setPosition(p), i.applyMatrix4(u), this.helperObject3D.applyMatrix4(u), r.copy(c), this.hooks.emit("positionUpdate", { matrix4: u });
903
- }
904
- dragEnd() {
905
- !this.isDragging || (console.log("%c MoveController dragEnd", "color: #e94e4e"), this.startInfo = void 0, this.isDragging = !1, this.helperObject3D.show(), this.hooks.emit("moveEnd"));
906
- }
907
- }
908
- class Y {
909
- constructor(s, e, t, n) {
910
- l(this, "helperController");
911
- l(this, "five");
912
- l(this, "onFiveWantsTapGesture", (s) => {
913
- if (!this.helperController)
914
- return;
915
- const e = this.helperController.onWantsTapGesture(s);
916
- return this.five.needsRender = !0, e;
917
- });
918
- l(this, "onFiveWantsGesture", (...s) => {
919
- if (!this.helperController)
920
- return;
921
- const e = this.helperController.onWantsGesture(...s);
922
- return this.five.needsRender = !0, e;
923
- });
924
- const { camera: r, model: i, scene: a } = s, c = s.getElement();
925
- if (this.five = s, !r || !i || !c || !a)
926
- return;
927
- const p = () => {
928
- s.needsRender = !0;
929
- };
930
- this.helperController = new e(r, i, t, n, c, a, p), s.on("wantsTapGesture", this.onFiveWantsTapGesture), s.on("wantsGesture", this.onFiveWantsGesture);
931
- }
932
- }
933
- const ke = "v1.0.1", Le = "Object3DHelper", J = `${Le}@${ke}`, ze = () => {
934
- console.error(`${J} is disposed`);
935
- }, Ve = () => {
936
- console.warn(`${J} is disabled`);
937
- }, Te = () => {
938
- console.error(`${J} is disabled`);
939
- };
940
- class $e {
941
- constructor(s, e) {
942
- l(this, "controllers", {});
943
- l(this, "state", {
944
- visible: !0,
945
- enabled: !0,
946
- disposed: !1
947
- });
948
- l(this, "hooks", new ae());
949
- l(this, "helpers");
950
- l(this, "eventListener", {});
951
- l(this, "handlePositionUpdate", (s, ...e) => {
952
- var r, i, a, c;
953
- const [t] = e, n = t == null ? void 0 : t.matrix4;
954
- n && (s !== this.controllers.moveController && ((r = this.controllers.moveController) == null || r.applyHelperMatrix4(n)), s !== this.controllers.rotateController && ((i = this.controllers.rotateController) == null || i.applyHelperMatrix4(n)), s !== this.controllers.scaleController && ((a = this.controllers.scaleController) == null || a.applyHelperMatrix4(n)), (c = this.helpers.outlineHelper) == null || c.applyMatrix4(n));
955
- });
956
- l(this, "handleScaleUpdate", (s, ...e) => {
957
- var r, i;
958
- const [t] = e, n = t == null ? void 0 : t.matrix4;
959
- n && ((r = this.controllers.scaleController) == null || r.applyHelperScaleMatrix4(n, t), (i = this.helpers.outlineHelper) == null || i.scale.applyMatrix4(n));
960
- });
961
- l(this, "handleRotateUpdate", (s, ...e) => {
962
- var n, r, i, a;
963
- const [t] = e;
964
- if (t) {
965
- const { quaternion: c, origin: p } = t;
966
- c && (s !== this.controllers.moveController && ((n = this.controllers.moveController) == null || n.applyHelperQuaternion(c, p)), s !== this.controllers.rotateController && ((r = this.controllers.rotateController) == null || r.applyHelperQuaternion(c, p)), s !== this.controllers.scaleController && ((i = this.controllers.scaleController) == null || i.applyHelperQuaternion(c, p)), (a = this.helpers.outlineHelper) == null || a.applyQuaternion(c));
967
- }
968
- });
969
- s && this.addControllers(s), this.helpers = e != null ? e : {}, this.setState(this.state);
970
- }
971
- show(s) {
972
- return R(this, null, function* () {
973
- this.setState({ visible: !0 }, s);
974
- });
975
- }
976
- hide(s) {
977
- return R(this, null, function* () {
978
- this.setState({ visible: !1 }, s);
979
- });
980
- }
981
- enable(s) {
982
- this.setState({ enabled: !0 }, s);
983
- }
984
- disable(s) {
985
- this.setState({ enabled: !1 }, s);
986
- }
987
- dispose() {
988
- this.setState({ disposed: !0 });
989
- }
990
- setState(s, e) {
991
- if (this.state.disposed)
992
- return ze();
993
- if (!this.state.enabled && s.enabled !== !0 && s.disposed !== !0)
994
- return Te();
995
- const t = v({}, this.state);
996
- 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 });
997
- }
998
- addControllers(s) {
999
- this.controllers = v(v({}, this.controllers), s), this.addEventListener(), this.setState(this.state);
1000
- }
1001
- addHelpers(s) {
1002
- this.helpers = v(v({}, this.helpers), s);
1003
- }
1004
- getCurrentState() {
1005
- return this.state;
1006
- }
1007
- addEventListener() {
1008
- for (const s in this.controllers) {
1009
- if (!s)
1010
- continue;
1011
- const e = s;
1012
- this.eventListener[e] || (this.eventListener[e] = (() => {
1013
- const t = this.controllers[e];
1014
- if (!t)
1015
- return;
1016
- const n = () => this.handleStart(t), r = () => this.handleEnd(t), i = (...p) => this.handlePositionUpdate(t, ...p), a = (...p) => this.handleRotateUpdate(t, ...p), c = (...p) => this.handleScaleUpdate(t, ...p);
1017
- return t.hooks.on("moveStart", n), t.hooks.on("rotateStart", n), t.hooks.on("scaleStart", n), t.hooks.on("positionUpdate", i), t.hooks.on("rotateUpdate", a), t.hooks.on("scaleUpdate", c), t.hooks.on("moveEnd", r), t.hooks.on("rotateEnd", r), t.hooks.on("scaleEnd", r), () => {
1018
- t.hooks.off("moveStart", n), t.hooks.off("rotateStart", n), t.hooks.off("scaleStart", n), t.hooks.off("positionUpdate", i), t.hooks.off("rotateUpdate", a), t.hooks.off("scaleUpdate", c), t.hooks.off("moveEnd", r), t.hooks.off("rotateEnd", r), t.hooks.off("scaleEnd", r);
1019
- };
1020
- })());
1021
- }
1022
- }
1023
- handleEnd(s) {
1024
- s && this.setOtherHelpersVisible(!0, s);
1025
- }
1026
- handleStart(s) {
1027
- s && this.setOtherHelpersVisible(!1, s);
1028
- }
1029
- setOtherHelpersVisible(s, e) {
1030
- var t, n, r, i;
1031
- s ? ((r = this.controllers.moveController) == null || r.helperObject3D.show(), (i = this.controllers.rotateController) == null || i.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()));
1032
- }
1033
- handleEnable(s, e = !0) {
1034
- s ? (this.everyControllerDo((t) => {
1035
- t.enable();
1036
- }), this.hooks.emit("enable", { userAction: e })) : (this.everyControllerDo((t) => {
1037
- t.disable(), t.restoreOpacity();
1038
- }), this.hooks.emit("disable", { userAction: e })), this.state.enabled = s;
1039
- }
1040
- handleVisible(s, e = !0) {
1041
- s ? (this.everyControllerDo((t) => {
1042
- t.show();
1043
- }), this.actionIfStateIsEnabled(() => this.hooks.emit("show", { userAction: e }))) : (this.everyControllerDo((t) => {
1044
- t.hide(), t.restoreOpacity();
1045
- }), this.actionIfStateIsEnabled(() => this.hooks.emit("hide", { userAction: e }))), this.state.visible = s;
1046
- }
1047
- everyControllerDo(s) {
1048
- Object.values(this.controllers).forEach((e) => {
1049
- e && s(e);
1050
- });
1051
- }
1052
- handleDispose() {
1053
- var s, e;
1054
- Object.values(this.controllers).forEach((t) => {
1055
- t == null || t.dispose(), t == null || t.restoreOpacity();
1056
- });
1057
- for (const t in this.controllers) {
1058
- if (!t)
1059
- continue;
1060
- const n = t;
1061
- (e = (s = this.eventListener)[n]) == null || e.call(s);
1062
- }
1063
- }
1064
- actionIfStateIsEnabled(s, e) {
1065
- if (this.state.enabled)
1066
- return s();
1067
- e != null && e.warnLog && Ve();
1068
- }
1069
- }
1070
- class Qe extends N {
1071
- constructor(...e) {
1072
- super(...e);
1073
- l(this, "startInfo");
1074
- l(this, "lastRotation");
1075
- l(this, "rotations", []);
1076
- l(this, "helperObject3DQuaternion", this.originObject3D.quaternion.clone());
1077
- const t = this.helperObject3D;
1078
- this.hoverListener([t.xyCircle, t.xzCircle, t.yzCircle]);
1079
- const n = this.dragStart.bind(this), r = this.dragging.bind(this), i = this.dragEnd.bind(this);
1080
- this.domEvents.addEventListener(this.helperObject3D, "mousedown", n), document.addEventListener("mousemove", r), document.addEventListener("mouseup", i);
1081
- }
1082
- initialHelperQuaternion() {
1083
- this.helperObject3D.updateAngleHelperQuaternion(), this.helperObject3D.applyHelperQuaternion(this.originObject3D.quaternion);
1084
- }
1085
- dragStart(e) {
1086
- if (this.isDragging)
1087
- return;
1088
- const t = e == null ? void 0 : e.intersect;
1089
- if (!t)
1090
- return this.dragEnd();
1091
- const n = (t == null ? void 0 : t.object).direction;
1092
- if (!n)
1093
- return this.dragEnd();
1094
- this.helperObject3D.updateAngleHelperQuaternion();
1095
- const r = t.point, i = this.originObject3D.position.clone(), a = this.getAngleHelper(n);
1096
- this.setTipsAngle(0);
1097
- const c = r.clone();
1098
- c.y += 0.2, this.setTipsPosition(c);
1099
- 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 = (() => {
1100
- switch (n) {
1101
- case "x":
1102
- return p;
1103
- case "y":
1104
- return u;
1105
- case "z":
1106
- return g;
1107
- }
1108
- })(), m = new h.Plane().setFromNormalAndCoplanarPoint(d, r), D = new h.Vector3();
1109
- m.projectPoint(r.clone(), D);
1110
- const w = D.clone().sub(i), _ = w.clone(), x = w.angleTo(a.baseAxes);
1111
- this.setAngleHelperStart(n, x), this.setAngleHelperLength(n, 0), this.rotations.push({ vector: w.clone(), direction: !0 }), this.startInfo = { direction: n, startVector: w, staticStartVector: _, plane: m, angleHelper: a }, this.helperObject3D.showDraggingHelper([n]), this.hooks.emit("rotateStart"), this.isDragging = !0, console.log(`%c RotateController dragStart ${n}`, "color: #e5af2e");
1112
- }
1113
- dragging(e) {
1114
- var n;
1115
- if (!this.isDragging)
1116
- return;
1117
- const t = Z(this.camera, e, this.container);
1118
- return t ? (console.log(`%c RotateController dragging ${(n = this.startInfo) == null ? void 0 : n.direction}`, "color: #49de1b"), this.rotate(t), !1) : this.dragEnd();
1119
- }
1120
- rotate(e) {
1121
- if (!this.startInfo)
1122
- return this.dragEnd();
1123
- const { startVector: t, plane: n, angleHelper: r, staticStartVector: i, direction: a } = this.startInfo, c = this.originObject3D, p = e.ray.intersectPlane(n, new h.Vector3());
1124
- if (!p)
1125
- return;
1126
- const u = c.position.clone(), g = new h.Vector3();
1127
- n.projectPoint(p.clone(), g);
1128
- const d = g.clone().sub(u);
1129
- if (t.angleTo(d) === 0 || (this.lastRotation === void 0 && (this.lastRotation = { angle: 0 }), this.rotations.length === 0))
1130
- return;
1131
- const m = (() => {
1132
- if (this.rotations.length === 1)
1133
- return d.angleTo(r.baseAxes) > i.angleTo(r.baseAxes);
1134
- {
1135
- const w = this.rotations[this.rotations.length - 1], _ = this.rotations[this.rotations.length - 2], x = d.angleTo(_.vector), M = d.angleTo(w.vector), S = w.vector.angleTo(_.vector);
1136
- if (S === 0 || M === 0 || x === 0)
1137
- return;
1138
- if (x > M && x > S)
1139
- return w.direction;
1140
- if (x < S && M < S || x < M && M > S)
1141
- return !w.direction;
1142
- }
1143
- })();
1144
- if (m === void 0)
1145
- return console.warn("rotationDirection is undefined");
1146
- 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);
1147
- const D = new h.Quaternion().setFromUnitVectors(t.clone().normalize(), d.clone().normalize());
1148
- c.applyQuaternion(D), this.helperObject3D.applyHelperQuaternion(D), this.helperObject3DQuaternion.premultiply(D), this.hooks.emit("rotateUpdate", { quaternion: D, origin: u }), this.startInfo.startVector = d;
1149
- }
1150
- dragEnd() {
1151
- !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"));
1152
- }
1153
- getAngleHelper(e) {
1154
- switch (e) {
1155
- case "x":
1156
- return this.helperObject3D.xAngleHelper;
1157
- case "y":
1158
- return this.helperObject3D.yAngleHelper;
1159
- case "z":
1160
- return this.helperObject3D.zAngleHelper;
1161
- }
1162
- }
1163
- setAngleHelperStart(e, t) {
1164
- const n = this.getAngleHelper(e);
1165
- if (n instanceof h.Mesh && n.geometry instanceof h.CircleGeometry) {
1166
- const { radius: r, segments: i, thetaLength: a } = n.geometry.parameters;
1167
- n.geometry = new h.CircleGeometry(r, i, t, a);
1168
- } else
1169
- console.warn("only support THREE.CircleGeometry");
1170
- }
1171
- setAngleHelperLength(e, t) {
1172
- const r = t >= 0 ? Math.max(t, 1e-3) : Math.min(t, -1e-3), i = this.getAngleHelper(e);
1173
- if (i instanceof h.Mesh && i.geometry instanceof h.CircleGeometry) {
1174
- const { radius: a, thetaStart: c } = i.geometry.parameters, p = Math.ceil(Math.abs(r) * (40 / (2 * Math.PI)));
1175
- i.geometry = new h.CircleGeometry(a, p, c, r);
1176
- } else
1177
- console.warn("only support THREE.CircleGeometry");
1178
- }
1179
- setTipsAngle(e) {
1180
- var n;
1181
- const t = (n = this.helperObject3D.angleTips) == null ? void 0 : n.element;
1182
- !t || (t.innerText = `${e.toFixed(0)}\xB0`);
1183
- }
1184
- setTipsPosition(e) {
1185
- const t = this.helperObject3D.angleTips;
1186
- if (!t)
1187
- return;
1188
- const n = e.project(this.camera), { x: r, y: i, z: a } = n;
1189
- if (a > 1)
1190
- return;
1191
- const c = (r + 1) / 2 * 100 + "%", p = (-i + 1) / 2 * 100 + "%";
1192
- t.setLeftTop(c, p);
1193
- }
1194
- }
1195
- class Ge extends N {
1196
- constructor(...e) {
1197
- super(...e);
1198
- l(this, "startInfo");
1199
- }
1200
- enable() {
1201
- this.helperObject3D.enable(), super.enable();
1202
- }
1203
- disable() {
1204
- this.helperObject3D.disable(), super.disable();
1205
- }
1206
- show() {
1207
- this.helperObject3D.show(), super.show();
1208
- }
1209
- hide() {
1210
- this.helperObject3D.hide(), super.hide();
1211
- }
1212
- getDragPlane() {
1213
- const e = new h.Plane(), t = this.helperObject3D.cornerPositions;
1214
- if (t.length !== 0)
1215
- return t.length < 3 ? e.setFromNormalAndCoplanarPoint(this.originObject3D.getWorldDirection(new y()), t[0]) : e.setFromCoplanarPoints(t[0], t[1], t[2]), e;
1216
- }
1217
- dragStart(e, t) {
1218
- var r, i;
1219
- (i = (r = this.helperObject3D).updatePoints) == null || i.call(r);
1220
- const n = this.getDragPlane();
1221
- if (!n)
1222
- return this.dragEnd();
1223
- 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");
1224
- }
1225
- dragging(e) {
1226
- if (!this.isDragging)
1227
- return;
1228
- const t = Z(this.camera, e, this.container);
1229
- if (!t)
1230
- return this.dragEnd();
1231
- this.scale(t), console.log("%c RectangleScaleController dragging", "color: #49de1b");
1232
- }
1233
- scale(e) {
1234
- var ee, te;
1235
- if (!this.startInfo)
1236
- return;
1237
- const t = this.originObject3D, { startPoint: n, plane: r } = this.startInfo, i = this.helperObject3D.cornerPositions;
1238
- if (i.length < 4)
1239
- return this.dragEnd();
1240
- const a = e.ray.intersectPlane(r, new y());
1241
- if (!a || Oe(a, this.camera.position))
1242
- return;
1243
- const c = new y().addVectors(i[0], i[2]).divideScalar(2), { position: p, direction: u } = n, g = new y().subVectors(i[1], i[0]), d = new y().subVectors(i[3], i[0]), m = (C) => {
1244
- const E = new y(0, 0, 0);
1245
- if (!this.startInfo)
1246
- return E;
1247
- const b = (C === "ew" ? g : d).clone(), H = p.clone().projectOnVector(b), L = a.clone().projectOnVector(b), se = c.clone().projectOnVector(b);
1248
- if (L.equals(H))
1249
- return E;
1250
- if (C === "ns" && typeof this.startInfo.dragPointInCenterBottom != "boolean") {
1251
- const I = new y().subVectors(L, se), V = I.x < 0 && b.x >= 0, T = I.y < 0 && b.y >= 0, $ = I.z < 0 && b.z >= 0;
1252
- this.startInfo.dragPointInCenterBottom = V || T || $;
1253
- }
1254
- if (C === "ew" && typeof this.startInfo.dragPointInCenterLeft != "boolean") {
1255
- const I = new y().subVectors(L, se), V = I.x < 0 && b.x >= 0, T = I.y < 0 && b.y >= 0, $ = I.z < 0 && b.z >= 0;
1256
- this.startInfo.dragPointInCenterLeft = V || T || $;
1257
- }
1258
- const ne = new y().subVectors(L, H), oe = ne.length();
1259
- return oe > 0.3 ? (console.warn("offset.length() > 0.3, skipped", oe), E) : ne;
1260
- }, D = m("ew"), w = m("ns"), _ = () => {
1261
- const C = D;
1262
- this.helperObject3D.cornerPositions.forEach((E, b) => {
1263
- var H;
1264
- (H = this.startInfo) != null && H.dragPointInCenterLeft ? (b === 0 || b === 3) && E.add(C) : (b === 1 || b === 2) && E.add(C);
1265
- });
1266
- }, x = () => {
1267
- const C = w;
1268
- this.helperObject3D.cornerPositions.forEach((E, b) => {
1269
- var H;
1270
- (H = this.startInfo) != null && H.dragPointInCenterBottom ? (b === 0 || b === 1) && E.add(C) : (b === 2 || b === 3) && E.add(C);
1271
- });
1272
- };
1273
- switch (u) {
1274
- case "ew":
1275
- _();
1276
- break;
1277
- case "ns":
1278
- x();
1279
- break;
1280
- case "nesw":
1281
- case "nwse":
1282
- _(), x();
1283
- }
1284
- const M = new y().subVectors(i[1], i[0]).length() / g.length(), S = new y().subVectors(i[3], i[0]).length() / d.length(), ce = new y(M, S, 1), z = new h.Matrix4().scale(ce);
1285
- t.isCSS3DObjectPlus ? t.applyScaleMatrix4(z) : t.scale.applyMatrix4(z), n.position.copy(a);
1286
- const he = new y().addVectors(i[0], i[2]).divideScalar(2), pe = new y().subVectors(he, c), k = new h.Matrix4().setPosition(pe);
1287
- t.applyMatrix4(k), (ee = this.helperObject3D.css3DInstance) == null || ee.css3DObject.applyMatrix4(k), (te = this.helperObject3D.plane) == null || te.applyMatrix4(k), this.hooks.emit("scaleUpdate", { matrix4: z, helperOrigin: c }), this.hooks.emit("positionUpdate", { matrix4: k }), this.render();
1288
- }
1289
- dragEnd() {
1290
- !this.isDragging || (this.startInfo = void 0, this.isDragging = !1, this.hooks.emit("scaleEnd"), this.render(), console.log("%c RectangleScaleController dragEnd", "color: #e94e4e"));
1291
- }
1292
- }
1293
- class Fe extends Ge {
1294
- constructor(...s) {
1295
- super(...s), this.addHTMLEventListener();
1296
- }
1297
- addHTMLEventListener() {
1298
- this.helperObject3D.points.forEach((s) => {
1299
- if (!s)
1300
- return;
1301
- const e = s.point, t = (i) => this.dragStart(i, s), n = this.dragging.bind(this), r = this.dragEnd.bind(this);
1302
- e.addEventListener("dragstart", t), e.addEventListener("drag", n), e.addEventListener("dragend", r);
1303
- });
1304
- }
1305
- }
1306
- const le = "v1.0.0", B = "Object3DHelperPlugin", K = `${B}@${le}`, qe = () => {
1307
- console.error(`${K} is disposed`);
1308
- }, Ue = () => {
1309
- console.warn(`${K} is disabled`);
1310
- }, Xe = () => {
1311
- console.error(`${K} is disabled`);
1312
- };
1313
- class Ye extends ge {
1314
- constructor(e) {
1315
- super(e);
1316
- l(this, "version", le);
1317
- l(this, "name", B);
1318
- l(this, "state", {
1319
- visible: !0,
1320
- enabled: !0,
1321
- disposed: !1
1322
- });
1323
- l(this, "objectHelperMap", /* @__PURE__ */ new Map());
1324
- 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, { [`__${B.toUpperCase()}_DEBUG__`]: this });
1325
- }
1326
- show(e) {
1327
- return R(this, null, function* () {
1328
- this.setState({ visible: !0 }, e);
1329
- });
1330
- }
1331
- hide(e) {
1332
- return R(this, null, function* () {
1333
- this.setState({ visible: !1 }, e);
1334
- });
1335
- }
1336
- enable(e) {
1337
- this.setState({ enabled: !0 }, e);
1338
- }
1339
- disable(e) {
1340
- this.setState({ enabled: !1 }, e);
1341
- }
1342
- dispose() {
1343
- this.setState({ disposed: !0 });
1344
- }
1345
- setState(e, t) {
1346
- if (this.state.disposed)
1347
- return qe();
1348
- if (!this.state.enabled && e.enabled !== !0 && e.disposed !== !0)
1349
- return Xe();
1350
- const n = v({}, this.state);
1351
- 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 });
1352
- }
1353
- getObject3DHelper(e) {
1354
- return this.objectHelperMap.get(e);
1355
- }
1356
- addObject3DHelper(e, t = {}) {
1357
- var u;
1358
- if (!e)
1359
- return console.error("Object3D is undefined");
1360
- if (this.objectHelperMap.has(e)) {
1361
- console.warn(`Object3DHelperPlugin: object3D ${e.name} is already has helper`);
1362
- return;
1363
- }
1364
- const n = new $e();
1365
- this.objectHelperMap.set(e, n);
1366
- const r = (u = this.five.getElement()) == null ? void 0 : u.parentElement, i = this.five.camera, { moveHelper: a = !0, rotateHelper: c = !0, scaleHelper: p = !0 } = t;
1367
- if (a) {
1368
- const g = new _e(e), d = new Y(this.five, Re, e, g);
1369
- n.addControllers({ moveController: d.helperController });
1370
- }
1371
- if (c) {
1372
- let g;
1373
- r && i && (g = { container: r });
1374
- const d = new Ie(e, g), m = new Y(this.five, Qe, e, d);
1375
- n.addControllers({ rotateController: m.helperController });
1376
- }
1377
- if (p && r) {
1378
- const g = new Ae(e, r, i, this.five.scene), d = new Y(this.five, Fe, e, g);
1379
- n.addControllers({ scaleController: d.helperController });
1380
- }
1381
- e.isCSS3DObjectPlus && e.changeMode("behind", this.five.scene);
1382
- }
1383
- removeObject3DHelper(e) {
1384
- const t = this.objectHelperMap.get(e);
1385
- !t || (e.isCSS3DObjectPlus && e.changeMode("front"), this.objectHelperMap.delete(e), t.dispose());
1386
- }
1387
- handleEnable(e, t = !0) {
1388
- 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;
1389
- }
1390
- handleVisible(e, t = !0) {
1391
- 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;
1392
- }
1393
- handleDispose() {
1394
- this.everyHelperDo((e) => e.dispose());
1395
- }
1396
- everyHelperDo(e) {
1397
- this.objectHelperMap.forEach((t) => {
1398
- t && e(t);
1399
- });
1400
- }
1401
- actionIfStateIsEnabled(e, t) {
1402
- if (this.state.enabled)
1403
- return e();
1404
- t != null && t.warnLog && Ue();
1405
- }
1406
- }
1407
- const tt = (o) => new Ye(o);
1408
- export {
1409
- Ye as Object3DHelperController,
1410
- tt as Object3DHelperPlugin,
1411
- K as PLUGIN,
1412
- le as VERSION,
1413
- tt as default
1414
- };