@realsee/vreo 0.2.0-alpha.4 → 0.2.0-alpha.7
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 +20 -3
- package/docs/assets/custom.css +2 -2
- package/docs/assets/search.js +1 -1
- package/docs/classes/Player.Controller.html +3 -3
- package/docs/classes/Player.Player-1.html +3 -3
- package/docs/classes/Player.VideoAgentMesh.html +11 -11
- package/docs/classes/Player.VideoAgentScene.html +1 -1
- package/docs/enums/Player.InfoPanelStyleEnum.html +1 -0
- 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 +12 -12
- package/docs/enums/fivePlugins.CameraMovementEffect.html +1 -1
- package/docs/enums/fivePlugins.Rotation.html +1 -1
- package/docs/index.html +6 -2
- package/docs/interfaces/Player.CustomVreoKeyframeProps.html +1 -1
- package/docs/interfaces/Player.PlayerConfigs.html +2 -2
- package/docs/interfaces/Player.Vertex.html +1 -1
- package/docs/interfaces/Player.VideoAgentMeshOptions.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/interfaces/react.VreoProviderProps.html +1 -1
- package/docs/modules/Player.html +13 -13
- package/docs/modules/custom.html +1 -1
- package/docs/modules/fivePlugins.html +2 -2
- package/docs/modules/react.html +1 -1
- package/lib/Player/Controller.d.ts +2 -0
- package/lib/Player/Controller.js +14 -0
- package/lib/Player/custom/SpatialScenePanel/index.d.ts +2 -2
- package/lib/Player/custom/SpatialScenePanel/index.js +97 -15
- package/lib/Player/index.js +3 -1
- package/lib/Player/modules/PopUp/index.d.ts +2 -0
- package/lib/Player/modules/PopUp/index.js +43 -0
- package/lib/Player/modules/keyframes/InfoPanel/index.js +73 -35
- package/lib/typings/VreoUnit.d.ts +5 -0
- package/lib/typings/VreoUnit.js +14 -6
- package/package.json +2 -2
- package/resources/Player/Controller.ts +12 -0
- package/resources/Player/custom/SpatialScenePanel/index.tsx +144 -34
- package/resources/Player/index.tsx +2 -0
- package/resources/Player/modules/PopUp/index.tsx +26 -0
- package/resources/Player/modules/keyframes/InfoPanel/index.tsx +79 -34
- package/resources/typings/VreoUnit.ts +6 -0
- package/stylesheets/custom/SpatialScenePanel.css +14 -8
- package/stylesheets/default.css +66 -0
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
2
|
import { ReactNode } from 'react'
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
InfoPanelData,
|
|
5
|
+
InfoPanelStyleEnum,
|
|
6
|
+
InfoPanelTypeEnum,
|
|
7
|
+
VreoKeyframe,
|
|
8
|
+
VreoKeyframeEnum,
|
|
9
|
+
} from '../../../../typings/VreoUnit'
|
|
4
10
|
import { useController } from '../../../hooks'
|
|
5
11
|
|
|
6
12
|
function InfoPanelImg({ url, children }: { url: string; children?: ReactNode }) {
|
|
@@ -16,7 +22,9 @@ function InfoPanelVideo({ url, children }: { url: string; children?: ReactNode }
|
|
|
16
22
|
return (
|
|
17
23
|
<div className="vreo-infoPanel vreo-infoPanel--video">
|
|
18
24
|
{children}
|
|
19
|
-
<div className="vreo-infoPanelWrapper"
|
|
25
|
+
<div className="vreo-infoPanelWrapper">
|
|
26
|
+
<video playsInline autoPlay className="vreo-infoPanelVideo" src={url} />
|
|
27
|
+
</div>
|
|
20
28
|
</div>
|
|
21
29
|
)
|
|
22
30
|
}
|
|
@@ -47,49 +55,86 @@ export function InfoPanel() {
|
|
|
47
55
|
if (controller.configs?.keyframeMap.InfoPanel === false) {
|
|
48
56
|
return
|
|
49
57
|
}
|
|
58
|
+
|
|
50
59
|
const callback = (keyframe: VreoKeyframe) => {
|
|
51
60
|
const { start, end, data } = keyframe
|
|
52
61
|
|
|
53
62
|
const infoPanelData = data as InfoPanelData
|
|
54
63
|
|
|
55
|
-
const { title, subTitle } = infoPanelData
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
<
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
64
|
+
const { title, subTitle, style } = infoPanelData
|
|
65
|
+
do {
|
|
66
|
+
if (style === InfoPanelStyleEnum.PopUp) {
|
|
67
|
+
if (infoPanelData.type === InfoPanelTypeEnum.Image) {
|
|
68
|
+
controller.openPopUp(
|
|
69
|
+
<InfoPanelImg url={infoPanelData.url}>
|
|
70
|
+
<Title title={title} subTitle={subTitle} />
|
|
71
|
+
</InfoPanelImg>
|
|
72
|
+
)
|
|
73
|
+
} else if (infoPanelData.type === InfoPanelTypeEnum.Video) {
|
|
74
|
+
controller.openPopUp(
|
|
75
|
+
<InfoPanelVideo url={infoPanelData.url}>
|
|
76
|
+
<Title title={title} subTitle={subTitle} />
|
|
77
|
+
</InfoPanelVideo>
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
break
|
|
81
|
+
}
|
|
82
|
+
if (infoPanelData.type === InfoPanelTypeEnum.Image) {
|
|
83
|
+
controller.openDrawer({
|
|
84
|
+
content: (
|
|
85
|
+
<InfoPanelImg url={infoPanelData.url}>
|
|
86
|
+
<Title title={title} subTitle={subTitle} />
|
|
87
|
+
</InfoPanelImg>
|
|
88
|
+
),
|
|
89
|
+
height: '60vh',
|
|
90
|
+
})
|
|
91
|
+
} else if (infoPanelData.type === InfoPanelTypeEnum.Video) {
|
|
92
|
+
controller.openDrawer({
|
|
93
|
+
content: (
|
|
94
|
+
<InfoPanelVideo url={infoPanelData.url}>
|
|
95
|
+
<Title title={title} subTitle={subTitle} />
|
|
96
|
+
</InfoPanelVideo>
|
|
97
|
+
),
|
|
98
|
+
height: '60vh',
|
|
99
|
+
})
|
|
100
|
+
}
|
|
101
|
+
} while (false)
|
|
102
|
+
|
|
103
|
+
timeoutRef.current = setTimeout(() => {
|
|
104
|
+
controller.openDrawer(false)
|
|
105
|
+
controller.openPopUp(false)
|
|
106
|
+
}, end - start)
|
|
76
107
|
}
|
|
77
108
|
controller.on(VreoKeyframeEnum.InfoPanel, callback)
|
|
78
109
|
|
|
79
110
|
// Object.assign(window, {
|
|
80
111
|
// $setInfoPanel: () => {
|
|
81
|
-
// controller.
|
|
82
|
-
//
|
|
83
|
-
//
|
|
84
|
-
//
|
|
85
|
-
//
|
|
86
|
-
//
|
|
87
|
-
// <InfoPanelVideo url="//vrlab-public.ljcdn.com/release/seesay/tools/2022011713142___b320f74a5e1b5ad4bb46b4dc69d73ecc.mp4">
|
|
112
|
+
// controller.openPopUp(
|
|
113
|
+
// // <InfoPanelImg url='//vrlab-static.ljcdn.com/release/web/psq/a.8e868cb2.gif' />
|
|
114
|
+
// // <InfoPanelImg url='//vrlab-public.ljcdn.com/release/web/psq/b.f9a1ed52.png' />
|
|
115
|
+
// // <InfoPanelImg url='//vrlab-public.ljcdn.com/release/web/psq/c.4f88c112.png' />
|
|
116
|
+
// // <InfoPanelImg url='//vrlab-public.ljcdn.com/release/seesay/tools/cat_music___f68fb9bbe1f7cd6d00a16456dd0b09ad.gif' />
|
|
117
|
+
// <InfoPanelImg url="http://vrlab-public.ljcdn.com/common/images/web/d94e1bd7-0311-4b20-9c41-a1294fe43554.png">
|
|
88
118
|
// <Title title="场景联动抓拍图片" subTitle={'2022.02.17 14:00'} />
|
|
89
|
-
// </
|
|
90
|
-
//
|
|
91
|
-
//
|
|
92
|
-
//
|
|
119
|
+
// </InfoPanelImg>
|
|
120
|
+
// // <InfoPanelVideo url="//vrlab-public.ljcdn.com/release/seesay/tools/2022011713142___b320f74a5e1b5ad4bb46b4dc69d73ecc.mp4">
|
|
121
|
+
// // <Title title="场景联动抓拍图片" subTitle={'2022.02.17 14:00'} />
|
|
122
|
+
// // </InfoPanelVideo>
|
|
123
|
+
// )
|
|
124
|
+
// },
|
|
125
|
+
// $setInfoPanel2: () => {
|
|
126
|
+
// controller.openPopUp(
|
|
127
|
+
// <InfoPanelImg url='//vrlab-static.ljcdn.com/release/web/psq/a.8e868cb2.gif' />
|
|
128
|
+
// // <InfoPanelImg url='//vrlab-public.ljcdn.com/release/web/psq/b.f9a1ed52.png' />
|
|
129
|
+
// // <InfoPanelImg url='//vrlab-public.ljcdn.com/release/web/psq/c.4f88c112.png' />
|
|
130
|
+
// // <InfoPanelImg url='//vrlab-public.ljcdn.com/release/seesay/tools/cat_music___f68fb9bbe1f7cd6d00a16456dd0b09ad.gif' />
|
|
131
|
+
// // <InfoPanelImg url="http://vrlab-public.ljcdn.com/common/images/web/d94e1bd7-0311-4b20-9c41-a1294fe43554.png">
|
|
132
|
+
// // <Title title="场景联动抓拍图片" subTitle={'2022.02.17 14:00'} />
|
|
133
|
+
// // </InfoPanelImg>
|
|
134
|
+
// // <InfoPanelVideo url="//vrlab-public.ljcdn.com/release/seesay/tools/2022011713142___b320f74a5e1b5ad4bb46b4dc69d73ecc.mp4">
|
|
135
|
+
// // <Title title="场景联动抓拍图片" subTitle={'2022.02.17 14:00'} />
|
|
136
|
+
// // </InfoPanelVideo>
|
|
137
|
+
// )
|
|
93
138
|
// },
|
|
94
139
|
// })
|
|
95
140
|
|
|
@@ -235,11 +235,17 @@ export enum InfoPanelTypeEnum {
|
|
|
235
235
|
Video = 'Video',
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
+
export enum InfoPanelStyleEnum {
|
|
239
|
+
Drawer = 'Drawer',
|
|
240
|
+
PopUp = 'PopUp',
|
|
241
|
+
}
|
|
242
|
+
|
|
238
243
|
/**
|
|
239
244
|
* 信息面板
|
|
240
245
|
*/
|
|
241
246
|
export type InfoPanelData = {
|
|
242
247
|
type: InfoPanelTypeEnum
|
|
248
|
+
style?: InfoPanelStyleEnum
|
|
243
249
|
url: string
|
|
244
250
|
// 标题
|
|
245
251
|
title?: string
|
|
@@ -77,9 +77,15 @@
|
|
|
77
77
|
background-image: url("//vrlab-static.ljcdn.com/release/web/VoiceAssistant/images/panel-min.7d9ba2b7.png");
|
|
78
78
|
background-size: 340rem 13.4375rem;
|
|
79
79
|
background-repeat: no-repeat;
|
|
80
|
-
|
|
80
|
+
z-index: -1;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
+
.SpatialScenePanel-bg--animation {
|
|
84
|
+
/* animation: SpatialScenePanel-panel-sprites-animation 1.375s 0s steps(33) infinite normal; */
|
|
85
|
+
animation: SpatialScenePanel-panel-sprites-animation 1.375s 0.5s steps(33) normal;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
|
|
83
89
|
.SpatialScenePanel-show-area .SpatialScenePanel-header {
|
|
84
90
|
width: 7.5rem;
|
|
85
91
|
height: 1.375rem;
|
|
@@ -89,7 +95,9 @@
|
|
|
89
95
|
background-image: url("//vrlab-static.ljcdn.com/release/web/VoiceAssistant/images/title-bg.377af865.png");
|
|
90
96
|
background-size: 100%;
|
|
91
97
|
margin: 1.875rem auto 1.25rem auto;
|
|
92
|
-
|
|
98
|
+
background-image: linear-gradient(to left, rgba(234, 208, 154, 0), rgb(255 229 176 / 21%) 47%, rgba(234, 208, 154, 0));
|
|
99
|
+
border-bottom: 1px solid rgb(255 255 255 / 10%);
|
|
100
|
+
border-radius: 2px;
|
|
93
101
|
}
|
|
94
102
|
|
|
95
103
|
.SpatialScenePanel-show-area .SpatialScenePanel-header .SpatialScenePanel-title {
|
|
@@ -97,7 +105,7 @@
|
|
|
97
105
|
font-size: 1.0625rem;
|
|
98
106
|
color: #ffe5b0;
|
|
99
107
|
letter-spacing: 0;
|
|
100
|
-
line-height: 1.
|
|
108
|
+
line-height: 1.125;
|
|
101
109
|
text-shadow: 0 0 1.25rem rgba(0,0,0,0.15)
|
|
102
110
|
}
|
|
103
111
|
|
|
@@ -106,7 +114,7 @@
|
|
|
106
114
|
font-size: .625rem;
|
|
107
115
|
color: rgba(255,229,176,0.6);
|
|
108
116
|
letter-spacing: 0;
|
|
109
|
-
line-height: .
|
|
117
|
+
line-height: 1.25rem;
|
|
110
118
|
text-shadow: 0 0 .625rem rgba(255,255,255,0.03);
|
|
111
119
|
align-self: flex-end
|
|
112
120
|
}
|
|
@@ -270,9 +278,7 @@
|
|
|
270
278
|
|
|
271
279
|
.SpatialScenePanel.hide .SpatialScenePanel-show-area {
|
|
272
280
|
transform: scale3d(0,1,1);
|
|
273
|
-
transition:
|
|
274
|
-
transition: transform 500ms linear;
|
|
275
|
-
transition: transform 500ms linear, -webkit-transform 500ms linear
|
|
281
|
+
transition: transform 150ms linear;
|
|
276
282
|
}
|
|
277
283
|
|
|
278
284
|
.SpatialScenePanel.hide .SpatialScenePanel-disappear-area {
|
|
@@ -298,6 +304,6 @@
|
|
|
298
304
|
background-image: url("//vrlab-static.ljcdn.com/release/web/VoiceAssistant/images/line.4ac1c0bb.png");
|
|
299
305
|
background-size: 10rem 11.666666666666666rem;
|
|
300
306
|
background-repeat: no-repeat;
|
|
301
|
-
animation: SpatialScenePanel-line-sprites-animation 500ms
|
|
307
|
+
animation: SpatialScenePanel-line-sprites-animation 500ms 100ms steps(23) 1 normal
|
|
302
308
|
}
|
|
303
309
|
|
package/stylesheets/default.css
CHANGED
|
@@ -547,3 +547,69 @@
|
|
|
547
547
|
opacity: 0;
|
|
548
548
|
transition: opacity 0.45s;
|
|
549
549
|
}
|
|
550
|
+
|
|
551
|
+
.vreo-PopUp {
|
|
552
|
+
position: absolute;
|
|
553
|
+
left: 0;
|
|
554
|
+
top: 0;
|
|
555
|
+
width: 100%;
|
|
556
|
+
height: 100%;
|
|
557
|
+
pointer-events: none;
|
|
558
|
+
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7) 65%);
|
|
559
|
+
opacity: 0;
|
|
560
|
+
transition: opacity .45s;
|
|
561
|
+
display: flex;
|
|
562
|
+
justify-content: center;
|
|
563
|
+
align-items: center;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
.vreo-PopUp.vreo-PopUp-visible {
|
|
567
|
+
opacity: 1;
|
|
568
|
+
pointer-events: all;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
.vreo-PopUp-inner {
|
|
572
|
+
width: 339px;
|
|
573
|
+
height: 425px;
|
|
574
|
+
position: relative;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
@media only screen and (min-width: 960px) {
|
|
578
|
+
.vreo-PopUp-inner {
|
|
579
|
+
width: 678px;
|
|
580
|
+
height: 620px;
|
|
581
|
+
position: relative;
|
|
582
|
+
}
|
|
583
|
+
.vreo-infoPanelVideo {
|
|
584
|
+
max-width: 100%;
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
.vreo-PopUp-inner .vreo-infoPanel {
|
|
589
|
+
background-color: initial;
|
|
590
|
+
justify-content: center;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.vreo-PopUp-inner .vreo-infoPanel-title {
|
|
594
|
+
position: absolute;
|
|
595
|
+
bottom: 32px;
|
|
596
|
+
left: 0;
|
|
597
|
+
z-index: 1;
|
|
598
|
+
flex-direction: column;
|
|
599
|
+
justify-content: end;
|
|
600
|
+
height: 200px;
|
|
601
|
+
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.8));
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
.vreo-PopUp-inner .vreo-infoPanel-title .vreo-infoPanel-t1 {
|
|
605
|
+
padding-left: 0;
|
|
606
|
+
font-size: 20px;
|
|
607
|
+
font-weight: 600;
|
|
608
|
+
padding-bottom: 14px;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
.vreo-PopUp-inner .vreo-infoPanel-title .vreo-infoPanel-t2 {
|
|
612
|
+
padding: 0 0 24px 0;
|
|
613
|
+
font-size: 14px;
|
|
614
|
+
opacity: 0.85;
|
|
615
|
+
}
|