@realsee/dnalogel 3.51.0 → 3.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -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 -1
- package/dist/Sculpt/Objects/Base/index.d.ts +2 -1
- 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 +12 -0
- package/dist/Sculpt/index.d.ts +11 -10
- 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 +35153 -54255
- 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 -1
- package/libs/Sculpt/Meshes/Rectangle.js +7 -10
- package/libs/Sculpt/Meshes/RectangleWithEdge.js +17 -20
- package/libs/Sculpt/Objects/Base/index.d.ts +2 -1
- package/libs/Sculpt/Objects/Base/index.js +16 -17
- 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 +34 -30
- package/libs/Sculpt/Objects/Cylinder/index.d.ts +3 -0
- package/libs/Sculpt/Objects/Cylinder/index.js +46 -42
- 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 +12 -0
- package/libs/Sculpt/Objects/Rectangle/index.js +142 -81
- package/libs/Sculpt/index.d.ts +11 -10
- 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,51 +1,55 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var A = Object.defineProperty, D = Object.defineProperties;
|
|
2
|
+
var k = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var R = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var j = (n, t, e) => t in n ?
|
|
4
|
+
var z = Object.prototype.hasOwnProperty, B = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var j = (n, t, e) => t in n ? A(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, f = (n, t) => {
|
|
6
6
|
for (var e in t || (t = {}))
|
|
7
|
-
|
|
7
|
+
z.call(t, e) && j(n, e, t[e]);
|
|
8
8
|
if (R)
|
|
9
9
|
for (var e of R(t))
|
|
10
|
-
|
|
10
|
+
B.call(t, e) && j(n, e, t[e]);
|
|
11
11
|
return n;
|
|
12
|
-
}, v = (n, t) =>
|
|
13
|
-
var
|
|
14
|
-
var U = (n, t, e) => new Promise((s,
|
|
12
|
+
}, v = (n, t) => D(n, k(t));
|
|
13
|
+
var p = (n, t, e) => (j(n, typeof t != "symbol" ? t + "" : t, e), e);
|
|
14
|
+
var U = (n, t, e) => new Promise((s, m) => {
|
|
15
15
|
var P = (o) => {
|
|
16
16
|
try {
|
|
17
17
|
c(e.next(o));
|
|
18
18
|
} catch (l) {
|
|
19
|
-
|
|
19
|
+
m(l);
|
|
20
20
|
}
|
|
21
21
|
}, b = (o) => {
|
|
22
22
|
try {
|
|
23
23
|
c(e.throw(o));
|
|
24
24
|
} catch (l) {
|
|
25
|
-
|
|
25
|
+
m(l);
|
|
26
26
|
}
|
|
27
27
|
}, c = (o) => o.done ? s(o.value) : Promise.resolve(o.value).then(P, b);
|
|
28
28
|
c((e = e.apply(n, t)).next());
|
|
29
29
|
});
|
|
30
30
|
import { LineMesh as H } from "../../Meshes/Line.js";
|
|
31
|
-
import { BaseObject as
|
|
31
|
+
import { BaseObject as F } from "../Base/index.js";
|
|
32
32
|
import * as a from "three";
|
|
33
|
-
import { LineEditor as
|
|
34
|
-
import { vector3ToArray as
|
|
33
|
+
import { LineEditor as I } from "./Editor.js";
|
|
34
|
+
import { vector3ToArray as N } from "../../../shared-utils/three/vector3ToArray.js";
|
|
35
35
|
import { LineWithDotsMesh as T } from "../../Meshes/LineWithDots.js";
|
|
36
|
-
import { rayOnLine as
|
|
37
|
-
import { withResolvers as
|
|
38
|
-
class ne extends
|
|
36
|
+
import { rayOnLine as q } from "../../utils/three/rayOnLine.js";
|
|
37
|
+
import { withResolvers as G } from "../../../shared-utils/promise/withResolvers.js";
|
|
38
|
+
class ne extends F {
|
|
39
39
|
constructor(e, s) {
|
|
40
40
|
super(e, s);
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
p(this, "type", "Line");
|
|
42
|
+
p(this, "lineMesh");
|
|
43
|
+
p(this, "_editor");
|
|
44
|
+
p(this, "creatingObject");
|
|
45
|
+
e && (this.lineMesh = new T(f(f({}, e.style), e)), this.add(this.lineMesh));
|
|
46
|
+
}
|
|
47
|
+
get editor() {
|
|
48
|
+
return this._editor || (this._editor = new I(this)), this._editor;
|
|
45
49
|
}
|
|
46
50
|
get data() {
|
|
47
51
|
return v(f({}, this.baseData), {
|
|
48
|
-
points:
|
|
52
|
+
points: N(this.applyObjectMatrixWorld(this.lineMesh.points)),
|
|
49
53
|
style: {
|
|
50
54
|
lineColor: new a.Color(this.lineMesh.color).getHex(),
|
|
51
55
|
lineWidth: this.lineMesh.lineWidth,
|
|
@@ -81,58 +85,58 @@ class ne extends I {
|
|
|
81
85
|
return U(this, null, function* () {
|
|
82
86
|
this.removeChildren();
|
|
83
87
|
const s = new T(e);
|
|
84
|
-
this.lineMesh = s, this.add(this.lineMesh), this.creatingObject =
|
|
88
|
+
this.lineMesh = s, this.add(this.lineMesh), this.creatingObject = J(s, this.pointSelector, e), yield this.creatingObject.finished, this.config.canEdit && this.editor.enable();
|
|
85
89
|
});
|
|
86
90
|
}
|
|
87
91
|
}
|
|
88
|
-
function
|
|
92
|
+
function J(n, t, e) {
|
|
89
93
|
var C;
|
|
90
94
|
const s = n.parent;
|
|
91
95
|
if (!s)
|
|
92
96
|
return;
|
|
93
|
-
const { promise:
|
|
97
|
+
const { promise: m, resolve: P, reject: b } = G(), c = (C = e == null ? void 0 : e.limit) != null ? C : "none", o = new H(n.style);
|
|
94
98
|
s.add(o);
|
|
95
99
|
const l = new H(v(f({}, n.style), { dashed: !0, lengthEnable: !1 }));
|
|
96
100
|
s.add(l), t.enable();
|
|
97
101
|
const i = [];
|
|
98
102
|
let h, d, y;
|
|
99
|
-
const
|
|
100
|
-
O() && (
|
|
101
|
-
},
|
|
102
|
-
M() && (i.push(
|
|
103
|
+
const g = [], O = () => i.length > 0, M = () => g.length > 0, W = () => {
|
|
104
|
+
O() && (g.push(i.pop()), n.setPoints(i), u(y), t.pointSelectorHelper.magnifier.render());
|
|
105
|
+
}, _ = () => {
|
|
106
|
+
M() && (i.push(g.pop()), n.setPoints(i), u(y), t.pointSelectorHelper.magnifier.render());
|
|
103
107
|
}, E = (r) => {
|
|
104
108
|
if (!r)
|
|
105
109
|
return;
|
|
106
|
-
|
|
107
|
-
const
|
|
108
|
-
i.push(
|
|
109
|
-
},
|
|
110
|
-
const
|
|
110
|
+
g.length = 0;
|
|
111
|
+
const w = i.length === 0 ? r.point : h.clone();
|
|
112
|
+
i.push(w), n.setPoints(i), i.length === 2 && (V(), P());
|
|
113
|
+
}, u = (r) => {
|
|
114
|
+
const w = () => {
|
|
111
115
|
o.setPoints([]), l.setPoints([]), t.pointSelectorHelper.magnifier.render();
|
|
112
116
|
};
|
|
113
117
|
if (!(i != null && i.length) || !r)
|
|
114
|
-
return
|
|
118
|
+
return w();
|
|
115
119
|
y = r;
|
|
116
120
|
const L = i.at(-1).clone();
|
|
117
|
-
c === "none" ? (h = r.point, o.setPoints([L, h])) : c === "xoz" ? (t.plane = d, d = d != null ? d : new a.Plane().setFromNormalAndCoplanarPoint(new a.Vector3(0, 1, 0), i[0]), h = d.projectPoint(r.point, new a.Vector3()), o.setPoints([L, h]), l.setPoints([h, r.point])) : c === "y" && (r.isVirtual ? (h =
|
|
121
|
+
c === "none" ? (h = r.point, o.setPoints([L, h])) : c === "xoz" ? (t.plane = d, d = d != null ? d : new a.Plane().setFromNormalAndCoplanarPoint(new a.Vector3(0, 1, 0), i[0]), h = d.projectPoint(r.point, new a.Vector3()), o.setPoints([L, h]), l.setPoints([h, r.point])) : c === "y" && (r.isVirtual ? (h = q({
|
|
118
122
|
raycaster: r.raycaster,
|
|
119
123
|
line: new a.Line3(i[0].clone(), new a.Vector3(0, 1, 0).add(i[0])),
|
|
120
124
|
clampToLine: !1
|
|
121
125
|
}), l.setPoints([])) : (h = new a.Line3(i[0].clone(), new a.Vector3(0, 1, 0).add(i[0])).closestPointToPoint(r.point, !1, new a.Vector3()), l.setPoints([h, r.point])), o.setPoints([L, h]));
|
|
122
126
|
}, V = () => {
|
|
123
|
-
t.off("select", E), t.off("intersectionUpdate",
|
|
127
|
+
t.off("select", E), t.off("intersectionUpdate", u), t.off("disable", x), t.plane = null, t.disable(), s == null || s.remove(o, l);
|
|
124
128
|
}, x = () => {
|
|
125
129
|
V(), i.length !== 2 && (s == null || s.remove(n)), b(new Error("Cancelled"));
|
|
126
130
|
};
|
|
127
|
-
return t.on("select", E), t.on("intersectionUpdate",
|
|
128
|
-
finished:
|
|
131
|
+
return t.on("select", E), t.on("intersectionUpdate", u), t.on("disable", x), {
|
|
132
|
+
finished: m,
|
|
129
133
|
canUndo: O,
|
|
130
134
|
canRedo: M,
|
|
131
135
|
undo: W,
|
|
132
|
-
redo:
|
|
136
|
+
redo: _
|
|
133
137
|
};
|
|
134
138
|
}
|
|
135
139
|
export {
|
|
136
140
|
ne as Line,
|
|
137
|
-
|
|
141
|
+
J as createLine
|
|
138
142
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PointMesh, type PointData, type PointStyle } from '../../Meshes/Point';
|
|
2
2
|
import { BaseObject, type BaseImportData, type BaseObjectConfig } from '../Base';
|
|
3
|
+
import { PointEditor } from './Editor';
|
|
3
4
|
import type { PointSelector } from '../../../shared-utils/three/PointSelector';
|
|
4
5
|
import type { LiteralString } from '../../../typings/utils.type';
|
|
5
6
|
export interface PointImportData extends BaseImportData, PointData {
|
|
@@ -9,6 +10,8 @@ export interface PointImportData extends BaseImportData, PointData {
|
|
|
9
10
|
export declare class Point extends BaseObject<PointImportData> {
|
|
10
11
|
readonly type = "Point";
|
|
11
12
|
pointMesh: PointMesh;
|
|
13
|
+
get editor(): PointEditor;
|
|
14
|
+
_editor: PointEditor;
|
|
12
15
|
get data(): {
|
|
13
16
|
point: [number, number, number];
|
|
14
17
|
style: {
|
|
@@ -1,45 +1,49 @@
|
|
|
1
|
-
var
|
|
1
|
+
var u = Object.defineProperty, y = Object.defineProperties;
|
|
2
2
|
var M = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
3
|
+
var p = Object.getOwnPropertySymbols;
|
|
4
4
|
var P = Object.prototype.hasOwnProperty, v = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
5
|
+
var d = (e, i, t) => i in e ? u(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, a = (e, i) => {
|
|
6
6
|
for (var t in i || (i = {}))
|
|
7
|
-
P.call(i, t) &&
|
|
8
|
-
if (
|
|
9
|
-
for (var t of
|
|
10
|
-
v.call(i, t) &&
|
|
7
|
+
P.call(i, t) && d(e, t, i[t]);
|
|
8
|
+
if (p)
|
|
9
|
+
for (var t of p(i))
|
|
10
|
+
v.call(i, t) && d(e, t, i[t]);
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
var
|
|
12
|
+
}, b = (e, i) => y(e, M(i));
|
|
13
|
+
var f = (e, i, t) => (d(e, typeof i != "symbol" ? i + "" : i, t), t);
|
|
14
|
+
var g = (e, i, t) => new Promise((h, n) => {
|
|
15
15
|
var r = (s) => {
|
|
16
16
|
try {
|
|
17
17
|
o(t.next(s));
|
|
18
|
-
} catch (
|
|
19
|
-
n(
|
|
18
|
+
} catch (c) {
|
|
19
|
+
n(c);
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, l = (s) => {
|
|
22
22
|
try {
|
|
23
23
|
o(t.throw(s));
|
|
24
|
-
} catch (
|
|
25
|
-
n(
|
|
24
|
+
} catch (c) {
|
|
25
|
+
n(c);
|
|
26
26
|
}
|
|
27
|
-
}, o = (s) => s.done ? h(s.value) : Promise.resolve(s.value).then(r,
|
|
27
|
+
}, o = (s) => s.done ? h(s.value) : Promise.resolve(s.value).then(r, l);
|
|
28
28
|
o((t = t.apply(e, i)).next());
|
|
29
29
|
});
|
|
30
|
-
import { PointMesh as
|
|
30
|
+
import { PointMesh as m } from "../../Meshes/Point.js";
|
|
31
31
|
import { BaseObject as w } from "../Base/index.js";
|
|
32
32
|
import { PointEditor as x } from "./Editor.js";
|
|
33
33
|
import { vector3ToArray as E } from "../../../shared-utils/three/vector3ToArray.js";
|
|
34
|
-
class
|
|
34
|
+
class B extends w {
|
|
35
35
|
constructor(t, h) {
|
|
36
36
|
super(t, h);
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
f(this, "type", "Point");
|
|
38
|
+
f(this, "pointMesh");
|
|
39
|
+
f(this, "_editor");
|
|
40
|
+
t && (this.pointMesh = new m(a(a({}, t.style), t)), this.add(this.pointMesh));
|
|
41
|
+
}
|
|
42
|
+
get editor() {
|
|
43
|
+
return this._editor || (this._editor = new x(this)), this._editor;
|
|
40
44
|
}
|
|
41
45
|
get data() {
|
|
42
|
-
return
|
|
46
|
+
return b(a({}, this.baseData), {
|
|
43
47
|
point: E(this.applyObjectMatrixWorld(this.pointMesh.position)),
|
|
44
48
|
style: {
|
|
45
49
|
color: this.pointMesh.color.getHex(),
|
|
@@ -67,19 +71,19 @@ class C extends w {
|
|
|
67
71
|
* @description: 创建点
|
|
68
72
|
*/
|
|
69
73
|
create(t) {
|
|
70
|
-
return
|
|
71
|
-
this.pointMesh && this.remove(this.pointMesh), this.add(this.pointMesh = new
|
|
74
|
+
return g(this, null, function* () {
|
|
75
|
+
this.pointMesh && this.remove(this.pointMesh), this.add(this.pointMesh = new m(t)), yield _(this.pointMesh, this.pointSelector), this.config.canEdit && this.editor.enable();
|
|
72
76
|
});
|
|
73
77
|
}
|
|
74
78
|
}
|
|
75
|
-
function
|
|
79
|
+
function _(e, i) {
|
|
76
80
|
return new Promise((t, h) => {
|
|
77
81
|
i.enable(), e.visible = !1;
|
|
78
82
|
const n = (s) => {
|
|
79
83
|
s && (e.visible = !0, e.position.copy(s.point));
|
|
80
84
|
}, r = (s) => {
|
|
81
|
-
s && (e.visible = !0, e.position.copy(s.point),
|
|
82
|
-
},
|
|
85
|
+
s && (e.visible = !0, e.position.copy(s.point), l());
|
|
86
|
+
}, l = () => {
|
|
83
87
|
i.off("select", r), i.off("disable", o), i.off("intersectionUpdate", n), i.disable(), t();
|
|
84
88
|
}, o = () => {
|
|
85
89
|
i.off("select", r), i.off("disable", o), i.off("intersectionUpdate", n), e.removeFromParent(), h(new Error("Cancelled"));
|
|
@@ -88,6 +92,6 @@ function U(e, i) {
|
|
|
88
92
|
});
|
|
89
93
|
}
|
|
90
94
|
export {
|
|
91
|
-
|
|
92
|
-
|
|
95
|
+
B as Point,
|
|
96
|
+
_ as createPoint
|
|
93
97
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseObject, type BaseImportData, type BaseObjectConfig } from '../Base';
|
|
2
2
|
import { AreaMesh, type AreaStyle } from '../../Meshes/Area';
|
|
3
|
+
import { PolygonEditor } from './Editor';
|
|
3
4
|
import type { PointSelector } from '../../../shared-utils/three/PointSelector';
|
|
4
5
|
import type { LiteralString } from '../../../typings/utils.type';
|
|
5
6
|
import type { PolygonData, PolygonStyle } from '../../Meshes/Polygon';
|
|
@@ -11,6 +12,8 @@ export interface PolygonImportData extends BaseImportData, PolygonData {
|
|
|
11
12
|
export declare class Polygon extends BaseObject<PolygonImportData> {
|
|
12
13
|
readonly type = "Polygon";
|
|
13
14
|
areaMesh: AreaMesh;
|
|
15
|
+
get editor(): PolygonEditor;
|
|
16
|
+
_editor: PolygonEditor;
|
|
14
17
|
private creatingObject?;
|
|
15
18
|
get data(): {
|
|
16
19
|
points: [number, number, number][];
|
|
@@ -1,50 +1,54 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var F = Object.defineProperty, I = Object.defineProperties;
|
|
2
|
+
var L = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var V = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var O = (s, t, e) => t in s ?
|
|
4
|
+
var N = Object.prototype.hasOwnProperty, z = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var O = (s, t, e) => t in s ? F(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, p = (s, t) => {
|
|
6
6
|
for (var e in t || (t = {}))
|
|
7
|
-
|
|
7
|
+
N.call(t, e) && O(s, e, t[e]);
|
|
8
8
|
if (V)
|
|
9
9
|
for (var e of V(t))
|
|
10
|
-
|
|
10
|
+
z.call(t, e) && O(s, e, t[e]);
|
|
11
11
|
return s;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
12
|
+
}, v = (s, t) => I(s, L(t));
|
|
13
|
+
var u = (s, t, e) => (O(s, typeof t != "symbol" ? t + "" : t, e), e);
|
|
14
|
+
var _ = (s, t, e) => new Promise((c, d) => {
|
|
15
|
+
var m = (i) => {
|
|
16
16
|
try {
|
|
17
|
-
f(e.next(
|
|
17
|
+
f(e.next(i));
|
|
18
18
|
} catch (l) {
|
|
19
19
|
d(l);
|
|
20
20
|
}
|
|
21
|
-
}, r = (
|
|
21
|
+
}, r = (i) => {
|
|
22
22
|
try {
|
|
23
|
-
f(e.throw(
|
|
23
|
+
f(e.throw(i));
|
|
24
24
|
} catch (l) {
|
|
25
25
|
d(l);
|
|
26
26
|
}
|
|
27
|
-
}, f = (
|
|
27
|
+
}, f = (i) => i.done ? c(i.value) : Promise.resolve(i.value).then(m, r);
|
|
28
28
|
f((e = e.apply(s, t)).next());
|
|
29
29
|
});
|
|
30
|
-
import { BaseObject as
|
|
31
|
-
import * as
|
|
32
|
-
import { PolylineMesh as
|
|
33
|
-
import { AreaMesh as
|
|
34
|
-
import { PolygonEditor as
|
|
35
|
-
import { vector3ToArray as
|
|
36
|
-
import { withResolvers as
|
|
37
|
-
class se extends
|
|
30
|
+
import { BaseObject as q } from "../Base/index.js";
|
|
31
|
+
import * as g from "three";
|
|
32
|
+
import { PolylineMesh as A } from "../../Meshes/Polyline.js";
|
|
33
|
+
import { AreaMesh as k } from "../../Meshes/Area.js";
|
|
34
|
+
import { PolygonEditor as G } from "./Editor.js";
|
|
35
|
+
import { vector3ToArray as J } from "../../../shared-utils/three/vector3ToArray.js";
|
|
36
|
+
import { withResolvers as K } from "../../../shared-utils/promise/withResolvers.js";
|
|
37
|
+
class se extends q {
|
|
38
38
|
constructor(e, c) {
|
|
39
39
|
super(e, c);
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
u(this, "type", "Polygon");
|
|
41
|
+
u(this, "areaMesh");
|
|
42
|
+
u(this, "_editor");
|
|
43
|
+
u(this, "creatingObject");
|
|
44
|
+
e && (this.areaMesh = new k(p(p({}, e.style), e)), this.add(this.areaMesh));
|
|
45
|
+
}
|
|
46
|
+
get editor() {
|
|
47
|
+
return this._editor || (this._editor = new G(this)), this._editor;
|
|
44
48
|
}
|
|
45
49
|
get data() {
|
|
46
|
-
return this.updateMatrixWorld(),
|
|
47
|
-
points:
|
|
50
|
+
return this.updateMatrixWorld(), v(p({}, this.baseData), {
|
|
51
|
+
points: J(this.applyObjectMatrixWorld(this.areaMesh.points)),
|
|
48
52
|
style: {
|
|
49
53
|
color: this.areaMesh.color.getHex(),
|
|
50
54
|
lineColor: this.areaMesh.lineColor.getHex(),
|
|
@@ -77,63 +81,63 @@ class se extends G {
|
|
|
77
81
|
(e = this.creatingObject) == null || e.redo();
|
|
78
82
|
}
|
|
79
83
|
create(e) {
|
|
80
|
-
return
|
|
84
|
+
return _(this, null, function* () {
|
|
81
85
|
this.children.forEach((d) => {
|
|
82
86
|
d.parent === this && this.remove(d);
|
|
83
87
|
}), this.children.length = 0;
|
|
84
|
-
const c = new
|
|
85
|
-
this.areaMesh = c, this.add(this.areaMesh), this.creatingObject =
|
|
88
|
+
const c = new k(e);
|
|
89
|
+
this.areaMesh = c, this.add(this.areaMesh), this.creatingObject = Q(this.areaMesh, this.pointSelector, e), yield this.creatingObject.finished, this.config.canEdit && this.editor.enable();
|
|
86
90
|
});
|
|
87
91
|
}
|
|
88
92
|
}
|
|
89
|
-
function
|
|
93
|
+
function Q(s, t, e) {
|
|
90
94
|
var M;
|
|
91
|
-
const { promise: c, resolve: d, reject:
|
|
95
|
+
const { promise: c, resolve: d, reject: m } = K(), r = s.parent;
|
|
92
96
|
if (!r) {
|
|
93
|
-
|
|
97
|
+
m(new Error("No container"));
|
|
94
98
|
return;
|
|
95
99
|
}
|
|
96
|
-
const f = (M = e == null ? void 0 : e.limit) != null ? M : "none",
|
|
97
|
-
r == null || r.add(
|
|
98
|
-
const l = new
|
|
100
|
+
const f = (M = e == null ? void 0 : e.limit) != null ? M : "none", i = new A(v(p({}, s.style), { opacity: 1 }));
|
|
101
|
+
r == null || r.add(i);
|
|
102
|
+
const l = new A(v(p({}, s.style), { dashed: !0, lengthEnable: !1 }));
|
|
99
103
|
r == null || r.add(l), t.enable();
|
|
100
104
|
const o = [];
|
|
101
|
-
let
|
|
102
|
-
const
|
|
103
|
-
x() && (
|
|
104
|
-
},
|
|
105
|
-
R() && (o.push(
|
|
106
|
-
}, U = (
|
|
107
|
-
|
|
108
|
-
const
|
|
109
|
-
o.push(
|
|
110
|
-
},
|
|
111
|
-
const
|
|
112
|
-
|
|
105
|
+
let n, a, C = !1, E;
|
|
106
|
+
const y = [], x = () => o.length > 0, R = () => y.length > 0, B = () => {
|
|
107
|
+
x() && (y.push(o.pop()), w(E), t.pointSelectorHelper.magnifier.render());
|
|
108
|
+
}, D = () => {
|
|
109
|
+
R() && (o.push(y.pop()), w(E), t.pointSelectorHelper.magnifier.render());
|
|
110
|
+
}, U = (h) => {
|
|
111
|
+
y.length = 0;
|
|
112
|
+
const b = o.length === 0 ? h.point : n.clone();
|
|
113
|
+
o.push(b), s.setPoints(o, { closed: !1 }), C && (W(), d());
|
|
114
|
+
}, w = (h) => {
|
|
115
|
+
const b = () => {
|
|
116
|
+
i.setPoints([]), l.setPoints([]), s.setPoints(o), t.pointSelectorHelper.magnifier.render();
|
|
113
117
|
};
|
|
114
|
-
if (!
|
|
115
|
-
return
|
|
116
|
-
const
|
|
117
|
-
if (o.length < 3 && (f === "none" ? (
|
|
118
|
-
|
|
119
|
-
const
|
|
120
|
-
|
|
118
|
+
if (!h || (E = h, !(o != null && o.length)))
|
|
119
|
+
return b();
|
|
120
|
+
const P = o.at(-1).clone();
|
|
121
|
+
if (o.length < 3 && (f === "none" ? (n = h.point, i.setPoints([P, n]), l.setPoints([])) : f === "xoz" ? (a = a != null ? a : new g.Plane().setFromNormalAndCoplanarPoint(new g.Vector3(0, 1, 0), o[0]), t.plane = a, n = a.projectPoint(h.point, new g.Vector3()), i.setPoints([P, n]), l.setPoints([n, h.point])) : f === "y" && (o.length === 1 ? (n = h.point, i.setPoints([P, n]), l.setPoints([])) : (a = a != null ? a : new g.Plane().setFromCoplanarPoints(o[0], o[1], new g.Vector3(0, 1, 0).add(o[0])), t.plane = a, n = a.projectPoint(h.point, new g.Vector3()), i.setPoints([P, n]), l.setPoints([n, h.point])))), o.length >= 3) {
|
|
122
|
+
n = s.projectPoint(h.point);
|
|
123
|
+
const j = o[0], T = 0.2;
|
|
124
|
+
j.distanceTo(n) < T || j.distanceTo(h.point) < T ? (n = j, h.point.copy(j), t.pointSelectorHelper.updateWithIntersect(h, { emitEvent: !1 }), C = !0) : C = !1, i.setPoints([P, n]), l.setPoints([n, h.point]);
|
|
121
125
|
}
|
|
122
|
-
o.length >= 2 ? (s.setPoints([...o,
|
|
126
|
+
o.length >= 2 ? (s.setPoints([...o, n], { closed: !1 }), s.line.setPoints(s.points.slice(0, -1)), s.isBlank ? (t.cursorError = !0, i.setStyle({ lineColor: 16734553 }), l.setStyle({ lineColor: 16734553 })) : (t.cursorError = !1, i.setStyle({ lineColor: s.lineColor }), l.setStyle({ lineColor: s.lineColor }))) : s.setPoints([]);
|
|
123
127
|
}, W = () => {
|
|
124
|
-
t.off("select", U), t.off("intersectionUpdate",
|
|
128
|
+
t.off("select", U), t.off("intersectionUpdate", w), t.off("disable", H), t.plane = null, t.disable(), r == null || r.remove(i, l);
|
|
125
129
|
}, H = () => {
|
|
126
|
-
W(), r == null || r.remove(s, l,
|
|
130
|
+
W(), r == null || r.remove(s, l, i), m(new Error("Cancelled"));
|
|
127
131
|
};
|
|
128
|
-
return t.on("select", U), t.on("intersectionUpdate",
|
|
132
|
+
return t.on("select", U), t.on("intersectionUpdate", w), t.on("disable", H), {
|
|
129
133
|
finished: c,
|
|
130
134
|
canUndo: x,
|
|
131
135
|
canRedo: R,
|
|
132
|
-
undo:
|
|
133
|
-
redo:
|
|
136
|
+
undo: B,
|
|
137
|
+
redo: D
|
|
134
138
|
};
|
|
135
139
|
}
|
|
136
140
|
export {
|
|
137
141
|
se as Polygon,
|
|
138
|
-
|
|
142
|
+
Q as createPolygon
|
|
139
143
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PolylineMesh, PolylineWithDotsMesh, type PolylineData, type PolylineStyle } from '../../Meshes/Polyline';
|
|
2
2
|
import { BaseObject, type BaseImportData, type BaseObjectConfig } from '../Base';
|
|
3
|
+
import { PolylineEditor } from './Editor';
|
|
3
4
|
import type { PointSelector } from '../../../shared-utils/three/PointSelector';
|
|
4
5
|
import type { LiteralString } from '../../../typings/utils.type';
|
|
5
6
|
import type { CreateLimitConfig } from '../../typings/style';
|
|
@@ -10,6 +11,8 @@ export interface PolylineImportData extends BaseImportData, PolylineData {
|
|
|
10
11
|
export declare class Polyline extends BaseObject<PolylineImportData> {
|
|
11
12
|
readonly type = "Polyline";
|
|
12
13
|
polyLineMesh: PolylineWithDotsMesh;
|
|
14
|
+
get editor(): PolylineEditor;
|
|
15
|
+
_editor: PolylineEditor;
|
|
13
16
|
private creatingObject?;
|
|
14
17
|
get data(): {
|
|
15
18
|
points: [number, number, number][];
|