@realsee/dnalogel 3.40.1 → 3.40.2
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 +5 -1
- package/dist/index.cjs.js +4 -4
- package/dist/index.js +29 -26
- package/dist/index.umd.js +4 -4
- package/libs/GuideLinePlugin/Controller.js +41 -41
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +38 -35
- package/libs/base/BasePlugin.js +1 -1
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/three/blink.js +23 -23
- package/package.json +1 -1
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var c = (s, o, t) => o in s ?
|
|
1
|
+
var T = Object.defineProperty;
|
|
2
|
+
var G = Object.getOwnPropertySymbols;
|
|
3
|
+
var k = Object.prototype.hasOwnProperty, x = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var c = (s, o, t) => o in s ? T(s, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[o] = t, f = (s, o) => {
|
|
5
5
|
for (var t in o || (o = {}))
|
|
6
|
-
|
|
7
|
-
if (
|
|
8
|
-
for (var t of
|
|
9
|
-
|
|
6
|
+
k.call(o, t) && c(s, t, o[t]);
|
|
7
|
+
if (G)
|
|
8
|
+
for (var t of G(o))
|
|
9
|
+
x.call(o, t) && c(s, t, o[t]);
|
|
10
10
|
return s;
|
|
11
11
|
};
|
|
12
12
|
var h = (s, o, t) => (c(s, typeof o != "symbol" ? o + "" : o, t), t);
|
|
13
13
|
var u = (s, o, t) => new Promise((i, a) => {
|
|
14
|
-
var
|
|
14
|
+
var p = (m) => {
|
|
15
15
|
try {
|
|
16
|
-
r(t.next(
|
|
16
|
+
r(t.next(m));
|
|
17
17
|
} catch (n) {
|
|
18
18
|
a(n);
|
|
19
19
|
}
|
|
20
|
-
}, e = (
|
|
20
|
+
}, e = (m) => {
|
|
21
21
|
try {
|
|
22
|
-
r(t.throw(
|
|
22
|
+
r(t.throw(m));
|
|
23
23
|
} catch (n) {
|
|
24
24
|
a(n);
|
|
25
25
|
}
|
|
26
|
-
}, r = (
|
|
26
|
+
}, r = (m) => m.done ? i(m.value) : Promise.resolve(m.value).then(p, e);
|
|
27
27
|
r((t = t.apply(s, o)).next());
|
|
28
28
|
});
|
|
29
|
-
import { Controller as
|
|
30
|
-
import { equal as
|
|
31
|
-
import { GuideLineItem as
|
|
32
|
-
import
|
|
33
|
-
import { objectAssignDeepExports as
|
|
34
|
-
import * as
|
|
29
|
+
import { Controller as N } from "../base/BasePluginWithData.js";
|
|
30
|
+
import { equal as $ } from "../shared-utils/equal.js";
|
|
31
|
+
import { GuideLineItem as P } from "./GuideLineItem/index.js";
|
|
32
|
+
import W from "../CruisePlugin/Work.js";
|
|
33
|
+
import { objectAssignDeepExports as S } from "../vendor/object-assign-deep/objectAssignDeep.js";
|
|
34
|
+
import * as V from "three";
|
|
35
35
|
import "hammerjs";
|
|
36
36
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
37
37
|
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
38
38
|
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
39
|
-
import { waitFiveModelLoaded as
|
|
39
|
+
import { waitFiveModelLoaded as H } from "../shared-utils/five/fiveModelLoad.js";
|
|
40
40
|
import "animejs";
|
|
41
|
-
import { uuid as
|
|
41
|
+
import { uuid as U } from "../shared-utils/uuid.js";
|
|
42
42
|
import "../base/BasePlugin.js";
|
|
43
43
|
import "../shared-utils/Subscribe.js";
|
|
44
44
|
import "../shared-utils/url/absoluteUrl.js";
|
|
@@ -206,7 +206,7 @@ import "../CruisePlugin/utils/coordinatesToVector.js";
|
|
|
206
206
|
import "../CruisePlugin/utils/safeCall.js";
|
|
207
207
|
import "../shared-utils/five/fiveLoaded.js";
|
|
208
208
|
const b = "GuideLinePlugin", g = `${b}`, oe = (s) => `${g}--${s}`;
|
|
209
|
-
class me extends
|
|
209
|
+
class me extends N {
|
|
210
210
|
constructor(t, i) {
|
|
211
211
|
super(t, i);
|
|
212
212
|
h(this, "name", b);
|
|
@@ -225,7 +225,7 @@ class me extends x {
|
|
|
225
225
|
h(this, "disposedErrorLog", () => {
|
|
226
226
|
console.error(`${g} is disposed`);
|
|
227
227
|
});
|
|
228
|
-
this._config = i != null ? i : {}, this.cruisePlugin = new
|
|
228
|
+
this._config = i != null ? i : {}, this.cruisePlugin = new W(t), Object.assign(window, { [`__${b}_DEBUG__`]: this });
|
|
229
229
|
}
|
|
230
230
|
get config() {
|
|
231
231
|
return this._config;
|
|
@@ -236,8 +236,8 @@ class me extends x {
|
|
|
236
236
|
load(t, i, a = !0) {
|
|
237
237
|
return u(this, null, function* () {
|
|
238
238
|
var v, _, E, I, w, D, y, L;
|
|
239
|
-
const
|
|
240
|
-
this.hooks.emit("dataChange", e,
|
|
239
|
+
const p = this.data ? JSON.parse(JSON.stringify(this.data)) : void 0, e = yield this.formatData(t);
|
|
240
|
+
this.hooks.emit("dataChange", e, p), this.data = e;
|
|
241
241
|
const r = e.config, n = {
|
|
242
242
|
panorama_style: {
|
|
243
243
|
visible: !!(!e.lines && e.routes),
|
|
@@ -248,10 +248,10 @@ class me extends x {
|
|
|
248
248
|
auto_depth_test_effect_distance: this.config.autoDepthTestEffectDistance
|
|
249
249
|
}
|
|
250
250
|
}, d = (D = (w = e.routes) == null ? void 0 : w.map((l) => {
|
|
251
|
-
var
|
|
252
|
-
return
|
|
253
|
-
})) != null ? D : [],
|
|
254
|
-
yield
|
|
251
|
+
var A;
|
|
252
|
+
return S({}, n, { id: (A = l.id) != null ? A : U(), pano_group: l.panoIndexList });
|
|
253
|
+
})) != null ? D : [], M = (L = (y = e.lines) == null ? void 0 : y.map((l) => S({}, n, l))) != null ? L : [], O = [...d, ...M];
|
|
254
|
+
yield H(this.five), this.clear(), O.forEach((l) => {
|
|
255
255
|
this.addGuideLineItem(l);
|
|
256
256
|
}), this.updateTagsEnable(), this.handleVisible(this.state.visible), this.handleEnable(this.state.enabled), i && this.setState(i, { userAction: a }), this.hooks.emit("dataLoaded", e), console.debug(`${g} loaded`, e);
|
|
257
257
|
});
|
|
@@ -286,18 +286,18 @@ class me extends x {
|
|
|
286
286
|
this.disposed || (this.clear(), this.hooks.emit("dispose"));
|
|
287
287
|
}
|
|
288
288
|
setState(t, i) {
|
|
289
|
-
var
|
|
289
|
+
var p;
|
|
290
290
|
if (this.disposed)
|
|
291
291
|
return this.disposedErrorLog();
|
|
292
292
|
const a = f({}, this.state);
|
|
293
|
-
this.state = f(f({}, this.state), t), t.visible !== void 0 && t.visible !== a.visible && this.handleVisible(t.visible, i == null ? void 0 : i.userAction), t.enabled !== void 0 && t.enabled !== a.enabled && this.handleEnable(t.enabled, i == null ? void 0 : i.userAction),
|
|
293
|
+
this.state = f(f({}, this.state), t), t.visible !== void 0 && t.visible !== a.visible && this.handleVisible(t.visible, i == null ? void 0 : i.userAction), t.enabled !== void 0 && t.enabled !== a.enabled && this.handleEnable(t.enabled, i == null ? void 0 : i.userAction), $(a, this.state, { deep: !0 }) || (this.hooks.emit("stateChange", { state: this.state, prevState: a, userAction: (p = i == null ? void 0 : i.userAction) != null ? p : !0 }), this.five.needsRender = !0);
|
|
294
294
|
}
|
|
295
295
|
/** 添加一个 GuideLineItem */
|
|
296
296
|
addGuideLineItem(t) {
|
|
297
297
|
const i = t.render_id || t.id, a = this.itemMap.get(i);
|
|
298
298
|
a && this.removeGuideLineItem(a);
|
|
299
|
-
const
|
|
300
|
-
return this.itemMap.set(i,
|
|
299
|
+
const p = new P({ five: this.five, id: i, plugin: this });
|
|
300
|
+
return this.itemMap.set(i, p), t && p.setData(t), this.heightOffset += 1e-4, p.modelItem.setHeightOffset(this.heightOffset), p.panoramaItem.setHeightOffset(this.heightOffset), p;
|
|
301
301
|
}
|
|
302
302
|
/** 获取 Plugin 内的 GuideLineItem */
|
|
303
303
|
getGuideLineItemByID(t) {
|
|
@@ -314,21 +314,21 @@ class me extends x {
|
|
|
314
314
|
return Array.isArray(e) && e.every((r) => typeof r == "number");
|
|
315
315
|
}
|
|
316
316
|
function a(e, r) {
|
|
317
|
-
return new
|
|
317
|
+
return new V.Vector3().fromArray(e).distanceTo(new V.Vector3().fromArray(r)) < 0.01;
|
|
318
318
|
}
|
|
319
|
-
function
|
|
320
|
-
var
|
|
321
|
-
const r = (
|
|
319
|
+
function p(e) {
|
|
320
|
+
var m;
|
|
321
|
+
const r = (m = e == null ? void 0 : e.tag) == null ? void 0 : m.position;
|
|
322
322
|
return i(r) ? t.every((n) => {
|
|
323
323
|
var d;
|
|
324
324
|
return i((d = n.tag) == null ? void 0 : d.position) ? !a(r, n.tag.position) : !0;
|
|
325
325
|
}) : !1;
|
|
326
326
|
}
|
|
327
327
|
this.itemMap.forEach((e) => {
|
|
328
|
-
const r = e.modelItem.startTagContainer,
|
|
329
|
-
n && t.push(r), r.plugin.setState({ enabled: n }, {});
|
|
330
|
-
const d = m
|
|
331
|
-
d && t.push(
|
|
328
|
+
const r = e.modelItem.startTagContainer, m = e.modelItem.endTagContainer, n = p(r);
|
|
329
|
+
n && t.push(r), r == null || r.plugin.setState({ enabled: n }, {});
|
|
330
|
+
const d = p(m);
|
|
331
|
+
d && t.push(m), m == null || m.plugin.setState({ enabled: d }, {});
|
|
332
332
|
});
|
|
333
333
|
}
|
|
334
334
|
/** 清空所有 GuideLineItem */
|
|
@@ -2,15 +2,15 @@ var x = Object.defineProperty, w = Object.defineProperties;
|
|
|
2
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 y = (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) && y(l, t, e[t]);
|
|
8
8
|
if (D)
|
|
9
9
|
for (var t of D(e))
|
|
10
|
-
U.call(e, t) &&
|
|
10
|
+
U.call(e, t) && y(l, t, e[t]);
|
|
11
11
|
return l;
|
|
12
|
-
},
|
|
13
|
-
var i = (l, e, t) => (
|
|
12
|
+
}, b = (l, e) => w(l, M(e));
|
|
13
|
+
var i = (l, e, t) => (y(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";
|
|
@@ -258,18 +258,18 @@ class Y {
|
|
|
258
258
|
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;
|
|
259
259
|
});
|
|
260
260
|
i(this, "onFlickerAnimeUpdate", (e) => {
|
|
261
|
-
var s, o, a, n;
|
|
261
|
+
var s, o, a, n, u;
|
|
262
262
|
const { progress: t } = e, r = 1 - t;
|
|
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 &&
|
|
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, (s = this.startTagContainer) != null && s.tag && W(this.startTagContainer.tag) && ((n = this.startTagContainer.app) == null || n.$set(b(m({}, this.startTagContainer.tag.data), {
|
|
264
264
|
opacity: r,
|
|
265
265
|
name: this.name,
|
|
266
|
-
distance: Math.round((
|
|
267
|
-
}))), this.endTagContainer.tag &&
|
|
266
|
+
distance: Math.round((a = (o = this.curvePath) == null ? void 0 : o.getLength()) != null ? a : 0)
|
|
267
|
+
}))), this.endTagContainer.tag && W(this.endTagContainer.tag) && ((u = this.endTagContainer.app) == null || u.$set(b(m({}, this.endTagContainer.tag.data), { opacity: r })));
|
|
268
268
|
});
|
|
269
269
|
i(this, "logWarning", (e) => F("GuideLineModeItem: ", e));
|
|
270
270
|
i(this, "logError", (e) => L("GuideLineModeItem: ", e));
|
|
271
271
|
var o, a;
|
|
272
|
-
this.five = e, this.mode = t.mode, this.plugin = t.plugin, this.parent = t.parent, this.group.name = "GuideLineModeItem"
|
|
272
|
+
this.five = e, this.mode = t.mode, this.plugin = t.plugin, this.parent = t.parent, this.group.name = "GuideLineModeItem";
|
|
273
273
|
const r = new h.BufferGeometry(), s = new h.ShaderMaterial({
|
|
274
274
|
vertexShader: R,
|
|
275
275
|
fragmentShader: H,
|
|
@@ -352,12 +352,12 @@ class Y {
|
|
|
352
352
|
}
|
|
353
353
|
/** 通过路径设置线条形状 */
|
|
354
354
|
setGeometryByPath(e, t) {
|
|
355
|
-
var
|
|
355
|
+
var g, c, v, C;
|
|
356
356
|
if (this.disposed)
|
|
357
357
|
return this.logError("disposed");
|
|
358
|
-
const r = (
|
|
358
|
+
const r = (g = t == null ? void 0 : t.scale) != null ? g : this.scale, s = (c = t == null ? void 0 : t.width) != null ? c : this.width, o = (v = t == null ? void 0 : t.unit_length) != null ? v : this.unitLength;
|
|
359
359
|
this.scale = r, this.width = s, this.unitLength = o;
|
|
360
|
-
const { geometry: a, maxV: n, curvePath: u, curvePoints: d, panoMap: p, totalLength:
|
|
360
|
+
const { geometry: a, maxV: n, curvePath: u, curvePoints: d, panoMap: p, totalLength: f } = S({
|
|
361
361
|
path: e,
|
|
362
362
|
width: s * r,
|
|
363
363
|
unitLength: o * r,
|
|
@@ -365,8 +365,8 @@ class Y {
|
|
|
365
365
|
useAutoDepthTest: t.useAutoDepthTest
|
|
366
366
|
});
|
|
367
367
|
this.autoDepthTestEffectDistance = (C = t.autoDepthTestEffectDistance) != null ? C : (() => {
|
|
368
|
-
const
|
|
369
|
-
return
|
|
368
|
+
const T = f / 10;
|
|
369
|
+
return T > 3 ? 3 : T < 1 ? 1 : T;
|
|
370
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);
|
|
371
371
|
}
|
|
372
372
|
/** 设置线条材质 */
|
|
@@ -387,7 +387,7 @@ class Y {
|
|
|
387
387
|
const t = m(m({}, this.meshStyle), e);
|
|
388
388
|
this.meshStyle = t;
|
|
389
389
|
function r(s, o) {
|
|
390
|
-
if (!s.tag)
|
|
390
|
+
if (!(s != null && s.tag))
|
|
391
391
|
return;
|
|
392
392
|
const a = new h.Vector3().fromArray(s.tag.position);
|
|
393
393
|
a.add(o);
|
|
@@ -497,43 +497,46 @@ class Y {
|
|
|
497
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 = [];
|
|
498
498
|
let n = 0;
|
|
499
499
|
for (let d = 0; d < e; d++) {
|
|
500
|
-
const p = this.curvePoints[d],
|
|
501
|
-
if (!
|
|
500
|
+
const p = this.curvePoints[d], f = this.plugin.workUtil.getObserverStandingPosition(n);
|
|
501
|
+
if (!f)
|
|
502
502
|
break;
|
|
503
|
-
|
|
503
|
+
f.clone().setY(0).distanceTo(p.clone().setY(0)) < s && (a.push(o[d]), n += 1);
|
|
504
504
|
}
|
|
505
505
|
return a;
|
|
506
506
|
}
|
|
507
507
|
setTag(e, t) {
|
|
508
|
-
|
|
508
|
+
var u, d;
|
|
509
|
+
const r = this.curvePath;
|
|
509
510
|
if (!(t != null && t.data))
|
|
510
|
-
return
|
|
511
|
-
const a = I({}, {
|
|
511
|
+
return;
|
|
512
|
+
const s = e === "start" ? (u = this.startTagContainer) != null ? u : (() => (this.startTagContainer = { tag: null, plugin: new k(this.five, { containerZIndex: 1 }) }, this.startTagContainer))() : (d = this.endTagContainer) != null ? d : (() => (this.endTagContainer = { tag: null, plugin: new k(this.five, { containerZIndex: 1 }) }, this.endTagContainer))(), a = I({}, {
|
|
512
513
|
contentType: "Custom",
|
|
513
514
|
stickType: "2DPoint",
|
|
514
515
|
config: { visibleConfig: { visibleFiveMode: ["Floorplan", "Mapview"], followModelVisibility: !1 } },
|
|
515
516
|
style: { point: { enabled: !1 } },
|
|
516
517
|
data: {}
|
|
517
518
|
}, t);
|
|
518
|
-
s.tag = a,
|
|
519
|
-
var
|
|
520
|
-
(
|
|
521
|
-
const
|
|
522
|
-
return s.app =
|
|
519
|
+
s.tag = a, W(a) && (s.tag.element = (p) => {
|
|
520
|
+
var c, v;
|
|
521
|
+
(c = s.app) == null || c.$destroy();
|
|
522
|
+
const f = e === "start" ? b(m({}, a.data), { name: this.name, distance: Math.round((v = r.getLength()) != null ? v : 0), i18n: this.plugin.config.i18n }) : a.data, g = new B({ target: p, intro: !0, props: f });
|
|
523
|
+
return s.app = g, () => g.$destroy();
|
|
523
524
|
}), s.plugin.load({ tagList: [s.tag] });
|
|
524
525
|
const n = this.meshStyle.translate;
|
|
525
526
|
if (n && a.position) {
|
|
526
|
-
const
|
|
527
|
-
|
|
528
|
-
const
|
|
529
|
-
s.plugin.
|
|
527
|
+
const p = new h.Vector3().fromArray(a.position), f = new h.Vector3().fromArray(n);
|
|
528
|
+
p.add(f), p.y += this.heightOffset;
|
|
529
|
+
const g = p.toArray();
|
|
530
|
+
s.plugin.getTagById(s.tag.id).changePosition(g);
|
|
530
531
|
}
|
|
531
532
|
}
|
|
532
533
|
doShow() {
|
|
533
|
-
|
|
534
|
+
var e, t;
|
|
535
|
+
this.mode === "model" && this.flowAnime.play(), this.five.scene.add(this.group), (e = this.startTagContainer) == null || e.plugin.show(), (t = this.endTagContainer) == null || t.plugin.show(), this.five.needsRender = !0;
|
|
534
536
|
}
|
|
535
537
|
doHide() {
|
|
536
|
-
|
|
538
|
+
var e, t;
|
|
539
|
+
this.mode === "model" && this.flowAnime.stop(), this.five.scene.remove(this.group), (e = this.startTagContainer) == null || e.plugin.hide(), (t = this.endTagContainer) == null || t.plugin.hide(), this.five.needsRender = !0;
|
|
537
540
|
}
|
|
538
541
|
/** 通过 panoIndex 数组计算路径 */
|
|
539
542
|
getPathFromPanoGroup(e, t, r) {
|
|
@@ -543,10 +546,10 @@ class Y {
|
|
|
543
546
|
var a;
|
|
544
547
|
return (a = this.plugin.workUtil.getObserverStandingPosition(o)) == null ? void 0 : a.toArray();
|
|
545
548
|
}).filter(V);
|
|
546
|
-
return [
|
|
549
|
+
return [b(m({ type: "CatmullRomCurve3", points: s }, r), { panoIndexList: e })];
|
|
547
550
|
}
|
|
548
551
|
}
|
|
549
|
-
function
|
|
552
|
+
function W(l) {
|
|
550
553
|
return l.contentType === "Custom";
|
|
551
554
|
}
|
|
552
555
|
const he = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
package/libs/base/BasePlugin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function A() {
|
|
2
2
|
console.debug(
|
|
3
|
-
"%c %c@realsee/dnalogel %cv3.40.
|
|
3
|
+
"%c %c@realsee/dnalogel %cv3.40.2",
|
|
4
4
|
[
|
|
5
5
|
"background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAMAAACHgmeRAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABLFBMVEUAAAAapPoap/oaqvkbrfkbr/gZnfwZoPsaqfnD4v/E4/8Ylv0clPm93/+/4P/B4f8Yj/683/8Wif+33P8Uhv+x2f8ShP+s1v8Pgf+n0/8Nf/+h0f8Lff8Lff8Nf/9dl/+czv8KfP8KfP+Lxf+Uyv+Xy/+Hwv+Jw/+Mxf+Oxv+RyP8aovsapfoap/oZmfwZm/wZnvsYnPsYkf4YlP0NePsDYfgYcfi43f+63v8Xiv8Xjf4EWfwCV/sWZ/qz2v+02/8Vh/8WiP8EUf8CTf4WXv2u1/+v2P8Thf8Thv8ETf8CR/8VV/+o1f+q1f8Qgv8Rg/8DSv8BRf8UVP+j0v+k0v8OgP8Pgf8DR/8DQv9Nhf+dzv+fz/+Kv/+Vyv+Xy/+azf+Oxv+Qx/+SyP////8MUhLdAAAAK3RSTlMACEWQ2bd98uQECPXxqO7c+Pb49vj2+Pb49vj23Oul8fMHA+TwerXXjEIG2P+bHgAAAAFiS0dEY1y+LaoAAAB+SURBVAjXY2BgZGJmYWVgYGBgY9fW0eVg4ORi4NbTNzDk4eXjZxAwMjYxNTO3EGQQsrSytrG1sxdmEHFwdHJ2cXUTZRBz9/D08vbxFWeQ8PMPCAwKDpFkkAoNC4+IjIqWZpCRlZOPiY2LV2BQVGJQTkhMUlEFWaOmrqGpxQAAyg0S9Dq+VPYAAAAASUVORK5CYII=')",
|
|
6
6
|
"background-repeat: no-repeat",
|
|
@@ -11,39 +11,39 @@ var H = (a, t, r) => t in a ? R(a, t, { enumerable: !0, configurable: !0, writab
|
|
|
11
11
|
};
|
|
12
12
|
import D from "animejs";
|
|
13
13
|
import { toArray as g } from "../util.js";
|
|
14
|
-
const
|
|
14
|
+
const s = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Map();
|
|
15
15
|
function k(a) {
|
|
16
16
|
g(a).forEach((r) => {
|
|
17
|
-
var l,
|
|
18
|
-
|
|
17
|
+
var l, i;
|
|
18
|
+
s.has(r) || (r instanceof HTMLElement ? s.set(r, {
|
|
19
19
|
opacity: r.style.opacity === "" ? void 0 : r.style.opacity,
|
|
20
20
|
visible: {
|
|
21
21
|
display: r.style.display,
|
|
22
22
|
visibility: r.style.visibility
|
|
23
23
|
}
|
|
24
|
-
}) : r.isObject3D &&
|
|
24
|
+
}) : r.isObject3D && s.set(r, {
|
|
25
25
|
opacity: (l = r.material) == null ? void 0 : l.opacity,
|
|
26
|
-
transparent: (
|
|
26
|
+
transparent: (i = r.material) == null ? void 0 : i.transparent,
|
|
27
27
|
visible: r.visible
|
|
28
28
|
}));
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
function S(a) {
|
|
32
|
-
|
|
33
|
-
const l =
|
|
34
|
-
l && (r instanceof HTMLElement && (r.style.opacity = l.opacity === void 0 ? "" : l.opacity, r.style.display = l.visible.display, r.style.visibility = l.visible.visibility), r.isObject3D && (r.visible = l.visible, r.material && (r.material.opacity = l.opacity, r.material.transparent = l.transparent)),
|
|
32
|
+
g(a).forEach((r) => {
|
|
33
|
+
const l = s.get(r);
|
|
34
|
+
l && (r instanceof HTMLElement && (r.style.opacity = l.opacity === void 0 ? "" : l.opacity, r.style.display = l.visible.display, r.style.visibility = l.visible.visibility), r.isObject3D && (r.visible = l.visible, r.material && (r.material.opacity = l.opacity, r.material.transparent = l.transparent)), s.delete(r));
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
function w(a, t) {
|
|
38
38
|
var p;
|
|
39
39
|
const r = (p = t == null ? void 0 : t.traverseTHREEObject) != null ? p : !0;
|
|
40
40
|
let l = g(a);
|
|
41
|
-
const
|
|
41
|
+
const i = [];
|
|
42
42
|
l.forEach((y) => {
|
|
43
|
-
y instanceof HTMLElement ?
|
|
44
|
-
c &&
|
|
45
|
-
})) :
|
|
46
|
-
}), l = [...new Set(
|
|
43
|
+
y instanceof HTMLElement ? i.push(y) : y.isObject3D && (r ? (i.push(y), y.traverse((c) => {
|
|
44
|
+
c && i.push(c);
|
|
45
|
+
})) : i.push(y));
|
|
46
|
+
}), l = [...new Set(i)], k(l);
|
|
47
47
|
const e = D(E({
|
|
48
48
|
targets: l,
|
|
49
49
|
duration: 300,
|
|
@@ -56,9 +56,9 @@ function w(a, t) {
|
|
|
56
56
|
y.animatables.forEach((d) => {
|
|
57
57
|
var M;
|
|
58
58
|
const u = d.target;
|
|
59
|
-
if (!
|
|
59
|
+
if (!s.has(u))
|
|
60
60
|
return;
|
|
61
|
-
const h = Number((M =
|
|
61
|
+
const h = Number((M = s.get(u).opacity) != null ? M : 1) * (100 - y.progress) / 100;
|
|
62
62
|
u instanceof HTMLElement ? u.style.opacity = String(h) : u.material && (u.material.opacity = h, u.material.transparent = !0);
|
|
63
63
|
}), (c = t == null ? void 0 : t.updateRender) == null || c.call(t);
|
|
64
64
|
}
|
|
@@ -69,24 +69,24 @@ function w(a, t) {
|
|
|
69
69
|
return (y = t == null ? void 0 : t.updateRender) == null ? void 0 : y.call(t);
|
|
70
70
|
}));
|
|
71
71
|
};
|
|
72
|
-
const
|
|
73
|
-
return
|
|
72
|
+
const f = v.get(a);
|
|
73
|
+
return f == null || f.pause(), f == null || f.seek(0), v.set(a, e), e.play(), e.finished.then(() => {
|
|
74
74
|
var y;
|
|
75
75
|
S(l), setTimeout(() => {
|
|
76
76
|
v.get(a) === e && v.delete(a);
|
|
77
77
|
}, 1e3), (y = t == null ? void 0 : t.updateRender) == null || y.call(t);
|
|
78
78
|
}), e;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function z(a, t) {
|
|
81
81
|
return w(a, E({
|
|
82
82
|
update: (r) => {
|
|
83
83
|
var l;
|
|
84
|
-
r.animatables.forEach((
|
|
84
|
+
r.animatables.forEach((i) => {
|
|
85
85
|
var c, d;
|
|
86
|
-
const e =
|
|
87
|
-
if (!
|
|
86
|
+
const e = i.target;
|
|
87
|
+
if (!s.has(e))
|
|
88
88
|
return;
|
|
89
|
-
const
|
|
89
|
+
const f = s.get(e), y = ((d = (c = f == null ? void 0 : f.opacity) != null ? c : t == null ? void 0 : t.maxOpacity) != null ? d : 1) * (r.progress / 100);
|
|
90
90
|
e instanceof HTMLElement ? (e.style.opacity = String(y), e.style.visibility = "visible") : e.isObject3D && (g(a).includes(e) && (e.visible = !0), e.material && (e.material.opacity = y, e.material.transparent = !0));
|
|
91
91
|
}), (l = t == null ? void 0 : t.updateRender) == null || l.call(t);
|
|
92
92
|
}
|
|
@@ -95,5 +95,5 @@ function q(a, t) {
|
|
|
95
95
|
export {
|
|
96
96
|
v as animeMap,
|
|
97
97
|
w as blink,
|
|
98
|
-
|
|
98
|
+
z as reblink
|
|
99
99
|
};
|