@realsee/vreo 1.0.0-alpha.2 → 1.0.0-alpha.21

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.
Files changed (127) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/README.md +46 -36
  3. package/lib/PlayController/index.js +1 -1
  4. package/lib/Player/Controller.d.ts +4 -4
  5. package/lib/Player/Controller.js +30 -17
  6. package/lib/Player/index.js +4 -1
  7. package/lib/Player/modules/VideoAgent/VideoAgentMesh.d.ts +2 -2
  8. package/lib/Player/modules/VideoAgent/VideoAgentMesh.js +3 -3
  9. package/lib/Player/modules/VideoAgent/index.js +1 -1
  10. package/lib/Player/modules/Wave/index.js +174 -25
  11. package/lib/Player/modules/keyframes/BgMusic/index.js +54 -35
  12. package/lib/Player/modules/keyframes/PanoTag/index.js +3 -3
  13. package/lib/shared-utils/{AduioLike.d.ts → AudioLike.d.ts} +0 -0
  14. package/lib/shared-utils/{AduioLike.js → AudioLike.js} +4 -6
  15. package/lib/typings/VreoUnit.d.ts +6 -6
  16. package/package.json +2 -4
  17. package/stylesheets/default.css +11 -4
  18. package/docs/.nojekyll +0 -1
  19. package/docs/assets/custom.css +0 -78
  20. package/docs/assets/highlight.css +0 -127
  21. package/docs/assets/icons.css +0 -1043
  22. package/docs/assets/icons.png +0 -0
  23. package/docs/assets/icons@2x.png +0 -0
  24. package/docs/assets/main.js +0 -52
  25. package/docs/assets/search.js +0 -1
  26. package/docs/assets/style.css +0 -1414
  27. package/docs/assets/widgets.png +0 -0
  28. package/docs/assets/widgets@2x.png +0 -0
  29. package/docs/classes/Player.AudioLike.html +0 -52
  30. package/docs/classes/Player.Controller.html +0 -54
  31. package/docs/classes/Player.Player-1.html +0 -50
  32. package/docs/classes/Player.VideoAgentMesh.html +0 -142
  33. package/docs/classes/Player.VideoAgentScene.html +0 -1
  34. package/docs/demo/assets/AppReact.d0ee843a.js +0 -1
  35. package/docs/demo/assets/default.63925584.js +0 -3984
  36. package/docs/demo/assets/default.f3f3ca8c.css +0 -1
  37. package/docs/demo/assets/dynamic.76506c2c.js +0 -1
  38. package/docs/demo/assets/examples.3d8323db.js +0 -25
  39. package/docs/demo/assets/examples.dac4a6fe.css +0 -1
  40. package/docs/demo/assets/index.7e31122c.js +0 -1
  41. package/docs/demo/assets/index.9331038f.css +0 -1
  42. package/docs/demo/assets/main.79b11b9d.js +0 -1
  43. package/docs/demo/assets/react.2ee8565f.css +0 -1
  44. package/docs/demo/assets/react.c1c07c14.js +0 -25
  45. package/docs/demo/assets/znRoyv06SZQeqA7m.0057e8ae.js +0 -1
  46. package/docs/demo/examples.html +0 -17
  47. package/docs/demo/index-react-dynamic.html +0 -20
  48. package/docs/demo/index-react.html +0 -20
  49. package/docs/demo/index.html +0 -19
  50. package/docs/enums/Player.InfoPanelStyleEnum.html +0 -1
  51. package/docs/enums/Player.InfoPanelTypeEnum.html +0 -3
  52. package/docs/enums/Player.PanoEffectEnum.html +0 -5
  53. package/docs/enums/Player.PanoTagEnum.html +0 -3
  54. package/docs/enums/Player.PanoTagStyleEnum.html +0 -7
  55. package/docs/enums/Player.VreoKeyframeEnum.html +0 -25
  56. package/docs/enums/fivePlugins.CameraMovementEffect.html +0 -1
  57. package/docs/enums/fivePlugins.Rotation.html +0 -1
  58. package/docs/index.html +0 -245
  59. package/docs/interfaces/Player.CustomVreoKeyframeProps.html +0 -1
  60. package/docs/interfaces/Player.PlayerConfigs.html +0 -7
  61. package/docs/interfaces/Player.Vertex.html +0 -3
  62. package/docs/interfaces/Player.VideoAgentMeshOptions.html +0 -8
  63. package/docs/interfaces/Player.VreoKeyframe.html +0 -3
  64. package/docs/interfaces/Player.VreoUnit.html +0 -3
  65. package/docs/interfaces/Player.VreoVideo.html +0 -3
  66. package/docs/interfaces/fivePlugins.CSS3DRenderPluginExportType.html +0 -4
  67. package/docs/interfaces/fivePlugins.CameraMovementOptsCallback.html +0 -1
  68. package/docs/interfaces/fivePlugins.CameraMovementPluginExportType.html +0 -7
  69. package/docs/interfaces/fivePlugins.CameraMovementPluginParameterType.html +0 -1
  70. package/docs/interfaces/fivePlugins.ModelTVVideoPluginData.html +0 -1
  71. package/docs/interfaces/fivePlugins.ModelTVVideoPluginExportType.html +0 -1
  72. package/docs/interfaces/fivePlugins.ModelTVVideoPluginParameterType.html +0 -1
  73. package/docs/interfaces/fivePlugins.Vector3Position.html +0 -3
  74. package/docs/interfaces/react.VreoActionCallbacks.html +0 -23
  75. package/docs/interfaces/react.VreoProviderProps.html +0 -1
  76. package/docs/modules/Player.html +0 -37
  77. package/docs/modules/custom.html +0 -3
  78. package/docs/modules/fivePlugins.html +0 -6
  79. package/docs/modules/react.html +0 -1
  80. package/docs/modules.html +0 -1
  81. package/resources/PlayController/createHTMLAudioElement.ts +0 -53
  82. package/resources/PlayController/index.ts +0 -154
  83. package/resources/Player/App.tsx +0 -66
  84. package/resources/Player/Controller.ts +0 -297
  85. package/resources/Player/custom/SpatialScenePanel/index.tsx +0 -264
  86. package/resources/Player/hooks.ts +0 -26
  87. package/resources/Player/index.tsx +0 -225
  88. package/resources/Player/modules/Drawer/index.tsx +0 -40
  89. package/resources/Player/modules/PopUp/index.tsx +0 -26
  90. package/resources/Player/modules/ResizeObserver/index.tsx +0 -23
  91. package/resources/Player/modules/VideoAgent/VideoAgentMesh.ts +0 -302
  92. package/resources/Player/modules/VideoAgent/VideoAgentScene.ts +0 -56
  93. package/resources/Player/modules/VideoAgent/index.tsx +0 -53
  94. package/resources/Player/modules/Wave/index.tsx +0 -18
  95. package/resources/Player/modules/keyframes/BgMusic/index.tsx +0 -66
  96. package/resources/Player/modules/keyframes/CameraMovement/index.tsx +0 -37
  97. package/resources/Player/modules/keyframes/InfoPanel/index.tsx +0 -165
  98. package/resources/Player/modules/keyframes/ModelVideo/index.tsx +0 -77
  99. package/resources/Player/modules/keyframes/PanoEffect/index.tsx +0 -99
  100. package/resources/Player/modules/keyframes/PanoEffect/lineAnime.ts +0 -31
  101. package/resources/Player/modules/keyframes/PanoTag/index.tsx +0 -83
  102. package/resources/Player/modules/keyframes/PanoTextLabel/index.tsx +0 -117
  103. package/resources/Player/modules/keyframes/Prompter/index.tsx +0 -56
  104. package/resources/Player/modules/keyframes/UpdateVRPanorama/index.tsx +0 -99
  105. package/resources/Player/modules/keyframes/VideoEffect/index.tsx +0 -115
  106. package/resources/Player/typings.ts +0 -49
  107. package/resources/fivePlugins/CSS3DRenderPlugin/centerPoint.ts +0 -5
  108. package/resources/fivePlugins/CSS3DRenderPlugin/createResizeObserver.ts +0 -17
  109. package/resources/fivePlugins/CSS3DRenderPlugin/evenNumber.ts +0 -4
  110. package/resources/fivePlugins/CSS3DRenderPlugin/index.ts +0 -254
  111. package/resources/fivePlugins/CSS3DRenderPlugin/transformPositionToVector3.ts +0 -5
  112. package/resources/fivePlugins/CameraMovementPlugin/index.ts +0 -226
  113. package/resources/fivePlugins/CameraMovementPlugin/typings.ts +0 -59
  114. package/resources/fivePlugins/ModelTVVideoPlugin/index.ts +0 -278
  115. package/resources/index.ts +0 -1
  116. package/resources/react/index.tsx +0 -121
  117. package/resources/shared-utils/AduioLike.ts +0 -109
  118. package/resources/shared-utils/Preloader.ts +0 -35
  119. package/resources/shared-utils/addResizeListener.ts +0 -46
  120. package/resources/shared-utils/animationFrame/BetterTween.ts +0 -33
  121. package/resources/shared-utils/animationFrame/index.ts +0 -48
  122. package/resources/shared-utils/animationFrame/tween.ts +0 -51
  123. package/resources/shared-utils/createTransMatrix.ts +0 -12
  124. package/resources/shared-utils/getFileExpandedName.ts +0 -6
  125. package/resources/shared-utils/getMediaInfo.ts +0 -52
  126. package/resources/shared-utils/setElementDataset.ts +0 -18
  127. 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>