@realsee/dnalogel 3.52.3 → 3.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/dist/index.cjs.js +40 -40
- package/dist/index.d.ts +1 -79
- package/dist/index.js +1606 -1567
- package/dist/index.umd.js +34 -34
- package/dist/shared-utils/exports.d.ts +2 -0
- package/dist/shared-utils/five/FivePuppet.d.ts +63 -0
- package/dist/shared-utils/index.d.ts +1 -0
- package/dist/shared-utils/math/planimetry.d.ts +1 -1
- package/libs/AreaMakerPlugin/Controller.js +14 -12
- package/libs/AreaMakerPlugin/index.js +4 -2
- package/libs/AreaMakerPlugin/utils/Item.js +4 -2
- package/libs/CSS3DRenderPlugin/Controller.js +4 -2
- package/libs/CSS3DRenderPlugin/index.js +7 -5
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +4 -2
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +4 -2
- package/libs/CruisePlugin/BaseController.js +6 -4
- package/libs/CruisePlugin/Move.js +4 -3
- package/libs/CruisePlugin/Work.js +3 -2
- package/libs/CruisePlugin/index.js +8 -7
- package/libs/CurrentPanoImagePlugin/Controller.js +4 -2
- package/libs/CurrentPanoImagePlugin/index.js +5 -3
- package/libs/GuideLinePlugin/Controller.js +6 -5
- package/libs/GuideLinePlugin/GuideLineItem.js +4 -3
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +3 -2
- package/libs/GuideLinePlugin/GuideLineModeItem.js +4 -3
- package/libs/GuideLinePlugin/index.js +8 -7
- package/libs/ModelMakerPlugin/Controller.js +4 -2
- package/libs/ModelMakerPlugin/index.js +4 -2
- package/libs/ModelTVVideoPlugin/Plugin.js +5 -3
- package/libs/ModelTVVideoPlugin/index.js +4 -2
- package/libs/Object3DHelperPlugin/Controller.js +4 -2
- package/libs/Object3DHelperPlugin/index.js +7 -5
- package/libs/PanoCompassPlugin/Controller.js +3 -2
- package/libs/PanoCompassPlugin/index.js +4 -3
- package/libs/PanoDoorLabelPlugin/BaseController.js +3 -2
- package/libs/PanoDoorLabelPlugin/Controller.js +3 -2
- package/libs/PanoDoorLabelPlugin/index.js +4 -3
- package/libs/PanoMeasurePlugin/Components/Controller0.js +3 -2
- package/libs/PanoMeasurePlugin/Components/Controller1.js +3 -2
- package/libs/PanoMeasurePlugin/Controller/EditController.js +3 -2
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +3 -2
- package/libs/PanoMeasurePlugin/Controller/index.js +3 -2
- package/libs/PanoMeasurePlugin/Model/area.js +3 -2
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +2 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +3 -2
- package/libs/PanoMeasurePlugin/index.js +14 -13
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +4 -2
- package/libs/PanoRulerProPlugin/Controller.js +11 -10
- package/libs/PanoRulerProPlugin/RulerItems.js +3 -2
- package/libs/PanoRulerProPlugin/index.js +4 -3
- package/libs/PanoSpatialTagPlugin/Plugin.js +4 -3
- package/libs/PanoSpatialTagPlugin/index.js +1 -0
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +4 -2
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +4 -2
- package/libs/PanoTagPlugin/Components/Tag/index.js +4 -3
- package/libs/PanoTagPlugin/Components/TagContainer.js +43 -42
- package/libs/PanoTagPlugin/Components/TagItem.js +4 -3
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +3 -2
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +3 -2
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +3 -2
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +3 -2
- package/libs/PanoTagPlugin/controller/TagRender.js +4 -3
- package/libs/PanoTagPlugin/controller/TagUtil.js +4 -2
- package/libs/PanoTagPlugin/controller/index.js +7 -6
- package/libs/PanoTagPlugin/index.js +13 -12
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +3 -2
- package/libs/PanoVideoPlugin/Controller.js +4 -2
- package/libs/PanoVideoPlugin/VideoMeshController.js +52 -50
- package/libs/PanoVideoPlugin/index.js +7 -5
- package/libs/PipelinePlugin/Controller.js +4 -2
- package/libs/PipelinePlugin/index.js +5 -3
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +4 -2
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +4 -2
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +20 -18
- package/libs/Sculpt/Meshes/Cylinder.js +6 -5
- package/libs/Sculpt/Meshes/Line.js +3 -2
- package/libs/Sculpt/Meshes/LineWithDots.js +3 -2
- package/libs/Sculpt/Meshes/Point.js +6 -5
- package/libs/Sculpt/Meshes/Polygon.js +11 -10
- package/libs/Sculpt/Meshes/Rectangle.js +4 -3
- package/libs/Sculpt/Objects/Line/Editor.js +7 -6
- package/libs/Sculpt/index.js +18 -17
- package/libs/Sculpt/utils/export.js +5 -5
- package/libs/Sculpt/utils/three/ColoredMesh.js +3 -2
- package/libs/base/BasePlugin.js +4 -3
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +4 -2
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +5 -3
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +4 -2
- package/libs/floorplan/ModelFloorplanPlugin/index.js +5 -3
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +19 -17
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +5 -3
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +4 -2
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +5 -3
- package/libs/floorplan/index.js +1 -0
- package/libs/index.d.ts +1 -79
- package/libs/index.js +156 -170
- package/libs/shared-utils/exports.d.ts +2 -0
- package/libs/shared-utils/exports.js +82 -0
- package/libs/shared-utils/five/FivePuppet.d.ts +63 -0
- package/libs/shared-utils/five/FivePuppet.js +48 -0
- package/libs/shared-utils/five/index.js +3 -2
- package/libs/shared-utils/five/lookObject.js +3 -2
- package/libs/shared-utils/index.d.ts +1 -0
- package/libs/shared-utils/index.js +10 -78
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/math/planimetry.d.ts +1 -1
- package/libs/shared-utils/three/index.js +1 -0
- package/package.json +2 -2
|
@@ -47,6 +47,7 @@ import "../../shared-utils/three/core/Sphere.js";
|
|
|
47
47
|
import "animejs";
|
|
48
48
|
import { waitFiveModelLoaded as G } from "../../shared-utils/five/fiveModelLoad.js";
|
|
49
49
|
import { nextFrame as N } from "../../shared-utils/animationFrame/index.js";
|
|
50
|
+
import "../../shared-utils/five/FivePuppet.js";
|
|
50
51
|
import { DebugUtil as V } from "../utils/DebugUtil.js";
|
|
51
52
|
import { safeObj as T } from "../../shared-utils/safeObj.js";
|
|
52
53
|
import { PointTag as z } from "./Tag/PointTag.js";
|
|
@@ -152,6 +153,7 @@ import "../../shared-utils/isTouchDevice.js";
|
|
|
152
153
|
import "../../shared-utils/five/getPosition.js";
|
|
153
154
|
import "../../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
154
155
|
import "../../shared-utils/three/PointSelector/utils/contents.js";
|
|
156
|
+
import "@realsee/five";
|
|
155
157
|
import "../utils/noTypecheck.js";
|
|
156
158
|
import "../Components/Tag/AudioTag/index.js";
|
|
157
159
|
import "../Components/Tag/AudioTag/AudioTag.js";
|
|
@@ -183,7 +185,6 @@ import "../utils/tag/calculateTagConfig.js";
|
|
|
183
185
|
import "../../shared-utils/typescript/entries.js";
|
|
184
186
|
import "../utils/tag/adaptConfig.js";
|
|
185
187
|
import "../typings/tag/TagConfig.js";
|
|
186
|
-
import "@realsee/five";
|
|
187
188
|
import "../../shared-utils/three/blink.js";
|
|
188
189
|
import "../../shared-utils/vectorToCoordinate.js";
|
|
189
190
|
import "../../shared-utils/formatRad.js";
|
|
@@ -211,8 +212,8 @@ import "../../base/BasePlugin.js";
|
|
|
211
212
|
import "../utils/addDebugPoints.js";
|
|
212
213
|
import "../Components/TagItem.js";
|
|
213
214
|
import "../Components/Common/TagPoint.js";
|
|
214
|
-
const C = "Dnalogel-PanoTagPlugin",
|
|
215
|
-
class
|
|
215
|
+
const C = "Dnalogel-PanoTagPlugin", vo = (d) => `${C}--${d}`;
|
|
216
|
+
class yo extends B {
|
|
216
217
|
constructor(e, t) {
|
|
217
218
|
super(e);
|
|
218
219
|
/** state */
|
|
@@ -628,7 +629,7 @@ class vo extends B {
|
|
|
628
629
|
}
|
|
629
630
|
}
|
|
630
631
|
export {
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
632
|
+
yo as PanoTagPluginController,
|
|
633
|
+
yo as default,
|
|
634
|
+
vo as pluginFlag
|
|
634
635
|
};
|
|
@@ -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 vr } from "./controller/index.js";
|
|
3
|
+
import { defaultGlobalConfig as Ar } from "./typings/tag/TagConfig.js";
|
|
4
|
+
import { ContentType as Er, DimensionType as Hr, PointType as Ir } from "./Archive/deprecated.js";
|
|
5
5
|
import "three";
|
|
6
6
|
import "../vendor/object-assign-deep/objectAssignDeep.js";
|
|
7
7
|
import "../shared-utils/positionToVector3.js";
|
|
@@ -97,6 +97,8 @@ import "../shared-utils/three/getObjectVisible.js";
|
|
|
97
97
|
import "@realsee/five/line";
|
|
98
98
|
import "../shared-utils/three/core/Sphere.js";
|
|
99
99
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
100
|
+
import "../shared-utils/five/FivePuppet.js";
|
|
101
|
+
import "@realsee/five";
|
|
100
102
|
import "../shared-utils/three/PointSelector/utils/html.js";
|
|
101
103
|
import "../shared-utils/five/initialCSS3DRender.js";
|
|
102
104
|
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
@@ -148,7 +150,6 @@ import "./controller/Tag/BaseTag.js";
|
|
|
148
150
|
import "./utils/tag/calculateTagConfig.js";
|
|
149
151
|
import "../shared-utils/typescript/entries.js";
|
|
150
152
|
import "./utils/tag/adaptConfig.js";
|
|
151
|
-
import "@realsee/five";
|
|
152
153
|
import "../shared-utils/five/mode.js";
|
|
153
154
|
import "../shared-utils/three/blink.js";
|
|
154
155
|
import "../shared-utils/vectorToCoordinate.js";
|
|
@@ -185,14 +186,14 @@ import "./Components/TagContainer.js";
|
|
|
185
186
|
import "./Components/TagItem.js";
|
|
186
187
|
import "./Components/Common/TagPoint.js";
|
|
187
188
|
import "../shared-utils/animationFrame/BetterTween.js";
|
|
188
|
-
const
|
|
189
|
+
const jr = (o, t) => new r(o, t);
|
|
189
190
|
export {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
191
|
+
Er as ContentType,
|
|
192
|
+
Hr as DimensionType,
|
|
193
|
+
jr as PanoTagPlugin,
|
|
193
194
|
r as PanoTagPluginController,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
195
|
+
Ir as PointType,
|
|
196
|
+
jr as default,
|
|
197
|
+
Ar as defaultGlobalConfig,
|
|
198
|
+
vr as pluginFlag
|
|
198
199
|
};
|
|
@@ -25,6 +25,7 @@ import "@realsee/five/line";
|
|
|
25
25
|
import "../../../shared-utils/three/core/Sphere.js";
|
|
26
26
|
import "animejs";
|
|
27
27
|
import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
28
|
+
import "../../../shared-utils/five/FivePuppet.js";
|
|
28
29
|
import "../../../shared-utils/positionToVector3.js";
|
|
29
30
|
import "../../../shared-utils/five/vector3ToScreen.js";
|
|
30
31
|
import "../../../shared-utils/five/getFiveModel.js";
|
|
@@ -68,7 +69,7 @@ import "../../../shared-utils/isTouchDevice.js";
|
|
|
68
69
|
import "../../../shared-utils/five/getPosition.js";
|
|
69
70
|
import "../../../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
70
71
|
import "../../../shared-utils/three/PointSelector/utils/contents.js";
|
|
71
|
-
function
|
|
72
|
+
function ii(o, i, t) {
|
|
72
73
|
var v, b, j, C, A;
|
|
73
74
|
const D = (v = t == null ? void 0 : t.useCache) != null ? v : !0;
|
|
74
75
|
if (!o)
|
|
@@ -114,5 +115,5 @@ function oi(o, i, t) {
|
|
|
114
115
|
return P(T), Object.values(f).forEach((r) => P(r)), T._isMerged = !0, T;
|
|
115
116
|
}
|
|
116
117
|
export {
|
|
117
|
-
|
|
118
|
+
ii as calculateTagConfig
|
|
118
119
|
};
|
|
@@ -46,6 +46,8 @@ import "../shared-utils/isNil.js";
|
|
|
46
46
|
import "../shared-utils/three/core/Sphere.js";
|
|
47
47
|
import "animejs";
|
|
48
48
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
49
|
+
import "../shared-utils/five/FivePuppet.js";
|
|
50
|
+
import "@realsee/five";
|
|
49
51
|
import "../shared-utils/three/PointSelector/utils/html.js";
|
|
50
52
|
import "../shared-utils/five/initialCSS3DRender.js";
|
|
51
53
|
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
@@ -69,7 +71,7 @@ import "../shared-utils/three/PointSelector/utils/contents.js";
|
|
|
69
71
|
import "../shared-utils/animationFrame/index.js";
|
|
70
72
|
import "./utils/index.js";
|
|
71
73
|
import "../shared-utils/url/absoluteUrl.js";
|
|
72
|
-
class
|
|
74
|
+
class $r extends _ {
|
|
73
75
|
constructor(r) {
|
|
74
76
|
super(r);
|
|
75
77
|
s(this, "controllerMap", /* @__PURE__ */ new Map());
|
|
@@ -212,5 +214,5 @@ class Cr extends _ {
|
|
|
212
214
|
}
|
|
213
215
|
}
|
|
214
216
|
export {
|
|
215
|
-
|
|
217
|
+
$r as PanoVideoPluginController
|
|
216
218
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var g = Object.defineProperty;
|
|
2
|
-
var I = (v,
|
|
3
|
-
var t = (v,
|
|
2
|
+
var I = (v, i, e) => i in v ? g(v, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : v[i] = e;
|
|
3
|
+
var t = (v, i, e) => (I(v, typeof i != "symbol" ? i + "" : i, e), e);
|
|
4
4
|
import { vertexShader as M, fragmentShader as P } from "./utils/shader.js";
|
|
5
5
|
import "../shared-utils/tag.js";
|
|
6
6
|
import { VideoTexture as F, LinearFilter as c, ShaderMaterial as y, Vector4 as x, SphereBufferGeometry as L, Mesh as V, Vector3 as p, Quaternion as b } from "three";
|
|
@@ -11,6 +11,7 @@ import "@realsee/five/line";
|
|
|
11
11
|
import "../shared-utils/three/core/Sphere.js";
|
|
12
12
|
import A from "animejs";
|
|
13
13
|
import { requestAnimationFrameInterval as D } from "../shared-utils/animationFrame/index.js";
|
|
14
|
+
import "../shared-utils/five/FivePuppet.js";
|
|
14
15
|
import E from "./utils/index.js";
|
|
15
16
|
import "../shared-utils/positionToVector3.js";
|
|
16
17
|
import "../shared-utils/five/vector3ToScreen.js";
|
|
@@ -56,9 +57,10 @@ import "../shared-utils/isTouchDevice.js";
|
|
|
56
57
|
import "../shared-utils/five/getPosition.js";
|
|
57
58
|
import "../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
58
59
|
import "../shared-utils/three/PointSelector/utils/contents.js";
|
|
59
|
-
|
|
60
|
+
import "@realsee/five";
|
|
61
|
+
class Ci {
|
|
60
62
|
/** 初始化视频、模型以及相关事件监听。 */
|
|
61
|
-
constructor(
|
|
63
|
+
constructor(i, e) {
|
|
62
64
|
t(this, "video");
|
|
63
65
|
t(this, "_id");
|
|
64
66
|
/** 视频资源地址 */
|
|
@@ -94,9 +96,9 @@ class _e {
|
|
|
94
96
|
this.video.muted = !1;
|
|
95
97
|
});
|
|
96
98
|
/** 把 uv 值转换成位置 */
|
|
97
|
-
t(this, "uv2Position", (
|
|
99
|
+
t(this, "uv2Position", (i, e) => {
|
|
98
100
|
var f;
|
|
99
|
-
const o = Math.PI, a = Math.PI * 2, d =
|
|
101
|
+
const o = Math.PI, a = Math.PI * 2, d = i, s = 1 - e, r = new p(
|
|
100
102
|
-1 * Math.cos(a * d) * Math.sin(o * s),
|
|
101
103
|
1 * Math.cos(o * s),
|
|
102
104
|
1 * Math.sin(a * d) * Math.sin(o * s)
|
|
@@ -111,50 +113,50 @@ class _e {
|
|
|
111
113
|
/** Five 数据加载后需要根据点位位姿调整点位模型位置 */
|
|
112
114
|
t(this, "onFiveDataLoaded", () => {
|
|
113
115
|
var r;
|
|
114
|
-
const
|
|
115
|
-
if (!
|
|
116
|
+
const i = (r = this.five.work) == null ? void 0 : r.observers[this.panoIndex];
|
|
117
|
+
if (!i)
|
|
116
118
|
return this.logWarning(`点位 ${this.panoIndex} 不存在,请检查 Five 数据是否正常。`);
|
|
117
|
-
this.observer =
|
|
118
|
-
const { x:
|
|
119
|
+
this.observer = i;
|
|
120
|
+
const { x: e, y: n, z: o, w: a } = i.quaternion, d = new b(e, n, o, a), s = i.position;
|
|
119
121
|
this.videoMesh.position.fromArray([s.x, s.y, s.z]), this.videoMesh.quaternion.set(0, 0, 0, 1), this.videoMesh.rotateOnAxis(new p(0, 1, 0), Math.PI / 2), this.videoMesh.applyQuaternion(d);
|
|
120
122
|
});
|
|
121
123
|
/** 兼容视频播放 */
|
|
122
|
-
t(this, "onFiveWantsMoveToPano", (
|
|
123
|
-
|
|
124
|
+
t(this, "onFiveWantsMoveToPano", (i) => {
|
|
125
|
+
i === this.panoIndex && (this.hasVideoEverPlayed || this.video.play().catch(() => {
|
|
124
126
|
}));
|
|
125
127
|
});
|
|
126
128
|
/** 走到某个点位上时,挂载/卸载视频 */
|
|
127
|
-
t(this, "onFivePanoArrived", (
|
|
129
|
+
t(this, "onFivePanoArrived", (i) => {
|
|
128
130
|
if (this.disposed)
|
|
129
131
|
return this.logWarning("实例已被销毁");
|
|
130
|
-
this.enabled && this.panoIndex ===
|
|
132
|
+
this.enabled && this.panoIndex === i && this.mount();
|
|
131
133
|
});
|
|
132
|
-
t(this, "onFivePanoWillArrive", (
|
|
133
|
-
if (
|
|
134
|
+
t(this, "onFivePanoWillArrive", (i) => {
|
|
135
|
+
if (i !== this.panoIndex)
|
|
134
136
|
return this.unmount();
|
|
135
|
-
this.panoIndex !==
|
|
137
|
+
this.panoIndex !== i && this.unmount();
|
|
136
138
|
});
|
|
137
139
|
/** Five 模型变化 */
|
|
138
|
-
t(this, "onFiveModeChange", (
|
|
139
|
-
|
|
140
|
+
t(this, "onFiveModeChange", (i) => {
|
|
141
|
+
i !== "Panorama" && this.hide();
|
|
140
142
|
});
|
|
141
143
|
/** Five mode change 动画结束 */
|
|
142
144
|
t(this, "onFiveInitAnimationEnded", () => {
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
+
const i = this.five.getCurrentState();
|
|
146
|
+
i.mode === "Panorama" && i.panoIndex === this.panoIndex && this.mount();
|
|
145
147
|
});
|
|
146
148
|
/** Five Canvas 点击 */
|
|
147
|
-
t(this, "onFiveWantsTapGesture", (
|
|
149
|
+
t(this, "onFiveWantsTapGesture", (i) => {
|
|
148
150
|
if (!this.five.scene.children.includes(this.videoMesh))
|
|
149
151
|
return;
|
|
150
152
|
if (this.disposed)
|
|
151
153
|
return this.logWarning("实例已被销毁");
|
|
152
154
|
if (!this.enabled)
|
|
153
155
|
return this.logWarning("实例已被禁用");
|
|
154
|
-
const [
|
|
155
|
-
if (!
|
|
156
|
+
const [e] = i.intersectObject(this.videoMesh);
|
|
157
|
+
if (!e)
|
|
156
158
|
return;
|
|
157
|
-
if (this.checkIntersectionInBounding(this.origin,
|
|
159
|
+
if (this.checkIntersectionInBounding(this.origin, e)) {
|
|
158
160
|
const o = {
|
|
159
161
|
target: this,
|
|
160
162
|
_preventDefaultReturn: !1,
|
|
@@ -191,16 +193,16 @@ class _e {
|
|
|
191
193
|
if (this.enabled && this.panoIndex === this.five.getCurrentState().panoIndex && this.five.getCurrentState().mode === "Panorama" && (this.renderFiveDisposer || (this.renderFiveDisposer = D(() => {
|
|
192
194
|
this.five.needsRender = !0;
|
|
193
195
|
}, 30)), this.five.scene.add(this.videoMesh), this.videoMesh.material.uniforms.opacity.value === 0)) {
|
|
194
|
-
const
|
|
196
|
+
const i = {
|
|
195
197
|
value: 0
|
|
196
198
|
};
|
|
197
199
|
A({
|
|
198
|
-
targets:
|
|
200
|
+
targets: i,
|
|
199
201
|
value: 1,
|
|
200
202
|
duration: 300,
|
|
201
203
|
easing: "linear",
|
|
202
204
|
update: () => {
|
|
203
|
-
this.videoMesh.material.uniforms.opacity.value =
|
|
205
|
+
this.videoMesh.material.uniforms.opacity.value = i.value;
|
|
204
206
|
},
|
|
205
207
|
complete: () => {
|
|
206
208
|
this.videoMesh.material.uniforms.opacity.value = 1;
|
|
@@ -213,11 +215,11 @@ class _e {
|
|
|
213
215
|
});
|
|
214
216
|
/** video pause 事件触发 */
|
|
215
217
|
t(this, "onVideoPaused", () => {
|
|
216
|
-
var
|
|
217
|
-
(
|
|
218
|
+
var i;
|
|
219
|
+
(i = this.renderFiveDisposer) == null || i.call(this), this.renderFiveDisposer = void 0;
|
|
218
220
|
});
|
|
219
221
|
var r, h;
|
|
220
|
-
this.five =
|
|
222
|
+
this.five = i, this.panoIndex = e.panoIndex, this._id = e.renderID, this.url = e.url, this.origin = e.origin.slice(), this.hooks = e.hooks, this._enabled = (h = (r = e.initialState) == null ? void 0 : r.enabled) != null ? h : !0;
|
|
221
223
|
const n = document.createElement("video");
|
|
222
224
|
n.crossOrigin = "anonymous", n.autoplay = !1, n.muted = !0, n.loop = !0, n.playsInline = !0, this.video = n;
|
|
223
225
|
const o = new F(this.video);
|
|
@@ -268,21 +270,21 @@ class _e {
|
|
|
268
270
|
lookAtVideo() {
|
|
269
271
|
if (!this.observer)
|
|
270
272
|
return;
|
|
271
|
-
const
|
|
272
|
-
if (!e)
|
|
273
|
-
return;
|
|
274
|
-
const i = this.uv2Position(e[0], e[1]);
|
|
273
|
+
const i = this.getUVCenter();
|
|
275
274
|
if (!i)
|
|
276
275
|
return;
|
|
277
|
-
const
|
|
276
|
+
const e = this.uv2Position(i[0], i[1]);
|
|
277
|
+
if (!e)
|
|
278
|
+
return;
|
|
279
|
+
const n = new p().subVectors(e, this.observer.position).normalize(), { longitude: o, latitude: a } = E(n);
|
|
278
280
|
this.five.setState({ panoIndex: this.panoIndex, longitude: o, latitude: a }), this.onFiveWantsMoveToPano(this.panoIndex);
|
|
279
281
|
}
|
|
280
282
|
/** 获取视频中心点的 uv */
|
|
281
283
|
getUVCenter() {
|
|
282
284
|
if (!this.origin)
|
|
283
285
|
return;
|
|
284
|
-
const
|
|
285
|
-
return [
|
|
286
|
+
const i = this.origin[0] + this.origin[2] / 2, e = this.origin[1] + this.origin[3] / 2;
|
|
287
|
+
return [i, e];
|
|
286
288
|
}
|
|
287
289
|
/** 添加时间监听 */
|
|
288
290
|
addEventListeners() {
|
|
@@ -294,8 +296,8 @@ class _e {
|
|
|
294
296
|
}
|
|
295
297
|
/** 如果满足 mount 条件,mount */
|
|
296
298
|
mountIfNeeded() {
|
|
297
|
-
const
|
|
298
|
-
|
|
299
|
+
const i = this.five.getCurrentState();
|
|
300
|
+
i.mode === "Panorama" && i.panoIndex === this.panoIndex && this.enabled && this.mount();
|
|
299
301
|
}
|
|
300
302
|
/** 挂载:加载视频资源;添加模型。 */
|
|
301
303
|
mount() {
|
|
@@ -303,10 +305,10 @@ class _e {
|
|
|
303
305
|
return this.logWarning("插件已经销毁,无法挂载。");
|
|
304
306
|
if (this.url === "")
|
|
305
307
|
return this.logWarning("视频资源不存在。");
|
|
306
|
-
this.video.src !== this.url && (this.video.src = this.url), this.video.paused && this.video.play().catch((
|
|
307
|
-
this.logWarning(
|
|
308
|
-
this.video.play().catch((
|
|
309
|
-
this.logWarning(
|
|
308
|
+
this.video.src !== this.url && (this.video.src = this.url), this.video.paused && this.video.play().catch((i) => {
|
|
309
|
+
this.logWarning(i instanceof Error ? i.message : "视频播放失败。"), this.five.once("gesture", () => {
|
|
310
|
+
this.video.play().catch((e) => {
|
|
311
|
+
this.logWarning(e instanceof Error ? e.message : "自动播放视频失败。");
|
|
310
312
|
});
|
|
311
313
|
});
|
|
312
314
|
});
|
|
@@ -320,17 +322,17 @@ class _e {
|
|
|
320
322
|
this.video.pause(), this.videoMesh.material.uniforms.opacity.value = 0, this.five.scene.remove(this.videoMesh);
|
|
321
323
|
}
|
|
322
324
|
/** 控制台打印警告 */
|
|
323
|
-
logWarning(
|
|
324
|
-
console.warn("⛔ ==> [VideoMeshController]:",
|
|
325
|
+
logWarning(i) {
|
|
326
|
+
console.warn("⛔ ==> [VideoMeshController]:", i);
|
|
325
327
|
}
|
|
326
328
|
/** 检测射线与模型的交点是不是在视频的范围内 */
|
|
327
|
-
checkIntersectionInBounding(
|
|
328
|
-
if (!
|
|
329
|
+
checkIntersectionInBounding(i, e) {
|
|
330
|
+
if (!e.uv)
|
|
329
331
|
return !1;
|
|
330
|
-
const [n, o] =
|
|
332
|
+
const [n, o] = e.uv.toArray(), [a, d, s, r] = i, h = 1 - d - r, l = a + s, m = h + r;
|
|
331
333
|
return n >= a && n <= l && o >= h && o <= m;
|
|
332
334
|
}
|
|
333
335
|
}
|
|
334
336
|
export {
|
|
335
|
-
|
|
337
|
+
Ci as VideoMeshController
|
|
336
338
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PanoVideoPluginController as r } from "./Controller.js";
|
|
2
|
-
import { typings as
|
|
2
|
+
import { typings as go } from "./typings/index.js";
|
|
3
3
|
import "./VideoMeshController.js";
|
|
4
4
|
import "./utils/shader.js";
|
|
5
5
|
import "../shared-utils/tag.js";
|
|
@@ -34,6 +34,8 @@ import "../shared-utils/isNil.js";
|
|
|
34
34
|
import "../shared-utils/three/core/Sphere.js";
|
|
35
35
|
import "animejs";
|
|
36
36
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
37
|
+
import "../shared-utils/five/FivePuppet.js";
|
|
38
|
+
import "@realsee/five";
|
|
37
39
|
import "../shared-utils/three/PointSelector/utils/html.js";
|
|
38
40
|
import "../shared-utils/five/initialCSS3DRender.js";
|
|
39
41
|
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
@@ -58,9 +60,9 @@ import "../shared-utils/animationFrame/index.js";
|
|
|
58
60
|
import "./utils/index.js";
|
|
59
61
|
import "../base/BasePlugin.js";
|
|
60
62
|
import "../shared-utils/url/absoluteUrl.js";
|
|
61
|
-
const
|
|
63
|
+
const lo = (o) => new r(o);
|
|
62
64
|
export {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
lo as PanoVideoPlugin,
|
|
66
|
+
go as PanoVideoPluginType,
|
|
67
|
+
lo as default
|
|
66
68
|
};
|
|
@@ -38,6 +38,7 @@ import "../shared-utils/three/core/Sphere.js";
|
|
|
38
38
|
import "animejs";
|
|
39
39
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
40
40
|
import { equal as O } from "../shared-utils/equal.js";
|
|
41
|
+
import "../shared-utils/five/FivePuppet.js";
|
|
41
42
|
import { loadTexture as x } from "../shared-utils/three/loadTexture.js";
|
|
42
43
|
import { format as y, getPipesFromLibrary as C } from "./utils/formatData.js";
|
|
43
44
|
import { ObjectFlowPipe as D } from "./utils/Objects/FlowPipe.js";
|
|
@@ -85,6 +86,7 @@ import "../shared-utils/isTouchDevice.js";
|
|
|
85
86
|
import "../shared-utils/five/getPosition.js";
|
|
86
87
|
import "../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
87
88
|
import "../shared-utils/three/PointSelector/utils/contents.js";
|
|
89
|
+
import "@realsee/five";
|
|
88
90
|
import "../shared-utils/isTruelyObject.js";
|
|
89
91
|
import "../shared-utils/animationFrame/index.js";
|
|
90
92
|
import "./utils/Objects/Pipe.js";
|
|
@@ -93,7 +95,7 @@ import "../shared-utils/three/Extras/Curves/BezierCurve3.js";
|
|
|
93
95
|
import "../shared-utils/three/Extras/Core/Interpolations.js";
|
|
94
96
|
import "../shared-utils/three/Extras/Core/Interpolations2.js";
|
|
95
97
|
const g = { flowSpeed: 0.6, rotateSpeed: 0 };
|
|
96
|
-
class
|
|
98
|
+
class Ke extends S {
|
|
97
99
|
constructor(e) {
|
|
98
100
|
super(e);
|
|
99
101
|
// ==================== public properties ====================
|
|
@@ -373,5 +375,5 @@ class Be extends S {
|
|
|
373
375
|
}
|
|
374
376
|
}
|
|
375
377
|
export {
|
|
376
|
-
|
|
378
|
+
Ke as Controller
|
|
377
379
|
};
|
|
@@ -33,6 +33,8 @@ import "../shared-utils/isNil.js";
|
|
|
33
33
|
import "../shared-utils/three/core/Sphere.js";
|
|
34
34
|
import "animejs";
|
|
35
35
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
36
|
+
import "../shared-utils/five/FivePuppet.js";
|
|
37
|
+
import "@realsee/five";
|
|
36
38
|
import "../shared-utils/three/PointSelector/utils/html.js";
|
|
37
39
|
import "../shared-utils/five/initialCSS3DRender.js";
|
|
38
40
|
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
@@ -65,8 +67,8 @@ import "../shared-utils/animationFrame/BetterTween.js";
|
|
|
65
67
|
import "../shared-utils/three/Extras/Curves/BezierCurve3.js";
|
|
66
68
|
import "../shared-utils/three/Extras/Core/Interpolations.js";
|
|
67
69
|
import "../shared-utils/three/Extras/Core/Interpolations2.js";
|
|
68
|
-
const
|
|
70
|
+
const wr = (r) => new o(r);
|
|
69
71
|
export {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
+
wr as PipelinePlugin,
|
|
73
|
+
wr as default
|
|
72
74
|
};
|
|
@@ -10,6 +10,7 @@ import "@realsee/five/line";
|
|
|
10
10
|
import "../../../shared-utils/three/core/Sphere.js";
|
|
11
11
|
import "animejs";
|
|
12
12
|
import { requestAnimationFrameInterval as c } from "../../../shared-utils/animationFrame/index.js";
|
|
13
|
+
import "../../../shared-utils/five/FivePuppet.js";
|
|
13
14
|
import { ObjectPipe as h } from "./Pipe.js";
|
|
14
15
|
import "../../../shared-utils/positionToVector3.js";
|
|
15
16
|
import "../../../shared-utils/five/vector3ToScreen.js";
|
|
@@ -55,6 +56,7 @@ import "../../../shared-utils/isTouchDevice.js";
|
|
|
55
56
|
import "../../../shared-utils/five/getPosition.js";
|
|
56
57
|
import "../../../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
57
58
|
import "../../../shared-utils/three/PointSelector/utils/contents.js";
|
|
59
|
+
import "@realsee/five";
|
|
58
60
|
import "../../../shared-utils/animationFrame/BetterTween.js";
|
|
59
61
|
import "../../../shared-utils/three/Extras/Curves/BezierCurve3.js";
|
|
60
62
|
import "../../../shared-utils/three/Extras/Core/Interpolations.js";
|
|
@@ -78,7 +80,7 @@ const d = (
|
|
|
78
80
|
}
|
|
79
81
|
`
|
|
80
82
|
);
|
|
81
|
-
class
|
|
83
|
+
class It extends h {
|
|
82
84
|
constructor(t) {
|
|
83
85
|
super(t, d);
|
|
84
86
|
/** 初始状态下,当前水管内的水流在整体管道上的位移
|
|
@@ -136,5 +138,5 @@ class St extends h {
|
|
|
136
138
|
}
|
|
137
139
|
}
|
|
138
140
|
export {
|
|
139
|
-
|
|
141
|
+
It as ObjectFlowPipe
|
|
140
142
|
};
|
|
@@ -10,6 +10,7 @@ import "@realsee/five/line";
|
|
|
10
10
|
import "../../../shared-utils/three/core/Sphere.js";
|
|
11
11
|
import "animejs";
|
|
12
12
|
import { tweenProgress as h } from "../../../shared-utils/animationFrame/BetterTween.js";
|
|
13
|
+
import "../../../shared-utils/five/FivePuppet.js";
|
|
13
14
|
import { ObjectPipe as a } from "./Pipe.js";
|
|
14
15
|
import "../../../shared-utils/positionToVector3.js";
|
|
15
16
|
import "../../../shared-utils/five/vector3ToScreen.js";
|
|
@@ -55,11 +56,12 @@ import "../../../shared-utils/isTouchDevice.js";
|
|
|
55
56
|
import "../../../shared-utils/five/getPosition.js";
|
|
56
57
|
import "../../../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
57
58
|
import "../../../shared-utils/three/PointSelector/utils/contents.js";
|
|
59
|
+
import "@realsee/five";
|
|
58
60
|
import "../../../shared-utils/animationFrame/index.js";
|
|
59
61
|
import "../../../shared-utils/three/Extras/Curves/BezierCurve3.js";
|
|
60
62
|
import "../../../shared-utils/three/Extras/Core/Interpolations.js";
|
|
61
63
|
import "../../../shared-utils/three/Extras/Core/Interpolations2.js";
|
|
62
|
-
class
|
|
64
|
+
class vi extends a {
|
|
63
65
|
constructor(i) {
|
|
64
66
|
super(i);
|
|
65
67
|
p(this, "imageCount", 64);
|
|
@@ -82,5 +84,5 @@ class Ai extends a {
|
|
|
82
84
|
}
|
|
83
85
|
}
|
|
84
86
|
export {
|
|
85
|
-
|
|
87
|
+
vi as ObjectHighlightPipe
|
|
86
88
|
};
|
|
@@ -10,21 +10,21 @@ var f = (p, e, t) => e in p ? d(p, e, { enumerable: !0, configurable: !0, writab
|
|
|
10
10
|
return p;
|
|
11
11
|
};
|
|
12
12
|
var n = (p, e, t) => (f(p, typeof e != "symbol" ? e + "" : e, t), t);
|
|
13
|
-
var l = (p, e, t) => new Promise((i,
|
|
13
|
+
var l = (p, e, t) => new Promise((i, m) => {
|
|
14
14
|
var o = (s) => {
|
|
15
15
|
try {
|
|
16
|
-
|
|
16
|
+
a(t.next(s));
|
|
17
17
|
} catch (c) {
|
|
18
|
-
|
|
18
|
+
m(c);
|
|
19
19
|
}
|
|
20
20
|
}, r = (s) => {
|
|
21
21
|
try {
|
|
22
|
-
|
|
22
|
+
a(t.throw(s));
|
|
23
23
|
} catch (c) {
|
|
24
|
-
|
|
24
|
+
m(c);
|
|
25
25
|
}
|
|
26
|
-
},
|
|
27
|
-
|
|
26
|
+
}, a = (s) => s.done ? i(s.value) : Promise.resolve(s.value).then(o, r);
|
|
27
|
+
a((t = t.apply(p, e)).next());
|
|
28
28
|
});
|
|
29
29
|
import * as u from "three";
|
|
30
30
|
import "../../../shared-utils/tag.js";
|
|
@@ -35,6 +35,7 @@ import "@realsee/five/line";
|
|
|
35
35
|
import "../../../shared-utils/three/core/Sphere.js";
|
|
36
36
|
import "animejs";
|
|
37
37
|
import { BetterTween as g } from "../../../shared-utils/animationFrame/BetterTween.js";
|
|
38
|
+
import "../../../shared-utils/five/FivePuppet.js";
|
|
38
39
|
import { CustomBezierCurve3 as x } from "../../../shared-utils/three/Extras/Curves/BezierCurve3.js";
|
|
39
40
|
import "../../../shared-utils/positionToVector3.js";
|
|
40
41
|
import "../../../shared-utils/five/vector3ToScreen.js";
|
|
@@ -80,6 +81,7 @@ import "../../../shared-utils/isTouchDevice.js";
|
|
|
80
81
|
import "../../../shared-utils/five/getPosition.js";
|
|
81
82
|
import "../../../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
82
83
|
import "../../../shared-utils/three/PointSelector/utils/contents.js";
|
|
84
|
+
import "@realsee/five";
|
|
83
85
|
import "../../../shared-utils/animationFrame/index.js";
|
|
84
86
|
import "../../../shared-utils/three/Extras/Core/Interpolations.js";
|
|
85
87
|
import "../../../shared-utils/three/Extras/Core/Interpolations2.js";
|
|
@@ -127,9 +129,9 @@ class h extends u.Mesh {
|
|
|
127
129
|
/** u / m: 每米水管对应到贴图上,应该对应的 u 的长度 */
|
|
128
130
|
n(this, "uPreMeter", 1);
|
|
129
131
|
t.geometryConfig && (this.geometryConfig = y(y({}, this.geometryConfig), t.geometryConfig)), this.customID = t.id || this.uuid, this.pathPoints = t.path, this.path = h.calculatePath(t.path.map((s) => new u.Vector3().fromArray(s))), this.pathLength = this.path.getLength(), this.texture = h.formatTexture(t.texture);
|
|
130
|
-
const { radius:
|
|
132
|
+
const { radius: m, tubularSegments: o, radialSegments: r } = this.geometryConfig, a = h.formatTexture(t.texture);
|
|
131
133
|
this.geometry = h.formatGeometryUV(
|
|
132
|
-
new u.TubeBufferGeometry(this.path, o,
|
|
134
|
+
new u.TubeBufferGeometry(this.path, o, m, r),
|
|
133
135
|
this.pathLength,
|
|
134
136
|
this.uPreMeter
|
|
135
137
|
), this.material = new u.ShaderMaterial({
|
|
@@ -138,7 +140,7 @@ class h extends u.Mesh {
|
|
|
138
140
|
uOffset: { value: 0 },
|
|
139
141
|
vOffset: { value: 0 },
|
|
140
142
|
envMap: {
|
|
141
|
-
value:
|
|
143
|
+
value: a
|
|
142
144
|
}
|
|
143
145
|
},
|
|
144
146
|
transparent: !0,
|
|
@@ -153,11 +155,11 @@ class h extends u.Mesh {
|
|
|
153
155
|
static calculatePath(t) {
|
|
154
156
|
return t.length === 2 ? new u.LineCurve3(t[0], t[1]) : new x(t);
|
|
155
157
|
}
|
|
156
|
-
static formatGeometryUV(t, i,
|
|
158
|
+
static formatGeometryUV(t, i, m) {
|
|
157
159
|
const o = t.getAttribute("uv");
|
|
158
160
|
for (let r = 0; r < o.count; r++) {
|
|
159
|
-
const
|
|
160
|
-
o.setX(r,
|
|
161
|
+
const a = o.getX(r) * i * m;
|
|
162
|
+
o.setX(r, a);
|
|
161
163
|
}
|
|
162
164
|
return t;
|
|
163
165
|
}
|
|
@@ -174,9 +176,9 @@ class h extends u.Mesh {
|
|
|
174
176
|
const i = 0;
|
|
175
177
|
if (typeof (t == null ? void 0 : t.duration) != "number")
|
|
176
178
|
return this.setOpacity(i);
|
|
177
|
-
const
|
|
178
|
-
return
|
|
179
|
-
this.opacityAnime = new g({ progress:
|
|
179
|
+
const m = this.material.uniforms.opacity.value;
|
|
180
|
+
return m === i ? !0 : new Promise((r) => {
|
|
181
|
+
this.opacityAnime = new g({ progress: m }).to({ progress: i }).onUpdate(({ progress: a }) => this.setOpacity(a)).onComplete(() => r(!0)).onDispose(() => {
|
|
180
182
|
this.setOpacity(i), r(!1);
|
|
181
183
|
}).play();
|
|
182
184
|
});
|
|
@@ -189,9 +191,9 @@ class h extends u.Mesh {
|
|
|
189
191
|
const i = 1;
|
|
190
192
|
if (typeof (t == null ? void 0 : t.duration) != "number")
|
|
191
193
|
return this.setOpacity(i);
|
|
192
|
-
const
|
|
194
|
+
const m = this.material.uniforms.opacity.value;
|
|
193
195
|
return new Promise((r) => {
|
|
194
|
-
this.opacityAnime = new g({ progress:
|
|
196
|
+
this.opacityAnime = new g({ progress: m }).to({ progress: i }).onUpdate(({ progress: a }) => this.setOpacity(a)).onComplete(() => r(!0)).onDispose(() => {
|
|
195
197
|
this.setOpacity(i), r(!1);
|
|
196
198
|
}).play();
|
|
197
199
|
});
|