@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
@@ -1,62 +1,51 @@
1
- var u = Object.defineProperty;
2
- var j = (b, e, t) => e in b ? u(b, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : b[e] = t;
3
- var s = (b, e, t) => (j(b, typeof e != "symbol" ? e + "" : e, t), t);
4
- import * as c from "three";
5
- import { Subscribe as f } from "../../Subscribe.js";
6
- import { DomEvents as m } from "../../threex/domevents/index.js";
1
+ var g = Object.defineProperty;
2
+ var m = (h, t, e) => t in h ? g(h, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[t] = e;
3
+ var o = (h, t, e) => (m(h, typeof t != "symbol" ? t + "" : t, e), e);
4
+ import * as b from "three";
5
+ import { Subscribe as u } from "../../Subscribe.js";
7
6
  import { notNil as y } from "../../isNil.js";
8
- import { boundingBox as g } from "../../three/boundingBox.js";
9
- import { toArray as H } from "../../util.js";
10
- class E {
11
- constructor(e, t) {
12
- s(this, "originObject3D");
13
- s(this, "hooks");
14
- s(this, "preventTapDefaultEvent", !1);
15
- s(this, "internalHooks");
16
- s(this, "disposers", []);
17
- s(this, "helperObject3D");
18
- s(this, "camera");
19
- s(this, "model");
20
- s(this, "scene");
21
- s(this, "container");
22
- s(this, "domEvents");
23
- s(this, "isDragging", !1);
24
- s(this, "enabled", !1);
25
- s(this, "name", "BaseController");
26
- s(this, "boundingBox");
27
- s(this, "config");
28
- s(this, "onRender");
29
- s(this, "onWantsTapGesture", (e) => {
30
- if (this.getIntersectObject(e))
7
+ import { boundingBox as H } from "../../three/boundingBox.js";
8
+ import { toArray as D } from "../../util.js";
9
+ class _ {
10
+ constructor(t, e) {
11
+ o(this, "originObject3D");
12
+ o(this, "hooks");
13
+ o(this, "preventTapDefaultEvent", !1);
14
+ o(this, "internalHooks");
15
+ o(this, "disposers", []);
16
+ o(this, "helperObject3D");
17
+ o(this, "camera");
18
+ o(this, "model");
19
+ o(this, "scene");
20
+ o(this, "container");
21
+ o(this, "domEvents");
22
+ o(this, "isDragging", !1);
23
+ o(this, "enabled", !1);
24
+ o(this, "name", "BaseController");
25
+ o(this, "boundingBox");
26
+ o(this, "config");
27
+ o(this, "onRender");
28
+ o(this, "onWantsTapGesture", (t) => {
29
+ if (this.getIntersectObject(t))
31
30
  return !1;
32
31
  });
33
- s(this, "onWantsUpdateCameraDistance", () => {
34
- if (this.camera.isPerspectiveCamera) {
35
- const e = this.camera;
36
- this.helperObject3D.setScaleByCamera(e);
37
- }
32
+ o(this, "onWantsUpdateCameraDistance", () => {
33
+ this.helperObject3D.setScaleByCamera(this.camera);
38
34
  });
39
- s(this, "getBox", () => this.boundingBox ? this.boundingBox : (this.boundingBox = g(this.originObject3D), this.boundingBox));
40
- var d, O, n;
41
- this.hooks = (d = e.sharedHooks) != null ? d : new f(), this.internalHooks = (O = e.sharedInternalHooks) != null ? O : new f(), this.camera = e.camera, this.model = e.model, this.originObject3D = e.originObject3D, this.helperObject3D = e.helperObject3D, this.container = e.container, this.scene = e.scene, this.domEvents = new m(e.camera, e.container), this.onRender = (n = e.onRender) != null ? n : () => {
42
- }, this.config = t != null ? t : {}, this.initialHelperPosition(), this.initialHelperQuaternion(), this.onWantsUpdateCameraDistance(), this.enable();
43
- const o = this.onSetOriginObjectScale.bind(this), a = this.onSetOriginObjectRotate.bind(this), i = this.onSetOriginObjectPosition.bind(this), r = this.onApplyOriginObjectScale.bind(this), h = this.onApplyOriginObjectRotate.bind(this), p = this.onApplyOriginObjectPosition.bind(this), l = this.initialHelperPosition.bind(this);
44
- this.internalHooks.on("setObjectPosition", this.onWantsUpdateCameraDistance), this.internalHooks.on("initialHelperPosition", this.onWantsUpdateCameraDistance), this.internalHooks.on("initialHelperPosition", l), this.internalHooks.on("setObjectScale", o), this.internalHooks.on("setObjectRotate", a), this.internalHooks.on("setObjectPosition", i), this.internalHooks.on("applyObjectPosition", p), this.internalHooks.on("applyObjectRotate", h), this.internalHooks.on("applyObjectScale", r), this.disposers.push(() => {
45
- this.internalHooks.off("setObjectPosition", this.onWantsUpdateCameraDistance), this.internalHooks.off("initialHelperPosition", this.onWantsUpdateCameraDistance), this.internalHooks.off("initialHelperPosition", l), this.internalHooks.off("setObjectScale", o), this.internalHooks.off("setObjectRotate", a), this.internalHooks.off("setObjectPosition", i), this.internalHooks.off("applyObjectPosition", p), this.internalHooks.off("applyObjectRotate", h), this.internalHooks.off("applyObjectScale", r);
35
+ o(this, "getBox", () => this.boundingBox ? this.boundingBox : (this.boundingBox = H(this.originObject3D), this.boundingBox));
36
+ var d, O, i;
37
+ this.hooks = (d = t.sharedHooks) != null ? d : new u(), this.internalHooks = (O = t.sharedInternalHooks) != null ? O : new u(), this.camera = t.camera, this.model = t.model, this.originObject3D = t.originObject3D, this.helperObject3D = t.helperObject3D, this.container = t.container, this.scene = t.scene, this.domEvents = t.domEvents, this.onRender = (i = t.onRender) != null ? i : () => {
38
+ }, this.config = e != null ? e : {}, this.initialHelperPosition(), this.initialHelperQuaternion(), this.onWantsUpdateCameraDistance(), this.enable();
39
+ const s = this.onSetOriginObjectScale.bind(this), a = this.onSetOriginObjectRotate.bind(this), n = this.onSetOriginObjectPosition.bind(this), r = this.onApplyOriginObjectScale.bind(this), l = this.onApplyOriginObjectRotate.bind(this), p = this.onApplyOriginObjectPosition.bind(this), c = this.initialHelperPosition.bind(this);
40
+ this.internalHooks.on("initialHelperPosition", c), this.internalHooks.on("setObjectScale", s), this.internalHooks.on("setObjectRotate", a), this.internalHooks.on("setObjectPosition", n), this.internalHooks.on("applyObjectPosition", p), this.internalHooks.on("applyObjectRotate", l), this.internalHooks.on("applyObjectScale", r), this.hooks.on("moveEnd", this.onWantsUpdateCameraDistance), this.internalHooks.on("setObjectPosition", this.onWantsUpdateCameraDistance), this.internalHooks.on("initialHelperPosition", this.onWantsUpdateCameraDistance), this.disposers.push(() => {
41
+ this.internalHooks.off("setObjectPosition", this.onWantsUpdateCameraDistance), this.internalHooks.off("initialHelperPosition", c), this.internalHooks.off("initialHelperPosition", this.onWantsUpdateCameraDistance), this.internalHooks.off("setObjectScale", s), this.internalHooks.off("setObjectRotate", a), this.internalHooks.off("setObjectPosition", n), this.internalHooks.off("applyObjectPosition", p), this.internalHooks.off("applyObjectRotate", l), this.internalHooks.off("applyObjectScale", r);
46
42
  });
47
43
  }
48
44
  initialHelperPosition() {
49
45
  this.helperObject3D.initialPosition(this.calculateOffset(this.config.offset));
50
46
  }
51
47
  initialHelperQuaternion() {
52
- var h, p, l;
53
- this.helperObject3D.initQuaternion();
54
- const e = (h = this.config.xAxis) != null ? h : new c.Vector3(1, 0, 0), t = (p = this.config.yAxis) != null ? p : new c.Vector3(0, 1, 0), o = (l = this.config.zAxis) != null ? l : new c.Vector3(0, 0, 1), a = new c.Quaternion();
55
- a.setFromUnitVectors(new c.Vector3(1, 0, 0), e.normalize());
56
- const i = new c.Quaternion();
57
- i.setFromUnitVectors(new c.Vector3(0, 1, 0), t.normalize());
58
- const r = new c.Quaternion();
59
- r.setFromUnitVectors(new c.Vector3(0, 0, 1), o.normalize()), this.helperObject3D.quaternion.premultiply(a), this.helperObject3D.quaternion.premultiply(i), this.helperObject3D.quaternion.premultiply(r);
48
+ this.helperObject3D.initQuaternion(this.config);
60
49
  }
61
50
  enable() {
62
51
  this.enabled || (this.enabled = !0, this.scene.add(this.helperObject3D), this.helperObject3D.enable(), this.render());
@@ -71,148 +60,149 @@ class E {
71
60
  this.helperObject3D.hide(), this.render();
72
61
  }
73
62
  dispose() {
74
- var e;
75
- (e = this.disposers) == null || e.forEach((t) => t == null ? void 0 : t()), this.helperObject3D.dispose(), this.render();
63
+ var t;
64
+ (t = this.disposers) == null || t.forEach((e) => e == null ? void 0 : e()), this.helperObject3D.dispose(), this.render();
76
65
  }
77
66
  /**
78
67
  * @description: applyHelperMatrix4
79
68
  * @param {THREE.Matrix4} matrix position 偏移量
80
69
  */
81
- applyHelperMatrix4(e) {
82
- this.helperObject3D.applyMatrix4(e);
70
+ applyHelperMatrix4(t) {
71
+ this.helperObject3D.applyMatrix4(t);
83
72
  }
84
73
  /**
85
74
  * @description: applyHelperQuaternion
86
75
  * @param {THREE.Quaternion} quaternion 旋转四元数
87
76
  * @param {THREE.Vector3} origin 旋转中心
88
77
  */
89
- applyHelperQuaternion(e, t) {
90
- this.helperObject3D.applyHelperQuaternion(e, t);
78
+ applyHelperQuaternion(t, e) {
79
+ this.helperObject3D.applyHelperQuaternion(t, e);
91
80
  }
92
81
  /**
93
82
  * @description: applyHelperScaleMatrix4
94
83
  * @param {THREE.Matrix4} matrix 缩放矩阵
95
84
  * @param {THREE.Vector3} origin 缩放中心
96
85
  */
97
- applyHelperScaleMatrix4(e, t) {
98
- this.helperObject3D.applyHelperScaleMatrix4(e, t);
86
+ applyHelperScaleMatrix4(t, e) {
87
+ this.helperObject3D.applyHelperScaleMatrix4(t, e);
99
88
  }
100
- onWantsGesture(e, t, o) {
89
+ onWantsGesture(t, e, s) {
101
90
  if (this.isDragging)
102
91
  return !1;
103
92
  }
104
- onIntersectionOnModelUpdate(e) {
93
+ onIntersectionOnModelUpdate(t) {
105
94
  }
106
95
  /**
107
96
  * @description: onApplyOriginObjectScale
108
97
  * @param {THREE.Matrix4} params.matrix 缩放矩阵
109
98
  * @param {THREE.Vector3} params.origin 缩放中心
110
99
  */
111
- onApplyOriginObjectScale(e) {
112
- this.applyHelperScaleMatrix4(e.matrix, e.origin);
100
+ onApplyOriginObjectScale(t) {
101
+ this.applyHelperScaleMatrix4(t.matrix, t.origin);
113
102
  }
114
103
  /**
115
104
  * @description: onApplyOriginObjectRotate
116
105
  * @param {THREE.Quaternion} params.quaternion 旋转四元数
117
106
  * @param {THREE.Vector3} params.origin 旋转中心
118
107
  */
119
- onApplyOriginObjectRotate(e) {
120
- this.applyHelperQuaternion(e.quaternion, e.origin);
108
+ onApplyOriginObjectRotate(t) {
109
+ this.applyHelperQuaternion(t.quaternion, t.origin);
121
110
  }
122
111
  /**
123
112
  * @description: onApplyOriginObjectPosition
124
113
  * @param {THREE.Matrix4} params.matrix position 偏移量
125
114
  */
126
- onApplyOriginObjectPosition(e) {
127
- this.applyHelperMatrix4(e.matrix);
115
+ onApplyOriginObjectPosition(t) {
116
+ this.applyHelperMatrix4(t.matrix);
128
117
  }
129
- onSetOriginObjectScale(e) {
130
- this.helperObject3D.scale.copy(e), this.updateOffsetByScale(e);
118
+ onSetOriginObjectScale(t) {
119
+ this.helperObject3D.scale.copy(t), this.updateOffsetByScale(t);
131
120
  }
132
- onSetOriginObjectRotate(e, t) {
133
- this.helperObject3D.setHelperQuaternion(e, t);
121
+ onSetOriginObjectRotate(t, e) {
122
+ this.helperObject3D.setHelperQuaternion(t, e);
134
123
  }
135
- onSetOriginObjectPosition(e) {
136
- this.helperObject3D.position.copy(e.clone().add(this.calculateOffset(this.config.offset)));
124
+ onSetOriginObjectPosition(t) {
125
+ this.helperObject3D.position.copy(t.clone().add(this.calculateOffset(this.config.offset)));
137
126
  }
138
127
  render() {
139
128
  this.onRender();
140
129
  }
141
- updateOffsetByScale(e) {
130
+ updateOffsetByScale(t) {
142
131
  if (this.boundingBox && this.config.offset) {
143
- const t = this.originObject3D.position, o = new c.Vector3().subVectors(this.boundingBox.max, t).multiply(e).add(t), a = new c.Vector3().subVectors(this.boundingBox.min, t).multiply(e).add(t), i = this.calculateOffset(this.config.offset, { min: a, max: o });
144
- this.helperObject3D.initialPosition(i);
132
+ const e = this.originObject3D.position, s = new b.Vector3().subVectors(this.boundingBox.max, e).multiply(t).add(e), a = new b.Vector3().subVectors(this.boundingBox.min, e).multiply(t).add(e), n = this.calculateOffset(this.config.offset, { min: a, max: s });
133
+ this.helperObject3D.initialPosition(n);
145
134
  }
146
135
  }
147
- hoverListener(e, t = 16777215, o = 1) {
148
- const a = H(e).filter(y), i = [];
136
+ hoverListener(t, e = 16777215, s = 1) {
137
+ const a = D(t).filter(y), n = [];
149
138
  for (const r of a)
150
- if (r.material || r instanceof c.Group) {
151
- const h = r instanceof c.Group ? r.children.filter((n) => n instanceof c.Mesh) : [r];
152
- h.forEach((n) => {
153
- n.__originalColor__ = n.material.color.clone(), n.__originalOpacity__ = n.material.opacity;
139
+ if (r.material || r instanceof b.Group) {
140
+ const l = r instanceof b.Group ? r.children.filter((i) => i instanceof b.Mesh) : [r];
141
+ l.forEach((i) => {
142
+ var f, j;
143
+ i.__originalColor__ = (f = i.__originalColor__) != null ? f : i.material.color.clone(), i.__originalOpacity__ = (j = i.__originalOpacity__) != null ? j : i.material.opacity;
154
144
  });
155
145
  const p = () => {
156
- h.forEach((n) => {
157
- n.material.color.set(t), n.material.opacity = o;
146
+ l.forEach((i) => {
147
+ i.material.color.set(e), i.material.opacity = s;
158
148
  }), this.render();
159
- }, l = () => {
160
- h.forEach((n) => {
161
- n.material.color.copy(n.__originalColor__), n.material.opacity = n.__originalOpacity__;
149
+ }, c = () => {
150
+ l.forEach((i) => {
151
+ i.material.color.copy(i.__originalColor__), i.material.opacity = i.__originalOpacity__;
162
152
  }), this.render();
163
153
  }, d = () => {
164
154
  this.isDragging || p();
165
155
  }, O = () => {
166
- this.isDragging || l();
156
+ this.isDragging || c();
167
157
  };
168
- for (const n of h)
169
- this.domEvents.addEventListener(n, "mouseover", d), this.domEvents.addEventListener(n, "mouseout", O), this.hooks.on("moveStart", p), this.hooks.on("moveEnd", l), this.hooks.on("rotateEnd", l), i.push(() => {
170
- this.domEvents.removeEventListener(n, "mouseover", d), this.domEvents.removeEventListener(n, "mouseout", O), this.hooks.off("moveStart", p), this.hooks.off("moveEnd", l), this.hooks.off("rotateEnd", l);
158
+ for (const i of l)
159
+ this.domEvents.addEventListener(i, "mouseover", d), this.domEvents.addEventListener(i, "mouseout", O), this.hooks.on("moveStart", p), this.hooks.on("moveEnd", c), this.hooks.on("rotateEnd", c), this.hooks.on("scaleEnd", c), n.push(() => {
160
+ this.domEvents.removeEventListener(i, "mouseover", d), this.domEvents.removeEventListener(i, "mouseout", O), this.hooks.off("moveStart", p), this.hooks.off("moveEnd", c), this.hooks.off("rotateEnd", c), this.hooks.off("scaleEnd", c);
171
161
  });
172
162
  }
173
- return () => i.forEach((r) => r == null ? void 0 : r());
163
+ return () => n.forEach((r) => r == null ? void 0 : r());
174
164
  }
175
- getIntersectObject(e) {
176
- const t = this.camera.position, o = this.helperObject3D;
177
- if (!o)
165
+ getIntersectObject(t) {
166
+ const e = this.camera.position, s = this.helperObject3D;
167
+ if (!s)
178
168
  return;
179
- const a = this.helperObject3D.raycasterIntersectObject(e)[0];
169
+ const a = this.helperObject3D.raycasterIntersectObject(t)[0];
180
170
  if (!a)
181
171
  return;
182
- const i = a;
183
- if (i.object = o, this.model.intersectRaycaster) {
184
- const r = this.model.intersectRaycaster(e)[0];
185
- if (r && r.point.distanceTo(t) < i.point.distanceTo(t))
172
+ const n = a;
173
+ if (n.object = s, this.model.intersectRaycaster) {
174
+ const r = this.model.intersectRaycaster(t)[0];
175
+ if (r && r.point.distanceTo(e) < n.point.distanceTo(e))
186
176
  return;
187
177
  }
188
- return i.object;
189
- }
190
- calculateOffset(e, t) {
191
- const o = new c.Vector3(0, 0, 0);
192
- if (!e)
193
- return o;
194
- const a = () => t || this.getBox();
195
- if (typeof e.x == "number")
196
- o.setX(e.x);
197
- else if (typeof e.x == "object") {
198
- const i = a();
199
- o.setX((i.max.x - i.min.x) * e.x.percents);
178
+ return n.object;
179
+ }
180
+ calculateOffset(t, e) {
181
+ const s = new b.Vector3(0, 0, 0);
182
+ if (!t)
183
+ return s;
184
+ const a = () => e || this.getBox();
185
+ if (typeof t.x == "number")
186
+ s.setX(t.x);
187
+ else if (typeof t.x == "object") {
188
+ const n = a();
189
+ s.setX((n.max.x - n.min.x) * t.x.percents);
200
190
  }
201
- if (typeof e.y == "number")
202
- o.setY(e.y);
203
- else if (typeof e.y == "object") {
204
- const i = a();
205
- o.setY((i.max.y - i.min.y) * e.y.percents);
191
+ if (typeof t.y == "number")
192
+ s.setY(t.y);
193
+ else if (typeof t.y == "object") {
194
+ const n = a();
195
+ s.setY((n.max.y - n.min.y) * t.y.percents);
206
196
  }
207
- if (typeof e.z == "number")
208
- o.setZ(e.z);
209
- else if (typeof e.z == "object") {
210
- const i = a();
211
- o.setZ((i.max.z - i.min.z) * e.z.percents);
197
+ if (typeof t.z == "number")
198
+ s.setZ(t.z);
199
+ else if (typeof t.z == "object") {
200
+ const n = a();
201
+ s.setZ((n.max.z - n.min.z) * t.z.percents);
212
202
  }
213
- return o;
203
+ return s;
214
204
  }
215
205
  }
216
206
  export {
217
- E as BaseController
207
+ _ as BaseController
218
208
  };
@@ -27,8 +27,12 @@ export declare abstract class BaseHelper<OriginObject3D extends Object3D = Objec
27
27
  hide(): void;
28
28
  raycasterIntersectObject(raycaster: THREE.Raycaster, intersection?: THREE.Intersection[]): THREE.Intersection[];
29
29
  initialPosition(offset?: THREE.Vector3): void;
30
- setScaleByCamera(camera: THREE.PerspectiveCamera): void;
31
- initQuaternion(): void;
30
+ setScaleByCamera(camera: THREE.PerspectiveCamera | THREE.OrthographicCamera): void;
31
+ initQuaternion(config?: {
32
+ xAxis?: Vector3;
33
+ yAxis?: Vector3;
34
+ zAxis?: Vector3;
35
+ }): void;
32
36
  applyHelperScaleMatrix4(matrix: THREE.Matrix4, origin?: Vector3): void;
33
37
  setHelperQuaternion(quaternion: THREE.Quaternion, origin?: Vector3): void;
34
38
  applyHelperQuaternion(quaternion: THREE.Quaternion, origin?: Vector3): void;
@@ -70,7 +74,7 @@ export declare abstract class RotateHelperAbstract<OriginObject3D extends Object
70
74
  abstract showDraggingHelper(directions: Direction[]): void;
71
75
  }
72
76
  export declare abstract class ScaleHelperAbstract<OriginObject3D extends Object3D = Object3D> extends BaseHelper<OriginObject3D> {
73
- abstract scaleMeshes: Array<Mesh & {
77
+ abstract scaleMeshes: Array<Object3D & {
74
78
  scalePosition: ScalePosition;
75
79
  }>;
76
80
  }
@@ -1,20 +1,21 @@
1
- var c = Object.defineProperty;
2
- var h = (e, s, t) => s in e ? c(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t;
3
- var n = (e, s, t) => (h(e, typeof s != "symbol" ? s + "" : s, t), t);
4
- import * as l from "three";
5
- import { Vector3 as a } from "three";
6
- import { setObjectQuaternion as d } from "../utils/setObjectQuaternion.js";
7
- import { IObject3D as b } from "../../three/IObject3D.js";
8
- import { boundingBox as m, boundingSphere as u } from "../../three/boundingBox.js";
9
- class r extends b {
10
- constructor(t, i) {
11
- var o, p;
1
+ var b = Object.defineProperty;
2
+ var y = (n, p, t) => p in n ? b(n, p, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[p] = t;
3
+ var u = (n, p, t) => (y(n, typeof p != "symbol" ? p + "" : p, t), t);
4
+ import * as o from "three";
5
+ import { Vector3 as m } from "three";
6
+ import { setObjectQuaternion as x } from "../utils/setObjectQuaternion.js";
7
+ import { IObject3D as w } from "../../three/IObject3D.js";
8
+ import { boundingBox as F, boundingSphere as Q } from "../../three/boundingBox.js";
9
+ import { notNil as j } from "../../isNil.js";
10
+ class h extends w {
11
+ constructor(t, e) {
12
+ var r, l;
12
13
  super();
13
- n(this, "originObject3D");
14
- n(this, "onRender");
15
- n(this, "positionFrom");
16
- this.originObject3D = t, this.onRender = (o = i == null ? void 0 : i.onRender) != null ? o : () => {
17
- }, this.positionFrom = (p = i == null ? void 0 : i.positionFrom) != null ? p : "objectPosition";
14
+ u(this, "originObject3D");
15
+ u(this, "onRender");
16
+ u(this, "positionFrom");
17
+ this.originObject3D = t, this.onRender = (r = e == null ? void 0 : e.onRender) != null ? r : () => {
18
+ }, this.positionFrom = (l = e == null ? void 0 : e.positionFrom) != null ? l : "objectPosition";
18
19
  }
19
20
  get helperObject() {
20
21
  return this;
@@ -34,28 +35,48 @@ class r extends b {
34
35
  hide() {
35
36
  this.visible = !1, this.render();
36
37
  }
37
- raycasterIntersectObject(t, i = []) {
38
- return t.intersectObject(this, !0, i);
38
+ raycasterIntersectObject(t, e = []) {
39
+ return t.intersectObject(this, !0, e);
39
40
  }
40
41
  initialPosition(t) {
41
- var i, o;
42
- this.positionFrom === "objectPosition" ? this.position.copy(this.originObject3D.position) : this.positionFrom === "boundingBox" ? this.position.copy((i = m(this.originObject3D)) == null ? void 0 : i.getCenter(new l.Vector3()).applyMatrix4(this.originObject3D.matrixWorld)) : this.positionFrom === "boundingSphere" ? this.position.copy((o = u(this.originObject3D)) == null ? void 0 : o.center.clone().applyMatrix4(this.originObject3D.matrixWorld)) : this.positionFrom instanceof a ? this.position.copy(this.positionFrom) : this.positionFrom instanceof Function && this.position.copy(this.positionFrom(this.originObject3D)), t && this.position.add(t);
42
+ var e, r;
43
+ this.positionFrom === "objectPosition" ? this.position.copy(this.originObject3D.position) : this.positionFrom === "boundingBox" ? this.position.copy((e = F(this.originObject3D)) == null ? void 0 : e.getCenter(new o.Vector3()).applyMatrix4(this.originObject3D.matrixWorld)) : this.positionFrom === "boundingSphere" ? this.position.copy((r = Q(this.originObject3D)) == null ? void 0 : r.center.clone().applyMatrix4(this.originObject3D.matrixWorld)) : this.positionFrom instanceof m ? this.position.copy(this.positionFrom) : this.positionFrom instanceof Function && this.position.copy(this.positionFrom(this.originObject3D)), t && this.position.add(t);
43
44
  }
44
45
  setScaleByCamera(t) {
45
46
  }
46
- initQuaternion() {
47
- this.quaternion.copy(this.originObject3D.quaternion);
47
+ initQuaternion(t) {
48
+ if (this.quaternion.copy(this.originObject3D.quaternion), t && (t.xAxis || t.yAxis || t.zAxis)) {
49
+ const { xAxis: e, yAxis: r, zAxis: l } = t;
50
+ let s = e == null ? void 0 : e.clone(), i = r == null ? void 0 : r.clone(), a = l == null ? void 0 : l.clone();
51
+ if (s && !i && !i) {
52
+ const c = new o.Quaternion().setFromUnitVectors(new o.Vector3(1, 0, 0), s.normalize());
53
+ this.applyQuaternion(c);
54
+ }
55
+ if (i && !s && !a) {
56
+ const c = new o.Quaternion().setFromUnitVectors(new o.Vector3(0, 1, 0), i.normalize());
57
+ this.applyQuaternion(c);
58
+ }
59
+ if (a && !s && !i) {
60
+ const c = new o.Quaternion().setFromUnitVectors(new o.Vector3(0, 0, 1), a.normalize());
61
+ this.applyQuaternion(c);
62
+ }
63
+ if ([s, i, a].filter(j).length >= 2) {
64
+ s || (s = new o.Vector3().crossVectors(i, a).normalize()), i || (i = new o.Vector3().crossVectors(s, a).normalize()), a || (a = new o.Vector3().crossVectors(s, i).normalize()), s.applyQuaternion(this.quaternion), i.applyQuaternion(this.quaternion), a.applyQuaternion(this.quaternion);
65
+ const c = new o.Matrix4().makeBasis(s, i, a), d = new o.Quaternion().setFromRotationMatrix(c);
66
+ this.quaternion.copy(d);
67
+ }
68
+ }
48
69
  }
49
- applyHelperScaleMatrix4(t, i) {
70
+ applyHelperScaleMatrix4(t, e) {
50
71
  this.scale.applyMatrix4(t);
51
72
  }
52
- setHelperQuaternion(t, i) {
53
- d(this, t, i);
73
+ setHelperQuaternion(t, e) {
74
+ this.initQuaternion(), x(this, this.quaternion.clone().premultiply(t), e);
54
75
  }
55
- applyHelperQuaternion(t, i) {
56
- if (i) {
57
- const o = new a().subVectors(this.position, i).applyQuaternion(t).add(i);
58
- this.position.copy(o);
76
+ applyHelperQuaternion(t, e) {
77
+ if (e) {
78
+ const r = new m().subVectors(this.position, e).applyQuaternion(t).add(e);
79
+ this.position.copy(r);
59
80
  }
60
81
  this.applyQuaternion(t);
61
82
  }
@@ -63,20 +84,20 @@ class r extends b {
63
84
  this.removeFromParent();
64
85
  }
65
86
  }
66
- class D extends r {
87
+ class M extends h {
67
88
  }
68
- class H extends r {
89
+ class R extends h {
69
90
  }
70
- class g extends r {
91
+ class B extends h {
71
92
  }
72
- class R extends r {
93
+ class v extends h {
73
94
  }
74
- class v extends r {
95
+ class z extends h {
75
96
  }
76
97
  export {
77
- H as BoundingBoxHelperAbstract,
78
- D as MoveHelperAbstract,
79
- v as RectangleScaleHelperAbstract,
80
- g as RotateHelperAbstract,
81
- R as ScaleHelperAbstract
98
+ R as BoundingBoxHelperAbstract,
99
+ M as MoveHelperAbstract,
100
+ z as RectangleScaleHelperAbstract,
101
+ B as RotateHelperAbstract,
102
+ v as ScaleHelperAbstract
82
103
  };