@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
@@ -0,0 +1,43 @@
1
+ import { BaseEditorWithObjectHelper as r } from "../Objects/Base/Editor.js";
2
+ import * as d from "three";
3
+ class f extends r {
4
+ constructor(o) {
5
+ super(o, () => ({
6
+ positionFrom: () => o.worldCenter,
7
+ yAxis: o.up,
8
+ scaleHelper: {
9
+ enable: !0,
10
+ positions: () => {
11
+ const s = o.bottomPositions, e = o.topPosition, i = new d.Vector3().subVectors(e, s[0]), t = o.geometryInfo.center, n = t.clone().sub(i.clone().divideScalar(2)), c = t.clone().add(i.clone().divideScalar(2));
12
+ return [
13
+ {
14
+ id: "top",
15
+ handlePosition: c,
16
+ basePosition: n
17
+ },
18
+ {
19
+ id: "bottom",
20
+ handlePosition: n,
21
+ basePosition: c
22
+ }
23
+ ];
24
+ },
25
+ scaleCallback: (s) => {
26
+ const { intersectPoint: e, scalePosition: i } = s, { id: t, basePosition: n, handlePosition: c } = i;
27
+ if (t === "top") {
28
+ const l = e.clone().sub(n);
29
+ o.setPoints({ heightPoint: o.bottomPositions[0].clone().add(l) });
30
+ } else if (t === "bottom") {
31
+ const l = e.clone().sub(n);
32
+ o.setPoints({
33
+ points: o.topPositions.map((a) => a.clone().add(l))
34
+ });
35
+ }
36
+ }
37
+ }
38
+ }));
39
+ }
40
+ }
41
+ export {
42
+ f as PrismMeshEditor
43
+ };
@@ -0,0 +1,5 @@
1
+ import { BaseEditorWithObjectHelper } from '../Objects/Base/Editor';
2
+ import type { RectangleMesh } from '../Meshes/Rectangle';
3
+ export declare class RectangleMeshEditor extends BaseEditorWithObjectHelper<RectangleMesh> {
4
+ constructor(rectangleMesh: RectangleMesh);
5
+ }
@@ -0,0 +1,70 @@
1
+ import { BaseEditorWithObjectHelper as a } from "../Objects/Base/Editor.js";
2
+ import { getNormal as p } from "../../shared-utils/three/getNormal.js";
3
+ class m extends a {
4
+ constructor(n) {
5
+ const d = n.points, r = p(d);
6
+ super(n, () => ({
7
+ yAxis: r.normalize(),
8
+ zAxis: d[0].clone().sub(d[1]).normalize(),
9
+ scaleHelper: {
10
+ enable: !0,
11
+ positions: () => {
12
+ const t = n.points, s = t[0].clone().lerp(t[3], 0.5), l = t[1].clone().lerp(t[2], 0.5), e = t[0].clone().lerp(t[1], 0.5), c = t[3].clone().lerp(t[2], 0.5);
13
+ return [
14
+ {
15
+ id: "left",
16
+ handlePosition: s,
17
+ basePosition: l
18
+ },
19
+ {
20
+ id: "right",
21
+ handlePosition: l,
22
+ basePosition: s
23
+ },
24
+ {
25
+ id: "top",
26
+ handlePosition: e,
27
+ basePosition: c
28
+ },
29
+ {
30
+ id: "bottom",
31
+ handlePosition: c,
32
+ basePosition: e
33
+ }
34
+ ];
35
+ },
36
+ scaleCallback: (t) => {
37
+ const { intersectPoint: s, scalePosition: l } = t, { id: e, basePosition: c } = l, i = s.clone().sub(c), o = n.points;
38
+ e === "top" ? n.setPoints([
39
+ // 2,3 不变
40
+ o[3].clone().add(i),
41
+ o[2].clone().add(i),
42
+ o[2],
43
+ o[3]
44
+ ]) : e === "bottom" ? n.setPoints([
45
+ // 0,1 不变
46
+ o[0],
47
+ o[1],
48
+ o[1].clone().add(i),
49
+ o[0].clone().add(i)
50
+ ]) : e === "left" ? n.setPoints([
51
+ // 1,2 不变
52
+ o[1].clone().add(i),
53
+ o[1],
54
+ o[2],
55
+ o[2].clone().add(i)
56
+ ]) : e === "right" && n.setPoints([
57
+ // 0,3 不变
58
+ o[0],
59
+ o[0].clone().add(i),
60
+ o[3].clone().add(i),
61
+ o[3]
62
+ ]);
63
+ }
64
+ }
65
+ }));
66
+ }
67
+ }
68
+ export {
69
+ m as RectangleMeshEditor
70
+ };
@@ -1,11 +1,8 @@
1
- import { IObject3D } from '../../shared-utils/three/IObject3D';
2
- import { type AnyPositions, type AnyPosition } from '../../shared-utils/positionToVector3';
3
- import type * as THREE from 'three';
1
+ import { type AnyPosition } from '../../shared-utils/positionToVector3';
4
2
  import type { LineStyle } from '../typings/style';
5
- import { RectangleWithEdgeMesh } from './RectangleWithEdge';
6
- import { RectangleMesh } from './Rectangle';
7
3
  import type { PointsData } from '../utils/data';
8
4
  import type { ColoredMeshStyle } from '../utils/three/ColoredMesh';
5
+ import { PrismMesh } from './Prism';
9
6
  export type BoxStyle = ColoredMeshStyle & LineStyle;
10
7
  export type BoxData = PointsData & {
11
8
  heightPoint: AnyPosition;
@@ -13,24 +10,9 @@ export type BoxData = PointsData & {
13
10
  /**
14
11
  * @description: Box
15
12
  */
16
- export declare class BoxMesh extends IObject3D {
13
+ export declare class BoxMesh extends PrismMesh {
17
14
  name: string;
18
- get planes(): RectangleMesh[];
19
- bottomPlane: RectangleWithEdgeMesh;
20
- topPlane: RectangleWithEdgeMesh;
21
- heightPoint: THREE.Vector3;
22
- protected edgePlanes: RectangleWithEdgeMesh[];
23
- get color(): THREE.Color;
24
- get lineColor(): THREE.Color;
25
- get lineWidth(): number;
26
- get occlusionVisibility(): boolean;
27
- get occlusionMode(): "translucence" | "depthTest";
28
- constructor(params?: Partial<BoxStyle & BoxData>);
29
- setPoints(params: Partial<BoxData>): void;
30
- setBottomPoints(points: AnyPositions): void;
31
- setTopHeightPoint(point: AnyPosition): void;
32
- setEdgePlanes(): void;
33
- setStyle(style: Partial<BoxStyle>): void;
34
- highlight(): void;
35
- unhighlight(): void;
15
+ get geometryInfo(): {
16
+ center: import("three").Vector3;
17
+ };
36
18
  }
@@ -1,98 +1,27 @@
1
- var p = Object.defineProperty;
2
- var m = (e, i, t) => i in e ? p(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t;
3
- var s = (e, i, t) => (m(e, typeof i != "symbol" ? i + "" : i, t), t);
4
- import { IObject3D as d } from "../../shared-utils/three/IObject3D.js";
5
- import { anyPositionToVector3 as P } from "../../shared-utils/positionToVector3.js";
6
- import "../../shared-utils/tag.js";
7
- import "three";
8
- import "hammerjs";
9
- import "../../shared-utils/three/PointSelector/index.js";
10
- import "three/examples/jsm/renderers/CSS3DRenderer";
11
- import "@realsee/five/line";
12
- import "../../vendor/three/examples/jsm/lines/LineGeometry.js";
13
- import "../../shared-utils/three/core/Sphere.js";
14
- import "animejs";
15
- import { notNil as r } from "../../shared-utils/isNil.js";
16
- import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
17
- import { RectangleWithEdgeMesh as c } from "./RectangleWithEdge.js";
18
- import { RectangleMesh as a } from "./Rectangle.js";
19
- import "./Polygon.js";
20
- class v extends d {
21
- constructor(t) {
22
- super();
23
- s(this, "name", "BoxMesh");
24
- s(this, "bottomPlane");
25
- s(this, "topPlane");
26
- s(this, "heightPoint");
27
- s(this, "edgePlanes", []);
28
- this.bottomPlane = new c(t), this.topPlane = new c(t), this.add(this.bottomPlane), t != null && t.points && this.setPoints(t);
29
- }
30
- get planes() {
31
- return this.children.filter((t) => t instanceof a);
32
- }
33
- get color() {
34
- var t;
35
- return (t = this.bottomPlane) == null ? void 0 : t.color;
36
- }
37
- get lineColor() {
38
- var t;
39
- return (t = this.bottomPlane) == null ? void 0 : t.lineColor;
40
- }
41
- get lineWidth() {
42
- var t;
43
- return (t = this.bottomPlane) == null ? void 0 : t.lineWidth;
44
- }
45
- get occlusionVisibility() {
46
- var t;
47
- return (t = this.bottomPlane) == null ? void 0 : t.occlusionVisibility;
48
- }
49
- get occlusionMode() {
50
- var t;
51
- return (t = this.bottomPlane) == null ? void 0 : t.occlusionMode;
52
- }
53
- setPoints(t) {
54
- r(t.heightPoint) && this.setTopHeightPoint(t.heightPoint), r(t.points) && this.setBottomPoints(t.points);
55
- }
56
- setBottomPoints(t) {
57
- const o = t.map(P).filter(r);
58
- if (o.length < 3) {
59
- console.error("Invalid position");
60
- return;
61
- }
62
- this.bottomPlane.setPoints(o), this.heightPoint && this.setTopHeightPoint(this.heightPoint);
63
- }
64
- setTopHeightPoint(t) {
65
- if (!this.bottomPlane.points.length)
66
- return;
67
- const o = P(t);
68
- this.heightPoint = o, this.addIfNotExists(this.topPlane);
69
- const h = this.bottomPlane.projectPoint(o), n = o.clone().sub(h), l = this.bottomPlane.points.map((g) => g.clone().add(n));
70
- this.topPlane.setPoints(l), this.up.copy(n.clone().normalize()), this.setEdgePlanes();
71
- }
72
- setEdgePlanes() {
73
- for (let t = 0; t < 4; t++) {
74
- let o = this.edgePlanes[t];
75
- o || (this.edgePlanes[t] = new c({
76
- color: this.color,
77
- lineColor: this.lineColor,
78
- lineWidth: this.lineWidth,
79
- occlusionVisibility: this.occlusionVisibility,
80
- occlusionMode: this.occlusionMode
81
- }), o = this.edgePlanes[t]);
82
- const h = this.topPlane.points, n = this.bottomPlane.points, l = t === 3 ? 0 : t + 1;
83
- o.setPoints([h[t], n[t], n[l]]), o.line.setPoints([h[t], n[t]]), this.addIfNotExists(o);
1
+ var m = Object.defineProperty;
2
+ var h = (e, t, o) => t in e ? m(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
3
+ var n = (e, t, o) => (h(e, typeof t != "symbol" ? t + "" : t, o), o);
4
+ import { centerPoint as f } from "../../shared-utils/three/centerPoint.js";
5
+ import { PrismMesh as a } from "./Prism.js";
6
+ class p extends a {
7
+ constructor() {
8
+ super(...arguments);
9
+ n(this, "name", "BoxMesh");
10
+ }
11
+ get geometryInfo() {
12
+ if (this.geometryInfoNeedUpdate) {
13
+ this.geometryInfoNeedUpdate = !1;
14
+ const o = this.bottomPositions, s = this.topPosition;
15
+ if (!o || o.length < 3 || !s) {
16
+ this._geometryInfoCache = void 0;
17
+ return;
18
+ }
19
+ const i = f(...o), r = s.clone().sub(o[0]), c = i.clone().add(r.clone().divideScalar(2));
20
+ this._geometryInfoCache = { center: c };
84
21
  }
85
- }
86
- setStyle(t) {
87
- this.planes.forEach((o) => o.setStyle(t));
88
- }
89
- highlight() {
90
- this.planes.forEach((t) => t.highlight());
91
- }
92
- unhighlight() {
93
- this.planes.forEach((t) => t.unhighlight());
22
+ return this._geometryInfoCache;
94
23
  }
95
24
  }
96
25
  export {
97
- v as BoxMesh
26
+ p as BoxMesh
98
27
  };
@@ -16,11 +16,7 @@ export declare class CircleMesh extends ColoredMesh {
16
16
  get radius(): number;
17
17
  meshFont: THREE.Mesh<THREE.CircleGeometry, THREE.MeshBasicMaterial>;
18
18
  private _normal;
19
- private opacityBeforeHighlight;
20
- private highlighted;
21
19
  constructor(params?: Params);
22
20
  setPoints(params: CircleData): void;
23
- highlight(): void;
24
- unhighlight(): void;
25
21
  }
26
22
  export {};
@@ -1,18 +1,15 @@
1
- var g = Object.defineProperty;
2
- var c = (i, e, t) => e in i ? g(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
- var o = (i, e, t) => (c(i, typeof e != "symbol" ? e + "" : e, t), t);
4
- import * as d from "three";
5
- import { DEFAULT_HIGHLIGHT_OPACITY as u } from "../typings/style.js";
6
- import { radiusToSegments as y } from "../utils/radiusToSegments.js";
7
- import { ColoredMesh as f } from "../utils/three/ColoredMesh.js";
8
- import { anyPositionToVector3 as s } from "../../shared-utils/positionToVector3.js";
9
- class P extends f {
10
- constructor(t) {
11
- super(t);
12
- o(this, "_normal");
13
- o(this, "opacityBeforeHighlight");
14
- o(this, "highlighted", !1);
15
- t != null && t.center && (t != null && t.normal) && (t != null && t.radius) && this.setPoints(t);
1
+ var h = Object.defineProperty;
2
+ var d = (o, t, e) => t in o ? h(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
3
+ var s = (o, t, e) => (d(o, typeof t != "symbol" ? t + "" : t, e), e);
4
+ import * as u from "three";
5
+ import { radiusToSegments as g } from "../utils/radiusToSegments.js";
6
+ import { ColoredMesh as m } from "../utils/three/ColoredMesh.js";
7
+ import { anyPositionToVector3 as c } from "../../shared-utils/positionToVector3.js";
8
+ class T extends m {
9
+ constructor(e) {
10
+ super(e);
11
+ s(this, "_normal");
12
+ e != null && e.center && (e != null && e.normal) && (e != null && e.radius) && this.setPoints(e);
16
13
  }
17
14
  get center() {
18
15
  return this.position.clone();
@@ -20,23 +17,17 @@ class P extends f {
20
17
  get normal() {
21
18
  return this._normal;
22
19
  }
23
- set normal(t) {
24
- this._normal = t;
20
+ set normal(e) {
21
+ this._normal = e;
25
22
  }
26
23
  get radius() {
27
24
  return this.meshFont.geometry.parameters.radius;
28
25
  }
29
- setPoints(t) {
30
- const h = s(t.center), n = s(t.normal), r = t.radius, l = y(r);
31
- this.geometry = new d.CircleGeometry(r, l), this.position.copy(h), this.lookAt(n.clone().add(h)), this.normal = n.clone().normalize(), this.needsRender = !0;
32
- }
33
- highlight() {
34
- this.highlighted || (this.highlighted = !0, this.opacityBeforeHighlight = this.opacity, this.setStyle({ opacity: this.opacity * u }), this.needsRender = !0);
35
- }
36
- unhighlight() {
37
- this.highlighted && (this.highlighted = !1, this.setStyle({ opacity: this.opacityBeforeHighlight }), this.needsRender = !0);
26
+ setPoints(e) {
27
+ const n = c(e.center), i = c(e.normal), r = e.radius, l = g(r);
28
+ this.geometry = new u.CircleGeometry(r, l), this.position.copy(n), this.lookAt(i.clone().add(n)), this.normal = i.clone().normalize(), this.needsRender = !0;
38
29
  }
39
30
  }
40
31
  export {
41
- P as CircleMesh
32
+ T as CircleMesh
42
33
  };
@@ -19,7 +19,6 @@ export declare class CylinderMesh extends IObject3D {
19
19
  bottomCircle: CircleWithEdgeMesh;
20
20
  topCircle: CircleWithEdgeMesh;
21
21
  protected edgeMesh: ColoredMesh;
22
- private opacityBeforeHighlight;
23
22
  private highlighted;
24
23
  private params;
25
24
  constructor(params?: Params);
@@ -1,12 +1,12 @@
1
- var p = Object.defineProperty;
1
+ var u = Object.defineProperty;
2
2
  var c = Object.getOwnPropertySymbols;
3
- var u = Object.prototype.hasOwnProperty, b = Object.prototype.propertyIsEnumerable;
4
- var n = (i, e, t) => e in i ? p(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, l = (i, e) => {
3
+ var b = Object.prototype.hasOwnProperty, p = Object.prototype.propertyIsEnumerable;
4
+ var n = (i, e, t) => e in i ? u(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, l = (i, e) => {
5
5
  for (var t in e || (e = {}))
6
- u.call(e, t) && n(i, t, e[t]);
6
+ b.call(e, t) && n(i, t, e[t]);
7
7
  if (c)
8
8
  for (var t of c(e))
9
- b.call(e, t) && n(i, t, e[t]);
9
+ p.call(e, t) && n(i, t, e[t]);
10
10
  return i;
11
11
  };
12
12
  var o = (i, e, t) => (n(i, typeof e != "symbol" ? e + "" : e, t), t);
@@ -16,31 +16,24 @@ import "../../shared-utils/tag.js";
16
16
  import "hammerjs";
17
17
  import "../../shared-utils/three/PointSelector/index.js";
18
18
  import "three/examples/jsm/renderers/CSS3DRenderer";
19
- import { DEFAULT_HIGHLIGHT_OPACITY as M } from "../typings/style.js";
20
19
  import "@realsee/five/line";
21
- import "../../vendor/three/examples/jsm/lines/LineGeometry.js";
22
- import { anyPositionToVector3 as d } from "../../shared-utils/positionToVector3.js";
20
+ import { notNil as d } from "../../shared-utils/isNil.js";
21
+ import { anyPositionToVector3 as g } from "../../shared-utils/positionToVector3.js";
23
22
  import "../../shared-utils/three/core/Sphere.js";
24
23
  import "animejs";
25
- import { notNil as g } from "../../shared-utils/isNil.js";
26
24
  import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
27
- import "./Polygon.js";
28
- import "../utils/Modules/Global.js";
29
- import "../../vendor/hotkeys-js/dist/hotkeys.esm.js";
30
- import "../utils/three/rayOnLine.js";
31
25
  import { CircleWithEdgeMesh as m } from "./CircleWithEdge.js";
32
- import { radiusToSegments as y } from "../utils/radiusToSegments.js";
33
- import { ColoredMesh as a } from "../utils/three/ColoredMesh.js";
34
- class _ extends f {
26
+ import { radiusToSegments as M } from "../utils/radiusToSegments.js";
27
+ import { ColoredMesh as E } from "../utils/three/ColoredMesh.js";
28
+ class D extends f {
35
29
  constructor(t) {
36
30
  super();
37
31
  o(this, "bottomCircle");
38
32
  o(this, "topCircle");
39
33
  o(this, "edgeMesh");
40
- o(this, "opacityBeforeHighlight");
41
34
  o(this, "highlighted", !1);
42
35
  o(this, "params");
43
- this.params = t, this.bottomCircle = new m(t), this.bottomCircle.name = "bottomCircle", this.topCircle = new m(t), this.topCircle.name = "topCircle", this.edgeMesh = new a(t), t != null && t.bottomCenter && (t != null && t.topCenter) && (t != null && t.radius) && this.setPoints(t), this.addIfNotExists(this.bottomCircle);
36
+ this.params = t, this.bottomCircle = new m(t), this.bottomCircle.name = "bottomCircle", this.topCircle = new m(t), this.topCircle.name = "topCircle", this.edgeMesh = new E(t), t != null && t.bottomCenter && (t != null && t.topCenter) && (t != null && t.radius) && this.setPoints(t), this.addIfNotExists(this.bottomCircle);
44
37
  }
45
38
  get bottomCenter() {
46
39
  return this.bottomCircle.center;
@@ -58,7 +51,7 @@ class _ extends f {
58
51
  return this.bottomCircle.color;
59
52
  }
60
53
  setPoints(t) {
61
- const r = d(t.topCenter), s = d(t.bottomCenter), C = r.clone().sub(s).normalize();
54
+ const r = g(t.topCenter), s = g(t.bottomCenter), C = r.clone().sub(s).normalize();
62
55
  this.bottomCircle.setPoints({ center: s, normal: C, radius: t.radius }), this.setTopCenter(r), this.needsRender = !0;
63
56
  }
64
57
  setTopCenter(t) {
@@ -68,13 +61,13 @@ class _ extends f {
68
61
  this.addIfNotExists(this.bottomCircle), this.bottomCircle.setPoints({ center: t, normal: this.normal, radius: this.radius }), this.setEdgeMesh();
69
62
  }
70
63
  setStyle(t) {
71
- this.params = l(l({}, this.params), t), g(t.color) && this.bottomCircle.setStyle({ color: t.color }), g(t.color) && this.topCircle.setStyle({ color: t.color });
64
+ this.params = l(l({}, this.params), t), d(t.color) && this.bottomCircle.setStyle({ color: t.color }), d(t.color) && this.topCircle.setStyle({ color: t.color });
72
65
  }
73
66
  highlight() {
74
- this.highlighted || (this.highlighted = !0, this.opacityBeforeHighlight = this.edgeMesh.opacity, this.edgeMesh.setStyle({ opacity: this.edgeMesh.opacity * M }), this.bottomCircle.highlight(), this.topCircle.highlight(), this.needsRender = !0);
67
+ this.highlighted || (this.highlighted = !0, this.edgeMesh.highlight(), this.bottomCircle.highlight(), this.topCircle.highlight(), this.needsRender = !0);
75
68
  }
76
69
  unhighlight() {
77
- this.highlighted && (this.highlighted = !1, this.edgeMesh.setStyle({ opacity: this.opacityBeforeHighlight }), this.bottomCircle.unhighlight(), this.topCircle.unhighlight(), this.needsRender = !0);
70
+ this.highlighted && (this.highlighted = !1, this.edgeMesh.unhighlight(), this.bottomCircle.unhighlight(), this.topCircle.unhighlight(), this.needsRender = !0);
78
71
  }
79
72
  setEdgeMesh() {
80
73
  this.addIfNotExists(this.edgeMesh);
@@ -83,7 +76,7 @@ class _ extends f {
83
76
  this.radius,
84
77
  this.radius,
85
78
  t.distanceTo(r),
86
- y(this.radius),
79
+ M(this.radius),
87
80
  1,
88
81
  !0
89
82
  );
@@ -92,5 +85,5 @@ class _ extends f {
92
85
  }
93
86
  }
94
87
  export {
95
- _ as CylinderMesh
88
+ D as CylinderMesh
96
89
  };
@@ -1,34 +1,18 @@
1
1
  import * as THREE from 'three';
2
- import { type Color, type OcclusionStyle, type LineStyle, type lengthConfig, type DisplayInfoConfig } from '../typings/style';
3
- import { LineMaterial, THREE_Line2 } from '../../shared-utils/five/FiveLine';
4
- import { LineGeometry } from 'three/examples/jsm/lines/LineGeometry';
2
+ import { type OcclusionStyle, type LineStyle, type lengthConfig, type DisplayInfoConfig } from '../typings/style';
3
+ import { THREE_Line2 } from '../../shared-utils/five/FiveLine';
5
4
  import { type AnyPositions } from '../../shared-utils/positionToVector3';
6
5
  import { IObject3D } from '../../shared-utils/three/IObject3D';
7
- import type { Merge } from 'type-fest';
8
6
  import type { PointsData } from '../utils/data';
9
7
  import { LightTag } from '../../shared-utils/tag';
8
+ import { LineGeometry } from '../../shared-utils/three/core/LineGeometry';
10
9
  export type LineMeshStyle = LineStyle & {
11
10
  dashed?: boolean;
12
11
  } & OcclusionStyle & Partial<lengthConfig> & Partial<DisplayInfoConfig>;
13
12
  export type LineData = PointsData;
14
- export declare class LineMaterial2 extends LineMaterial {
15
- get three_color(): Color;
16
- set three_color(value: Color);
17
- /**
18
- * @deprecated Use `setDashed` to set
19
- */
20
- dashed: boolean;
21
- private _three_color;
22
- constructor(params?: Merge<ConstructorParameters<typeof LineMaterial>[0], THREE.MeshBasicMaterialParameters>);
23
- setDashed(dashed: boolean): void;
24
- }
25
- export declare class THREE_Line3 extends THREE_Line2 {
26
- name: string;
27
- material: LineMaterial2;
28
- constructor(geometry: LineGeometry, material: LineMaterial2);
29
- }
30
13
  export declare class LineMesh extends IObject3D {
31
14
  name: string;
15
+ type: string;
32
16
  points: THREE.Vector3[];
33
17
  doms: LightTag[];
34
18
  get style(): LineMeshStyle;
@@ -40,8 +24,11 @@ export declare class LineMesh extends IObject3D {
40
24
  get occlusionMode(): "translucence" | "depthTest";
41
25
  protected highlighted: boolean;
42
26
  private get five();
43
- private line;
44
- private backLine;
27
+ set geometry(geometry: LineGeometry);
28
+ get geometry(): LineGeometry;
29
+ private _geometry;
30
+ protected line: THREE_Line2;
31
+ protected backLine: THREE_Line2;
45
32
  private opacityBeforeHighlight;
46
33
  private paramsStyle;
47
34
  private lastRenderDomItem;