@realsee/dnalogel 3.41.0 → 3.41.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/GuideLinePlugin/GuideLineModeItem.d.ts +0 -3
- package/dist/index.cjs.js +62 -62
- package/dist/index.js +4464 -4467
- package/dist/index.umd.js +56 -56
- package/dist/shared-utils/three/blink.d.ts +1 -1
- package/libs/CruisePlugin/Move.js +1 -1
- package/libs/CruisePlugin/Work.js +2 -2
- package/libs/CruisePlugin/index.js +1 -1
- package/libs/GuideLinePlugin/Controller.js +2 -2
- package/libs/GuideLinePlugin/GuideLineItem.js +1 -1
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +70 -76
- package/libs/GuideLinePlugin/GuideLineModeItem.d.ts +0 -3
- package/libs/GuideLinePlugin/GuideLineModeItem.js +2 -2
- package/libs/GuideLinePlugin/index.js +1 -1
- package/libs/GuideLinePlugin/utils/createLineGeometry.js +66 -66
- package/libs/base/BasePlugin.js +1 -1
- package/libs/index.js +1 -1
- package/libs/shared-utils/log.js +3 -7
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/three/blink.d.ts +1 -1
- package/libs/shared-utils/three/blink.js +77 -70
- package/package.json +1 -1
|
@@ -77,6 +77,7 @@ import "../vendor/gl-vec2/subtract.js";
|
|
|
77
77
|
import "../vendor/gl-vec2/dot.js";
|
|
78
78
|
import "../shared-utils/math/intersecting.js";
|
|
79
79
|
import "../shared-utils/five/mode.js";
|
|
80
|
+
import "../shared-utils/three/blink.js";
|
|
80
81
|
import "../shared-utils/isNil.js";
|
|
81
82
|
import "../shared-utils/animationFrame/BetterTween.js";
|
|
82
83
|
import "../shared-utils/animationFrame/index.js";
|
|
@@ -193,7 +194,6 @@ import "../vendor/classnames/index.js";
|
|
|
193
194
|
import "../PanoTagPlugin/Components/Common/TagPoint.js";
|
|
194
195
|
import "../shared-utils/three/GLTFLoader.js";
|
|
195
196
|
import "@realsee/five/gltf-loader";
|
|
196
|
-
import "../shared-utils/three/blink.js";
|
|
197
197
|
import "../PanoTagPlugin/utils/DebugUtil.js";
|
|
198
198
|
import "./utils/sleep.js";
|
|
199
199
|
import "../GuideLinePlugin/Components/Tag.js";
|
|
@@ -65,6 +65,8 @@ import "../vendor/gl-vec2/subtract.js";
|
|
|
65
65
|
import "../vendor/gl-vec2/dot.js";
|
|
66
66
|
import "../shared-utils/math/intersecting.js";
|
|
67
67
|
import "../shared-utils/five/mode.js";
|
|
68
|
+
import "../shared-utils/three/blink.js";
|
|
69
|
+
import "../shared-utils/util.js";
|
|
68
70
|
import "../shared-utils/animationFrame/BetterTween.js";
|
|
69
71
|
import "../shared-utils/animationFrame/index.js";
|
|
70
72
|
import "../shared-utils/three/loadTexture.js";
|
|
@@ -84,7 +86,6 @@ import "../PanoTagPlugin/controller/TagComputer.js";
|
|
|
84
86
|
import "../PanoTagPlugin/utils/tagPosition.js";
|
|
85
87
|
import "../shared-utils/three/centerPoint.js";
|
|
86
88
|
import "../PanoTagPlugin/utils/checkRange.js";
|
|
87
|
-
import "../shared-utils/util.js";
|
|
88
89
|
import "../PanoTagPlugin/controller/TagUtil.js";
|
|
89
90
|
import "../PanoTagPlugin/typings/tag/TagConfig.js";
|
|
90
91
|
import "../PanoTagPlugin/tag.config.js";
|
|
@@ -194,7 +195,6 @@ import "../vendor/classnames/index.js";
|
|
|
194
195
|
import "../PanoTagPlugin/Components/Common/TagPoint.js";
|
|
195
196
|
import "../shared-utils/three/GLTFLoader.js";
|
|
196
197
|
import "@realsee/five/gltf-loader";
|
|
197
|
-
import "../shared-utils/three/blink.js";
|
|
198
198
|
import "../PanoTagPlugin/utils/DebugUtil.js";
|
|
199
199
|
import "../GuideLinePlugin/Components/Tag.js";
|
|
200
200
|
import "../GuideLinePlugin/utils/index.js";
|
|
@@ -44,6 +44,7 @@ import "../vendor/gl-vec2/subtract.js";
|
|
|
44
44
|
import "../vendor/gl-vec2/dot.js";
|
|
45
45
|
import "../shared-utils/math/intersecting.js";
|
|
46
46
|
import "../shared-utils/five/mode.js";
|
|
47
|
+
import "../shared-utils/three/blink.js";
|
|
47
48
|
import "../shared-utils/isNil.js";
|
|
48
49
|
import "../shared-utils/animationFrame/BetterTween.js";
|
|
49
50
|
import "../shared-utils/animationFrame/index.js";
|
|
@@ -162,7 +163,6 @@ import "../vendor/classnames/index.js";
|
|
|
162
163
|
import "../PanoTagPlugin/Components/Common/TagPoint.js";
|
|
163
164
|
import "../shared-utils/three/GLTFLoader.js";
|
|
164
165
|
import "@realsee/five/gltf-loader";
|
|
165
|
-
import "../shared-utils/three/blink.js";
|
|
166
166
|
import "../PanoTagPlugin/utils/DebugUtil.js";
|
|
167
167
|
import "./utils/sleep.js";
|
|
168
168
|
import "../GuideLinePlugin/Components/Tag.js";
|
|
@@ -58,6 +58,8 @@ import "../vendor/gl-vec2/subtract.js";
|
|
|
58
58
|
import "../vendor/gl-vec2/dot.js";
|
|
59
59
|
import "../shared-utils/math/intersecting.js";
|
|
60
60
|
import "../shared-utils/five/mode.js";
|
|
61
|
+
import "../shared-utils/three/blink.js";
|
|
62
|
+
import "../shared-utils/util.js";
|
|
61
63
|
import "../shared-utils/isNil.js";
|
|
62
64
|
import "../shared-utils/animationFrame/BetterTween.js";
|
|
63
65
|
import "../shared-utils/animationFrame/index.js";
|
|
@@ -77,7 +79,6 @@ import "../PanoTagPlugin/controller/TagComputer.js";
|
|
|
77
79
|
import "../PanoTagPlugin/utils/tagPosition.js";
|
|
78
80
|
import "../shared-utils/three/centerPoint.js";
|
|
79
81
|
import "../PanoTagPlugin/utils/checkRange.js";
|
|
80
|
-
import "../shared-utils/util.js";
|
|
81
82
|
import "../PanoTagPlugin/controller/TagUtil.js";
|
|
82
83
|
import "../PanoTagPlugin/typings/tag/TagConfig.js";
|
|
83
84
|
import "../PanoTagPlugin/tag.config.js";
|
|
@@ -186,7 +187,6 @@ import "../vendor/classnames/index.js";
|
|
|
186
187
|
import "../PanoTagPlugin/Components/Common/TagPoint.js";
|
|
187
188
|
import "../shared-utils/three/GLTFLoader.js";
|
|
188
189
|
import "@realsee/five/gltf-loader";
|
|
189
|
-
import "../shared-utils/three/blink.js";
|
|
190
190
|
import "../PanoTagPlugin/utils/DebugUtil.js";
|
|
191
191
|
import "../CruisePlugin/utils/sleep.js";
|
|
192
192
|
import "./Components/Tag.js";
|
|
@@ -34,6 +34,7 @@ import "../shared-utils/three/getObjectVisible.js";
|
|
|
34
34
|
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
35
35
|
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
36
36
|
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
37
|
+
import "../shared-utils/three/blink.js";
|
|
37
38
|
import "animejs";
|
|
38
39
|
import "../shared-utils/isNil.js";
|
|
39
40
|
import "../shared-utils/animationFrame/BetterTween.js";
|
|
@@ -158,7 +159,6 @@ import "../vendor/classnames/index.js";
|
|
|
158
159
|
import "../PanoTagPlugin/Components/Common/TagPoint.js";
|
|
159
160
|
import "../shared-utils/three/GLTFLoader.js";
|
|
160
161
|
import "@realsee/five/gltf-loader";
|
|
161
|
-
import "../shared-utils/three/blink.js";
|
|
162
162
|
import "../PanoTagPlugin/utils/DebugUtil.js";
|
|
163
163
|
import "../CruisePlugin/utils/sleep.js";
|
|
164
164
|
import "./Components/Tag.js";
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
var
|
|
1
|
+
var k = Object.defineProperty, x = Object.defineProperties;
|
|
2
2
|
var w = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var D = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var M = Object.prototype.hasOwnProperty, P = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var T = (m, e, t) => e in m ? k(m, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : m[e] = t, c = (m, e) => {
|
|
6
6
|
for (var t in e || (e = {}))
|
|
7
|
-
|
|
7
|
+
M.call(e, t) && T(m, t, e[t]);
|
|
8
8
|
if (D)
|
|
9
9
|
for (var t of D(e))
|
|
10
|
-
|
|
10
|
+
P.call(e, t) && T(m, t, e[t]);
|
|
11
11
|
return m;
|
|
12
|
-
},
|
|
13
|
-
var i = (m, e, t) => (
|
|
12
|
+
}, y = (m, e) => x(m, w(e));
|
|
13
|
+
var i = (m, e, t) => (T(m, typeof e != "symbol" ? e + "" : e, t), t);
|
|
14
14
|
import * as h from "three";
|
|
15
|
-
import {
|
|
16
|
-
import { createLineGeometry as
|
|
17
|
-
import { isPanoramaLike as
|
|
15
|
+
import { logError as F } from "../../shared-utils/log.js";
|
|
16
|
+
import { createLineGeometry as U } from "../utils/createLineGeometry.js";
|
|
17
|
+
import { isPanoramaLike as L, isModelLike as S } 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
|
-
import "
|
|
23
|
-
import { notNil as
|
|
24
|
-
import { BetterTween as _
|
|
25
|
-
import { loadTexture as
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import { filterAdjacentDistinct as
|
|
29
|
-
import { objectAssignDeepExports as
|
|
30
|
-
const
|
|
22
|
+
import { blink as O } from "../../shared-utils/three/blink.js";
|
|
23
|
+
import { notNil as C } from "../../shared-utils/isNil.js";
|
|
24
|
+
import { BetterTween as _ } from "../../shared-utils/animationFrame/BetterTween.js";
|
|
25
|
+
import { loadTexture as A } from "../../shared-utils/three/loadTexture.js";
|
|
26
|
+
import V from "../../PanoTagPlugin/controller/index.js";
|
|
27
|
+
import E from "../Components/Tag.js";
|
|
28
|
+
import { filterAdjacentDistinct as G } from "../utils/index.js";
|
|
29
|
+
import { objectAssignDeepExports as B } from "../../vendor/object-assign-deep/objectAssignDeep.js";
|
|
30
|
+
const I = (
|
|
31
31
|
/* glsl */
|
|
32
32
|
`
|
|
33
33
|
varying vec2 vUv;
|
|
@@ -40,7 +40,7 @@ const R = (
|
|
|
40
40
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
41
41
|
}
|
|
42
42
|
`
|
|
43
|
-
),
|
|
43
|
+
), N = (
|
|
44
44
|
/* glsl */
|
|
45
45
|
`
|
|
46
46
|
// 是否使用颜色
|
|
@@ -175,7 +175,7 @@ const R = (
|
|
|
175
175
|
}
|
|
176
176
|
`
|
|
177
177
|
);
|
|
178
|
-
class
|
|
178
|
+
class R {
|
|
179
179
|
constructor(e, t) {
|
|
180
180
|
i(this, "name", "");
|
|
181
181
|
i(this, "startTagContainer");
|
|
@@ -213,7 +213,6 @@ class Y {
|
|
|
213
213
|
i(this, "textureHasLoaded", !1);
|
|
214
214
|
i(this, "disposed", !1);
|
|
215
215
|
i(this, "flowAnime", new _({ progress: 0 }).to({ progress: 1 }).duration(1500).repeat(1 / 0));
|
|
216
|
-
i(this, "flickerAnime", E(300).yoyo(!0).repeat(5));
|
|
217
216
|
/** 缓存 panoGroup 中每个点距离起点的长度 */
|
|
218
217
|
i(this, "cacheLengths", []);
|
|
219
218
|
/** 为了让多条路线在高度上错开,每个路线都需要有个额外的 offset */
|
|
@@ -234,12 +233,12 @@ class Y {
|
|
|
234
233
|
});
|
|
235
234
|
/** 模型状态变更 */
|
|
236
235
|
i(this, "onFiveModeChange", (e) => {
|
|
237
|
-
this.modeVisible = this.mode === "panorama" ?
|
|
236
|
+
this.modeVisible = this.mode === "panorama" ? L(e) : S(e), this.updateVisible();
|
|
238
237
|
});
|
|
239
238
|
/** 走点 */
|
|
240
239
|
i(this, "onFivePanoArrived", (e) => {
|
|
241
|
-
var s,
|
|
242
|
-
const t = (
|
|
240
|
+
var s, a, o, n, l, d;
|
|
241
|
+
const t = (o = (a = (s = this.path) == null ? void 0 : s[0]) == null ? void 0 : a.panoIndexMap) == null ? void 0 : o[e], r = this.panoMap[t != null ? t : e];
|
|
243
242
|
if (r === void 0)
|
|
244
243
|
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
244
|
else {
|
|
@@ -261,22 +260,12 @@ class Y {
|
|
|
261
260
|
const { progress: t } = e;
|
|
262
261
|
this.meshWithDepthTest.material.uniforms.vOffset.value = t, this.meshWithoutDepthTest.material.uniforms.vOffset.value = t, this.meshWithDepthTest.material.uniformsNeedUpdate = !0, this.meshWithoutDepthTest.material.uniformsNeedUpdate = !0, this.five.needsRender = !0;
|
|
263
262
|
});
|
|
264
|
-
i(this, "
|
|
265
|
-
|
|
266
|
-
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, (s = this.startTagContainer) != null && s.tag && W(this.startTagContainer.tag) && ((n = this.startTagContainer.app) == null || n.$set(T(c({}, this.startTagContainer.tag.data), {
|
|
268
|
-
opacity: r,
|
|
269
|
-
name: this.name,
|
|
270
|
-
distance: Math.round((a = (o = this.curvePath) == null ? void 0 : o.getLength()) != null ? a : 0)
|
|
271
|
-
}))), this.endTagContainer.tag && W(this.endTagContainer.tag) && ((l = this.endTagContainer.app) == null || l.$set(T(c({}, this.endTagContainer.tag.data), { opacity: r })));
|
|
272
|
-
});
|
|
273
|
-
i(this, "logWarning", (e) => F("GuideLineModeItem: ", e));
|
|
274
|
-
i(this, "logError", (e) => L("GuideLineModeItem: ", e));
|
|
275
|
-
var o, a;
|
|
263
|
+
i(this, "logError", (e) => F("GuideLineModeItem: ", e));
|
|
264
|
+
var a, o;
|
|
276
265
|
this.five = e, this.mode = t.mode, this.plugin = t.plugin, this.parent = t.parent, this.group.name = "GuideLineModeItem";
|
|
277
266
|
const r = new h.BufferGeometry(), s = new h.ShaderMaterial({
|
|
278
|
-
vertexShader:
|
|
279
|
-
fragmentShader:
|
|
267
|
+
vertexShader: I,
|
|
268
|
+
fragmentShader: N,
|
|
280
269
|
transparent: !0,
|
|
281
270
|
uniforms: {
|
|
282
271
|
map: { value: null },
|
|
@@ -299,7 +288,7 @@ class Y {
|
|
|
299
288
|
excludeMaxV: { value: -1 }
|
|
300
289
|
}
|
|
301
290
|
});
|
|
302
|
-
this.meshWithDepthTest = new h.Mesh(r, s), this.meshWithoutDepthTest = new h.Mesh(r, s.clone()), this.meshWithoutDepthTest.material.depthTest = !1, this.meshWithDepthTest.name = "GuideLineModeItemWithDepthTest", this.meshWithoutDepthTest.name = "GuideLineModeItemWithoutDepthTest", this.group.add(this.meshWithDepthTest), this.mode === "panorama" && (this.parent.hooks.on("walkStart", this.onWalkAnimationStart), this.parent.hooks.on("walkEnded", this.onWalkAnimationEnd), this.onFivePanoArrived(this.five.getCurrentState().panoIndex)), this.updateVisible(), this.onFiveModeChange(this.five.getCurrentState().mode), this.onFiveModelShownFloorChange((
|
|
291
|
+
this.meshWithDepthTest = new h.Mesh(r, s), this.meshWithoutDepthTest = new h.Mesh(r, s.clone()), this.meshWithoutDepthTest.material.depthTest = !1, this.meshWithDepthTest.name = "GuideLineModeItemWithDepthTest", this.meshWithoutDepthTest.name = "GuideLineModeItemWithoutDepthTest", this.group.add(this.meshWithDepthTest), this.mode === "panorama" && (this.parent.hooks.on("walkStart", this.onWalkAnimationStart), this.parent.hooks.on("walkEnded", this.onWalkAnimationEnd), this.onFivePanoArrived(this.five.getCurrentState().panoIndex)), this.updateVisible(), this.onFiveModeChange(this.five.getCurrentState().mode), this.onFiveModelShownFloorChange((o = (a = this.five.model) == null ? void 0 : a.shownFloor) != null ? o : null), this.flowAnime.onUpdate(this.onFlowAnimeUpdate), this.parent.hooks.on("show", this.updateVisible), this.parent.hooks.on("hide", this.updateVisible), this.plugin.hooks.on("show", this.updateVisible), this.plugin.hooks.on("hide", this.updateVisible), this.plugin.hooks.on("enable", this.updateVisible), this.plugin.hooks.on("disable", this.updateVisible), this.plugin.hooks.on("dispose", this.dispose), this.five.on("modeChange", this.onFiveModeChange), this.five.on("panoArrived", this.onFivePanoArrived), this.five.on("modelShownFloorChange", this.onFiveModelShownFloorChange), this.five.needsRender = !0;
|
|
303
292
|
}
|
|
304
293
|
get panoGroup() {
|
|
305
294
|
return this._panoGroup;
|
|
@@ -346,56 +335,56 @@ class Y {
|
|
|
346
335
|
return this.logError("disposed");
|
|
347
336
|
if (!this.five.work)
|
|
348
337
|
return this.logError("setPathByPanoGroup: work is not ready");
|
|
349
|
-
const r =
|
|
338
|
+
const r = G(e);
|
|
350
339
|
if (this._panoGroup = r, (t == null ? void 0 : t.skipPanoGroup) !== void 0) {
|
|
351
|
-
const
|
|
352
|
-
this.skippedPositions =
|
|
340
|
+
const a = t.skipPanoGroup ? r.map((o) => this.plugin.workUtil.getObserverStandingPosition(o)).filter(C) : null;
|
|
341
|
+
this.skippedPositions = a;
|
|
353
342
|
}
|
|
354
343
|
const s = this.getPathFromPanoGroup(r, this.five.work, t);
|
|
355
344
|
this.path = s, this.setGeometryByPath(s, t);
|
|
356
345
|
}
|
|
357
346
|
/** 通过路径设置线条形状 */
|
|
358
347
|
setGeometryByPath(e, t) {
|
|
359
|
-
var g, f, v,
|
|
348
|
+
var g, f, v, W;
|
|
360
349
|
if (this.disposed)
|
|
361
350
|
return this.logError("disposed");
|
|
362
|
-
const r = (g = t == null ? void 0 : t.scale) != null ? g : this.scale, s = (f = t == null ? void 0 : t.width) != null ? f : this.width,
|
|
363
|
-
this.scale = r, this.width = s, this.unitLength =
|
|
364
|
-
const { geometry:
|
|
351
|
+
const r = (g = t == null ? void 0 : t.scale) != null ? g : this.scale, s = (f = t == null ? void 0 : t.width) != null ? f : this.width, a = (v = t == null ? void 0 : t.unit_length) != null ? v : this.unitLength;
|
|
352
|
+
this.scale = r, this.width = s, this.unitLength = a;
|
|
353
|
+
const { geometry: o, maxV: n, curvePath: l, curvePoints: d, panoMap: u, totalLength: p } = U({
|
|
365
354
|
path: e,
|
|
366
355
|
width: s * r,
|
|
367
|
-
unitLength:
|
|
356
|
+
unitLength: a * r,
|
|
368
357
|
skipPositions: this.skippedPositions,
|
|
369
358
|
useAutoDepthTest: t.useAutoDepthTest
|
|
370
359
|
});
|
|
371
|
-
this.autoDepthTestEffectDistance = (
|
|
360
|
+
this.autoDepthTestEffectDistance = (W = t.autoDepthTestEffectDistance) != null ? W : (() => {
|
|
372
361
|
const b = p / 10;
|
|
373
362
|
return b > 3 ? 3 : b < 1 ? 1 : b;
|
|
374
|
-
})(), this.panoMap = u, this._curvePath = l, this._curvePoints = d, this.meshWithDepthTest.geometry.copy(
|
|
363
|
+
})(), this.panoMap = u, this._curvePath = l, this._curvePoints = d, this.meshWithDepthTest.geometry.copy(o), 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 = c(c({}, this.geometryStyle), t);
|
|
375
364
|
}
|
|
376
365
|
/** 设置线条材质 */
|
|
377
366
|
setMartial(e) {
|
|
378
|
-
var r, s,
|
|
367
|
+
var r, s, a, o, n;
|
|
379
368
|
if (this.disposed)
|
|
380
369
|
return this.logError("disposed");
|
|
381
|
-
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((
|
|
370
|
+
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((a = e == null ? void 0 : e.opacity) != null ? a : 0.5), this.setTextureUrl((n = (o = e == null ? void 0 : e.texture) == null ? void 0 : o.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
371
|
const t = c(c({}, this.materialStyle), e);
|
|
383
372
|
this.materialStyle = t;
|
|
384
373
|
}
|
|
385
374
|
/** 设置模型状态 */
|
|
386
375
|
setMeshStyle(e) {
|
|
387
376
|
if (e != null && e.translate) {
|
|
388
|
-
const s = new h.Vector3(),
|
|
389
|
-
|
|
377
|
+
const s = new h.Vector3(), a = new h.Vector3().fromArray(e.translate);
|
|
378
|
+
a.y += this.heightOffset, s.add(a), this.group.position.copy(s), r(this.startTagContainer, a), r(this.endTagContainer, a);
|
|
390
379
|
}
|
|
391
380
|
const t = c(c({}, this.meshStyle), e);
|
|
392
381
|
this.meshStyle = t;
|
|
393
|
-
function r(s,
|
|
382
|
+
function r(s, a) {
|
|
394
383
|
if (!(s != null && s.tag))
|
|
395
384
|
return;
|
|
396
|
-
const
|
|
397
|
-
|
|
398
|
-
const n =
|
|
385
|
+
const o = new h.Vector3().fromArray(s.tag.position);
|
|
386
|
+
o.add(a);
|
|
387
|
+
const n = o.toArray();
|
|
399
388
|
s.plugin.changeTagById(s.tag.id, { position: n });
|
|
400
389
|
}
|
|
401
390
|
}
|
|
@@ -463,7 +452,7 @@ class Y {
|
|
|
463
452
|
setTextureUrl(e) {
|
|
464
453
|
if (this.disposed)
|
|
465
454
|
return this.logError("disposed");
|
|
466
|
-
this.textureUrl = e,
|
|
455
|
+
this.textureUrl = e, A(e).then((t) => {
|
|
467
456
|
this.disposed || this.textureUrl === e && (t.wrapT = h.RepeatWrapping, this.textureHasLoaded = !0, this.meshWithDepthTest.material.uniforms.map.value = t, this.meshWithoutDepthTest.material.uniforms.map.value = t, this.meshWithDepthTest.material.uniformsNeedUpdate = !0, this.meshWithoutDepthTest.material.uniformsNeedUpdate = !0, this.meshWithDepthTest.material.needsUpdate = !0, this.meshWithoutDepthTest.material.needsUpdate = !0, this.five.needsRender = !0, this.updateVisible());
|
|
468
457
|
});
|
|
469
458
|
}
|
|
@@ -483,7 +472,12 @@ class Y {
|
|
|
483
472
|
flicker() {
|
|
484
473
|
if (this.disposed)
|
|
485
474
|
return this.logError("disposed");
|
|
486
|
-
this.
|
|
475
|
+
O(this.group, {
|
|
476
|
+
loop: 6,
|
|
477
|
+
updateRender: () => {
|
|
478
|
+
this.five.needsRender = !0;
|
|
479
|
+
}
|
|
480
|
+
});
|
|
487
481
|
}
|
|
488
482
|
/** 求起点到 panoIndex 曲线长度
|
|
489
483
|
* @param index panoIndex 在 panoGroup 中的索引
|
|
@@ -498,37 +492,37 @@ class Y {
|
|
|
498
492
|
var l;
|
|
499
493
|
if (!this.curvePoints || !this.curvePath)
|
|
500
494
|
return [];
|
|
501
|
-
const e = this.curvePoints.length, t = this.curvePath.getLength(), r = e - 1, s = t / r,
|
|
495
|
+
const e = this.curvePoints.length, t = this.curvePath.getLength(), r = e - 1, s = t / r, a = (l = this.curvePath.getLengths(r)) != null ? l : [], o = [];
|
|
502
496
|
let n = 0;
|
|
503
497
|
for (let d = 0; d < e; d++) {
|
|
504
498
|
const u = this.curvePoints[d], p = this.plugin.workUtil.getObserverStandingPosition(n);
|
|
505
499
|
if (!p)
|
|
506
500
|
break;
|
|
507
|
-
p.clone().setY(0).distanceTo(u.clone().setY(0)) < s && (
|
|
501
|
+
p.clone().setY(0).distanceTo(u.clone().setY(0)) < s && (o.push(a[d]), n += 1);
|
|
508
502
|
}
|
|
509
|
-
return
|
|
503
|
+
return o;
|
|
510
504
|
}
|
|
511
505
|
setTag(e, t) {
|
|
512
506
|
var l, d;
|
|
513
507
|
const r = this.curvePath;
|
|
514
508
|
if (!(t != null && t.data))
|
|
515
509
|
return;
|
|
516
|
-
const s = e === "start" ? (l = this.startTagContainer) != null ? l : (() => (this.startTagContainer = { tag: null, plugin: new
|
|
510
|
+
const s = e === "start" ? (l = this.startTagContainer) != null ? l : (() => (this.startTagContainer = { tag: null, plugin: new V(this.five, { containerZIndex: 1 }) }, this.startTagContainer))() : (d = this.endTagContainer) != null ? d : (() => (this.endTagContainer = { tag: null, plugin: new V(this.five, { containerZIndex: 1 }) }, this.endTagContainer))(), o = B({}, {
|
|
517
511
|
contentType: "Custom",
|
|
518
512
|
stickType: "2DPoint",
|
|
519
513
|
config: { visibleConfig: { visibleFiveMode: ["Floorplan", "Mapview"], followModelVisibility: !1 } },
|
|
520
514
|
style: { point: { enabled: !1 } },
|
|
521
515
|
data: {}
|
|
522
516
|
}, t);
|
|
523
|
-
s.tag =
|
|
517
|
+
s.tag = o, H(o) && (s.tag.element = (u) => {
|
|
524
518
|
var f, v;
|
|
525
519
|
(f = s.app) == null || f.$destroy();
|
|
526
|
-
const p = e === "start" ?
|
|
520
|
+
const p = e === "start" ? y(c({}, o.data), { name: this.name, distance: Math.round((v = r.getLength()) != null ? v : 0), i18n: this.plugin.config.i18n }) : o.data, g = new E({ target: u, intro: !0, props: p });
|
|
527
521
|
return s.app = g, () => g.$destroy();
|
|
528
522
|
}), s.plugin.load({ tagList: [s.tag] });
|
|
529
523
|
const n = this.meshStyle.translate;
|
|
530
|
-
if (n &&
|
|
531
|
-
const u = new h.Vector3().fromArray(
|
|
524
|
+
if (n && o.position) {
|
|
525
|
+
const u = new h.Vector3().fromArray(o.position), p = new h.Vector3().fromArray(n);
|
|
532
526
|
u.add(p), u.y += this.heightOffset;
|
|
533
527
|
const g = u.toArray();
|
|
534
528
|
s.plugin.changeTagById(s.tag.id, { position: g });
|
|
@@ -546,7 +540,7 @@ class Y {
|
|
|
546
540
|
getPathFromPanoGroup(e, t, r) {
|
|
547
541
|
if (e.length < 2)
|
|
548
542
|
return [];
|
|
549
|
-
const s = {},
|
|
543
|
+
const s = {}, a = e.map((l, d) => {
|
|
550
544
|
const u = this.plugin.workUtil.getObserverStandingPosition(l);
|
|
551
545
|
if (!u)
|
|
552
546
|
return;
|
|
@@ -562,18 +556,18 @@ class Y {
|
|
|
562
556
|
position: u,
|
|
563
557
|
panoIndex: l
|
|
564
558
|
};
|
|
565
|
-
}).filter(
|
|
566
|
-
return [
|
|
559
|
+
}).filter(C), o = a.map((l) => l.position.toArray()), n = a.map((l) => l.panoIndex);
|
|
560
|
+
return [y(c({ type: "CatmullRomCurve3", points: o }, r), { panoIndexList: n, panoIndexMap: s })];
|
|
567
561
|
}
|
|
568
562
|
}
|
|
569
|
-
function
|
|
563
|
+
function H(m) {
|
|
570
564
|
return m.contentType === "Custom";
|
|
571
565
|
}
|
|
572
|
-
const
|
|
566
|
+
const ae = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
573
567
|
__proto__: null,
|
|
574
|
-
GuideLineModeItem:
|
|
568
|
+
GuideLineModeItem: R
|
|
575
569
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
576
570
|
export {
|
|
577
|
-
|
|
578
|
-
|
|
571
|
+
R as GuideLineModeItem,
|
|
572
|
+
ae as GuideLineModeItem$1
|
|
579
573
|
};
|
|
@@ -58,7 +58,6 @@ declare class GuideLineModeItem {
|
|
|
58
58
|
private textureHasLoaded;
|
|
59
59
|
private disposed;
|
|
60
60
|
private flowAnime;
|
|
61
|
-
private flickerAnime;
|
|
62
61
|
/** 缓存 panoGroup 中每个点距离起点的长度 */
|
|
63
62
|
private cacheLengths;
|
|
64
63
|
/** 为了让多条路线在高度上错开,每个路线都需要有个额外的 offset */
|
|
@@ -147,8 +146,6 @@ declare class GuideLineModeItem {
|
|
|
147
146
|
/** 通过 panoIndex 数组计算路径 */
|
|
148
147
|
private getPathFromPanoGroup;
|
|
149
148
|
private onFlowAnimeUpdate;
|
|
150
|
-
private onFlickerAnimeUpdate;
|
|
151
|
-
private logWarning;
|
|
152
149
|
private logError;
|
|
153
150
|
}
|
|
154
151
|
export { GuideLineModeItem };
|
|
@@ -6,7 +6,7 @@ import "hammerjs";
|
|
|
6
6
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
7
7
|
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
8
8
|
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
9
|
-
import "
|
|
9
|
+
import "../shared-utils/three/blink.js";
|
|
10
10
|
import "../shared-utils/isNil.js";
|
|
11
11
|
import "../shared-utils/animationFrame/BetterTween.js";
|
|
12
12
|
import "../shared-utils/three/loadTexture.js";
|
|
@@ -37,6 +37,7 @@ import "../shared-utils/three/centerPoint.js";
|
|
|
37
37
|
import "../shared-utils/three/getObjectVisible.js";
|
|
38
38
|
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
39
39
|
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
40
|
+
import "animejs";
|
|
40
41
|
import "../shared-utils/animationFrame/index.js";
|
|
41
42
|
import "@realsee/five";
|
|
42
43
|
import "../PanoTagPlugin/utils/addDebugPoints.js";
|
|
@@ -155,7 +156,6 @@ import "../vendor/classnames/index.js";
|
|
|
155
156
|
import "../PanoTagPlugin/Components/Common/TagPoint.js";
|
|
156
157
|
import "../shared-utils/three/GLTFLoader.js";
|
|
157
158
|
import "@realsee/five/gltf-loader";
|
|
158
|
-
import "../shared-utils/three/blink.js";
|
|
159
159
|
import "../PanoTagPlugin/utils/DebugUtil.js";
|
|
160
160
|
import "../CruisePlugin/utils/sleep.js";
|
|
161
161
|
export {
|
|
@@ -54,6 +54,7 @@ import "../vendor/gl-vec2/subtract.js";
|
|
|
54
54
|
import "../vendor/gl-vec2/dot.js";
|
|
55
55
|
import "../shared-utils/math/intersecting.js";
|
|
56
56
|
import "../shared-utils/five/mode.js";
|
|
57
|
+
import "../shared-utils/three/blink.js";
|
|
57
58
|
import "../shared-utils/animationFrame/BetterTween.js";
|
|
58
59
|
import "../shared-utils/animationFrame/index.js";
|
|
59
60
|
import "../shared-utils/three/loadTexture.js";
|
|
@@ -169,7 +170,6 @@ import "../vendor/classnames/index.js";
|
|
|
169
170
|
import "../PanoTagPlugin/Components/Common/TagPoint.js";
|
|
170
171
|
import "../shared-utils/three/GLTFLoader.js";
|
|
171
172
|
import "@realsee/five/gltf-loader";
|
|
172
|
-
import "../shared-utils/three/blink.js";
|
|
173
173
|
import "../PanoTagPlugin/utils/DebugUtil.js";
|
|
174
174
|
import "./Components/Tag.js";
|
|
175
175
|
import "./utils/index.js";
|