@realsee/dnalogel 3.45.0 → 3.46.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 +6 -0
- package/dist/Sculpt/Meshes/Line.d.ts +6 -1
- package/dist/Sculpt/utils/removeAllTag.d.ts +2 -0
- package/dist/index.cjs.js +53 -53
- package/dist/index.js +29600 -29557
- package/dist/index.umd.js +49 -49
- package/dist/shared-utils/tag.d.ts +6 -3
- package/libs/AreaMakerPlugin/Controller.js +151 -78
- package/libs/AreaMakerPlugin/index.js +77 -4
- package/libs/AreaMakerPlugin/utils/Item.js +191 -111
- package/libs/CSS3DRenderPlugin/Controller.js +90 -29
- package/libs/CSS3DRenderPlugin/index.js +76 -15
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +133 -58
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +182 -116
- package/libs/CruisePlugin/BaseController.js +122 -49
- package/libs/CruisePlugin/Move.js +74 -21
- package/libs/CruisePlugin/Work.js +99 -46
- package/libs/CruisePlugin/index.js +80 -27
- package/libs/CurrentPanoImagePlugin/Controller.js +177 -104
- package/libs/CurrentPanoImagePlugin/index.js +77 -4
- package/libs/GuideLinePlugin/Controller.js +79 -26
- package/libs/GuideLinePlugin/GuideLineItem.js +83 -30
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +3 -2
- package/libs/GuideLinePlugin/GuideLineModeItem.js +82 -29
- package/libs/GuideLinePlugin/index.js +80 -27
- package/libs/ModelMakerPlugin/Controller.js +140 -82
- package/libs/ModelMakerPlugin/index.js +76 -18
- package/libs/ModelTVVideoPlugin/Plugin.js +118 -57
- package/libs/ModelTVVideoPlugin/index.js +69 -8
- package/libs/Object3DHelperPlugin/Controller.js +67 -43
- package/libs/Object3DHelperPlugin/index.js +36 -13
- package/libs/PanoCompassPlugin/Controller.js +98 -42
- package/libs/PanoCompassPlugin/index.js +72 -16
- package/libs/PanoDoorLabelPlugin/BaseController.js +99 -26
- package/libs/PanoDoorLabelPlugin/Controller.js +188 -115
- package/libs/PanoDoorLabelPlugin/index.js +77 -4
- package/libs/PanoMeasurePlugin/Components/Controller0.js +141 -88
- package/libs/PanoMeasurePlugin/Components/Controller1.js +179 -126
- package/libs/PanoMeasurePlugin/Controller/EditController.js +125 -72
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +168 -92
- package/libs/PanoMeasurePlugin/Controller/index.js +110 -64
- package/libs/PanoMeasurePlugin/Model/area.js +115 -38
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +79 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +98 -45
- package/libs/PanoMeasurePlugin/index.js +77 -31
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +99 -20
- package/libs/PanoSpatialTagPlugin/Plugin.js +211 -150
- package/libs/PanoSpatialTagPlugin/index.js +67 -6
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +149 -68
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +296 -216
- package/libs/PanoTagPlugin/Components/Tag/index.js +258 -187
- package/libs/PanoTagPlugin/Components/TagContainer.js +158 -87
- package/libs/PanoTagPlugin/Components/TagItem.js +145 -74
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +133 -62
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +110 -39
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +106 -35
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +114 -43
- package/libs/PanoTagPlugin/controller/TagRender.js +133 -80
- package/libs/PanoTagPlugin/controller/TagUtil.js +137 -84
- package/libs/PanoTagPlugin/controller/index.js +114 -61
- package/libs/PanoTagPlugin/index.js +90 -37
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +122 -41
- package/libs/PanoVideoPlugin/Controller.js +138 -65
- package/libs/PanoVideoPlugin/VideoMeshController.js +150 -69
- package/libs/PanoVideoPlugin/index.js +83 -10
- package/libs/PipelinePlugin/Controller.js +200 -128
- package/libs/PipelinePlugin/index.js +77 -5
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +103 -22
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +96 -15
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +137 -56
- package/libs/Sculpt/Meshes/Box.js +6 -5
- package/libs/Sculpt/Meshes/Cylinder.js +7 -6
- package/libs/Sculpt/Meshes/Line.d.ts +6 -1
- package/libs/Sculpt/Meshes/Line.js +80 -57
- package/libs/Sculpt/Meshes/Point.js +6 -5
- package/libs/Sculpt/Meshes/Polyline.js +5 -4
- package/libs/Sculpt/Meshes/Rectangle.js +3 -2
- package/libs/Sculpt/Objects/Base/index.js +20 -17
- package/libs/Sculpt/Objects/Line/Editor.js +11 -10
- package/libs/Sculpt/utils/removeAllTag.d.ts +2 -0
- package/libs/Sculpt/utils/removeAllTag.js +10 -0
- package/libs/Sculpt/utils/three/ColoredMesh.js +14 -13
- package/libs/base/BasePlugin.js +14 -13
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +129 -59
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +76 -6
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +130 -59
- package/libs/floorplan/ModelFloorplanPlugin/index.js +76 -5
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +159 -86
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +77 -4
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +152 -81
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +76 -5
- package/libs/floorplan/index.js +1 -0
- package/libs/index.js +193 -192
- 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/index.js +1 -0
- package/package.json +1 -1
|
@@ -1,27 +1,100 @@
|
|
|
1
1
|
import { PanoVideoPluginController as r } from "./Controller.js";
|
|
2
|
-
import { typings as
|
|
2
|
+
import { typings as Ro } from "./typings/index.js";
|
|
3
3
|
import "./VideoMeshController.js";
|
|
4
4
|
import "./utils/shader.js";
|
|
5
5
|
import "three";
|
|
6
6
|
import "hammerjs";
|
|
7
7
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
8
8
|
import "@realsee/five/line";
|
|
9
|
-
import "../
|
|
10
|
-
import "
|
|
11
|
-
import "../
|
|
12
|
-
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
13
|
-
import "./utils/index.js";
|
|
9
|
+
import "../Sculpt/utils/Modules/Global.js";
|
|
10
|
+
import "../Sculpt/utils/Modules/Cursor.js";
|
|
11
|
+
import "../Object3DHelperPlugin/Controller.js";
|
|
14
12
|
import "../base/BasePlugin.js";
|
|
15
13
|
import "../shared-utils/Subscribe.js";
|
|
14
|
+
import "../shared-utils/three/THREESphere.js";
|
|
15
|
+
import "animejs";
|
|
16
16
|
import "../shared-utils/Utils/FiveUtil.js";
|
|
17
17
|
import "../shared-utils/Utils/BaseUtil.js";
|
|
18
18
|
import "../shared-utils/Utils/WorkUtil.js";
|
|
19
19
|
import "../shared-utils/five/transformPosition.js";
|
|
20
20
|
import "../shared-utils/five/getFiveModel.js";
|
|
21
21
|
import "../shared-utils/url/absoluteUrl.js";
|
|
22
|
-
|
|
22
|
+
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
23
|
+
import "../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
24
|
+
import "../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
25
|
+
import "../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
26
|
+
import "../shared-utils/three/IObject3D.js";
|
|
27
|
+
import "../shared-utils/three/boundingBox.js";
|
|
28
|
+
import "../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
29
|
+
import "../shared-utils/Object3DHelper/utils/direction.js";
|
|
30
|
+
import "../shared-utils/Object3DHelper/Constants/color.js";
|
|
31
|
+
import "../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
32
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
33
|
+
import "../shared-utils/positionToVector3.js";
|
|
34
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
35
|
+
import "../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
|
|
36
|
+
import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
37
|
+
import "../CSS3DRenderPlugin/utils/even.js";
|
|
38
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
39
|
+
import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
40
|
+
import "../shared-utils/three/centerPoint.js";
|
|
41
|
+
import "../shared-utils/three/getObjectVisible.js";
|
|
42
|
+
import "../shared-utils/isNil.js";
|
|
43
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
44
|
+
import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
45
|
+
import "../shared-utils/util.js";
|
|
46
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
47
|
+
import "../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
48
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
49
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
50
|
+
import "../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
51
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
52
|
+
import "../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
53
|
+
import "../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
54
|
+
import "../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
55
|
+
import "../shared-utils/threex/domevents/index.js";
|
|
56
|
+
import "../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
57
|
+
import "../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
58
|
+
import "../Sculpt/utils/three/rayOnLine.js";
|
|
59
|
+
import "../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
60
|
+
import "../shared-utils/Object3DHelper/index.js";
|
|
61
|
+
import "../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
62
|
+
import "../shared-utils/math/rad2Deg.js";
|
|
63
|
+
import "../shared-utils/math/deg2Rad.js";
|
|
64
|
+
import "../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
65
|
+
import "../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
66
|
+
import "../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
67
|
+
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
68
|
+
import "../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
69
|
+
import "../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
70
|
+
import "../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
71
|
+
import "../shared-utils/five/fiveModelLoad.js";
|
|
72
|
+
import "../shared-utils/five/FiveDomEvents.js";
|
|
73
|
+
import "../shared-utils/five/calculateThreeMouse.js";
|
|
74
|
+
import "../shared-utils/three/THREERaycaster.js";
|
|
75
|
+
import "../shared-utils/three/PointSelector/index.js";
|
|
76
|
+
import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
77
|
+
import "../shared-utils/three/Magnifier.js";
|
|
78
|
+
import "../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
79
|
+
import "../shared-utils/three/Assets/index.js";
|
|
80
|
+
import "../shared-utils/three/PointSelector/utils/html.js";
|
|
81
|
+
import "../shared-utils/five/initialCSS3DRender.js";
|
|
82
|
+
import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
83
|
+
import "../Sculpt/Meshes/Line.js";
|
|
84
|
+
import "../Sculpt/typings/style.js";
|
|
85
|
+
import "../shared-utils/five/FiveLine.js";
|
|
86
|
+
import "../shared-utils/tag.js";
|
|
87
|
+
import "../shared-utils/five/vector3ToScreen.js";
|
|
88
|
+
import "../Sculpt/utils/removeAllTag.js";
|
|
89
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
90
|
+
import "../shared-utils/isTouchDevice.js";
|
|
91
|
+
import "../shared-utils/five/getPosition.js";
|
|
92
|
+
import "../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
93
|
+
import "../shared-utils/animationFrame/index.js";
|
|
94
|
+
import "./utils/index.js";
|
|
95
|
+
const No = (o) => new r(o);
|
|
23
96
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
97
|
+
No as PanoVideoPlugin,
|
|
98
|
+
Ro as PanoVideoPluginType,
|
|
99
|
+
No as default
|
|
27
100
|
};
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
var j = Object.defineProperty;
|
|
2
2
|
var v = Object.getOwnPropertySymbols;
|
|
3
3
|
var P = Object.prototype.hasOwnProperty, _ = Object.prototype.propertyIsEnumerable;
|
|
4
|
-
var A = (
|
|
5
|
-
for (var
|
|
6
|
-
P.call(
|
|
4
|
+
var A = (m, a, t) => a in m ? j(m, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : m[a] = t, u = (m, a) => {
|
|
5
|
+
for (var t in a || (a = {}))
|
|
6
|
+
P.call(a, t) && A(m, t, a[t]);
|
|
7
7
|
if (v)
|
|
8
|
-
for (var
|
|
9
|
-
_.call(
|
|
10
|
-
return
|
|
8
|
+
for (var t of v(a))
|
|
9
|
+
_.call(a, t) && A(m, t, a[t]);
|
|
10
|
+
return m;
|
|
11
11
|
};
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var s = (
|
|
12
|
+
var d = (m, a, t) => (A(m, typeof a != "symbol" ? a + "" : a, t), t);
|
|
13
|
+
var c = (m, a, t) => new Promise((e, i) => {
|
|
14
|
+
var s = (o) => {
|
|
15
15
|
try {
|
|
16
|
-
|
|
17
|
-
} catch (
|
|
18
|
-
i(
|
|
16
|
+
p(t.next(o));
|
|
17
|
+
} catch (h) {
|
|
18
|
+
i(h);
|
|
19
19
|
}
|
|
20
|
-
}, r = (
|
|
20
|
+
}, r = (o) => {
|
|
21
21
|
try {
|
|
22
|
-
|
|
23
|
-
} catch (
|
|
24
|
-
i(
|
|
22
|
+
p(t.throw(o));
|
|
23
|
+
} catch (h) {
|
|
24
|
+
i(h);
|
|
25
25
|
}
|
|
26
|
-
},
|
|
27
|
-
|
|
26
|
+
}, p = (o) => o.done ? e(o.value) : Promise.resolve(o.value).then(s, r);
|
|
27
|
+
p((t = t.apply(m, a)).next());
|
|
28
28
|
});
|
|
29
29
|
import * as F from "three";
|
|
30
30
|
import { Controller as S } from "../base/BasePluginWithData.js";
|
|
@@ -38,15 +38,87 @@ import "../shared-utils/Subscribe.js";
|
|
|
38
38
|
import "hammerjs";
|
|
39
39
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
40
40
|
import "@realsee/five/line";
|
|
41
|
+
import "../Sculpt/utils/Modules/Global.js";
|
|
42
|
+
import "../Sculpt/utils/Modules/Cursor.js";
|
|
43
|
+
import "../Object3DHelperPlugin/Controller.js";
|
|
41
44
|
import "../shared-utils/three/THREESphere.js";
|
|
45
|
+
import "../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
46
|
+
import "../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
47
|
+
import "../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
48
|
+
import "../shared-utils/three/IObject3D.js";
|
|
49
|
+
import "../shared-utils/three/boundingBox.js";
|
|
50
|
+
import "../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
51
|
+
import "../shared-utils/Object3DHelper/utils/direction.js";
|
|
52
|
+
import "../shared-utils/Object3DHelper/Constants/color.js";
|
|
53
|
+
import "../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
54
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
55
|
+
import "../shared-utils/positionToVector3.js";
|
|
56
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
57
|
+
import "../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
|
|
58
|
+
import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
59
|
+
import "../CSS3DRenderPlugin/utils/even.js";
|
|
60
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
61
|
+
import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
62
|
+
import "../shared-utils/three/centerPoint.js";
|
|
63
|
+
import "../shared-utils/three/getObjectVisible.js";
|
|
42
64
|
import "animejs";
|
|
65
|
+
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
43
66
|
import "../shared-utils/Utils/FiveUtil.js";
|
|
44
67
|
import "../shared-utils/Utils/BaseUtil.js";
|
|
45
68
|
import "../shared-utils/Utils/WorkUtil.js";
|
|
46
69
|
import "../shared-utils/five/transformPosition.js";
|
|
47
70
|
import "../shared-utils/five/getFiveModel.js";
|
|
48
71
|
import "../shared-utils/url/absoluteUrl.js";
|
|
49
|
-
import "../
|
|
72
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
73
|
+
import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
74
|
+
import "../shared-utils/util.js";
|
|
75
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
76
|
+
import "../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
77
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
78
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
79
|
+
import "../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
80
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
81
|
+
import "../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
82
|
+
import "../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
83
|
+
import "../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
84
|
+
import "../shared-utils/threex/domevents/index.js";
|
|
85
|
+
import "../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
86
|
+
import "../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
87
|
+
import "../Sculpt/utils/three/rayOnLine.js";
|
|
88
|
+
import "../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
89
|
+
import "../shared-utils/Object3DHelper/index.js";
|
|
90
|
+
import "../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
91
|
+
import "../shared-utils/math/rad2Deg.js";
|
|
92
|
+
import "../shared-utils/math/deg2Rad.js";
|
|
93
|
+
import "../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
94
|
+
import "../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
95
|
+
import "../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
96
|
+
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
97
|
+
import "../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
98
|
+
import "../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
99
|
+
import "../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
100
|
+
import "../shared-utils/five/fiveModelLoad.js";
|
|
101
|
+
import "../shared-utils/five/FiveDomEvents.js";
|
|
102
|
+
import "../shared-utils/five/calculateThreeMouse.js";
|
|
103
|
+
import "../shared-utils/three/THREERaycaster.js";
|
|
104
|
+
import "../shared-utils/three/PointSelector/index.js";
|
|
105
|
+
import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
106
|
+
import "../shared-utils/three/Magnifier.js";
|
|
107
|
+
import "../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
108
|
+
import "../shared-utils/three/Assets/index.js";
|
|
109
|
+
import "../shared-utils/three/PointSelector/utils/html.js";
|
|
110
|
+
import "../shared-utils/five/initialCSS3DRender.js";
|
|
111
|
+
import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
112
|
+
import "../Sculpt/Meshes/Line.js";
|
|
113
|
+
import "../Sculpt/typings/style.js";
|
|
114
|
+
import "../shared-utils/five/FiveLine.js";
|
|
115
|
+
import "../shared-utils/tag.js";
|
|
116
|
+
import "../shared-utils/five/vector3ToScreen.js";
|
|
117
|
+
import "../Sculpt/utils/removeAllTag.js";
|
|
118
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
119
|
+
import "../shared-utils/isTouchDevice.js";
|
|
120
|
+
import "../shared-utils/five/getPosition.js";
|
|
121
|
+
import "../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
50
122
|
import "../shared-utils/isTruelyObject.js";
|
|
51
123
|
import "../shared-utils/animationFrame/index.js";
|
|
52
124
|
import "./utils/Objects/Pipe.js";
|
|
@@ -55,11 +127,11 @@ import "../shared-utils/three/Extras/Curves/BezierCurve3.js";
|
|
|
55
127
|
import "../shared-utils/three/Extras/Core/Interpolations.js";
|
|
56
128
|
import "../shared-utils/three/Extras/Core/Interpolations2.js";
|
|
57
129
|
const g = { flowSpeed: 0.6, rotateSpeed: 0 };
|
|
58
|
-
class
|
|
59
|
-
constructor(
|
|
60
|
-
super(
|
|
130
|
+
class _e extends S {
|
|
131
|
+
constructor(t) {
|
|
132
|
+
super(t);
|
|
61
133
|
// ==================== public properties ====================
|
|
62
|
-
|
|
134
|
+
d(this, "data");
|
|
63
135
|
/** 插件状态
|
|
64
136
|
* @property `visible` `<boolean>` 是否可见
|
|
65
137
|
* @property `enabled` `<boolean>` 是否启用
|
|
@@ -68,29 +140,29 @@ class ne extends S {
|
|
|
68
140
|
* @property `speed.flowSpeed` `<number>` 横向流动速度,默认是 0.6 m/s
|
|
69
141
|
* @property `speed.rotateSpeed` `<number>` 纵向旋转速度:默认是 0 deg/s
|
|
70
142
|
*/
|
|
71
|
-
|
|
143
|
+
d(this, "state");
|
|
72
144
|
/** 当前插件所有新增 THREE 相关副作用都在 group 下 */
|
|
73
|
-
|
|
145
|
+
d(this, "group");
|
|
74
146
|
/** 用于展示水流的水管 */
|
|
75
|
-
|
|
147
|
+
d(this, "pipeObjects", []);
|
|
76
148
|
// ==================== private properties ====================
|
|
77
149
|
/** 水管贴图缓存 */
|
|
78
|
-
|
|
150
|
+
d(this, "texturePromiseCache", /* @__PURE__ */ new Map());
|
|
79
151
|
/** 销毁插件,移除所有副作用,销毁后将不响应任何 API */
|
|
80
|
-
|
|
81
|
-
this.disable(), this.five.scene.remove(this.group), this.texturePromiseCache.forEach((
|
|
152
|
+
d(this, "dispose", () => {
|
|
153
|
+
this.disable(), this.five.scene.remove(this.group), this.texturePromiseCache.forEach((t) => t.then((e) => e.dispose())), this.texturePromiseCache.clear();
|
|
82
154
|
});
|
|
83
|
-
|
|
84
|
-
const [
|
|
155
|
+
d(this, "onWantsFiveTapGesture", (...t) => {
|
|
156
|
+
const [e] = t, i = e.intersectObjects(this.pipeObjects, !1);
|
|
85
157
|
if (i.length === 0 || !this.data)
|
|
86
158
|
return;
|
|
87
|
-
const
|
|
88
|
-
if (!(!
|
|
159
|
+
const p = i[0].object.customID, o = this.data.pipes.find(({ id: n }) => n === p), h = this.data.pipelines.find((n) => o && n.pipes.includes(o));
|
|
160
|
+
if (!(!o || !h))
|
|
89
161
|
return this.hooks.emit("tap", {
|
|
90
162
|
intersectObjects: i,
|
|
91
|
-
pipe:
|
|
92
|
-
pipeline:
|
|
93
|
-
wantsFiveTapGestureParams:
|
|
163
|
+
pipe: o,
|
|
164
|
+
pipeline: h,
|
|
165
|
+
wantsFiveTapGestureParams: t
|
|
94
166
|
}), !1;
|
|
95
167
|
});
|
|
96
168
|
this.state = {
|
|
@@ -99,7 +171,7 @@ class ne extends S {
|
|
|
99
171
|
enabled: !0,
|
|
100
172
|
isFlowing: !1,
|
|
101
173
|
speed: g
|
|
102
|
-
}, this.five =
|
|
174
|
+
}, this.five = t, this.group = new F.Group(), this.group.name = "water-pipe-group", this.five.scene.add(this.group), this.five.once("dispose", this.dispose), this.five.on("wantsTapGesture", this.onWantsFiveTapGesture);
|
|
103
175
|
}
|
|
104
176
|
/** 加载管道数据,重复调用会使用新数据覆盖旧数据
|
|
105
177
|
* @param `data` `<Plugin.ServerData>` Open API 接口返回的数据。
|
|
@@ -111,20 +183,20 @@ class ne extends S {
|
|
|
111
183
|
* 函数返回的 string 就是当前 water 对应的贴图地址。
|
|
112
184
|
*/
|
|
113
185
|
// eslint-disable-next-line max-params
|
|
114
|
-
load(
|
|
115
|
-
return
|
|
186
|
+
load(t, e, i, s) {
|
|
187
|
+
return c(this, null, function* () {
|
|
116
188
|
const r = this.data;
|
|
117
|
-
this.data = yield this.formatData(
|
|
118
|
-
this.data.pipes.filter((
|
|
119
|
-
const
|
|
189
|
+
this.data = yield this.formatData(t, s), this.removeAllPipes(), this.hooks.emit("dataChange", this.data, r), this.pipeObjects = yield Promise.all(
|
|
190
|
+
this.data.pipes.filter((p) => !!(p != null && p.texture)).map((b) => c(this, [b], function* ({ id: p, texture: o, path: h, radius: n }) {
|
|
191
|
+
const l = yield this.loadPipeTexture(o), f = { id: p, path: h, textureURL: o, texture: l, geometryConfig: { radius: n } };
|
|
120
192
|
return new D(f);
|
|
121
193
|
}))
|
|
122
|
-
), this.data.pipelines.forEach((
|
|
123
|
-
|
|
124
|
-
const
|
|
125
|
-
return
|
|
194
|
+
), this.data.pipelines.forEach((p) => {
|
|
195
|
+
p.pipes.reduce((o, h) => {
|
|
196
|
+
const n = this.findPipeObjectWithID(h.id);
|
|
197
|
+
return n == null || n.setInitialDisplacement(o), o + ((n == null ? void 0 : n.pathLength) || 0);
|
|
126
198
|
}, 0);
|
|
127
|
-
}), this.hooks.emit("dataLoaded", this.data), this.state.visible === !1 && this.pipeObjects.forEach((
|
|
199
|
+
}), this.hooks.emit("dataLoaded", this.data), this.state.visible === !1 && this.pipeObjects.forEach((p) => p.setOpacity(0)), this.state.enabled && (this.group.add(...this.pipeObjects), this.five.needsRender = !0), e && this.setState(e, { userAction: i });
|
|
128
200
|
});
|
|
129
201
|
}
|
|
130
202
|
/** 更改插件 State
|
|
@@ -132,18 +204,18 @@ class ne extends S {
|
|
|
132
204
|
* @param `options` `<Option> | <undefined>`
|
|
133
205
|
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
134
206
|
*/
|
|
135
|
-
setState(
|
|
207
|
+
setState(t, e = {}) {
|
|
136
208
|
const i = this.state;
|
|
137
|
-
if (O(
|
|
209
|
+
if (O(t, i, { deep: !0 }))
|
|
138
210
|
return;
|
|
139
|
-
const s =
|
|
140
|
-
if (this.updateState(
|
|
211
|
+
const s = e.userAction !== void 0 ? e.userAction : !0;
|
|
212
|
+
if (this.updateState(t, s), t.enabled !== void 0 && i.enabled !== t.enabled && (t.enabled ? this._enable({ userAction: s }) : this._disable({ userAction: s })), t.visible !== void 0 && i.visible !== t.visible) {
|
|
141
213
|
const r = { userAction: s, anime: { duration: 500 } };
|
|
142
|
-
|
|
214
|
+
t.visible ? this._show(r) : this._hide(r);
|
|
143
215
|
}
|
|
144
|
-
if (
|
|
216
|
+
if (t.isFlowing !== void 0 && i.isFlowing !== t.isFlowing && (t.isFlowing ? this._flow() : this._stopFlow()), t.speed !== void 0 && !O(i.speed, this.state.speed, { deep: !0 }) && this._setSpeed(t.speed), t.target !== void 0 && !O(i.target, this.state.target, { deep: !0 })) {
|
|
145
217
|
const r = {
|
|
146
|
-
target:
|
|
218
|
+
target: t.target,
|
|
147
219
|
showAnime: { duration: 500 },
|
|
148
220
|
hideAnime: { duration: 500 }
|
|
149
221
|
};
|
|
@@ -154,23 +226,23 @@ class ne extends S {
|
|
|
154
226
|
* @param `options` `<Option> | <undefined>`
|
|
155
227
|
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
156
228
|
*/
|
|
157
|
-
enable(
|
|
229
|
+
enable(t = {}) {
|
|
158
230
|
var i;
|
|
159
231
|
if (this.state.enabled)
|
|
160
232
|
return;
|
|
161
|
-
const
|
|
162
|
-
this.updateState({ enabled: !0 },
|
|
233
|
+
const e = (i = t.userAction) != null ? i : !0;
|
|
234
|
+
this.updateState({ enabled: !0 }, e), this._enable({ userAction: e });
|
|
163
235
|
}
|
|
164
236
|
/** 禁用插件
|
|
165
237
|
* @param `options` `<Option> | <undefined>`
|
|
166
238
|
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
167
239
|
*/
|
|
168
|
-
disable(
|
|
240
|
+
disable(t = {}) {
|
|
169
241
|
var i;
|
|
170
242
|
if (this.state.enabled === !1)
|
|
171
243
|
return;
|
|
172
|
-
const
|
|
173
|
-
this.updateState({ enabled: !1, isFlowing: !1 },
|
|
244
|
+
const e = (i = t.userAction) != null ? i : !0;
|
|
245
|
+
this.updateState({ enabled: !1, isFlowing: !1 }, e), this._disable({ userAction: e });
|
|
174
246
|
}
|
|
175
247
|
/** 展示管道模型,注意如果通过 `switchPipelines` 更改过 `visibleIDs`,则只会展示这一部分模型。
|
|
176
248
|
* @param `options` `<Partial<ShowHideOptions>> | <undefined>`
|
|
@@ -179,14 +251,14 @@ class ne extends S {
|
|
|
179
251
|
* @param `options.anime.duration` `<number> | <undefined>` 动画时间,默认是 500ms。
|
|
180
252
|
*/
|
|
181
253
|
show() {
|
|
182
|
-
return
|
|
254
|
+
return c(this, arguments, function* (t = {}) {
|
|
183
255
|
if (this.state.visible)
|
|
184
256
|
return;
|
|
185
|
-
const
|
|
257
|
+
const e = u({
|
|
186
258
|
userAction: !0,
|
|
187
259
|
anime: { duration: 500 }
|
|
188
|
-
},
|
|
189
|
-
this.updateState({ visible: !0 },
|
|
260
|
+
}, t);
|
|
261
|
+
this.updateState({ visible: !0 }, e.userAction), yield this._show(e);
|
|
190
262
|
});
|
|
191
263
|
}
|
|
192
264
|
/** 插件内容整体隐藏
|
|
@@ -196,14 +268,14 @@ class ne extends S {
|
|
|
196
268
|
* @param `options.anime.duration` `<number> | <undefined>` 动画时间,默认是 500ms。
|
|
197
269
|
*/
|
|
198
270
|
hide() {
|
|
199
|
-
return
|
|
271
|
+
return c(this, arguments, function* (t = {}) {
|
|
200
272
|
if (this.state.visible === !1)
|
|
201
273
|
return;
|
|
202
|
-
const
|
|
274
|
+
const e = u({
|
|
203
275
|
userAction: !0,
|
|
204
276
|
anime: { duration: 500 }
|
|
205
|
-
},
|
|
206
|
-
this.updateState({ visible: !1 },
|
|
277
|
+
}, t);
|
|
278
|
+
this.updateState({ visible: !1 }, e.userAction), yield this._hide(e);
|
|
207
279
|
});
|
|
208
280
|
}
|
|
209
281
|
/** 切换管路
|
|
@@ -216,124 +288,124 @@ class ne extends S {
|
|
|
216
288
|
* @param `options.anime` `<AnimeOptions> | <undefined>` 兜底的动画配置。
|
|
217
289
|
* @param `options.userAction` `<boolean> | <undefined>` 是否是否是用户操作。
|
|
218
290
|
* */
|
|
219
|
-
switchPipelines(
|
|
220
|
-
return
|
|
221
|
-
var
|
|
291
|
+
switchPipelines(t) {
|
|
292
|
+
return c(this, null, function* () {
|
|
293
|
+
var h, n, b, l, f, w;
|
|
222
294
|
if (!this.data)
|
|
223
295
|
return;
|
|
224
|
-
const
|
|
225
|
-
this.updateState({ target:
|
|
226
|
-
const s = { duration: 500 }, r = (
|
|
227
|
-
target:
|
|
228
|
-
showAnime:
|
|
296
|
+
const e = (h = t == null ? void 0 : t.target) != null ? h : null, i = (n = t == null ? void 0 : t.userAction) != null ? n : !0;
|
|
297
|
+
this.updateState({ target: e }, i);
|
|
298
|
+
const s = { duration: 500 }, r = (l = (b = t == null ? void 0 : t.hideAnime) != null ? b : t == null ? void 0 : t.anime) != null ? l : s, p = (w = (f = t == null ? void 0 : t.showAnime) != null ? f : t == null ? void 0 : t.anime) != null ? w : s, o = {
|
|
299
|
+
target: e,
|
|
300
|
+
showAnime: p,
|
|
229
301
|
hideAnime: r
|
|
230
302
|
};
|
|
231
|
-
this._switchPipelines(
|
|
303
|
+
this._switchPipelines(o);
|
|
232
304
|
});
|
|
233
305
|
}
|
|
234
306
|
/** 开始流动 */
|
|
235
|
-
flow(
|
|
307
|
+
flow(t = {}) {
|
|
236
308
|
var i;
|
|
237
309
|
if (this.state.isFlowing)
|
|
238
310
|
return;
|
|
239
|
-
const
|
|
240
|
-
this.updateState({ isFlowing: !0 },
|
|
311
|
+
const e = (i = t.userAction) != null ? i : !0;
|
|
312
|
+
this.updateState({ isFlowing: !0 }, e), this._flow();
|
|
241
313
|
}
|
|
242
314
|
/** 停止流动 */
|
|
243
|
-
stopFlow(
|
|
315
|
+
stopFlow(t = {}) {
|
|
244
316
|
var i;
|
|
245
317
|
if (this.state.isFlowing === !1)
|
|
246
318
|
return;
|
|
247
|
-
const
|
|
248
|
-
this.updateState({ isFlowing: !1 },
|
|
319
|
+
const e = (i = t.userAction) != null ? i : !0;
|
|
320
|
+
this.updateState({ isFlowing: !1 }, e), this._stopFlow();
|
|
249
321
|
}
|
|
250
322
|
/** 更改水管流速
|
|
251
323
|
* @param `options` `<SetSpeedOptions> | <undefined>`
|
|
252
324
|
* @param `options.speed` `<Speed> | <undefined>` 参考 `state.speed` 的描述。
|
|
253
325
|
* @param `options.userAction` `<boolean> | <undefined>` 是否是否是用户操作。
|
|
254
326
|
*/
|
|
255
|
-
setSpeed(
|
|
327
|
+
setSpeed(t) {
|
|
256
328
|
var s, r;
|
|
257
|
-
const
|
|
258
|
-
this.updateState({ speed:
|
|
329
|
+
const e = (s = t == null ? void 0 : t.speed) != null ? s : g, i = (r = t.userAction) != null ? r : !0;
|
|
330
|
+
this.updateState({ speed: e }, i), this._setSpeed(e);
|
|
259
331
|
}
|
|
260
|
-
formatData(
|
|
261
|
-
return
|
|
262
|
-
return y(
|
|
332
|
+
formatData(t, e) {
|
|
333
|
+
return c(this, null, function* () {
|
|
334
|
+
return y(t, e);
|
|
263
335
|
});
|
|
264
336
|
}
|
|
265
|
-
_enable(
|
|
266
|
-
this.hooks.emit("enable", { userAction:
|
|
337
|
+
_enable(t) {
|
|
338
|
+
this.hooks.emit("enable", { userAction: t.userAction }), this.five.scene.add(this.group), this.five.needsRender = !0, this.five.on("wantsTapGesture", this.onWantsFiveTapGesture);
|
|
267
339
|
}
|
|
268
|
-
_disable(
|
|
269
|
-
this.hooks.emit("disable", { userAction:
|
|
340
|
+
_disable(t) {
|
|
341
|
+
this.hooks.emit("disable", { userAction: t.userAction }), this.disposeAnime(), this.five.scene.remove(this.group), this.five.needsRender = !0, this.five.off("wantsTapGesture", this.onWantsFiveTapGesture);
|
|
270
342
|
}
|
|
271
|
-
_show(
|
|
272
|
-
return
|
|
343
|
+
_show(t) {
|
|
344
|
+
return c(this, null, function* () {
|
|
273
345
|
var s;
|
|
274
|
-
this.hooks.emit("show", { userAction:
|
|
275
|
-
const
|
|
276
|
-
yield Promise.all(i.map((r) => r == null ? void 0 : r.show(
|
|
346
|
+
this.hooks.emit("show", { userAction: t.userAction });
|
|
347
|
+
const e = (s = t == null ? void 0 : t.anime) != null ? s : { duration: 500 }, i = this.findPipeObjectWithTarget(this.state.target);
|
|
348
|
+
yield Promise.all(i.map((r) => r == null ? void 0 : r.show(e))), this.five.needsRender = !0;
|
|
277
349
|
});
|
|
278
350
|
}
|
|
279
|
-
_hide(
|
|
280
|
-
return
|
|
351
|
+
_hide(t) {
|
|
352
|
+
return c(this, null, function* () {
|
|
281
353
|
var i;
|
|
282
|
-
this.hooks.emit("hide", { userAction:
|
|
283
|
-
const
|
|
284
|
-
yield Promise.all(this.pipeObjects.map((s) => s.hide(
|
|
354
|
+
this.hooks.emit("hide", { userAction: t.userAction });
|
|
355
|
+
const e = (i = t == null ? void 0 : t.anime) != null ? i : { duration: 500 };
|
|
356
|
+
yield Promise.all(this.pipeObjects.map((s) => s.hide(e))), this.five.needsRender = !0;
|
|
285
357
|
});
|
|
286
358
|
}
|
|
287
|
-
_switchPipelines(
|
|
288
|
-
return
|
|
359
|
+
_switchPipelines(t) {
|
|
360
|
+
return c(this, null, function* () {
|
|
289
361
|
if (!this.data)
|
|
290
362
|
return;
|
|
291
|
-
const
|
|
363
|
+
const e = this.findPipeObjectWithTarget(t.target), i = t.hideAnime;
|
|
292
364
|
yield Promise.all(this.pipeObjects.map((r) => r.hide(i)));
|
|
293
|
-
const s =
|
|
294
|
-
yield Promise.all(
|
|
365
|
+
const s = t.showAnime;
|
|
366
|
+
yield Promise.all(e.map((r) => r.show(s)));
|
|
295
367
|
});
|
|
296
368
|
}
|
|
297
369
|
_flow() {
|
|
298
|
-
this.pipeObjects.forEach((
|
|
370
|
+
this.pipeObjects.forEach((t) => t.flow());
|
|
299
371
|
}
|
|
300
372
|
_stopFlow() {
|
|
301
|
-
this.pipeObjects.forEach((
|
|
373
|
+
this.pipeObjects.forEach((t) => t.stopFlow());
|
|
302
374
|
}
|
|
303
|
-
_setSpeed(
|
|
304
|
-
this.pipeObjects.forEach((
|
|
375
|
+
_setSpeed(t) {
|
|
376
|
+
this.pipeObjects.forEach((e) => e.setSpeed(t));
|
|
305
377
|
}
|
|
306
|
-
updateState(
|
|
378
|
+
updateState(t, e) {
|
|
307
379
|
const i = this.state;
|
|
308
|
-
this.state =
|
|
380
|
+
this.state = u(u({}, this.state), t), this.hooks.emit("stateChange", { state: this.state, prevState: i, userAction: e });
|
|
309
381
|
}
|
|
310
382
|
/** 加载管道贴图,如果再加载中,复用之前的加载 Promise */
|
|
311
|
-
loadPipeTexture(
|
|
312
|
-
return
|
|
313
|
-
const
|
|
314
|
-
if (
|
|
315
|
-
return
|
|
316
|
-
const i = x(
|
|
317
|
-
return this.texturePromiseCache.set(
|
|
383
|
+
loadPipeTexture(t) {
|
|
384
|
+
return c(this, null, function* () {
|
|
385
|
+
const e = this.texturePromiseCache.get(t);
|
|
386
|
+
if (e)
|
|
387
|
+
return e;
|
|
388
|
+
const i = x(t);
|
|
389
|
+
return this.texturePromiseCache.set(t, i), i;
|
|
318
390
|
});
|
|
319
391
|
}
|
|
320
392
|
/** 销毁所有动画 */
|
|
321
393
|
disposeAnime() {
|
|
322
|
-
this.pipeObjects.forEach((
|
|
394
|
+
this.pipeObjects.forEach((t) => t.disposeAnime()), this.five.needsRender = !0;
|
|
323
395
|
}
|
|
324
396
|
/** 移除所有管道模型 */
|
|
325
397
|
removeAllPipes() {
|
|
326
|
-
this.disposeAnime(), this.group.remove(...this.pipeObjects), this.pipeObjects.forEach((
|
|
398
|
+
this.disposeAnime(), this.group.remove(...this.pipeObjects), this.pipeObjects.forEach((t) => t.dispose()), this.pipeObjects = [], this.five.needsRender = !0;
|
|
327
399
|
}
|
|
328
400
|
/** 根据 ID 查找管道模型 */
|
|
329
|
-
findPipeObjectWithID(
|
|
330
|
-
return this.pipeObjects.find(({ customID:
|
|
401
|
+
findPipeObjectWithID(t) {
|
|
402
|
+
return this.pipeObjects.find(({ customID: e }) => e === t);
|
|
331
403
|
}
|
|
332
404
|
/** 根据 target 查找管道模型 */
|
|
333
|
-
findPipeObjectWithTarget(
|
|
334
|
-
return
|
|
405
|
+
findPipeObjectWithTarget(t) {
|
|
406
|
+
return t ? C({ data: this.data, target: t }).map(({ id: i }) => this.findPipeObjectWithID(i)).filter(T) : this.pipeObjects;
|
|
335
407
|
}
|
|
336
408
|
}
|
|
337
409
|
export {
|
|
338
|
-
|
|
410
|
+
_e as Controller
|
|
339
411
|
};
|