@realsee/dnalogel 3.79.2 → 3.79.4
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/PanoTagPlugin/controller/Tag/PlaneTag.d.ts +7 -1
- package/dist/Sculpt/utils/isIntersecting.d.ts +17 -0
- package/dist/index.cjs.js +74 -74
- package/dist/index.js +5076 -4991
- package/dist/index.umd.js +67 -67
- package/libs/CruisePlugin/Move.js +3 -2
- package/libs/CruisePlugin/Work.js +3 -2
- package/libs/CruisePlugin/index.js +7 -6
- package/libs/GuideLinePlugin/Controller.js +5 -4
- package/libs/GuideLinePlugin/GuideLineItem.js +3 -2
- package/libs/GuideLinePlugin/GuideLineModeItem.js +3 -2
- package/libs/GuideLinePlugin/index.js +7 -6
- package/libs/PanoTagPlugin/controller/Tag/BoxTag.js +21 -20
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.d.ts +7 -1
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +129 -108
- package/libs/PanoTagPlugin/controller/Tag/PolygonTag.js +3 -2
- package/libs/PanoTagPlugin/controller/index.js +6 -5
- package/libs/PanoTagPlugin/index.js +12 -11
- package/libs/Sculpt/Objects/Polygon/index.js +100 -99
- package/libs/Sculpt/utils/isIntersecting.d.ts +17 -0
- package/libs/Sculpt/utils/isIntersecting.js +68 -0
- package/libs/base/BasePlugin.js +1 -1
- package/libs/index.js +159 -158
- package/libs/shared-utils/logger.js +1 -1
- package/package.json +1 -1
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var j = Object.defineProperty, V = Object.defineProperties;
|
|
2
|
+
var k = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var F = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var M = Object.prototype.hasOwnProperty, w = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var b = (c, d, t) => d in c ? j(c, d, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[d] = t, I = (c, d) => {
|
|
6
6
|
for (var t in d || (d = {}))
|
|
7
|
-
|
|
7
|
+
M.call(d, t) && b(c, t, d[t]);
|
|
8
8
|
if (F)
|
|
9
9
|
for (var t of F(d))
|
|
10
|
-
w.call(d, t) &&
|
|
10
|
+
w.call(d, t) && b(c, t, d[t]);
|
|
11
11
|
return c;
|
|
12
|
-
}, S = (c, d) =>
|
|
13
|
-
var
|
|
12
|
+
}, S = (c, d) => V(c, k(d));
|
|
13
|
+
var v = (c, d, t) => (b(c, typeof d != "symbol" ? d + "" : d, t), t);
|
|
14
14
|
var C = (c, d, t) => new Promise((e, i) => {
|
|
15
15
|
var o = (r) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
18
|
-
} catch (
|
|
19
|
-
i(
|
|
17
|
+
p(t.next(r));
|
|
18
|
+
} catch (a) {
|
|
19
|
+
i(a);
|
|
20
20
|
}
|
|
21
21
|
}, l = (r) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
24
|
-
} catch (
|
|
25
|
-
i(
|
|
23
|
+
p(t.throw(r));
|
|
24
|
+
} catch (a) {
|
|
25
|
+
i(a);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, p = (r) => r.done ? e(r.value) : Promise.resolve(r.value).then(o, l);
|
|
28
|
+
p((t = t.apply(c, d)).next());
|
|
29
29
|
});
|
|
30
|
-
import { CONST as
|
|
31
|
-
import { CSS3DObjectPlus as
|
|
32
|
-
import { anyPositionToVector3 as
|
|
33
|
-
import * as
|
|
34
|
-
import { planeNormal as
|
|
35
|
-
import { centerPoint as
|
|
36
|
-
import { VideoPlane as
|
|
37
|
-
import
|
|
38
|
-
import { BaseTag as
|
|
30
|
+
import { CONST as _ } from "../../../shared-utils/constants.js";
|
|
31
|
+
import { CSS3DObjectPlus as O } from "../../../shared-utils/CSS3DRender/CSS3DObject.js";
|
|
32
|
+
import { anyPositionToVector3 as E, arrayPositionToVector3 as P } from "../../../shared-utils/positionToVector3.js";
|
|
33
|
+
import * as x from "three";
|
|
34
|
+
import { planeNormal as A } from "../../utils/planeNormal.js";
|
|
35
|
+
import { centerPoint as H } from "../../../shared-utils/three/centerPoint.js";
|
|
36
|
+
import { VideoPlane as G, ImagePlane as L } from "../../utils/model/mediaPlane.js";
|
|
37
|
+
import B from "../../Components/Tag/index.js";
|
|
38
|
+
import { BaseTag as N } from "./BaseTag.js";
|
|
39
39
|
import "../../../shared-utils/tag.js";
|
|
40
40
|
import "../../../vendor/hammerjs/hammer.js";
|
|
41
41
|
import "../../../shared-utils/three/PointSelector/index.js";
|
|
42
42
|
import "../../../shared-utils/three/CSS3DRenderer/index.js";
|
|
43
|
-
import { initialCSS3DRender as
|
|
43
|
+
import { initialCSS3DRender as $ } from "../../../shared-utils/CSS3DRender/index.js";
|
|
44
44
|
import "@realsee/five/line";
|
|
45
45
|
import "../../../shared-utils/three/core/Five_LineMaterial2.js";
|
|
46
46
|
import "../../../shared-utils/three/core/Sphere.js";
|
|
@@ -48,11 +48,11 @@ import "../../../shared-utils/three/blink.js";
|
|
|
48
48
|
import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
49
49
|
import "../../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
50
50
|
import "../../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
51
|
-
import { waitFiveModelLoaded as
|
|
51
|
+
import { waitFiveModelLoaded as T } from "../../../shared-utils/five/fiveModelLoad.js";
|
|
52
52
|
import "../../../vendor/earcut/src/earcut.js";
|
|
53
|
-
import { uuid as
|
|
53
|
+
import { uuid as U } from "../../../shared-utils/uuid.js";
|
|
54
54
|
import "../../../shared-utils/five/FivePuppet.js";
|
|
55
|
-
import { Sculpt as
|
|
55
|
+
import { Sculpt as R } from "../../../Sculpt/index.js";
|
|
56
56
|
import { Rectangle as W } from "../../../Sculpt/Objects/Rectangle/index.js";
|
|
57
57
|
import { getFloorMesh as q } from "../../../shared-utils/five/getFloorMesh.js";
|
|
58
58
|
import "../../../shared-utils/even.js";
|
|
@@ -276,6 +276,7 @@ import "../../../PanoMeasurePlugin/utils/isIntersecting.js";
|
|
|
276
276
|
import "../../../Sculpt/utils/three/ColoredMesh.js";
|
|
277
277
|
import "../../../shared-utils/three/geometryUtil.js";
|
|
278
278
|
import "../../../Sculpt/Objects/Polygon/Editor.js";
|
|
279
|
+
import "../../../Sculpt/utils/isIntersecting.js";
|
|
279
280
|
import "../../../Sculpt/Objects/Prism/index.js";
|
|
280
281
|
import "../../../Sculpt/Meshes/Prism.js";
|
|
281
282
|
import "../../../shared-utils/three/core/PrismGeometry.js";
|
|
@@ -301,12 +302,12 @@ import "../../../Sculpt/Objects/Line/index.js";
|
|
|
301
302
|
import "../../../Sculpt/Editors/RectangleMeshEditor.js";
|
|
302
303
|
import "../../../Sculpt/utils/sortPositionsByCameraPosition.js";
|
|
303
304
|
const Z = /* @__PURE__ */ new Map(), z = /* @__PURE__ */ new Map();
|
|
304
|
-
class
|
|
305
|
+
class tn extends N {
|
|
305
306
|
constructor(t, e) {
|
|
306
307
|
super(t, e);
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
308
|
+
v(this, "_floorIndex");
|
|
309
|
+
v(this, "_floorIndexDirty", !0);
|
|
310
|
+
v(this, "_opacity");
|
|
310
311
|
this.state.unfolded = !0, this.loadModel();
|
|
311
312
|
}
|
|
312
313
|
/** 获取透明度 */
|
|
@@ -327,73 +328,73 @@ class Yr extends B {
|
|
|
327
328
|
this._floorIndexDirty = !0;
|
|
328
329
|
}
|
|
329
330
|
applyVisible() {
|
|
330
|
-
var e, i, o, l,
|
|
331
|
-
this.computeRenderType() === "Mesh" ? (this.initialSculpt(), ((i = (e = this.data.mediaData) == null ? void 0 : e[0]) == null ? void 0 : i.type) === "Video" ? this.renderVideoPlane() : ((l = (o = this.data.mediaData) == null ? void 0 : o[0]) == null ? void 0 : l.type) === "Image" ? this.renderImagePlane() : this.renderEmptyPlane()) : ((
|
|
331
|
+
var e, i, o, l, p, r;
|
|
332
|
+
this.computeRenderType() === "Mesh" ? (this.initialSculpt(), ((i = (e = this.data.mediaData) == null ? void 0 : e[0]) == null ? void 0 : i.type) === "Video" ? this.renderVideoPlane() : ((l = (o = this.data.mediaData) == null ? void 0 : o[0]) == null ? void 0 : l.type) === "Image" ? this.renderImagePlane() : this.renderEmptyPlane()) : ((p = this.tag3DContentSvelte) == null || p.svelteApp.$set({ tag: this, state: this.plugin.state, temporaryState: this.plugin.temporaryState }), (r = this.tag3DContentSvelte) != null && r.css3DInstance && (this.tag3DContentSvelte.css3DInstance.visible = this.visible, this.five.needsRender = !0)), this.syncEditorAuxiliaryVisibility();
|
|
332
333
|
}
|
|
333
334
|
set(t, e = !0) {
|
|
334
|
-
super.set(t, e),
|
|
335
|
+
super.set(t, e), T(this.five).then(() => {
|
|
335
336
|
this.tag3DContentSvelte && (t.data ? this.tag3DContentSvelte.svelteApp.$set({ tag: this, state: this.plugin.state, temporaryState: this.plugin.temporaryState }) : t.position && this.loadModel());
|
|
336
337
|
});
|
|
337
338
|
}
|
|
338
339
|
setData(...t) {
|
|
339
|
-
var i, o, l,
|
|
340
|
-
super.setData(...t), this.computeRenderType() === "Mesh" ? (((o = (i = this.data.mediaData) == null ? void 0 : i[0]) == null ? void 0 : o.type) === "Video" ? this.renderVideoPlane() : ((
|
|
340
|
+
var i, o, l, p, r;
|
|
341
|
+
super.setData(...t), this.computeRenderType() === "Mesh" ? (((o = (i = this.data.mediaData) == null ? void 0 : i[0]) == null ? void 0 : o.type) === "Video" ? this.renderVideoPlane() : ((p = (l = this.data.mediaData) == null ? void 0 : l[0]) == null ? void 0 : p.type) === "Image" ? this.renderImagePlane() : this.renderEmptyPlane(), this.mediaPlane && (this.mediaPlane.opacity = this.opacity)) : (r = this.tag3DContentSvelte) == null || r.svelteApp.$set({ tag: this });
|
|
341
342
|
}
|
|
342
343
|
/** 计算楼层索引 */
|
|
343
344
|
computeFloorIndex() {
|
|
344
|
-
var
|
|
345
|
+
var p, r;
|
|
345
346
|
const t = /* @__PURE__ */ new Map();
|
|
346
|
-
((r = (
|
|
347
|
+
((r = (p = this.five.works.getWork(this.workUtil.workCode)) == null ? void 0 : p.observers) != null ? r : []).forEach((a) => {
|
|
347
348
|
var h;
|
|
348
|
-
const
|
|
349
|
-
if (!t.has(
|
|
350
|
-
const u = q(this.five,
|
|
351
|
-
u.isEmpty() || t.set(
|
|
349
|
+
const m = (h = a.floorIndex) != null ? h : 0;
|
|
350
|
+
if (!t.has(m)) {
|
|
351
|
+
const u = q(this.five, m);
|
|
352
|
+
u.isEmpty() || t.set(m, u);
|
|
352
353
|
}
|
|
353
354
|
});
|
|
354
|
-
const i =
|
|
355
|
-
if (t.forEach((
|
|
356
|
-
l.push({ floorIndex:
|
|
355
|
+
const i = H(...this.position.map(E)), o = [], l = [];
|
|
356
|
+
if (t.forEach((a, m) => {
|
|
357
|
+
l.push({ floorIndex: m, box: a }), a.containsPoint(i) && o.push({ floorIndex: m, box: a });
|
|
357
358
|
}), o.length === 1)
|
|
358
359
|
return o[0].floorIndex;
|
|
359
360
|
if (o.length > 1) {
|
|
360
|
-
let
|
|
361
|
+
let a = 1 / 0, m = o[0].floorIndex;
|
|
361
362
|
return o.forEach(({ floorIndex: h, box: u }) => {
|
|
362
|
-
const
|
|
363
|
-
u.getCenter(
|
|
364
|
-
const
|
|
365
|
-
|
|
366
|
-
}),
|
|
363
|
+
const s = new x.Vector3();
|
|
364
|
+
u.getCenter(s);
|
|
365
|
+
const n = i.distanceTo(s);
|
|
366
|
+
n < a && (a = n, m = h);
|
|
367
|
+
}), m;
|
|
367
368
|
}
|
|
368
369
|
if (l.length > 0) {
|
|
369
|
-
let
|
|
370
|
+
let a = 1 / 0, m = l[0].floorIndex;
|
|
370
371
|
return l.forEach(({ floorIndex: h, box: u }) => {
|
|
371
|
-
const
|
|
372
|
-
u.getCenter(
|
|
373
|
-
const
|
|
374
|
-
|
|
375
|
-
}),
|
|
372
|
+
const s = new x.Vector3();
|
|
373
|
+
u.getCenter(s);
|
|
374
|
+
const n = i.distanceTo(s);
|
|
375
|
+
n < a && (a = n, m = h);
|
|
376
|
+
}), m;
|
|
376
377
|
}
|
|
377
378
|
}
|
|
378
379
|
loadModel() {
|
|
379
380
|
return C(this, null, function* () {
|
|
380
|
-
var e, i, o, l,
|
|
381
|
-
if (yield
|
|
381
|
+
var e, i, o, l, p, r;
|
|
382
|
+
if (yield T(this.five), this.computeRenderType() === "Mesh")
|
|
382
383
|
this.initialSculpt(), ((i = (e = this.data.mediaData) == null ? void 0 : e[0]) == null ? void 0 : i.type) === "Video" ? this.renderVideoPlane() : ((l = (o = this.data.mediaData) == null ? void 0 : o[0]) == null ? void 0 : l.type) === "Image" ? this.renderImagePlane() : this.renderEmptyPlane();
|
|
383
384
|
else {
|
|
384
|
-
|
|
385
|
-
const
|
|
386
|
-
(r = (
|
|
387
|
-
const
|
|
388
|
-
|
|
389
|
-
const h =
|
|
390
|
-
|
|
391
|
-
let
|
|
392
|
-
|
|
385
|
+
$(this.five);
|
|
386
|
+
const a = this.position.map(E);
|
|
387
|
+
(r = (p = this.tag3DContentSvelte) == null ? void 0 : p.dispose) == null || r.call(p);
|
|
388
|
+
const m = document.createElement("div");
|
|
389
|
+
m.classList.add("tag-media-container");
|
|
390
|
+
const h = I({ mode: "front", cornerPoints: a, container: m }, this.config.tag3DConfig), u = this.computeRenderType() === "BehindDom" || h.mode === "behind" ? "behind" : "front", s = new O(S(I({}, h), { mode: u })), n = this.computeNormal();
|
|
391
|
+
s.position.add(n.clone().setLength(_.Z_FIGHTING_OFFSET)), this.plugin.group.add(s);
|
|
392
|
+
let y;
|
|
393
|
+
s.mode === "behind" && this.config.clickable !== !1 && (y = this.addObjectClickHandler(this, s, (g) => {
|
|
393
394
|
this.plugin.hooks.emit("click", { event: g, target: "TagContent", tag: this });
|
|
394
395
|
}));
|
|
395
|
-
const f = new
|
|
396
|
-
target:
|
|
396
|
+
const f = new B({
|
|
397
|
+
target: m,
|
|
397
398
|
props: {
|
|
398
399
|
tag: this,
|
|
399
400
|
hooks: this.plugin.hooks,
|
|
@@ -406,13 +407,13 @@ class Yr extends B {
|
|
|
406
407
|
this.tag3DContentSvelte = {
|
|
407
408
|
svelteApp: f,
|
|
408
409
|
domContainer: {
|
|
409
|
-
css3DObject:
|
|
410
|
+
css3DObject: s
|
|
410
411
|
},
|
|
411
|
-
css3DInstance:
|
|
412
|
-
initialNormal:
|
|
413
|
-
currentNormal:
|
|
412
|
+
css3DInstance: s,
|
|
413
|
+
initialNormal: n,
|
|
414
|
+
currentNormal: n,
|
|
414
415
|
dispose: () => {
|
|
415
|
-
f.$destroy(),
|
|
416
|
+
f.$destroy(), s.dispose(), y == null || y();
|
|
416
417
|
}
|
|
417
418
|
}, this.five.needsRender = !0;
|
|
418
419
|
}
|
|
@@ -421,11 +422,11 @@ class Yr extends B {
|
|
|
421
422
|
initialSculpt() {
|
|
422
423
|
if (this.rectanglePlane)
|
|
423
424
|
return;
|
|
424
|
-
const t = new
|
|
425
|
+
const t = new R(this.five, void 0, {
|
|
425
426
|
magnifier: null
|
|
426
427
|
});
|
|
427
428
|
t.clear(), t.group.removeFromParent();
|
|
428
|
-
const e =
|
|
429
|
+
const e = U(), i = new W(
|
|
429
430
|
{
|
|
430
431
|
id: e,
|
|
431
432
|
type: "Rectangle",
|
|
@@ -446,7 +447,7 @@ class Yr extends B {
|
|
|
446
447
|
}), i.editor.disable();
|
|
447
448
|
}
|
|
448
449
|
editorEnable() {
|
|
449
|
-
this.rectanglePlane || this.initialSculpt(), this.rectanglePlane.visible = !0, this.rectanglePlane.editor.enable();
|
|
450
|
+
this.rectanglePlane || this.initialSculpt(), this.rectanglePlane.visible = !0, this.rectanglePlane.editor.enable(), this.syncEditorAuxiliaryVisibility();
|
|
450
451
|
}
|
|
451
452
|
editorDisable(t) {
|
|
452
453
|
var i;
|
|
@@ -456,21 +457,41 @@ class Yr extends B {
|
|
|
456
457
|
points: e
|
|
457
458
|
}), this.rectanglePlane.editor.disable();
|
|
458
459
|
}
|
|
460
|
+
getRectangleHelper() {
|
|
461
|
+
var e, i;
|
|
462
|
+
const t = (e = this.rectanglePlane) == null ? void 0 : e.rectangleMesh;
|
|
463
|
+
if (t)
|
|
464
|
+
return (i = R.modules.object3DHelper.getObject3DHelper(t)) == null ? void 0 : i.helper;
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* 标签因为 visiblePanoIndex 等可见性规则被隐藏时,同时隐藏编辑辅助元素。
|
|
468
|
+
* 当标签重新可见且仍处于编辑态时,再恢复辅助元素显示。
|
|
469
|
+
*/
|
|
470
|
+
syncEditorAuxiliaryVisibility() {
|
|
471
|
+
if (!this.rectanglePlane)
|
|
472
|
+
return;
|
|
473
|
+
const t = this.getRectangleHelper(), e = !!this.rectanglePlane.editor.parent;
|
|
474
|
+
if (!this.currentVisible || !e) {
|
|
475
|
+
this.rectanglePlane.visible = !1, t == null || t.hide(), this.five.needsRender = !0;
|
|
476
|
+
return;
|
|
477
|
+
}
|
|
478
|
+
this.rectanglePlane.visible = !0, t == null || t.show(), this.five.needsRender = !0;
|
|
479
|
+
}
|
|
459
480
|
renderVideoPlane() {
|
|
460
|
-
var
|
|
481
|
+
var m, h, u;
|
|
461
482
|
const t = this.data.mediaData[0];
|
|
462
483
|
if (!t)
|
|
463
484
|
return;
|
|
464
485
|
const { url: e } = t;
|
|
465
486
|
if (!e)
|
|
466
487
|
return;
|
|
467
|
-
const i = (
|
|
488
|
+
const i = (m = this.data.objectFit) != null ? m : "contain", o = this.currentVisible, l = (() => !!(this.mediaPlane && !o))(), p = (() => !!(!this.mediaPlane && o))(), r = (() => !!(this.mediaPlane && (this.mediaPlane.src !== e || this.mediaPlane.objectFit !== i)))();
|
|
468
489
|
(l || r) && this.mediaPlane && (this.plugin.imagePlaneGroup.remove(this.mediaPlane), this.mediaPlane.dispose(), this.mediaPlane.removeFromParent(), this.mediaPlane = void 0);
|
|
469
|
-
const
|
|
470
|
-
if (
|
|
471
|
-
let
|
|
472
|
-
this.rectanglePlane && (
|
|
473
|
-
const
|
|
490
|
+
const a = (() => !!(this.mediaPlane && this.mediaPlane.objectFit && this.mediaPlane.objectFit !== i))();
|
|
491
|
+
if (p || r) {
|
|
492
|
+
let s = this.position.map(P);
|
|
493
|
+
this.rectanglePlane && (s = this.rectanglePlane.data.points.map(P));
|
|
494
|
+
const n = new G(e, s, {
|
|
474
495
|
videoCoverSrc: t.videoCoverUrl,
|
|
475
496
|
playButton: this.data.playIcon,
|
|
476
497
|
paused: !((h = this.data.autoplayConfig) != null && h.autoplayVideo),
|
|
@@ -480,29 +501,29 @@ class Yr extends B {
|
|
|
480
501
|
domEvents: this.plugin.domEvents,
|
|
481
502
|
opacity: this.opacity
|
|
482
503
|
});
|
|
483
|
-
this.plugin.domEvents.addAutoBindEventListener(
|
|
504
|
+
this.plugin.domEvents.addAutoBindEventListener(n, "click", (f) => {
|
|
484
505
|
var g, D;
|
|
485
|
-
!((g =
|
|
506
|
+
!((g = n.videoInstance) != null && g.paused) && ((D = n.videoInstance) == null ? void 0 : D.muted) === !1 && this.plugin.hooks.emit("playStateChange", {
|
|
486
507
|
event: f,
|
|
487
508
|
state: "playing",
|
|
488
509
|
tag: this,
|
|
489
|
-
mediaInstance:
|
|
510
|
+
mediaInstance: n.videoInstance
|
|
490
511
|
});
|
|
491
|
-
}),
|
|
512
|
+
}), n.onVideoReady = (f) => {
|
|
492
513
|
f.addEventListener("play", (g) => {
|
|
493
|
-
this.plugin.mediaStore.set({ currentMediaElement:
|
|
514
|
+
this.plugin.mediaStore.set({ currentMediaElement: n.videoInstance }), this.plugin.hooks.emit("playStateChange", { event: g, state: "playing", tag: this, mediaInstance: n.videoInstance });
|
|
494
515
|
}), f.addEventListener("pause", (g) => {
|
|
495
|
-
this.plugin.hooks.emit("playStateChange", { event: g, state: "paused", tag: this, mediaInstance:
|
|
516
|
+
this.plugin.hooks.emit("playStateChange", { event: g, state: "paused", tag: this, mediaInstance: n.videoInstance });
|
|
496
517
|
}), f.addEventListener("ended", (g) => {
|
|
497
|
-
this.plugin.hooks.emit("playStateChange", { event: g, state: "paused", tag: this, mediaInstance:
|
|
518
|
+
this.plugin.hooks.emit("playStateChange", { event: g, state: "paused", tag: this, mediaInstance: n.videoInstance });
|
|
498
519
|
});
|
|
499
520
|
};
|
|
500
|
-
const
|
|
501
|
-
|
|
521
|
+
const y = (f) => (this.five.on("renderFrame", f), () => this.five.off("renderFrame", f));
|
|
522
|
+
n.initialRenderHooks(y), this.mediaPlane = n, this.play = () => n.play(), this.pause = () => n.pause(), this.plugin.imagePlaneGroup.add(this.mediaPlane);
|
|
502
523
|
}
|
|
503
|
-
if (
|
|
504
|
-
const
|
|
505
|
-
(u = this.mediaPlane) == null || u.changePointsOrParams({ cornerPoints:
|
|
524
|
+
if (a) {
|
|
525
|
+
const s = this.rectanglePlane.data.points.map(P);
|
|
526
|
+
(u = this.mediaPlane) == null || u.changePointsOrParams({ cornerPoints: s, params: { objectFit: i } });
|
|
506
527
|
}
|
|
507
528
|
this.five.needsRender = !0;
|
|
508
529
|
}
|
|
@@ -515,17 +536,17 @@ class Yr extends B {
|
|
|
515
536
|
if (!i)
|
|
516
537
|
return;
|
|
517
538
|
let o = this.position.map(P);
|
|
518
|
-
const l = this.currentVisible,
|
|
519
|
-
if ((
|
|
539
|
+
const l = this.currentVisible, p = (() => !!(this.mediaPlane && !l))(), r = (() => !!(!this.mediaPlane && l))(), a = (() => !!(this.mediaPlane && this.mediaPlane.src !== i))(), m = (() => !!(this.mediaPlane && this.mediaPlane.objectFit && this.mediaPlane.objectFit !== e))();
|
|
540
|
+
if ((p || a) && this.mediaPlane && (this.plugin.imagePlaneGroup.remove(this.mediaPlane), this.mediaPlane.dispose(), this.mediaPlane.removeFromParent(), this.mediaPlane = void 0), (r || a) && (this.rectanglePlane && (o = this.rectanglePlane.data.points.map(P)), this.mediaPlane = new L(i, o, { objectFit: this.data.objectFit, opacity: this.opacity }), this.getConfig().clickable !== !1 && this.plugin.domEvents.addAutoBindEventListener(
|
|
520
541
|
this.mediaPlane,
|
|
521
542
|
"click",
|
|
522
|
-
(
|
|
523
|
-
this.plugin.hooks.emit("click", { tag: this, target: "TagContent", event:
|
|
543
|
+
(s) => {
|
|
544
|
+
this.plugin.hooks.emit("click", { tag: this, target: "TagContent", event: s.origDomEvent });
|
|
524
545
|
},
|
|
525
546
|
{ noEmitWhenHide: !0 }
|
|
526
|
-
), this.plugin.imagePlaneGroup.add(this.mediaPlane)),
|
|
527
|
-
const
|
|
528
|
-
(u = this.mediaPlane) == null || u.changePointsOrParams({ cornerPoints:
|
|
547
|
+
), this.plugin.imagePlaneGroup.add(this.mediaPlane)), m) {
|
|
548
|
+
const s = this.rectanglePlane.data.points.map(P);
|
|
549
|
+
(u = this.mediaPlane) == null || u.changePointsOrParams({ cornerPoints: s, params: { objectFit: e } });
|
|
529
550
|
}
|
|
530
551
|
this.five.needsRender = !0;
|
|
531
552
|
}
|
|
@@ -533,9 +554,9 @@ class Yr extends B {
|
|
|
533
554
|
this.mediaPlane && (this.plugin.imagePlaneGroup.remove(this.mediaPlane), this.mediaPlane.dispose(), this.mediaPlane.removeFromParent(), this.mediaPlane = void 0);
|
|
534
555
|
}
|
|
535
556
|
computeNormal() {
|
|
536
|
-
return
|
|
557
|
+
return A(this.position);
|
|
537
558
|
}
|
|
538
559
|
}
|
|
539
560
|
export {
|
|
540
|
-
|
|
561
|
+
tn as PlaneTag
|
|
541
562
|
};
|
|
@@ -210,7 +210,8 @@ import "../../../Sculpt/Meshes/Box.js";
|
|
|
210
210
|
import "../../../shared-utils/forReverseEach.js";
|
|
211
211
|
import "../../../Sculpt/Objects/Line/index.js";
|
|
212
212
|
import "../../../Sculpt/Objects/Polygon/Editor.js";
|
|
213
|
-
|
|
213
|
+
import "../../../Sculpt/utils/isIntersecting.js";
|
|
214
|
+
class Ji extends v {
|
|
214
215
|
constructor(t, o) {
|
|
215
216
|
super(t, o);
|
|
216
217
|
c(this, "tagStyle");
|
|
@@ -476,5 +477,5 @@ class Ii extends v {
|
|
|
476
477
|
}
|
|
477
478
|
}
|
|
478
479
|
export {
|
|
479
|
-
|
|
480
|
+
Ji as PolygonTag
|
|
480
481
|
};
|
|
@@ -291,6 +291,7 @@ import "../../PanoMeasurePlugin/utils/isIntersecting.js";
|
|
|
291
291
|
import "../../Sculpt/utils/three/ColoredMesh.js";
|
|
292
292
|
import "../../shared-utils/three/geometryUtil.js";
|
|
293
293
|
import "../../Sculpt/Objects/Polygon/Editor.js";
|
|
294
|
+
import "../../Sculpt/utils/isIntersecting.js";
|
|
294
295
|
import "../../Sculpt/Objects/Prism/index.js";
|
|
295
296
|
import "../../Sculpt/Meshes/Prism.js";
|
|
296
297
|
import "../../shared-utils/three/core/PrismGeometry.js";
|
|
@@ -335,8 +336,8 @@ import "../Components/Common/TagPopover/TagPopoverToolBar.js";
|
|
|
335
336
|
import "../Components/Common/TagPopover/ArrowRightIcon.js";
|
|
336
337
|
import "../Components/Common/TagPopover/ShareIcon.js";
|
|
337
338
|
import "../utils/popoverContainer.js";
|
|
338
|
-
const I = "Dnalogel-PanoTagPlugin",
|
|
339
|
-
class
|
|
339
|
+
const I = "Dnalogel-PanoTagPlugin", zs = (l) => `${I}--${l}`;
|
|
340
|
+
class $s extends $ {
|
|
340
341
|
constructor(e, t) {
|
|
341
342
|
super(e);
|
|
342
343
|
/** state */
|
|
@@ -917,7 +918,7 @@ class zs extends $ {
|
|
|
917
918
|
}
|
|
918
919
|
}
|
|
919
920
|
export {
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
921
|
+
$s as PanoTagPluginController,
|
|
922
|
+
$s as default,
|
|
923
|
+
zs as pluginFlag
|
|
923
924
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import r from "./controller/index.js";
|
|
2
|
-
import { pluginFlag as
|
|
3
|
-
import { defaultGlobalConfig as
|
|
4
|
-
import { ContentType as
|
|
2
|
+
import { pluginFlag as Ui } from "./controller/index.js";
|
|
3
|
+
import { defaultGlobalConfig as Wi } from "./typings/tag/TagConfig.js";
|
|
4
|
+
import { ContentType as Yi, DimensionType as Zi, PointType as _i } from "./Archive/deprecated.js";
|
|
5
5
|
import "three";
|
|
6
6
|
import "../vendor/object-assign-deep/objectAssignDeep.js";
|
|
7
7
|
import "../shared-utils/positionToVector3.js";
|
|
@@ -260,6 +260,7 @@ import "../PanoMeasurePlugin/utils/isIntersecting.js";
|
|
|
260
260
|
import "../Sculpt/utils/three/ColoredMesh.js";
|
|
261
261
|
import "../shared-utils/three/geometryUtil.js";
|
|
262
262
|
import "../Sculpt/Objects/Polygon/Editor.js";
|
|
263
|
+
import "../Sculpt/utils/isIntersecting.js";
|
|
263
264
|
import "../Sculpt/Objects/Prism/index.js";
|
|
264
265
|
import "../Sculpt/Meshes/Prism.js";
|
|
265
266
|
import "../shared-utils/three/core/PrismGeometry.js";
|
|
@@ -309,14 +310,14 @@ import "./Components/Common/TagPopover/ArrowRightIcon.js";
|
|
|
309
310
|
import "./Components/Common/TagPopover/ShareIcon.js";
|
|
310
311
|
import "./utils/popoverContainer.js";
|
|
311
312
|
import "../shared-utils/animationFrame/BetterTween.js";
|
|
312
|
-
const
|
|
313
|
+
const Qi = (o, t) => new r(o, t);
|
|
313
314
|
export {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
315
|
+
Yi as ContentType,
|
|
316
|
+
Zi as DimensionType,
|
|
317
|
+
Qi as PanoTagPlugin,
|
|
317
318
|
r as PanoTagPluginController,
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
319
|
+
_i as PointType,
|
|
320
|
+
Qi as default,
|
|
321
|
+
Wi as defaultGlobalConfig,
|
|
322
|
+
Ui as pluginFlag
|
|
322
323
|
};
|