@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.
- package/CHANGELOG.md +15 -0
- package/dist/Object3DHelperPlugin/Controller.d.ts +9 -9
- package/dist/Object3DHelperPlugin/FiveControllerWrapper.d.ts +4 -2
- package/dist/PanoMeasurePlugin/Model/area.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Model/polygon.d.ts +1 -1
- package/dist/PanoMeasurePlugin/typings/data.d.ts +1 -2
- package/dist/Sculpt/Editors/BoxMeshEditor.d.ts +5 -0
- package/dist/Sculpt/Editors/CircleMeshEditor.d.ts +5 -0
- package/dist/Sculpt/Editors/CylinderMeshEditor.d.ts +5 -0
- package/dist/Sculpt/Editors/PrismMeshEditor.d.ts +5 -0
- package/dist/Sculpt/Editors/RectangleMeshEditor.d.ts +5 -0
- package/dist/Sculpt/Meshes/Box.d.ts +6 -24
- package/dist/Sculpt/Meshes/Circle.d.ts +0 -4
- package/dist/Sculpt/Meshes/Cylinder.d.ts +0 -1
- package/dist/Sculpt/Meshes/Line.d.ts +9 -22
- package/dist/Sculpt/Meshes/Polygon.d.ts +1 -5
- package/dist/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
- package/dist/Sculpt/Meshes/Prism.d.ts +29 -10
- package/dist/Sculpt/Meshes/Rectangle.d.ts +1 -5
- package/dist/Sculpt/Objects/Base/index.d.ts +3 -3
- package/dist/Sculpt/Objects/Box/index.d.ts +7 -2
- package/dist/Sculpt/Objects/Circle/index.d.ts +3 -0
- package/dist/Sculpt/Objects/Cylinder/index.d.ts +3 -0
- package/dist/Sculpt/Objects/Line/index.d.ts +3 -0
- package/dist/Sculpt/Objects/Point/index.d.ts +3 -0
- package/dist/Sculpt/Objects/Polygon/index.d.ts +3 -0
- package/dist/Sculpt/Objects/Polyline/index.d.ts +3 -0
- package/dist/Sculpt/Objects/Prism/index.d.ts +3 -0
- package/dist/Sculpt/Objects/Rectangle/index.d.ts +13 -2
- package/dist/Sculpt/index.d.ts +10 -19
- package/dist/Sculpt/typings/style.d.ts +6 -0
- package/dist/Sculpt/utils/export.d.ts +24 -18
- package/dist/Sculpt/utils/sortPositionsByCameraPosition.d.ts +5 -0
- package/dist/Sculpt/utils/three/ColoredMesh.d.ts +4 -0
- package/dist/index.cjs.js +88 -3009
- package/dist/index.d.ts +79 -1
- package/dist/index.js +35141 -54254
- package/dist/index.umd.js +81 -3002
- package/dist/shared-utils/Object3DHelper/Base/BaseController.d.ts +1 -0
- package/dist/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +7 -3
- package/dist/shared-utils/Object3DHelper/Controller/ScaleController.d.ts +0 -1
- package/dist/shared-utils/Object3DHelper/Helper/BoundingBoxHelper.d.ts +3 -1
- package/dist/shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.d.ts +2 -0
- package/dist/shared-utils/Object3DHelper/Helper/MoveHelper.d.ts +2 -1
- package/dist/shared-utils/Object3DHelper/Helper/RotateHelper.d.ts +2 -1
- package/dist/shared-utils/Object3DHelper/Helper/ScaleHelper.d.ts +4 -2
- package/dist/shared-utils/Object3DHelper/typings/index.d.ts +1 -1
- package/dist/shared-utils/Object3DHelper/utils/calculateScaleByCamera.d.ts +4 -1
- package/dist/shared-utils/five/FiveLine.d.ts +18 -14
- package/dist/shared-utils/index.d.ts +0 -1
- package/dist/shared-utils/math/planimetry.d.ts +1 -1
- package/dist/shared-utils/tag.d.ts +5 -7
- package/dist/shared-utils/three/boundingBox.d.ts +14 -20
- package/dist/shared-utils/three/core/LineGeometry.d.ts +13 -0
- package/dist/shared-utils/three/core/PrismGeometry.d.ts +14 -0
- package/dist/shared-utils/three/geometryUtil.d.ts +8 -0
- package/dist/shared-utils/three/getNormal.d.ts +5 -2
- package/libs/AreaMakerPlugin/Controller.js +47 -100
- package/libs/AreaMakerPlugin/index.js +12 -65
- package/libs/AreaMakerPlugin/utils/Item.js +102 -157
- package/libs/CSS3DRenderPlugin/Controller.js +45 -93
- package/libs/CSS3DRenderPlugin/index.js +15 -63
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +51 -106
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +79 -131
- package/libs/CruisePlugin/BaseController.js +90 -143
- package/libs/CruisePlugin/Move.js +39 -83
- package/libs/CruisePlugin/Work.js +52 -96
- package/libs/CruisePlugin/index.js +23 -67
- package/libs/CurrentPanoImagePlugin/Controller.js +88 -141
- package/libs/CurrentPanoImagePlugin/index.js +11 -64
- package/libs/GuideLinePlugin/Controller.js +13 -57
- package/libs/GuideLinePlugin/GuideLineItem.js +20 -64
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +3 -8
- package/libs/GuideLinePlugin/GuideLineModeItem.js +15 -59
- package/libs/GuideLinePlugin/index.js +23 -67
- package/libs/ModelMakerPlugin/Controller.js +125 -165
- package/libs/ModelMakerPlugin/index.js +23 -63
- package/libs/ModelMakerPlugin/item/baseItem.js +2 -3
- package/libs/ModelMakerPlugin/item/boxItem.js +2 -3
- package/libs/ModelMakerPlugin/item/polygonItem.js +6 -7
- package/libs/ModelMakerPlugin/item/prismItem.js +2 -3
- package/libs/ModelMakerPlugin/utils/getFiveDomEvent.js +2 -3
- package/libs/ModelTVVideoPlugin/Plugin.js +49 -97
- package/libs/ModelTVVideoPlugin/index.js +8 -56
- package/libs/Object3DHelperPlugin/Controller.d.ts +9 -9
- package/libs/Object3DHelperPlugin/Controller.js +105 -92
- package/libs/Object3DHelperPlugin/FiveControllerWrapper.d.ts +4 -2
- package/libs/Object3DHelperPlugin/FiveControllerWrapper.js +35 -30
- package/libs/Object3DHelperPlugin/index.js +15 -30
- package/libs/PanoCompassPlugin/Controller.js +46 -93
- package/libs/PanoCompassPlugin/index.js +17 -64
- package/libs/PanoCursorRaycasterPlugin/index.js +4 -3
- package/libs/PanoDoorLabelPlugin/BaseController.js +27 -80
- package/libs/PanoDoorLabelPlugin/Controller.js +80 -133
- package/libs/PanoDoorLabelPlugin/index.js +11 -64
- package/libs/PanoMeasurePlugin/Components/Controller0.js +79 -128
- package/libs/PanoMeasurePlugin/Components/Controller1.js +92 -141
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +3 -2
- package/libs/PanoMeasurePlugin/Controller/EditController.js +73 -122
- package/libs/PanoMeasurePlugin/Controller/MixedController.js +3 -2
- package/libs/PanoMeasurePlugin/Controller/ViewController.js +3 -2
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +72 -121
- package/libs/PanoMeasurePlugin/Controller/index.js +89 -135
- package/libs/PanoMeasurePlugin/Model/area.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Model/area.js +25 -74
- package/libs/PanoMeasurePlugin/Model/index.js +3 -2
- package/libs/PanoMeasurePlugin/Model/line.js +1 -0
- package/libs/PanoMeasurePlugin/Model/polygon.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Model/polygon.js +7 -7
- package/libs/PanoMeasurePlugin/Model/polyline.js +3 -2
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +1 -56
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +17 -66
- package/libs/PanoMeasurePlugin/index.js +18 -64
- package/libs/PanoMeasurePlugin/typings/data.d.ts +1 -2
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +5 -59
- package/libs/PanoMeasurePlugin/utils/line.js +3 -2
- package/libs/PanoRulerProPlugin/Controller.js +34 -89
- package/libs/PanoRulerProPlugin/RulerItems.js +92 -147
- package/libs/PanoRulerProPlugin/index.js +10 -65
- package/libs/PanoSpatialTagPlugin/Plugin.js +130 -178
- package/libs/PanoSpatialTagPlugin/index.js +6 -54
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +61 -116
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +138 -193
- package/libs/PanoTagPlugin/Components/Tag/index.js +140 -194
- package/libs/PanoTagPlugin/Components/TagContainer.js +58 -112
- package/libs/PanoTagPlugin/Components/TagItem.js +137 -191
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +109 -164
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +22 -76
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +33 -87
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +39 -94
- package/libs/PanoTagPlugin/controller/TagRender.js +18 -62
- package/libs/PanoTagPlugin/controller/TagUtil.js +80 -124
- package/libs/PanoTagPlugin/controller/index.js +37 -81
- package/libs/PanoTagPlugin/index.js +28 -72
- package/libs/PanoTagPlugin/utils/model/mediaPlane.js +14 -14
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +22 -77
- package/libs/PanoVideoPlugin/Controller.js +43 -96
- package/libs/PanoVideoPlugin/VideoMeshController.js +64 -119
- package/libs/PanoVideoPlugin/index.js +14 -67
- package/libs/PipelinePlugin/Controller.js +123 -176
- package/libs/PipelinePlugin/index.js +11 -64
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +15 -70
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +3 -58
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +42 -97
- package/libs/Sculpt/Editors/BoxMeshEditor.d.ts +5 -0
- package/libs/Sculpt/Editors/BoxMeshEditor.js +98 -0
- package/libs/Sculpt/Editors/CircleMeshEditor.d.ts +5 -0
- package/libs/Sculpt/Editors/CircleMeshEditor.js +9 -0
- package/libs/Sculpt/Editors/CylinderMeshEditor.d.ts +5 -0
- package/libs/Sculpt/Editors/CylinderMeshEditor.js +41 -0
- package/libs/Sculpt/Editors/PrismMeshEditor.d.ts +5 -0
- package/libs/Sculpt/Editors/PrismMeshEditor.js +43 -0
- package/libs/Sculpt/Editors/RectangleMeshEditor.d.ts +5 -0
- package/libs/Sculpt/Editors/RectangleMeshEditor.js +70 -0
- package/libs/Sculpt/Meshes/Box.d.ts +6 -24
- package/libs/Sculpt/Meshes/Box.js +22 -93
- package/libs/Sculpt/Meshes/Circle.d.ts +0 -4
- package/libs/Sculpt/Meshes/Circle.js +18 -27
- package/libs/Sculpt/Meshes/Cylinder.d.ts +0 -1
- package/libs/Sculpt/Meshes/Cylinder.js +17 -24
- package/libs/Sculpt/Meshes/Line.d.ts +9 -22
- package/libs/Sculpt/Meshes/Line.js +85 -104
- package/libs/Sculpt/Meshes/LineWithDots.js +10 -14
- package/libs/Sculpt/Meshes/Point.js +29 -34
- package/libs/Sculpt/Meshes/Polygon.d.ts +1 -5
- package/libs/Sculpt/Meshes/Polygon.js +40 -53
- package/libs/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
- package/libs/Sculpt/Meshes/Prism.d.ts +29 -10
- package/libs/Sculpt/Meshes/Prism.js +108 -84
- package/libs/Sculpt/Meshes/Rectangle.d.ts +1 -5
- package/libs/Sculpt/Meshes/Rectangle.js +12 -22
- package/libs/Sculpt/Meshes/RectangleWithEdge.js +17 -20
- package/libs/Sculpt/Objects/Base/index.d.ts +3 -3
- package/libs/Sculpt/Objects/Base/index.js +20 -25
- package/libs/Sculpt/Objects/Box/index.d.ts +7 -2
- package/libs/Sculpt/Objects/Box/index.js +72 -60
- package/libs/Sculpt/Objects/Circle/index.d.ts +3 -0
- package/libs/Sculpt/Objects/Circle/index.js +41 -37
- package/libs/Sculpt/Objects/Cylinder/index.d.ts +3 -0
- package/libs/Sculpt/Objects/Cylinder/index.js +66 -62
- package/libs/Sculpt/Objects/Line/Editor.js +8 -10
- package/libs/Sculpt/Objects/Line/index.d.ts +3 -0
- package/libs/Sculpt/Objects/Line/index.js +45 -41
- package/libs/Sculpt/Objects/Point/index.d.ts +3 -0
- package/libs/Sculpt/Objects/Point/index.js +33 -29
- package/libs/Sculpt/Objects/Polygon/index.d.ts +3 -0
- package/libs/Sculpt/Objects/Polygon/index.js +67 -63
- package/libs/Sculpt/Objects/Polyline/index.d.ts +3 -0
- package/libs/Sculpt/Objects/Polyline/index.js +46 -42
- package/libs/Sculpt/Objects/Prism/index.d.ts +3 -0
- package/libs/Sculpt/Objects/Prism/index.js +58 -53
- package/libs/Sculpt/Objects/Rectangle/index.d.ts +13 -2
- package/libs/Sculpt/Objects/Rectangle/index.js +143 -81
- package/libs/Sculpt/index.d.ts +10 -19
- package/libs/Sculpt/index.js +105 -107
- package/libs/Sculpt/typings/style.d.ts +6 -0
- package/libs/Sculpt/utils/export.d.ts +24 -18
- package/libs/Sculpt/utils/export.js +52 -19
- package/libs/Sculpt/utils/sortPositionsByCameraPosition.d.ts +5 -0
- package/libs/Sculpt/utils/sortPositionsByCameraPosition.js +9 -0
- package/libs/Sculpt/utils/three/ColoredMesh.d.ts +4 -0
- package/libs/Sculpt/utils/three/ColoredMesh.js +40 -37
- package/libs/base/BasePlugin.js +10 -15
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +96 -147
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +12 -63
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +53 -105
- package/libs/floorplan/ModelFloorplanPlugin/index.js +11 -63
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +65 -118
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +11 -64
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +54 -106
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +11 -63
- package/libs/floorplan/index.js +0 -5
- package/libs/index.d.ts +79 -1
- package/libs/index.js +229 -215
- package/libs/shared-utils/Object3DHelper/Base/BaseController.d.ts +1 -0
- package/libs/shared-utils/Object3DHelper/Base/BaseController.js +112 -122
- package/libs/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +7 -3
- package/libs/shared-utils/Object3DHelper/Base/BaseHelper.js +60 -39
- package/libs/shared-utils/Object3DHelper/Controller/RotateController.js +47 -47
- package/libs/shared-utils/Object3DHelper/Controller/ScaleController.d.ts +0 -1
- package/libs/shared-utils/Object3DHelper/Controller/ScaleController.js +28 -28
- package/libs/shared-utils/Object3DHelper/Helper/BoundingBoxHelper.d.ts +3 -1
- package/libs/shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js +25 -18
- package/libs/shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.d.ts +2 -0
- package/libs/shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js +18 -14
- package/libs/shared-utils/Object3DHelper/Helper/MoveHelper.d.ts +2 -1
- package/libs/shared-utils/Object3DHelper/Helper/MoveHelper.js +1 -0
- package/libs/shared-utils/Object3DHelper/Helper/RotateHelper.d.ts +2 -1
- package/libs/shared-utils/Object3DHelper/Helper/RotateHelper.js +2 -1
- package/libs/shared-utils/Object3DHelper/Helper/ScaleHelper.d.ts +4 -2
- package/libs/shared-utils/Object3DHelper/Helper/ScaleHelper.js +40 -28
- package/libs/shared-utils/Object3DHelper/typings/index.d.ts +1 -1
- package/libs/shared-utils/Object3DHelper/utils/calculateScaleByCamera.d.ts +4 -1
- package/libs/shared-utils/Object3DHelper/utils/calculateScaleByCamera.js +4 -4
- package/libs/shared-utils/five/FiveDomEvents.js +88 -88
- package/libs/shared-utils/five/FiveLine.d.ts +18 -14
- package/libs/shared-utils/five/FiveLine.js +31 -13
- package/libs/shared-utils/five/index.js +2 -7
- package/libs/shared-utils/five/lookObject.js +27 -32
- package/libs/shared-utils/index.d.ts +0 -1
- package/libs/shared-utils/index.js +31 -33
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/math/planimetry.d.ts +1 -1
- package/libs/shared-utils/tag.d.ts +5 -7
- package/libs/shared-utils/tag.js +1 -1
- package/libs/shared-utils/three/boundingBox.d.ts +14 -20
- package/libs/shared-utils/three/core/LineGeometry.d.ts +13 -0
- package/libs/shared-utils/three/core/LineGeometry.js +26 -0
- package/libs/shared-utils/three/core/PrismGeometry.d.ts +14 -0
- package/libs/shared-utils/three/core/PrismGeometry.js +42 -0
- package/libs/shared-utils/three/earcut3D.js +5 -5
- package/libs/shared-utils/three/geometryUtil.d.ts +8 -0
- package/libs/shared-utils/three/geometryUtil.js +3 -1
- package/libs/shared-utils/three/getNormal.d.ts +5 -2
- package/libs/shared-utils/three/getNormal.js +6 -5
- package/libs/shared-utils/three/index.js +0 -5
- package/package.json +1 -1
- package/dist/Sculpt/Objects/Box/Editor.d.ts +0 -5
- package/dist/Sculpt/Objects/Circle/Editor.d.ts +0 -5
- package/dist/Sculpt/Objects/Cylinder/Editor.d.ts +0 -5
- package/dist/Sculpt/Objects/Prism/Editor.d.ts +0 -5
- package/dist/Sculpt/Objects/Rectangle/Editor.d.ts +0 -5
- package/dist/Sculpt/utils/getBetterNormal.d.ts +0 -2
- package/libs/Sculpt/Objects/Box/Editor.d.ts +0 -5
- package/libs/Sculpt/Objects/Box/Editor.js +0 -44
- package/libs/Sculpt/Objects/Circle/Editor.d.ts +0 -5
- package/libs/Sculpt/Objects/Circle/Editor.js +0 -9
- package/libs/Sculpt/Objects/Cylinder/Editor.d.ts +0 -5
- package/libs/Sculpt/Objects/Cylinder/Editor.js +0 -41
- package/libs/Sculpt/Objects/Prism/Editor.d.ts +0 -5
- package/libs/Sculpt/Objects/Prism/Editor.js +0 -44
- package/libs/Sculpt/Objects/Rectangle/Editor.d.ts +0 -5
- package/libs/Sculpt/Objects/Rectangle/Editor.js +0 -9
- package/libs/Sculpt/utils/getBetterNormal.d.ts +0 -2
- package/libs/Sculpt/utils/getBetterNormal.js +0 -8
- package/libs/vendor/three/build/three.module.js +0 -19336
- package/libs/vendor/three/examples/jsm/lines/LineGeometry.js +0 -28
- package/libs/vendor/three/examples/jsm/lines/LineSegmentsGeometry.js +0 -69
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var
|
|
1
|
+
var p = Object.defineProperty;
|
|
2
2
|
var d = Object.getOwnPropertySymbols;
|
|
3
|
-
var
|
|
4
|
-
var l = (
|
|
3
|
+
var f = Object.prototype.hasOwnProperty, g = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var l = (i, t, e) => t in i ? p(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e, u = (i, t) => {
|
|
5
5
|
for (var e in t || (t = {}))
|
|
6
|
-
|
|
6
|
+
f.call(t, e) && l(i, e, t[e]);
|
|
7
7
|
if (d)
|
|
8
8
|
for (var e of d(t))
|
|
9
|
-
|
|
10
|
-
return
|
|
9
|
+
g.call(t, e) && l(i, e, t[e]);
|
|
10
|
+
return i;
|
|
11
11
|
};
|
|
12
|
-
var r = (
|
|
12
|
+
var r = (i, t, e) => (l(i, typeof t != "symbol" ? t + "" : t, e), e);
|
|
13
13
|
import { hotkeys as c } from "../../../vendor/hotkeys-js/dist/hotkeys.esm.js";
|
|
14
14
|
import { Sculpt as n } from "../../index.js";
|
|
15
|
-
import { IObject3D as
|
|
15
|
+
import { IObject3D as a } from "../../../shared-utils/three/IObject3D.js";
|
|
16
16
|
import { applyObjectMatrixWorld as b } from "../../../shared-utils/three/applyObjectMatrixWorld.js";
|
|
17
|
-
import { removeAllTag as
|
|
18
|
-
const
|
|
19
|
-
class
|
|
17
|
+
import { removeAllTag as v } from "../../utils/removeAllTag.js";
|
|
18
|
+
const m = /* @__PURE__ */ new Map();
|
|
19
|
+
class j extends a {
|
|
20
20
|
constructor(e, s) {
|
|
21
21
|
super();
|
|
22
22
|
r(this, "name", "Sculpt");
|
|
@@ -30,11 +30,10 @@ class O extends g {
|
|
|
30
30
|
* @description 配置
|
|
31
31
|
*/
|
|
32
32
|
r(this, "config");
|
|
33
|
-
r(this, "
|
|
34
|
-
r(this, "on", (e, s, i) => n.modules.fiveDomEvents.addEventListener(this, e, s, i));
|
|
33
|
+
r(this, "on", (e, s, o) => n.modules.fiveDomEvents.addEventListener(this, e, s, o));
|
|
35
34
|
r(this, "off", (...e) => n.modules.fiveDomEvents.removeEventListener(this, ...e));
|
|
36
35
|
e != null && e.id && (this.uuid = e.id), this.config = u({ canEdit: !0, occlusionVisibility: !0, occlusionMode: "translucence" }, s), e != null && e.style && (e.style.occlusionVisibility = this.config.occlusionVisibility, e.style.occlusionMode = this.config.occlusionMode), this.addEventListener("removed", () => {
|
|
37
|
-
|
|
36
|
+
v(this);
|
|
38
37
|
}), c("esc", () => {
|
|
39
38
|
this.stopCreating();
|
|
40
39
|
}), this.config.canEdit && (c("backspace, delete", () => {
|
|
@@ -43,11 +42,11 @@ class O extends g {
|
|
|
43
42
|
var h;
|
|
44
43
|
if (this.pointSelector.enabled)
|
|
45
44
|
return;
|
|
46
|
-
let
|
|
47
|
-
|
|
45
|
+
let o = m.get(this.parent.uuid);
|
|
46
|
+
o && (o.selected = !1, o.unhighlight(), (h = o._editor) == null || h.disable()), m.set(this.parent.uuid, this), this.selected = !0, this.highlight();
|
|
48
47
|
}), c("esc", () => {
|
|
49
|
-
var
|
|
50
|
-
this.selected = !1, this.unhighlight(), !this.pointSelector.enabled && ((
|
|
48
|
+
var o;
|
|
49
|
+
this.selected = !1, this.unhighlight(), !this.pointSelector.enabled && ((o = this._editor) == null || o.disable());
|
|
51
50
|
}));
|
|
52
51
|
}
|
|
53
52
|
get editing() {
|
|
@@ -117,14 +116,10 @@ class O extends g {
|
|
|
117
116
|
n.modules.cursor.removeDeleteButton();
|
|
118
117
|
});
|
|
119
118
|
}
|
|
120
|
-
applyObjectMatrixWorld(e) {
|
|
121
|
-
return
|
|
122
|
-
}
|
|
123
|
-
applyObjectQuaternion(e) {
|
|
124
|
-
const s = this.quaternion.clone();
|
|
125
|
-
return Array.isArray(e) ? e.map((i) => i.clone().applyQuaternion(s)) : e.clone().applyQuaternion(s);
|
|
119
|
+
applyObjectMatrixWorld(e, s) {
|
|
120
|
+
return s.updateMatrixWorld(), b(s, e);
|
|
126
121
|
}
|
|
127
122
|
}
|
|
128
123
|
export {
|
|
129
|
-
|
|
124
|
+
j as BaseObject
|
|
130
125
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { BaseObject, type BaseImportData, type BaseObjectConfig } from '../Base';
|
|
2
2
|
import type { PointSelector } from '../../../shared-utils/three/PointSelector';
|
|
3
|
+
import { BoxMeshEditor } from '../../Editors/BoxMeshEditor';
|
|
3
4
|
import { BoxMesh, type BoxData, type BoxStyle } from '../../Meshes/Box';
|
|
4
5
|
import type { LiteralString } from '../../../typings/utils.type';
|
|
6
|
+
import type { CreateLimitConfig, DrawMethodConfig } from '../../typings/style';
|
|
5
7
|
export interface BoxImportData extends BaseImportData, BoxData {
|
|
6
8
|
type: LiteralString<'Box'>;
|
|
7
9
|
style?: Partial<BoxStyle>;
|
|
@@ -9,11 +11,14 @@ export interface BoxImportData extends BaseImportData, BoxData {
|
|
|
9
11
|
export declare class Box extends BaseObject<BoxImportData> {
|
|
10
12
|
readonly type = "Box";
|
|
11
13
|
boxMesh: BoxMesh;
|
|
14
|
+
get editor(): BoxMeshEditor;
|
|
15
|
+
_editor: BoxMeshEditor;
|
|
12
16
|
get data(): {
|
|
13
17
|
points: [number, number, number][];
|
|
14
18
|
heightPoint: [number, number, number];
|
|
15
19
|
style: {
|
|
16
20
|
color: number;
|
|
21
|
+
opacity: number;
|
|
17
22
|
lineWidth: number;
|
|
18
23
|
lineColor: number;
|
|
19
24
|
};
|
|
@@ -23,6 +28,6 @@ export declare class Box extends BaseObject<BoxImportData> {
|
|
|
23
28
|
constructor(data?: BoxImportData, config?: Partial<BaseObjectConfig>);
|
|
24
29
|
highlight(): void;
|
|
25
30
|
unhighlight(): void;
|
|
26
|
-
create(params?: Partial<BoxStyle>): Promise<void>;
|
|
31
|
+
create(params?: Partial<BoxStyle & CreateLimitConfig & DrawMethodConfig>): Promise<void>;
|
|
27
32
|
}
|
|
28
|
-
export declare function createBox(boxMesh: BoxMesh, pointSelector: PointSelector): Promise<void>;
|
|
33
|
+
export declare function createBox(boxMesh: BoxMesh, pointSelector: PointSelector, config?: Partial<CreateLimitConfig & DrawMethodConfig>): Promise<void>;
|
|
@@ -1,54 +1,61 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var b = (
|
|
6
|
-
for (var t in
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var t of
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
var d = (
|
|
14
|
-
var f = (
|
|
15
|
-
var
|
|
1
|
+
var H = Object.defineProperty, O = Object.defineProperties;
|
|
2
|
+
var W = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var w = Object.getOwnPropertySymbols;
|
|
4
|
+
var L = Object.prototype.hasOwnProperty, R = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var b = (e, o, t) => o in e ? H(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t, m = (e, o) => {
|
|
6
|
+
for (var t in o || (o = {}))
|
|
7
|
+
L.call(o, t) && b(e, t, o[t]);
|
|
8
|
+
if (w)
|
|
9
|
+
for (var t of w(o))
|
|
10
|
+
R.call(o, t) && b(e, t, o[t]);
|
|
11
|
+
return e;
|
|
12
|
+
}, E = (e, o) => O(e, W(o));
|
|
13
|
+
var d = (e, o, t) => (b(e, typeof o != "symbol" ? o + "" : o, t), t);
|
|
14
|
+
var f = (e, o, t) => new Promise((a, l) => {
|
|
15
|
+
var i = (s) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
18
|
-
} catch (
|
|
19
|
-
|
|
17
|
+
n(t.next(s));
|
|
18
|
+
} catch (r) {
|
|
19
|
+
l(r);
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, h = (s) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
24
|
-
} catch (
|
|
25
|
-
|
|
23
|
+
n(t.throw(s));
|
|
24
|
+
} catch (r) {
|
|
25
|
+
l(r);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, n = (s) => s.done ? a(s.value) : Promise.resolve(s.value).then(i, h);
|
|
28
|
+
n((t = t.apply(e, o)).next());
|
|
29
29
|
});
|
|
30
|
-
import { BaseObject as
|
|
31
|
-
import * as
|
|
32
|
-
import {
|
|
33
|
-
import { BoxMesh as
|
|
34
|
-
import { createRectangle as
|
|
35
|
-
import { LineMesh as
|
|
36
|
-
import { getNormal as
|
|
37
|
-
import { rayOnLine as
|
|
30
|
+
import { BaseObject as _ } from "../Base/index.js";
|
|
31
|
+
import * as j from "three";
|
|
32
|
+
import { BoxMeshEditor as N } from "../../Editors/BoxMeshEditor.js";
|
|
33
|
+
import { BoxMesh as v } from "../../Meshes/Box.js";
|
|
34
|
+
import { createRectangle as T } from "../Rectangle/index.js";
|
|
35
|
+
import { LineMesh as U } from "../../Meshes/Line.js";
|
|
36
|
+
import { getNormal as A } from "../../../shared-utils/three/getNormal.js";
|
|
37
|
+
import { rayOnLine as D } from "../../utils/three/rayOnLine.js";
|
|
38
38
|
import { vector3ToArray as B } from "../../../shared-utils/three/vector3ToArray.js";
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
import { RectangleWithEdgeMesh as k } from "../../Meshes/RectangleWithEdge.js";
|
|
40
|
+
import { centerPoint as q } from "../../../shared-utils/three/centerPoint.js";
|
|
41
|
+
class S extends _ {
|
|
42
|
+
constructor(t, a) {
|
|
43
|
+
super(t, a);
|
|
42
44
|
d(this, "type", "Box");
|
|
43
45
|
d(this, "boxMesh");
|
|
44
|
-
|
|
46
|
+
d(this, "_editor");
|
|
47
|
+
t && (this.boxMesh = new v(m(m({}, t.style), t)), this.add(this.boxMesh));
|
|
48
|
+
}
|
|
49
|
+
get editor() {
|
|
50
|
+
return this._editor || (this._editor = new N(this.boxMesh)), this._editor;
|
|
45
51
|
}
|
|
46
52
|
get data() {
|
|
47
|
-
return
|
|
48
|
-
points: B(this.applyObjectMatrixWorld(this.boxMesh.
|
|
49
|
-
heightPoint: B(this.applyObjectMatrixWorld(this.boxMesh.
|
|
53
|
+
return E(m({}, this.baseData), {
|
|
54
|
+
points: B(this.applyObjectMatrixWorld(this.boxMesh.bottomPositions, this.boxMesh)),
|
|
55
|
+
heightPoint: B(this.applyObjectMatrixWorld(this.boxMesh.topPosition, this.boxMesh)),
|
|
50
56
|
style: {
|
|
51
57
|
color: this.boxMesh.color.getHex(),
|
|
58
|
+
opacity: this.boxMesh.opacity,
|
|
52
59
|
lineWidth: this.boxMesh.lineWidth,
|
|
53
60
|
lineColor: this.boxMesh.lineColor.getHex()
|
|
54
61
|
}
|
|
@@ -64,40 +71,45 @@ class Q extends L {
|
|
|
64
71
|
}
|
|
65
72
|
create(t) {
|
|
66
73
|
return f(this, null, function* () {
|
|
67
|
-
this.removeChildren(), this.boxMesh = new
|
|
74
|
+
this.removeChildren(), this.boxMesh = new v(t), this.add(this.boxMesh), yield z(this.boxMesh, this.pointSelector, t), this.config.canEdit && this.editor.enable();
|
|
68
75
|
});
|
|
69
76
|
}
|
|
70
77
|
}
|
|
71
|
-
function z(o,
|
|
78
|
+
function z(e, o, t) {
|
|
72
79
|
return f(this, null, function* () {
|
|
73
|
-
return
|
|
74
|
-
const i =
|
|
80
|
+
return new Promise((a, l) => f(this, null, function* () {
|
|
81
|
+
const i = e.parent;
|
|
75
82
|
if (!i) {
|
|
76
|
-
|
|
83
|
+
l(new Error("No container"));
|
|
77
84
|
return;
|
|
78
85
|
}
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
const p = (
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
86
|
+
const h = new k(e.style);
|
|
87
|
+
i.add(h), yield T(h, o, t), i.remove(h), e.setPoints({ points: h.points });
|
|
88
|
+
const n = new U(), s = A(e.bottomPositions), r = q(...e.bottomPositions), p = r.clone().add(s.clone().multiplyScalar(10)), x = r.clone().sub(s.clone().multiplyScalar(10));
|
|
89
|
+
n.setPoints([p, x]), i.add(n), o.enable();
|
|
90
|
+
const g = (c) => {
|
|
91
|
+
M(), a();
|
|
92
|
+
}, y = (c) => {
|
|
93
|
+
if (!(c != null && c.raycaster))
|
|
85
94
|
return;
|
|
86
|
-
const
|
|
87
|
-
raycaster:
|
|
88
|
-
line: new
|
|
95
|
+
const u = D({
|
|
96
|
+
raycaster: c.raycaster,
|
|
97
|
+
line: new j.Line3(p, x)
|
|
89
98
|
});
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
99
|
+
if (u) {
|
|
100
|
+
const C = u.clone().sub(r);
|
|
101
|
+
e.setPoints({ heightPoint: e.bottomPositions[0].clone().add(C) });
|
|
102
|
+
}
|
|
103
|
+
}, M = () => {
|
|
104
|
+
o.off("select", g), o.off("intersectionUpdate", y), o.off("disable", P), o.disable(), i == null || i.remove(n);
|
|
93
105
|
}, P = () => {
|
|
94
|
-
|
|
106
|
+
M(), i == null || i.remove(e), l(new Error("Cancelled"));
|
|
95
107
|
};
|
|
96
|
-
|
|
97
|
-
});
|
|
108
|
+
o.on("select", g), o.on("intersectionUpdate", y), o.on("disable", P);
|
|
109
|
+
}));
|
|
98
110
|
});
|
|
99
111
|
}
|
|
100
112
|
export {
|
|
101
|
-
|
|
113
|
+
S as Box,
|
|
102
114
|
z as createBox
|
|
103
115
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseObject, type BaseImportData, type BaseObjectConfig } from '../Base';
|
|
2
2
|
import type { PointSelector } from '../../../shared-utils/three/PointSelector';
|
|
3
|
+
import { CircleMeshEditor } from '../../Editors/CircleMeshEditor';
|
|
3
4
|
import type { CircleData, CircleMesh } from '../../Meshes/Circle';
|
|
4
5
|
import { CircleWithEdgeMesh, type CircleWithEdgeMeshStyle } from '../../Meshes/CircleWithEdge';
|
|
5
6
|
import type { LiteralString } from '../../../typings/utils.type';
|
|
@@ -10,6 +11,8 @@ export interface CircleImportData extends BaseImportData, CircleData {
|
|
|
10
11
|
export declare class Circle extends BaseObject<CircleImportData> {
|
|
11
12
|
readonly type = "Circle";
|
|
12
13
|
circleMesh: CircleWithEdgeMesh;
|
|
14
|
+
get editor(): CircleMeshEditor;
|
|
15
|
+
_editor: CircleMeshEditor;
|
|
13
16
|
get data(): {
|
|
14
17
|
center: [number, number, number];
|
|
15
18
|
normal: [number, number, number];
|
|
@@ -1,49 +1,53 @@
|
|
|
1
1
|
var C = Object.defineProperty, x = Object.defineProperties;
|
|
2
|
-
var
|
|
2
|
+
var _ = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var M = Object.getOwnPropertySymbols;
|
|
4
|
-
var T = Object.prototype.hasOwnProperty,
|
|
5
|
-
var m = (
|
|
6
|
-
for (var e in
|
|
7
|
-
T.call(
|
|
4
|
+
var T = Object.prototype.hasOwnProperty, A = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var m = (r, i, e) => i in r ? C(r, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[i] = e, d = (r, i) => {
|
|
6
|
+
for (var e in i || (i = {}))
|
|
7
|
+
T.call(i, e) && m(r, e, i[e]);
|
|
8
8
|
if (M)
|
|
9
|
-
for (var e of M(
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
}, g = (
|
|
13
|
-
var f = (
|
|
14
|
-
var w = (
|
|
9
|
+
for (var e of M(i))
|
|
10
|
+
A.call(i, e) && m(r, e, i[e]);
|
|
11
|
+
return r;
|
|
12
|
+
}, g = (r, i) => x(r, _(i));
|
|
13
|
+
var f = (r, i, e) => (m(r, typeof i != "symbol" ? i + "" : i, e), e);
|
|
14
|
+
var w = (r, i, e) => new Promise((c, t) => {
|
|
15
15
|
var a = (n) => {
|
|
16
16
|
try {
|
|
17
17
|
o(e.next(n));
|
|
18
18
|
} catch (h) {
|
|
19
|
-
|
|
19
|
+
t(h);
|
|
20
20
|
}
|
|
21
21
|
}, s = (n) => {
|
|
22
22
|
try {
|
|
23
23
|
o(e.throw(n));
|
|
24
24
|
} catch (h) {
|
|
25
|
-
|
|
25
|
+
t(h);
|
|
26
26
|
}
|
|
27
27
|
}, o = (n) => n.done ? c(n.value) : Promise.resolve(n.value).then(a, s);
|
|
28
|
-
o((e = e.apply(
|
|
28
|
+
o((e = e.apply(r, i)).next());
|
|
29
29
|
});
|
|
30
|
-
import { BaseObject as
|
|
30
|
+
import { BaseObject as H } from "../Base/index.js";
|
|
31
31
|
import * as y from "three";
|
|
32
|
-
import { PolylineMesh as
|
|
33
|
-
import {
|
|
34
|
-
import { CircleWithEdgeMesh as
|
|
35
|
-
import { vector3ToArray as
|
|
36
|
-
class
|
|
32
|
+
import { PolylineMesh as N } from "../../Meshes/Polyline.js";
|
|
33
|
+
import { CircleMeshEditor as O } from "../../Editors/CircleMeshEditor.js";
|
|
34
|
+
import { CircleWithEdgeMesh as E } from "../../Meshes/CircleWithEdge.js";
|
|
35
|
+
import { vector3ToArray as b } from "../../../shared-utils/three/vector3ToArray.js";
|
|
36
|
+
class L extends H {
|
|
37
37
|
constructor(e, c) {
|
|
38
38
|
super(e, c);
|
|
39
39
|
f(this, "type", "Circle");
|
|
40
40
|
f(this, "circleMesh");
|
|
41
|
-
|
|
41
|
+
f(this, "_editor");
|
|
42
|
+
e && (this.circleMesh = new E(d(d({}, e.style), e)), this.add(this.circleMesh));
|
|
43
|
+
}
|
|
44
|
+
get editor() {
|
|
45
|
+
return this._editor || (this._editor = new O(this.circleMesh)), this._editor;
|
|
42
46
|
}
|
|
43
47
|
get data() {
|
|
44
48
|
return g(d({}, this.baseData), {
|
|
45
|
-
center:
|
|
46
|
-
normal:
|
|
49
|
+
center: b(this.applyObjectMatrixWorld(this.circleMesh.center, this.circleMesh)),
|
|
50
|
+
normal: b(this.circleMesh.normal.clone().applyQuaternion(this.circleMesh.quaternion)),
|
|
47
51
|
radius: this.circleMesh.radius,
|
|
48
52
|
style: {
|
|
49
53
|
color: this.circleMesh.color.getHex()
|
|
@@ -60,23 +64,23 @@ class R extends A {
|
|
|
60
64
|
}
|
|
61
65
|
create(e) {
|
|
62
66
|
return w(this, null, function* () {
|
|
63
|
-
this.children.forEach((
|
|
64
|
-
|
|
67
|
+
this.children.forEach((t) => {
|
|
68
|
+
t.parent === this && this.remove(t);
|
|
65
69
|
}), this.children.length = 0;
|
|
66
|
-
const c = new
|
|
67
|
-
this.circleMesh = c, this.add(this.circleMesh), yield U(this.circleMesh, this.pointSelector), this.editor.enable();
|
|
70
|
+
const c = new E(e);
|
|
71
|
+
this.circleMesh = c, this.add(this.circleMesh), yield U(this.circleMesh, this.pointSelector), this.config.canEdit && this.editor.enable();
|
|
68
72
|
});
|
|
69
73
|
}
|
|
70
74
|
}
|
|
71
|
-
function U(
|
|
75
|
+
function U(r, i) {
|
|
72
76
|
return new Promise((e, c) => {
|
|
73
|
-
const
|
|
74
|
-
if (!
|
|
77
|
+
const t = r.parent;
|
|
78
|
+
if (!t) {
|
|
75
79
|
c(new Error("No container"));
|
|
76
80
|
return;
|
|
77
81
|
}
|
|
78
|
-
const a = new
|
|
79
|
-
|
|
82
|
+
const a = new N({ dashed: !0 });
|
|
83
|
+
t.add(a), i.enable();
|
|
80
84
|
let s, o;
|
|
81
85
|
const n = (l) => {
|
|
82
86
|
if (l) {
|
|
@@ -95,17 +99,17 @@ function U(t, r) {
|
|
|
95
99
|
const P = new y.Plane().setFromNormalAndCoplanarPoint(s.normal, s.point);
|
|
96
100
|
if (o = l.raycaster.ray.intersectPlane(P, new y.Vector3()), o) {
|
|
97
101
|
const v = s.point.distanceTo(o);
|
|
98
|
-
|
|
102
|
+
r.setPoints({ center: s.point, normal: s.normal, radius: v });
|
|
99
103
|
}
|
|
100
104
|
}, p = () => {
|
|
101
|
-
|
|
105
|
+
i.off("select", n), i.off("intersectionUpdate", h), i.off("disable", u), i.disable(), t == null || t.remove(a);
|
|
102
106
|
}, u = () => {
|
|
103
|
-
p(),
|
|
107
|
+
p(), t == null || t.remove(r, a), c(new Error("Cancelled"));
|
|
104
108
|
};
|
|
105
|
-
|
|
109
|
+
i.on("select", n), i.on("intersectionUpdate", h), i.on("disable", u);
|
|
106
110
|
});
|
|
107
111
|
}
|
|
108
112
|
export {
|
|
109
|
-
|
|
113
|
+
L as Circle,
|
|
110
114
|
U as createCircle
|
|
111
115
|
};
|
|
@@ -3,6 +3,7 @@ import type { CircleStyle } from '../../Meshes/Circle';
|
|
|
3
3
|
import { CylinderMesh, type CylinderData } from '../../Meshes/Cylinder';
|
|
4
4
|
import { BaseObject, type BaseImportData, type BaseObjectConfig } from '../Base';
|
|
5
5
|
import type { LiteralString } from '../../../typings/utils.type';
|
|
6
|
+
import { CylinderMeshEditor } from '../../Editors/CylinderMeshEditor';
|
|
6
7
|
type CylinderStyle = CircleStyle;
|
|
7
8
|
export interface CylinderImportData extends BaseImportData, CylinderData {
|
|
8
9
|
type: LiteralString<'Cylinder'>;
|
|
@@ -11,6 +12,8 @@ export interface CylinderImportData extends BaseImportData, CylinderData {
|
|
|
11
12
|
export declare class Cylinder extends BaseObject<CylinderImportData> {
|
|
12
13
|
readonly type = "Cylinder";
|
|
13
14
|
cylinderMesh: CylinderMesh;
|
|
15
|
+
get editor(): CylinderMeshEditor;
|
|
16
|
+
_editor: CylinderMeshEditor;
|
|
14
17
|
get data(): {
|
|
15
18
|
bottomCenter: [number, number, number];
|
|
16
19
|
topCenter: [number, number, number];
|
|
@@ -1,51 +1,55 @@
|
|
|
1
1
|
var L = Object.defineProperty, j = Object.defineProperties;
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
2
|
+
var _ = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var w = Object.getOwnPropertySymbols;
|
|
4
|
+
var T = Object.prototype.hasOwnProperty, A = Object.prototype.propertyIsEnumerable;
|
|
5
5
|
var p = (n, t, e) => t in n ? L(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, d = (n, t) => {
|
|
6
6
|
for (var e in t || (t = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var e of
|
|
10
|
-
|
|
7
|
+
T.call(t, e) && p(n, e, t[e]);
|
|
8
|
+
if (w)
|
|
9
|
+
for (var e of w(t))
|
|
10
|
+
A.call(t, e) && p(n, e, t[e]);
|
|
11
11
|
return n;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var c = (
|
|
12
|
+
}, P = (n, t) => j(n, _(t));
|
|
13
|
+
var m = (n, t, e) => (p(n, typeof t != "symbol" ? t + "" : t, e), e);
|
|
14
|
+
var f = (n, t, e) => new Promise((i, s) => {
|
|
15
|
+
var c = (r) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
18
|
-
} catch (
|
|
19
|
-
s(
|
|
17
|
+
o(e.next(r));
|
|
18
|
+
} catch (l) {
|
|
19
|
+
s(l);
|
|
20
20
|
}
|
|
21
|
-
}, h = (
|
|
21
|
+
}, h = (r) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
24
|
-
} catch (
|
|
25
|
-
s(
|
|
23
|
+
o(e.throw(r));
|
|
24
|
+
} catch (l) {
|
|
25
|
+
s(l);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, o = (r) => r.done ? i(r.value) : Promise.resolve(r.value).then(c, h);
|
|
28
|
+
o((e = e.apply(n, t)).next());
|
|
29
29
|
});
|
|
30
|
-
import { CylinderMesh as
|
|
31
|
-
import { LineMesh as
|
|
32
|
-
import { rayOnLine as
|
|
33
|
-
import { BaseObject as
|
|
34
|
-
import { createCircle as
|
|
35
|
-
import * as
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
class
|
|
39
|
-
constructor(e,
|
|
40
|
-
super(e,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
30
|
+
import { CylinderMesh as E } from "../../Meshes/Cylinder.js";
|
|
31
|
+
import { LineMesh as U } from "../../Meshes/Line.js";
|
|
32
|
+
import { rayOnLine as W } from "../../utils/three/rayOnLine.js";
|
|
33
|
+
import { BaseObject as z } from "../Base/index.js";
|
|
34
|
+
import { createCircle as B } from "../Circle/index.js";
|
|
35
|
+
import * as b from "three";
|
|
36
|
+
import { vector3ToArray as O } from "../../../shared-utils/three/vector3ToArray.js";
|
|
37
|
+
import { CylinderMeshEditor as D } from "../../Editors/CylinderMeshEditor.js";
|
|
38
|
+
class Q extends z {
|
|
39
|
+
constructor(e, i) {
|
|
40
|
+
super(e, i);
|
|
41
|
+
m(this, "type", "Cylinder");
|
|
42
|
+
m(this, "cylinderMesh");
|
|
43
|
+
m(this, "_editor");
|
|
44
|
+
e && (this.cylinderMesh = new E(d(d({}, e.style), e)), this.add(this.cylinderMesh));
|
|
45
|
+
}
|
|
46
|
+
get editor() {
|
|
47
|
+
return this._editor || (this._editor = new D(this.cylinderMesh)), this._editor;
|
|
44
48
|
}
|
|
45
49
|
get data() {
|
|
46
|
-
return
|
|
47
|
-
bottomCenter:
|
|
48
|
-
topCenter:
|
|
50
|
+
return P(d({}, this.baseData), {
|
|
51
|
+
bottomCenter: O(this.applyObjectMatrixWorld(this.cylinderMesh.bottomCenter, this.cylinderMesh)),
|
|
52
|
+
topCenter: O(this.applyObjectMatrixWorld(this.cylinderMesh.topCenter, this.cylinderMesh)),
|
|
49
53
|
radius: this.cylinderMesh.radius,
|
|
50
54
|
style: {
|
|
51
55
|
color: this.cylinderMesh.color.getHex()
|
|
@@ -61,39 +65,39 @@ class X extends B {
|
|
|
61
65
|
(e = this.cylinderMesh) == null || e.unhighlight();
|
|
62
66
|
}
|
|
63
67
|
create(e) {
|
|
64
|
-
return
|
|
65
|
-
this.cylinderMesh = new
|
|
68
|
+
return f(this, null, function* () {
|
|
69
|
+
this.cylinderMesh = new E(e), this.add(this.cylinderMesh), yield F(this.cylinderMesh, this.pointSelector), this.config.canEdit && this.editor.enable();
|
|
66
70
|
});
|
|
67
71
|
}
|
|
68
72
|
}
|
|
69
|
-
function
|
|
70
|
-
return
|
|
73
|
+
function F(n, t) {
|
|
74
|
+
return f(this, null, function* () {
|
|
71
75
|
const e = n.parent;
|
|
72
|
-
yield
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
const s = t.position.point, c = n.normal.clone().normalize(), h = s.clone().add(c.clone().multiplyScalar(10)),
|
|
76
|
-
return
|
|
77
|
-
const C = (
|
|
78
|
-
|
|
79
|
-
}, u = (
|
|
80
|
-
if (!(
|
|
76
|
+
yield B(n.bottomCircle, t);
|
|
77
|
+
const i = new U();
|
|
78
|
+
i.name = "LineHelper", e.add(i);
|
|
79
|
+
const s = t.position.point, c = n.normal.clone().normalize(), h = s.clone().add(c.clone().multiplyScalar(10)), o = s.clone().sub(c.clone().multiplyScalar(10));
|
|
80
|
+
return i.setPoints([h, o]), t.enable(), new Promise((r, l) => {
|
|
81
|
+
const C = (a) => {
|
|
82
|
+
M(), r();
|
|
83
|
+
}, u = (a) => {
|
|
84
|
+
if (!(a != null && a.raycaster))
|
|
81
85
|
return;
|
|
82
|
-
const
|
|
83
|
-
raycaster:
|
|
84
|
-
line: new
|
|
85
|
-
}),
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
t.off("select", C), t.off("intersectionUpdate", u), t.off("disable",
|
|
89
|
-
},
|
|
90
|
-
|
|
86
|
+
const y = W({
|
|
87
|
+
raycaster: a.raycaster,
|
|
88
|
+
line: new b.Line3(h, o)
|
|
89
|
+
}), v = new b.Plane().setFromNormalAndCoplanarPoint(n.normal, n.bottomCenter).projectPoint(y, new b.Vector3()), x = y.clone().sub(v), H = n.bottomCenter.clone().add(x);
|
|
90
|
+
y && n.setTopCenter(H);
|
|
91
|
+
}, M = () => {
|
|
92
|
+
t.off("select", C), t.off("intersectionUpdate", u), t.off("disable", g), e.remove(i), t.disable();
|
|
93
|
+
}, g = () => {
|
|
94
|
+
M(), e.remove(n), l(new Error("Cancelled"));
|
|
91
95
|
};
|
|
92
|
-
t.on("select", C), t.on("intersectionUpdate", u), t.on("disable",
|
|
96
|
+
t.on("select", C), t.on("intersectionUpdate", u), t.on("disable", g);
|
|
93
97
|
});
|
|
94
98
|
});
|
|
95
99
|
}
|
|
96
100
|
export {
|
|
97
|
-
|
|
98
|
-
|
|
101
|
+
Q as Cylinder,
|
|
102
|
+
F as createCylinder
|
|
99
103
|
};
|