@realsee/dnalogel 3.44.5 → 3.46.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 +6 -0
- package/dist/Sculpt/Meshes/Area.d.ts +1 -1
- package/dist/Sculpt/Meshes/Box.d.ts +1 -1
- package/dist/Sculpt/Meshes/Circle.d.ts +1 -1
- package/dist/Sculpt/Meshes/CircleWithEdge.d.ts +1 -1
- package/dist/Sculpt/Meshes/Line.d.ts +8 -2
- package/dist/Sculpt/Meshes/LineWithDots.d.ts +1 -1
- package/dist/Sculpt/Meshes/Point.d.ts +1 -1
- package/dist/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
- package/dist/Sculpt/Meshes/Prism.d.ts +1 -1
- package/dist/Sculpt/Meshes/RectangleWithEdge.d.ts +3 -4
- package/dist/Sculpt/Objects/Line/Editor.d.ts +22 -0
- package/dist/Sculpt/Objects/Line/index.d.ts +33 -0
- package/dist/Sculpt/Objects/Point/index.d.ts +1 -1
- package/dist/Sculpt/Objects/Polygon/Editor.d.ts +2 -2
- package/dist/Sculpt/Objects/Polygon/index.d.ts +3 -2
- package/dist/Sculpt/Objects/Polyline/Editor.d.ts +3 -17
- package/dist/Sculpt/Objects/Polyline/index.d.ts +7 -6
- package/dist/Sculpt/index.d.ts +5 -0
- package/dist/Sculpt/typings/index.d.ts +11 -6
- package/dist/Sculpt/{utils/color.d.ts → typings/style.d.ts} +7 -0
- package/dist/Sculpt/typings/utils.type.d.ts +2 -0
- package/dist/Sculpt/utils/three/ColoredMesh.d.ts +1 -1
- package/dist/Sculpt/utils/three/rayOnLine.d.ts +3 -5
- package/dist/index.cjs.js +56 -56
- package/dist/index.js +29820 -29686
- package/dist/index.umd.js +49 -49
- package/dist/shared-utils/Utils/WorkUtil.d.ts +6 -6
- package/dist/shared-utils/tag.d.ts +6 -3
- package/libs/AreaMakerPlugin/Controller.js +150 -78
- package/libs/AreaMakerPlugin/index.js +76 -4
- package/libs/AreaMakerPlugin/utils/Item.js +190 -111
- package/libs/CSS3DRenderPlugin/Controller.js +89 -29
- package/libs/CSS3DRenderPlugin/index.js +75 -15
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +132 -58
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +181 -116
- package/libs/CruisePlugin/BaseController.js +121 -49
- package/libs/CruisePlugin/Move.js +73 -21
- package/libs/CruisePlugin/Work.js +98 -46
- package/libs/CruisePlugin/index.js +79 -27
- package/libs/CurrentPanoImagePlugin/Controller.js +176 -104
- package/libs/CurrentPanoImagePlugin/index.js +76 -4
- package/libs/GuideLinePlugin/Controller.js +82 -30
- package/libs/GuideLinePlugin/GuideLineItem.js +82 -30
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +3 -2
- package/libs/GuideLinePlugin/GuideLineModeItem.js +81 -29
- package/libs/GuideLinePlugin/index.js +79 -27
- package/libs/ModelMakerPlugin/Controller.js +140 -83
- package/libs/ModelMakerPlugin/index.js +75 -18
- package/libs/ModelTVVideoPlugin/Plugin.js +117 -57
- package/libs/ModelTVVideoPlugin/index.js +68 -8
- package/libs/Object3DHelperPlugin/Controller.js +54 -31
- package/libs/Object3DHelperPlugin/index.js +35 -13
- package/libs/PanoCompassPlugin/Controller.js +97 -42
- package/libs/PanoCompassPlugin/index.js +71 -16
- package/libs/PanoDoorLabelPlugin/BaseController.js +98 -26
- package/libs/PanoDoorLabelPlugin/Controller.js +187 -115
- package/libs/PanoDoorLabelPlugin/index.js +76 -4
- package/libs/PanoMeasurePlugin/Components/Controller0.js +141 -89
- package/libs/PanoMeasurePlugin/Components/Controller1.js +179 -127
- package/libs/PanoMeasurePlugin/Controller/EditController.js +125 -73
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +167 -92
- package/libs/PanoMeasurePlugin/Controller/index.js +110 -65
- package/libs/PanoMeasurePlugin/Model/area.js +114 -38
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +78 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +98 -46
- package/libs/PanoMeasurePlugin/index.js +77 -32
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +98 -20
- package/libs/PanoSpatialTagPlugin/Plugin.js +210 -150
- package/libs/PanoSpatialTagPlugin/index.js +66 -6
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +133 -53
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +295 -216
- package/libs/PanoTagPlugin/Components/Tag/index.js +257 -187
- package/libs/PanoTagPlugin/Components/TagContainer.js +157 -87
- package/libs/PanoTagPlugin/Components/TagItem.js +144 -74
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +73 -3
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +109 -39
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +105 -35
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +113 -43
- package/libs/PanoTagPlugin/controller/TagRender.js +132 -80
- package/libs/PanoTagPlugin/controller/TagUtil.js +136 -84
- package/libs/PanoTagPlugin/controller/index.js +113 -61
- package/libs/PanoTagPlugin/index.js +89 -37
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +121 -41
- package/libs/PanoVideoPlugin/Controller.js +137 -65
- package/libs/PanoVideoPlugin/VideoMeshController.js +149 -69
- package/libs/PanoVideoPlugin/index.js +82 -10
- package/libs/PipelinePlugin/Controller.js +199 -128
- package/libs/PipelinePlugin/index.js +76 -5
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +102 -22
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +95 -15
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +136 -56
- package/libs/Sculpt/Meshes/Area.d.ts +1 -1
- package/libs/Sculpt/Meshes/Box.d.ts +1 -1
- package/libs/Sculpt/Meshes/Box.js +16 -15
- package/libs/Sculpt/Meshes/Circle.d.ts +1 -1
- package/libs/Sculpt/Meshes/Circle.js +1 -1
- package/libs/Sculpt/Meshes/CircleWithEdge.d.ts +1 -1
- package/libs/Sculpt/Meshes/Cylinder.js +8 -7
- package/libs/Sculpt/Meshes/Line.d.ts +8 -2
- package/libs/Sculpt/Meshes/Line.js +93 -65
- package/libs/Sculpt/Meshes/LineWithDots.d.ts +1 -1
- package/libs/Sculpt/Meshes/LineWithDots.js +26 -26
- package/libs/Sculpt/Meshes/Point.d.ts +1 -1
- package/libs/Sculpt/Meshes/Point.js +7 -6
- package/libs/Sculpt/Meshes/Polygon.js +1 -1
- package/libs/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
- package/libs/Sculpt/Meshes/Polyline.js +5 -4
- package/libs/Sculpt/Meshes/Prism.d.ts +1 -1
- package/libs/Sculpt/Meshes/Rectangle.js +3 -2
- package/libs/Sculpt/Meshes/RectangleWithEdge.d.ts +3 -4
- package/libs/Sculpt/Objects/Box/index.js +41 -43
- package/libs/Sculpt/Objects/Cylinder/index.js +35 -37
- package/libs/Sculpt/Objects/Line/Editor.d.ts +22 -0
- package/libs/Sculpt/Objects/Line/Editor.js +62 -0
- package/libs/Sculpt/Objects/Line/index.d.ts +33 -0
- package/libs/Sculpt/Objects/Line/index.js +107 -0
- package/libs/Sculpt/Objects/Point/index.d.ts +1 -1
- package/libs/Sculpt/Objects/Polygon/Editor.d.ts +2 -2
- package/libs/Sculpt/Objects/Polygon/Editor.js +5 -5
- package/libs/Sculpt/Objects/Polygon/index.d.ts +3 -2
- package/libs/Sculpt/Objects/Polygon/index.js +80 -80
- package/libs/Sculpt/Objects/Polyline/Editor.d.ts +3 -17
- package/libs/Sculpt/Objects/Polyline/Editor.js +10 -48
- package/libs/Sculpt/Objects/Polyline/index.d.ts +7 -6
- package/libs/Sculpt/Objects/Polyline/index.js +63 -58
- package/libs/Sculpt/Objects/Prism/index.js +56 -58
- package/libs/Sculpt/index.d.ts +5 -0
- package/libs/Sculpt/index.js +58 -48
- package/libs/Sculpt/typings/index.d.ts +11 -6
- package/libs/Sculpt/{utils/color.d.ts → typings/style.d.ts} +7 -0
- package/libs/Sculpt/typings/utils.type.d.ts +2 -0
- package/libs/Sculpt/utils/three/ColoredMesh.d.ts +1 -1
- package/libs/Sculpt/utils/three/ColoredMesh.js +15 -14
- package/libs/Sculpt/utils/three/rayOnLine.d.ts +3 -5
- package/libs/Sculpt/utils/three/rayOnLine.js +15 -14
- package/libs/base/BasePlugin.js +14 -13
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +131 -61
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +75 -6
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +129 -59
- package/libs/floorplan/ModelFloorplanPlugin/index.js +75 -5
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +158 -86
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +76 -4
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +151 -81
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +75 -5
- package/libs/floorplan/index.js +1 -0
- package/libs/index.js +194 -192
- package/libs/shared-utils/Object3DHelper/Controller/MoveController.js +1 -1
- package/libs/shared-utils/Object3DHelper/Controller/ScaleController.js +23 -23
- package/libs/shared-utils/Utils/WorkUtil.d.ts +6 -6
- package/libs/shared-utils/Utils/WorkUtil.js +8 -7
- package/libs/shared-utils/five/index.js +3 -2
- package/libs/shared-utils/five/lookObject.js +3 -2
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/tag.d.ts +6 -3
- package/libs/shared-utils/tag.js +38 -24
- package/libs/shared-utils/three/PointSelector/utils/PointSelectorHelper.js +15 -15
- package/libs/shared-utils/three/index.js +1 -0
- package/package.json +1 -1
- package/dist/Sculpt/typings/SimplifyDeep.d.ts +0 -3
- package/libs/Sculpt/typings/SimplifyDeep.d.ts +0 -3
- /package/libs/Sculpt/{utils/color.js → typings/style.js} +0 -0
|
@@ -6,30 +6,30 @@ export declare class WorkUtil extends BaseUtil {
|
|
|
6
6
|
private _workCode;
|
|
7
7
|
get fromType(): WorkFromType;
|
|
8
8
|
/**
|
|
9
|
-
* @description
|
|
9
|
+
* @description 设置插件当前的 workCode
|
|
10
10
|
*/
|
|
11
11
|
set workCode(workCode: string);
|
|
12
12
|
/**
|
|
13
|
-
* @description
|
|
13
|
+
* @description 获取插件当前的 workCode
|
|
14
14
|
*/
|
|
15
15
|
get workCode(): string;
|
|
16
16
|
/**
|
|
17
|
-
* @description
|
|
17
|
+
* @description 获取当前的 work
|
|
18
18
|
*/
|
|
19
19
|
get work(): import("@realsee/five").Work;
|
|
20
20
|
get observers(): import("@realsee/five").WorkObserver[];
|
|
21
21
|
get transform(): THREE.Matrix4;
|
|
22
22
|
constructor(five: Five);
|
|
23
23
|
/**
|
|
24
|
-
* @description
|
|
24
|
+
* @description 获取全景点坐标
|
|
25
25
|
*/
|
|
26
26
|
getObserverPosition(observerIndex: number): THREE.Vector3 | undefined;
|
|
27
27
|
/**
|
|
28
|
-
* @description
|
|
28
|
+
* @description 获取全景点位和模型的地面坐标
|
|
29
29
|
*/
|
|
30
30
|
getObserverStandingPosition(observerIndex: number): THREE.Vector3 | undefined;
|
|
31
31
|
/**
|
|
32
|
-
* @description
|
|
32
|
+
* @description 获取observer
|
|
33
33
|
*/
|
|
34
34
|
getObserver(observerIndex: number): import("@realsee/five").WorkObserver;
|
|
35
35
|
}
|
|
@@ -6,12 +6,13 @@ export declare class LightTag {
|
|
|
6
6
|
visible: boolean;
|
|
7
7
|
enabled: boolean;
|
|
8
8
|
wrapper: HTMLElement;
|
|
9
|
+
private tagWrapper;
|
|
9
10
|
private five;
|
|
10
|
-
private originPosition
|
|
11
|
-
private transformedPosition
|
|
11
|
+
private originPosition?;
|
|
12
|
+
private transformedPosition?;
|
|
12
13
|
private disposer;
|
|
13
14
|
private config;
|
|
14
|
-
constructor(five: Five, position
|
|
15
|
+
constructor(five: Five, position?: AnyPosition, config?: {
|
|
15
16
|
wrapper?: HTMLElement;
|
|
16
17
|
});
|
|
17
18
|
show(): void;
|
|
@@ -20,7 +21,9 @@ export declare class LightTag {
|
|
|
20
21
|
}): void;
|
|
21
22
|
enable(): void;
|
|
22
23
|
disable(): void;
|
|
24
|
+
destroy(): void;
|
|
23
25
|
setTransformMatrix(matrix: THREE.Matrix4): void;
|
|
26
|
+
setPosition(position: THREE.Vector3): void;
|
|
24
27
|
updateScreenPosition(): void;
|
|
25
28
|
private onCameraUpdate;
|
|
26
29
|
private onFiveEveryReady;
|
|
@@ -2,36 +2,37 @@ var M = Object.defineProperty, C = Object.defineProperties;
|
|
|
2
2
|
var S = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var f = Object.getOwnPropertySymbols;
|
|
4
4
|
var A = Object.prototype.hasOwnProperty, _ = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
6
|
-
for (var t in
|
|
7
|
-
A.call(
|
|
5
|
+
var l = (h, n, t) => n in h ? M(h, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[n] = t, m = (h, n) => {
|
|
6
|
+
for (var t in n || (n = {}))
|
|
7
|
+
A.call(n, t) && l(h, t, n[t]);
|
|
8
8
|
if (f)
|
|
9
|
-
for (var t of f(
|
|
10
|
-
_.call(
|
|
9
|
+
for (var t of f(n))
|
|
10
|
+
_.call(n, t) && l(h, t, n[t]);
|
|
11
11
|
return h;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
12
|
+
}, u = (h, n) => C(h, S(n));
|
|
13
|
+
var a = (h, n, t) => (l(h, typeof n != "symbol" ? n + "" : n, t), t);
|
|
14
|
+
var c = (h, n, t) => new Promise((i, e) => {
|
|
15
|
+
var o = (s) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
18
|
-
} catch (
|
|
19
|
-
e(
|
|
17
|
+
d(t.next(s));
|
|
18
|
+
} catch (p) {
|
|
19
|
+
e(p);
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, r = (s) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
24
|
-
} catch (
|
|
25
|
-
e(
|
|
23
|
+
d(t.throw(s));
|
|
24
|
+
} catch (p) {
|
|
25
|
+
e(p);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, d = (s) => s.done ? i(s.value) : Promise.resolve(s.value).then(o, r);
|
|
28
|
+
d((t = t.apply(h, n)).next());
|
|
29
29
|
});
|
|
30
30
|
import * as g from "three";
|
|
31
31
|
import { Controller as k } from "../base/BasePluginWithData.js";
|
|
32
32
|
import "hammerjs";
|
|
33
33
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
34
34
|
import "@realsee/five/line";
|
|
35
|
+
import "../Sculpt/utils/Modules/Global.js";
|
|
35
36
|
import "../shared-utils/three/THREESphere.js";
|
|
36
37
|
import "animejs";
|
|
37
38
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
@@ -45,6 +46,77 @@ import "../shared-utils/Utils/WorkUtil.js";
|
|
|
45
46
|
import "../shared-utils/five/transformPosition.js";
|
|
46
47
|
import "../shared-utils/five/getFiveModel.js";
|
|
47
48
|
import "../shared-utils/url/absoluteUrl.js";
|
|
49
|
+
import "../Sculpt/utils/Modules/Cursor.js";
|
|
50
|
+
import "../Object3DHelperPlugin/Controller.js";
|
|
51
|
+
import "../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
52
|
+
import "../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
53
|
+
import "../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
54
|
+
import "../shared-utils/three/IObject3D.js";
|
|
55
|
+
import "../shared-utils/three/boundingBox.js";
|
|
56
|
+
import "../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
57
|
+
import "../shared-utils/Object3DHelper/utils/direction.js";
|
|
58
|
+
import "../shared-utils/Object3DHelper/Constants/color.js";
|
|
59
|
+
import "../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
60
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
61
|
+
import "../shared-utils/positionToVector3.js";
|
|
62
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
63
|
+
import "../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
|
|
64
|
+
import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
65
|
+
import "../CSS3DRenderPlugin/utils/even.js";
|
|
66
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
67
|
+
import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
68
|
+
import "../shared-utils/three/centerPoint.js";
|
|
69
|
+
import "../shared-utils/three/getObjectVisible.js";
|
|
70
|
+
import "../shared-utils/isNil.js";
|
|
71
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
72
|
+
import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
73
|
+
import "../shared-utils/util.js";
|
|
74
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
75
|
+
import "../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
76
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
77
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
78
|
+
import "../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
79
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
80
|
+
import "../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
81
|
+
import "../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
82
|
+
import "../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
83
|
+
import "../shared-utils/threex/domevents/index.js";
|
|
84
|
+
import "../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
85
|
+
import "../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
86
|
+
import "../Sculpt/utils/three/rayOnLine.js";
|
|
87
|
+
import "../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
88
|
+
import "../shared-utils/Object3DHelper/index.js";
|
|
89
|
+
import "../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
90
|
+
import "../shared-utils/math/rad2Deg.js";
|
|
91
|
+
import "../shared-utils/math/deg2Rad.js";
|
|
92
|
+
import "../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
93
|
+
import "../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
94
|
+
import "../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
95
|
+
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
96
|
+
import "../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
97
|
+
import "../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
98
|
+
import "../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
99
|
+
import "../shared-utils/five/fiveModelLoad.js";
|
|
100
|
+
import "../shared-utils/five/FiveDomEvents.js";
|
|
101
|
+
import "../shared-utils/five/calculateThreeMouse.js";
|
|
102
|
+
import "../shared-utils/three/THREERaycaster.js";
|
|
103
|
+
import "../shared-utils/three/PointSelector/index.js";
|
|
104
|
+
import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
105
|
+
import "../shared-utils/three/Magnifier.js";
|
|
106
|
+
import "../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
107
|
+
import "../shared-utils/three/Assets/index.js";
|
|
108
|
+
import "../shared-utils/three/PointSelector/utils/html.js";
|
|
109
|
+
import "../shared-utils/five/initialCSS3DRender.js";
|
|
110
|
+
import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
111
|
+
import "../Sculpt/Meshes/Line.js";
|
|
112
|
+
import "../Sculpt/typings/style.js";
|
|
113
|
+
import "../shared-utils/five/FiveLine.js";
|
|
114
|
+
import "../shared-utils/tag.js";
|
|
115
|
+
import "../shared-utils/five/vector3ToScreen.js";
|
|
116
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
117
|
+
import "../shared-utils/isTouchDevice.js";
|
|
118
|
+
import "../shared-utils/five/getPosition.js";
|
|
119
|
+
import "../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
48
120
|
import "../shared-utils/isTruelyObject.js";
|
|
49
121
|
import "../shared-utils/three/core/Object3D.js";
|
|
50
122
|
import "../shared-utils/three/objects/LineSegments.js";
|
|
@@ -55,7 +127,7 @@ import "../vendor/svelte/internal/index.js";
|
|
|
55
127
|
import "../components/AreaLabel/Assets/roomLabelBg.js";
|
|
56
128
|
import "../shared-utils/math/planimetry.js";
|
|
57
129
|
import "../shared-utils/dom/resizeObserver.js";
|
|
58
|
-
class
|
|
130
|
+
class Me extends k {
|
|
59
131
|
/** AreaMakerPlugin
|
|
60
132
|
* @param `five` `<Five>` Five 实例
|
|
61
133
|
* @param `params` `<PluginType.Params> | <undefined>` 插件初始化参数
|
|
@@ -65,68 +137,68 @@ class et extends k {
|
|
|
65
137
|
super(t);
|
|
66
138
|
// ==================== public properties ====================
|
|
67
139
|
/** 插件当前状态 */
|
|
68
|
-
|
|
140
|
+
a(this, "state");
|
|
69
141
|
/** 标注模型 { id: item } 的映射表 */
|
|
70
|
-
|
|
142
|
+
a(this, "itemMap");
|
|
71
143
|
/** 自定义 DOM */
|
|
72
|
-
|
|
144
|
+
a(this, "itemRenderer");
|
|
73
145
|
/** 标注模型容器 */
|
|
74
|
-
|
|
146
|
+
a(this, "modelGroup");
|
|
75
147
|
/** 当前使用的数据 */
|
|
76
|
-
|
|
148
|
+
a(this, "data");
|
|
77
149
|
/** tag 容器 */
|
|
78
|
-
|
|
150
|
+
a(this, "tagDomContainer");
|
|
79
151
|
/** 查询问题使用的调试对象 */
|
|
80
|
-
|
|
152
|
+
a(this, "checkMsg", {
|
|
81
153
|
childrenMountedState: ""
|
|
82
154
|
});
|
|
83
155
|
// ==================== private properties ====================
|
|
84
156
|
/** 是否在 Five Change Mode 动画中 */
|
|
85
|
-
|
|
157
|
+
a(this, "isInFiveChangeModeAnime", !1);
|
|
86
158
|
/** 子组件是否挂载 */
|
|
87
|
-
|
|
159
|
+
a(this, "childrenMountedState", !1);
|
|
88
160
|
/** config 的原始值 */
|
|
89
|
-
|
|
161
|
+
a(this, "_config");
|
|
90
162
|
/** disposed 的原始值 */
|
|
91
|
-
|
|
163
|
+
a(this, "_disposed", !1);
|
|
92
164
|
/** 销毁插件,移除所有副作用,销毁后将不响应任何 API */
|
|
93
|
-
|
|
165
|
+
a(this, "dispose", () => {
|
|
94
166
|
this.five.scene.remove(this.modelGroup);
|
|
95
167
|
});
|
|
96
|
-
|
|
168
|
+
a(this, "onFiveInitAnimationWillStart", () => {
|
|
97
169
|
this.isInFiveChangeModeAnime = !0, this.updateChildrenMountedState();
|
|
98
170
|
});
|
|
99
|
-
|
|
171
|
+
a(this, "onFiveInitAnimationEnded", () => {
|
|
100
172
|
this.isInFiveChangeModeAnime = !1, this.updateChildrenMountedState();
|
|
101
173
|
});
|
|
102
|
-
|
|
174
|
+
a(this, "onFiveCameraUpdate", () => {
|
|
103
175
|
const t = this.five.camera;
|
|
104
|
-
[...this.itemMap.values()].sort((e,
|
|
105
|
-
const
|
|
106
|
-
return
|
|
107
|
-
}).forEach((e,
|
|
108
|
-
var
|
|
109
|
-
(
|
|
176
|
+
[...this.itemMap.values()].sort((e, o) => {
|
|
177
|
+
const r = e.tagPosition.distanceTo(t.position);
|
|
178
|
+
return o.tagPosition.distanceTo(t.position) - r;
|
|
179
|
+
}).forEach((e, o) => {
|
|
180
|
+
var r;
|
|
181
|
+
(r = this.getMaskItemByID(e.id)) == null || r.setTagZIndex(o * 10);
|
|
110
182
|
});
|
|
111
183
|
});
|
|
112
|
-
|
|
184
|
+
a(this, "onFiveModeChange", () => {
|
|
113
185
|
this.updateChildrenMountedState();
|
|
114
186
|
});
|
|
115
|
-
|
|
187
|
+
a(this, "onMakerTagClick", (t) => {
|
|
116
188
|
this.hooks.emit("wantsTap", { target: t.target, intersectObjects: [] });
|
|
117
189
|
});
|
|
118
|
-
|
|
119
|
-
const i = Array.from(this.itemMap.values()).filter((
|
|
120
|
-
makerItem:
|
|
121
|
-
intersects:
|
|
122
|
-
})).filter(({ intersects:
|
|
190
|
+
a(this, "onWantsFiveTapGesture", (t) => {
|
|
191
|
+
const i = Array.from(this.itemMap.values()).filter((s) => s.mounted && s.visible).map((s) => ({
|
|
192
|
+
makerItem: s,
|
|
193
|
+
intersects: s.modelGroup.getRaycastIntersects(t)
|
|
194
|
+
})).filter(({ intersects: s }) => s.length > 0);
|
|
123
195
|
if (i.length === 0)
|
|
124
196
|
return;
|
|
125
|
-
const e = i.reduce((
|
|
126
|
-
const v =
|
|
127
|
-
return v < b ?
|
|
128
|
-
}),
|
|
129
|
-
if (this.config.modelDepthTest &&
|
|
197
|
+
const e = i.reduce((s, p) => {
|
|
198
|
+
const v = s.intersects[0].distance, b = p.intersects[0].distance;
|
|
199
|
+
return v < b ? s : p;
|
|
200
|
+
}), o = this.fiveUtil.model.intersectRaycaster(t)[0];
|
|
201
|
+
if (this.config.modelDepthTest && o && o.distance < e.intersects[0].distance)
|
|
130
202
|
return;
|
|
131
203
|
if (this.hooks.emit("wantsTap", {
|
|
132
204
|
target: e.makerItem,
|
|
@@ -140,14 +212,14 @@ class et extends k {
|
|
|
140
212
|
visible: !0
|
|
141
213
|
};
|
|
142
214
|
this.state = Object.assign(e, i == null ? void 0 : i.initialState);
|
|
143
|
-
const
|
|
215
|
+
const o = m({
|
|
144
216
|
modelDepthTest: !0
|
|
145
217
|
}, i == null ? void 0 : i.config);
|
|
146
|
-
this._config =
|
|
218
|
+
this._config = o, this.modelGroup = new g.Group(), this.modelGroup.name = "ModelMakerPluginGroup", this.itemMap = /* @__PURE__ */ new Map(), this.state.enabled && this._enable({ userAction: !1 });
|
|
147
219
|
}
|
|
148
220
|
/** 插件配置项 */
|
|
149
221
|
get config() {
|
|
150
|
-
return
|
|
222
|
+
return m({}, this._config);
|
|
151
223
|
}
|
|
152
224
|
/** 是否已经被销毁 */
|
|
153
225
|
get disposed() {
|
|
@@ -155,11 +227,11 @@ class et extends k {
|
|
|
155
227
|
}
|
|
156
228
|
/** 加载数据,重复调用会使用新数据覆盖旧数据 */
|
|
157
229
|
load(t) {
|
|
158
|
-
return
|
|
230
|
+
return c(this, null, function* () {
|
|
159
231
|
const i = this.data;
|
|
160
232
|
this.data = this.formatData(t), this.hooks.emit("dataChange", this.data, i), this.modelGroup.remove(...this.modelGroup.children), this.itemMap.forEach((e) => e.unmount()), this.itemMap.clear(), this.childrenMountedState = !1, this.checkMsg.childrenMountedState = "", this.data.list.forEach((e) => {
|
|
161
|
-
const
|
|
162
|
-
|
|
233
|
+
const o = new D(this, e);
|
|
234
|
+
o.itemRenderer = this.itemRenderer, this.modelGroup.add(o.modelGroup), this.itemMap.set(e.id, o), o.hooks.on("tagClick", this.onMakerTagClick);
|
|
163
235
|
}), this.updateChildrenMountedState();
|
|
164
236
|
});
|
|
165
237
|
}
|
|
@@ -194,12 +266,12 @@ class et extends k {
|
|
|
194
266
|
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
195
267
|
*/
|
|
196
268
|
show(t) {
|
|
197
|
-
return
|
|
269
|
+
return c(this, null, function* () {
|
|
198
270
|
if (this.state.visible)
|
|
199
271
|
return Promise.resolve();
|
|
200
272
|
if (this.disposed)
|
|
201
273
|
return Promise.reject(new Error("不能在已销毁的插件上调用 show"));
|
|
202
|
-
const i =
|
|
274
|
+
const i = m({ userAction: !0 }, t);
|
|
203
275
|
this.updateState({ visible: !0 }, i.userAction), yield this._show(i);
|
|
204
276
|
});
|
|
205
277
|
}
|
|
@@ -208,10 +280,10 @@ class et extends k {
|
|
|
208
280
|
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
209
281
|
*/
|
|
210
282
|
hide(t) {
|
|
211
|
-
return
|
|
283
|
+
return c(this, null, function* () {
|
|
212
284
|
if (this.state.visible === !1)
|
|
213
285
|
return;
|
|
214
|
-
const i =
|
|
286
|
+
const i = m({ userAction: !0 }, t);
|
|
215
287
|
this.updateState({ visible: !1 }, i.userAction), yield this._hide(i);
|
|
216
288
|
});
|
|
217
289
|
}
|
|
@@ -258,10 +330,10 @@ class et extends k {
|
|
|
258
330
|
const e = this.state;
|
|
259
331
|
if (I(t, e, { deep: !0 }))
|
|
260
332
|
return;
|
|
261
|
-
const
|
|
262
|
-
if (this.updateState(t,
|
|
263
|
-
const
|
|
264
|
-
t.visible ? this._show(
|
|
333
|
+
const o = i.userAction !== void 0 ? i.userAction : !0;
|
|
334
|
+
if (this.updateState(t, o), t.enabled !== void 0 && e.enabled !== t.enabled && (t.enabled ? this._enable({ userAction: o }) : this._disable({ userAction: o })), t.visible !== void 0 && e.visible !== t.visible) {
|
|
335
|
+
const r = { userAction: o, anime: { duration: 500 } };
|
|
336
|
+
t.visible ? this._show(r) : this._hide(r);
|
|
265
337
|
}
|
|
266
338
|
}
|
|
267
339
|
/** 更改插件 Config
|
|
@@ -269,9 +341,9 @@ class et extends k {
|
|
|
269
341
|
* @param `options` `<Option> | <undefined>`
|
|
270
342
|
*/
|
|
271
343
|
updateConfig(t, i = {}) {
|
|
272
|
-
var
|
|
273
|
-
const e = this.config,
|
|
274
|
-
this._config =
|
|
344
|
+
var r;
|
|
345
|
+
const e = this.config, o = m(m({}, e), t);
|
|
346
|
+
this._config = o, this.hooks.emit("configChange", { prevConfig: e, config: o, userAction: (r = i.userAction) != null ? r : !0 });
|
|
275
347
|
}
|
|
276
348
|
/** 根据 ID 获取标注 */
|
|
277
349
|
getMaskItemByID(t) {
|
|
@@ -283,12 +355,12 @@ class et extends k {
|
|
|
283
355
|
}
|
|
284
356
|
return i(t) ? {
|
|
285
357
|
list: t.list.filter((e) => e.object_data.points.length >= 3).map((e) => {
|
|
286
|
-
const
|
|
287
|
-
return
|
|
358
|
+
const o = new g.Shape(), r = e.object_data.points[0];
|
|
359
|
+
return o.moveTo(r[0], r[2]), e.object_data.points.slice(1).forEach((s) => o.lineTo(s[0], s[2])), o.lineTo(r[0], r[2]), u(m({}, e), {
|
|
288
360
|
floor_index: e.object_data.floorIndex,
|
|
289
|
-
object_data:
|
|
290
|
-
bottom_y:
|
|
291
|
-
shape:
|
|
361
|
+
object_data: u(m({}, e.object_data), {
|
|
362
|
+
bottom_y: r[1] + e.object_data.fixedY,
|
|
363
|
+
shape: o.toJSON(),
|
|
292
364
|
height: e.object_data.height + e.object_data.fixedHeight
|
|
293
365
|
})
|
|
294
366
|
});
|
|
@@ -310,7 +382,7 @@ class et extends k {
|
|
|
310
382
|
}
|
|
311
383
|
updateState(t, i) {
|
|
312
384
|
const e = this.state;
|
|
313
|
-
this.state =
|
|
385
|
+
this.state = m(m({}, this.state), t), this.hooks.emit("stateChange", { state: this.state, prevState: e, userAction: i });
|
|
314
386
|
}
|
|
315
387
|
_enable(t) {
|
|
316
388
|
this.hooks.emit("enable", { userAction: t.userAction }), this.five.scene.add(this.modelGroup), this.updateChildrenMountedState(), this.five.needsRender = !0, this.five.on("wantsTapGesture", this.onWantsFiveTapGesture), this.five.on("initAnimationWillStart", this.onFiveInitAnimationWillStart), this.five.on("initAnimationEnded", this.onFiveInitAnimationEnded), this.five.on("modeChange", this.onFiveModeChange), this.five.on("cameraUpdate", this.onFiveCameraUpdate);
|
|
@@ -319,16 +391,16 @@ class et extends k {
|
|
|
319
391
|
this.hooks.emit("disable", { userAction: t.userAction }), this.five.scene.remove(this.modelGroup), this.updateChildrenMountedState(), this.five.needsRender = !0, this.five.off("wantsTapGesture", this.onWantsFiveTapGesture), this.five.off("initAnimationWillStart", this.onFiveInitAnimationWillStart), this.five.off("initAnimationEnded", this.onFiveInitAnimationEnded), this.five.off("modeChange", this.onFiveModeChange), this.five.off("cameraUpdate", this.onFiveCameraUpdate);
|
|
320
392
|
}
|
|
321
393
|
_show(t) {
|
|
322
|
-
return
|
|
394
|
+
return c(this, null, function* () {
|
|
323
395
|
this.hooks.emit("show", t), this.five.needsRender = !0;
|
|
324
396
|
});
|
|
325
397
|
}
|
|
326
398
|
_hide(t) {
|
|
327
|
-
return
|
|
399
|
+
return c(this, null, function* () {
|
|
328
400
|
this.hooks.emit("hide", t), this.five.needsRender = !0;
|
|
329
401
|
});
|
|
330
402
|
}
|
|
331
403
|
}
|
|
332
404
|
export {
|
|
333
|
-
|
|
405
|
+
Me as Controller
|
|
334
406
|
};
|
|
@@ -6,15 +6,87 @@ import "../shared-utils/Subscribe.js";
|
|
|
6
6
|
import "hammerjs";
|
|
7
7
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
8
8
|
import "@realsee/five/line";
|
|
9
|
+
import "../Sculpt/utils/Modules/Global.js";
|
|
10
|
+
import "../Sculpt/utils/Modules/Cursor.js";
|
|
11
|
+
import "../Object3DHelperPlugin/Controller.js";
|
|
9
12
|
import "../shared-utils/three/THREESphere.js";
|
|
13
|
+
import "../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
14
|
+
import "../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
15
|
+
import "../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
16
|
+
import "../shared-utils/three/IObject3D.js";
|
|
17
|
+
import "../shared-utils/three/boundingBox.js";
|
|
18
|
+
import "../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
19
|
+
import "../shared-utils/Object3DHelper/utils/direction.js";
|
|
20
|
+
import "../shared-utils/Object3DHelper/Constants/color.js";
|
|
21
|
+
import "../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
22
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
23
|
+
import "../shared-utils/positionToVector3.js";
|
|
24
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
25
|
+
import "../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
|
|
26
|
+
import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
27
|
+
import "../CSS3DRenderPlugin/utils/even.js";
|
|
28
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
29
|
+
import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
30
|
+
import "../shared-utils/three/centerPoint.js";
|
|
31
|
+
import "../shared-utils/three/getObjectVisible.js";
|
|
10
32
|
import "animejs";
|
|
33
|
+
import "../shared-utils/isNil.js";
|
|
34
|
+
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
35
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
36
|
+
import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
37
|
+
import "../shared-utils/util.js";
|
|
38
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
39
|
+
import "../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
40
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
41
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
42
|
+
import "../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
43
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
44
|
+
import "../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
45
|
+
import "../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
46
|
+
import "../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
47
|
+
import "../shared-utils/threex/domevents/index.js";
|
|
48
|
+
import "../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
49
|
+
import "../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
50
|
+
import "../Sculpt/utils/three/rayOnLine.js";
|
|
51
|
+
import "../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
52
|
+
import "../shared-utils/Object3DHelper/index.js";
|
|
53
|
+
import "../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
54
|
+
import "../shared-utils/math/rad2Deg.js";
|
|
55
|
+
import "../shared-utils/math/deg2Rad.js";
|
|
56
|
+
import "../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
57
|
+
import "../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
58
|
+
import "../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
59
|
+
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
60
|
+
import "../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
61
|
+
import "../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
62
|
+
import "../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
63
|
+
import "../shared-utils/five/fiveModelLoad.js";
|
|
64
|
+
import "../shared-utils/five/getFiveModel.js";
|
|
65
|
+
import "../shared-utils/five/FiveDomEvents.js";
|
|
66
|
+
import "../shared-utils/five/calculateThreeMouse.js";
|
|
67
|
+
import "../shared-utils/three/THREERaycaster.js";
|
|
68
|
+
import "../shared-utils/three/PointSelector/index.js";
|
|
69
|
+
import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
70
|
+
import "../shared-utils/three/Magnifier.js";
|
|
71
|
+
import "../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
72
|
+
import "../shared-utils/three/Assets/index.js";
|
|
73
|
+
import "../shared-utils/three/PointSelector/utils/html.js";
|
|
74
|
+
import "../shared-utils/five/initialCSS3DRender.js";
|
|
75
|
+
import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
76
|
+
import "../Sculpt/Meshes/Line.js";
|
|
77
|
+
import "../Sculpt/typings/style.js";
|
|
78
|
+
import "../shared-utils/five/FiveLine.js";
|
|
79
|
+
import "../shared-utils/tag.js";
|
|
80
|
+
import "../shared-utils/five/vector3ToScreen.js";
|
|
81
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
82
|
+
import "../shared-utils/isTouchDevice.js";
|
|
83
|
+
import "../shared-utils/five/getPosition.js";
|
|
84
|
+
import "../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
11
85
|
import "../shared-utils/Utils/FiveUtil.js";
|
|
12
86
|
import "../shared-utils/Utils/BaseUtil.js";
|
|
13
87
|
import "../shared-utils/Utils/WorkUtil.js";
|
|
14
88
|
import "../shared-utils/five/transformPosition.js";
|
|
15
|
-
import "../shared-utils/five/getFiveModel.js";
|
|
16
89
|
import "../shared-utils/url/absoluteUrl.js";
|
|
17
|
-
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
18
90
|
import "../shared-utils/equal.js";
|
|
19
91
|
import "../shared-utils/isTruelyObject.js";
|
|
20
92
|
import "./utils/Item.js";
|
|
@@ -27,7 +99,7 @@ import "../vendor/svelte/internal/index.js";
|
|
|
27
99
|
import "../components/AreaLabel/Assets/roomLabelBg.js";
|
|
28
100
|
import "../shared-utils/math/planimetry.js";
|
|
29
101
|
import "../shared-utils/dom/resizeObserver.js";
|
|
30
|
-
const
|
|
102
|
+
const Yr = (r, o) => new t(r, o);
|
|
31
103
|
export {
|
|
32
|
-
|
|
104
|
+
Yr as AreaMakerPlugin
|
|
33
105
|
};
|