@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
|
@@ -1,27 +1,99 @@
|
|
|
1
1
|
import { PanoVideoPluginController as r } from "./Controller.js";
|
|
2
|
-
import { typings as
|
|
2
|
+
import { typings as Qo } 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 "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
89
|
+
import "../shared-utils/isTouchDevice.js";
|
|
90
|
+
import "../shared-utils/five/getPosition.js";
|
|
91
|
+
import "../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
92
|
+
import "../shared-utils/animationFrame/index.js";
|
|
93
|
+
import "./utils/index.js";
|
|
94
|
+
const Mo = (o) => new r(o);
|
|
23
95
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
96
|
+
Mo as PanoVideoPlugin,
|
|
97
|
+
Qo as PanoVideoPluginType,
|
|
98
|
+
Mo as default
|
|
27
99
|
};
|
|
@@ -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,86 @@ 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 "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
118
|
+
import "../shared-utils/isTouchDevice.js";
|
|
119
|
+
import "../shared-utils/five/getPosition.js";
|
|
120
|
+
import "../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
50
121
|
import "../shared-utils/isTruelyObject.js";
|
|
51
122
|
import "../shared-utils/animationFrame/index.js";
|
|
52
123
|
import "./utils/Objects/Pipe.js";
|
|
@@ -55,11 +126,11 @@ import "../shared-utils/three/Extras/Curves/BezierCurve3.js";
|
|
|
55
126
|
import "../shared-utils/three/Extras/Core/Interpolations.js";
|
|
56
127
|
import "../shared-utils/three/Extras/Core/Interpolations2.js";
|
|
57
128
|
const g = { flowSpeed: 0.6, rotateSpeed: 0 };
|
|
58
|
-
class
|
|
59
|
-
constructor(
|
|
60
|
-
super(
|
|
129
|
+
class Pe extends S {
|
|
130
|
+
constructor(t) {
|
|
131
|
+
super(t);
|
|
61
132
|
// ==================== public properties ====================
|
|
62
|
-
|
|
133
|
+
d(this, "data");
|
|
63
134
|
/** 插件状态
|
|
64
135
|
* @property `visible` `<boolean>` 是否可见
|
|
65
136
|
* @property `enabled` `<boolean>` 是否启用
|
|
@@ -68,29 +139,29 @@ class ne extends S {
|
|
|
68
139
|
* @property `speed.flowSpeed` `<number>` 横向流动速度,默认是 0.6 m/s
|
|
69
140
|
* @property `speed.rotateSpeed` `<number>` 纵向旋转速度:默认是 0 deg/s
|
|
70
141
|
*/
|
|
71
|
-
|
|
142
|
+
d(this, "state");
|
|
72
143
|
/** 当前插件所有新增 THREE 相关副作用都在 group 下 */
|
|
73
|
-
|
|
144
|
+
d(this, "group");
|
|
74
145
|
/** 用于展示水流的水管 */
|
|
75
|
-
|
|
146
|
+
d(this, "pipeObjects", []);
|
|
76
147
|
// ==================== private properties ====================
|
|
77
148
|
/** 水管贴图缓存 */
|
|
78
|
-
|
|
149
|
+
d(this, "texturePromiseCache", /* @__PURE__ */ new Map());
|
|
79
150
|
/** 销毁插件,移除所有副作用,销毁后将不响应任何 API */
|
|
80
|
-
|
|
81
|
-
this.disable(), this.five.scene.remove(this.group), this.texturePromiseCache.forEach((
|
|
151
|
+
d(this, "dispose", () => {
|
|
152
|
+
this.disable(), this.five.scene.remove(this.group), this.texturePromiseCache.forEach((t) => t.then((e) => e.dispose())), this.texturePromiseCache.clear();
|
|
82
153
|
});
|
|
83
|
-
|
|
84
|
-
const [
|
|
154
|
+
d(this, "onWantsFiveTapGesture", (...t) => {
|
|
155
|
+
const [e] = t, i = e.intersectObjects(this.pipeObjects, !1);
|
|
85
156
|
if (i.length === 0 || !this.data)
|
|
86
157
|
return;
|
|
87
|
-
const
|
|
88
|
-
if (!(!
|
|
158
|
+
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));
|
|
159
|
+
if (!(!o || !h))
|
|
89
160
|
return this.hooks.emit("tap", {
|
|
90
161
|
intersectObjects: i,
|
|
91
|
-
pipe:
|
|
92
|
-
pipeline:
|
|
93
|
-
wantsFiveTapGestureParams:
|
|
162
|
+
pipe: o,
|
|
163
|
+
pipeline: h,
|
|
164
|
+
wantsFiveTapGestureParams: t
|
|
94
165
|
}), !1;
|
|
95
166
|
});
|
|
96
167
|
this.state = {
|
|
@@ -99,7 +170,7 @@ class ne extends S {
|
|
|
99
170
|
enabled: !0,
|
|
100
171
|
isFlowing: !1,
|
|
101
172
|
speed: g
|
|
102
|
-
}, this.five =
|
|
173
|
+
}, 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
174
|
}
|
|
104
175
|
/** 加载管道数据,重复调用会使用新数据覆盖旧数据
|
|
105
176
|
* @param `data` `<Plugin.ServerData>` Open API 接口返回的数据。
|
|
@@ -111,20 +182,20 @@ class ne extends S {
|
|
|
111
182
|
* 函数返回的 string 就是当前 water 对应的贴图地址。
|
|
112
183
|
*/
|
|
113
184
|
// eslint-disable-next-line max-params
|
|
114
|
-
load(
|
|
115
|
-
return
|
|
185
|
+
load(t, e, i, s) {
|
|
186
|
+
return c(this, null, function* () {
|
|
116
187
|
const r = this.data;
|
|
117
|
-
this.data = yield this.formatData(
|
|
118
|
-
this.data.pipes.filter((
|
|
119
|
-
const
|
|
188
|
+
this.data = yield this.formatData(t, s), this.removeAllPipes(), this.hooks.emit("dataChange", this.data, r), this.pipeObjects = yield Promise.all(
|
|
189
|
+
this.data.pipes.filter((p) => !!(p != null && p.texture)).map((b) => c(this, [b], function* ({ id: p, texture: o, path: h, radius: n }) {
|
|
190
|
+
const l = yield this.loadPipeTexture(o), f = { id: p, path: h, textureURL: o, texture: l, geometryConfig: { radius: n } };
|
|
120
191
|
return new D(f);
|
|
121
192
|
}))
|
|
122
|
-
), this.data.pipelines.forEach((
|
|
123
|
-
|
|
124
|
-
const
|
|
125
|
-
return
|
|
193
|
+
), this.data.pipelines.forEach((p) => {
|
|
194
|
+
p.pipes.reduce((o, h) => {
|
|
195
|
+
const n = this.findPipeObjectWithID(h.id);
|
|
196
|
+
return n == null || n.setInitialDisplacement(o), o + ((n == null ? void 0 : n.pathLength) || 0);
|
|
126
197
|
}, 0);
|
|
127
|
-
}), this.hooks.emit("dataLoaded", this.data), this.state.visible === !1 && this.pipeObjects.forEach((
|
|
198
|
+
}), 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
199
|
});
|
|
129
200
|
}
|
|
130
201
|
/** 更改插件 State
|
|
@@ -132,18 +203,18 @@ class ne extends S {
|
|
|
132
203
|
* @param `options` `<Option> | <undefined>`
|
|
133
204
|
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
134
205
|
*/
|
|
135
|
-
setState(
|
|
206
|
+
setState(t, e = {}) {
|
|
136
207
|
const i = this.state;
|
|
137
|
-
if (O(
|
|
208
|
+
if (O(t, i, { deep: !0 }))
|
|
138
209
|
return;
|
|
139
|
-
const s =
|
|
140
|
-
if (this.updateState(
|
|
210
|
+
const s = e.userAction !== void 0 ? e.userAction : !0;
|
|
211
|
+
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
212
|
const r = { userAction: s, anime: { duration: 500 } };
|
|
142
|
-
|
|
213
|
+
t.visible ? this._show(r) : this._hide(r);
|
|
143
214
|
}
|
|
144
|
-
if (
|
|
215
|
+
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
216
|
const r = {
|
|
146
|
-
target:
|
|
217
|
+
target: t.target,
|
|
147
218
|
showAnime: { duration: 500 },
|
|
148
219
|
hideAnime: { duration: 500 }
|
|
149
220
|
};
|
|
@@ -154,23 +225,23 @@ class ne extends S {
|
|
|
154
225
|
* @param `options` `<Option> | <undefined>`
|
|
155
226
|
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
156
227
|
*/
|
|
157
|
-
enable(
|
|
228
|
+
enable(t = {}) {
|
|
158
229
|
var i;
|
|
159
230
|
if (this.state.enabled)
|
|
160
231
|
return;
|
|
161
|
-
const
|
|
162
|
-
this.updateState({ enabled: !0 },
|
|
232
|
+
const e = (i = t.userAction) != null ? i : !0;
|
|
233
|
+
this.updateState({ enabled: !0 }, e), this._enable({ userAction: e });
|
|
163
234
|
}
|
|
164
235
|
/** 禁用插件
|
|
165
236
|
* @param `options` `<Option> | <undefined>`
|
|
166
237
|
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
167
238
|
*/
|
|
168
|
-
disable(
|
|
239
|
+
disable(t = {}) {
|
|
169
240
|
var i;
|
|
170
241
|
if (this.state.enabled === !1)
|
|
171
242
|
return;
|
|
172
|
-
const
|
|
173
|
-
this.updateState({ enabled: !1, isFlowing: !1 },
|
|
243
|
+
const e = (i = t.userAction) != null ? i : !0;
|
|
244
|
+
this.updateState({ enabled: !1, isFlowing: !1 }, e), this._disable({ userAction: e });
|
|
174
245
|
}
|
|
175
246
|
/** 展示管道模型,注意如果通过 `switchPipelines` 更改过 `visibleIDs`,则只会展示这一部分模型。
|
|
176
247
|
* @param `options` `<Partial<ShowHideOptions>> | <undefined>`
|
|
@@ -179,14 +250,14 @@ class ne extends S {
|
|
|
179
250
|
* @param `options.anime.duration` `<number> | <undefined>` 动画时间,默认是 500ms。
|
|
180
251
|
*/
|
|
181
252
|
show() {
|
|
182
|
-
return
|
|
253
|
+
return c(this, arguments, function* (t = {}) {
|
|
183
254
|
if (this.state.visible)
|
|
184
255
|
return;
|
|
185
|
-
const
|
|
256
|
+
const e = u({
|
|
186
257
|
userAction: !0,
|
|
187
258
|
anime: { duration: 500 }
|
|
188
|
-
},
|
|
189
|
-
this.updateState({ visible: !0 },
|
|
259
|
+
}, t);
|
|
260
|
+
this.updateState({ visible: !0 }, e.userAction), yield this._show(e);
|
|
190
261
|
});
|
|
191
262
|
}
|
|
192
263
|
/** 插件内容整体隐藏
|
|
@@ -196,14 +267,14 @@ class ne extends S {
|
|
|
196
267
|
* @param `options.anime.duration` `<number> | <undefined>` 动画时间,默认是 500ms。
|
|
197
268
|
*/
|
|
198
269
|
hide() {
|
|
199
|
-
return
|
|
270
|
+
return c(this, arguments, function* (t = {}) {
|
|
200
271
|
if (this.state.visible === !1)
|
|
201
272
|
return;
|
|
202
|
-
const
|
|
273
|
+
const e = u({
|
|
203
274
|
userAction: !0,
|
|
204
275
|
anime: { duration: 500 }
|
|
205
|
-
},
|
|
206
|
-
this.updateState({ visible: !1 },
|
|
276
|
+
}, t);
|
|
277
|
+
this.updateState({ visible: !1 }, e.userAction), yield this._hide(e);
|
|
207
278
|
});
|
|
208
279
|
}
|
|
209
280
|
/** 切换管路
|
|
@@ -216,124 +287,124 @@ class ne extends S {
|
|
|
216
287
|
* @param `options.anime` `<AnimeOptions> | <undefined>` 兜底的动画配置。
|
|
217
288
|
* @param `options.userAction` `<boolean> | <undefined>` 是否是否是用户操作。
|
|
218
289
|
* */
|
|
219
|
-
switchPipelines(
|
|
220
|
-
return
|
|
221
|
-
var
|
|
290
|
+
switchPipelines(t) {
|
|
291
|
+
return c(this, null, function* () {
|
|
292
|
+
var h, n, b, l, f, w;
|
|
222
293
|
if (!this.data)
|
|
223
294
|
return;
|
|
224
|
-
const
|
|
225
|
-
this.updateState({ target:
|
|
226
|
-
const s = { duration: 500 }, r = (
|
|
227
|
-
target:
|
|
228
|
-
showAnime:
|
|
295
|
+
const e = (h = t == null ? void 0 : t.target) != null ? h : null, i = (n = t == null ? void 0 : t.userAction) != null ? n : !0;
|
|
296
|
+
this.updateState({ target: e }, i);
|
|
297
|
+
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 = {
|
|
298
|
+
target: e,
|
|
299
|
+
showAnime: p,
|
|
229
300
|
hideAnime: r
|
|
230
301
|
};
|
|
231
|
-
this._switchPipelines(
|
|
302
|
+
this._switchPipelines(o);
|
|
232
303
|
});
|
|
233
304
|
}
|
|
234
305
|
/** 开始流动 */
|
|
235
|
-
flow(
|
|
306
|
+
flow(t = {}) {
|
|
236
307
|
var i;
|
|
237
308
|
if (this.state.isFlowing)
|
|
238
309
|
return;
|
|
239
|
-
const
|
|
240
|
-
this.updateState({ isFlowing: !0 },
|
|
310
|
+
const e = (i = t.userAction) != null ? i : !0;
|
|
311
|
+
this.updateState({ isFlowing: !0 }, e), this._flow();
|
|
241
312
|
}
|
|
242
313
|
/** 停止流动 */
|
|
243
|
-
stopFlow(
|
|
314
|
+
stopFlow(t = {}) {
|
|
244
315
|
var i;
|
|
245
316
|
if (this.state.isFlowing === !1)
|
|
246
317
|
return;
|
|
247
|
-
const
|
|
248
|
-
this.updateState({ isFlowing: !1 },
|
|
318
|
+
const e = (i = t.userAction) != null ? i : !0;
|
|
319
|
+
this.updateState({ isFlowing: !1 }, e), this._stopFlow();
|
|
249
320
|
}
|
|
250
321
|
/** 更改水管流速
|
|
251
322
|
* @param `options` `<SetSpeedOptions> | <undefined>`
|
|
252
323
|
* @param `options.speed` `<Speed> | <undefined>` 参考 `state.speed` 的描述。
|
|
253
324
|
* @param `options.userAction` `<boolean> | <undefined>` 是否是否是用户操作。
|
|
254
325
|
*/
|
|
255
|
-
setSpeed(
|
|
326
|
+
setSpeed(t) {
|
|
256
327
|
var s, r;
|
|
257
|
-
const
|
|
258
|
-
this.updateState({ speed:
|
|
328
|
+
const e = (s = t == null ? void 0 : t.speed) != null ? s : g, i = (r = t.userAction) != null ? r : !0;
|
|
329
|
+
this.updateState({ speed: e }, i), this._setSpeed(e);
|
|
259
330
|
}
|
|
260
|
-
formatData(
|
|
261
|
-
return
|
|
262
|
-
return y(
|
|
331
|
+
formatData(t, e) {
|
|
332
|
+
return c(this, null, function* () {
|
|
333
|
+
return y(t, e);
|
|
263
334
|
});
|
|
264
335
|
}
|
|
265
|
-
_enable(
|
|
266
|
-
this.hooks.emit("enable", { userAction:
|
|
336
|
+
_enable(t) {
|
|
337
|
+
this.hooks.emit("enable", { userAction: t.userAction }), this.five.scene.add(this.group), this.five.needsRender = !0, this.five.on("wantsTapGesture", this.onWantsFiveTapGesture);
|
|
267
338
|
}
|
|
268
|
-
_disable(
|
|
269
|
-
this.hooks.emit("disable", { userAction:
|
|
339
|
+
_disable(t) {
|
|
340
|
+
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
341
|
}
|
|
271
|
-
_show(
|
|
272
|
-
return
|
|
342
|
+
_show(t) {
|
|
343
|
+
return c(this, null, function* () {
|
|
273
344
|
var s;
|
|
274
|
-
this.hooks.emit("show", { userAction:
|
|
275
|
-
const
|
|
276
|
-
yield Promise.all(i.map((r) => r == null ? void 0 : r.show(
|
|
345
|
+
this.hooks.emit("show", { userAction: t.userAction });
|
|
346
|
+
const e = (s = t == null ? void 0 : t.anime) != null ? s : { duration: 500 }, i = this.findPipeObjectWithTarget(this.state.target);
|
|
347
|
+
yield Promise.all(i.map((r) => r == null ? void 0 : r.show(e))), this.five.needsRender = !0;
|
|
277
348
|
});
|
|
278
349
|
}
|
|
279
|
-
_hide(
|
|
280
|
-
return
|
|
350
|
+
_hide(t) {
|
|
351
|
+
return c(this, null, function* () {
|
|
281
352
|
var i;
|
|
282
|
-
this.hooks.emit("hide", { userAction:
|
|
283
|
-
const
|
|
284
|
-
yield Promise.all(this.pipeObjects.map((s) => s.hide(
|
|
353
|
+
this.hooks.emit("hide", { userAction: t.userAction });
|
|
354
|
+
const e = (i = t == null ? void 0 : t.anime) != null ? i : { duration: 500 };
|
|
355
|
+
yield Promise.all(this.pipeObjects.map((s) => s.hide(e))), this.five.needsRender = !0;
|
|
285
356
|
});
|
|
286
357
|
}
|
|
287
|
-
_switchPipelines(
|
|
288
|
-
return
|
|
358
|
+
_switchPipelines(t) {
|
|
359
|
+
return c(this, null, function* () {
|
|
289
360
|
if (!this.data)
|
|
290
361
|
return;
|
|
291
|
-
const
|
|
362
|
+
const e = this.findPipeObjectWithTarget(t.target), i = t.hideAnime;
|
|
292
363
|
yield Promise.all(this.pipeObjects.map((r) => r.hide(i)));
|
|
293
|
-
const s =
|
|
294
|
-
yield Promise.all(
|
|
364
|
+
const s = t.showAnime;
|
|
365
|
+
yield Promise.all(e.map((r) => r.show(s)));
|
|
295
366
|
});
|
|
296
367
|
}
|
|
297
368
|
_flow() {
|
|
298
|
-
this.pipeObjects.forEach((
|
|
369
|
+
this.pipeObjects.forEach((t) => t.flow());
|
|
299
370
|
}
|
|
300
371
|
_stopFlow() {
|
|
301
|
-
this.pipeObjects.forEach((
|
|
372
|
+
this.pipeObjects.forEach((t) => t.stopFlow());
|
|
302
373
|
}
|
|
303
|
-
_setSpeed(
|
|
304
|
-
this.pipeObjects.forEach((
|
|
374
|
+
_setSpeed(t) {
|
|
375
|
+
this.pipeObjects.forEach((e) => e.setSpeed(t));
|
|
305
376
|
}
|
|
306
|
-
updateState(
|
|
377
|
+
updateState(t, e) {
|
|
307
378
|
const i = this.state;
|
|
308
|
-
this.state =
|
|
379
|
+
this.state = u(u({}, this.state), t), this.hooks.emit("stateChange", { state: this.state, prevState: i, userAction: e });
|
|
309
380
|
}
|
|
310
381
|
/** 加载管道贴图,如果再加载中,复用之前的加载 Promise */
|
|
311
|
-
loadPipeTexture(
|
|
312
|
-
return
|
|
313
|
-
const
|
|
314
|
-
if (
|
|
315
|
-
return
|
|
316
|
-
const i = x(
|
|
317
|
-
return this.texturePromiseCache.set(
|
|
382
|
+
loadPipeTexture(t) {
|
|
383
|
+
return c(this, null, function* () {
|
|
384
|
+
const e = this.texturePromiseCache.get(t);
|
|
385
|
+
if (e)
|
|
386
|
+
return e;
|
|
387
|
+
const i = x(t);
|
|
388
|
+
return this.texturePromiseCache.set(t, i), i;
|
|
318
389
|
});
|
|
319
390
|
}
|
|
320
391
|
/** 销毁所有动画 */
|
|
321
392
|
disposeAnime() {
|
|
322
|
-
this.pipeObjects.forEach((
|
|
393
|
+
this.pipeObjects.forEach((t) => t.disposeAnime()), this.five.needsRender = !0;
|
|
323
394
|
}
|
|
324
395
|
/** 移除所有管道模型 */
|
|
325
396
|
removeAllPipes() {
|
|
326
|
-
this.disposeAnime(), this.group.remove(...this.pipeObjects), this.pipeObjects.forEach((
|
|
397
|
+
this.disposeAnime(), this.group.remove(...this.pipeObjects), this.pipeObjects.forEach((t) => t.dispose()), this.pipeObjects = [], this.five.needsRender = !0;
|
|
327
398
|
}
|
|
328
399
|
/** 根据 ID 查找管道模型 */
|
|
329
|
-
findPipeObjectWithID(
|
|
330
|
-
return this.pipeObjects.find(({ customID:
|
|
400
|
+
findPipeObjectWithID(t) {
|
|
401
|
+
return this.pipeObjects.find(({ customID: e }) => e === t);
|
|
331
402
|
}
|
|
332
403
|
/** 根据 target 查找管道模型 */
|
|
333
|
-
findPipeObjectWithTarget(
|
|
334
|
-
return
|
|
404
|
+
findPipeObjectWithTarget(t) {
|
|
405
|
+
return t ? C({ data: this.data, target: t }).map(({ id: i }) => this.findPipeObjectWithID(i)).filter(T) : this.pipeObjects;
|
|
335
406
|
}
|
|
336
407
|
}
|
|
337
408
|
export {
|
|
338
|
-
|
|
409
|
+
Pe as Controller
|
|
339
410
|
};
|