@realsee/dnalogel 3.43.0 → 3.44.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 +4 -0
- package/dist/CSS3DRenderPlugin/utils/three/CSS3DObject.d.ts +4 -2
- package/dist/CSS3DRenderPlugin/utils/three/CSS3DRenderer.d.ts +2 -1
- package/dist/CSS3DRenderPlugin/utils/three/CSS3DSprite.d.ts +4 -0
- package/dist/PanoMeasurePlugin/Controller/BaseController.d.ts +6 -1
- package/dist/PanoMeasurePlugin/Controller/EditController.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Controller/index.d.ts +2 -0
- package/dist/Sculpt/Meshes/Line.d.ts +19 -1
- package/dist/Sculpt/utils/color.d.ts +1 -1
- package/dist/index.cjs.js +102 -68
- package/dist/index.js +7374 -7116
- package/dist/index.umd.js +106 -72
- package/dist/shared-utils/five/getPosition.d.ts +12 -4
- package/dist/shared-utils/five/initialCSS3DRender.d.ts +2 -0
- package/dist/shared-utils/math/deg2Rad.d.ts +1 -1
- package/dist/shared-utils/math/rad2Deg.d.ts +1 -1
- package/dist/shared-utils/positionToVector3.d.ts +6 -6
- package/{libs/shared-utils/three/PointSelector.d.ts → dist/shared-utils/three/PointSelector/index.d.ts} +23 -7
- package/dist/shared-utils/three/{PointHelper.d.ts → PointSelector/utils/PointHelper.d.ts} +11 -3
- package/dist/shared-utils/three/PointSelector/utils/PointHelper2.d.ts +30 -0
- package/dist/shared-utils/three/{PointSelectorHelper.d.ts → PointSelector/utils/PointSelectorHelper.d.ts} +9 -10
- package/dist/shared-utils/three/PointSelector/utils/typing.d.ts +8 -0
- package/dist/shared-utils/three/index.d.ts +2 -3
- package/libs/AreaMakerPlugin/Controller.js +5 -18
- package/libs/AreaMakerPlugin/index.js +4 -17
- package/libs/AreaMakerPlugin/utils/Item.js +13 -26
- package/libs/CSS3DRenderPlugin/Controller.js +9 -6
- package/libs/CSS3DRenderPlugin/index.js +12 -9
- package/libs/CSS3DRenderPlugin/utils/getAllCSS3DObject.js +6 -6
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.d.ts +4 -2
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +73 -56
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +11 -4
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRenderer.d.ts +2 -1
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRenderer.js +14 -14
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DSprite.d.ts +4 -0
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DSprite.js +13 -0
- package/libs/CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js +85 -0
- package/libs/CruisePlugin/BaseController.js +20 -33
- package/libs/CruisePlugin/Move.js +25 -23
- package/libs/CruisePlugin/Work.js +10 -8
- package/libs/CruisePlugin/index.js +23 -21
- package/libs/CurrentPanoImagePlugin/Controller.js +30 -43
- package/libs/CurrentPanoImagePlugin/index.js +5 -18
- package/libs/GuideLinePlugin/Controller.js +15 -13
- package/libs/GuideLinePlugin/GuideLineItem.js +19 -17
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +4 -5
- package/libs/GuideLinePlugin/GuideLineModeItem.js +21 -19
- package/libs/GuideLinePlugin/index.js +23 -21
- package/libs/ModelMakerPlugin/Controller.js +19 -30
- package/libs/ModelMakerPlugin/index.js +11 -22
- package/libs/ModelTVVideoPlugin/Plugin.js +13 -10
- package/libs/ModelTVVideoPlugin/index.js +12 -9
- package/libs/Object3DHelperPlugin/Controller.js +7 -5
- package/libs/Object3DHelperPlugin/index.js +23 -21
- package/libs/PanoCompassPlugin/Controller.js +18 -15
- package/libs/PanoCompassPlugin/index.js +21 -18
- package/libs/PanoDoorLabelPlugin/BaseController.js +24 -37
- package/libs/PanoDoorLabelPlugin/Controller.js +56 -69
- package/libs/PanoDoorLabelPlugin/index.js +5 -18
- package/libs/PanoMeasurePlugin/Components/Controller0.js +40 -47
- package/libs/PanoMeasurePlugin/Components/Controller1.js +72 -79
- package/libs/PanoMeasurePlugin/Controller/BaseController.d.ts +6 -1
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +53 -39
- package/libs/PanoMeasurePlugin/Controller/EditController.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Controller/EditController.js +177 -153
- package/libs/PanoMeasurePlugin/Controller/MixedController.js +1 -1
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +60 -74
- package/libs/PanoMeasurePlugin/Controller/index.d.ts +2 -0
- package/libs/PanoMeasurePlugin/Controller/index.js +59 -60
- package/libs/PanoMeasurePlugin/Model/area.js +30 -44
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +3 -16
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +42 -49
- package/libs/PanoMeasurePlugin/Modules/rangePiece/index.js +1 -1
- package/libs/PanoMeasurePlugin/index.js +35 -40
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +23 -36
- package/libs/PanoSpatialTagPlugin/Plugin.js +41 -38
- package/libs/PanoSpatialTagPlugin/index.js +10 -7
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +29 -43
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +55 -69
- package/libs/PanoTagPlugin/Components/Tag/index.js +9 -19
- package/libs/PanoTagPlugin/Components/TagContainer.js +42 -52
- package/libs/PanoTagPlugin/Components/TagItem.js +9 -19
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +23 -33
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +29 -39
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +11 -21
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +18 -28
- package/libs/PanoTagPlugin/controller/TagRender.js +18 -16
- package/libs/PanoTagPlugin/controller/TagUtil.js +12 -9
- package/libs/PanoTagPlugin/controller/index.js +27 -25
- package/libs/PanoTagPlugin/index.js +28 -26
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +43 -57
- package/libs/PanoVideoPlugin/Controller.js +52 -65
- package/libs/PanoVideoPlugin/VideoMeshController.js +11 -25
- package/libs/PanoVideoPlugin/index.js +8 -21
- package/libs/PipelinePlugin/Controller.js +44 -57
- package/libs/PipelinePlugin/index.js +5 -18
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +20 -34
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +16 -30
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +39 -53
- package/libs/Sculpt/Meshes/Box.js +3 -3
- package/libs/Sculpt/Meshes/Cylinder.js +14 -14
- package/libs/Sculpt/Meshes/Line.d.ts +19 -1
- package/libs/Sculpt/Meshes/Line.js +40 -41
- package/libs/Sculpt/Meshes/LineWithDots.js +5 -6
- package/libs/Sculpt/Meshes/Point.js +3 -3
- package/libs/Sculpt/Meshes/Polyline.js +3 -3
- package/libs/Sculpt/Meshes/Prism.js +11 -12
- package/libs/Sculpt/Meshes/Rectangle.js +3 -3
- package/libs/Sculpt/Objects/Point/Editor.js +10 -10
- package/libs/Sculpt/Objects/Polygon/Editor.js +6 -6
- package/libs/Sculpt/Objects/Polyline/Editor.js +4 -4
- package/libs/Sculpt/index.js +3 -3
- package/libs/Sculpt/utils/Modules/Global.js +1 -1
- package/libs/Sculpt/utils/color.d.ts +1 -1
- package/libs/Sculpt/utils/three/ColoredMesh.js +3 -3
- package/libs/base/BasePlugin.js +4 -4
- package/libs/floorplan/Components/Compass.js +29 -31
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +9 -22
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +6 -19
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +5 -18
- package/libs/floorplan/ModelFloorplanPlugin/index.js +5 -18
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +48 -61
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +5 -18
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +28 -41
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +5 -18
- package/libs/floorplan/index.js +3 -3
- package/libs/index.js +140 -137
- package/libs/shared-utils/five/getPosition.d.ts +12 -4
- package/libs/shared-utils/five/getPosition.js +23 -23
- package/libs/shared-utils/five/index.js +2 -2
- package/libs/shared-utils/five/initialCSS3DRender.d.ts +2 -0
- package/libs/shared-utils/five/initialCSS3DRender.js +17 -0
- package/libs/shared-utils/five/lookObject.js +3 -3
- package/libs/shared-utils/index.js +38 -40
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/math/deg2Rad.d.ts +1 -1
- package/libs/shared-utils/math/rad2Deg.d.ts +1 -1
- package/libs/shared-utils/positionToVector3.d.ts +6 -6
- package/{dist/shared-utils/three/PointSelector.d.ts → libs/shared-utils/three/PointSelector/index.d.ts} +23 -7
- package/libs/shared-utils/three/{PointSelector.js → PointSelector/index.js} +54 -45
- package/libs/shared-utils/three/{PointHelper.d.ts → PointSelector/utils/PointHelper.d.ts} +11 -3
- package/libs/shared-utils/three/PointSelector/utils/PointHelper.js +95 -0
- package/libs/shared-utils/three/PointSelector/utils/PointHelper2.d.ts +30 -0
- package/libs/shared-utils/three/PointSelector/utils/PointHelper2.js +153 -0
- package/libs/shared-utils/three/{PointSelectorHelper.d.ts → PointSelector/utils/PointSelectorHelper.d.ts} +9 -10
- package/libs/shared-utils/three/PointSelector/utils/PointSelectorHelper.js +60 -0
- package/libs/{PanoMeasurePlugin/Modules/rangePiece → shared-utils/three/PointSelector/utils}/html.js +3 -4
- package/libs/shared-utils/three/PointSelector/utils/typing.d.ts +8 -0
- package/libs/shared-utils/three/index.d.ts +2 -3
- package/libs/shared-utils/three/index.js +3 -3
- package/package.json +3 -3
- package/dist/shared-utils/three/PointDomHelper.d.ts +0 -18
- package/libs/shared-utils/three/PointDomHelper.d.ts +0 -18
- package/libs/shared-utils/three/PointDomHelper.js +0 -62
- package/libs/shared-utils/three/PointHelper.js +0 -73
- package/libs/shared-utils/three/PointSelectorHelper.js +0 -52
- /package/dist/{PanoMeasurePlugin/Modules/rangePiece → shared-utils/three/PointSelector/utils}/html.d.ts +0 -0
- /package/libs/{PanoMeasurePlugin/Modules/rangePiece → shared-utils/three/PointSelector/utils}/html.d.ts +0 -0
|
@@ -1,29 +1,15 @@
|
|
|
1
1
|
var v = Object.defineProperty;
|
|
2
|
-
var u = (o,
|
|
3
|
-
var r = (o,
|
|
2
|
+
var u = (o, i, t) => i in o ? v(o, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[i] = t;
|
|
3
|
+
var r = (o, i, t) => (u(o, typeof i != "symbol" ? i + "" : i, t), t);
|
|
4
4
|
import "three";
|
|
5
5
|
import "hammerjs";
|
|
6
|
-
import "
|
|
7
|
-
import "
|
|
8
|
-
import "../../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
6
|
+
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
7
|
+
import "@realsee/five/line";
|
|
9
8
|
import "../../../shared-utils/three/THREESphere.js";
|
|
10
9
|
import "animejs";
|
|
11
10
|
import { requestAnimationFrameInterval as c } from "../../../shared-utils/animationFrame/index.js";
|
|
12
11
|
import { ObjectPipe as h } from "./Pipe.js";
|
|
13
|
-
import "../../../
|
|
14
|
-
import "../../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
15
|
-
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
16
|
-
import "../../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
17
|
-
import "../../../shared-utils/util.js";
|
|
18
|
-
import "../../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
19
|
-
import "../../../CSS3DRenderPlugin/utils/even.js";
|
|
20
|
-
import "../../../shared-utils/Subscribe.js";
|
|
21
|
-
import "../../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
22
|
-
import "../../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
23
|
-
import "../../../shared-utils/three/centerPoint.js";
|
|
24
|
-
import "../../../shared-utils/three/getObjectVisible.js";
|
|
25
|
-
import "../../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
26
|
-
import "../../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
12
|
+
import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
27
13
|
import "../../../shared-utils/animationFrame/BetterTween.js";
|
|
28
14
|
import "../../../shared-utils/three/Extras/Curves/BezierCurve3.js";
|
|
29
15
|
import "../../../shared-utils/three/Extras/Core/Interpolations.js";
|
|
@@ -47,7 +33,7 @@ const d = (
|
|
|
47
33
|
}
|
|
48
34
|
`
|
|
49
35
|
);
|
|
50
|
-
class
|
|
36
|
+
class x extends h {
|
|
51
37
|
constructor(t) {
|
|
52
38
|
super(t, d);
|
|
53
39
|
/** 初始状态下,当前水管内的水流在整体管道上的位移
|
|
@@ -62,36 +48,36 @@ class K extends h {
|
|
|
62
48
|
r(this, "flowAnimationDisposer", () => {
|
|
63
49
|
});
|
|
64
50
|
}
|
|
65
|
-
setInitialDisplacement(t,
|
|
66
|
-
this.initialDisplacement = Math.abs(t) * (
|
|
51
|
+
setInitialDisplacement(t, e = "backward") {
|
|
52
|
+
this.initialDisplacement = Math.abs(t) * (e === "forward" ? -1 : 1), this.moveFromOrigin(this.initialDisplacement);
|
|
67
53
|
}
|
|
68
54
|
/** 水流移动「基于初始位置」
|
|
69
55
|
* @description 因为贴图的运动与 u 的 uOffset 相反,比较反直觉,所以封装方法易于理解
|
|
70
56
|
* @param displacement 位移:米 * 方向(向前 -> 正, 向后 -> 负)
|
|
71
57
|
*/
|
|
72
58
|
moveFromOrigin(t) {
|
|
73
|
-
const
|
|
74
|
-
return this.material.uniforms.uOffset.value =
|
|
59
|
+
const e = t * this.uPreMeter;
|
|
60
|
+
return this.material.uniforms.uOffset.value = e, this.material.needsUpdate = !0, this.needsRender = !0, !0;
|
|
75
61
|
}
|
|
76
62
|
/** 水流移动「基于调整管道差值之后的位置」
|
|
77
63
|
*
|
|
78
64
|
* @param distance 位移:米 * 方向
|
|
79
65
|
*/
|
|
80
66
|
moveForwardFromInitialOffset(t) {
|
|
81
|
-
const
|
|
82
|
-
this.moveFromOrigin(
|
|
67
|
+
const e = t * -1, n = this.initialDisplacement + e;
|
|
68
|
+
this.moveFromOrigin(n);
|
|
83
69
|
}
|
|
84
70
|
flow() {
|
|
85
71
|
this.flowAnimationDisposer(), this.oldTime = (/* @__PURE__ */ new Date()).getTime();
|
|
86
|
-
let t = 0,
|
|
87
|
-
const
|
|
88
|
-
const
|
|
89
|
-
t = t +
|
|
90
|
-
const
|
|
91
|
-
this.material.uniforms.vOffset.value =
|
|
72
|
+
let t = 0, e = 0;
|
|
73
|
+
const n = c(() => {
|
|
74
|
+
const s = (/* @__PURE__ */ new Date()).getTime(), a = s - this.oldTime, m = this.flowSpeed * (a / 1e3), l = this.rotateSpeed * (a / 1e3);
|
|
75
|
+
t = t + m, e = e + l;
|
|
76
|
+
const f = 1 / 360, p = e * f;
|
|
77
|
+
this.material.uniforms.vOffset.value = p, this.moveForwardFromInitialOffset(t), this.oldTime = s;
|
|
92
78
|
});
|
|
93
79
|
this.flowAnimationDisposer = function() {
|
|
94
|
-
|
|
80
|
+
n(), this.moveForwardFromInitialOffset(0);
|
|
95
81
|
};
|
|
96
82
|
}
|
|
97
83
|
stopFlow() {
|
|
@@ -105,5 +91,5 @@ class K extends h {
|
|
|
105
91
|
}
|
|
106
92
|
}
|
|
107
93
|
export {
|
|
108
|
-
|
|
94
|
+
x as ObjectFlowPipe
|
|
109
95
|
};
|
|
@@ -1,48 +1,34 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var o = Object.defineProperty;
|
|
2
|
+
var a = (e, t, i) => t in e ? o(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
|
|
3
|
+
var s = (e, t, i) => (a(e, typeof t != "symbol" ? t + "" : t, i), i);
|
|
4
4
|
import "three";
|
|
5
5
|
import "hammerjs";
|
|
6
|
-
import "
|
|
7
|
-
import "
|
|
8
|
-
import "../../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
6
|
+
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
7
|
+
import "@realsee/five/line";
|
|
9
8
|
import "../../../shared-utils/three/THREESphere.js";
|
|
10
9
|
import "animejs";
|
|
11
|
-
import { tweenProgress as
|
|
12
|
-
import { ObjectPipe as
|
|
13
|
-
import "../../../
|
|
14
|
-
import "../../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
15
|
-
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
16
|
-
import "../../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
17
|
-
import "../../../shared-utils/util.js";
|
|
18
|
-
import "../../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
19
|
-
import "../../../CSS3DRenderPlugin/utils/even.js";
|
|
20
|
-
import "../../../shared-utils/Subscribe.js";
|
|
21
|
-
import "../../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
22
|
-
import "../../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
23
|
-
import "../../../shared-utils/three/centerPoint.js";
|
|
24
|
-
import "../../../shared-utils/three/getObjectVisible.js";
|
|
25
|
-
import "../../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
26
|
-
import "../../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
10
|
+
import { tweenProgress as n } from "../../../shared-utils/animationFrame/BetterTween.js";
|
|
11
|
+
import { ObjectPipe as p } from "./Pipe.js";
|
|
12
|
+
import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
27
13
|
import "../../../shared-utils/animationFrame/index.js";
|
|
28
14
|
import "../../../shared-utils/three/Extras/Curves/BezierCurve3.js";
|
|
29
15
|
import "../../../shared-utils/three/Extras/Core/Interpolations.js";
|
|
30
16
|
import "../../../shared-utils/three/Extras/Core/Interpolations2.js";
|
|
31
|
-
class
|
|
17
|
+
class x extends p {
|
|
32
18
|
constructor(i) {
|
|
33
19
|
super(i);
|
|
34
|
-
|
|
35
|
-
|
|
20
|
+
s(this, "imageCount", 64);
|
|
21
|
+
s(this, "highlightAnime");
|
|
36
22
|
}
|
|
37
23
|
highlight(i) {
|
|
38
24
|
const r = (i == null ? void 0 : i.duration) || 500;
|
|
39
|
-
this.disposeAnime(), this.highlightAnime =
|
|
25
|
+
this.disposeAnime(), this.highlightAnime = n(r).onUpdate(({ progress: h }) => this.setOpacity(h)).yoyo(!0).repeat(1 / 0).play();
|
|
40
26
|
}
|
|
41
27
|
highlight1(i) {
|
|
42
28
|
const r = (i == null ? void 0 : i.duration) || 2500;
|
|
43
|
-
this.disposeAnime(), this.highlightAnime =
|
|
44
|
-
const
|
|
45
|
-
this.material.uniforms.vOffset.value !==
|
|
29
|
+
this.disposeAnime(), this.highlightAnime = n(r).onUpdate(({ progress: h }) => {
|
|
30
|
+
const m = -(Math.ceil(h * this.imageCount) - 1) / this.imageCount;
|
|
31
|
+
this.material.uniforms.vOffset.value !== m && (this.material.uniforms.vOffset.value = m, this.material.needsUpdate = !0, this.needsRender = !0);
|
|
46
32
|
}).repeat(1 / 0).play();
|
|
47
33
|
}
|
|
48
34
|
disposeAnime() {
|
|
@@ -51,5 +37,5 @@ class J extends a {
|
|
|
51
37
|
}
|
|
52
38
|
}
|
|
53
39
|
export {
|
|
54
|
-
|
|
40
|
+
x as ObjectHighlightPipe
|
|
55
41
|
};
|
|
@@ -1,54 +1,40 @@
|
|
|
1
1
|
var d = Object.defineProperty;
|
|
2
2
|
var v = Object.getOwnPropertySymbols;
|
|
3
3
|
var A = Object.prototype.hasOwnProperty, w = Object.prototype.propertyIsEnumerable;
|
|
4
|
-
var f = (
|
|
4
|
+
var f = (o, e, t) => e in o ? d(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t, y = (o, e) => {
|
|
5
5
|
for (var t in e || (e = {}))
|
|
6
|
-
A.call(e, t) && f(
|
|
6
|
+
A.call(e, t) && f(o, t, e[t]);
|
|
7
7
|
if (v)
|
|
8
8
|
for (var t of v(e))
|
|
9
|
-
w.call(e, t) && f(
|
|
10
|
-
return
|
|
9
|
+
w.call(e, t) && f(o, t, e[t]);
|
|
10
|
+
return o;
|
|
11
11
|
};
|
|
12
|
-
var
|
|
13
|
-
var l = (
|
|
14
|
-
var
|
|
12
|
+
var p = (o, e, t) => (f(o, typeof e != "symbol" ? e + "" : e, t), t);
|
|
13
|
+
var l = (o, e, t) => new Promise((i, s) => {
|
|
14
|
+
var a = (u) => {
|
|
15
15
|
try {
|
|
16
|
-
n(t.next(
|
|
16
|
+
n(t.next(u));
|
|
17
17
|
} catch (c) {
|
|
18
18
|
s(c);
|
|
19
19
|
}
|
|
20
|
-
}, r = (
|
|
20
|
+
}, r = (u) => {
|
|
21
21
|
try {
|
|
22
|
-
n(t.throw(
|
|
22
|
+
n(t.throw(u));
|
|
23
23
|
} catch (c) {
|
|
24
24
|
s(c);
|
|
25
25
|
}
|
|
26
|
-
}, n = (
|
|
27
|
-
n((t = t.apply(
|
|
26
|
+
}, n = (u) => u.done ? i(u.value) : Promise.resolve(u.value).then(a, r);
|
|
27
|
+
n((t = t.apply(o, e)).next());
|
|
28
28
|
});
|
|
29
|
-
import * as
|
|
29
|
+
import * as m from "three";
|
|
30
30
|
import "hammerjs";
|
|
31
|
-
import "
|
|
32
|
-
import "
|
|
33
|
-
import "../../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
31
|
+
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
32
|
+
import "@realsee/five/line";
|
|
34
33
|
import "../../../shared-utils/three/THREESphere.js";
|
|
35
34
|
import "animejs";
|
|
36
35
|
import { BetterTween as g } from "../../../shared-utils/animationFrame/BetterTween.js";
|
|
37
36
|
import { CustomBezierCurve3 as x } from "../../../shared-utils/three/Extras/Curves/BezierCurve3.js";
|
|
38
|
-
import "../../../
|
|
39
|
-
import "../../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
40
|
-
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
41
|
-
import "../../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
42
|
-
import "../../../shared-utils/util.js";
|
|
43
|
-
import "../../../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
44
|
-
import "../../../CSS3DRenderPlugin/utils/even.js";
|
|
45
|
-
import "../../../shared-utils/Subscribe.js";
|
|
46
|
-
import "../../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
47
|
-
import "../../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
48
|
-
import "../../../shared-utils/three/centerPoint.js";
|
|
49
|
-
import "../../../shared-utils/three/getObjectVisible.js";
|
|
50
|
-
import "../../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
51
|
-
import "../../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
37
|
+
import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
52
38
|
import "../../../shared-utils/animationFrame/index.js";
|
|
53
39
|
import "../../../shared-utils/three/Extras/Core/Interpolations.js";
|
|
54
40
|
import "../../../shared-utils/three/Extras/Core/Interpolations2.js";
|
|
@@ -79,29 +65,29 @@ const C = (
|
|
|
79
65
|
}
|
|
80
66
|
`
|
|
81
67
|
);
|
|
82
|
-
class h extends
|
|
68
|
+
class h extends m.Mesh {
|
|
83
69
|
constructor(t, i = O) {
|
|
84
70
|
super();
|
|
85
|
-
|
|
71
|
+
p(this, "geometryConfig", {
|
|
86
72
|
radius: 1.5 / 100,
|
|
87
73
|
tubularSegments: 20,
|
|
88
74
|
radialSegments: 8
|
|
89
75
|
});
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
76
|
+
p(this, "customID");
|
|
77
|
+
p(this, "path");
|
|
78
|
+
p(this, "pathLength", 0);
|
|
79
|
+
p(this, "pathPoints");
|
|
80
|
+
p(this, "texture");
|
|
81
|
+
p(this, "opacityAnime");
|
|
96
82
|
/** u / m: 每米水管对应到贴图上,应该对应的 u 的长度 */
|
|
97
|
-
|
|
98
|
-
t.geometryConfig && (this.geometryConfig = y(y({}, this.geometryConfig), t.geometryConfig)), this.customID = t.id || this.uuid, this.pathPoints = t.path, this.path = h.calculatePath(t.path.map((
|
|
99
|
-
const { radius: s, tubularSegments:
|
|
83
|
+
p(this, "uPreMeter", 1);
|
|
84
|
+
t.geometryConfig && (this.geometryConfig = y(y({}, this.geometryConfig), t.geometryConfig)), this.customID = t.id || this.uuid, this.pathPoints = t.path, this.path = h.calculatePath(t.path.map((u) => new m.Vector3().fromArray(u))), this.pathLength = this.path.getLength(), this.texture = h.formatTexture(t.texture);
|
|
85
|
+
const { radius: s, tubularSegments: a, radialSegments: r } = this.geometryConfig, n = h.formatTexture(t.texture);
|
|
100
86
|
this.geometry = h.formatGeometryUV(
|
|
101
|
-
new
|
|
87
|
+
new m.TubeBufferGeometry(this.path, a, s, r),
|
|
102
88
|
this.pathLength,
|
|
103
89
|
this.uPreMeter
|
|
104
|
-
), this.material = new
|
|
90
|
+
), this.material = new m.ShaderMaterial({
|
|
105
91
|
uniforms: {
|
|
106
92
|
opacity: { value: 1 },
|
|
107
93
|
uOffset: { value: 0 },
|
|
@@ -120,13 +106,13 @@ class h extends u.Mesh {
|
|
|
120
106
|
* @description 两个控制点使用直线路径,多个控制点使用贝塞尔路径
|
|
121
107
|
*/
|
|
122
108
|
static calculatePath(t) {
|
|
123
|
-
return t.length === 2 ? new
|
|
109
|
+
return t.length === 2 ? new m.LineCurve3(t[0], t[1]) : new x(t);
|
|
124
110
|
}
|
|
125
111
|
static formatGeometryUV(t, i, s) {
|
|
126
|
-
const
|
|
127
|
-
for (let r = 0; r <
|
|
128
|
-
const n =
|
|
129
|
-
|
|
112
|
+
const a = t.getAttribute("uv");
|
|
113
|
+
for (let r = 0; r < a.count; r++) {
|
|
114
|
+
const n = a.getX(r) * i * s;
|
|
115
|
+
a.setX(r, n);
|
|
130
116
|
}
|
|
131
117
|
return t;
|
|
132
118
|
}
|
|
@@ -134,12 +120,12 @@ class h extends u.Mesh {
|
|
|
134
120
|
* 管道的 Texture 需要满足一定的要求,需要使用 formatTexture 先 format
|
|
135
121
|
*/
|
|
136
122
|
static formatTexture(t) {
|
|
137
|
-
return t.wrapS =
|
|
123
|
+
return t.wrapS = m.RepeatWrapping, t.wrapT = m.RepeatWrapping, t;
|
|
138
124
|
}
|
|
139
125
|
hide(t) {
|
|
140
126
|
return l(this, null, function* () {
|
|
141
|
-
var
|
|
142
|
-
(
|
|
127
|
+
var a;
|
|
128
|
+
(a = this.opacityAnime) == null || a.dispose();
|
|
143
129
|
const i = 0;
|
|
144
130
|
if (typeof (t == null ? void 0 : t.duration) != "number")
|
|
145
131
|
return this.setOpacity(i);
|
|
@@ -153,8 +139,8 @@ class h extends u.Mesh {
|
|
|
153
139
|
}
|
|
154
140
|
show(t) {
|
|
155
141
|
return l(this, null, function* () {
|
|
156
|
-
var
|
|
157
|
-
(
|
|
142
|
+
var a;
|
|
143
|
+
(a = this.opacityAnime) == null || a.dispose();
|
|
158
144
|
const i = 1;
|
|
159
145
|
if (typeof (t == null ? void 0 : t.duration) != "number")
|
|
160
146
|
return this.setOpacity(i);
|
|
@@ -5,12 +5,12 @@ import { IObject3D as a } from "../../shared-utils/three/IObject3D.js";
|
|
|
5
5
|
import { anyPositionToVector3 as c } from "../../shared-utils/positionToVector3.js";
|
|
6
6
|
import "three";
|
|
7
7
|
import "hammerjs";
|
|
8
|
-
import "
|
|
9
|
-
import "
|
|
10
|
-
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
8
|
+
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
9
|
+
import "@realsee/five/line";
|
|
11
10
|
import "../../shared-utils/three/THREESphere.js";
|
|
12
11
|
import "animejs";
|
|
13
12
|
import { notNil as r } from "../../shared-utils/isNil.js";
|
|
13
|
+
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
14
14
|
import { RectangleWithEdgeMesh as P } from "./RectangleWithEdge.js";
|
|
15
15
|
import { RectangleMesh as m } from "./Rectangle.js";
|
|
16
16
|
class w extends a {
|
|
@@ -13,17 +13,17 @@ var o = (i, e, t) => (n(i, typeof e != "symbol" ? e + "" : e, t), t);
|
|
|
13
13
|
import { IObject3D as f } from "../../shared-utils/three/IObject3D.js";
|
|
14
14
|
import * as h from "three";
|
|
15
15
|
import "hammerjs";
|
|
16
|
-
import "
|
|
17
|
-
import "
|
|
18
|
-
import "
|
|
16
|
+
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
17
|
+
import { DEFAULT_HIGHLIGHT_OPACITY as M } from "../utils/color.js";
|
|
18
|
+
import "@realsee/five/line";
|
|
19
|
+
import { anyPositionToVector3 as d } from "../../shared-utils/positionToVector3.js";
|
|
19
20
|
import "../../shared-utils/three/THREESphere.js";
|
|
20
21
|
import "animejs";
|
|
21
|
-
import { notNil as
|
|
22
|
-
import
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import { DEFAULT_HIGHLIGHT_OPACITY as a } from "../utils/color.js";
|
|
22
|
+
import { notNil as g } from "../../shared-utils/isNil.js";
|
|
23
|
+
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
24
|
+
import { CircleWithEdgeMesh as C } from "./CircleWithEdge.js";
|
|
25
|
+
import { radiusToSegments as y } from "../utils/radiusToSegments.js";
|
|
26
|
+
import { ColoredMesh as a } from "../utils/three/ColoredMesh.js";
|
|
27
27
|
class z extends f {
|
|
28
28
|
constructor(t) {
|
|
29
29
|
super();
|
|
@@ -33,7 +33,7 @@ class z extends f {
|
|
|
33
33
|
o(this, "opacityBeforeHighlight");
|
|
34
34
|
o(this, "highlighted", !1);
|
|
35
35
|
o(this, "params");
|
|
36
|
-
this.params = t, this.bottomCircle = new
|
|
36
|
+
this.params = t, this.bottomCircle = new C(t), this.bottomCircle.name = "bottomCircle", this.topCircle = new C(t), this.topCircle.name = "topCircle", this.edgeMesh = new a(t), t != null && t.bottomCenter && (t != null && t.topCenter) && (t != null && t.radius) && this.setPoints(t), this.addIfNotExists(this.bottomCircle);
|
|
37
37
|
}
|
|
38
38
|
get bottomCenter() {
|
|
39
39
|
return this.bottomCircle.center;
|
|
@@ -51,7 +51,7 @@ class z extends f {
|
|
|
51
51
|
return this.bottomCircle.color;
|
|
52
52
|
}
|
|
53
53
|
setPoints(t) {
|
|
54
|
-
const r =
|
|
54
|
+
const r = d(t.topCenter), s = d(t.bottomCenter), m = r.clone().sub(s).normalize();
|
|
55
55
|
this.bottomCircle.setPoints({ center: s, normal: m, radius: t.radius }), this.setTopCenter(r), this.needsRender = !0;
|
|
56
56
|
}
|
|
57
57
|
setTopCenter(t) {
|
|
@@ -61,10 +61,10 @@ class z extends f {
|
|
|
61
61
|
this.addIfNotExists(this.bottomCircle), this.bottomCircle.setPoints({ center: t, normal: this.normal, radius: this.radius }), this.setEdgeMesh();
|
|
62
62
|
}
|
|
63
63
|
setStyle(t) {
|
|
64
|
-
this.params = l(l({}, this.params), t),
|
|
64
|
+
this.params = l(l({}, this.params), t), g(t.color) && this.bottomCircle.setStyle({ color: t.color }), g(t.color) && this.topCircle.setStyle({ color: t.color });
|
|
65
65
|
}
|
|
66
66
|
highlight() {
|
|
67
|
-
this.highlighted || (this.highlighted = !0, this.opacityBeforeHighlight = this.edgeMesh.opacity, this.edgeMesh.setStyle({ opacity: this.edgeMesh.opacity *
|
|
67
|
+
this.highlighted || (this.highlighted = !0, this.opacityBeforeHighlight = this.edgeMesh.opacity, this.edgeMesh.setStyle({ opacity: this.edgeMesh.opacity * M }), this.bottomCircle.highlight(), this.topCircle.highlight(), this.needsRender = !0);
|
|
68
68
|
}
|
|
69
69
|
unhighlight() {
|
|
70
70
|
this.highlighted && (this.highlighted = !1, this.edgeMesh.setStyle({ opacity: this.opacityBeforeHighlight }), this.bottomCircle.unhighlight(), this.topCircle.unhighlight(), this.needsRender = !0);
|
|
@@ -76,7 +76,7 @@ class z extends f {
|
|
|
76
76
|
this.radius,
|
|
77
77
|
this.radius,
|
|
78
78
|
t.distanceTo(r),
|
|
79
|
-
|
|
79
|
+
y(this.radius),
|
|
80
80
|
1,
|
|
81
81
|
!0
|
|
82
82
|
);
|
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
-
import { type OcclusionStyle, type LineStyle } from '../utils/color';
|
|
2
|
+
import { type Color, type OcclusionStyle, type LineStyle } from '../utils/color';
|
|
3
|
+
import { LineGeometry, LineMaterial, THREE_Line2 } from '../../shared-utils/five/FiveLine';
|
|
3
4
|
import { type AnyPositions } from '../../shared-utils/positionToVector3';
|
|
4
5
|
import { IObject3D } from '../../shared-utils/three/IObject3D';
|
|
6
|
+
import type { Merge } from 'type-fest';
|
|
5
7
|
import type { PointsData } from '../utils/data';
|
|
6
8
|
export type LineMeshStyle = LineStyle & {
|
|
7
9
|
dashed?: boolean;
|
|
8
10
|
} & OcclusionStyle;
|
|
9
11
|
export type LineData = PointsData;
|
|
12
|
+
export declare class LineMaterial2 extends LineMaterial {
|
|
13
|
+
get three_color(): Color;
|
|
14
|
+
set three_color(value: Color);
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Use `setDashed` to set
|
|
17
|
+
*/
|
|
18
|
+
dashed: boolean;
|
|
19
|
+
private _three_color;
|
|
20
|
+
constructor(params?: Merge<ConstructorParameters<typeof LineMaterial>[0], THREE.MeshBasicMaterialParameters>);
|
|
21
|
+
setDashed(dashed: boolean): void;
|
|
22
|
+
}
|
|
23
|
+
export declare class THREE_Line3 extends THREE_Line2 {
|
|
24
|
+
name: string;
|
|
25
|
+
material: LineMaterial2;
|
|
26
|
+
constructor(geometry: LineGeometry, material: LineMaterial2);
|
|
27
|
+
}
|
|
10
28
|
export declare class LineMesh extends IObject3D {
|
|
11
29
|
name: string;
|
|
12
30
|
points: THREE.Vector3[];
|
|
@@ -1,34 +1,33 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var u = (o,
|
|
5
|
-
for (var e in
|
|
6
|
-
|
|
7
|
-
if (
|
|
8
|
-
for (var e of
|
|
9
|
-
|
|
1
|
+
var E = Object.defineProperty;
|
|
2
|
+
var a = Object.getOwnPropertySymbols;
|
|
3
|
+
var w = Object.prototype.hasOwnProperty, H = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var u = (o, l, e) => l in o ? E(o, l, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[l] = e, f = (o, l) => {
|
|
5
|
+
for (var e in l || (l = {}))
|
|
6
|
+
w.call(l, e) && u(o, e, l[e]);
|
|
7
|
+
if (a)
|
|
8
|
+
for (var e of a(l))
|
|
9
|
+
H.call(l, e) && u(o, e, l[e]);
|
|
10
10
|
return o;
|
|
11
11
|
};
|
|
12
|
-
var s = (o,
|
|
12
|
+
var s = (o, l, e) => (u(o, typeof l != "symbol" ? l + "" : l, e), e);
|
|
13
13
|
import * as d from "three";
|
|
14
|
-
import { DEFAULT_LINE_COLOR as
|
|
15
|
-
import { LineGeometry as
|
|
16
|
-
import { anyPositionToVector3 as
|
|
17
|
-
import { IObject3D as
|
|
14
|
+
import { DEFAULT_LINE_COLOR as b, DEFAULT_LINE_WIDTH as C, DEFAULT_HIGHLIGHT_OPACITY as _ } from "../utils/color.js";
|
|
15
|
+
import { LineGeometry as k, LineMaterial as D, THREE_Line2 as M } from "../../shared-utils/five/FiveLine.js";
|
|
16
|
+
import { anyPositionToVector3 as R } from "../../shared-utils/positionToVector3.js";
|
|
17
|
+
import { IObject3D as x } from "../../shared-utils/three/IObject3D.js";
|
|
18
18
|
import "hammerjs";
|
|
19
|
-
import "
|
|
20
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
21
|
-
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
19
|
+
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
22
20
|
import "../../shared-utils/three/THREESphere.js";
|
|
23
21
|
import "animejs";
|
|
24
22
|
import { notNil as h } from "../../shared-utils/isNil.js";
|
|
25
|
-
|
|
23
|
+
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
24
|
+
class S extends D {
|
|
26
25
|
constructor(e) {
|
|
27
26
|
var t, i;
|
|
28
27
|
super(e);
|
|
29
28
|
s(this, "_three_color");
|
|
30
|
-
h(e == null ? void 0 : e.color) && (this.three_color = (t = e == null ? void 0 : e.color) != null ? t : 16777215), Object.keys(e).forEach((
|
|
31
|
-
["color", "dashed", "dashScale", "dashSize", "gapSize", "resolution"].includes(
|
|
29
|
+
h(e == null ? void 0 : e.color) && (this.three_color = (t = e == null ? void 0 : e.color) != null ? t : 16777215), Object.keys(e).forEach((n) => {
|
|
30
|
+
["color", "dashed", "dashScale", "dashSize", "gapSize", "resolution"].includes(n) || n in this && (this[n] = e[n]);
|
|
32
31
|
}), this.setDashed((i = e == null ? void 0 : e.dashed) != null ? i : !1);
|
|
33
32
|
}
|
|
34
33
|
get three_color() {
|
|
@@ -41,15 +40,15 @@ class S extends C {
|
|
|
41
40
|
e ? this.defines.USE_DASH = "" : delete this.defines.USE_DASH, this.needsUpdate = !0;
|
|
42
41
|
}
|
|
43
42
|
}
|
|
44
|
-
class T extends
|
|
43
|
+
class T extends M {
|
|
45
44
|
constructor(e, t) {
|
|
46
45
|
super(e, t);
|
|
47
46
|
s(this, "name", "Line3");
|
|
48
47
|
}
|
|
49
48
|
}
|
|
50
|
-
class F extends
|
|
49
|
+
class F extends x {
|
|
51
50
|
constructor(e) {
|
|
52
|
-
var r,
|
|
51
|
+
var c, r, y, L, g;
|
|
53
52
|
super();
|
|
54
53
|
s(this, "name", "LineMesh");
|
|
55
54
|
s(this, "points");
|
|
@@ -59,25 +58,25 @@ class F extends R {
|
|
|
59
58
|
s(this, "opacityBeforeHighlight");
|
|
60
59
|
s(this, "paramsStyle", {});
|
|
61
60
|
this.paramsStyle = e != null ? e : {};
|
|
62
|
-
const t = new
|
|
63
|
-
color: new d.Color((
|
|
64
|
-
linewidth: (
|
|
61
|
+
const t = new k(), i = new S({
|
|
62
|
+
color: new d.Color((c = e == null ? void 0 : e.lineColor) != null ? c : b),
|
|
63
|
+
linewidth: (r = e == null ? void 0 : e.lineWidth) != null ? r : C,
|
|
65
64
|
dashScale: 40,
|
|
66
|
-
opacity: 1,
|
|
65
|
+
opacity: (y = e == null ? void 0 : e.opacity) != null ? y : 1,
|
|
67
66
|
transparent: !0,
|
|
68
|
-
dashed: (
|
|
69
|
-
}),
|
|
70
|
-
color: new d.Color((g = e == null ? void 0 : e.lineColor) != null ? g :
|
|
67
|
+
dashed: (L = e == null ? void 0 : e.dashed) != null ? L : !1
|
|
68
|
+
}), n = new S({
|
|
69
|
+
color: new d.Color((g = e == null ? void 0 : e.lineColor) != null ? g : b),
|
|
71
70
|
linewidth: i == null ? void 0 : i.linewidth,
|
|
72
71
|
dashScale: i.dashScale,
|
|
73
72
|
depthTest: !1,
|
|
74
73
|
depthWrite: !1,
|
|
75
74
|
transparent: !0,
|
|
76
|
-
opacity: 0.2,
|
|
75
|
+
opacity: i.opacity * 0.2,
|
|
77
76
|
dashed: i.dashed,
|
|
78
77
|
resolution: i.resolution
|
|
79
78
|
});
|
|
80
|
-
this.line = new T(t, i), this.backLine = new T(t,
|
|
79
|
+
this.line = new T(t, i), this.backLine = new T(t, n), this.line.renderOrder = 1, this.backLine.renderOrder = 0, this.line.name = "lineFrontMaterial", this.backLine.name = "lineBackMaterial", e && this.setStyle(e), e != null && e.points && this.setPoints(e.points);
|
|
81
80
|
}
|
|
82
81
|
get lineWidth() {
|
|
83
82
|
return this.line.material.linewidth;
|
|
@@ -95,27 +94,27 @@ class F extends R {
|
|
|
95
94
|
return this.line.material.depthTest === !1 ? "depthTest" : "translucence";
|
|
96
95
|
}
|
|
97
96
|
setPoints(e) {
|
|
98
|
-
const t = e.map(
|
|
97
|
+
const t = e.map(R).filter(h);
|
|
99
98
|
if (this.points = t, t.length < 2)
|
|
100
99
|
return;
|
|
101
100
|
this.addIfNotExists(this.line, this.backLine);
|
|
102
|
-
const i = t.flatMap((
|
|
103
|
-
i.length > 2 && (this.line.geometry.dispose(), this.line.geometry = new
|
|
101
|
+
const i = t.flatMap((n) => [n.x, n.y, n.z]);
|
|
102
|
+
i.length > 2 && (this.line.geometry.dispose(), this.line.geometry = new k(), this.backLine.geometry = this.line.geometry), this.line.geometry.setPositions(i), this.line.computeLineDistances(), this.needsRender = !0;
|
|
104
103
|
}
|
|
105
104
|
setResolution(e, t) {
|
|
106
105
|
const i = this.line.material.resolution;
|
|
107
106
|
(i.x !== e || i.y !== t) && (i.set(e, t), this.needsRender = !0);
|
|
108
|
-
const
|
|
109
|
-
(
|
|
107
|
+
const n = this.backLine.material.resolution;
|
|
108
|
+
(n.x !== e || n.y !== t) && (n.set(e, t), this.needsRender = !0);
|
|
110
109
|
}
|
|
111
110
|
setStyle(e) {
|
|
112
|
-
var
|
|
113
|
-
this.paramsStyle = f(f({}, this.paramsStyle), e), h(e.lineColor) && (this.line.material.three_color = new d.Color(e.lineColor), this.backLine.material.three_color = new d.Color(e.lineColor)), h(e.lineWidth) && (this.line.material.linewidth = e.lineWidth, this.backLine.material.linewidth = e.lineWidth), h(e.dashed) && (this.line.material.setDashed(e.dashed), this.backLine.material.setDashed(e.dashed));
|
|
114
|
-
const t = (
|
|
111
|
+
var n, c, r;
|
|
112
|
+
this.paramsStyle = f(f({}, this.paramsStyle), e), h(e.lineColor) && (this.line.material.three_color = new d.Color(e.lineColor), this.backLine.material.three_color = new d.Color(e.lineColor)), h(e.lineWidth) && (this.line.material.linewidth = e.lineWidth, this.backLine.material.linewidth = e.lineWidth), h(e.dashed) && (this.line.material.setDashed(e.dashed), this.backLine.material.setDashed(e.dashed)), h(e.opacity) && (this.line.material.opacity = e.opacity, this.backLine.material.opacity = e.opacity * 0.2);
|
|
113
|
+
const t = (n = e.occlusionVisibility) != null ? n : this.paramsStyle.occlusionVisibility, i = (r = (c = e.occlusionMode) != null ? c : this.paramsStyle.occlusionMode) != null ? r : "translucence";
|
|
115
114
|
h(t) && (t ? i === "depthTest" ? (this.line.material.depthTest = !1, this.backLine.visible = !1) : i === "translucence" && (this.line.material.depthTest = !0, this.backLine.visible = !0) : (this.line.material.depthTest = !0, this.backLine.visible = !1)), this.needsRender = !0;
|
|
116
115
|
}
|
|
117
116
|
highlight() {
|
|
118
|
-
this.highlighted || (this.highlighted = !0, this.opacityBeforeHighlight = this.line.material.opacity, this.line.material.opacity = this.opacityBeforeHighlight *
|
|
117
|
+
this.highlighted || (this.highlighted = !0, this.opacityBeforeHighlight = this.line.material.opacity, this.line.material.opacity = this.opacityBeforeHighlight * _, this.backLine.material.opacity = this.backLine.material.opacity * _, this.needsRender = !0);
|
|
119
118
|
}
|
|
120
119
|
unhighlight() {
|
|
121
120
|
this.highlighted && (this.highlighted = !1, this.line.material.opacity = this.opacityBeforeHighlight, this.backLine.material.opacity = 0.2, this.needsRender = !0);
|
|
@@ -15,15 +15,14 @@ import { anyPositionToVector3 as M } from "../../shared-utils/positionToVector3.
|
|
|
15
15
|
import { PointMesh as m } from "./Point.js";
|
|
16
16
|
import "three";
|
|
17
17
|
import "hammerjs";
|
|
18
|
-
import "
|
|
19
|
-
import "
|
|
20
|
-
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
18
|
+
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
19
|
+
import { LineMesh as V } from "./Line.js";
|
|
21
20
|
import "../../shared-utils/three/THREESphere.js";
|
|
22
21
|
import "animejs";
|
|
23
22
|
import { notNil as u } from "../../shared-utils/isNil.js";
|
|
24
|
-
import
|
|
23
|
+
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
25
24
|
import { IObject3D as E } from "../../shared-utils/three/IObject3D.js";
|
|
26
|
-
class
|
|
25
|
+
class R extends V {
|
|
27
26
|
constructor(t) {
|
|
28
27
|
super();
|
|
29
28
|
e(this, "name", "LineWithDotsMesh");
|
|
@@ -67,5 +66,5 @@ class W extends V {
|
|
|
67
66
|
}
|
|
68
67
|
}
|
|
69
68
|
export {
|
|
70
|
-
|
|
69
|
+
R as LineWithDotsMesh
|
|
71
70
|
};
|