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