@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,49 +1,53 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var v = (n, t, e) => t in n ?
|
|
1
|
+
var A = Object.defineProperty, D = Object.defineProperties;
|
|
2
|
+
var F = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var x = Object.getOwnPropertySymbols;
|
|
4
|
+
var T = Object.prototype.hasOwnProperty, k = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var v = (n, t, e) => t in n ? A(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, p = (n, t) => {
|
|
6
6
|
for (var e in t || (t = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var e of
|
|
10
|
-
|
|
7
|
+
T.call(t, e) && v(n, e, t[e]);
|
|
8
|
+
if (x)
|
|
9
|
+
for (var e of x(t))
|
|
10
|
+
k.call(t, e) && v(n, e, t[e]);
|
|
11
11
|
return n;
|
|
12
|
-
}, M = (n, t) =>
|
|
13
|
-
var
|
|
14
|
-
var R = (n, t, e) => new Promise((s,
|
|
12
|
+
}, M = (n, t) => D(n, F(t));
|
|
13
|
+
var P = (n, t, e) => (v(n, typeof t != "symbol" ? t + "" : t, e), e);
|
|
14
|
+
var R = (n, t, e) => new Promise((s, f) => {
|
|
15
15
|
var w = (o) => {
|
|
16
16
|
try {
|
|
17
17
|
c(e.next(o));
|
|
18
18
|
} catch (a) {
|
|
19
|
-
|
|
19
|
+
f(a);
|
|
20
20
|
}
|
|
21
21
|
}, b = (o) => {
|
|
22
22
|
try {
|
|
23
23
|
c(e.throw(o));
|
|
24
24
|
} catch (a) {
|
|
25
|
-
|
|
25
|
+
f(a);
|
|
26
26
|
}
|
|
27
27
|
}, c = (o) => o.done ? s(o.value) : Promise.resolve(o.value).then(w, b);
|
|
28
28
|
c((e = e.apply(n, t)).next());
|
|
29
29
|
});
|
|
30
30
|
import { PolylineMesh as U, PolylineWithDotsMesh as V } from "../../Meshes/Polyline.js";
|
|
31
|
-
import { BaseObject as
|
|
31
|
+
import { BaseObject as z } from "../Base/index.js";
|
|
32
32
|
import * as d from "three";
|
|
33
|
-
import { PolylineEditor as
|
|
34
|
-
import { vector3ToArray as
|
|
35
|
-
import { withResolvers as
|
|
36
|
-
class
|
|
33
|
+
import { PolylineEditor as B } from "./Editor.js";
|
|
34
|
+
import { vector3ToArray as H } from "../../../shared-utils/three/vector3ToArray.js";
|
|
35
|
+
import { withResolvers as I } from "../../../shared-utils/promise/withResolvers.js";
|
|
36
|
+
class Y extends z {
|
|
37
37
|
constructor(e, s) {
|
|
38
38
|
super(e, s);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
P(this, "type", "Polyline");
|
|
40
|
+
P(this, "polyLineMesh");
|
|
41
|
+
P(this, "_editor");
|
|
42
|
+
P(this, "creatingObject");
|
|
43
|
+
e && (this.polyLineMesh = new V(p(p({}, e.style), e)), this.add(this.polyLineMesh));
|
|
44
|
+
}
|
|
45
|
+
get editor() {
|
|
46
|
+
return this._editor || (this._editor = new B(this)), this._editor;
|
|
43
47
|
}
|
|
44
48
|
get data() {
|
|
45
49
|
return M(p({}, this.baseData), {
|
|
46
|
-
points:
|
|
50
|
+
points: H(this.applyObjectMatrixWorld(this.polyLineMesh.points)),
|
|
47
51
|
style: {
|
|
48
52
|
lineColor: new d.Color(this.polyLineMesh.lineColor).getHex(),
|
|
49
53
|
lineWidth: this.polyLineMesh.lineWidth,
|
|
@@ -79,51 +83,51 @@ class Z extends B {
|
|
|
79
83
|
return R(this, null, function* () {
|
|
80
84
|
this.removeChildren();
|
|
81
85
|
const s = new V(e);
|
|
82
|
-
this.polyLineMesh = s, this.add(this.polyLineMesh), this.creatingObject =
|
|
86
|
+
this.polyLineMesh = s, this.add(this.polyLineMesh), this.creatingObject = N(s, this.pointSelector, e), yield this.creatingObject.finished, this.config.canEdit && this.editor.enable();
|
|
83
87
|
});
|
|
84
88
|
}
|
|
85
89
|
}
|
|
86
|
-
function
|
|
87
|
-
var
|
|
90
|
+
function N(n, t, e) {
|
|
91
|
+
var E;
|
|
88
92
|
const s = n.parent;
|
|
89
93
|
if (!s)
|
|
90
94
|
return;
|
|
91
|
-
const { promise:
|
|
95
|
+
const { promise: f, resolve: w, reject: b } = I(), c = (E = e == null ? void 0 : e.limit) != null ? E : "none", o = new U(n.style);
|
|
92
96
|
s.add(o);
|
|
93
97
|
const a = new U(M(p({}, n.style), { dashed: !0, lengthEnable: !1 }));
|
|
94
98
|
s.add(a), t.enable();
|
|
95
99
|
const i = [];
|
|
96
100
|
let r, l, j;
|
|
97
|
-
const
|
|
98
|
-
O() && (
|
|
99
|
-
},
|
|
100
|
-
L() && (i.push(
|
|
101
|
+
const g = [], O = () => i.length > 0, L = () => g.length > 0, W = () => {
|
|
102
|
+
O() && (g.push(i.pop()), n.setPoints(i), u(j), t.pointSelectorHelper.magnifier.render());
|
|
103
|
+
}, _ = () => {
|
|
104
|
+
L() && (i.push(g.pop()), n.setPoints(i), u(j), t.pointSelectorHelper.magnifier.render());
|
|
101
105
|
}, C = (h) => {
|
|
102
|
-
|
|
106
|
+
g.length = 0;
|
|
103
107
|
const m = i.length === 0 ? h.point : r.clone();
|
|
104
108
|
i.push(m), n.setPoints(i);
|
|
105
|
-
},
|
|
109
|
+
}, u = (h) => {
|
|
106
110
|
const m = () => {
|
|
107
111
|
o.setPoints([]), a.setPoints([]), r = null;
|
|
108
112
|
};
|
|
109
113
|
if (!h || (j = h, !(i != null && i.length)))
|
|
110
114
|
return m();
|
|
111
|
-
const
|
|
112
|
-
c === "none" ? (r = h.point, o.setPoints([
|
|
115
|
+
const y = i.at(-1).clone();
|
|
116
|
+
c === "none" ? (r = h.point, o.setPoints([y, r])) : c === "xoz" ? (l = l != null ? l : new d.Plane().setFromNormalAndCoplanarPoint(new d.Vector3(0, 1, 0), i[0]), t.plane = l, r = l.projectPoint(h.point, new d.Vector3()), o.setPoints([y, r]), a.setPoints([r, h.point])) : c === "y" && (i.length === 1 ? (r = h.point, o.setPoints([y, r])) : (l = l != null ? l : new d.Plane().setFromCoplanarPoints(i[0], i[1], new d.Vector3(0, 1, 0).add(i[0])), t.plane = l, r = l.projectPoint(h.point, new d.Vector3()), o.setPoints([y, r]), a.setPoints([r, h.point])));
|
|
113
117
|
};
|
|
114
|
-
return t.on("select", C), t.on("intersectionUpdate",
|
|
115
|
-
if (t.off("select", C), t.off("intersectionUpdate",
|
|
118
|
+
return t.on("select", C), t.on("intersectionUpdate", u), t.on("disable", () => {
|
|
119
|
+
if (t.off("select", C), t.off("intersectionUpdate", u), t.plane = null, s.remove(o), s.remove(a), i.length < 2)
|
|
116
120
|
return s.remove(n), b(new Error("Cancelled"));
|
|
117
121
|
w();
|
|
118
122
|
}), {
|
|
119
|
-
finished:
|
|
123
|
+
finished: f,
|
|
120
124
|
canUndo: O,
|
|
121
125
|
canRedo: L,
|
|
122
126
|
undo: W,
|
|
123
|
-
redo:
|
|
127
|
+
redo: _
|
|
124
128
|
};
|
|
125
129
|
}
|
|
126
130
|
export {
|
|
127
|
-
|
|
128
|
-
|
|
131
|
+
Y as Polyline,
|
|
132
|
+
N as createPolyline
|
|
129
133
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseObject, type BaseImportData, type BaseObjectConfig } from '../Base';
|
|
2
2
|
import { PrismMesh, type PrismData, type PrismStyle } from '../../Meshes/Prism';
|
|
3
3
|
import type { PointSelector } from '../../../shared-utils/three/PointSelector';
|
|
4
|
+
import { PrismMeshEditor } from '../../Editors/PrismMeshEditor';
|
|
4
5
|
import type { LiteralString } from '../../../typings/utils.type';
|
|
5
6
|
export interface PrismImportData extends BaseImportData, PrismData {
|
|
6
7
|
type: LiteralString<'Prism'>;
|
|
@@ -9,6 +10,8 @@ export interface PrismImportData extends BaseImportData, PrismData {
|
|
|
9
10
|
export declare class Prism extends BaseObject<PrismImportData> {
|
|
10
11
|
readonly type = "Prism";
|
|
11
12
|
prismMesh: PrismMesh;
|
|
13
|
+
get editor(): PrismMeshEditor;
|
|
14
|
+
_editor: PrismMeshEditor;
|
|
12
15
|
get data(): {
|
|
13
16
|
readonly points: [number, number, number][];
|
|
14
17
|
readonly heightPoint: [number, number, number];
|
|
@@ -1,52 +1,57 @@
|
|
|
1
|
-
var
|
|
1
|
+
var v = Object.defineProperty, L = Object.defineProperties;
|
|
2
2
|
var O = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var u = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var t in
|
|
7
|
-
|
|
4
|
+
var W = Object.prototype.hasOwnProperty, _ = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var d = (s, i, t) => i in s ? v(s, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[i] = t, c = (s, i) => {
|
|
6
|
+
for (var t in i || (i = {}))
|
|
7
|
+
W.call(i, t) && d(s, t, i[t]);
|
|
8
8
|
if (u)
|
|
9
|
-
for (var t of u(
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
}, w = (
|
|
13
|
-
var
|
|
14
|
-
var f = (
|
|
15
|
-
var
|
|
9
|
+
for (var t of u(i))
|
|
10
|
+
_.call(i, t) && d(s, t, i[t]);
|
|
11
|
+
return s;
|
|
12
|
+
}, w = (s, i) => L(s, O(i));
|
|
13
|
+
var p = (s, i, t) => (d(s, typeof i != "symbol" ? i + "" : i, t), t);
|
|
14
|
+
var f = (s, i, t) => new Promise((e, r) => {
|
|
15
|
+
var m = (o) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
17
|
+
n(t.next(o));
|
|
18
18
|
} catch (h) {
|
|
19
|
-
|
|
19
|
+
r(h);
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, l = (o) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
23
|
+
n(t.throw(o));
|
|
24
24
|
} catch (h) {
|
|
25
|
-
|
|
25
|
+
r(h);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, n = (o) => o.done ? e(o.value) : Promise.resolve(o.value).then(m, l);
|
|
28
|
+
n((t = t.apply(s, i)).next());
|
|
29
29
|
});
|
|
30
30
|
import { BaseObject as j } from "../Base/index.js";
|
|
31
31
|
import * as C from "three";
|
|
32
|
-
import { createPolygon as
|
|
32
|
+
import { createPolygon as A } from "../Polygon/index.js";
|
|
33
33
|
import { PrismMesh as x } from "../../Meshes/Prism.js";
|
|
34
|
-
import { LineMesh as
|
|
35
|
-
import {
|
|
36
|
-
import { rayOnLine as
|
|
37
|
-
import { getNormal as
|
|
38
|
-
import { vector3ToArray as
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
34
|
+
import { LineMesh as T } from "../../Meshes/Line.js";
|
|
35
|
+
import { PrismMeshEditor as U } from "../../Editors/PrismMeshEditor.js";
|
|
36
|
+
import { rayOnLine as B } from "../../utils/three/rayOnLine.js";
|
|
37
|
+
import { getNormal as D } from "../../../shared-utils/three/getNormal.js";
|
|
38
|
+
import { vector3ToArray as E } from "../../../shared-utils/three/vector3ToArray.js";
|
|
39
|
+
import { AreaMesh as N } from "../../Meshes/Area.js";
|
|
40
|
+
class X extends j {
|
|
41
|
+
constructor(t, e) {
|
|
42
|
+
super(t, e);
|
|
43
|
+
p(this, "type", "Prism");
|
|
44
|
+
p(this, "prismMesh");
|
|
45
|
+
p(this, "_editor");
|
|
46
|
+
t && (this.prismMesh = new x(c(c({}, t.style), t)), this.add(this.prismMesh));
|
|
47
|
+
}
|
|
48
|
+
get editor() {
|
|
49
|
+
return this._editor || (this._editor = new U(this.prismMesh)), this._editor;
|
|
45
50
|
}
|
|
46
51
|
get data() {
|
|
47
52
|
return w(c({}, this.baseData), {
|
|
48
|
-
points:
|
|
49
|
-
heightPoint:
|
|
53
|
+
points: E(this.applyObjectMatrixWorld(this.prismMesh.bottomPositions, this.prismMesh)),
|
|
54
|
+
heightPoint: E(this.applyObjectMatrixWorld(this.prismMesh.topPosition, this.prismMesh)),
|
|
50
55
|
style: {
|
|
51
56
|
color: this.prismMesh.color.getHex(),
|
|
52
57
|
lineWidth: this.prismMesh.lineWidth,
|
|
@@ -64,38 +69,38 @@ class Q extends j {
|
|
|
64
69
|
}
|
|
65
70
|
create(t) {
|
|
66
71
|
return f(this, null, function* () {
|
|
67
|
-
this.prismMesh = new x(t), this.add(this.prismMesh), yield
|
|
72
|
+
this.prismMesh = new x(t), this.add(this.prismMesh), yield R(this.prismMesh, this.pointSelector), this.config.canEdit && this.editor.enable();
|
|
68
73
|
});
|
|
69
74
|
}
|
|
70
75
|
}
|
|
71
|
-
function
|
|
76
|
+
function R(s, i) {
|
|
72
77
|
return f(this, null, function* () {
|
|
73
|
-
const t =
|
|
74
|
-
yield
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
const
|
|
78
|
-
return
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
},
|
|
78
|
+
const t = s.parent, e = new N(s.style);
|
|
79
|
+
t.add(e), yield A(e, i).finished, t.remove(e), s.setPoints({ points: e.points });
|
|
80
|
+
const r = new T();
|
|
81
|
+
r.name = "LineHelper", t.add(r);
|
|
82
|
+
const m = e.points.at(-1), l = D(e.points), n = m.clone().add(l.clone().multiplyScalar(10)), o = m.clone().sub(l.clone().multiplyScalar(10));
|
|
83
|
+
return r.setPoints([n, o]), i.enable(), new Promise((h, H) => {
|
|
84
|
+
const P = (a) => {
|
|
85
|
+
M(), h();
|
|
86
|
+
}, g = (a) => {
|
|
82
87
|
if (!(a != null && a.raycaster))
|
|
83
88
|
return;
|
|
84
|
-
const
|
|
89
|
+
const b = B({
|
|
85
90
|
raycaster: a.raycaster,
|
|
86
|
-
line: new C.Line3(
|
|
91
|
+
line: new C.Line3(n, o)
|
|
87
92
|
});
|
|
88
|
-
|
|
93
|
+
b && s.setPoints({ heightPoint: b });
|
|
94
|
+
}, M = () => {
|
|
95
|
+
i.off("select", P), i.off("intersectionUpdate", g), i.off("disable", y), t.remove(r), i.disable();
|
|
89
96
|
}, y = () => {
|
|
90
|
-
|
|
91
|
-
}, b = () => {
|
|
92
|
-
y(), t.remove(i), h(new Error("Cancelled"));
|
|
97
|
+
M(), t.remove(s), H(new Error("Cancelled"));
|
|
93
98
|
};
|
|
94
|
-
|
|
99
|
+
i.on("select", P), i.on("intersectionUpdate", g), i.on("disable", y);
|
|
95
100
|
});
|
|
96
101
|
});
|
|
97
102
|
}
|
|
98
103
|
export {
|
|
99
|
-
|
|
100
|
-
|
|
104
|
+
X as Prism,
|
|
105
|
+
R as createPrism
|
|
101
106
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseObject, type BaseImportData, type BaseObjectConfig } from '../Base';
|
|
2
2
|
import type { PointSelector } from '../../../shared-utils/three/PointSelector';
|
|
3
|
-
import
|
|
3
|
+
import { RectangleMeshEditor } from '../../Editors/RectangleMeshEditor';
|
|
4
4
|
import type { RectangleData, RectangleMesh } from '../../Meshes/Rectangle';
|
|
5
5
|
import { RectangleWithEdgeMesh, type RectangleWithEdgeMeshStyle } from '../../Meshes/RectangleWithEdge';
|
|
6
6
|
import type { LiteralString } from '../../../typings/utils.type';
|
|
@@ -12,10 +12,13 @@ export interface RectangleImportData extends BaseImportData, RectangleData {
|
|
|
12
12
|
export declare class Rectangle extends BaseObject<RectangleImportData> {
|
|
13
13
|
readonly type = "Rectangle";
|
|
14
14
|
rectangleMesh: RectangleWithEdgeMesh;
|
|
15
|
+
get editor(): RectangleMeshEditor;
|
|
16
|
+
_editor: RectangleMeshEditor;
|
|
15
17
|
get data(): {
|
|
16
|
-
points: [
|
|
18
|
+
points: [number, number, number][];
|
|
17
19
|
style: {
|
|
18
20
|
color: number;
|
|
21
|
+
opacity: number;
|
|
19
22
|
lineWidth: number;
|
|
20
23
|
lineColor: number;
|
|
21
24
|
};
|
|
@@ -31,3 +34,11 @@ export declare class Rectangle extends BaseObject<RectangleImportData> {
|
|
|
31
34
|
* @description 创建矩形
|
|
32
35
|
*/
|
|
33
36
|
export declare function createRectangle(rectangleMesh: RectangleMesh, pointSelector: PointSelector, config?: Partial<CreateLimitConfig & DrawMethodConfig>): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* @description 对角线创建矩形(两步)
|
|
39
|
+
*/
|
|
40
|
+
export declare function createRectangleByDiagonal(rectangleMesh: RectangleMesh, pointSelector: PointSelector, config?: Partial<CreateLimitConfig>): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* @description 正常创建矩形(三步)
|
|
43
|
+
*/
|
|
44
|
+
export declare function createRectangleByVertex(rectangleMesh: RectangleMesh, pointSelector: PointSelector, config?: Partial<CreateLimitConfig>): Promise<void>;
|
|
@@ -1,121 +1,183 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
var A = (
|
|
15
|
-
var a = (
|
|
1
|
+
var _ = Object.defineProperty, H = Object.defineProperties;
|
|
2
|
+
var I = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var T = Object.getOwnPropertySymbols;
|
|
4
|
+
var j = Object.prototype.hasOwnProperty, k = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var O = (o, n, t) => n in o ? _(o, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[n] = t, P = (o, n) => {
|
|
6
|
+
for (var t in n || (n = {}))
|
|
7
|
+
j.call(n, t) && O(o, t, n[t]);
|
|
8
|
+
if (T)
|
|
9
|
+
for (var t of T(n))
|
|
10
|
+
k.call(n, t) && O(o, t, n[t]);
|
|
11
|
+
return o;
|
|
12
|
+
}, p = (o, n) => H(o, I(n));
|
|
13
|
+
var R = (o, n, t) => (O(o, typeof n != "symbol" ? n + "" : n, t), t);
|
|
14
|
+
var A = (o, n, t) => new Promise((f, m) => {
|
|
15
|
+
var a = (c) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
18
|
-
} catch (
|
|
19
|
-
|
|
17
|
+
h(t.next(c));
|
|
18
|
+
} catch (w) {
|
|
19
|
+
m(w);
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, i = (c) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
24
|
-
} catch (
|
|
25
|
-
|
|
23
|
+
h(t.throw(c));
|
|
24
|
+
} catch (w) {
|
|
25
|
+
m(w);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, h = (c) => c.done ? f(c.value) : Promise.resolve(c.value).then(a, i);
|
|
28
|
+
h((t = t.apply(o, n)).next());
|
|
29
29
|
});
|
|
30
|
-
import { BaseObject as
|
|
31
|
-
import * as
|
|
32
|
-
import { PolylineWithDotsMesh as
|
|
33
|
-
import {
|
|
34
|
-
import { RectangleWithEdgeMesh as
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
import { BaseObject as q } from "../Base/index.js";
|
|
31
|
+
import * as s from "three";
|
|
32
|
+
import { PolylineWithDotsMesh as b } from "../../Meshes/Polyline.js";
|
|
33
|
+
import { RectangleMeshEditor as G } from "../../Editors/RectangleMeshEditor.js";
|
|
34
|
+
import { RectangleWithEdgeMesh as F } from "../../Meshes/RectangleWithEdge.js";
|
|
35
|
+
import { sortPositionsByCameraPosition as W } from "../../utils/sortPositionsByCameraPosition.js";
|
|
36
|
+
import { Sculpt as B } from "../../index.js";
|
|
37
|
+
import { vector3ToArray as J } from "../../../shared-utils/three/vector3ToArray.js";
|
|
38
|
+
class se extends q {
|
|
39
|
+
constructor(t, f) {
|
|
40
|
+
super(t, f);
|
|
41
|
+
R(this, "type", "Rectangle");
|
|
42
|
+
R(this, "rectangleMesh");
|
|
43
|
+
R(this, "_editor");
|
|
44
|
+
t && (this.rectangleMesh = new F(P(P({}, t.style), t)), this.add(this.rectangleMesh));
|
|
45
|
+
}
|
|
46
|
+
get editor() {
|
|
47
|
+
return this._editor || (this._editor = new G(this.rectangleMesh)), this._editor;
|
|
41
48
|
}
|
|
42
49
|
get data() {
|
|
43
|
-
return
|
|
44
|
-
points: this.rectangleMesh.
|
|
50
|
+
return p(P({}, this.baseData), {
|
|
51
|
+
points: J(this.applyObjectMatrixWorld(this.rectangleMesh.points, this.rectangleMesh)),
|
|
45
52
|
style: {
|
|
46
53
|
color: this.rectangleMesh.color.getHex(),
|
|
54
|
+
opacity: this.rectangleMesh.opacity,
|
|
47
55
|
lineWidth: this.rectangleMesh.lineWidth,
|
|
48
56
|
lineColor: this.rectangleMesh.lineColor.getHex()
|
|
49
57
|
}
|
|
50
58
|
});
|
|
51
59
|
}
|
|
52
60
|
highlight() {
|
|
53
|
-
var
|
|
54
|
-
(
|
|
61
|
+
var t;
|
|
62
|
+
(t = this.rectangleMesh) == null || t.highlight();
|
|
55
63
|
}
|
|
56
64
|
unhighlight() {
|
|
57
|
-
var
|
|
58
|
-
(
|
|
65
|
+
var t;
|
|
66
|
+
(t = this.rectangleMesh) == null || t.unhighlight();
|
|
59
67
|
}
|
|
60
|
-
create(
|
|
68
|
+
create(t) {
|
|
61
69
|
return A(this, null, function* () {
|
|
62
70
|
this.removeChildren();
|
|
63
|
-
const
|
|
64
|
-
this.rectangleMesh =
|
|
71
|
+
const f = new F(t);
|
|
72
|
+
this.rectangleMesh = f, this.add(this.rectangleMesh), yield K(this.rectangleMesh, this.pointSelector, t), this.config.canEdit && this.editor.enable();
|
|
65
73
|
});
|
|
66
74
|
}
|
|
67
75
|
}
|
|
68
|
-
function
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
76
|
+
function K(o, n, t) {
|
|
77
|
+
var m;
|
|
78
|
+
return ((m = t == null ? void 0 : t.drawMethod) != null ? m : "diagonal") === "diagonal" ? Q(o, n, t) : X(o, n, t);
|
|
79
|
+
}
|
|
80
|
+
function Q(o, n, t) {
|
|
81
|
+
return new Promise((f, m) => {
|
|
82
|
+
var C;
|
|
83
|
+
const a = o.parent;
|
|
72
84
|
if (!a)
|
|
73
|
-
return
|
|
74
|
-
const
|
|
75
|
-
a.add(
|
|
76
|
-
const
|
|
77
|
-
let
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
},
|
|
81
|
-
var
|
|
85
|
+
return m(new Error("No container"));
|
|
86
|
+
const i = (C = t == null ? void 0 : t.limit) != null ? C : "none", h = new b(p(P({}, o.style), { dashed: !0, lengthEnable: !0 })), c = new b(p(P({}, o.style), { dashed: !0, lengthEnable: !1 })), w = new b(p(P({}, o.style), { dashed: !1, lengthEnable: !1 }));
|
|
87
|
+
a.add(h, w, c), n.enable();
|
|
88
|
+
const e = [];
|
|
89
|
+
let l = new s.Vector3(), v = new s.Vector3();
|
|
90
|
+
const d = new s.Plane(), E = () => {
|
|
91
|
+
e.push(l.clone()), e.length === 1 ? (i === "xoz" && d.setFromNormalAndCoplanarPoint(new s.Vector3(0, 1, 0), e[0]), i === "none" && d.setFromNormalAndCoplanarPoint(v, e[0])) : e.length === 2 ? i === "y" || i === "xoz" ? (y(), f()) : w.setPoints([e[0], e[1]]) : e.length === 3 && (y(), f());
|
|
92
|
+
}, L = (r) => {
|
|
93
|
+
var N;
|
|
82
94
|
if (!(r != null && r.raycaster))
|
|
83
95
|
return;
|
|
84
|
-
const
|
|
85
|
-
if (
|
|
86
|
-
|
|
96
|
+
const M = (N = e.at(-1)) == null ? void 0 : N.clone();
|
|
97
|
+
if (e.length === 0) {
|
|
98
|
+
l = r.point.clone(), v = r.face.normal;
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
if (e.length === 1 && i === "y") {
|
|
102
|
+
const g = new s.Line3(new s.Vector3(0, 1, 0).add(e[0]), new s.Vector3(0, -1, 0).add(e[0])).closestPointToPoint(r.point, !1, new s.Vector3());
|
|
103
|
+
o.setPoints([e[0], g, r.point]);
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
if (e.length === 1 && i === "xoz") {
|
|
107
|
+
const u = new s.Line3(new s.Vector3(1, 0, 0).add(e[0]), new s.Vector3(-1, 0, 0).add(e[0])), g = r.raycaster.ray.intersectPlane(d, new s.Vector3()), V = u.closestPointToPoint(g, !1, new s.Vector3());
|
|
108
|
+
o.setPoints([e[0], V, g]);
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
if (e.length === 1 && i === "none") {
|
|
112
|
+
d ? (l = r.raycaster.ray.intersectPlane(d, new s.Vector3()), c.setPoints([l, r.point])) : l = r.point.clone(), h.setPoints([M, l]);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
if (e.length === 2 && i === "none") {
|
|
116
|
+
a.remove(h);
|
|
117
|
+
const u = r.raycaster.ray.intersectPlane(d, new s.Vector3()), g = e[0].distanceTo(e[1]) / 2, V = new s.Vector3().lerpVectors(e[0], e[1], 0.5), z = new s.Vector3().subVectors(u, V).normalize();
|
|
118
|
+
l = new s.Vector3().addVectors(V, z.multiplyScalar(g));
|
|
119
|
+
const D = [e[0], l, e[1]], U = W(D, B.modules.five.camera.position);
|
|
120
|
+
o.setPoints(U);
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
}, y = () => {
|
|
124
|
+
n.off("select", E), n.off("intersectionUpdate", L), n.off("disable", x), n.disable(), a == null || a.remove(h, w, c);
|
|
125
|
+
}, x = () => {
|
|
126
|
+
y(), a == null || a.remove(o), m(new Error("Cancelled"));
|
|
127
|
+
};
|
|
128
|
+
n.on("select", E), n.on("intersectionUpdate", L), n.on("disable", x);
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
function X(o, n, t) {
|
|
132
|
+
return new Promise((f, m) => {
|
|
133
|
+
var C;
|
|
134
|
+
const a = o.parent;
|
|
135
|
+
if (!a)
|
|
136
|
+
return m(new Error("No container"));
|
|
137
|
+
const i = (C = t == null ? void 0 : t.limit) != null ? C : "none", h = new b(p(P({}, o.style), { dashed: !0, lengthEnable: !0 })), c = new b(p(P({}, o.style), { dashed: !0, lengthEnable: !1 })), w = new b(p(P({}, o.style), { dashed: !1, lengthEnable: !1 }));
|
|
138
|
+
a.add(h, w, c), n.enable();
|
|
139
|
+
const e = [];
|
|
140
|
+
let l = new s.Vector3(), v = new s.Vector3();
|
|
141
|
+
const d = new s.Plane(), E = () => {
|
|
142
|
+
e.push(l.clone()), e.length === 1 ? (i === "xoz" && d.setFromNormalAndCoplanarPoint(new s.Vector3(0, 1, 0), e[0]), i === "none" && d.setFromNormalAndCoplanarPoint(v, e[0])) : e.length === 2 ? (i === "y" && d.setFromCoplanarPoints(e[0], e[1], new s.Vector3(0, 1, 0).add(e[0])), w.setPoints([e[0], e[1]])) : e.length === 3 && (y(), f());
|
|
143
|
+
}, L = (r) => {
|
|
144
|
+
var N;
|
|
145
|
+
if (!(r != null && r.raycaster))
|
|
146
|
+
return;
|
|
147
|
+
const M = (N = e.at(-1)) == null ? void 0 : N.clone();
|
|
148
|
+
if (e.length === 0) {
|
|
149
|
+
l = r.point.clone(), v = r.face.normal;
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
if (e.length === 1 && i === "y") {
|
|
153
|
+
l = r.point, c.setPoints([]), h.setPoints([M, l]);
|
|
87
154
|
return;
|
|
88
155
|
}
|
|
89
|
-
if (
|
|
90
|
-
|
|
91
|
-
s.setPoints([n[0], f, r.point]);
|
|
156
|
+
if (e.length === 1 && i === "xoz") {
|
|
157
|
+
l = r.raycaster.ray.intersectPlane(d, new s.Vector3()), c.setPoints([l, r.point]), h.setPoints([M, l]);
|
|
92
158
|
return;
|
|
93
159
|
}
|
|
94
|
-
if (
|
|
95
|
-
|
|
160
|
+
if (e.length === 1 && i === "none") {
|
|
161
|
+
l = r.raycaster.ray.intersectPlane(d, new s.Vector3()), c.setPoints([l, r.point]), h.setPoints([M, l]);
|
|
96
162
|
return;
|
|
97
163
|
}
|
|
98
|
-
if (
|
|
99
|
-
a.remove(
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
} else if (g === "vertex") {
|
|
105
|
-
const f = new o.Vector3().crossVectors(n[0].clone().sub(n[1]), m.normal).normalize();
|
|
106
|
-
i = new o.Line3(n[1].clone().add(f), n[1].clone().sub(f)).closestPointToPoint(r.point, !1, new o.Vector3()), s.setPoints([n[0], n[1], i]);
|
|
107
|
-
}
|
|
164
|
+
if (e.length === 2) {
|
|
165
|
+
a.remove(h);
|
|
166
|
+
const u = new s.Vector3().crossVectors(e[0].clone().sub(e[1]), d.normal).normalize();
|
|
167
|
+
l = new s.Line3(e[1].clone().add(u), e[1].clone().sub(u)).closestPointToPoint(r.point, !1, new s.Vector3());
|
|
168
|
+
const V = [e[0], e[1], l], z = W(V, B.modules.five.camera.position);
|
|
169
|
+
o.setPoints(z);
|
|
108
170
|
return;
|
|
109
171
|
}
|
|
110
172
|
}, y = () => {
|
|
111
|
-
|
|
112
|
-
},
|
|
113
|
-
y(), a == null || a.remove(
|
|
173
|
+
n.off("select", E), n.off("intersectionUpdate", L), n.off("disable", x), n.disable(), a == null || a.remove(h, w, c);
|
|
174
|
+
}, x = () => {
|
|
175
|
+
y(), a == null || a.remove(o), m(new Error("Cancelled"));
|
|
114
176
|
};
|
|
115
|
-
|
|
177
|
+
n.on("select", E), n.on("intersectionUpdate", L), n.on("disable", x);
|
|
116
178
|
});
|
|
117
179
|
}
|
|
118
180
|
export {
|
|
119
|
-
|
|
120
|
-
|
|
181
|
+
se as Rectangle,
|
|
182
|
+
K as createRectangle
|
|
121
183
|
};
|