@realsee/vreo 0.1.2 → 0.1.6
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/docs/assets/search.js +1 -1
- package/docs/classes/Player.Player-1.html +6 -6
- package/docs/enums/Player.InfoPanelTypeEnum.html +1 -1
- package/docs/enums/Player.PanoEffectEnum.html +1 -1
- package/docs/enums/Player.PanoTagEnum.html +1 -1
- package/docs/enums/Player.VreoKeyframeEnum.html +13 -11
- package/docs/enums/fivePlugins.CameraMovementEffect.html +1 -1
- package/docs/enums/fivePlugins.Rotation.html +1 -1
- package/docs/interfaces/Player.PlayerConfigs.html +1 -1
- package/docs/interfaces/Player.Vertex.html +1 -1
- package/docs/interfaces/Player.VreoKeyframe.html +1 -1
- package/docs/interfaces/Player.VreoUnit.html +1 -1
- package/docs/interfaces/Player.VreoVideo.html +1 -1
- package/docs/interfaces/fivePlugins.CameraMovementOptsCallback.html +1 -1
- package/docs/interfaces/fivePlugins.CameraMovementPluginExportType.html +2 -2
- package/docs/interfaces/fivePlugins.ModelTVVideoPluginData.html +1 -1
- package/docs/interfaces/fivePlugins.ModelTVVideoPluginExportType.html +1 -1
- package/docs/interfaces/fivePlugins.ModelTVVideoPluginParameterType.html +1 -1
- package/docs/interfaces/react.VreoActionCallbacks.html +6 -6
- package/docs/modules/Player.html +14 -12
- package/docs/modules/fivePlugins.html +2 -2
- package/docs/modules/react.html +1 -1
- package/lib/Player/App.js +4 -0
- package/lib/Player/Controller.d.ts +1 -0
- package/lib/Player/Controller.js +11 -4
- package/lib/Player/index.d.ts +1 -0
- package/lib/Player/index.js +50 -31
- package/lib/Player/modules/VideoAgent/VideoAgentMesh.d.ts +2 -0
- package/lib/Player/modules/VideoAgent/VideoAgentMesh.js +62 -22
- package/lib/Player/modules/VideoAgent/VideoAgentScene.d.ts +2 -0
- package/lib/Player/modules/VideoAgent/VideoAgentScene.js +7 -0
- package/lib/Player/modules/VideoAgent/index.js +6 -0
- package/lib/Player/modules/keyframes/Prompter/index.js +2 -1
- package/lib/fivePlugins/CameraMovementPlugin/index.js +5 -4
- package/lib/fivePlugins/CameraMovementPlugin/typings.d.ts +1 -0
- package/lib/react/index.js +12 -4
- package/lib/typings/VreoUnit.d.ts +7 -1
- package/lib/typings/VreoUnit.js +1 -0
- package/package.json +6 -2
- package/resources/Player/App.tsx +3 -0
- package/resources/Player/Controller.ts +5 -5
- package/resources/Player/index.tsx +36 -23
- package/resources/Player/modules/VideoAgent/VideoAgentMesh.ts +63 -20
- package/resources/Player/modules/VideoAgent/VideoAgentScene.ts +6 -0
- package/resources/Player/modules/VideoAgent/index.tsx +5 -0
- package/resources/Player/modules/keyframes/Prompter/index.tsx +1 -0
- package/resources/fivePlugins/CameraMovementPlugin/index.ts +8 -3
- package/resources/fivePlugins/CameraMovementPlugin/typings.ts +1 -0
- package/resources/react/index.tsx +11 -4
- package/resources/typings/VreoUnit.ts +7 -0
- package/stylesheets/default.css +9 -1
|
@@ -7,13 +7,16 @@ const VreoContext = React.createContext<Player | null>(null)
|
|
|
7
7
|
|
|
8
8
|
export const VreoProvider: React.FC = (props) => {
|
|
9
9
|
const five = unsafe__useFiveInstance()
|
|
10
|
+
|
|
10
11
|
const [player, setPlayer] = React.useState<Player | null>(null)
|
|
12
|
+
const playerRef = React.useRef<Player | null>(null)
|
|
11
13
|
|
|
12
14
|
React.useEffect(() => {
|
|
13
|
-
|
|
15
|
+
playerRef.current = new Player(five)
|
|
16
|
+
setPlayer(playerRef.current)
|
|
14
17
|
|
|
15
18
|
return () => {
|
|
16
|
-
|
|
19
|
+
playerRef.current?.dispose()
|
|
17
20
|
}
|
|
18
21
|
}, [])
|
|
19
22
|
|
|
@@ -88,9 +91,13 @@ export function useVreoEventCallback<T extends keyof VreoKeyframeEvent>(
|
|
|
88
91
|
if (deps !== undefined) {
|
|
89
92
|
dependencyList = dependencyList.concat(deps)
|
|
90
93
|
}
|
|
91
|
-
React.
|
|
94
|
+
React.useEffect(() => {
|
|
92
95
|
// @ts-ignore
|
|
93
|
-
|
|
96
|
+
player.on(name, callback)
|
|
97
|
+
return () => {
|
|
98
|
+
// @ts-ignore
|
|
99
|
+
player.off(name, callback)
|
|
100
|
+
}
|
|
94
101
|
}, dependencyList)
|
|
95
102
|
}
|
|
96
103
|
|
|
@@ -40,6 +40,10 @@ export enum VreoKeyframeEnum {
|
|
|
40
40
|
* 结束
|
|
41
41
|
*/
|
|
42
42
|
Exit = 'Exit',
|
|
43
|
+
/**
|
|
44
|
+
* 自定义剧本帧
|
|
45
|
+
*/
|
|
46
|
+
Custom = 'Custom',
|
|
43
47
|
}
|
|
44
48
|
|
|
45
49
|
/**
|
|
@@ -223,3 +227,6 @@ export type VideoEffectData = {
|
|
|
223
227
|
direction?: Vertex
|
|
224
228
|
vector?: Pick<Pose, 'longitude' | 'latitude'>
|
|
225
229
|
}
|
|
230
|
+
|
|
231
|
+
/** 自定义序列帧 */
|
|
232
|
+
export type CustomData = Record<string, any>
|
package/stylesheets/default.css
CHANGED
|
@@ -133,7 +133,10 @@
|
|
|
133
133
|
opacity: 1;
|
|
134
134
|
transition: opacity 0.5s;
|
|
135
135
|
}
|
|
136
|
-
|
|
136
|
+
.vreo-prompter--audio {
|
|
137
|
+
top: 72px;
|
|
138
|
+
left: 64px;
|
|
139
|
+
}
|
|
137
140
|
.vreo-prompter-innerText {
|
|
138
141
|
position: absolute;
|
|
139
142
|
left: 0;
|
|
@@ -495,3 +498,8 @@
|
|
|
495
498
|
width: 100%;
|
|
496
499
|
max-width: 375px;
|
|
497
500
|
}
|
|
501
|
+
|
|
502
|
+
.vreo-panel--hidden .vreo-panel-inner {
|
|
503
|
+
opacity: 0;
|
|
504
|
+
transition: opacity 0.45s;
|
|
505
|
+
}
|