@realsee/dnalogel 3.51.0 → 3.52.0

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 (278) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/Object3DHelperPlugin/Controller.d.ts +9 -9
  3. package/dist/Object3DHelperPlugin/FiveControllerWrapper.d.ts +4 -2
  4. package/dist/PanoMeasurePlugin/Model/area.d.ts +1 -1
  5. package/dist/PanoMeasurePlugin/Model/polygon.d.ts +1 -1
  6. package/dist/PanoMeasurePlugin/typings/data.d.ts +1 -2
  7. package/dist/Sculpt/Editors/BoxMeshEditor.d.ts +5 -0
  8. package/dist/Sculpt/Editors/CircleMeshEditor.d.ts +5 -0
  9. package/dist/Sculpt/Editors/CylinderMeshEditor.d.ts +5 -0
  10. package/dist/Sculpt/Editors/PrismMeshEditor.d.ts +5 -0
  11. package/dist/Sculpt/Editors/RectangleMeshEditor.d.ts +5 -0
  12. package/dist/Sculpt/Meshes/Box.d.ts +6 -24
  13. package/dist/Sculpt/Meshes/Circle.d.ts +0 -4
  14. package/dist/Sculpt/Meshes/Cylinder.d.ts +0 -1
  15. package/dist/Sculpt/Meshes/Line.d.ts +9 -22
  16. package/dist/Sculpt/Meshes/Polygon.d.ts +1 -5
  17. package/dist/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
  18. package/dist/Sculpt/Meshes/Prism.d.ts +29 -10
  19. package/dist/Sculpt/Meshes/Rectangle.d.ts +1 -1
  20. package/dist/Sculpt/Objects/Base/index.d.ts +2 -1
  21. package/dist/Sculpt/Objects/Box/index.d.ts +7 -2
  22. package/dist/Sculpt/Objects/Circle/index.d.ts +3 -0
  23. package/dist/Sculpt/Objects/Cylinder/index.d.ts +3 -0
  24. package/dist/Sculpt/Objects/Line/index.d.ts +3 -0
  25. package/dist/Sculpt/Objects/Point/index.d.ts +3 -0
  26. package/dist/Sculpt/Objects/Polygon/index.d.ts +3 -0
  27. package/dist/Sculpt/Objects/Polyline/index.d.ts +3 -0
  28. package/dist/Sculpt/Objects/Prism/index.d.ts +3 -0
  29. package/dist/Sculpt/Objects/Rectangle/index.d.ts +12 -0
  30. package/dist/Sculpt/index.d.ts +11 -10
  31. package/dist/Sculpt/typings/style.d.ts +6 -0
  32. package/dist/Sculpt/utils/export.d.ts +24 -18
  33. package/dist/Sculpt/utils/sortPositionsByCameraPosition.d.ts +5 -0
  34. package/dist/Sculpt/utils/three/ColoredMesh.d.ts +4 -0
  35. package/dist/index.cjs.js +88 -3009
  36. package/dist/index.d.ts +79 -1
  37. package/dist/index.js +35153 -54255
  38. package/dist/index.umd.js +81 -3002
  39. package/dist/shared-utils/Object3DHelper/Base/BaseController.d.ts +1 -0
  40. package/dist/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +7 -3
  41. package/dist/shared-utils/Object3DHelper/Controller/ScaleController.d.ts +0 -1
  42. package/dist/shared-utils/Object3DHelper/Helper/BoundingBoxHelper.d.ts +3 -1
  43. package/dist/shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.d.ts +2 -0
  44. package/dist/shared-utils/Object3DHelper/Helper/MoveHelper.d.ts +2 -1
  45. package/dist/shared-utils/Object3DHelper/Helper/RotateHelper.d.ts +2 -1
  46. package/dist/shared-utils/Object3DHelper/Helper/ScaleHelper.d.ts +4 -2
  47. package/dist/shared-utils/Object3DHelper/typings/index.d.ts +1 -1
  48. package/dist/shared-utils/Object3DHelper/utils/calculateScaleByCamera.d.ts +4 -1
  49. package/dist/shared-utils/five/FiveLine.d.ts +18 -14
  50. package/dist/shared-utils/index.d.ts +0 -1
  51. package/dist/shared-utils/math/planimetry.d.ts +1 -1
  52. package/dist/shared-utils/tag.d.ts +5 -7
  53. package/dist/shared-utils/three/boundingBox.d.ts +14 -20
  54. package/dist/shared-utils/three/core/LineGeometry.d.ts +13 -0
  55. package/dist/shared-utils/three/core/PrismGeometry.d.ts +14 -0
  56. package/dist/shared-utils/three/geometryUtil.d.ts +8 -0
  57. package/dist/shared-utils/three/getNormal.d.ts +5 -2
  58. package/libs/AreaMakerPlugin/Controller.js +47 -100
  59. package/libs/AreaMakerPlugin/index.js +12 -65
  60. package/libs/AreaMakerPlugin/utils/Item.js +102 -157
  61. package/libs/CSS3DRenderPlugin/Controller.js +45 -93
  62. package/libs/CSS3DRenderPlugin/index.js +15 -63
  63. package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +51 -106
  64. package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +79 -131
  65. package/libs/CruisePlugin/BaseController.js +90 -143
  66. package/libs/CruisePlugin/Move.js +39 -83
  67. package/libs/CruisePlugin/Work.js +52 -96
  68. package/libs/CruisePlugin/index.js +23 -67
  69. package/libs/CurrentPanoImagePlugin/Controller.js +88 -141
  70. package/libs/CurrentPanoImagePlugin/index.js +11 -64
  71. package/libs/GuideLinePlugin/Controller.js +13 -57
  72. package/libs/GuideLinePlugin/GuideLineItem.js +20 -64
  73. package/libs/GuideLinePlugin/GuideLineModeItem/index.js +3 -8
  74. package/libs/GuideLinePlugin/GuideLineModeItem.js +15 -59
  75. package/libs/GuideLinePlugin/index.js +23 -67
  76. package/libs/ModelMakerPlugin/Controller.js +125 -165
  77. package/libs/ModelMakerPlugin/index.js +23 -63
  78. package/libs/ModelMakerPlugin/item/baseItem.js +2 -3
  79. package/libs/ModelMakerPlugin/item/boxItem.js +2 -3
  80. package/libs/ModelMakerPlugin/item/polygonItem.js +6 -7
  81. package/libs/ModelMakerPlugin/item/prismItem.js +2 -3
  82. package/libs/ModelMakerPlugin/utils/getFiveDomEvent.js +2 -3
  83. package/libs/ModelTVVideoPlugin/Plugin.js +49 -97
  84. package/libs/ModelTVVideoPlugin/index.js +8 -56
  85. package/libs/Object3DHelperPlugin/Controller.d.ts +9 -9
  86. package/libs/Object3DHelperPlugin/Controller.js +105 -92
  87. package/libs/Object3DHelperPlugin/FiveControllerWrapper.d.ts +4 -2
  88. package/libs/Object3DHelperPlugin/FiveControllerWrapper.js +35 -30
  89. package/libs/Object3DHelperPlugin/index.js +15 -30
  90. package/libs/PanoCompassPlugin/Controller.js +46 -93
  91. package/libs/PanoCompassPlugin/index.js +17 -64
  92. package/libs/PanoCursorRaycasterPlugin/index.js +4 -3
  93. package/libs/PanoDoorLabelPlugin/BaseController.js +27 -80
  94. package/libs/PanoDoorLabelPlugin/Controller.js +80 -133
  95. package/libs/PanoDoorLabelPlugin/index.js +11 -64
  96. package/libs/PanoMeasurePlugin/Components/Controller0.js +79 -128
  97. package/libs/PanoMeasurePlugin/Components/Controller1.js +92 -141
  98. package/libs/PanoMeasurePlugin/Controller/BaseController.js +3 -2
  99. package/libs/PanoMeasurePlugin/Controller/EditController.js +73 -122
  100. package/libs/PanoMeasurePlugin/Controller/MixedController.js +3 -2
  101. package/libs/PanoMeasurePlugin/Controller/ViewController.js +3 -2
  102. package/libs/PanoMeasurePlugin/Controller/WatchController.js +72 -121
  103. package/libs/PanoMeasurePlugin/Controller/index.js +89 -135
  104. package/libs/PanoMeasurePlugin/Model/area.d.ts +1 -1
  105. package/libs/PanoMeasurePlugin/Model/area.js +25 -74
  106. package/libs/PanoMeasurePlugin/Model/index.js +3 -2
  107. package/libs/PanoMeasurePlugin/Model/line.js +1 -0
  108. package/libs/PanoMeasurePlugin/Model/polygon.d.ts +1 -1
  109. package/libs/PanoMeasurePlugin/Model/polygon.js +7 -7
  110. package/libs/PanoMeasurePlugin/Model/polyline.js +3 -2
  111. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +1 -56
  112. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +17 -66
  113. package/libs/PanoMeasurePlugin/index.js +18 -64
  114. package/libs/PanoMeasurePlugin/typings/data.d.ts +1 -2
  115. package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +5 -59
  116. package/libs/PanoMeasurePlugin/utils/line.js +3 -2
  117. package/libs/PanoRulerProPlugin/Controller.js +34 -89
  118. package/libs/PanoRulerProPlugin/RulerItems.js +92 -147
  119. package/libs/PanoRulerProPlugin/index.js +10 -65
  120. package/libs/PanoSpatialTagPlugin/Plugin.js +130 -178
  121. package/libs/PanoSpatialTagPlugin/index.js +6 -54
  122. package/libs/PanoTagPlugin/Components/Common/TagPoint.js +61 -116
  123. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +138 -193
  124. package/libs/PanoTagPlugin/Components/Tag/index.js +140 -194
  125. package/libs/PanoTagPlugin/Components/TagContainer.js +58 -112
  126. package/libs/PanoTagPlugin/Components/TagItem.js +137 -191
  127. package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +109 -164
  128. package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +22 -76
  129. package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +33 -87
  130. package/libs/PanoTagPlugin/controller/Tag/PointTag.js +39 -94
  131. package/libs/PanoTagPlugin/controller/TagRender.js +18 -62
  132. package/libs/PanoTagPlugin/controller/TagUtil.js +80 -124
  133. package/libs/PanoTagPlugin/controller/index.js +37 -81
  134. package/libs/PanoTagPlugin/index.js +28 -72
  135. package/libs/PanoTagPlugin/utils/model/mediaPlane.js +14 -14
  136. package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +22 -77
  137. package/libs/PanoVideoPlugin/Controller.js +43 -96
  138. package/libs/PanoVideoPlugin/VideoMeshController.js +64 -119
  139. package/libs/PanoVideoPlugin/index.js +14 -67
  140. package/libs/PipelinePlugin/Controller.js +123 -176
  141. package/libs/PipelinePlugin/index.js +11 -64
  142. package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +15 -70
  143. package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +3 -58
  144. package/libs/PipelinePlugin/utils/Objects/Pipe.js +42 -97
  145. package/libs/Sculpt/Editors/BoxMeshEditor.d.ts +5 -0
  146. package/libs/Sculpt/Editors/BoxMeshEditor.js +98 -0
  147. package/libs/Sculpt/Editors/CircleMeshEditor.d.ts +5 -0
  148. package/libs/Sculpt/Editors/CircleMeshEditor.js +9 -0
  149. package/libs/Sculpt/Editors/CylinderMeshEditor.d.ts +5 -0
  150. package/libs/Sculpt/Editors/CylinderMeshEditor.js +41 -0
  151. package/libs/Sculpt/Editors/PrismMeshEditor.d.ts +5 -0
  152. package/libs/Sculpt/Editors/PrismMeshEditor.js +43 -0
  153. package/libs/Sculpt/Editors/RectangleMeshEditor.d.ts +5 -0
  154. package/libs/Sculpt/Editors/RectangleMeshEditor.js +70 -0
  155. package/libs/Sculpt/Meshes/Box.d.ts +6 -24
  156. package/libs/Sculpt/Meshes/Box.js +22 -93
  157. package/libs/Sculpt/Meshes/Circle.d.ts +0 -4
  158. package/libs/Sculpt/Meshes/Circle.js +18 -27
  159. package/libs/Sculpt/Meshes/Cylinder.d.ts +0 -1
  160. package/libs/Sculpt/Meshes/Cylinder.js +17 -24
  161. package/libs/Sculpt/Meshes/Line.d.ts +9 -22
  162. package/libs/Sculpt/Meshes/Line.js +85 -104
  163. package/libs/Sculpt/Meshes/LineWithDots.js +10 -14
  164. package/libs/Sculpt/Meshes/Point.js +29 -34
  165. package/libs/Sculpt/Meshes/Polygon.d.ts +1 -5
  166. package/libs/Sculpt/Meshes/Polygon.js +40 -53
  167. package/libs/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
  168. package/libs/Sculpt/Meshes/Prism.d.ts +29 -10
  169. package/libs/Sculpt/Meshes/Prism.js +108 -84
  170. package/libs/Sculpt/Meshes/Rectangle.d.ts +1 -1
  171. package/libs/Sculpt/Meshes/Rectangle.js +7 -10
  172. package/libs/Sculpt/Meshes/RectangleWithEdge.js +17 -20
  173. package/libs/Sculpt/Objects/Base/index.d.ts +2 -1
  174. package/libs/Sculpt/Objects/Base/index.js +16 -17
  175. package/libs/Sculpt/Objects/Box/index.d.ts +7 -2
  176. package/libs/Sculpt/Objects/Box/index.js +72 -60
  177. package/libs/Sculpt/Objects/Circle/index.d.ts +3 -0
  178. package/libs/Sculpt/Objects/Circle/index.js +34 -30
  179. package/libs/Sculpt/Objects/Cylinder/index.d.ts +3 -0
  180. package/libs/Sculpt/Objects/Cylinder/index.js +46 -42
  181. package/libs/Sculpt/Objects/Line/Editor.js +8 -10
  182. package/libs/Sculpt/Objects/Line/index.d.ts +3 -0
  183. package/libs/Sculpt/Objects/Line/index.js +45 -41
  184. package/libs/Sculpt/Objects/Point/index.d.ts +3 -0
  185. package/libs/Sculpt/Objects/Point/index.js +33 -29
  186. package/libs/Sculpt/Objects/Polygon/index.d.ts +3 -0
  187. package/libs/Sculpt/Objects/Polygon/index.js +67 -63
  188. package/libs/Sculpt/Objects/Polyline/index.d.ts +3 -0
  189. package/libs/Sculpt/Objects/Polyline/index.js +46 -42
  190. package/libs/Sculpt/Objects/Prism/index.d.ts +3 -0
  191. package/libs/Sculpt/Objects/Prism/index.js +58 -53
  192. package/libs/Sculpt/Objects/Rectangle/index.d.ts +12 -0
  193. package/libs/Sculpt/Objects/Rectangle/index.js +142 -81
  194. package/libs/Sculpt/index.d.ts +11 -10
  195. package/libs/Sculpt/index.js +105 -107
  196. package/libs/Sculpt/typings/style.d.ts +6 -0
  197. package/libs/Sculpt/utils/export.d.ts +24 -18
  198. package/libs/Sculpt/utils/export.js +52 -19
  199. package/libs/Sculpt/utils/sortPositionsByCameraPosition.d.ts +5 -0
  200. package/libs/Sculpt/utils/sortPositionsByCameraPosition.js +9 -0
  201. package/libs/Sculpt/utils/three/ColoredMesh.d.ts +4 -0
  202. package/libs/Sculpt/utils/three/ColoredMesh.js +40 -37
  203. package/libs/base/BasePlugin.js +10 -15
  204. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +96 -147
  205. package/libs/floorplan/MapviewFloorplanPlugin/index.js +12 -63
  206. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +53 -105
  207. package/libs/floorplan/ModelFloorplanPlugin/index.js +11 -63
  208. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +65 -118
  209. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +11 -64
  210. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +54 -106
  211. package/libs/floorplan/TopviewFloorplanPlugin/index.js +11 -63
  212. package/libs/floorplan/index.js +0 -5
  213. package/libs/index.d.ts +79 -1
  214. package/libs/index.js +229 -215
  215. package/libs/shared-utils/Object3DHelper/Base/BaseController.d.ts +1 -0
  216. package/libs/shared-utils/Object3DHelper/Base/BaseController.js +112 -122
  217. package/libs/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +7 -3
  218. package/libs/shared-utils/Object3DHelper/Base/BaseHelper.js +60 -39
  219. package/libs/shared-utils/Object3DHelper/Controller/RotateController.js +47 -47
  220. package/libs/shared-utils/Object3DHelper/Controller/ScaleController.d.ts +0 -1
  221. package/libs/shared-utils/Object3DHelper/Controller/ScaleController.js +28 -28
  222. package/libs/shared-utils/Object3DHelper/Helper/BoundingBoxHelper.d.ts +3 -1
  223. package/libs/shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js +25 -18
  224. package/libs/shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.d.ts +2 -0
  225. package/libs/shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js +18 -14
  226. package/libs/shared-utils/Object3DHelper/Helper/MoveHelper.d.ts +2 -1
  227. package/libs/shared-utils/Object3DHelper/Helper/MoveHelper.js +1 -0
  228. package/libs/shared-utils/Object3DHelper/Helper/RotateHelper.d.ts +2 -1
  229. package/libs/shared-utils/Object3DHelper/Helper/RotateHelper.js +2 -1
  230. package/libs/shared-utils/Object3DHelper/Helper/ScaleHelper.d.ts +4 -2
  231. package/libs/shared-utils/Object3DHelper/Helper/ScaleHelper.js +40 -28
  232. package/libs/shared-utils/Object3DHelper/typings/index.d.ts +1 -1
  233. package/libs/shared-utils/Object3DHelper/utils/calculateScaleByCamera.d.ts +4 -1
  234. package/libs/shared-utils/Object3DHelper/utils/calculateScaleByCamera.js +4 -4
  235. package/libs/shared-utils/five/FiveDomEvents.js +88 -88
  236. package/libs/shared-utils/five/FiveLine.d.ts +18 -14
  237. package/libs/shared-utils/five/FiveLine.js +31 -13
  238. package/libs/shared-utils/five/index.js +2 -7
  239. package/libs/shared-utils/five/lookObject.js +27 -32
  240. package/libs/shared-utils/index.d.ts +0 -1
  241. package/libs/shared-utils/index.js +31 -33
  242. package/libs/shared-utils/logger.js +1 -1
  243. package/libs/shared-utils/math/planimetry.d.ts +1 -1
  244. package/libs/shared-utils/tag.d.ts +5 -7
  245. package/libs/shared-utils/tag.js +1 -1
  246. package/libs/shared-utils/three/boundingBox.d.ts +14 -20
  247. package/libs/shared-utils/three/core/LineGeometry.d.ts +13 -0
  248. package/libs/shared-utils/three/core/LineGeometry.js +26 -0
  249. package/libs/shared-utils/three/core/PrismGeometry.d.ts +14 -0
  250. package/libs/shared-utils/three/core/PrismGeometry.js +42 -0
  251. package/libs/shared-utils/three/earcut3D.js +5 -5
  252. package/libs/shared-utils/three/geometryUtil.d.ts +8 -0
  253. package/libs/shared-utils/three/geometryUtil.js +3 -1
  254. package/libs/shared-utils/three/getNormal.d.ts +5 -2
  255. package/libs/shared-utils/three/getNormal.js +6 -5
  256. package/libs/shared-utils/three/index.js +0 -5
  257. package/package.json +1 -1
  258. package/dist/Sculpt/Objects/Box/Editor.d.ts +0 -5
  259. package/dist/Sculpt/Objects/Circle/Editor.d.ts +0 -5
  260. package/dist/Sculpt/Objects/Cylinder/Editor.d.ts +0 -5
  261. package/dist/Sculpt/Objects/Prism/Editor.d.ts +0 -5
  262. package/dist/Sculpt/Objects/Rectangle/Editor.d.ts +0 -5
  263. package/dist/Sculpt/utils/getBetterNormal.d.ts +0 -2
  264. package/libs/Sculpt/Objects/Box/Editor.d.ts +0 -5
  265. package/libs/Sculpt/Objects/Box/Editor.js +0 -44
  266. package/libs/Sculpt/Objects/Circle/Editor.d.ts +0 -5
  267. package/libs/Sculpt/Objects/Circle/Editor.js +0 -9
  268. package/libs/Sculpt/Objects/Cylinder/Editor.d.ts +0 -5
  269. package/libs/Sculpt/Objects/Cylinder/Editor.js +0 -41
  270. package/libs/Sculpt/Objects/Prism/Editor.d.ts +0 -5
  271. package/libs/Sculpt/Objects/Prism/Editor.js +0 -44
  272. package/libs/Sculpt/Objects/Rectangle/Editor.d.ts +0 -5
  273. package/libs/Sculpt/Objects/Rectangle/Editor.js +0 -9
  274. package/libs/Sculpt/utils/getBetterNormal.d.ts +0 -2
  275. package/libs/Sculpt/utils/getBetterNormal.js +0 -8
  276. package/libs/vendor/three/build/three.module.js +0 -19336
  277. package/libs/vendor/three/examples/jsm/lines/LineGeometry.js +0 -28
  278. package/libs/vendor/three/examples/jsm/lines/LineSegmentsGeometry.js +0 -69
@@ -2,35 +2,35 @@ var j = Object.defineProperty;
2
2
  var w = (g, h, t) => h in g ? j(g, h, { enumerable: !0, configurable: !0, writable: !0, value: t }) : g[h] = t;
3
3
  var d = (g, h, t) => (w(g, typeof h != "symbol" ? h + "" : h, t), t);
4
4
  import { BaseController as D } from "../Base/BaseController.js";
5
- import * as c from "three";
5
+ import * as a from "three";
6
6
  import { getMouseRaycaster as O } from "../utils/getMouseRaycaster.js";
7
7
  import { setObjectQuaternion as C } from "../utils/setObjectQuaternion.js";
8
8
  import { rad2Deg as L } from "../../math/rad2Deg.js";
9
9
  import { deg2Rad as f } from "../../math/deg2Rad.js";
10
- const y = new c.Quaternion();
11
- class x extends D {
10
+ let y = new a.Quaternion();
11
+ class P extends D {
12
12
  constructor(...t) {
13
- var l, a, m;
13
+ var l, c, m;
14
14
  super(...t);
15
15
  d(this, "name", "RotateController");
16
16
  d(this, "startInfo");
17
17
  d(this, "removeListener");
18
18
  const n = this.helperObject3D;
19
- this.hoverListener([(l = n.xCircle) == null ? void 0 : l.circle, (a = n.yCircle) == null ? void 0 : a.circle, (m = n.zCircle) == null ? void 0 : m.circle].filter(Boolean));
20
- const e = this.dragStart.bind(this), o = this.dragging.bind(this), s = this.dragEnd.bind(this), i = this.show.bind(this), r = this.hide.bind(this);
21
- this.domEvents.addEventListener(this.helperObject3D, "mousedown", e), document.addEventListener("mousemove", o), document.addEventListener("mouseup", s), this.domEvents.addEventListener(this.helperObject3D, "touchstart", e), document.addEventListener("touchmove", o), document.addEventListener("touchend", s), this.hooks.on("moveStart", r), this.hooks.on("moveEnd", i), this.hooks.on("scaleStart", r), this.hooks.on("scaleEnd", i), this.hooks.on("moveByMouseEnable", r), this.hooks.on("moveByMouseDisable", i), this.disposers.push(() => {
22
- this.domEvents.removeEventListener(this.helperObject3D, "mousedown", e), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", s), this.domEvents.removeEventListener(this.helperObject3D, "touchstart", e), document.removeEventListener("touchmove", o), document.removeEventListener("touchend", s), this.hooks.off("moveStart", r), this.hooks.off("moveEnd", i), this.hooks.off("scaleStart", r), this.hooks.off("scaleEnd", i), this.hooks.off("moveByMouseEnable", r), this.hooks.off("moveByMouseDisable", i);
19
+ this.hoverListener([(l = n.xCircle) == null ? void 0 : l.circle, (c = n.yCircle) == null ? void 0 : c.circle, (m = n.zCircle) == null ? void 0 : m.circle].filter(Boolean));
20
+ const e = this.dragStart.bind(this), o = this.dragging.bind(this), r = this.dragEnd.bind(this), s = this.show.bind(this), i = this.hide.bind(this);
21
+ this.domEvents.addEventListener(this.helperObject3D, "mousedown", e), document.addEventListener("mousemove", o), document.addEventListener("mouseup", r), this.domEvents.addEventListener(this.helperObject3D, "touchstart", e), document.addEventListener("touchmove", o), document.addEventListener("touchend", r), this.hooks.on("moveStart", i), this.hooks.on("moveEnd", s), this.hooks.on("scaleStart", i), this.hooks.on("scaleEnd", s), this.hooks.on("moveByMouseEnable", i), this.hooks.on("moveByMouseDisable", s), this.disposers.push(() => {
22
+ this.domEvents.removeEventListener(this.helperObject3D, "mousedown", e), document.removeEventListener("mousemove", o), document.removeEventListener("mouseup", r), this.domEvents.removeEventListener(this.helperObject3D, "touchstart", e), document.removeEventListener("touchmove", o), document.removeEventListener("touchend", r), this.hooks.off("moveStart", i), this.hooks.off("moveEnd", s), this.hooks.off("scaleStart", i), this.hooks.off("scaleEnd", s), this.hooks.off("moveByMouseEnable", i), this.hooks.off("moveByMouseDisable", s);
23
23
  });
24
24
  }
25
25
  get rotateCenter() {
26
26
  return this.helperObject3D.position.clone();
27
27
  }
28
28
  setRotateAngle(t) {
29
- const { x: n = 0, y: e = 0, z: o = 0 } = t, s = new c.Euler(f(n), f(e), f(o)), i = new c.Quaternion().setFromEuler(s);
30
- if (this.hooks.emit("wantToRotate", i))
29
+ const { x: n = 0, y: e = 0, z: o = 0 } = t, r = new a.Euler(f(n), f(e), f(o)), s = new a.Quaternion().setFromEuler(r);
30
+ if (this.hooks.emit("wantToRotate", s))
31
31
  return;
32
- const { originObject3D: l, rotateCenter: a } = this;
33
- C(l, i, a), this.internalHooks.emit("setObjectRotate", i, a), this.hooks.emit("rotate", i), this.render();
32
+ const { originObject3D: l, rotateCenter: c } = this;
33
+ C(l, s, c), this.internalHooks.emit("setObjectRotate", s, c), this.hooks.emit("rotate", s), this.render();
34
34
  }
35
35
  onApplyOriginObjectRotate(t) {
36
36
  this.isDragging || super.onApplyOriginObjectRotate(t);
@@ -49,19 +49,19 @@ class x extends D {
49
49
  const e = (n == null ? void 0 : n.object).direction;
50
50
  if (!e)
51
51
  return this.dragEnd();
52
- const o = n.point, s = this.getAngleHelper(e);
52
+ const o = n.point, r = this.getAngleHelper(e);
53
53
  this.setTipsAngle(0);
54
- const i = o.clone();
55
- i.y += 0.2, this.setTipsPosition(i);
56
- const r = this.helperObject3D.quaternion.clone(), l = (() => {
54
+ const s = o.clone();
55
+ s.y += 0.2, this.setTipsPosition(s);
56
+ const i = this.helperObject3D.quaternion.clone(), l = (() => {
57
57
  if (e === "x")
58
- return new c.Vector3(1, 0, 0).applyQuaternion(r);
58
+ return new a.Vector3(1, 0, 0).applyQuaternion(i);
59
59
  if (e === "y")
60
- return new c.Vector3(0, 1, 0).applyQuaternion(r);
60
+ return new a.Vector3(0, 1, 0).applyQuaternion(i);
61
61
  if (e === "z")
62
- return new c.Vector3(0, 0, 1).applyQuaternion(r);
63
- })(), a = new c.Plane().setFromNormalAndCoplanarPoint(l, o), p = a.projectPoint(o.clone(), new c.Vector3()).clone().sub(this.rotateCenter), u = p.angleTo(s.baseAxes.clone().applyQuaternion(r));
64
- this.setAngleHelperStart(e, u), this.setAngleHelperLength(e, 0), this.startInfo = { direction: e, startVector: p, plane: a, angleHelper: s, angle: 0, helperQuaternion: r.clone() }, y.copy(r), this.helperObject3D.showDraggingHelper([e]), this.hooks.emit("rotateStart"), this.isDragging = !0;
62
+ return new a.Vector3(0, 0, 1).applyQuaternion(i);
63
+ })(), c = new a.Plane().setFromNormalAndCoplanarPoint(l, o), p = c.projectPoint(o.clone(), new a.Vector3()).clone().sub(this.rotateCenter), u = p.angleTo(r.baseAxes.clone().applyQuaternion(i));
64
+ this.setAngleHelperStart(e, u), this.setAngleHelperLength(e, 0), this.startInfo = { direction: e, startVector: p, plane: c, angleHelper: r, angle: 0, helperQuaternion: i.clone() }, y = new a.Quaternion(), this.helperObject3D.showDraggingHelper([e]), this.hooks.emit("rotateStart"), this.isDragging = !0;
65
65
  }
66
66
  dragging(t) {
67
67
  if (!this.isDragging)
@@ -72,30 +72,30 @@ class x extends D {
72
72
  rotate(t) {
73
73
  if (!this.startInfo)
74
74
  return this.dragEnd();
75
- const { startVector: n, plane: e, angleHelper: o, direction: s, helperQuaternion: i } = this.startInfo, { originObject3D: r } = this, l = t.ray.intersectPlane(e, new c.Vector3());
75
+ const { startVector: n, plane: e, angleHelper: o, direction: r, helperQuaternion: s } = this.startInfo, { originObject3D: i } = this, l = t.ray.intersectPlane(e, new a.Vector3());
76
76
  if (!l)
77
77
  return;
78
- const a = this.rotateCenter.clone(), p = e.projectPoint(l.clone(), new c.Vector3()).clone().sub(a);
78
+ const c = this.rotateCenter.clone(), p = e.projectPoint(l.clone(), new a.Vector3()).clone().sub(c);
79
79
  if (n.angleTo(p) === 0)
80
80
  return;
81
- const u = new c.Quaternion().setFromUnitVectors(n.clone().normalize(), p.clone().normalize()), v = r.quaternion.clone().premultiply(u);
81
+ const u = new a.Quaternion().setFromUnitVectors(n.clone().normalize(), p.clone().normalize()), v = i.quaternion.clone().premultiply(u);
82
82
  if (this.hooks.emit("wantToRotate", v))
83
83
  return;
84
- const E = new c.Euler().setFromQuaternion(
85
- new c.Quaternion().setFromUnitVectors(
86
- n.clone().normalize().applyQuaternion(i.clone().inverse()),
87
- p.clone().normalize().applyQuaternion(i.clone().inverse())
84
+ const E = new a.Euler().setFromQuaternion(
85
+ new a.Quaternion().setFromUnitVectors(
86
+ n.clone().normalize().applyQuaternion(s.clone().inverse()),
87
+ p.clone().normalize().applyQuaternion(s.clone().inverse())
88
88
  ),
89
- `${s.toUpperCase()}${"XZY".replace(s.toUpperCase(), "")}`
90
- )[s] * o.angleDirection;
91
- if (this.startInfo.angle += E, this.setAngleHelperLength(s, this.startInfo.angle), this.setTipsAngle(L(this.startInfo.angle)), a) {
92
- const b = new c.Vector3().subVectors(r.position, a).applyQuaternion(u).add(a);
93
- r.position.copy(b);
89
+ `${r.toUpperCase()}${"XZY".replace(r.toUpperCase(), "")}`
90
+ )[r] * o.angleDirection;
91
+ if (this.startInfo.angle += E, this.setAngleHelperLength(r, this.startInfo.angle), this.setTipsAngle(L(this.startInfo.angle)), c) {
92
+ const b = new a.Vector3().subVectors(i.position, c).applyQuaternion(u).add(c);
93
+ i.position.copy(b);
94
94
  }
95
- r.applyQuaternion(u), y.premultiply(u), this.internalHooks.emit("applyObjectRotate", { quaternion: u, origin: a }), this.hooks.emit("rotate", r.quaternion), this.startInfo.startVector = p;
95
+ i.applyQuaternion(u), y.premultiply(u), this.internalHooks.emit("applyObjectRotate", { quaternion: u, origin: c }), this.hooks.emit("rotate", i.quaternion), this.startInfo.startVector = p;
96
96
  }
97
97
  dragEnd() {
98
- this.isDragging && (this.internalHooks.emit("setObjectRotate", y, this.rotateCenter), this.startInfo = void 0, this.isDragging = !1, this.helperObject3D.show(), this.hooks.emit("rotateEnd"));
98
+ this.isDragging && (this.applyHelperQuaternion(y, this.rotateCenter), this.startInfo = void 0, this.isDragging = !1, this.helperObject3D.show(), this.hooks.emit("rotateEnd"));
99
99
  }
100
100
  getAngleHelper(t) {
101
101
  var n, e, o;
@@ -114,17 +114,17 @@ class x extends D {
114
114
  console.warn("angleHelper is undefined");
115
115
  return;
116
116
  }
117
- if (e instanceof c.Mesh && e.geometry instanceof c.CircleGeometry) {
118
- const { radius: o, segments: s, thetaLength: i } = e.geometry.parameters;
119
- e.geometry = new c.CircleGeometry(o, s, n, i);
117
+ if (e instanceof a.Mesh && e.geometry instanceof a.CircleGeometry) {
118
+ const { radius: o, segments: r, thetaLength: s } = e.geometry.parameters;
119
+ e.geometry = new a.CircleGeometry(o, r, n, s);
120
120
  } else
121
121
  console.warn("only support THREE.CircleGeometry");
122
122
  }
123
123
  setAngleHelperLength(t, n) {
124
- const o = n >= 0 ? Math.max(n, 1e-3) : Math.min(n, -1e-3), s = this.getAngleHelper(t);
125
- if (s instanceof c.Mesh && s.geometry instanceof c.CircleGeometry) {
126
- const { radius: i, thetaStart: r } = s.geometry.parameters, l = Math.ceil(Math.abs(o) * (40 / (2 * Math.PI)));
127
- s.geometry = new c.CircleGeometry(i, l, r, o);
124
+ const o = n >= 0 ? Math.max(n, 1e-3) : Math.min(n, -1e-3), r = this.getAngleHelper(t);
125
+ if (r instanceof a.Mesh && r.geometry instanceof a.CircleGeometry) {
126
+ const { radius: s, thetaStart: i } = r.geometry.parameters, l = Math.ceil(Math.abs(o) * (40 / (2 * Math.PI)));
127
+ r.geometry = new a.CircleGeometry(s, l, i, o);
128
128
  } else
129
129
  console.warn("only support THREE.CircleGeometry");
130
130
  }
@@ -137,13 +137,13 @@ class x extends D {
137
137
  const n = this.helperObject3D.angleTips;
138
138
  if (!n)
139
139
  return;
140
- const e = t.project(this.camera), { x: o, y: s, z: i } = e;
141
- if (i > 1)
140
+ const e = t.project(this.camera), { x: o, y: r, z: s } = e;
141
+ if (s > 1)
142
142
  return;
143
- const r = (o + 1) / 2 * 100 + "%", l = (-s + 1) / 2 * 100 + "%";
144
- n.setLeftTop(r, l);
143
+ const i = (o + 1) / 2 * 100 + "%", l = (-r + 1) / 2 * 100 + "%";
144
+ n.setLeftTop(i, l);
145
145
  }
146
146
  }
147
147
  export {
148
- x as RotateController
148
+ P as RotateController
149
149
  };
@@ -5,7 +5,6 @@ export declare class ScaleController<T extends ScaleHelperAbstract = ScaleHelper
5
5
  protected name: string;
6
6
  private startInfo?;
7
7
  constructor(...params: ConstructorParameters<typeof BaseController<T>>);
8
- initialHelperQuaternion(): void;
9
8
  initialHelperPosition(): void;
10
9
  dragStart: (params: {
11
10
  intersect: THREE.Intersection;
@@ -1,42 +1,45 @@
1
1
  var f = Object.defineProperty;
2
- var v = (d, a, t) => a in d ? f(d, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[a] = t;
3
- var c = (d, a, t) => (v(d, typeof a != "symbol" ? a + "" : a, t), t);
4
- import { BaseController as p } from "../Base/BaseController.js";
2
+ var v = (c, a, t) => a in c ? f(c, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[a] = t;
3
+ var h = (c, a, t) => (v(c, typeof a != "symbol" ? a + "" : a, t), t);
4
+ import { BaseController as E } from "../Base/BaseController.js";
5
5
  import * as m from "three";
6
- import { getMouseRaycaster as E } from "../utils/getMouseRaycaster.js";
6
+ import { getMouseRaycaster as p } from "../utils/getMouseRaycaster.js";
7
7
  import { rayOnLine as g } from "../../../Sculpt/utils/three/rayOnLine.js";
8
- class S extends p {
8
+ class S extends E {
9
9
  constructor(...t) {
10
10
  super(...t);
11
- c(this, "name", "ScaleController");
12
- c(this, "startInfo");
13
- c(this, "dragStart", (t) => {
11
+ h(this, "name", "ScaleController");
12
+ h(this, "startInfo");
13
+ h(this, "dragStart", (t) => {
14
14
  if (this.isDragging)
15
15
  return;
16
16
  this.isDragging = !0;
17
- const { intersect: e } = t, o = this.camera.position, s = e.object, i = s.scalePosition.basePosition.clone(), r = s.scalePosition.handlePosition.clone().clone().sub(i).clone(), n = new m.Line3(i, i.clone().add(r.normalize().multiplyScalar(5)));
18
- n.applyMatrix4(this.helperObject3D.matrixWorld);
19
- const h = new m.Raycaster(o, e.point.clone().sub(o)), u = g({ raycaster: h, line: n });
20
- this.startInfo = { line: n, scaleStartPoint: u, draggingObject: s }, this.hooks.emit("scaleStart");
17
+ const { intersect: e } = t, o = this.camera.position;
18
+ let s = e.object;
19
+ s.scalePosition || (s = e.object.parent);
20
+ const i = s.scalePosition.basePosition.clone(), n = s.scalePosition.handlePosition.clone().clone().sub(i).clone(), r = new m.Line3(i, i.clone().add(n.normalize().multiplyScalar(5)));
21
+ r.applyMatrix4(this.helperObject3D.matrixWorld);
22
+ const l = new m.Raycaster(o, e.point.clone().sub(o)), u = g({ raycaster: l, line: r });
23
+ this.startInfo = { line: r, scaleStartPoint: u, draggingObject: s }, this.hooks.emit("scaleStart");
21
24
  });
22
- c(this, "dragging", (t) => {
25
+ h(this, "dragging", (t) => {
23
26
  if (!this.isDragging || !this.startInfo)
24
27
  return;
25
- const e = "touches" in t ? t.touches[0].clientX : t.x, o = "touches" in t ? t.touches[0].clientY : t.y, s = E(this.camera, { x: e, y: o }, this.container);
28
+ const e = "touches" in t ? t.touches[0].clientX : t.x, o = "touches" in t ? t.touches[0].clientY : t.y, s = p(this.camera, { x: e, y: o }, this.container);
26
29
  return s ? (this.scale(s), !1) : this.dragEnd();
27
30
  });
28
- c(this, "scale", (t) => {
29
- var n, h;
31
+ h(this, "scale", (t) => {
32
+ var n, r;
30
33
  if (!this.startInfo)
31
34
  return;
32
- const { line: e, scaleStartPoint: o, draggingObject: s } = this.startInfo, { scalePosition: i } = s, { basePosition: l } = i, r = g({ raycaster: t, line: e });
33
- r.applyMatrix4(new m.Matrix4().getInverse(this.helperObject3D.matrixWorld.clone())), (h = (n = this.config) == null ? void 0 : n.scaleCallback) == null || h.call(n, {
34
- ratio: r.distanceTo(l) / o.distanceTo(l),
35
- intersectPoint: r,
36
- scalePosition: i
37
- }), s.position.copy(r.clone());
35
+ const { line: e, scaleStartPoint: o, draggingObject: s } = this.startInfo, { scalePosition: i } = s, d = g({ raycaster: t, line: e });
36
+ d.applyMatrix4(new m.Matrix4().getInverse(this.helperObject3D.matrixWorld.clone())), (r = (n = this.config) == null ? void 0 : n.scaleCallback) == null || r.call(n, {
37
+ intersectPoint: d,
38
+ scalePosition: i,
39
+ offset: d.clone().sub(o)
40
+ }), s.position.copy(d.clone());
38
41
  });
39
- c(this, "dragEnd", () => {
42
+ h(this, "dragEnd", () => {
40
43
  this.isDragging && (this.startInfo = void 0, this.isDragging = !1, this.internalHooks.emit("initialHelperPosition"), this.hooks.emit("scaleEnd"));
41
44
  });
42
45
  const e = this.show.bind(this), o = this.hide.bind(this);
@@ -44,18 +47,15 @@ class S extends p {
44
47
  this.domEvents.removeEventListener(this.helperObject3D, "mousedown", this.dragStart), document.removeEventListener("mousemove", this.dragging), document.removeEventListener("mouseup", this.dragEnd), this.domEvents.removeEventListener(this.helperObject3D, "touchstart", this.dragStart), document.removeEventListener("touchmove", this.dragging), document.removeEventListener("touchend", this.dragEnd), this.hooks.off("rotateStart", o), this.hooks.off("rotateEnd", e), this.hooks.off("moveStart", o), this.hooks.off("moveEnd", e), this.hooks.off("moveByMouseEnable", o), this.hooks.off("moveByMouseDisable", e);
45
48
  });
46
49
  }
47
- initialHelperQuaternion() {
48
- this.helperObject3D.initQuaternion();
49
- }
50
50
  initialHelperPosition() {
51
51
  this.helperObject3D.initialPosition();
52
52
  const t = this;
53
53
  t.offHoverListener && t.offHoverListener(), t.offHoverListener = this.hoverListener(this.helperObject3D.scaleMeshes);
54
54
  }
55
55
  setScale(t) {
56
- var r, n, h;
56
+ var n, r, l;
57
57
  let e = 1, o = 1, s = 1;
58
- typeof t == "number" ? (e = t, o = t, s = t) : typeof t == "object" && (e = (r = t.x) != null ? r : 1, o = (n = t.y) != null ? n : 1, s = (h = t.z) != null ? h : 1);
58
+ typeof t == "number" ? (e = t, o = t, s = t) : typeof t == "object" && (e = (n = t.x) != null ? n : 1, o = (r = t.y) != null ? r : 1, s = (l = t.z) != null ? l : 1);
59
59
  const i = new m.Vector3(e, o, s);
60
60
  this.hooks.emit("wantToScale", i) || (this.originObject3D.scale.copy(i), this.internalHooks.emit("setObjectScale", i), this.hooks.emit("scale", i), this.render());
61
61
  }
@@ -1,11 +1,13 @@
1
1
  import * as THREE from 'three';
2
2
  import { BoundingBoxHelperAbstract } from '../Base/BaseHelper';
3
3
  export declare class BoundingBoxHelper<T extends THREE.Object3D = THREE.Object3D> extends BoundingBoxHelperAbstract<T> {
4
+ name: string;
4
5
  box: THREE.Mesh<THREE.BufferGeometry, THREE.MeshBasicMaterial>;
5
6
  outline: THREE.LineSegments<THREE.BufferGeometry, THREE.LineBasicMaterial>;
6
- private originObject;
7
7
  private positionAttribute;
8
8
  constructor(originObject: T);
9
+ initQuaternion(): void;
10
+ setHelperQuaternion(quaternion: THREE.Quaternion, origin?: THREE.Vector3): void;
9
11
  raycasterIntersectObject(raycaster: THREE.Raycaster, intersection: THREE.Intersection[]): THREE.Intersection[];
10
12
  raycast(raycaster: THREE.Raycaster, intersects: THREE.Intersection[]): void;
11
13
  private update;
@@ -1,17 +1,24 @@
1
1
  var u = Object.defineProperty;
2
- var c = (n, o, e) => o in n ? u(n, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[o] = e;
3
- var r = (n, o, e) => (c(n, typeof o != "symbol" ? o + "" : o, e), e);
4
- import * as s from "three";
5
- import { BoundingBoxHelperAbstract as b } from "../Base/BaseHelper.js";
6
- import { boundingBox as p } from "../../three/boundingBox.js";
7
- class A extends b {
2
+ var c = (s, n, e) => n in s ? u(s, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[n] = e;
3
+ var r = (s, n, e) => (c(s, typeof n != "symbol" ? n + "" : n, e), e);
4
+ import * as o from "three";
5
+ import { BoundingBoxHelperAbstract as p } from "../Base/BaseHelper.js";
6
+ import { boundingBox as b } from "../../three/boundingBox.js";
7
+ import { setObjectQuaternion as h } from "../utils/setObjectQuaternion.js";
8
+ class d extends p {
8
9
  constructor(e) {
9
10
  super(e);
11
+ r(this, "name", "BoundingBoxHelper");
10
12
  r(this, "box");
11
13
  r(this, "outline");
12
- r(this, "originObject");
13
14
  r(this, "positionAttribute");
14
- this.originObject = e, this.positionAttribute = new s.BufferAttribute(new Float32Array(8 * 3), 3), this.box = this.createBox(), this.outline = this.createOutline(), this.add(this.box, this.outline), this.update();
15
+ this.positionAttribute = new o.BufferAttribute(new Float32Array(8 * 3), 3), this.box = this.createBox(), this.outline = this.createOutline(), this.add(this.box, this.outline), this.update();
16
+ }
17
+ initQuaternion() {
18
+ this.quaternion.copy(this.originObject3D.quaternion);
19
+ }
20
+ setHelperQuaternion(e, t) {
21
+ h(this, e, t);
15
22
  }
16
23
  raycasterIntersectObject(e, t) {
17
24
  return e.intersectObject(this, !1, t);
@@ -20,21 +27,21 @@ class A extends b {
20
27
  this.box.raycast(e, t);
21
28
  }
22
29
  update() {
23
- const e = p(this.originObject);
30
+ const e = b(this.originObject3D);
24
31
  if (!e)
25
32
  return;
26
33
  const { min: t, max: i } = e;
27
34
  this.positionAttribute.setXYZ(0, i.x, i.y, i.z), this.positionAttribute.setXYZ(1, t.x, i.y, i.z), this.positionAttribute.setXYZ(2, t.x, t.y, i.z), this.positionAttribute.setXYZ(3, i.x, t.y, i.z), this.positionAttribute.setXYZ(4, i.x, i.y, t.z), this.positionAttribute.setXYZ(5, t.x, i.y, t.z), this.positionAttribute.setXYZ(6, t.x, t.y, t.z), this.positionAttribute.setXYZ(7, i.x, t.y, t.z), this.positionAttribute.needsUpdate = !0;
28
35
  }
29
36
  createOutline() {
30
- const e = new Uint16Array([0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7]), t = new s.BufferGeometry();
31
- t.setIndex(new s.BufferAttribute(e, 1)), t.setAttribute("position", this.positionAttribute);
32
- const i = new s.LineBasicMaterial({
37
+ const e = new Uint16Array([0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7]), t = new o.BufferGeometry();
38
+ t.setIndex(new o.BufferAttribute(e, 1)), t.setAttribute("position", this.positionAttribute);
39
+ const i = new o.LineBasicMaterial({
33
40
  color: 64767,
34
41
  linewidth: 1,
35
42
  opacity: 1,
36
43
  toneMapped: !1
37
- }), a = new s.LineSegments(t, i);
44
+ }), a = new o.LineSegments(t, i);
38
45
  return a.matrixAutoUpdate = !1, a;
39
46
  }
40
47
  createBox() {
@@ -75,17 +82,17 @@ class A extends b {
75
82
  6,
76
83
  7,
77
84
  3
78
- ]), t = new s.BufferGeometry();
79
- t.setIndex(new s.BufferAttribute(e, 1)), t.setAttribute("position", this.positionAttribute);
80
- const i = new s.MeshBasicMaterial({
85
+ ]), t = new o.BufferGeometry();
86
+ t.setIndex(new o.BufferAttribute(e, 1)), t.setAttribute("position", this.positionAttribute);
87
+ const i = new o.MeshBasicMaterial({
81
88
  color: 64767,
82
89
  opacity: 0.1,
83
90
  depthTest: !1,
84
91
  transparent: !0
85
92
  });
86
- return new s.Mesh(t, i);
93
+ return new o.Mesh(t, i);
87
94
  }
88
95
  }
89
96
  export {
90
- A as BoundingBoxHelper
97
+ d as BoundingBoxHelper
91
98
  };
@@ -5,6 +5,7 @@ import type { Vector3 } from 'three';
5
5
  import type { CSS3DObjectPlus } from '../../../CSS3DRenderPlugin/utils/three/CSS3DObject';
6
6
  type NonVoid<T> = T extends void ? never : T;
7
7
  export declare class CSS3DScaleHelper<T extends CSS3DObjectPlus = CSS3DObjectPlus> extends RectangleScaleHelperAbstract<T, HTMLElement> {
8
+ name: string;
8
9
  points: RectangleScaleHelperAbstract<THREE.Object3D, HTMLElement>['points'];
9
10
  cornerPositions: Vector3[];
10
11
  css3DInstance?: NonVoid<Create3DElementReturnType>;
@@ -16,6 +17,7 @@ export declare class CSS3DScaleHelper<T extends CSS3DObjectPlus = CSS3DObjectPlu
16
17
  private container;
17
18
  private enabled;
18
19
  constructor(originObject3D: T, container: HTMLElement, camera: THREE.Camera, scene: THREE.Scene);
20
+ initQuaternion(): void;
19
21
  applyMatrix4(matrix: THREE.Matrix4): void;
20
22
  showDraggingHelper(): void;
21
23
  applyHelperScaleMatrix4(matrix: THREE.Matrix4, origin?: Vector3): void;
@@ -1,25 +1,26 @@
1
1
  var b = Object.defineProperty;
2
2
  var D = (c, n, e) => n in c ? b(c, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[n] = e;
3
3
  var i = (c, n, e) => (D(c, typeof n != "symbol" ? n + "" : n, e), e);
4
- import { CSS3DRender as f } from "../../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
4
+ import { CSS3DRender as u } from "../../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
5
5
  import * as p from "three";
6
- import { RectangleScaleHelperAbstract as u } from "../Base/BaseHelper.js";
6
+ import { RectangleScaleHelperAbstract as f } from "../Base/BaseHelper.js";
7
7
  import { rectangleScaleDom as y } from "./HTML/rectangleScaleDom.js";
8
8
  import "../../three/core/Sphere.js";
9
- class v extends u {
9
+ class g extends f {
10
10
  // eslint-disable-next-line max-params
11
- constructor(e, t, s, l) {
11
+ constructor(e, t, s, o) {
12
12
  super(e);
13
+ i(this, "name", "CSS3DScaleHelper");
13
14
  i(this, "points", []);
14
15
  i(this, "cornerPositions", []);
15
16
  i(this, "css3DInstance");
16
17
  i(this, "plane");
17
- i(this, "css3DRenderer", new f());
18
+ i(this, "css3DRenderer", new u());
18
19
  i(this, "camera");
19
20
  i(this, "scene");
20
21
  i(this, "container");
21
22
  i(this, "enabled", !1);
22
- this.camera = s, this.scene = l, this.container = t, this.initRectangleScaleHelper();
23
+ this.camera = s, this.scene = o, this.container = t, this.initRectangleScaleHelper();
23
24
  }
24
25
  get helperObject() {
25
26
  var e;
@@ -27,6 +28,9 @@ class v extends u {
27
28
  throw new Error("css3DInstance is not initialized");
28
29
  return this.css3DInstance.css3DObject;
29
30
  }
31
+ initQuaternion() {
32
+ this.quaternion.copy(this.originObject3D.quaternion);
33
+ }
30
34
  applyMatrix4(e) {
31
35
  var t;
32
36
  super.applyMatrix4(e), this.helperObject.applyMatrix4(e), (t = this.plane) == null || t.applyMatrix4(e), this.cornerPositions.forEach((s) => s.applyMatrix4(e));
@@ -44,8 +48,8 @@ class v extends u {
44
48
  });
45
49
  }
46
50
  applyHelperQuaternion(e, t) {
47
- var l;
48
- const s = (l = this.css3DInstance) == null ? void 0 : l.css3DObject;
51
+ var o;
52
+ const s = (o = this.css3DInstance) == null ? void 0 : o.css3DObject;
49
53
  if (s) {
50
54
  const a = new p.Vector3().subVectors(s.position, t).applyQuaternion(e).add(t);
51
55
  s.position.copy(a), s.applyQuaternion(e);
@@ -55,8 +59,8 @@ class v extends u {
55
59
  this.plane.position.copy(a), this.plane.applyQuaternion(e);
56
60
  }
57
61
  this.cornerPositions.forEach((a) => {
58
- const o = new p.Vector3().subVectors(a, t).applyQuaternion(e).add(t);
59
- a.copy(o);
62
+ const l = new p.Vector3().subVectors(a, t).applyQuaternion(e).add(t);
63
+ a.copy(l);
60
64
  });
61
65
  }
62
66
  enable() {
@@ -79,7 +83,7 @@ class v extends u {
79
83
  this.disable(), this.css3DRenderer.dispose();
80
84
  }
81
85
  initRectangleScaleHelper() {
82
- var o, r;
86
+ var l, r;
83
87
  const e = this.getCornerPositions();
84
88
  if (!e)
85
89
  return;
@@ -88,12 +92,12 @@ class v extends u {
88
92
  if (!t)
89
93
  return;
90
94
  this.css3DInstance = t, t.appendToElement(this.container);
91
- const s = t.css3DObject.container, { container: l, squares: a } = y();
95
+ const s = t.css3DObject.container, { container: o, squares: a } = y();
92
96
  this.points = a.map((h, d) => ({
93
97
  direction: h.direction,
94
98
  point: h.element,
95
99
  position: this.calculatePointPosition(e)[d]
96
- })), s.insertBefore(l, (o = s.children[0]) != null ? o : null), this.helperObject.position.copy(this.originObject3D.position), (r = this.plane) == null || r.position.copy(this.originObject3D.position);
100
+ })), s.insertBefore(o, (l = s.children[0]) != null ? l : null), this.helperObject.position.copy(this.originObject3D.position), (r = this.plane) == null || r.position.copy(this.originObject3D.position);
97
101
  }
98
102
  getCornerPositions() {
99
103
  const { originObject3D: e } = this;
@@ -115,5 +119,5 @@ class v extends u {
115
119
  }
116
120
  }
117
121
  export {
118
- v as CSS3DScaleHelper
122
+ g as CSS3DScaleHelper
119
123
  };
@@ -4,6 +4,7 @@ import { MoveHelperAbstract, type BaseHelperConfig } from '.';
4
4
  import { ArrowGroup } from './Objects/ArrowGroup';
5
5
  import type * as THREE from 'three';
6
6
  export declare class MoveHelper extends MoveHelperAbstract {
7
+ name: string;
7
8
  xArrow?: ArrowGroup;
8
9
  yArrow?: ArrowGroup;
9
10
  zArrow?: ArrowGroup;
@@ -13,7 +14,7 @@ export declare class MoveHelper extends MoveHelperAbstract {
13
14
  zArrowEnable?: boolean;
14
15
  } & BaseHelperConfig);
15
16
  show(): void;
16
- setScaleByCamera(camera: THREE.PerspectiveCamera): void;
17
+ setScaleByCamera(camera: THREE.PerspectiveCamera | THREE.OrthographicCamera): void;
17
18
  showDraggingHelper(directions: Direction[]): void;
18
19
  dispose(): void;
19
20
  }
@@ -11,6 +11,7 @@ import "../../three/core/Sphere.js";
11
11
  class z extends h {
12
12
  constructor(r, s) {
13
13
  super(r, s);
14
+ e(this, "name", "MoveHelper");
14
15
  e(this, "xArrow");
15
16
  e(this, "yArrow");
16
17
  e(this, "zArrow");
@@ -4,6 +4,7 @@ import { RotateHelperAbstract, type BaseHelperConfig } from '../Base/BaseHelper'
4
4
  import type { Color, Direction } from '../typings';
5
5
  import { tipsDom } from './HTML/tipsDom';
6
6
  export declare class RotateHelper extends RotateHelperAbstract {
7
+ name: string;
7
8
  xCircle?: RotateCircleGroup;
8
9
  yCircle?: RotateCircleGroup;
9
10
  zCircle?: RotateCircleGroup;
@@ -19,7 +20,7 @@ export declare class RotateHelper extends RotateHelperAbstract {
19
20
  } & BaseHelperConfig);
20
21
  hide(): void;
21
22
  show(): void;
22
- setScaleByCamera(camera: THREE.PerspectiveCamera): void;
23
+ setScaleByCamera(camera: THREE.PerspectiveCamera | THREE.OrthographicCamera): void;
23
24
  showDraggingHelper(directions: Direction[]): void;
24
25
  dispose(): void;
25
26
  }
@@ -9,6 +9,7 @@ import { calculateScaleByCamera as C } from "../utils/calculateScaleByCamera.js"
9
9
  class D extends u {
10
10
  constructor(t, e) {
11
11
  super(t, e);
12
+ i(this, "name", "RotateHelper");
12
13
  i(this, "xCircle");
13
14
  i(this, "yCircle");
14
15
  i(this, "zCircle");
@@ -80,7 +81,7 @@ class b extends r.Group {
80
81
  super();
81
82
  i(this, "direction");
82
83
  this.direction = t.direction;
83
- const e = 0.015, h = new Array(8).fill(null).map((S, c) => {
84
+ const e = 0.015, h = new Array(8).fill(null).map((R, c) => {
84
85
  const d = new r.RingGeometry(0.25, 0.3, 20, 8, Math.PI / 4 * c + e, Math.PI / 4 - e * 2), p = new r.MeshBasicMaterial({
85
86
  opacity: 1,
86
87
  color: 16777215,
@@ -2,13 +2,15 @@ import * as THREE from 'three';
2
2
  import { ScaleHelperAbstract, type BaseHelperConfig } from '../Base/BaseHelper';
3
3
  import type { ScalePosition } from '../typings';
4
4
  export declare class ScaleHelper<T extends THREE.Object3D = THREE.Object3D> extends ScaleHelperAbstract<T> {
5
- scaleMeshes: Array<THREE.Mesh & {
5
+ name: string;
6
+ scaleMeshes: Array<THREE.Object3D & {
6
7
  scalePosition: ScalePosition;
7
8
  }>;
8
9
  private positions;
9
10
  constructor(originObject3D: T, config?: {
10
11
  positions?: Array<ScalePosition> | (() => Array<ScalePosition>);
11
12
  } & BaseHelperConfig);
13
+ initQuaternion(): void;
12
14
  initialPosition(offset?: THREE.Vector3): void;
13
- setScaleByCamera(camera: THREE.PerspectiveCamera): void;
15
+ setScaleByCamera(camera: THREE.PerspectiveCamera | THREE.OrthographicCamera): void;
14
16
  }