@realsee/dnalogel 3.40.0-alpha.0 → 3.40.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 +3 -0
- package/dist/GuideLinePlugin/typing.d.ts +0 -1
- package/dist/GuideLinePlugin/utils/createLineGeometry.d.ts +0 -5
- package/dist/index.cjs.js +67 -71
- package/dist/index.js +5851 -5938
- package/dist/index.umd.js +61 -65
- package/dist/shared-utils/three/blink.d.ts +10 -3
- package/libs/CruisePlugin/Move.js +2 -3
- package/libs/CruisePlugin/Work.js +2 -3
- package/libs/CruisePlugin/index.js +6 -7
- package/libs/GuideLinePlugin/Controller.js +4 -5
- package/libs/GuideLinePlugin/GuideLineItem.js +2 -3
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +59 -76
- package/libs/GuideLinePlugin/GuideLineModeItem.js +2 -3
- package/libs/GuideLinePlugin/index.js +6 -7
- package/libs/GuideLinePlugin/typing.d.ts +0 -1
- package/libs/GuideLinePlugin/utils/createLineGeometry.d.ts +0 -5
- package/libs/GuideLinePlugin/utils/createLineGeometry.js +57 -116
- package/libs/PanoTagPlugin/controller/index.js +1 -1
- package/libs/base/BasePlugin.js +1 -1
- package/libs/index.js +125 -126
- package/libs/shared-utils/index.js +30 -29
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/three/blink.d.ts +10 -3
- package/libs/shared-utils/three/blink.js +85 -92
- package/package.json +2 -2
- package/dist/shared-utils/math/intersecting.d.ts +0 -25
- package/libs/shared-utils/math/intersecting.d.ts +0 -25
- package/libs/shared-utils/math/intersecting.js +0 -25
|
@@ -11,7 +11,14 @@ interface BlinkAnimeOptions extends anime.AnimeParams {
|
|
|
11
11
|
interface ReBlinkAnimeOptions extends BlinkAnimeOptions {
|
|
12
12
|
maxOpacity?: number;
|
|
13
13
|
}
|
|
14
|
+
interface AnimeInstance extends anime.AnimeInstance {
|
|
15
|
+
/**
|
|
16
|
+
* @description 提前结束动画
|
|
17
|
+
*/
|
|
18
|
+
preComplete: () => void;
|
|
19
|
+
}
|
|
14
20
|
type Target = HTMLElement | THREE.Object3D;
|
|
21
|
+
declare const animeMap: Map<Target | Target[], AnimeInstance>;
|
|
15
22
|
/**
|
|
16
23
|
* @description 闪烁一个物体/Dom
|
|
17
24
|
* @param animeOptions https://animejs.com/documentation/
|
|
@@ -23,12 +30,12 @@ type Target = HTMLElement | THREE.Object3D;
|
|
|
23
30
|
* blink(document.getElementById('id'), { loop: 5 * 2 })
|
|
24
31
|
* ```
|
|
25
32
|
*/
|
|
26
|
-
declare function blink(objects: Target | Target[], animeOptions?: BlinkAnimeOptions):
|
|
33
|
+
declare function blink(objects: Target | Target[], animeOptions?: BlinkAnimeOptions): AnimeInstance;
|
|
27
34
|
/**
|
|
28
35
|
* @description 闪烁一个不可见的物体/Dom
|
|
29
36
|
*
|
|
30
37
|
* 适用于物体/Dom在初始状态不可见的情况,闪烁完成后的状态为初始不可见的状态
|
|
31
38
|
* @param animeOptions https://animejs.com/documentation/
|
|
32
39
|
*/
|
|
33
|
-
declare function reblink(objects: Target | Target[], animeOptions?: BlinkAnimeOptions):
|
|
34
|
-
export { blink, reblink, type BlinkAnimeOptions, type ReBlinkAnimeOptions };
|
|
40
|
+
declare function reblink(objects: Target | Target[], animeOptions?: BlinkAnimeOptions): AnimeInstance;
|
|
41
|
+
export { blink, reblink, animeMap, type BlinkAnimeOptions, type ReBlinkAnimeOptions, type AnimeInstance };
|
|
@@ -75,7 +75,6 @@ import "../vendor/gl-vec2/set.js";
|
|
|
75
75
|
import "../vendor/gl-vec2/normalize.js";
|
|
76
76
|
import "../vendor/gl-vec2/subtract.js";
|
|
77
77
|
import "../vendor/gl-vec2/dot.js";
|
|
78
|
-
import "../shared-utils/math/intersecting.js";
|
|
79
78
|
import "../shared-utils/five/mode.js";
|
|
80
79
|
import "../shared-utils/isNil.js";
|
|
81
80
|
import "../shared-utils/animationFrame/BetterTween.js";
|
|
@@ -207,7 +206,7 @@ import "./utils/coordinatesAngle.js";
|
|
|
207
206
|
import "./utils/coordinatesToVector.js";
|
|
208
207
|
import "./utils/safeCall.js";
|
|
209
208
|
import "../shared-utils/five/fiveLoaded.js";
|
|
210
|
-
class
|
|
209
|
+
class $r extends z {
|
|
211
210
|
constructor(t, r) {
|
|
212
211
|
var h;
|
|
213
212
|
super(t, r);
|
|
@@ -315,5 +314,5 @@ class to extends z {
|
|
|
315
314
|
}
|
|
316
315
|
}
|
|
317
316
|
export {
|
|
318
|
-
|
|
317
|
+
$r as default
|
|
319
318
|
};
|
|
@@ -63,7 +63,6 @@ import "../vendor/gl-vec2/set.js";
|
|
|
63
63
|
import "../vendor/gl-vec2/normalize.js";
|
|
64
64
|
import "../vendor/gl-vec2/subtract.js";
|
|
65
65
|
import "../vendor/gl-vec2/dot.js";
|
|
66
|
-
import "../shared-utils/math/intersecting.js";
|
|
67
66
|
import "../shared-utils/five/mode.js";
|
|
68
67
|
import "../shared-utils/animationFrame/BetterTween.js";
|
|
69
68
|
import "../shared-utils/animationFrame/index.js";
|
|
@@ -207,7 +206,7 @@ import "../shared-utils/Utils/FiveUtil.js";
|
|
|
207
206
|
import "../shared-utils/formatRad.js";
|
|
208
207
|
import "./Work.js";
|
|
209
208
|
import "./utils/coordinatesToVector.js";
|
|
210
|
-
class
|
|
209
|
+
class ir extends G {
|
|
211
210
|
constructor(t, e) {
|
|
212
211
|
super(t, e);
|
|
213
212
|
k(this, "state", {
|
|
@@ -595,5 +594,5 @@ class rr extends G {
|
|
|
595
594
|
}
|
|
596
595
|
}
|
|
597
596
|
export {
|
|
598
|
-
|
|
597
|
+
ir as default
|
|
599
598
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { typing as
|
|
1
|
+
import { typing as bt } from "./typing/index.js";
|
|
2
2
|
import t from "./Work.js";
|
|
3
3
|
import i from "./Move.js";
|
|
4
4
|
import "../GuideLinePlugin/index.js";
|
|
@@ -42,7 +42,6 @@ import "../vendor/gl-vec2/set.js";
|
|
|
42
42
|
import "../vendor/gl-vec2/normalize.js";
|
|
43
43
|
import "../vendor/gl-vec2/subtract.js";
|
|
44
44
|
import "../vendor/gl-vec2/dot.js";
|
|
45
|
-
import "../shared-utils/math/intersecting.js";
|
|
46
45
|
import "../shared-utils/five/mode.js";
|
|
47
46
|
import "../shared-utils/isNil.js";
|
|
48
47
|
import "../shared-utils/animationFrame/BetterTween.js";
|
|
@@ -179,13 +178,13 @@ import "../shared-utils/formatRad.js";
|
|
|
179
178
|
import "./BaseController.js";
|
|
180
179
|
import "../shared-utils/Utils/FiveUtil.js";
|
|
181
180
|
import "./utils/getFiveStateOnCurve.js";
|
|
182
|
-
const
|
|
181
|
+
const dt = (o, r) => new t(o, r), kt = (o, r) => new i(o, r);
|
|
183
182
|
export {
|
|
184
|
-
|
|
183
|
+
dt as CruisePlugin,
|
|
185
184
|
t as CruisePluginController,
|
|
186
|
-
|
|
185
|
+
bt as CruisePluginTypes,
|
|
187
186
|
i as MoveController,
|
|
188
|
-
|
|
187
|
+
kt as MovePlugin,
|
|
189
188
|
t as WalkController,
|
|
190
|
-
|
|
189
|
+
dt as default
|
|
191
190
|
};
|
|
@@ -56,7 +56,6 @@ import "../vendor/gl-vec2/set.js";
|
|
|
56
56
|
import "../vendor/gl-vec2/normalize.js";
|
|
57
57
|
import "../vendor/gl-vec2/subtract.js";
|
|
58
58
|
import "../vendor/gl-vec2/dot.js";
|
|
59
|
-
import "../shared-utils/math/intersecting.js";
|
|
60
59
|
import "../shared-utils/five/mode.js";
|
|
61
60
|
import "../shared-utils/isNil.js";
|
|
62
61
|
import "../shared-utils/animationFrame/BetterTween.js";
|
|
@@ -206,8 +205,8 @@ import "../CruisePlugin/utils/coordinatesAngle.js";
|
|
|
206
205
|
import "../CruisePlugin/utils/coordinatesToVector.js";
|
|
207
206
|
import "../CruisePlugin/utils/safeCall.js";
|
|
208
207
|
import "../shared-utils/five/fiveLoaded.js";
|
|
209
|
-
const b = "GuideLinePlugin", g = `${b}`,
|
|
210
|
-
class
|
|
208
|
+
const b = "GuideLinePlugin", g = `${b}`, oe = (s) => `${g}--${s}`;
|
|
209
|
+
class me extends x {
|
|
211
210
|
constructor(t, i) {
|
|
212
211
|
super(t, i);
|
|
213
212
|
h(this, "name", b);
|
|
@@ -349,6 +348,6 @@ class pe extends x {
|
|
|
349
348
|
}
|
|
350
349
|
}
|
|
351
350
|
export {
|
|
352
|
-
|
|
353
|
-
|
|
351
|
+
me as default,
|
|
352
|
+
oe as pluginFlag
|
|
354
353
|
};
|
|
@@ -5,7 +5,7 @@ import "../shared-utils/five/changeMode.js";
|
|
|
5
5
|
import "../CruisePlugin/Move.js";
|
|
6
6
|
import "../CruisePlugin/Work.js";
|
|
7
7
|
import "../shared-utils/Subscribe.js";
|
|
8
|
-
import { GuideLineItem as
|
|
8
|
+
import { GuideLineItem as ho } from "./GuideLineItem/index.js";
|
|
9
9
|
import "three";
|
|
10
10
|
import "./utils/createLineGeometry.js";
|
|
11
11
|
import "../vendor/polyline-normals/index.js";
|
|
@@ -15,7 +15,6 @@ import "../vendor/gl-vec2/set.js";
|
|
|
15
15
|
import "../vendor/gl-vec2/normalize.js";
|
|
16
16
|
import "../vendor/gl-vec2/subtract.js";
|
|
17
17
|
import "../vendor/gl-vec2/dot.js";
|
|
18
|
-
import "../shared-utils/math/intersecting.js";
|
|
19
18
|
import "../shared-utils/five/mode.js";
|
|
20
19
|
import "hammerjs";
|
|
21
20
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
@@ -179,5 +178,5 @@ import "../CruisePlugin/utils/coordinatesToVector.js";
|
|
|
179
178
|
import "../CruisePlugin/utils/safeCall.js";
|
|
180
179
|
import "../shared-utils/five/fiveLoaded.js";
|
|
181
180
|
export {
|
|
182
|
-
|
|
181
|
+
ho as GuideLineItem
|
|
183
182
|
};
|
|
@@ -1,42 +1,39 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var x = Object.defineProperty, w = Object.defineProperties;
|
|
2
|
+
var M = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var D = Object.getOwnPropertySymbols;
|
|
4
4
|
var P = Object.prototype.hasOwnProperty, U = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
5
|
+
var b = (l, e, t) => e in l ? x(l, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[e] = t, m = (l, e) => {
|
|
6
6
|
for (var t in e || (e = {}))
|
|
7
|
-
P.call(e, t) &&
|
|
7
|
+
P.call(e, t) && b(l, t, e[t]);
|
|
8
8
|
if (D)
|
|
9
9
|
for (var t of D(e))
|
|
10
|
-
U.call(e, t) &&
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
var i = (
|
|
10
|
+
U.call(e, t) && b(l, t, e[t]);
|
|
11
|
+
return l;
|
|
12
|
+
}, c = (l, e) => w(l, M(e));
|
|
13
|
+
var i = (l, e, t) => (b(l, typeof e != "symbol" ? e + "" : e, t), t);
|
|
14
14
|
import * as h from "three";
|
|
15
15
|
import { logWarning as F, logError as L } from "../../shared-utils/log.js";
|
|
16
16
|
import { createLineGeometry as S } from "../utils/createLineGeometry.js";
|
|
17
|
-
import { isPanoramaLike as
|
|
17
|
+
import { isPanoramaLike as O, isModelLike as _ } from "../../shared-utils/five/mode.js";
|
|
18
18
|
import "hammerjs";
|
|
19
19
|
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
20
20
|
import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
21
21
|
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
22
22
|
import "animejs";
|
|
23
23
|
import { notNil as V } from "../../shared-utils/isNil.js";
|
|
24
|
-
import { BetterTween as
|
|
24
|
+
import { BetterTween as A, tweenProgress as E } from "../../shared-utils/animationFrame/BetterTween.js";
|
|
25
25
|
import { loadTexture as G } from "../../shared-utils/three/loadTexture.js";
|
|
26
26
|
import k from "../../PanoTagPlugin/controller/index.js";
|
|
27
|
-
import
|
|
28
|
-
import { filterAdjacentDistinct as
|
|
29
|
-
import { objectAssignDeepExports as
|
|
27
|
+
import B from "../Components/Tag.js";
|
|
28
|
+
import { filterAdjacentDistinct as N } from "../utils/index.js";
|
|
29
|
+
import { objectAssignDeepExports as I } from "../../vendor/object-assign-deep/objectAssignDeep.js";
|
|
30
30
|
const R = (
|
|
31
31
|
/* glsl */
|
|
32
32
|
`
|
|
33
33
|
varying vec2 vUv;
|
|
34
|
-
varying float ignoreAnimationMap;
|
|
35
|
-
attribute float animationWillError;
|
|
36
34
|
|
|
37
35
|
void main() {
|
|
38
36
|
vUv = uv;
|
|
39
|
-
ignoreAnimationMap = animationWillError;
|
|
40
37
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
41
38
|
}
|
|
42
39
|
`
|
|
@@ -79,17 +76,12 @@ const R = (
|
|
|
79
76
|
uniform float flicker;
|
|
80
77
|
// 纹理坐标
|
|
81
78
|
varying vec2 vUv;
|
|
82
|
-
varying float ignoreAnimationMap;
|
|
83
79
|
|
|
84
80
|
// 获取纹理颜色
|
|
85
81
|
vec4 getImage() {
|
|
86
82
|
vec2 uv = vUv;
|
|
87
83
|
uv.y = uv.y - vOffset;
|
|
88
84
|
|
|
89
|
-
if (ignoreAnimationMap == 1.0) {
|
|
90
|
-
return vec4(0.0, 0.0, 0.0, 0.0);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
85
|
// 原始贴图颜色
|
|
94
86
|
vec4 image = texture2D(map, uv);
|
|
95
87
|
// 如果使用颜色
|
|
@@ -150,6 +142,10 @@ const R = (
|
|
|
150
142
|
if (v < includeMinV || v > includeMaxV) {
|
|
151
143
|
gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
|
|
152
144
|
return;
|
|
145
|
+
} else {
|
|
146
|
+
// debug
|
|
147
|
+
// gl_FragColor = vec4(255.0, 255.0, 255.0, 0.6);
|
|
148
|
+
// return;
|
|
153
149
|
}
|
|
154
150
|
}
|
|
155
151
|
if (excludeMinV != -1.0 && excludeMaxV != -1.0) {
|
|
@@ -212,7 +208,7 @@ class Y {
|
|
|
212
208
|
i(this, "plugin");
|
|
213
209
|
i(this, "textureHasLoaded", !1);
|
|
214
210
|
i(this, "disposed", !1);
|
|
215
|
-
i(this, "flowAnime", new
|
|
211
|
+
i(this, "flowAnime", new A({ progress: 0 }).to({ progress: 1 }).duration(1500).repeat(1 / 0));
|
|
216
212
|
i(this, "flickerAnime", E(300).yoyo(!0).repeat(5));
|
|
217
213
|
/** 缓存 panoGroup 中每个点距离起点的长度 */
|
|
218
214
|
i(this, "cacheLengths", []);
|
|
@@ -234,18 +230,18 @@ class Y {
|
|
|
234
230
|
});
|
|
235
231
|
/** 模型状态变更 */
|
|
236
232
|
i(this, "onFiveModeChange", (e) => {
|
|
237
|
-
this.modeVisible = this.mode === "panorama" ?
|
|
233
|
+
this.modeVisible = this.mode === "panorama" ? O(e) : _(e), this.updateVisible();
|
|
238
234
|
});
|
|
239
235
|
/** 走点 */
|
|
240
236
|
i(this, "onFivePanoArrived", (e) => {
|
|
241
|
-
var s, o
|
|
242
|
-
const t =
|
|
243
|
-
if (
|
|
237
|
+
var r, s, o;
|
|
238
|
+
const t = this.panoMap[e];
|
|
239
|
+
if (t === void 0)
|
|
244
240
|
this.group.children.includes(this.meshWithoutDepthTest) && this.group.remove(this.meshWithoutDepthTest), this.meshWithDepthTest.material.uniforms.excludeMinV.value = -1, this.meshWithDepthTest.material.uniforms.excludeMaxV.value = -1;
|
|
245
241
|
else {
|
|
246
242
|
this.group.children.includes(this.meshWithoutDepthTest) || this.group.add(this.meshWithoutDepthTest), this.meshWithoutDepthTest.visible = !0;
|
|
247
|
-
const
|
|
248
|
-
this.meshWithDepthTest.material.uniforms.excludeMinV.value =
|
|
243
|
+
const a = this.meshWithDepthTest.geometry.getAttribute("uv"), n = 100 * ((r = this.autoDepthTestEffectDistance) != null ? r : 2), u = (s = a.getY((t - n) * 2)) != null ? s : 0, d = (o = a.getY((t + n) * 2)) != null ? o : a.getY(a.count - 1);
|
|
244
|
+
this.meshWithDepthTest.material.uniforms.excludeMinV.value = u, this.meshWithDepthTest.material.uniforms.excludeMaxV.value = d, this.meshWithoutDepthTest.material.uniforms.includeMinV.value = u, this.meshWithoutDepthTest.material.uniforms.includeMaxV.value = d;
|
|
249
245
|
}
|
|
250
246
|
this.meshWithDepthTest.material.uniformsNeedUpdate = !0, this.meshWithoutDepthTest.material.uniformsNeedUpdate = !0, this.five.needsRender = !0;
|
|
251
247
|
});
|
|
@@ -264,11 +260,11 @@ class Y {
|
|
|
264
260
|
i(this, "onFlickerAnimeUpdate", (e) => {
|
|
265
261
|
var s, o, a, n;
|
|
266
262
|
const { progress: t } = e, r = 1 - t;
|
|
267
|
-
this.meshWithDepthTest.material.uniforms.flicker.value = r, this.meshWithoutDepthTest.material.uniforms.flicker.value = r, this.meshWithDepthTest.material.uniformsNeedUpdate = !0, this.meshWithoutDepthTest.material.uniformsNeedUpdate = !0, this.five.needsRender = !0, this.startTagContainer.tag &&
|
|
263
|
+
this.meshWithDepthTest.material.uniforms.flicker.value = r, this.meshWithoutDepthTest.material.uniforms.flicker.value = r, this.meshWithDepthTest.material.uniformsNeedUpdate = !0, this.meshWithoutDepthTest.material.uniformsNeedUpdate = !0, this.five.needsRender = !0, this.startTagContainer.tag && T(this.startTagContainer.tag) && ((a = this.startTagContainer.app) == null || a.$set(c(m({}, this.startTagContainer.tag.data), {
|
|
268
264
|
opacity: r,
|
|
269
265
|
name: this.name,
|
|
270
266
|
distance: Math.round((o = (s = this.curvePath) == null ? void 0 : s.getLength()) != null ? o : 0)
|
|
271
|
-
}))), this.endTagContainer.tag &&
|
|
267
|
+
}))), this.endTagContainer.tag && T(this.endTagContainer.tag) && ((n = this.endTagContainer.app) == null || n.$set(c(m({}, this.endTagContainer.tag.data), { opacity: r })));
|
|
272
268
|
});
|
|
273
269
|
i(this, "logWarning", (e) => F("GuideLineModeItem: ", e));
|
|
274
270
|
i(this, "logError", (e) => L("GuideLineModeItem: ", e));
|
|
@@ -346,7 +342,7 @@ class Y {
|
|
|
346
342
|
return this.logError("disposed");
|
|
347
343
|
if (!this.five.work)
|
|
348
344
|
return this.logError("setPathByPanoGroup: work is not ready");
|
|
349
|
-
const r =
|
|
345
|
+
const r = N(e);
|
|
350
346
|
if (this._panoGroup = r, (t == null ? void 0 : t.skipPanoGroup) !== void 0) {
|
|
351
347
|
const o = t.skipPanoGroup ? r.map((a) => this.plugin.workUtil.getObserverStandingPosition(a)).filter(V) : null;
|
|
352
348
|
this.skippedPositions = o;
|
|
@@ -356,22 +352,22 @@ class Y {
|
|
|
356
352
|
}
|
|
357
353
|
/** 通过路径设置线条形状 */
|
|
358
354
|
setGeometryByPath(e, t) {
|
|
359
|
-
var
|
|
355
|
+
var f, y, W, C;
|
|
360
356
|
if (this.disposed)
|
|
361
357
|
return this.logError("disposed");
|
|
362
|
-
const r = (
|
|
358
|
+
const r = (f = t == null ? void 0 : t.scale) != null ? f : this.scale, s = (y = t == null ? void 0 : t.width) != null ? y : this.width, o = (W = t == null ? void 0 : t.unit_length) != null ? W : this.unitLength;
|
|
363
359
|
this.scale = r, this.width = s, this.unitLength = o;
|
|
364
|
-
const { geometry: a, maxV: n, curvePath:
|
|
360
|
+
const { geometry: a, maxV: n, curvePath: u, curvePoints: d, panoMap: p, totalLength: g } = S({
|
|
365
361
|
path: e,
|
|
366
362
|
width: s * r,
|
|
367
363
|
unitLength: o * r,
|
|
368
364
|
skipPositions: this.skippedPositions,
|
|
369
365
|
useAutoDepthTest: t.useAutoDepthTest
|
|
370
366
|
});
|
|
371
|
-
this.autoDepthTestEffectDistance = (
|
|
372
|
-
const
|
|
373
|
-
return
|
|
374
|
-
})(), this.panoMap =
|
|
367
|
+
this.autoDepthTestEffectDistance = (C = t.autoDepthTestEffectDistance) != null ? C : (() => {
|
|
368
|
+
const v = g / 10;
|
|
369
|
+
return v > 3 ? 3 : v < 1 ? 1 : v;
|
|
370
|
+
})(), this.panoMap = p, this._curvePath = u, this._curvePoints = d, this.meshWithDepthTest.geometry.copy(a), this.onFivePanoArrived(this.five.getCurrentState().panoIndex), this.meshWithDepthTest.material.needsUpdate = !0, this.meshWithDepthTest.material.uniforms.maxV.value = n, this.meshWithoutDepthTest.material.needsUpdate = !0, this.meshWithoutDepthTest.material.uniforms.maxV.value = n, this.five.needsRender = !0, this.path = e, this.geometryStyle = m(m({}, this.geometryStyle), t);
|
|
375
371
|
}
|
|
376
372
|
/** 设置线条材质 */
|
|
377
373
|
setMartial(e) {
|
|
@@ -379,7 +375,7 @@ class Y {
|
|
|
379
375
|
if (this.disposed)
|
|
380
376
|
return this.logError("disposed");
|
|
381
377
|
this.setDefaultVisible((r = e == null ? void 0 : e.visible) != null ? r : !1), this.setColor((s = e == null ? void 0 : e.color) != null ? s : "#ffffff"), this.setOpacity((o = e == null ? void 0 : e.opacity) != null ? o : 0.5), this.setTextureUrl((n = (a = e == null ? void 0 : e.texture) == null ? void 0 : a.url) != null ? n : "https://vr-image-4.realsee-cdn.cn/release/web/arrow1.ebe7d0ff.png"), (e == null ? void 0 : e.background_color) !== void 0 && this.setBackgroundColor(e.background_color), (e == null ? void 0 : e.background_opacity) !== void 0 && this.setBackgroundOpacity(e.background_opacity), (e == null ? void 0 : e.border_color) !== void 0 && this.setBorderColor(e.border_color), (e == null ? void 0 : e.border_opacity) !== void 0 && this.setBorderOpacity(e.border_opacity), (e == null ? void 0 : e.border_width) !== void 0 && this.setBorderWidth(e.border_width), (e == null ? void 0 : e.background_clip) !== void 0 && this.setBackgroundClip(e.background_clip);
|
|
382
|
-
const t =
|
|
378
|
+
const t = m(m({}, this.materialStyle), e);
|
|
383
379
|
this.materialStyle = t;
|
|
384
380
|
}
|
|
385
381
|
/** 设置模型状态 */
|
|
@@ -388,7 +384,7 @@ class Y {
|
|
|
388
384
|
const s = new h.Vector3(), o = new h.Vector3().fromArray(e.translate);
|
|
389
385
|
o.y += this.heightOffset, s.add(o), this.group.position.copy(s), r(this.startTagContainer, o), r(this.endTagContainer, o);
|
|
390
386
|
}
|
|
391
|
-
const t =
|
|
387
|
+
const t = m(m({}, this.meshStyle), e);
|
|
392
388
|
this.meshStyle = t;
|
|
393
389
|
function r(s, o) {
|
|
394
390
|
if (!s.tag)
|
|
@@ -495,16 +491,16 @@ class Y {
|
|
|
495
491
|
return this.disposed ? this.logError("disposed") : this.cacheLengths.length !== 0 ? this.cacheLengths[e] : (this.cacheLengths = this.getPanoGroupLengths(), this.cacheLengths[e]);
|
|
496
492
|
}
|
|
497
493
|
getPanoGroupLengths() {
|
|
498
|
-
var
|
|
494
|
+
var u;
|
|
499
495
|
if (!this.curvePoints || !this.curvePath)
|
|
500
496
|
return [];
|
|
501
|
-
const e = this.curvePoints.length, t = this.curvePath.getLength(), r = e - 1, s = t / r, o = (
|
|
497
|
+
const e = this.curvePoints.length, t = this.curvePath.getLength(), r = e - 1, s = t / r, o = (u = this.curvePath.getLengths(r)) != null ? u : [], a = [];
|
|
502
498
|
let n = 0;
|
|
503
|
-
for (let
|
|
504
|
-
const
|
|
505
|
-
if (!
|
|
499
|
+
for (let d = 0; d < e; d++) {
|
|
500
|
+
const p = this.curvePoints[d], g = this.plugin.workUtil.getObserverStandingPosition(n);
|
|
501
|
+
if (!g)
|
|
506
502
|
break;
|
|
507
|
-
|
|
503
|
+
g.clone().setY(0).distanceTo(p.clone().setY(0)) < s && (a.push(o[d]), n += 1);
|
|
508
504
|
}
|
|
509
505
|
return a;
|
|
510
506
|
}
|
|
@@ -512,25 +508,25 @@ class Y {
|
|
|
512
508
|
const r = this.curvePath, s = e === "start" ? this.startTagContainer : this.endTagContainer;
|
|
513
509
|
if (!(t != null && t.data))
|
|
514
510
|
return s.plugin.clearTags();
|
|
515
|
-
const a =
|
|
511
|
+
const a = I({}, {
|
|
516
512
|
contentType: "Custom",
|
|
517
513
|
stickType: "2DPoint",
|
|
518
514
|
config: { visibleConfig: { visibleFiveMode: ["Floorplan", "Mapview"], followModelVisibility: !1 } },
|
|
519
515
|
style: { point: { enabled: !1 } },
|
|
520
516
|
data: {}
|
|
521
517
|
}, t);
|
|
522
|
-
s.tag = a,
|
|
523
|
-
var
|
|
524
|
-
(
|
|
525
|
-
const
|
|
526
|
-
return s.app =
|
|
518
|
+
s.tag = a, T(a) && (s.tag.element = (u) => {
|
|
519
|
+
var g, f;
|
|
520
|
+
(g = s.app) == null || g.$destroy();
|
|
521
|
+
const d = e === "start" ? c(m({}, a.data), { name: this.name, distance: Math.round((f = r.getLength()) != null ? f : 0), i18n: this.plugin.config.i18n }) : a.data, p = new B({ target: u, intro: !0, props: d });
|
|
522
|
+
return s.app = p, () => p.$destroy();
|
|
527
523
|
}), s.plugin.load({ tagList: [s.tag] });
|
|
528
524
|
const n = this.meshStyle.translate;
|
|
529
525
|
if (n && a.position) {
|
|
530
|
-
const
|
|
531
|
-
|
|
532
|
-
const
|
|
533
|
-
s.plugin.changeTagById(s.tag.id, { position:
|
|
526
|
+
const u = new h.Vector3().fromArray(a.position), d = new h.Vector3().fromArray(n);
|
|
527
|
+
u.add(d), u.y += this.heightOffset;
|
|
528
|
+
const p = u.toArray();
|
|
529
|
+
s.plugin.changeTagById(s.tag.id, { position: p });
|
|
534
530
|
}
|
|
535
531
|
}
|
|
536
532
|
doShow() {
|
|
@@ -543,28 +539,15 @@ class Y {
|
|
|
543
539
|
getPathFromPanoGroup(e, t, r) {
|
|
544
540
|
if (e.length < 2)
|
|
545
541
|
return [];
|
|
546
|
-
const s =
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
if ((u === 0 ? 999 : d.distanceTo(this.plugin.workUtil.getObserverStandingPosition(p))) < 0.05) {
|
|
552
|
-
let c = p;
|
|
553
|
-
for (; s[c] !== void 0; )
|
|
554
|
-
c = s[c];
|
|
555
|
-
s[l] = c;
|
|
556
|
-
return;
|
|
557
|
-
}
|
|
558
|
-
return {
|
|
559
|
-
position: d,
|
|
560
|
-
panoIndex: l
|
|
561
|
-
};
|
|
562
|
-
}).filter(V), a = o.map((l) => l.position.toArray()), n = o.map((l) => l.panoIndex);
|
|
563
|
-
return [T(f({ type: "CatmullRomCurve3", points: a }, r), { panoIndexList: n, panoIndexMap: s })];
|
|
542
|
+
const s = e.map((o) => {
|
|
543
|
+
var a;
|
|
544
|
+
return (a = this.plugin.workUtil.getObserverStandingPosition(o)) == null ? void 0 : a.toArray();
|
|
545
|
+
}).filter(V);
|
|
546
|
+
return [c(m({ type: "CatmullRomCurve3", points: s }, r), { panoIndexList: e })];
|
|
564
547
|
}
|
|
565
548
|
}
|
|
566
|
-
function
|
|
567
|
-
return
|
|
549
|
+
function T(l) {
|
|
550
|
+
return l.contentType === "Custom";
|
|
568
551
|
}
|
|
569
552
|
const he = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
570
553
|
__proto__: null,
|
|
@@ -14,7 +14,7 @@ import "../PanoTagPlugin/controller/index.js";
|
|
|
14
14
|
import "./Components/Tag.js";
|
|
15
15
|
import "./utils/index.js";
|
|
16
16
|
import "../vendor/object-assign-deep/objectAssignDeep.js";
|
|
17
|
-
import { GuideLineModeItem as
|
|
17
|
+
import { GuideLineModeItem as $i } from "./GuideLineModeItem/index.js";
|
|
18
18
|
import "../vendor/polyline-normals/index.js";
|
|
19
19
|
import "../vendor/polyline-miter-util/index.js";
|
|
20
20
|
import "../vendor/gl-vec2/add.js";
|
|
@@ -22,7 +22,6 @@ import "../vendor/gl-vec2/set.js";
|
|
|
22
22
|
import "../vendor/gl-vec2/normalize.js";
|
|
23
23
|
import "../vendor/gl-vec2/subtract.js";
|
|
24
24
|
import "../vendor/gl-vec2/dot.js";
|
|
25
|
-
import "../shared-utils/math/intersecting.js";
|
|
26
25
|
import "../shared-utils/positionToVector3.js";
|
|
27
26
|
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
28
27
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
@@ -159,5 +158,5 @@ import "../shared-utils/three/blink.js";
|
|
|
159
158
|
import "../PanoTagPlugin/utils/DebugUtil.js";
|
|
160
159
|
import "../CruisePlugin/utils/sleep.js";
|
|
161
160
|
export {
|
|
162
|
-
|
|
161
|
+
$i as GuideLineModeItem
|
|
163
162
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import t from "./Controller.js";
|
|
2
|
-
import { GuideLineItem$1 as
|
|
3
|
-
import { GuideLineModeItem$1 as
|
|
2
|
+
import { GuideLineItem$1 as wt } from "./GuideLineItem/index.js";
|
|
3
|
+
import { GuideLineModeItem$1 as bt } from "./GuideLineModeItem/index.js";
|
|
4
4
|
import "../base/BasePluginWithData.js";
|
|
5
5
|
import "../base/BasePlugin.js";
|
|
6
6
|
import "../shared-utils/Subscribe.js";
|
|
@@ -52,7 +52,6 @@ import "../vendor/gl-vec2/set.js";
|
|
|
52
52
|
import "../vendor/gl-vec2/normalize.js";
|
|
53
53
|
import "../vendor/gl-vec2/subtract.js";
|
|
54
54
|
import "../vendor/gl-vec2/dot.js";
|
|
55
|
-
import "../shared-utils/math/intersecting.js";
|
|
56
55
|
import "../shared-utils/five/mode.js";
|
|
57
56
|
import "../shared-utils/animationFrame/BetterTween.js";
|
|
58
57
|
import "../shared-utils/animationFrame/index.js";
|
|
@@ -178,10 +177,10 @@ import "../shared-utils/five/changeMode.js";
|
|
|
178
177
|
import "../shared-utils/nearlyEqual.js";
|
|
179
178
|
import "../CruisePlugin/Move.js";
|
|
180
179
|
import "../CruisePlugin/utils/getFiveStateOnCurve.js";
|
|
181
|
-
const r = (i, o) => new t(i, o),
|
|
180
|
+
const r = (i, o) => new t(i, o), gt = r;
|
|
182
181
|
export {
|
|
183
|
-
|
|
184
|
-
|
|
182
|
+
wt as GuideLineItem,
|
|
183
|
+
bt as GuideLineModeItem,
|
|
185
184
|
r as GuideLinePlugin,
|
|
186
|
-
|
|
185
|
+
gt as default
|
|
187
186
|
};
|
|
@@ -22,16 +22,11 @@ export declare function createLineGeometry(options: LineGeometryOption): {
|
|
|
22
22
|
maxV: number;
|
|
23
23
|
curvePath: any;
|
|
24
24
|
curvePoints: any;
|
|
25
|
-
animationWillError?: undefined;
|
|
26
25
|
panoMap?: undefined;
|
|
27
26
|
totalLength?: undefined;
|
|
28
27
|
} | {
|
|
29
28
|
geometry: THREE.BufferGeometry;
|
|
30
29
|
maxV: number;
|
|
31
|
-
animationWillError: {
|
|
32
|
-
start: number;
|
|
33
|
-
end: number;
|
|
34
|
-
}[];
|
|
35
30
|
curvePath: THREE.CurvePath<THREE.Vector3>;
|
|
36
31
|
curvePoints: THREE.Vector3[];
|
|
37
32
|
panoMap: Record<number, number>;
|