@realsee/dnalogel 3.73.1-alpha.1 → 3.73.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/dist/PanoTagPlugin/controller/Tag/PlaneTag.d.ts +1 -9
- package/dist/PanoTagPlugin/utils/model/mediaPlane.d.ts +0 -4
- package/dist/index.cjs.js +47 -47
- package/dist/index.js +1903 -1969
- package/dist/index.umd.js +47 -47
- 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.js +2 -3
- package/libs/GuideLinePlugin/index.js +6 -7
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.d.ts +1 -9
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +131 -179
- package/libs/PanoTagPlugin/controller/index.js +5 -6
- package/libs/PanoTagPlugin/index.js +11 -12
- package/libs/PanoTagPlugin/utils/model/mediaPlane.d.ts +0 -4
- package/libs/PanoTagPlugin/utils/model/mediaPlane.js +71 -85
- package/libs/base/BasePlugin.js +1 -1
- package/libs/index.js +148 -149
- package/libs/shared-utils/logger.js +1 -1
- package/package.json +2 -2
- package/dist/shared-utils/five/getFloorMesh.d.ts +0 -3
- package/libs/shared-utils/five/getFloorMesh.d.ts +0 -3
- package/libs/shared-utils/five/getFloorMesh.js +0 -11
|
@@ -333,7 +333,6 @@ import "../Sculpt/Editors/BoxMeshEditor.js";
|
|
|
333
333
|
import "../Sculpt/Meshes/Box.js";
|
|
334
334
|
import "../shared-utils/forReverseEach.js";
|
|
335
335
|
import "../Sculpt/Objects/Line/index.js";
|
|
336
|
-
import "../shared-utils/five/getFloorMesh.js";
|
|
337
336
|
import "../PanoTagPlugin/Components/TagContainer.js";
|
|
338
337
|
import "../PanoTagPlugin/Components/TagItem.js";
|
|
339
338
|
import "../PanoTagPlugin/Components/Common/TagPoint.js";
|
|
@@ -366,7 +365,7 @@ import "./utils/coordinatesToVector.js";
|
|
|
366
365
|
import "./utils/safeCall.js";
|
|
367
366
|
import "./utils/sleep.js";
|
|
368
367
|
import "../shared-utils/five/fiveLoaded.js";
|
|
369
|
-
class
|
|
368
|
+
class Yp extends z {
|
|
370
369
|
constructor(t, r) {
|
|
371
370
|
var h;
|
|
372
371
|
super(t, r);
|
|
@@ -474,5 +473,5 @@ class Zp extends z {
|
|
|
474
473
|
}
|
|
475
474
|
}
|
|
476
475
|
export {
|
|
477
|
-
|
|
476
|
+
Yp as default
|
|
478
477
|
};
|
|
@@ -319,7 +319,6 @@ import "../Sculpt/Editors/BoxMeshEditor.js";
|
|
|
319
319
|
import "../Sculpt/Meshes/Box.js";
|
|
320
320
|
import "../shared-utils/forReverseEach.js";
|
|
321
321
|
import "../Sculpt/Objects/Line/index.js";
|
|
322
|
-
import "../shared-utils/five/getFloorMesh.js";
|
|
323
322
|
import "../PanoTagPlugin/Components/TagContainer.js";
|
|
324
323
|
import "../PanoTagPlugin/Components/TagItem.js";
|
|
325
324
|
import "../PanoTagPlugin/Components/Common/TagPoint.js";
|
|
@@ -366,7 +365,7 @@ import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
|
366
365
|
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
367
366
|
import "./Work.js";
|
|
368
367
|
import "./utils/coordinatesToVector.js";
|
|
369
|
-
class
|
|
368
|
+
class ta extends G {
|
|
370
369
|
constructor(t, i) {
|
|
371
370
|
super(t, i);
|
|
372
371
|
k(this, "state", {
|
|
@@ -757,5 +756,5 @@ class ia extends G {
|
|
|
757
756
|
}
|
|
758
757
|
}
|
|
759
758
|
export {
|
|
760
|
-
|
|
759
|
+
ta as default
|
|
761
760
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { typing as
|
|
1
|
+
import { typing as km } from "./typing/index.js";
|
|
2
2
|
import t from "./Work.js";
|
|
3
3
|
import i from "./Move.js";
|
|
4
4
|
import "../GuideLinePlugin/index.js";
|
|
@@ -305,7 +305,6 @@ import "../Sculpt/Editors/BoxMeshEditor.js";
|
|
|
305
305
|
import "../Sculpt/Meshes/Box.js";
|
|
306
306
|
import "../shared-utils/forReverseEach.js";
|
|
307
307
|
import "../Sculpt/Objects/Line/index.js";
|
|
308
|
-
import "../shared-utils/five/getFloorMesh.js";
|
|
309
308
|
import "../PanoTagPlugin/Components/TagContainer.js";
|
|
310
309
|
import "../PanoTagPlugin/Components/TagItem.js";
|
|
311
310
|
import "../PanoTagPlugin/Components/Common/TagPoint.js";
|
|
@@ -338,13 +337,13 @@ import "./utils/sleep.js";
|
|
|
338
337
|
import "../shared-utils/five/fiveLoaded.js";
|
|
339
338
|
import "./BaseController.js";
|
|
340
339
|
import "./utils/getFiveStateOnCurve.js";
|
|
341
|
-
const
|
|
340
|
+
const xm = (o, r) => new t(o, r), ym = (o, r) => new i(o, r);
|
|
342
341
|
export {
|
|
343
|
-
|
|
342
|
+
xm as CruisePlugin,
|
|
344
343
|
t as CruisePluginController,
|
|
345
|
-
|
|
344
|
+
km as CruisePluginTypes,
|
|
346
345
|
i as MoveController,
|
|
347
|
-
|
|
346
|
+
ym as MovePlugin,
|
|
348
347
|
t as WalkController,
|
|
349
|
-
|
|
348
|
+
xm as default
|
|
350
349
|
};
|
|
@@ -330,7 +330,6 @@ import "../Sculpt/Editors/BoxMeshEditor.js";
|
|
|
330
330
|
import "../Sculpt/Meshes/Box.js";
|
|
331
331
|
import "../shared-utils/forReverseEach.js";
|
|
332
332
|
import "../Sculpt/Objects/Line/index.js";
|
|
333
|
-
import "../shared-utils/five/getFloorMesh.js";
|
|
334
333
|
import "../PanoTagPlugin/Components/TagContainer.js";
|
|
335
334
|
import "../PanoTagPlugin/Components/TagItem.js";
|
|
336
335
|
import "../PanoTagPlugin/Components/Common/TagPoint.js";
|
|
@@ -366,8 +365,8 @@ import "../CruisePlugin/utils/coordinatesToVector.js";
|
|
|
366
365
|
import "../CruisePlugin/utils/safeCall.js";
|
|
367
366
|
import "../CruisePlugin/utils/sleep.js";
|
|
368
367
|
import "../shared-utils/five/fiveLoaded.js";
|
|
369
|
-
const _ = "GuideLinePlugin", E = `${_}`,
|
|
370
|
-
class
|
|
368
|
+
const _ = "GuideLinePlugin", E = `${_}`, ae = (a) => `${E}--${a}`;
|
|
369
|
+
class ne extends k {
|
|
371
370
|
constructor(t, i) {
|
|
372
371
|
super(t, i);
|
|
373
372
|
d(this, "name", _);
|
|
@@ -531,6 +530,6 @@ class le extends k {
|
|
|
531
530
|
}
|
|
532
531
|
}
|
|
533
532
|
export {
|
|
534
|
-
|
|
535
|
-
|
|
533
|
+
ne as default,
|
|
534
|
+
ae as pluginFlag
|
|
536
535
|
};
|
|
@@ -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 bp } from "./GuideLineItem/index.js";
|
|
9
9
|
import "three";
|
|
10
10
|
import "./utils/createLineGeometry.js";
|
|
11
11
|
import "../vendor/polyline-normals/index.js";
|
|
@@ -299,7 +299,6 @@ import "../Sculpt/Editors/BoxMeshEditor.js";
|
|
|
299
299
|
import "../Sculpt/Meshes/Box.js";
|
|
300
300
|
import "../shared-utils/forReverseEach.js";
|
|
301
301
|
import "../Sculpt/Objects/Line/index.js";
|
|
302
|
-
import "../shared-utils/five/getFloorMesh.js";
|
|
303
302
|
import "../PanoTagPlugin/Components/TagContainer.js";
|
|
304
303
|
import "../PanoTagPlugin/Components/TagItem.js";
|
|
305
304
|
import "../PanoTagPlugin/Components/Common/TagPoint.js";
|
|
@@ -338,5 +337,5 @@ import "../CruisePlugin/utils/safeCall.js";
|
|
|
338
337
|
import "../CruisePlugin/utils/sleep.js";
|
|
339
338
|
import "../shared-utils/five/fiveLoaded.js";
|
|
340
339
|
export {
|
|
341
|
-
|
|
340
|
+
bp as GuideLineItem
|
|
342
341
|
};
|
|
@@ -24,7 +24,7 @@ import "./utils/index.js";
|
|
|
24
24
|
import "../vendor/object-assign-deep/objectAssignDeep.js";
|
|
25
25
|
import "./utils/createPath.js";
|
|
26
26
|
import "../shared-utils/fontSize.js";
|
|
27
|
-
import { GuideLineModeItem as
|
|
27
|
+
import { GuideLineModeItem as Yt } from "./GuideLineModeItem/index.js";
|
|
28
28
|
import "../vendor/polyline-normals/index.js";
|
|
29
29
|
import "../vendor/polyline-miter-util/index.js";
|
|
30
30
|
import "../vendor/gl-vec2/add.js";
|
|
@@ -298,7 +298,6 @@ import "../Sculpt/Editors/BoxMeshEditor.js";
|
|
|
298
298
|
import "../Sculpt/Meshes/Box.js";
|
|
299
299
|
import "../shared-utils/forReverseEach.js";
|
|
300
300
|
import "../Sculpt/Objects/Line/index.js";
|
|
301
|
-
import "../shared-utils/five/getFloorMesh.js";
|
|
302
301
|
import "../PanoTagPlugin/Components/TagContainer.js";
|
|
303
302
|
import "../PanoTagPlugin/Components/TagItem.js";
|
|
304
303
|
import "../PanoTagPlugin/Components/Common/TagPoint.js";
|
|
@@ -318,5 +317,5 @@ import "../PanoTagPlugin/Components/Common/TagPopover/ShareIcon.js";
|
|
|
318
317
|
import "../PanoTagPlugin/utils/popoverContainer.js";
|
|
319
318
|
import "../shared-utils/px2rem.js";
|
|
320
319
|
export {
|
|
321
|
-
|
|
320
|
+
Yt as GuideLineModeItem
|
|
322
321
|
};
|
|
@@ -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 gp } from "./GuideLineItem/index.js";
|
|
3
|
+
import { GuideLineModeItem$1 as Pp } from "./GuideLineModeItem/index.js";
|
|
4
4
|
import "../base/BasePluginWithData.js";
|
|
5
5
|
import "../base/BasePlugin.js";
|
|
6
6
|
import "../shared-utils/Subscribe.js";
|
|
@@ -309,7 +309,6 @@ import "../Sculpt/Editors/BoxMeshEditor.js";
|
|
|
309
309
|
import "../Sculpt/Meshes/Box.js";
|
|
310
310
|
import "../shared-utils/forReverseEach.js";
|
|
311
311
|
import "../Sculpt/Objects/Line/index.js";
|
|
312
|
-
import "../shared-utils/five/getFloorMesh.js";
|
|
313
312
|
import "../PanoTagPlugin/Components/TagContainer.js";
|
|
314
313
|
import "../PanoTagPlugin/Components/TagItem.js";
|
|
315
314
|
import "../PanoTagPlugin/Components/Common/TagPoint.js";
|
|
@@ -337,10 +336,10 @@ import "../shared-utils/five/changeMode.js";
|
|
|
337
336
|
import "../shared-utils/nearlyEqual.js";
|
|
338
337
|
import "../CruisePlugin/Move.js";
|
|
339
338
|
import "../CruisePlugin/utils/getFiveStateOnCurve.js";
|
|
340
|
-
const r = (i, o) => new t(i, o),
|
|
339
|
+
const r = (i, o) => new t(i, o), xp = r;
|
|
341
340
|
export {
|
|
342
|
-
|
|
343
|
-
|
|
341
|
+
gp as GuideLineItem,
|
|
342
|
+
Pp as GuideLineModeItem,
|
|
344
343
|
r as GuideLinePlugin,
|
|
345
|
-
|
|
344
|
+
xp as default
|
|
346
345
|
};
|
|
@@ -6,19 +6,11 @@ import type { Vector3 } from 'three';
|
|
|
6
6
|
import { Rectangle } from '../../../Sculpt/Objects/Rectangle';
|
|
7
7
|
export type PlaneTagInterface<C extends TagContentType = TagContentType> = TagInstance<C, 'Plane'>;
|
|
8
8
|
export declare class PlaneTag<C extends TagContentType = TagContentType> extends BaseTag<C, 'Plane'> {
|
|
9
|
-
rectanglePlane?: Rectangle;
|
|
10
|
-
private _floorIndex?;
|
|
11
|
-
private _floorIndexDirty;
|
|
12
9
|
constructor(plugin: PanoTagPluginController, tagData: TagData);
|
|
13
|
-
|
|
14
|
-
get floorIndex(): number | undefined;
|
|
15
|
-
/** 标记 floorIndex 需要重新计算(在位置等相关数据变化时调用) */
|
|
16
|
-
invalidateFloorIndex(): void;
|
|
10
|
+
rectanglePlane?: Rectangle;
|
|
17
11
|
applyVisible(): void;
|
|
18
12
|
set(tag: PartialObjectDeep<Tag<C, 'Plane'>>, deepMerge?: boolean): void;
|
|
19
13
|
setData(...data: Parameters<InstanceType<typeof BaseTag<C, 'Plane'>>['setData']>): void;
|
|
20
|
-
/** 计算楼层索引 */
|
|
21
|
-
private computeFloorIndex;
|
|
22
14
|
private loadModel;
|
|
23
15
|
private initialSculpt;
|
|
24
16
|
editorEnable(): void;
|
|
@@ -1,46 +1,44 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var t in
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var t of
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var a = (r) => {
|
|
1
|
+
var F = Object.defineProperty, T = Object.defineProperties;
|
|
2
|
+
var j = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var b = Object.getOwnPropertySymbols;
|
|
4
|
+
var R = Object.prototype.hasOwnProperty, k = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var S = (l, i, t) => i in l ? F(l, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[i] = t, v = (l, i) => {
|
|
6
|
+
for (var t in i || (i = {}))
|
|
7
|
+
R.call(i, t) && S(l, t, i[t]);
|
|
8
|
+
if (b)
|
|
9
|
+
for (var t of b(i))
|
|
10
|
+
k.call(i, t) && S(l, t, i[t]);
|
|
11
|
+
return l;
|
|
12
|
+
}, D = (l, i) => T(l, j(i));
|
|
13
|
+
var C = (l, i, t) => new Promise((e, o) => {
|
|
14
|
+
var n = (s) => {
|
|
16
15
|
try {
|
|
17
|
-
|
|
18
|
-
} catch (
|
|
19
|
-
|
|
16
|
+
r(t.next(s));
|
|
17
|
+
} catch (d) {
|
|
18
|
+
o(d);
|
|
20
19
|
}
|
|
21
|
-
},
|
|
20
|
+
}, m = (s) => {
|
|
22
21
|
try {
|
|
23
|
-
|
|
24
|
-
} catch (
|
|
25
|
-
|
|
22
|
+
r(t.throw(s));
|
|
23
|
+
} catch (d) {
|
|
24
|
+
o(d);
|
|
26
25
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
26
|
+
}, r = (s) => s.done ? e(s.value) : Promise.resolve(s.value).then(n, m);
|
|
27
|
+
r((t = t.apply(l, i)).next());
|
|
29
28
|
});
|
|
30
|
-
import { CONST as
|
|
31
|
-
import { CSS3DObjectPlus as
|
|
32
|
-
import { anyPositionToVector3 as
|
|
33
|
-
import
|
|
34
|
-
import { planeNormal as
|
|
35
|
-
import {
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import { BaseTag as B } from "./BaseTag.js";
|
|
29
|
+
import { CONST as E } from "../../../shared-utils/constants.js";
|
|
30
|
+
import { CSS3DObjectPlus as V } from "../../../shared-utils/CSS3DRender/CSS3DObject.js";
|
|
31
|
+
import { anyPositionToVector3 as M, arrayPositionToVector3 as u } from "../../../shared-utils/positionToVector3.js";
|
|
32
|
+
import "three";
|
|
33
|
+
import { planeNormal as O } from "../../utils/planeNormal.js";
|
|
34
|
+
import { VideoPlane as w, ImagePlane as G } from "../../utils/model/mediaPlane.js";
|
|
35
|
+
import L from "../../Components/Tag/index.js";
|
|
36
|
+
import { BaseTag as A } from "./BaseTag.js";
|
|
39
37
|
import "../../../shared-utils/tag.js";
|
|
40
38
|
import "../../../vendor/hammerjs/hammer.js";
|
|
41
39
|
import "../../../shared-utils/three/PointSelector/index.js";
|
|
42
40
|
import "../../../shared-utils/three/CSS3DRenderer/index.js";
|
|
43
|
-
import { initialCSS3DRender as
|
|
41
|
+
import { initialCSS3DRender as N } from "../../../shared-utils/CSS3DRender/index.js";
|
|
44
42
|
import "@realsee/five/line";
|
|
45
43
|
import "../../../shared-utils/three/core/Five_LineMaterial2.js";
|
|
46
44
|
import "../../../shared-utils/three/core/Sphere.js";
|
|
@@ -48,14 +46,14 @@ import "../../../shared-utils/three/blink.js";
|
|
|
48
46
|
import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
49
47
|
import "../../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
50
48
|
import "../../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
51
|
-
import { waitFiveModelLoaded as
|
|
52
|
-
import { uuid as
|
|
49
|
+
import { waitFiveModelLoaded as I } from "../../../shared-utils/five/fiveModelLoad.js";
|
|
50
|
+
import { uuid as B } from "../../../shared-utils/uuid.js";
|
|
53
51
|
import "../../../shared-utils/five/FivePuppet.js";
|
|
54
|
-
import { Sculpt as
|
|
55
|
-
import { Rectangle as
|
|
56
|
-
import { getFloorMesh as W } from "../../../shared-utils/five/getFloorMesh.js";
|
|
52
|
+
import { Sculpt as x } from "../../../Sculpt/index.js";
|
|
53
|
+
import { Rectangle as H } from "../../../Sculpt/Objects/Rectangle/index.js";
|
|
57
54
|
import "../../../shared-utils/even.js";
|
|
58
55
|
import "../../../shared-utils/CSS3DRender/OpacityMesh.js";
|
|
56
|
+
import "../../../shared-utils/three/centerPoint.js";
|
|
59
57
|
import "../../../shared-utils/isNil.js";
|
|
60
58
|
import "../../../shared-utils/three/loadTexture.js";
|
|
61
59
|
import "../../../shared-utils/three/Quadrangle.js";
|
|
@@ -299,89 +297,43 @@ import "../../../shared-utils/forReverseEach.js";
|
|
|
299
297
|
import "../../../Sculpt/Objects/Line/index.js";
|
|
300
298
|
import "../../../Sculpt/Editors/RectangleMeshEditor.js";
|
|
301
299
|
import "../../../Sculpt/utils/sortPositionsByCameraPosition.js";
|
|
302
|
-
const
|
|
303
|
-
class
|
|
304
|
-
constructor(
|
|
305
|
-
super(t,
|
|
306
|
-
b(this, "_floorIndex");
|
|
307
|
-
b(this, "_floorIndexDirty", !0);
|
|
308
|
-
this.state.unfolded = !0, this.loadModel();
|
|
309
|
-
}
|
|
310
|
-
/** 获取楼层索引(惰性计算 + 缓存) */
|
|
311
|
-
get floorIndex() {
|
|
312
|
-
return (this._floorIndexDirty || this._floorIndex === void 0) && (this._floorIndex = this.computeFloorIndex(), this._floorIndexDirty = !1), this._floorIndex;
|
|
313
|
-
}
|
|
314
|
-
/** 标记 floorIndex 需要重新计算(在位置等相关数据变化时调用) */
|
|
315
|
-
invalidateFloorIndex() {
|
|
316
|
-
this._floorIndexDirty = !0;
|
|
300
|
+
const $ = /* @__PURE__ */ new Map(), U = /* @__PURE__ */ new Map();
|
|
301
|
+
class Zr extends A {
|
|
302
|
+
constructor(i, t) {
|
|
303
|
+
super(i, t), this.state.unfolded = !0, this.loadModel();
|
|
317
304
|
}
|
|
318
305
|
applyVisible() {
|
|
319
|
-
var
|
|
320
|
-
this.computeRenderType() === "Mesh" ? (this.initialSculpt(), ((
|
|
306
|
+
var t, e, o, n, m, r;
|
|
307
|
+
this.computeRenderType() === "Mesh" ? (this.initialSculpt(), ((e = (t = this.data.mediaData) == null ? void 0 : t[0]) == null ? void 0 : e.type) === "Video" ? this.renderVideoPlane() : ((n = (o = this.data.mediaData) == null ? void 0 : o[0]) == null ? void 0 : n.type) === "Image" ? this.renderImagePlane() : this.renderEmptyPlane()) : ((m = this.tag3DContentSvelte) == null || m.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));
|
|
321
308
|
}
|
|
322
|
-
set(
|
|
323
|
-
super.set(
|
|
324
|
-
this.tag3DContentSvelte && (
|
|
309
|
+
set(i, t = !0) {
|
|
310
|
+
super.set(i, t), I(this.five).then(() => {
|
|
311
|
+
this.tag3DContentSvelte && (i.data ? this.tag3DContentSvelte.svelteApp.$set({ tag: this, state: this.plugin.state, temporaryState: this.plugin.temporaryState }) : i.position && this.loadModel());
|
|
325
312
|
});
|
|
326
313
|
}
|
|
327
|
-
setData(...
|
|
328
|
-
var
|
|
329
|
-
super.setData(...
|
|
330
|
-
}
|
|
331
|
-
/** 计算楼层索引 */
|
|
332
|
-
computeFloorIndex() {
|
|
333
|
-
const t = /* @__PURE__ */ new Map();
|
|
334
|
-
this.five.observers.forEach((n) => {
|
|
335
|
-
var r;
|
|
336
|
-
const e = (r = n.floorIndex) != null ? r : 0;
|
|
337
|
-
if (!t.has(e)) {
|
|
338
|
-
const p = W(this.five, e);
|
|
339
|
-
p.isEmpty() || t.set(e, p);
|
|
340
|
-
}
|
|
341
|
-
});
|
|
342
|
-
const o = G(...this.position.map(T)), i = [], a = [];
|
|
343
|
-
if (t.forEach((n, e) => {
|
|
344
|
-
a.push({ floorIndex: e, box: n }), n.containsPoint(o) && i.push({ floorIndex: e, box: n });
|
|
345
|
-
}), i.length === 1)
|
|
346
|
-
return i[0].floorIndex;
|
|
347
|
-
if (i.length > 1) {
|
|
348
|
-
let n = 1 / 0, e = i[0].floorIndex;
|
|
349
|
-
return i.forEach(({ floorIndex: r, box: p }) => {
|
|
350
|
-
const h = new E.Vector3();
|
|
351
|
-
p.getCenter(h);
|
|
352
|
-
const c = o.distanceTo(h);
|
|
353
|
-
c < n && (n = c, e = r);
|
|
354
|
-
}), e;
|
|
355
|
-
}
|
|
356
|
-
if (a.length > 0) {
|
|
357
|
-
let n = 1 / 0, e = a[0].floorIndex;
|
|
358
|
-
return a.forEach(({ floorIndex: r, box: p }) => {
|
|
359
|
-
const h = new E.Vector3();
|
|
360
|
-
p.getCenter(h);
|
|
361
|
-
const c = o.distanceTo(h);
|
|
362
|
-
c < n && (n = c, e = r);
|
|
363
|
-
}), e;
|
|
364
|
-
}
|
|
314
|
+
setData(...i) {
|
|
315
|
+
var e, o, n, m, r;
|
|
316
|
+
super.setData(...i), this.computeRenderType() === "Mesh" ? ((o = (e = this.data.mediaData) == null ? void 0 : e[0]) == null ? void 0 : o.type) === "Video" ? this.renderVideoPlane() : ((m = (n = this.data.mediaData) == null ? void 0 : n[0]) == null ? void 0 : m.type) === "Image" ? this.renderImagePlane() : this.renderEmptyPlane() : (r = this.tag3DContentSvelte) == null || r.svelteApp.$set({ tag: this });
|
|
365
317
|
}
|
|
366
318
|
loadModel() {
|
|
367
319
|
return C(this, null, function* () {
|
|
368
|
-
var
|
|
369
|
-
if (yield
|
|
370
|
-
this.initialSculpt(), ((
|
|
320
|
+
var t, e, o, n, m, r;
|
|
321
|
+
if (yield I(this.five), this.computeRenderType() === "Mesh")
|
|
322
|
+
this.initialSculpt(), ((e = (t = this.data.mediaData) == null ? void 0 : t[0]) == null ? void 0 : e.type) === "Video" ? this.renderVideoPlane() : ((n = (o = this.data.mediaData) == null ? void 0 : o[0]) == null ? void 0 : n.type) === "Image" ? this.renderImagePlane() : this.renderEmptyPlane();
|
|
371
323
|
else {
|
|
372
|
-
|
|
373
|
-
const
|
|
374
|
-
(r = (
|
|
375
|
-
const
|
|
376
|
-
|
|
377
|
-
const
|
|
378
|
-
|
|
379
|
-
let
|
|
380
|
-
|
|
381
|
-
this.plugin.hooks.emit("click", { event:
|
|
324
|
+
N(this.five);
|
|
325
|
+
const s = this.position.map(M);
|
|
326
|
+
(r = (m = this.tag3DContentSvelte) == null ? void 0 : m.dispose) == null || r.call(m);
|
|
327
|
+
const d = document.createElement("div");
|
|
328
|
+
d.classList.add("tag-media-container");
|
|
329
|
+
const g = v({ mode: "front", cornerPoints: s, container: d }, this.config.tag3DConfig), P = this.computeRenderType() === "BehindDom" || g.mode === "behind" ? "behind" : "front", p = new V(D(v({}, g), { mode: P })), a = this.computeNormal();
|
|
330
|
+
p.position.add(a.clone().setLength(E.Z_FIGHTING_OFFSET)), this.plugin.group.add(p);
|
|
331
|
+
let f;
|
|
332
|
+
p.mode === "behind" && this.config.clickable !== !1 && (f = this.addObjectClickHandler(this, p, (c) => {
|
|
333
|
+
this.plugin.hooks.emit("click", { event: c, target: "TagContent", tag: this });
|
|
382
334
|
}));
|
|
383
|
-
const
|
|
384
|
-
target:
|
|
335
|
+
const h = new L({
|
|
336
|
+
target: d,
|
|
385
337
|
props: {
|
|
386
338
|
tag: this,
|
|
387
339
|
hooks: this.plugin.hooks,
|
|
@@ -392,15 +344,15 @@ class Xr extends B {
|
|
|
392
344
|
}
|
|
393
345
|
});
|
|
394
346
|
this.tag3DContentSvelte = {
|
|
395
|
-
svelteApp:
|
|
347
|
+
svelteApp: h,
|
|
396
348
|
domContainer: {
|
|
397
|
-
css3DObject:
|
|
349
|
+
css3DObject: p
|
|
398
350
|
},
|
|
399
|
-
css3DInstance:
|
|
400
|
-
initialNormal:
|
|
401
|
-
currentNormal:
|
|
351
|
+
css3DInstance: p,
|
|
352
|
+
initialNormal: a,
|
|
353
|
+
currentNormal: a,
|
|
402
354
|
dispose: () => {
|
|
403
|
-
|
|
355
|
+
h.$destroy(), p.dispose(), f == null || f();
|
|
404
356
|
}
|
|
405
357
|
}, this.five.needsRender = !0;
|
|
406
358
|
}
|
|
@@ -409,15 +361,15 @@ class Xr extends B {
|
|
|
409
361
|
initialSculpt() {
|
|
410
362
|
if (this.rectanglePlane)
|
|
411
363
|
return;
|
|
412
|
-
const
|
|
364
|
+
const i = new x(this.five, void 0, {
|
|
413
365
|
magnifier: null
|
|
414
366
|
});
|
|
415
|
-
|
|
416
|
-
const
|
|
367
|
+
i.clear(), i.group.removeFromParent();
|
|
368
|
+
const t = B(), e = new H(
|
|
417
369
|
{
|
|
418
|
-
id:
|
|
370
|
+
id: t,
|
|
419
371
|
type: "Rectangle",
|
|
420
|
-
points: this.position.map(
|
|
372
|
+
points: this.position.map(u),
|
|
421
373
|
style: {
|
|
422
374
|
color: 2203620,
|
|
423
375
|
opacity: 0.1,
|
|
@@ -428,91 +380,91 @@ class Xr extends B {
|
|
|
428
380
|
defaultAction: !1
|
|
429
381
|
}
|
|
430
382
|
);
|
|
431
|
-
|
|
432
|
-
var
|
|
433
|
-
(
|
|
434
|
-
}),
|
|
383
|
+
e.visible = !1, this.plugin.imagePlaneGroup.add(e), this.rectanglePlane = e, e.editor.hooks.on("objectUpdate", () => {
|
|
384
|
+
var o;
|
|
385
|
+
(o = this.mediaPlane) == null || o.changePointsOrParams({ cornerPoints: e.data.points.map(u) });
|
|
386
|
+
}), e.editor.disable();
|
|
435
387
|
}
|
|
436
388
|
editorEnable() {
|
|
437
389
|
this.rectanglePlane || this.initialSculpt(), this.rectanglePlane.visible = !0, this.rectanglePlane.editor.enable();
|
|
438
390
|
}
|
|
439
|
-
editorDisable(
|
|
440
|
-
var
|
|
391
|
+
editorDisable(i) {
|
|
392
|
+
var e;
|
|
441
393
|
this.rectanglePlane.visible = !1;
|
|
442
|
-
const
|
|
443
|
-
(
|
|
444
|
-
points:
|
|
394
|
+
const t = i || this.position.map(u);
|
|
395
|
+
(e = this.mediaPlane) == null || e.changePointsOrParams({ cornerPoints: t }), this.rectanglePlane.setData({
|
|
396
|
+
points: t
|
|
445
397
|
}), this.rectanglePlane.editor.disable();
|
|
446
398
|
}
|
|
447
399
|
renderVideoPlane() {
|
|
448
|
-
var
|
|
449
|
-
const
|
|
450
|
-
if (!
|
|
400
|
+
var d, g, P;
|
|
401
|
+
const i = this.data.mediaData[0];
|
|
402
|
+
if (!i)
|
|
451
403
|
return;
|
|
452
|
-
const { url:
|
|
453
|
-
if (!
|
|
404
|
+
const { url: t } = i;
|
|
405
|
+
if (!t)
|
|
454
406
|
return;
|
|
455
|
-
const
|
|
407
|
+
const e = (d = this.data.objectFit) != null ? d : "contain", o = this.currentVisible, n = (() => !!(this.mediaPlane && !o))(), m = (() => !!(!this.mediaPlane && o))(), r = (() => !!(this.mediaPlane && (this.mediaPlane.src !== t || this.mediaPlane.objectFit !== e)))();
|
|
456
408
|
(n || r) && this.mediaPlane && (this.plugin.imagePlaneGroup.remove(this.mediaPlane), this.mediaPlane.dispose(), this.mediaPlane.removeFromParent(), this.mediaPlane = void 0);
|
|
457
|
-
const
|
|
458
|
-
if (
|
|
459
|
-
let
|
|
460
|
-
this.rectanglePlane && (
|
|
461
|
-
const
|
|
462
|
-
videoCoverSrc:
|
|
409
|
+
const s = (() => !!(this.mediaPlane && this.mediaPlane.objectFit && this.mediaPlane.objectFit !== e))();
|
|
410
|
+
if (m || r) {
|
|
411
|
+
let p = this.position.map(u);
|
|
412
|
+
this.rectanglePlane && (p = this.rectanglePlane.data.points.map(u));
|
|
413
|
+
const a = new w(t, p, {
|
|
414
|
+
videoCoverSrc: i.videoCoverUrl,
|
|
463
415
|
playButton: this.data.playIcon,
|
|
464
|
-
paused: !((
|
|
416
|
+
paused: !((g = this.data.autoplayConfig) != null && g.autoplayVideo),
|
|
465
417
|
objectFit: this.data.objectFit,
|
|
466
|
-
videoTextureMap:
|
|
467
|
-
ImageTextureMap:
|
|
418
|
+
videoTextureMap: $,
|
|
419
|
+
ImageTextureMap: U,
|
|
468
420
|
domEvents: this.plugin.domEvents
|
|
469
421
|
});
|
|
470
|
-
this.plugin.domEvents.addAutoBindEventListener(
|
|
471
|
-
var
|
|
472
|
-
!((
|
|
473
|
-
event:
|
|
422
|
+
this.plugin.domEvents.addAutoBindEventListener(a, "click", (h) => {
|
|
423
|
+
var c, y;
|
|
424
|
+
!((c = a.videoInstance) != null && c.paused) && ((y = a.videoInstance) == null ? void 0 : y.muted) === !1 && this.plugin.hooks.emit("playStateChange", {
|
|
425
|
+
event: h,
|
|
474
426
|
state: "playing",
|
|
475
427
|
tag: this,
|
|
476
|
-
mediaInstance:
|
|
428
|
+
mediaInstance: a.videoInstance
|
|
477
429
|
});
|
|
478
|
-
}),
|
|
479
|
-
|
|
480
|
-
this.plugin.mediaStore.set({ currentMediaElement:
|
|
481
|
-
}),
|
|
482
|
-
this.plugin.hooks.emit("playStateChange", { event:
|
|
483
|
-
}),
|
|
484
|
-
this.plugin.hooks.emit("playStateChange", { event:
|
|
430
|
+
}), a.onVideoReady = (h) => {
|
|
431
|
+
h.addEventListener("play", (c) => {
|
|
432
|
+
this.plugin.mediaStore.set({ currentMediaElement: a.videoInstance }), this.plugin.hooks.emit("playStateChange", { event: c, state: "playing", tag: this, mediaInstance: a.videoInstance });
|
|
433
|
+
}), h.addEventListener("pause", (c) => {
|
|
434
|
+
this.plugin.hooks.emit("playStateChange", { event: c, state: "paused", tag: this, mediaInstance: a.videoInstance });
|
|
435
|
+
}), h.addEventListener("ended", (c) => {
|
|
436
|
+
this.plugin.hooks.emit("playStateChange", { event: c, state: "paused", tag: this, mediaInstance: a.videoInstance });
|
|
485
437
|
});
|
|
486
438
|
};
|
|
487
|
-
const
|
|
488
|
-
|
|
439
|
+
const f = (h) => (this.five.on("renderFrame", h), () => this.five.off("renderFrame", h));
|
|
440
|
+
a.initialRenderHooks(f), this.mediaPlane = a, this.play = () => a.play(), this.pause = () => a.pause(), this.plugin.imagePlaneGroup.add(this.mediaPlane);
|
|
489
441
|
}
|
|
490
|
-
if (
|
|
491
|
-
const
|
|
492
|
-
(P = this.mediaPlane) == null || P.changePointsOrParams({ cornerPoints:
|
|
442
|
+
if (s) {
|
|
443
|
+
const p = this.rectanglePlane.data.points.map(u);
|
|
444
|
+
(P = this.mediaPlane) == null || P.changePointsOrParams({ cornerPoints: p, params: { objectFit: e } });
|
|
493
445
|
}
|
|
494
446
|
this.five.needsRender = !0;
|
|
495
447
|
}
|
|
496
448
|
renderImagePlane() {
|
|
497
|
-
var
|
|
498
|
-
const
|
|
499
|
-
if (!t)
|
|
500
|
-
return;
|
|
501
|
-
const { url: i } = t;
|
|
449
|
+
var g, P;
|
|
450
|
+
const i = this.data.mediaData[0], t = (g = this.data.objectFit) != null ? g : "contain";
|
|
502
451
|
if (!i)
|
|
503
452
|
return;
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
453
|
+
const { url: e } = i;
|
|
454
|
+
if (!e)
|
|
455
|
+
return;
|
|
456
|
+
let o = this.position.map(u);
|
|
457
|
+
const n = this.currentVisible, m = (() => !!(this.mediaPlane && !n))(), r = (() => !!(!this.mediaPlane && n))(), s = (() => !!(this.mediaPlane && this.mediaPlane.src !== e))(), d = (() => !!(this.mediaPlane && this.mediaPlane.objectFit && this.mediaPlane.objectFit !== t))();
|
|
458
|
+
if ((m || s) && this.mediaPlane && (this.plugin.imagePlaneGroup.remove(this.mediaPlane), this.mediaPlane.dispose(), this.mediaPlane.removeFromParent(), this.mediaPlane = void 0), (r || s) && (this.rectanglePlane && (o = this.rectanglePlane.data.points.map(u)), this.mediaPlane = new G(e, o, { objectFit: this.data.objectFit }), this.getConfig().clickable !== !1 && this.plugin.domEvents.addAutoBindEventListener(
|
|
507
459
|
this.mediaPlane,
|
|
508
460
|
"click",
|
|
509
|
-
(
|
|
510
|
-
this.plugin.hooks.emit("click", { tag: this, target: "TagContent", event:
|
|
461
|
+
(p) => {
|
|
462
|
+
this.plugin.hooks.emit("click", { tag: this, target: "TagContent", event: p.origDomEvent });
|
|
511
463
|
},
|
|
512
464
|
{ noEmitWhenHide: !0 }
|
|
513
|
-
), this.plugin.imagePlaneGroup.add(this.mediaPlane)),
|
|
514
|
-
const
|
|
515
|
-
(P = this.mediaPlane) == null || P.changePointsOrParams({ cornerPoints:
|
|
465
|
+
), this.plugin.imagePlaneGroup.add(this.mediaPlane)), d) {
|
|
466
|
+
const p = this.rectanglePlane.data.points.map(u);
|
|
467
|
+
(P = this.mediaPlane) == null || P.changePointsOrParams({ cornerPoints: p, params: { objectFit: t } });
|
|
516
468
|
}
|
|
517
469
|
this.five.needsRender = !0;
|
|
518
470
|
}
|
|
@@ -520,9 +472,9 @@ class Xr extends B {
|
|
|
520
472
|
this.mediaPlane && (this.plugin.imagePlaneGroup.remove(this.mediaPlane), this.mediaPlane.dispose(), this.mediaPlane.removeFromParent(), this.mediaPlane = void 0);
|
|
521
473
|
}
|
|
522
474
|
computeNormal() {
|
|
523
|
-
return
|
|
475
|
+
return O(this.position);
|
|
524
476
|
}
|
|
525
477
|
}
|
|
526
478
|
export {
|
|
527
|
-
|
|
479
|
+
Zr as PlaneTag
|
|
528
480
|
};
|