@realsee/vreo 1.0.0-alpha.9 → 1.1.0-dev.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/CHANGELOG.md +9 -1
- package/README.md +46 -36
- package/lib/PlayController/index.js +1 -1
- package/lib/Player/App.js +12 -5
- package/lib/Player/Controller.d.ts +3 -2
- package/lib/Player/Controller.js +31 -14
- package/lib/Player/index.js +31 -16
- package/lib/Player/modules/VideoAgent/VideoAgentMesh.d.ts +2 -2
- package/lib/Player/modules/VideoAgent/VideoAgentMesh.js +7 -12
- package/lib/Player/modules/VideoAgent/index.js +1 -1
- package/lib/Player/modules/Wave/index.d.ts +1 -0
- package/lib/Player/modules/Wave/index.js +161 -25
- package/lib/Player/modules/keyframes/BgMusic/index.js +48 -40
- package/lib/Player/modules/keyframes/PanoTag/index.js +1 -0
- package/lib/Player/typings.d.ts +2 -0
- package/lib/fivePlugins/CameraMovementPlugin/index.js +3 -2
- package/lib/shared-utils/Audio.d.ts +14 -0
- package/lib/shared-utils/Audio.js +158 -0
- package/lib/shared-utils/{AduioLike.d.ts → AudioLike.d.ts} +0 -0
- package/lib/shared-utils/{AduioLike.js → AudioLike.js} +4 -6
- package/lib/shared-utils/animationFrame/tween.d.ts +3 -58
- package/lib/shared-utils/animationFrame/tween.js +3 -9
- package/lib/typings/VreoUnit.d.ts +8 -5
- package/package.json +8 -6
- package/stylesheets/default.css +7 -2
- package/docs/.nojekyll +0 -1
- package/docs/assets/custom.css +0 -78
- package/docs/assets/highlight.css +0 -127
- package/docs/assets/icons.css +0 -1043
- package/docs/assets/icons.png +0 -0
- package/docs/assets/icons@2x.png +0 -0
- package/docs/assets/main.js +0 -52
- package/docs/assets/search.js +0 -1
- package/docs/assets/style.css +0 -1414
- package/docs/assets/widgets.png +0 -0
- package/docs/assets/widgets@2x.png +0 -0
- package/docs/classes/Player.AudioLike.html +0 -52
- package/docs/classes/Player.Controller.html +0 -54
- package/docs/classes/Player.Player-1.html +0 -50
- package/docs/classes/Player.VideoAgentMesh.html +0 -142
- package/docs/classes/Player.VideoAgentScene.html +0 -1
- package/docs/demo/assets/AppReact.6ca5d1d2.js +0 -1
- package/docs/demo/assets/default.5a762ce2.js +0 -3988
- package/docs/demo/assets/default.bc4c715d.css +0 -1
- package/docs/demo/assets/dynamic.efc5200d.js +0 -1
- package/docs/demo/assets/examples.80a27156.js +0 -25
- package/docs/demo/assets/examples.dac4a6fe.css +0 -1
- package/docs/demo/assets/index.9331038f.css +0 -1
- package/docs/demo/assets/index.ca7c5881.js +0 -1
- package/docs/demo/assets/main.c164d1d2.js +0 -1
- package/docs/demo/assets/react.2ee8565f.css +0 -1
- package/docs/demo/assets/react.a4774aef.js +0 -25
- package/docs/demo/assets/znRoyv06SZQeqA7m.0057e8ae.js +0 -1
- package/docs/demo/examples.html +0 -17
- package/docs/demo/index-react-dynamic.html +0 -20
- package/docs/demo/index-react.html +0 -20
- package/docs/demo/index.html +0 -19
- package/docs/enums/Player.InfoPanelStyleEnum.html +0 -1
- package/docs/enums/Player.InfoPanelTypeEnum.html +0 -3
- package/docs/enums/Player.PanoEffectEnum.html +0 -5
- package/docs/enums/Player.PanoTagEnum.html +0 -3
- package/docs/enums/Player.PanoTagStyleEnum.html +0 -7
- package/docs/enums/Player.VreoKeyframeEnum.html +0 -25
- package/docs/enums/fivePlugins.CameraMovementEffect.html +0 -1
- package/docs/enums/fivePlugins.Rotation.html +0 -1
- package/docs/index.html +0 -245
- package/docs/interfaces/Player.CustomVreoKeyframeProps.html +0 -1
- package/docs/interfaces/Player.PlayerConfigs.html +0 -7
- package/docs/interfaces/Player.Vertex.html +0 -3
- package/docs/interfaces/Player.VideoAgentMeshOptions.html +0 -8
- package/docs/interfaces/Player.VreoKeyframe.html +0 -3
- package/docs/interfaces/Player.VreoUnit.html +0 -3
- package/docs/interfaces/Player.VreoVideo.html +0 -3
- package/docs/interfaces/fivePlugins.CSS3DRenderPluginExportType.html +0 -4
- package/docs/interfaces/fivePlugins.CameraMovementOptsCallback.html +0 -1
- package/docs/interfaces/fivePlugins.CameraMovementPluginExportType.html +0 -7
- package/docs/interfaces/fivePlugins.CameraMovementPluginParameterType.html +0 -1
- package/docs/interfaces/fivePlugins.ModelTVVideoPluginData.html +0 -1
- package/docs/interfaces/fivePlugins.ModelTVVideoPluginExportType.html +0 -1
- package/docs/interfaces/fivePlugins.ModelTVVideoPluginParameterType.html +0 -1
- package/docs/interfaces/fivePlugins.Vector3Position.html +0 -3
- package/docs/interfaces/react.VreoActionCallbacks.html +0 -23
- package/docs/interfaces/react.VreoProviderProps.html +0 -1
- package/docs/modules/Player.html +0 -37
- package/docs/modules/custom.html +0 -3
- package/docs/modules/fivePlugins.html +0 -6
- package/docs/modules/react.html +0 -1
- package/docs/modules.html +0 -1
- package/resources/PlayController/createHTMLAudioElement.ts +0 -53
- package/resources/PlayController/index.ts +0 -154
- package/resources/Player/App.tsx +0 -66
- package/resources/Player/Controller.ts +0 -294
- package/resources/Player/custom/SpatialScenePanel/index.tsx +0 -264
- package/resources/Player/hooks.ts +0 -26
- package/resources/Player/index.tsx +0 -227
- package/resources/Player/modules/Drawer/index.tsx +0 -40
- package/resources/Player/modules/PopUp/index.tsx +0 -26
- package/resources/Player/modules/ResizeObserver/index.tsx +0 -23
- package/resources/Player/modules/VideoAgent/VideoAgentMesh.ts +0 -302
- package/resources/Player/modules/VideoAgent/VideoAgentScene.ts +0 -56
- package/resources/Player/modules/VideoAgent/index.tsx +0 -53
- package/resources/Player/modules/Wave/index.tsx +0 -18
- package/resources/Player/modules/keyframes/BgMusic/index.tsx +0 -66
- package/resources/Player/modules/keyframes/CameraMovement/index.tsx +0 -37
- package/resources/Player/modules/keyframes/InfoPanel/index.tsx +0 -165
- package/resources/Player/modules/keyframes/ModelVideo/index.tsx +0 -77
- package/resources/Player/modules/keyframes/PanoEffect/index.tsx +0 -99
- package/resources/Player/modules/keyframes/PanoEffect/lineAnime.ts +0 -31
- package/resources/Player/modules/keyframes/PanoTag/index.tsx +0 -82
- package/resources/Player/modules/keyframes/PanoTextLabel/index.tsx +0 -117
- package/resources/Player/modules/keyframes/Prompter/index.tsx +0 -56
- package/resources/Player/modules/keyframes/UpdateVRPanorama/index.tsx +0 -99
- package/resources/Player/modules/keyframes/VideoEffect/index.tsx +0 -115
- package/resources/Player/typings.ts +0 -49
- package/resources/fivePlugins/CSS3DRenderPlugin/centerPoint.ts +0 -5
- package/resources/fivePlugins/CSS3DRenderPlugin/createResizeObserver.ts +0 -17
- package/resources/fivePlugins/CSS3DRenderPlugin/evenNumber.ts +0 -4
- package/resources/fivePlugins/CSS3DRenderPlugin/index.ts +0 -254
- package/resources/fivePlugins/CSS3DRenderPlugin/transformPositionToVector3.ts +0 -5
- package/resources/fivePlugins/CameraMovementPlugin/index.ts +0 -226
- package/resources/fivePlugins/CameraMovementPlugin/typings.ts +0 -59
- package/resources/fivePlugins/ModelTVVideoPlugin/index.ts +0 -278
- package/resources/index.ts +0 -1
- package/resources/react/index.tsx +0 -121
- package/resources/shared-utils/AduioLike.ts +0 -109
- package/resources/shared-utils/Preloader.ts +0 -35
- package/resources/shared-utils/addResizeListener.ts +0 -46
- package/resources/shared-utils/animationFrame/BetterTween.ts +0 -33
- package/resources/shared-utils/animationFrame/index.ts +0 -48
- package/resources/shared-utils/animationFrame/tween.ts +0 -51
- package/resources/shared-utils/createTransMatrix.ts +0 -12
- package/resources/shared-utils/getFileExpandedName.ts +0 -6
- package/resources/shared-utils/getMediaInfo.ts +0 -52
- package/resources/shared-utils/setElementDataset.ts +0 -18
- package/resources/typings/VreoUnit.ts +0 -314
|
@@ -1,314 +0,0 @@
|
|
|
1
|
-
import { Mode, Pose } from '@realsee/five'
|
|
2
|
-
import { CameraMovementEffect, Rotation } from '../fivePlugins/CameraMovementPlugin/typings'
|
|
3
|
-
|
|
4
|
-
export enum VreoKeyframeEnum {
|
|
5
|
-
/** 运镜 */
|
|
6
|
-
CameraMovement = 'CameraMovement',
|
|
7
|
-
/**
|
|
8
|
-
* 全景标签
|
|
9
|
-
*/
|
|
10
|
-
PanoTag = 'PanoTag',
|
|
11
|
-
/**
|
|
12
|
-
* 全景文本标签
|
|
13
|
-
*/
|
|
14
|
-
PanoTextLabel = 'PanoTextLabel',
|
|
15
|
-
/**
|
|
16
|
-
* 提词器
|
|
17
|
-
*/
|
|
18
|
-
Prompter = 'Prompter',
|
|
19
|
-
/**
|
|
20
|
-
* 更新 VR 全景
|
|
21
|
-
*/
|
|
22
|
-
UpdateVRPanorama = 'UpdateVRPanorama',
|
|
23
|
-
/**
|
|
24
|
-
* 视频广告
|
|
25
|
-
*/
|
|
26
|
-
ModelVideo = 'ModelVideo',
|
|
27
|
-
/**
|
|
28
|
-
* 全景特效
|
|
29
|
-
*/
|
|
30
|
-
PanoEffect = 'PanoEffect',
|
|
31
|
-
/**
|
|
32
|
-
* 信息面板
|
|
33
|
-
*/
|
|
34
|
-
InfoPanel = 'InfoPanel',
|
|
35
|
-
/**
|
|
36
|
-
* 视频特效
|
|
37
|
-
*/
|
|
38
|
-
VideoEffect = 'VideoEffect',
|
|
39
|
-
/**
|
|
40
|
-
* 背景音乐
|
|
41
|
-
*/
|
|
42
|
-
BgMusic = 'BgMusic',
|
|
43
|
-
/**
|
|
44
|
-
* 结束
|
|
45
|
-
*/
|
|
46
|
-
Exit = 'Exit',
|
|
47
|
-
/**
|
|
48
|
-
* 自定义剧本帧
|
|
49
|
-
*/
|
|
50
|
-
Custom = 'Custom',
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* 支持自定义剧本关键帧配置项
|
|
55
|
-
*/
|
|
56
|
-
export type VreoKeyframeConfigMap = {
|
|
57
|
-
PanoTag?: false
|
|
58
|
-
PanoTextLabel?: false
|
|
59
|
-
Prompter?: false
|
|
60
|
-
InfoPanel?: false
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* 剧本关键帧
|
|
66
|
-
*/
|
|
67
|
-
export interface VreoKeyframe {
|
|
68
|
-
uuid?: string
|
|
69
|
-
type: VreoKeyframeEnum
|
|
70
|
-
start: number
|
|
71
|
-
end: number
|
|
72
|
-
parsed?: boolean
|
|
73
|
-
data: Record<string, any>
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* 虚拟视频角色
|
|
78
|
-
*/
|
|
79
|
-
export interface VreoVideo {
|
|
80
|
-
duration: number
|
|
81
|
-
start: number
|
|
82
|
-
end: number
|
|
83
|
-
url: string
|
|
84
|
-
avatar?: {
|
|
85
|
-
url?: string
|
|
86
|
-
force?: true
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* 剧本结构
|
|
92
|
-
*/
|
|
93
|
-
export interface VreoUnit {
|
|
94
|
-
categoryId: string
|
|
95
|
-
categoryText: string
|
|
96
|
-
frontRequestId: string
|
|
97
|
-
index: string | number
|
|
98
|
-
keyframes: VreoKeyframe[]
|
|
99
|
-
video: VreoVideo
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* 剧本事件
|
|
106
|
-
*/
|
|
107
|
-
export type VreoKeyframeEvent = { [key in VreoKeyframeEnum]: (keyframe: VreoKeyframe) => void } & {
|
|
108
|
-
// 新数据载入完成
|
|
109
|
-
loaded: (vreoUnit: VreoUnit) => void
|
|
110
|
-
// 语音状态 播放 -> 暂停
|
|
111
|
-
paused: (ended?: boolean) => void
|
|
112
|
-
// 语音状态 暂停 -> 播放
|
|
113
|
-
playing: () => void
|
|
114
|
-
// 未知的 剧本帧类型
|
|
115
|
-
unknownKeyframeType: (keyframe: Record<string, any>) => void
|
|
116
|
-
// 一次播放完成(试用,只抛事件不做任何额外的逻辑处理)
|
|
117
|
-
ended: () => void
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* 相机运动
|
|
122
|
-
*/
|
|
123
|
-
export type CameraMovementData = {
|
|
124
|
-
effect?: CameraMovementEffect
|
|
125
|
-
transEffect?: "fly" | "fade" | "instant"
|
|
126
|
-
mode: Mode
|
|
127
|
-
panoIndex: number
|
|
128
|
-
loop?: boolean
|
|
129
|
-
rotateSpeed?: number
|
|
130
|
-
rotation?: Rotation
|
|
131
|
-
} & Partial<Pose>
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* 提词器
|
|
135
|
-
*/
|
|
136
|
-
export type PrompterData = {
|
|
137
|
-
text: string
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* VR 全景切换
|
|
142
|
-
*/
|
|
143
|
-
export type UpdateVRPanoramaData = {
|
|
144
|
-
_signature: string
|
|
145
|
-
allow_hosts: string[]
|
|
146
|
-
certificate: string
|
|
147
|
-
expire_at: string
|
|
148
|
-
// 动态场景
|
|
149
|
-
dynamic_scene?: {
|
|
150
|
-
images: {
|
|
151
|
-
index: number
|
|
152
|
-
right: string
|
|
153
|
-
left: string
|
|
154
|
-
up: string
|
|
155
|
-
down: string
|
|
156
|
-
front: string
|
|
157
|
-
back: string
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
[key: string]: any
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* 顶点
|
|
165
|
-
*/
|
|
166
|
-
export interface Vertex {
|
|
167
|
-
x: number
|
|
168
|
-
y: number
|
|
169
|
-
z: number
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* 矩形顶点
|
|
174
|
-
*/
|
|
175
|
-
export type QuadrangleVertexs = [Vertex, Vertex, Vertex, Vertex]
|
|
176
|
-
/**
|
|
177
|
-
* 顶点数组
|
|
178
|
-
*/
|
|
179
|
-
export type Vertexs = Vertex[]
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* 视频广告
|
|
183
|
-
*/
|
|
184
|
-
export type ModelVideoData = {
|
|
185
|
-
/**
|
|
186
|
-
* 视频素材
|
|
187
|
-
*/
|
|
188
|
-
videoSrc: string
|
|
189
|
-
/**
|
|
190
|
-
* 视频封面
|
|
191
|
-
*/
|
|
192
|
-
videoPosterSrc: string
|
|
193
|
-
/**
|
|
194
|
-
* 视频映射在模型中的顶点
|
|
195
|
-
*/
|
|
196
|
-
vertexs: QuadrangleVertexs | Vertexs
|
|
197
|
-
matrixWorld?: number[]
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* 四元数
|
|
202
|
-
*/
|
|
203
|
-
export type Quaternion = {
|
|
204
|
-
x: number,
|
|
205
|
-
y: number,
|
|
206
|
-
z: number,
|
|
207
|
-
w: number
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* 全景文本标签
|
|
212
|
-
*/
|
|
213
|
-
export type PanoTextLabelData = {
|
|
214
|
-
text: string
|
|
215
|
-
vertex: Vertex
|
|
216
|
-
normal?: Vertex
|
|
217
|
-
quaternion?: Quaternion
|
|
218
|
-
fontSize?: number
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* 全景标签枚举
|
|
223
|
-
*/
|
|
224
|
-
export enum PanoTagEnum {
|
|
225
|
-
Text = 'Text',
|
|
226
|
-
Image = 'Image',
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* 标签样式种类
|
|
231
|
-
*/
|
|
232
|
-
export enum PanoTagStyleEnum {
|
|
233
|
-
/**
|
|
234
|
-
* 生长动画:默认值
|
|
235
|
-
*/
|
|
236
|
-
Growth = 'Growth',
|
|
237
|
-
/**
|
|
238
|
-
* 展开动画
|
|
239
|
-
*/
|
|
240
|
-
Expand = 'Expand',
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
export type PanoTagData = {
|
|
244
|
-
type: PanoTagEnum
|
|
245
|
-
style: PanoTagStyleEnum
|
|
246
|
-
text: string
|
|
247
|
-
vertex: Vertex
|
|
248
|
-
imgUrl?: string
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
/**
|
|
252
|
-
* 全景特效枚举
|
|
253
|
-
*/
|
|
254
|
-
export enum PanoEffectEnum {
|
|
255
|
-
/**
|
|
256
|
-
* 两点距离
|
|
257
|
-
*/
|
|
258
|
-
Distance = 'Distance',
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* 全景特效
|
|
263
|
-
*/
|
|
264
|
-
export type PanoEffectData = {
|
|
265
|
-
effect: PanoEffectEnum
|
|
266
|
-
twoVertexs: [Vertex, Vertex]
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
/**
|
|
270
|
-
* 信息面板类型枚举
|
|
271
|
-
*/
|
|
272
|
-
export enum InfoPanelTypeEnum {
|
|
273
|
-
Image = 'Image',
|
|
274
|
-
Video = 'Video',
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
export enum InfoPanelStyleEnum {
|
|
278
|
-
Drawer = 'Drawer',
|
|
279
|
-
PopUp = 'PopUp',
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* 信息面板
|
|
284
|
-
*/
|
|
285
|
-
export type InfoPanelData = {
|
|
286
|
-
type: InfoPanelTypeEnum
|
|
287
|
-
style?: InfoPanelStyleEnum
|
|
288
|
-
url: string
|
|
289
|
-
// 标题
|
|
290
|
-
title?: string
|
|
291
|
-
// 副标题
|
|
292
|
-
subTitle?: string
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* 视频特效
|
|
297
|
-
*/
|
|
298
|
-
export type VideoEffectData = {
|
|
299
|
-
videoSrc: string
|
|
300
|
-
panoIndex: number
|
|
301
|
-
fov: number
|
|
302
|
-
direction?: Vertex
|
|
303
|
-
vector?: Pick<Pose, 'longitude' | 'latitude'>
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
/**
|
|
307
|
-
* 背景音乐
|
|
308
|
-
*/
|
|
309
|
-
export type BgMusicData = {
|
|
310
|
-
url: string
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
/** 自定义序列帧 */
|
|
314
|
-
export type CustomData = Record<string, any>
|