@realsee/dnalogel 3.51.0 → 3.52.1

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 +15 -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 -5
  20. package/dist/Sculpt/Objects/Base/index.d.ts +3 -3
  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 +13 -2
  30. package/dist/Sculpt/index.d.ts +10 -19
  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 +35141 -54254
  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 -5
  171. package/libs/Sculpt/Meshes/Rectangle.js +12 -22
  172. package/libs/Sculpt/Meshes/RectangleWithEdge.js +17 -20
  173. package/libs/Sculpt/Objects/Base/index.d.ts +3 -3
  174. package/libs/Sculpt/Objects/Base/index.js +20 -25
  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 +41 -37
  179. package/libs/Sculpt/Objects/Cylinder/index.d.ts +3 -0
  180. package/libs/Sculpt/Objects/Cylinder/index.js +66 -62
  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 +13 -2
  193. package/libs/Sculpt/Objects/Rectangle/index.js +143 -81
  194. package/libs/Sculpt/index.d.ts +10 -19
  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,68 +1,61 @@
1
- var d = Object.defineProperty, y = Object.defineProperties;
2
- var u = Object.getOwnPropertyDescriptors;
3
- var g = Object.getOwnPropertySymbols;
1
+ var y = Object.defineProperty, u = Object.defineProperties;
2
+ var g = Object.getOwnPropertyDescriptors;
3
+ var f = Object.getOwnPropertySymbols;
4
4
  var c = Object.prototype.hasOwnProperty, I = Object.prototype.propertyIsEnumerable;
5
- var a = (i, t, e) => t in i ? d(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e, h = (i, t) => {
5
+ var h = (r, t, e) => t in r ? y(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, l = (r, t) => {
6
6
  for (var e in t || (t = {}))
7
- c.call(t, e) && a(i, e, t[e]);
8
- if (g)
9
- for (var e of g(t))
10
- I.call(t, e) && a(i, e, t[e]);
11
- return i;
12
- }, f = (i, t) => y(i, u(t));
13
- var r = (i, t, e) => (a(i, typeof t != "symbol" ? t + "" : t, e), e);
14
- import * as l from "three";
7
+ c.call(t, e) && h(r, e, t[e]);
8
+ if (f)
9
+ for (var e of f(t))
10
+ I.call(t, e) && h(r, e, t[e]);
11
+ return r;
12
+ }, d = (r, t) => u(r, g(t));
13
+ var i = (r, t, e) => (h(r, typeof t != "symbol" ? t + "" : t, e), e);
14
+ import * as a from "three";
15
15
  import { generatePolygonGeometry as H } from "../../shared-utils/three/generatePolygonGeometry.js";
16
- import { DEFAULT_HIGHLIGHT_OPACITY as P } from "../typings/style.js";
17
- import { anyPositionToVector3 as _ } from "../../shared-utils/positionToVector3.js";
18
- import { ColoredMesh as A } from "../utils/three/ColoredMesh.js";
19
- import { getGeometryInfo as S } from "../../shared-utils/three/geometryUtil.js";
20
- import { LightTag as D } from "../../shared-utils/tag.js";
21
- import { getLengthHTML as M } from "../utils/Meshes/getLengthHTML.js";
16
+ import { anyPositionToVector3 as P } from "../../shared-utils/positionToVector3.js";
17
+ import { ColoredMesh as _ } from "../utils/three/ColoredMesh.js";
18
+ import { getGeometryInfo as A } from "../../shared-utils/three/geometryUtil.js";
19
+ import { LightTag as M } from "../../shared-utils/tag.js";
20
+ import { getLengthHTML as S } from "../utils/Meshes/getLengthHTML.js";
22
21
  import { applyObjectMatrixWorld as w } from "../../shared-utils/three/applyObjectMatrixWorld.js";
23
22
  import "hammerjs";
24
23
  import "../../shared-utils/three/PointSelector/index.js";
25
24
  import "three/examples/jsm/renderers/CSS3DRenderer";
26
25
  import "@realsee/five/line";
27
- import "../../vendor/three/examples/jsm/lines/LineGeometry.js";
26
+ import { notNil as D } from "../../shared-utils/isNil.js";
28
27
  import "../../shared-utils/three/core/Sphere.js";
29
28
  import "animejs";
30
- import { notNil as B } from "../../shared-utils/isNil.js";
31
29
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
32
- import "../utils/Modules/Global.js";
33
- import "../../vendor/hotkeys-js/dist/hotkeys.esm.js";
34
- import "../utils/three/rayOnLine.js";
35
- const p = new l.BufferGeometry();
30
+ const p = new a.BufferGeometry();
36
31
  p.name = "blankGeometry";
37
32
  p.isBlank = !0;
38
- class J extends A {
33
+ class V extends _ {
39
34
  constructor(e) {
40
35
  super(e);
41
- r(this, "name", "PolygonMesh");
42
- r(this, "points", []);
43
- r(this, "planeHelperNeedUpdate", !0);
44
- r(this, "geometryInfoNeedUpdate", !0);
45
- r(this, "_paramsStyle");
46
- r(this, "planeHelper", null);
47
- r(this, "_geometryInfo", null);
48
- r(this, "opacityBeforeHighlight");
49
- r(this, "highlighted", !1);
50
- r(this, "lastRenderAreaItem");
51
- r(this, "areaDom");
36
+ i(this, "name", "PolygonMesh");
37
+ i(this, "points", []);
38
+ i(this, "planeHelperNeedUpdate", !0);
39
+ i(this, "geometryInfoNeedUpdate", !0);
40
+ i(this, "_paramsStyle");
41
+ i(this, "planeHelper", null);
42
+ i(this, "_geometryInfo", null);
43
+ i(this, "lastRenderAreaItem");
44
+ i(this, "areaDom");
52
45
  e != null && e.points && this.setPoints(e.points), this._paramsStyle = e != null ? e : {}, this.updateAreaItems();
53
46
  }
54
47
  get style() {
55
- return f(h({}, super.style), { lengthEnable: this._paramsStyle.lengthEnable });
48
+ return d(l({}, super.style), { lengthEnable: this._paramsStyle.lengthEnable });
56
49
  }
57
50
  get isBlank() {
58
51
  return !!this.geometry.isBlank;
59
52
  }
60
53
  get center() {
61
54
  var e;
62
- return (e = this.geometryInfo) == null ? void 0 : e.center;
55
+ return (e = this.geometryInfo) == null ? void 0 : e.center.clone();
63
56
  }
64
57
  get geometryInfo() {
65
- return this.geometryInfoNeedUpdate && (this.isBlank ? this._geometryInfo = null : this._geometryInfo = S(this.geometry), this.geometryInfoNeedUpdate = !1), this._geometryInfo;
58
+ return this.geometryInfoNeedUpdate && (this.isBlank ? this._geometryInfo = null : this._geometryInfo = A(this.geometry), this.geometryInfoNeedUpdate = !1), this._geometryInfo;
66
59
  }
67
60
  get five() {
68
61
  var e, o;
@@ -75,27 +68,21 @@ class J extends A {
75
68
  }
76
69
  }
77
70
  setStyle(e) {
78
- this._paramsStyle = h(h({}, this._paramsStyle), e), super.setStyle(this._paramsStyle), this.updateAreaItems();
71
+ this._paramsStyle = l(l({}, this._paramsStyle), e), super.setStyle(this._paramsStyle), this.updateAreaItems();
79
72
  }
80
73
  setPoints(e) {
81
74
  var n;
82
- const o = e.map(_);
75
+ const o = e.map(P);
83
76
  this.points = o, this.geometry = (n = H(this.points, { checkLinesIntersect: !0 })) != null ? n : p, this.planeHelperNeedUpdate = !0, this.geometryInfoNeedUpdate = !0, this.updateAreaItems();
84
77
  }
85
78
  /**
86
79
  * @description: 获取一个点投影在当前平面上的点
87
80
  */
88
81
  projectPoint(e) {
89
- return e && (this.planeHelperNeedUpdate && this.updatePlaneHelper(), this.planeHelper ? this.planeHelper.projectPoint(e, new l.Vector3()) : e);
90
- }
91
- highlight() {
92
- this.highlighted || (this.highlighted = !0, this.opacityBeforeHighlight = this.opacity, this.setStyle({ opacity: this.opacity * P }), this.needsRender = !0);
93
- }
94
- unhighlight() {
95
- this.highlighted && (this.highlighted = !1, this.setStyle({ opacity: this.opacityBeforeHighlight }), this.needsRender = !0);
82
+ return e && (this.planeHelperNeedUpdate && this.updatePlaneHelper(), this.planeHelper ? this.planeHelper.projectPoint(e, new a.Vector3()) : e);
96
83
  }
97
84
  updatePlaneHelper() {
98
- this.points.length >= 3 ? this.planeHelper = new l.Plane().setFromCoplanarPoints(this.points[0], this.points[1], this.points[2]) : this.planeHelper = null, this.planeHelperNeedUpdate = !1;
85
+ this.points.length >= 3 ? this.planeHelper = new a.Plane().setFromCoplanarPoints(this.points[0], this.points[1], this.points[2]) : this.planeHelper = null, this.planeHelperNeedUpdate = !1;
99
86
  }
100
87
  updateAreaItems() {
101
88
  var n, m;
@@ -108,15 +95,15 @@ class J extends A {
108
95
  if (!this.five)
109
96
  return console.error("Five not found");
110
97
  this.areaDom = (n = this.areaDom) != null ? n : (() => {
111
- const s = new D(this.five);
98
+ const s = new M(this.five);
112
99
  return s.intersectCheck = !1, s.simulate3D = !0, s;
113
100
  })(), this.areaDom.setPosition(this.center);
114
101
  const o = this.geometryInfo.area.toFixed(2);
115
- o === "0.00" ? this.areaDom.container.innerHTML = "" : this.areaDom.container.innerHTML = M(o + "m²", {
116
- style: `color: #${B((m = this.style) == null ? void 0 : m.color) ? new l.Color(this.style.color).getHexString() : "000000"}`
102
+ o === "0.00" ? this.areaDom.container.innerHTML = "" : this.areaDom.container.innerHTML = S(o + "m²", {
103
+ style: `color: #${D((m = this.style) == null ? void 0 : m.color) ? new a.Color(this.style.color).getHexString() : "000000"}`
117
104
  });
118
105
  }
119
106
  }
120
107
  export {
121
- J as PolygonMesh
108
+ V as PolygonMesh
122
109
  };
@@ -1,7 +1,7 @@
1
1
  import type { AnyPositions } from '../../shared-utils/positionToVector3';
2
2
  import { PolylineMesh } from './Polyline';
3
3
  import type { LineStyle } from '../typings/style';
4
- import PolygonMesh, { type PolygonData, type PolygonStyle } from './Polygon';
4
+ import { PolygonMesh, type PolygonData, type PolygonStyle } from './Polygon';
5
5
  import * as THREE from 'three';
6
6
  export type PolygonWithEdgeMeshStyle = PolygonStyle & LineStyle;
7
7
  /**
@@ -1,10 +1,11 @@
1
1
  import { IObject3D } from '../../shared-utils/three/IObject3D';
2
- import { type AnyPosition, type AnyPositions } from '../../shared-utils/positionToVector3';
2
+ import { type AnyPosition } from '../../shared-utils/positionToVector3';
3
3
  import type { AreaData } from './Area';
4
4
  import * as THREE from 'three';
5
5
  import type { LineStyle } from '../typings/style';
6
6
  import type { ColoredMeshStyle } from '../utils/three/ColoredMesh';
7
- import { PolygonWithEdgeMesh } from './PolygonWithEdge';
7
+ import ColoredMesh from '../utils/three/ColoredMesh';
8
+ import { PrismGeometry } from '../../shared-utils/three/core/PrismGeometry';
8
9
  export type PrismStyle = ColoredMeshStyle & LineStyle;
9
10
  export interface PrismData extends AreaData {
10
11
  heightPoint: AnyPosition;
@@ -14,27 +15,45 @@ export interface PrismData extends AreaData {
14
15
  */
15
16
  export declare class PrismMesh extends IObject3D {
16
17
  name: string;
17
- heightPoint: THREE.Vector3;
18
- bottomPolygon: PolygonWithEdgeMesh;
19
- topPolygon: PolygonWithEdgeMesh;
18
+ get topPosition(): THREE.Vector3;
19
+ get bottomPositions(): THREE.Vector3[];
20
+ get topPositions(): THREE.Vector3[];
21
+ get style(): {
22
+ color: THREE.Color;
23
+ lineColor: THREE.Color;
24
+ lineWidth: number;
25
+ opacity: number;
26
+ occlusionVisibility: boolean;
27
+ occlusionMode: "translucence" | "depthTest";
28
+ };
29
+ get opacity(): number;
30
+ get occlusionVisibility(): boolean;
31
+ get occlusionMode(): "translucence" | "depthTest";
20
32
  /**
21
33
  * @deprecated notice: please use specified center instead, such as `localCenter` or `worldCenter`
22
34
  */
23
35
  get center(): THREE.Vector3;
24
36
  get localCenter(): THREE.Vector3;
37
+ get geometryInfo(): {
38
+ center: THREE.Vector3;
39
+ };
25
40
  get worldCenter(): THREE.Vector3;
26
41
  get color(): THREE.Color;
27
42
  get lineWidth(): number;
28
43
  get lineColor(): THREE.Color;
44
+ protected _geometryInfoCache?: {
45
+ center: THREE.Vector3;
46
+ };
47
+ protected geometryInfoNeedUpdate: boolean;
48
+ prismMesh: ColoredMesh & {
49
+ geometry: PrismGeometry;
50
+ };
51
+ private edgeMesh;
29
52
  paramStyle: Partial<PrismStyle>;
30
- private edgePlanes;
31
53
  constructor(params?: Partial<PrismData & PrismStyle>);
32
- setStyle(params: Partial<PrismStyle>): void;
54
+ setStyle(params?: Partial<PrismStyle>): void;
33
55
  setPoints(params: Partial<PrismData>): void;
34
56
  highlight(): void;
35
57
  unhighlight(): void;
36
- setBottomPoints(points: AnyPositions): void;
37
- setTopHeightPoint(heightPoint: THREE.Vector3): void;
38
58
  raycast(raycaster: THREE.Raycaster, intersects: THREE.Intersection[]): boolean;
39
- private setEdgePlanes;
40
59
  }
@@ -1,113 +1,137 @@
1
1
  var b = Object.defineProperty;
2
- var m = Object.getOwnPropertySymbols;
3
- var E = Object.prototype.hasOwnProperty, C = Object.prototype.propertyIsEnumerable;
4
- var g = (n, o, t) => o in n ? b(n, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[o] = t, P = (n, o) => {
5
- for (var t in o || (o = {}))
6
- E.call(o, t) && g(n, t, o[t]);
7
- if (m)
8
- for (var t of m(o))
9
- C.call(o, t) && g(n, t, o[t]);
10
- return n;
2
+ var d = Object.getOwnPropertySymbols;
3
+ var C = Object.prototype.hasOwnProperty, w = Object.prototype.propertyIsEnumerable;
4
+ var c = (o, t, e) => t in o ? b(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e, a = (o, t) => {
5
+ for (var e in t || (t = {}))
6
+ C.call(t, e) && c(o, e, t[e]);
7
+ if (d)
8
+ for (var e of d(t))
9
+ w.call(t, e) && c(o, e, t[e]);
10
+ return o;
11
11
  };
12
- var h = (n, o, t) => (g(n, typeof o != "symbol" ? o + "" : o, t), t);
13
- import { IObject3D as p } from "../../shared-utils/three/IObject3D.js";
14
- import { anyPositionToVector3 as c } from "../../shared-utils/positionToVector3.js";
15
- import "../../shared-utils/tag.js";
16
- import * as a from "three";
17
- import "hammerjs";
18
- import "../../shared-utils/three/PointSelector/index.js";
19
- import "three/examples/jsm/renderers/CSS3DRenderer";
20
- import { LineMesh as y } from "./Line.js";
21
- import "../../shared-utils/three/core/Sphere.js";
22
- import "animejs";
23
- import { notNil as f } from "../../shared-utils/isNil.js";
24
- import { intersectWithoutLine as S } from "../../shared-utils/three/core/Raycaster.js";
25
- import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
26
- import { PolygonMesh as d } from "./Polygon.js";
27
- import "../utils/Modules/Global.js";
28
- import "../../vendor/hotkeys-js/dist/hotkeys.esm.js";
29
- import { PolygonWithEdgeMesh as u } from "./PolygonWithEdge.js";
30
- import "../utils/three/rayOnLine.js";
31
- class q extends p {
32
- constructor(t) {
12
+ var s = (o, t, e) => (c(o, typeof t != "symbol" ? t + "" : t, e), e);
13
+ import { IObject3D as V } from "../../shared-utils/three/IObject3D.js";
14
+ import { anyPositionToVector3 as f } from "../../shared-utils/positionToVector3.js";
15
+ import * as i from "three";
16
+ import { intersectWithoutLine as I } from "../../shared-utils/three/core/Raycaster.js";
17
+ import { ColoredMesh as A } from "../utils/three/ColoredMesh.js";
18
+ import { PrismGeometry as S } from "../../shared-utils/three/core/PrismGeometry.js";
19
+ import { triangleArea as E, triangleCenter as W } from "../../shared-utils/three/geometryUtil.js";
20
+ import { LineMesh as v } from "./Line.js";
21
+ import { LineGeometry as N } from "../../shared-utils/three/core/LineGeometry.js";
22
+ class H extends V {
23
+ constructor(e) {
33
24
  super();
34
- h(this, "name", "PrismMesh");
35
- h(this, "heightPoint");
36
- h(this, "bottomPolygon", new u());
37
- h(this, "topPolygon", new u());
38
- h(this, "paramStyle");
39
- h(this, "edgePlanes", new p());
40
- this.topPolygon.name = "TopPolygon", this.bottomPolygon.name = "BottomPolygon", this.edgePlanes.name = "EdgePlanes", this.addIfNotExists(this.bottomPolygon), t && this.setPoints(t), t && this.setStyle(t);
25
+ s(this, "name", "PrismMesh");
26
+ s(this, "_geometryInfoCache");
27
+ s(this, "geometryInfoNeedUpdate", !0);
28
+ s(this, "prismMesh", new A());
29
+ s(this, "edgeMesh", new v());
30
+ s(this, "paramStyle");
31
+ this.prismMesh.name = "PrismMesh", this.prismMesh.geometry = new S(), this.edgeMesh.name = "EdgeMesh", this.addIfNotExists(this.prismMesh, this.edgeMesh), e && this.setPoints(e), this.setStyle(e);
32
+ }
33
+ get topPosition() {
34
+ return new i.Vector3().fromArray(this.prismMesh.geometry.topPosition);
35
+ }
36
+ get bottomPositions() {
37
+ return this.prismMesh.geometry.bottomPositions.map((e) => new i.Vector3().fromArray(e));
38
+ }
39
+ get topPositions() {
40
+ const e = this.bottomPositions[0].clone().sub(this.topPosition);
41
+ return this.bottomPositions.map((r) => r.clone().sub(e));
42
+ }
43
+ get style() {
44
+ return {
45
+ color: this.color,
46
+ lineColor: this.lineColor,
47
+ lineWidth: this.lineWidth,
48
+ opacity: this.opacity,
49
+ occlusionVisibility: this.occlusionVisibility,
50
+ occlusionMode: this.occlusionMode
51
+ };
52
+ }
53
+ get opacity() {
54
+ return this.prismMesh.opacity;
55
+ }
56
+ get occlusionVisibility() {
57
+ return this.prismMesh.occlusionVisibility;
58
+ }
59
+ get occlusionMode() {
60
+ return this.prismMesh.occlusionMode;
41
61
  }
42
62
  /**
43
63
  * @deprecated notice: please use specified center instead, such as `localCenter` or `worldCenter`
44
64
  */
45
65
  get center() {
46
- return this.localCenter;
66
+ return this.localCenter.clone();
47
67
  }
48
68
  get localCenter() {
49
- var s, e;
50
- const t = (s = this.topPolygon) == null ? void 0 : s.center, i = (e = this.bottomPolygon) == null ? void 0 : e.center;
51
- if (t && i)
52
- return new a.Vector3().lerpVectors(t, i, 0.5);
69
+ var e;
70
+ return (e = this.geometryInfo.center.clone()) != null ? e : new i.Vector3(9999, 9999, 9999);
71
+ }
72
+ get geometryInfo() {
73
+ if (this.geometryInfoNeedUpdate) {
74
+ this.geometryInfoNeedUpdate = !1;
75
+ const e = this.prismMesh.geometry.bottomPositions, r = this.prismMesh.geometry.topPosition;
76
+ if (!e || e.length < 3 || !r) {
77
+ this._geometryInfoCache = void 0;
78
+ return;
79
+ }
80
+ const n = e.map((l, h) => {
81
+ if (!(h >= e.length - 2))
82
+ return [
83
+ new i.Vector3().fromArray(e[0]),
84
+ new i.Vector3().fromArray(e[h + 1]),
85
+ new i.Vector3().fromArray(e[h + 2])
86
+ ];
87
+ }).filter(Boolean);
88
+ if (n.length === 0) {
89
+ this._geometryInfoCache = void 0;
90
+ return;
91
+ }
92
+ let g = 0, m = new i.Vector3();
93
+ for (const [l, h, p] of n) {
94
+ const y = E(l, h, p), P = W(l, h, p, y);
95
+ g += y, m.add(P);
96
+ }
97
+ m = m.divideScalar(g);
98
+ const u = new i.Vector3().fromArray(r).sub(new i.Vector3().fromArray(e[0])), M = m.clone().add(u.divideScalar(2));
99
+ this._geometryInfoCache = { center: M };
100
+ }
101
+ return this._geometryInfoCache;
53
102
  }
54
103
  get worldCenter() {
55
104
  return this.updateMatrixWorld(), this.localToWorld(this.localCenter);
56
105
  }
57
106
  get color() {
58
- return this.bottomPolygon.color;
107
+ return this.prismMesh.color;
59
108
  }
60
109
  get lineWidth() {
61
- return this.bottomPolygon.lineWidth;
110
+ return this.edgeMesh.style.lineWidth;
62
111
  }
63
112
  get lineColor() {
64
- return this.bottomPolygon.lineColor;
113
+ return this.edgeMesh.color;
65
114
  }
66
- setStyle(t) {
67
- this.paramStyle = P(P({}, this.paramStyle), t), this.bottomPolygon.setStyle(this.paramStyle), this.topPolygon.setStyle(this.paramStyle), this.edgePlanes.children.forEach((i) => {
68
- (i instanceof y || i instanceof d) && i.setStyle(this.paramStyle);
69
- });
115
+ setStyle(e = {}) {
116
+ this.paramStyle = a(a({}, this.paramStyle), e), this.prismMesh.setStyle(this.paramStyle), this.edgeMesh.setStyle(this.paramStyle);
70
117
  }
71
- setPoints(t) {
72
- f(t.points) && this.setBottomPoints(t.points), f(t.heightPoint) && this.setTopHeightPoint(c(t.heightPoint));
118
+ setPoints(e) {
119
+ var r;
120
+ this.prismMesh.geometry.setPosition({
121
+ bottomPositions: (r = e.points) == null ? void 0 : r.map(f).map((n) => n.toArray()),
122
+ topPosition: e.heightPoint ? f(e.heightPoint).toArray() : void 0
123
+ }), this.edgeMesh.geometry = new N().fromEdgesGeometry(new i.EdgesGeometry(this.prismMesh.geometry)), this.geometryInfoNeedUpdate = !0;
73
124
  }
74
125
  highlight() {
75
- this.bottomPolygon.highlight(), this.topPolygon.highlight(), this.edgePlanes.children.forEach((t) => {
76
- typeof t.highlight == "function" && t.highlight();
77
- });
126
+ this.prismMesh.highlight();
78
127
  }
79
128
  unhighlight() {
80
- this.bottomPolygon.unhighlight(), this.topPolygon.unhighlight(), this.edgePlanes.children.forEach((t) => {
81
- typeof t.unhighlight == "function" && t.unhighlight();
82
- });
83
- }
84
- setBottomPoints(t) {
85
- this.bottomPolygon.setPoints(t.map(c)), this.heightPoint && this.setTopHeightPoint(this.heightPoint);
86
- }
87
- setTopHeightPoint(t) {
88
- this.heightPoint = t, this.addIfNotExists(this.topPolygon);
89
- const i = this.bottomPolygon.projectPoint(t), s = new a.Vector3().subVectors(t, i);
90
- this.up.copy(s.clone().normalize());
91
- const r = this.bottomPolygon.points.map((l) => l.clone().add(s));
92
- this.topPolygon.setPoints(r), this.setEdgePlanes();
93
- }
94
- raycast(t, i) {
95
- return this.children.forEach((s) => {
96
- S(s, t, i, !0);
97
- }), !1;
98
- }
99
- setEdgePlanes() {
100
- const t = this.bottomPolygon.points, i = this.topPolygon.points;
101
- this.addIfNotExists(this.edgePlanes), this.edgePlanes.removeChildren(), t.forEach((s, e) => {
102
- if (e === 0)
103
- return;
104
- const r = new d({ color: this.color });
105
- r.setPoints([t[e - 1], t[e], i[e], i[e - 1]]);
106
- const l = new y({ lineColor: this.lineColor, lineWidth: this.lineWidth });
107
- l.name = "EdgeLine", l.setPoints([t[e - 1], i[e - 1]]), this.edgePlanes.add(r, l);
108
- });
129
+ this.prismMesh.unhighlight();
130
+ }
131
+ raycast(e, r) {
132
+ return this.children.forEach((n) => I(n, e, r, !0)), !1;
109
133
  }
110
134
  }
111
135
  export {
112
- q as PrismMesh
136
+ H as PrismMesh
113
137
  };
@@ -1,6 +1,6 @@
1
1
  import { type AnyPositions } from '../../shared-utils/positionToVector3';
2
2
  import * as THREE from 'three';
3
- import PolygonMesh from './Polygon';
3
+ import { PolygonMesh } from './Polygon';
4
4
  import { RectangleGeometry } from '../utils/three/RectangleGeometry';
5
5
  import type { PointsData } from '../utils/data';
6
6
  import type { ColoredMeshStyle } from '../utils/three/ColoredMesh';
@@ -14,10 +14,6 @@ export declare class RectangleMesh extends PolygonMesh {
14
14
  meshFont: THREE.Mesh<RectangleGeometry, THREE.MeshBasicMaterial>;
15
15
  meshBackground: THREE.Mesh<RectangleGeometry, THREE.MeshBasicMaterial>;
16
16
  get color(): THREE.Color;
17
- /**
18
- * @description: 构造矩形所需的三个点
19
- */
20
- get builtPoints(): THREE.Vector3[];
21
17
  constructor(params?: Partial<RectangleStyle & RectangleData>);
22
18
  setPoints(points: AnyPositions): void;
23
19
  }
@@ -1,6 +1,6 @@
1
1
  var l = Object.defineProperty;
2
- var c = (r, e, t) => e in r ? l(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
- var i = (r, e, t) => (c(r, typeof e != "symbol" ? e + "" : e, t), t);
2
+ var c = (e, o, t) => o in e ? l(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t;
3
+ var i = (e, o, t) => (c(e, typeof o != "symbol" ? o + "" : o, t), t);
4
4
  import { anyPositionToVector3 as a } from "../../shared-utils/positionToVector3.js";
5
5
  import "../../shared-utils/tag.js";
6
6
  import "three";
@@ -8,16 +8,13 @@ import "hammerjs";
8
8
  import "../../shared-utils/three/PointSelector/index.js";
9
9
  import "three/examples/jsm/renderers/CSS3DRenderer";
10
10
  import "@realsee/five/line";
11
- import "../../vendor/three/examples/jsm/lines/LineGeometry.js";
11
+ import { notNil as h } from "../../shared-utils/isNil.js";
12
12
  import "../../shared-utils/three/core/Sphere.js";
13
13
  import "animejs";
14
- import { notNil as h } from "../../shared-utils/isNil.js";
15
14
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
16
- import { PolygonMesh as u } from "./Polygon.js";
17
- import { RectangleGeometry as g } from "../utils/three/RectangleGeometry.js";
18
- import { getBetterNormal as f } from "../utils/getBetterNormal.js";
19
- import { Sculpt as d } from "../index.js";
20
- class V extends u {
15
+ import { PolygonMesh as g } from "./Polygon.js";
16
+ import { RectangleGeometry as d } from "../utils/three/RectangleGeometry.js";
17
+ class G extends g {
21
18
  constructor(t) {
22
19
  super(t);
23
20
  i(this, "name", "RectangleMesh");
@@ -25,26 +22,19 @@ class V extends u {
25
22
  get color() {
26
23
  return this.meshFont.material.color;
27
24
  }
28
- /**
29
- * @description: 构造矩形所需的三个点
30
- */
31
- get builtPoints() {
32
- var t, o;
33
- return (o = (t = this.meshFont) == null ? void 0 : t.geometry) == null ? void 0 : o.points.slice(0, 3);
34
- }
35
25
  setPoints(t) {
36
- const o = t.map(a).filter(h);
37
- if (o.length < 3) {
26
+ const r = t.map(a).filter(h);
27
+ if (r.length < 3) {
38
28
  console.error("Invalid position");
39
29
  return;
40
30
  }
41
31
  if (t.length === 3) {
42
- const [m, s, n] = o, p = m.clone().add(n).sub(s);
43
- o.push(p);
32
+ const [n, s, m] = r, p = n.clone().add(m).sub(s);
33
+ r.push(p);
44
34
  }
45
- this.up.copy(f(o, d.modules.five.camera.position)), this.points = o, this.geometry = new g(o), this.planeHelperNeedUpdate = !0, this.geometryInfoNeedUpdate = !0;
35
+ this.points = r, this.geometry = new d(r), this.planeHelperNeedUpdate = !0, this.geometryInfoNeedUpdate = !0;
46
36
  }
47
37
  }
48
38
  export {
49
- V as RectangleMesh
39
+ G as RectangleMesh
50
40
  };
@@ -1,29 +1,29 @@
1
- var y = Object.defineProperty;
1
+ var c = Object.defineProperty;
2
2
  var h = Object.getOwnPropertySymbols;
3
- var u = Object.prototype.hasOwnProperty, c = Object.prototype.propertyIsEnumerable;
4
- var n = (e, i, t) => i in e ? y(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, l = (e, i) => {
5
- for (var t in i || (i = {}))
6
- u.call(i, t) && n(e, t, i[t]);
3
+ var u = Object.prototype.hasOwnProperty, p = Object.prototype.propertyIsEnumerable;
4
+ var n = (i, e, t) => e in i ? c(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, l = (i, e) => {
5
+ for (var t in e || (e = {}))
6
+ u.call(e, t) && n(i, t, e[t]);
7
7
  if (h)
8
- for (var t of h(i))
9
- c.call(i, t) && n(e, t, i[t]);
10
- return e;
8
+ for (var t of h(e))
9
+ p.call(e, t) && n(i, t, e[t]);
10
+ return i;
11
11
  };
12
- var p = (e, i) => {
12
+ var y = (i, e) => {
13
13
  var t = {};
14
- for (var s in e)
15
- u.call(e, s) && i.indexOf(s) < 0 && (t[s] = e[s]);
16
- if (e != null && h)
17
- for (var s of h(e))
18
- i.indexOf(s) < 0 && c.call(e, s) && (t[s] = e[s]);
14
+ for (var s in i)
15
+ u.call(i, s) && e.indexOf(s) < 0 && (t[s] = i[s]);
16
+ if (i != null && h)
17
+ for (var s of h(i))
18
+ e.indexOf(s) < 0 && p.call(i, s) && (t[s] = i[s]);
19
19
  return t;
20
20
  };
21
- var o = (e, i, t) => (n(e, typeof i != "symbol" ? i + "" : i, t), t);
21
+ var o = (i, e, t) => (n(i, typeof e != "symbol" ? e + "" : e, t), t);
22
22
  import { RectangleMesh as d } from "./Rectangle.js";
23
23
  import { PolylineMesh as f } from "./Polyline.js";
24
24
  class W extends d {
25
25
  constructor(t) {
26
- const r = t != null ? t : {}, { points: s } = r, g = p(r, ["points"]);
26
+ const r = t != null ? t : {}, { points: s } = r, g = y(r, ["points"]);
27
27
  super();
28
28
  o(this, "name", "RectangleWithEdgeMesh");
29
29
  o(this, "line", new f());
@@ -39,10 +39,7 @@ class W extends d {
39
39
  return this.line.lineColor;
40
40
  }
41
41
  setPoints(t) {
42
- if (super.setPoints(t), this.points) {
43
- const s = this.points;
44
- this.line.setPoints([s[0], s[1], s[2], s[3], s[0]]), this.addIfNotExists(this.line);
45
- }
42
+ super.setPoints(t), this.points && (this.line.setPoints([this.points[0], this.points[1], this.points[2], this.points[3], this.points[0]]), this.addIfNotExists(this.line));
46
43
  }
47
44
  setStyle(t) {
48
45
  super.setStyle(t), this.line.setStyle(t);
@@ -50,7 +50,8 @@ Config extends BaseObjectConfig = BaseObjectConfig> extends IObject3D {
50
50
  * @description 配置
51
51
  */
52
52
  config: Config;
53
- editor: BaseEditor;
53
+ abstract get editor(): BaseEditor;
54
+ abstract _editor?: BaseEditor;
54
55
  get editing(): boolean;
55
56
  abstract type: string;
56
57
  /**
@@ -101,7 +102,6 @@ Config extends BaseObjectConfig = BaseObjectConfig> extends IObject3D {
101
102
  * @description 显示删除按钮
102
103
  */
103
104
  showDeleteButton(clientX: number, clientY: number): void;
104
- protected applyObjectMatrixWorld<P extends THREE.Vector3 | THREE.Vector3[]>(point: P): P;
105
- protected applyObjectQuaternion<P extends THREE.Vector3 | THREE.Vector3[]>(point: P): P;
105
+ protected applyObjectMatrixWorld<P extends THREE.Vector3 | THREE.Vector3[]>(point: P, fromObject?: THREE.Object3D): P;
106
106
  abstract create(...args: any): Promise<void>;
107
107
  }