@realsee/dnalogel 3.50.14 → 3.50.15-alpha.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/README.md +116 -0
- package/dist/Sculpt/Objects/Base/index.d.ts +1 -1
- package/dist/Sculpt/index.d.ts +4 -4
- package/dist/index.cjs.js +262 -262
- package/dist/index.js +4235 -4231
- package/dist/index.umd.js +263 -263
- package/dist/shared-utils/five/index.d.ts +2 -0
- package/dist/shared-utils/tag.d.ts +1 -1
- package/dist/shared-utils/three/index.d.ts +1 -0
- package/libs/AreaMakerPlugin/Controller.js +104 -74
- package/libs/AreaMakerPlugin/index.js +33 -3
- package/libs/AreaMakerPlugin/utils/Item.js +66 -36
- package/libs/CSS3DRenderPlugin/Controller.js +39 -19
- package/libs/CSS3DRenderPlugin/index.js +34 -14
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +60 -35
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +98 -78
- package/libs/CruisePlugin/BaseController.js +59 -29
- package/libs/CruisePlugin/Move.js +33 -14
- package/libs/CruisePlugin/Work.js +66 -47
- package/libs/CruisePlugin/index.js +38 -19
- package/libs/CurrentPanoImagePlugin/Controller.js +68 -38
- package/libs/CurrentPanoImagePlugin/index.js +34 -4
- package/libs/GuideLinePlugin/Controller.js +69 -50
- package/libs/GuideLinePlugin/GuideLineItem.js +34 -15
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +3 -2
- package/libs/GuideLinePlugin/GuideLineModeItem.js +34 -15
- package/libs/GuideLinePlugin/index.js +38 -19
- package/libs/ModelMakerPlugin/Controller.js +60 -42
- package/libs/ModelMakerPlugin/index.js +34 -16
- package/libs/ModelTVVideoPlugin/Plugin.js +48 -28
- package/libs/ModelTVVideoPlugin/index.js +24 -4
- package/libs/Object3DHelperPlugin/Controller.js +49 -30
- package/libs/Object3DHelperPlugin/index.js +36 -17
- package/libs/PanoCompassPlugin/Controller.js +33 -13
- package/libs/PanoCompassPlugin/index.js +34 -14
- package/libs/PanoDoorLabelPlugin/BaseController.js +55 -25
- package/libs/PanoDoorLabelPlugin/Controller.js +99 -69
- package/libs/PanoDoorLabelPlugin/index.js +34 -4
- package/libs/PanoMeasurePlugin/Components/Controller0.js +8 -8
- package/libs/PanoMeasurePlugin/Components/Controller1.js +8 -8
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +75 -49
- package/libs/PanoMeasurePlugin/Controller/index.js +16 -16
- package/libs/PanoMeasurePlugin/Model/area.js +41 -15
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +29 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +8 -8
- package/libs/PanoMeasurePlugin/index.js +3 -3
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +43 -15
- package/libs/PanoRulerProPlugin/Controller.js +60 -30
- package/libs/PanoRulerProPlugin/RulerItems.js +85 -55
- package/libs/PanoRulerProPlugin/index.js +33 -3
- package/libs/PanoSpatialTagPlugin/Plugin.js +54 -34
- package/libs/PanoSpatialTagPlugin/index.js +22 -2
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +79 -49
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +235 -206
- package/libs/PanoTagPlugin/Components/Tag/index.js +152 -125
- package/libs/PanoTagPlugin/Components/TagContainer.js +97 -70
- package/libs/PanoTagPlugin/Components/TagItem.js +31 -4
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +29 -2
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +55 -28
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +53 -26
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +54 -27
- package/libs/PanoTagPlugin/controller/TagRender.js +48 -29
- package/libs/PanoTagPlugin/controller/TagUtil.js +33 -14
- package/libs/PanoTagPlugin/controller/index.js +49 -30
- package/libs/PanoTagPlugin/index.js +41 -22
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +59 -29
- package/libs/PanoVideoPlugin/Controller.js +91 -61
- package/libs/PanoVideoPlugin/VideoMeshController.js +56 -26
- package/libs/PanoVideoPlugin/index.js +36 -6
- package/libs/PipelinePlugin/Controller.js +80 -51
- package/libs/PipelinePlugin/index.js +34 -5
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +44 -14
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +43 -13
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +61 -31
- package/libs/Sculpt/Meshes/Box.js +3 -2
- package/libs/Sculpt/Meshes/Cylinder.js +3 -2
- package/libs/Sculpt/Meshes/Line.js +9 -8
- package/libs/Sculpt/Meshes/LineWithDots.js +8 -7
- package/libs/Sculpt/Meshes/Point.js +3 -2
- package/libs/Sculpt/Meshes/Polygon.js +3 -2
- package/libs/Sculpt/Meshes/Prism.js +9 -8
- package/libs/Sculpt/Meshes/Rectangle.js +3 -2
- package/libs/Sculpt/Objects/Base/index.d.ts +1 -1
- package/libs/Sculpt/Objects/Line/Editor.js +7 -6
- package/libs/Sculpt/index.d.ts +4 -4
- package/libs/Sculpt/index.js +3 -2
- package/libs/Sculpt/utils/three/ColoredMesh.js +6 -5
- package/libs/base/BasePlugin.js +4 -3
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +89 -60
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +34 -5
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +79 -50
- package/libs/floorplan/ModelFloorplanPlugin/index.js +34 -5
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +68 -38
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +34 -4
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +104 -75
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +34 -5
- package/libs/floorplan/index.js +1 -0
- package/libs/index.js +28 -28
- package/libs/shared-utils/five/fiveModelLoad.js +1 -0
- package/libs/shared-utils/five/index.d.ts +2 -0
- package/libs/shared-utils/five/index.js +3 -2
- package/libs/shared-utils/five/lookObject.js +3 -2
- package/libs/shared-utils/index.js +42 -35
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/tag.d.ts +1 -1
- package/libs/shared-utils/tag.js +41 -41
- package/libs/shared-utils/three/PointSelector/utils/PointSelectorHelper.js +3 -2
- package/libs/shared-utils/three/index.d.ts +1 -0
- package/libs/shared-utils/three/index.js +1 -0
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
1
|
+
var g = Object.defineProperty, f = Object.defineProperties;
|
|
2
2
|
var b = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
3
|
+
var h = Object.getOwnPropertySymbols;
|
|
4
4
|
var M = Object.prototype.hasOwnProperty, W = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var l = (o,
|
|
6
|
-
for (var
|
|
7
|
-
M.call(
|
|
8
|
-
if (
|
|
9
|
-
for (var
|
|
10
|
-
W.call(
|
|
5
|
+
var l = (o, i, r) => i in o ? g(o, i, { enumerable: !0, configurable: !0, writable: !0, value: r }) : o[i] = r, a = (o, i) => {
|
|
6
|
+
for (var r in i || (i = {}))
|
|
7
|
+
M.call(i, r) && l(o, r, i[r]);
|
|
8
|
+
if (h)
|
|
9
|
+
for (var r of h(i))
|
|
10
|
+
W.call(i, r) && l(o, r, i[r]);
|
|
11
11
|
return o;
|
|
12
|
-
},
|
|
13
|
-
var s = (o,
|
|
14
|
-
import { VideoMeshController as
|
|
12
|
+
}, p = (o, i) => f(o, b(i));
|
|
13
|
+
var s = (o, i, r) => (l(o, typeof i != "symbol" ? i + "" : i, r), r);
|
|
14
|
+
import { VideoMeshController as m } from "./VideoMeshController.js";
|
|
15
15
|
import { Controller as _ } from "../base/BasePlugin.js";
|
|
16
16
|
import "./utils/shader.js";
|
|
17
17
|
import "../shared-utils/tag.js";
|
|
@@ -27,20 +27,50 @@ import "../shared-utils/five/transformPosition.js";
|
|
|
27
27
|
import "../shared-utils/three/temp.js";
|
|
28
28
|
import "../shared-utils/dom/resizeObserver.js";
|
|
29
29
|
import "hammerjs";
|
|
30
|
+
import "../shared-utils/three/PointSelector/index.js";
|
|
31
|
+
import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
32
|
+
import "../shared-utils/three/Magnifier.js";
|
|
33
|
+
import "../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
34
|
+
import "../shared-utils/three/Assets/index.js";
|
|
35
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
30
36
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
37
|
+
import "../CSS3DRenderPlugin/utils/even.js";
|
|
38
|
+
import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
39
|
+
import "../shared-utils/three/centerPoint.js";
|
|
40
|
+
import "../shared-utils/three/getObjectVisible.js";
|
|
31
41
|
import "@realsee/five/line";
|
|
32
42
|
import "../vendor/three/examples/jsm/lines/LineGeometry.js";
|
|
33
43
|
import "../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
|
|
34
44
|
import "../vendor/three/build/three.module.js";
|
|
35
45
|
import "../shared-utils/three/core/Sphere.js";
|
|
36
46
|
import "animejs";
|
|
37
|
-
import "../shared-utils/
|
|
47
|
+
import "../shared-utils/isNil.js";
|
|
38
48
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
49
|
+
import "../shared-utils/three/PointSelector/utils/html.js";
|
|
50
|
+
import "../shared-utils/five/initialCSS3DRender.js";
|
|
51
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
52
|
+
import "../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
|
|
53
|
+
import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
54
|
+
import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
55
|
+
import "../Sculpt/Meshes/Line.js";
|
|
56
|
+
import "../Sculpt/typings/style.js";
|
|
57
|
+
import "../shared-utils/five/FiveLine.js";
|
|
58
|
+
import "../shared-utils/three/IObject3D.js";
|
|
59
|
+
import "../Sculpt/utils/removeAllTag.js";
|
|
60
|
+
import "../Sculpt/utils/Meshes/getLengthHTML.js";
|
|
61
|
+
import "../shared-utils/three/applyObjectMatrixWorld.js";
|
|
62
|
+
import "../shared-utils/util.js";
|
|
63
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
64
|
+
import "../shared-utils/isTouchDevice.js";
|
|
65
|
+
import "../shared-utils/five/getPosition.js";
|
|
66
|
+
import "../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
67
|
+
import "../shared-utils/three/PointSelector/utils/contents.js";
|
|
68
|
+
import "../shared-utils/animationFrame/index.js";
|
|
39
69
|
import "./utils/index.js";
|
|
40
70
|
import "../shared-utils/url/absoluteUrl.js";
|
|
41
|
-
class
|
|
42
|
-
constructor(
|
|
43
|
-
super(
|
|
71
|
+
class Er extends _ {
|
|
72
|
+
constructor(r) {
|
|
73
|
+
super(r);
|
|
44
74
|
s(this, "controllerMap", /* @__PURE__ */ new Map());
|
|
45
75
|
s(this, "data");
|
|
46
76
|
s(this, "enabled", !0);
|
|
@@ -57,58 +87,58 @@ class T extends _ {
|
|
|
57
87
|
return this._disposed;
|
|
58
88
|
}
|
|
59
89
|
/** 加载点位视频数据,加载数据并不代表会加载点位视频。 */
|
|
60
|
-
load(
|
|
61
|
-
var
|
|
90
|
+
load(r, t) {
|
|
91
|
+
var e;
|
|
62
92
|
if (this.disposed)
|
|
63
93
|
return this.logWarning("插件已被销毁");
|
|
64
|
-
typeof ((
|
|
65
|
-
const
|
|
66
|
-
n.video_list.forEach((
|
|
94
|
+
typeof ((e = t == null ? void 0 : t.initialState) == null ? void 0 : e.enabled) != "undefined" && t.initialState.enabled !== this.enabled && (t.initialState.enabled ? this.enable() : this.disable()), r.list.forEach((n) => {
|
|
95
|
+
const c = n.pano_index, u = n.render_id;
|
|
96
|
+
n.video_list.forEach((d) => {
|
|
67
97
|
this.controllerMap.set(
|
|
68
|
-
|
|
69
|
-
new
|
|
70
|
-
panoIndex:
|
|
71
|
-
renderID:
|
|
98
|
+
d.render_id,
|
|
99
|
+
new m(this.five, p(a({}, d), {
|
|
100
|
+
panoIndex: c,
|
|
101
|
+
renderID: u,
|
|
72
102
|
hooks: this.hooks,
|
|
73
103
|
initialState: { enabled: this.enabled }
|
|
74
104
|
}))
|
|
75
105
|
);
|
|
76
106
|
});
|
|
77
|
-
}), this.data =
|
|
107
|
+
}), this.data = r, this.hooks.emit("dataLoaded", r);
|
|
78
108
|
}
|
|
79
109
|
/** 开启插件功能。 */
|
|
80
|
-
enable(
|
|
81
|
-
var
|
|
110
|
+
enable(r) {
|
|
111
|
+
var e;
|
|
82
112
|
if (this.disposed)
|
|
83
113
|
return this.logWarning("插件已被销毁");
|
|
84
114
|
if (this.enabled)
|
|
85
115
|
return;
|
|
86
116
|
this.enabled = !0, Array.from(this.controllerMap.values()).forEach((n) => n.enable());
|
|
87
|
-
const
|
|
88
|
-
this.hooks.emit("enable", { userAction:
|
|
117
|
+
const t = (e = r == null ? void 0 : r.userAction) != null ? e : !0;
|
|
118
|
+
this.hooks.emit("enable", { userAction: t });
|
|
89
119
|
}
|
|
90
120
|
/** 禁用插件功能。 */
|
|
91
|
-
disable(
|
|
92
|
-
var
|
|
121
|
+
disable(r) {
|
|
122
|
+
var e;
|
|
93
123
|
if (this.disposed)
|
|
94
124
|
return this.logWarning("插件已被销毁");
|
|
95
125
|
if (!this.enabled)
|
|
96
126
|
return;
|
|
97
127
|
this.enabled = !1, Array.from(this.controllerMap.values()).forEach((n) => n.disable());
|
|
98
|
-
const
|
|
99
|
-
this.hooks.emit("disable", { userAction:
|
|
128
|
+
const t = (e = r == null ? void 0 : r.userAction) != null ? e : !0;
|
|
129
|
+
this.hooks.emit("disable", { userAction: t });
|
|
100
130
|
}
|
|
101
131
|
/** 看向某个视频。
|
|
102
132
|
* - 会自动切换到全景模式。
|
|
103
133
|
* - 如果遇到不能自动播放的问题,需要放到用户交互事件中调用。
|
|
104
134
|
*/
|
|
105
|
-
lookAtVideoItemByRenderID(
|
|
135
|
+
lookAtVideoItemByRenderID(r) {
|
|
106
136
|
if (this.disposed)
|
|
107
137
|
return this.logWarning("插件已被销毁");
|
|
108
|
-
const
|
|
109
|
-
if (!
|
|
110
|
-
return this.logWarning(`ID 为 ${
|
|
111
|
-
|
|
138
|
+
const t = this.controllerMap.get(r);
|
|
139
|
+
if (!t)
|
|
140
|
+
return this.logWarning(`ID 为 ${r} 的点位视频不存在`);
|
|
141
|
+
t.lookAtVideo();
|
|
112
142
|
}
|
|
113
143
|
/**
|
|
114
144
|
* 取消静音。
|
|
@@ -126,26 +156,26 @@ class T extends _ {
|
|
|
126
156
|
* }}
|
|
127
157
|
* ```
|
|
128
158
|
*/
|
|
129
|
-
unmuteByRenderID(
|
|
159
|
+
unmuteByRenderID(r) {
|
|
130
160
|
if (this.disposed)
|
|
131
161
|
return this.logWarning("插件已被销毁");
|
|
132
|
-
const
|
|
133
|
-
if (!
|
|
134
|
-
return this.logWarning(`ID 为 ${
|
|
135
|
-
|
|
162
|
+
const t = this.controllerMap.get(r);
|
|
163
|
+
if (!t)
|
|
164
|
+
return this.logWarning(`ID 为 ${r} 的点位视频不存在`);
|
|
165
|
+
t.unmute();
|
|
136
166
|
}
|
|
137
167
|
/** 为一个点位添加视频(可以是多条)。 */
|
|
138
|
-
add(
|
|
168
|
+
add(r, t) {
|
|
139
169
|
if (this.disposed)
|
|
140
170
|
return this.logWarning("插件已被销毁");
|
|
141
|
-
|
|
142
|
-
if (this.controllerMap.get(
|
|
143
|
-
return this.logWarning(`ID 为 ${
|
|
144
|
-
const n =
|
|
171
|
+
t.forEach((e) => {
|
|
172
|
+
if (this.controllerMap.get(e.render_id))
|
|
173
|
+
return this.logWarning(`ID 为 ${e.render_id} 的点位视频已存在`);
|
|
174
|
+
const n = e.render_id;
|
|
145
175
|
this.controllerMap.set(
|
|
146
|
-
|
|
147
|
-
new
|
|
148
|
-
panoIndex:
|
|
176
|
+
e.render_id,
|
|
177
|
+
new m(this.five, p(a({}, e), {
|
|
178
|
+
panoIndex: r,
|
|
149
179
|
renderID: n,
|
|
150
180
|
hooks: this.hooks,
|
|
151
181
|
initialState: { enabled: this.enabled }
|
|
@@ -154,32 +184,32 @@ class T extends _ {
|
|
|
154
184
|
});
|
|
155
185
|
}
|
|
156
186
|
/** 根据 VideoItem render_id 删除某个视频。 */
|
|
157
|
-
removeByRenderID(
|
|
187
|
+
removeByRenderID(r) {
|
|
158
188
|
if (this.disposed)
|
|
159
189
|
return this.logWarning("插件已被销毁");
|
|
160
|
-
const
|
|
161
|
-
if (!
|
|
162
|
-
return this.logWarning(`ID 为 ${
|
|
163
|
-
|
|
190
|
+
const t = this.controllerMap.get(r);
|
|
191
|
+
if (!t)
|
|
192
|
+
return this.logWarning(`ID 为 ${r} 的点位视频不存在`);
|
|
193
|
+
t.dispose(), this.controllerMap.delete(r);
|
|
164
194
|
}
|
|
165
195
|
/** 清空现有数据 */
|
|
166
196
|
clear() {
|
|
167
197
|
if (this.disposed)
|
|
168
198
|
return this.logWarning("插件已被销毁");
|
|
169
|
-
Array.from(this.controllerMap.values()).forEach((
|
|
199
|
+
Array.from(this.controllerMap.values()).forEach((r) => r.dispose()), this.controllerMap.clear();
|
|
170
200
|
}
|
|
171
201
|
/** 销毁插件 */
|
|
172
202
|
dispose() {
|
|
173
203
|
if (this.disposed)
|
|
174
204
|
return this.logWarning("插件已被销毁");
|
|
175
|
-
this._disposed = !0, Array.from(this.controllerMap.values()).forEach((
|
|
205
|
+
this._disposed = !0, Array.from(this.controllerMap.values()).forEach((r) => r.dispose()), this.controllerMap.clear();
|
|
176
206
|
}
|
|
177
207
|
/** 控制台打印警告 */
|
|
178
208
|
// TODO: 全局函数 curry 化
|
|
179
|
-
logWarning(
|
|
180
|
-
console.warn("⛔ ==> [PanoVideoPluginController]:",
|
|
209
|
+
logWarning(r) {
|
|
210
|
+
console.warn("⛔ ==> [PanoVideoPluginController]:", r);
|
|
181
211
|
}
|
|
182
212
|
}
|
|
183
213
|
export {
|
|
184
|
-
|
|
214
|
+
Er as PanoVideoPluginController
|
|
185
215
|
};
|
|
@@ -3,8 +3,9 @@ var I = (v, e, i) => e in v ? g(v, e, { enumerable: !0, configurable: !0, writab
|
|
|
3
3
|
var t = (v, e, i) => (I(v, typeof e != "symbol" ? e + "" : e, i), i);
|
|
4
4
|
import { vertexShader as M, fragmentShader as P } from "./utils/shader.js";
|
|
5
5
|
import "../shared-utils/tag.js";
|
|
6
|
-
import { VideoTexture as F, LinearFilter as
|
|
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";
|
|
7
7
|
import "hammerjs";
|
|
8
|
+
import "../shared-utils/three/PointSelector/index.js";
|
|
8
9
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
9
10
|
import "@realsee/five/line";
|
|
10
11
|
import "../vendor/three/examples/jsm/lines/LineGeometry.js";
|
|
@@ -22,10 +23,39 @@ import "../shared-utils/Utils/WorkUtil.js";
|
|
|
22
23
|
import "../shared-utils/five/transformPosition.js";
|
|
23
24
|
import "../shared-utils/three/temp.js";
|
|
24
25
|
import "../shared-utils/dom/resizeObserver.js";
|
|
26
|
+
import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
27
|
+
import "../shared-utils/three/Magnifier.js";
|
|
28
|
+
import "../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
29
|
+
import "../shared-utils/three/Assets/index.js";
|
|
30
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
31
|
+
import "../CSS3DRenderPlugin/utils/even.js";
|
|
32
|
+
import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
33
|
+
import "../shared-utils/three/centerPoint.js";
|
|
34
|
+
import "../shared-utils/three/getObjectVisible.js";
|
|
35
|
+
import "../shared-utils/isNil.js";
|
|
36
|
+
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
37
|
+
import "../shared-utils/three/PointSelector/utils/html.js";
|
|
38
|
+
import "../shared-utils/five/initialCSS3DRender.js";
|
|
39
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
40
|
+
import "../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
|
|
41
|
+
import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
42
|
+
import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
43
|
+
import "../Sculpt/Meshes/Line.js";
|
|
44
|
+
import "../Sculpt/typings/style.js";
|
|
45
|
+
import "../shared-utils/five/FiveLine.js";
|
|
46
|
+
import "../shared-utils/three/IObject3D.js";
|
|
47
|
+
import "../Sculpt/utils/removeAllTag.js";
|
|
48
|
+
import "../Sculpt/utils/Meshes/getLengthHTML.js";
|
|
49
|
+
import "../shared-utils/three/applyObjectMatrixWorld.js";
|
|
50
|
+
import "../shared-utils/util.js";
|
|
51
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
52
|
+
import "../shared-utils/isTouchDevice.js";
|
|
53
|
+
import "../shared-utils/five/getPosition.js";
|
|
54
|
+
import "../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
55
|
+
import "../shared-utils/three/PointSelector/utils/contents.js";
|
|
25
56
|
import "../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
|
|
26
57
|
import "../vendor/three/build/three.module.js";
|
|
27
|
-
|
|
28
|
-
class ie {
|
|
58
|
+
class we {
|
|
29
59
|
/** 初始化视频、模型以及相关事件监听。 */
|
|
30
60
|
constructor(e, i) {
|
|
31
61
|
t(this, "video");
|
|
@@ -64,18 +94,18 @@ class ie {
|
|
|
64
94
|
});
|
|
65
95
|
/** 把 uv 值转换成位置 */
|
|
66
96
|
t(this, "uv2Position", (e, i) => {
|
|
67
|
-
var
|
|
68
|
-
const
|
|
69
|
-
-1 * Math.cos(a * d) * Math.sin(
|
|
70
|
-
1 * Math.cos(
|
|
71
|
-
1 * Math.sin(a * d) * Math.sin(
|
|
97
|
+
var f;
|
|
98
|
+
const o = Math.PI, a = Math.PI * 2, d = e, s = 1 - i, r = new p(
|
|
99
|
+
-1 * Math.cos(a * d) * Math.sin(o * s),
|
|
100
|
+
1 * Math.cos(o * s),
|
|
101
|
+
1 * Math.sin(a * d) * Math.sin(o * s)
|
|
72
102
|
);
|
|
73
103
|
r.setX(-r.x);
|
|
74
|
-
const h = (
|
|
104
|
+
const h = (f = this.five.work) == null ? void 0 : f.observers[this.panoIndex];
|
|
75
105
|
if (!h)
|
|
76
106
|
return this.logWarning(`点位 ${this.panoIndex} 不存在,请检查 Five 数据是否正常。`);
|
|
77
|
-
const
|
|
78
|
-
return u.applyAxisAngle(new
|
|
107
|
+
const l = h.position.clone(), m = h.quaternion.clone(), u = r.clone();
|
|
108
|
+
return u.applyAxisAngle(new p(0, 1, 0), Math.PI / 2), u.applyQuaternion(m), u.add(l), u;
|
|
79
109
|
});
|
|
80
110
|
/** Five 数据加载后需要根据点位位姿调整点位模型位置 */
|
|
81
111
|
t(this, "onFiveDataLoaded", () => {
|
|
@@ -84,8 +114,8 @@ class ie {
|
|
|
84
114
|
if (!e)
|
|
85
115
|
return this.logWarning(`点位 ${this.panoIndex} 不存在,请检查 Five 数据是否正常。`);
|
|
86
116
|
this.observer = e;
|
|
87
|
-
const { x: i, y:
|
|
88
|
-
this.videoMesh.position.fromArray([s.x, s.y, s.z]), this.videoMesh.quaternion.set(0, 0, 0, 1), this.videoMesh.rotateOnAxis(new
|
|
117
|
+
const { x: i, y: n, z: o, w: a } = e.quaternion, d = new b(i, n, o, a), s = e.position;
|
|
118
|
+
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);
|
|
89
119
|
});
|
|
90
120
|
/** 兼容视频播放 */
|
|
91
121
|
t(this, "onFiveWantsMoveToPano", (e) => {
|
|
@@ -124,14 +154,14 @@ class ie {
|
|
|
124
154
|
if (!i)
|
|
125
155
|
return;
|
|
126
156
|
if (this.checkIntersectionInBounding(this.origin, i)) {
|
|
127
|
-
const
|
|
157
|
+
const o = {
|
|
128
158
|
target: this,
|
|
129
159
|
_preventDefaultReturn: !1,
|
|
130
160
|
preventDefault: () => {
|
|
131
|
-
|
|
161
|
+
o._preventDefaultReturn = !0;
|
|
132
162
|
}
|
|
133
163
|
};
|
|
134
|
-
return this.hooks.emit("click",
|
|
164
|
+
return this.hooks.emit("click", o), o._preventDefaultReturn === !1 && (this.video.muted = !this.video.muted), !1;
|
|
135
165
|
}
|
|
136
166
|
});
|
|
137
167
|
/** video canplaythrough 事件触发 */
|
|
@@ -187,15 +217,15 @@ class ie {
|
|
|
187
217
|
});
|
|
188
218
|
var r, h;
|
|
189
219
|
this.five = e, this.panoIndex = i.panoIndex, this._id = i.renderID, this.url = i.url, this.origin = i.origin.slice(), this.hooks = i.hooks, this._enabled = (h = (r = i.initialState) == null ? void 0 : r.enabled) != null ? h : !0;
|
|
190
|
-
const
|
|
191
|
-
|
|
192
|
-
const
|
|
193
|
-
|
|
220
|
+
const n = document.createElement("video");
|
|
221
|
+
n.crossOrigin = "anonymous", n.autoplay = !1, n.muted = !0, n.loop = !0, n.playsInline = !0, this.video = n;
|
|
222
|
+
const o = new F(this.video);
|
|
223
|
+
o.minFilter = c, o.magFilter = c;
|
|
194
224
|
const a = new y({
|
|
195
225
|
vertexShader: M,
|
|
196
226
|
fragmentShader: P,
|
|
197
227
|
uniforms: {
|
|
198
|
-
map: { value:
|
|
228
|
+
map: { value: o },
|
|
199
229
|
size: {
|
|
200
230
|
value: new x(this.origin[0], 1 - this.origin[1] - this.origin[3], this.origin[2], this.origin[3])
|
|
201
231
|
},
|
|
@@ -243,8 +273,8 @@ class ie {
|
|
|
243
273
|
const i = this.uv2Position(e[0], e[1]);
|
|
244
274
|
if (!i)
|
|
245
275
|
return;
|
|
246
|
-
const
|
|
247
|
-
this.five.setState({ panoIndex: this.panoIndex, longitude:
|
|
276
|
+
const n = new p().subVectors(i, this.observer.position).normalize(), { longitude: o, latitude: a } = E(n);
|
|
277
|
+
this.five.setState({ panoIndex: this.panoIndex, longitude: o, latitude: a }), this.onFiveWantsMoveToPano(this.panoIndex);
|
|
248
278
|
}
|
|
249
279
|
/** 获取视频中心点的 uv */
|
|
250
280
|
getUVCenter() {
|
|
@@ -296,10 +326,10 @@ class ie {
|
|
|
296
326
|
checkIntersectionInBounding(e, i) {
|
|
297
327
|
if (!i.uv)
|
|
298
328
|
return !1;
|
|
299
|
-
const [
|
|
300
|
-
return
|
|
329
|
+
const [n, o] = i.uv.toArray(), [a, d, s, r] = e, h = 1 - d - r, l = a + s, m = h + r;
|
|
330
|
+
return n >= a && n <= l && o >= h && o <= m;
|
|
301
331
|
}
|
|
302
332
|
}
|
|
303
333
|
export {
|
|
304
|
-
|
|
334
|
+
we as VideoMeshController
|
|
305
335
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PanoVideoPluginController as r } from "./Controller.js";
|
|
2
|
-
import { typings as
|
|
2
|
+
import { typings as lo } from "./typings/index.js";
|
|
3
3
|
import "./VideoMeshController.js";
|
|
4
4
|
import "./utils/shader.js";
|
|
5
5
|
import "../shared-utils/tag.js";
|
|
@@ -15,21 +15,51 @@ import "../shared-utils/five/transformPosition.js";
|
|
|
15
15
|
import "../shared-utils/three/temp.js";
|
|
16
16
|
import "../shared-utils/dom/resizeObserver.js";
|
|
17
17
|
import "hammerjs";
|
|
18
|
+
import "../shared-utils/three/PointSelector/index.js";
|
|
19
|
+
import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
20
|
+
import "../shared-utils/three/Magnifier.js";
|
|
21
|
+
import "../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
22
|
+
import "../shared-utils/three/Assets/index.js";
|
|
23
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
|
|
18
24
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
25
|
+
import "../CSS3DRenderPlugin/utils/even.js";
|
|
26
|
+
import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
27
|
+
import "../shared-utils/three/centerPoint.js";
|
|
28
|
+
import "../shared-utils/three/getObjectVisible.js";
|
|
19
29
|
import "@realsee/five/line";
|
|
20
30
|
import "../vendor/three/examples/jsm/lines/LineGeometry.js";
|
|
21
31
|
import "../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
|
|
22
32
|
import "../vendor/three/build/three.module.js";
|
|
23
33
|
import "../shared-utils/three/core/Sphere.js";
|
|
24
34
|
import "animejs";
|
|
25
|
-
import "../shared-utils/
|
|
35
|
+
import "../shared-utils/isNil.js";
|
|
26
36
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
37
|
+
import "../shared-utils/three/PointSelector/utils/html.js";
|
|
38
|
+
import "../shared-utils/five/initialCSS3DRender.js";
|
|
39
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
40
|
+
import "../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
|
|
41
|
+
import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
42
|
+
import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
43
|
+
import "../Sculpt/Meshes/Line.js";
|
|
44
|
+
import "../Sculpt/typings/style.js";
|
|
45
|
+
import "../shared-utils/five/FiveLine.js";
|
|
46
|
+
import "../shared-utils/three/IObject3D.js";
|
|
47
|
+
import "../Sculpt/utils/removeAllTag.js";
|
|
48
|
+
import "../Sculpt/utils/Meshes/getLengthHTML.js";
|
|
49
|
+
import "../shared-utils/three/applyObjectMatrixWorld.js";
|
|
50
|
+
import "../shared-utils/util.js";
|
|
51
|
+
import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
52
|
+
import "../shared-utils/isTouchDevice.js";
|
|
53
|
+
import "../shared-utils/five/getPosition.js";
|
|
54
|
+
import "../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
55
|
+
import "../shared-utils/three/PointSelector/utils/contents.js";
|
|
56
|
+
import "../shared-utils/animationFrame/index.js";
|
|
27
57
|
import "./utils/index.js";
|
|
28
58
|
import "../base/BasePlugin.js";
|
|
29
59
|
import "../shared-utils/url/absoluteUrl.js";
|
|
30
|
-
const
|
|
60
|
+
const no = (o) => new r(o);
|
|
31
61
|
export {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
62
|
+
no as PanoVideoPlugin,
|
|
63
|
+
lo as PanoVideoPluginType,
|
|
64
|
+
no as default
|
|
35
65
|
};
|