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

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 +6 -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 +14 -5
  6. package/lib/Player/index.js +3 -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 +31 -16
  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
@@ -82,7 +82,7 @@ var AudioLike = /*#__PURE__*/function (_Subscribe) {
82
82
  }
83
83
 
84
84
  if (this.$timestamp === null) {
85
- this.$timestamp = performance.now() - this.$currentTime;
85
+ this.$timestamp = performance.now();
86
86
  }
87
87
 
88
88
  this.stopInterval = (0, _animationFrame.requestAnimationFrameInterval)(function () {
@@ -106,7 +106,8 @@ var AudioLike = /*#__PURE__*/function (_Subscribe) {
106
106
  value: function requestAnimationFrameLoop() {
107
107
  if (this.$timestamp === null) return;
108
108
  var now = performance.now();
109
- this.$currentTime = now - this.$timestamp;
109
+ this.$currentTime += now - this.$timestamp;
110
+ this.$timestamp = now;
110
111
  this.emit('timeupdate');
111
112
 
112
113
  if (this.$currentTime >= this.$duration - 10) {
@@ -121,7 +122,7 @@ var AudioLike = /*#__PURE__*/function (_Subscribe) {
121
122
  return this.$currentTime / 1000;
122
123
  },
123
124
  set: function set(time) {
124
- this.$currentTime = time;
125
+ this.$currentTime = time * 1000;
125
126
  }
126
127
  }, {
127
128
  key: "duration",
@@ -129,10 +130,7 @@ var AudioLike = /*#__PURE__*/function (_Subscribe) {
129
130
  return this.$duration;
130
131
  },
131
132
  set: function set(duration) {
132
- this.pause();
133
133
  this.$duration = duration;
134
- this.$timestamp = null;
135
- this.$currentTime = 0;
136
134
  }
137
135
  }, {
138
136
  key: "ended",
@@ -77,7 +77,7 @@ export interface VreoVideo {
77
77
  end: number;
78
78
  url: string;
79
79
  avatar?: {
80
- url: string;
80
+ url?: string;
81
81
  force?: true;
82
82
  };
83
83
  }
@@ -85,10 +85,10 @@ export interface VreoVideo {
85
85
  * 剧本结构
86
86
  */
87
87
  export interface VreoUnit {
88
- categoryId: string;
89
- categoryText: string;
90
- frontRequestId: string;
91
- index: string | number;
88
+ categoryId?: string;
89
+ categoryText?: string;
90
+ frontRequestId?: string;
91
+ index?: string | number;
92
92
  keyframes: VreoKeyframe[];
93
93
  video: VreoVideo;
94
94
  }
@@ -96,7 +96,7 @@ export interface VreoUnit {
96
96
  * 剧本事件
97
97
  */
98
98
  export declare type VreoKeyframeEvent = {
99
- [key in VreoKeyframeEnum]: (keyframe: VreoKeyframe) => void;
99
+ [key in VreoKeyframeEnum]: (keyframe: VreoKeyframe, currentTime: number) => void;
100
100
  } & {
101
101
  loaded: (vreoUnit: VreoUnit) => void;
102
102
  paused: (ended?: boolean) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@realsee/vreo",
3
- "version": "1.0.0-alpha.2",
3
+ "version": "1.0.0-alpha.20",
4
4
  "description": "Vreo (VR Video 缩写) 是基于如视三维渲染引擎 Five 和 用户界面构建库 React 实现的如视 3D 空间剧本播放器。",
5
5
  "keywords": [
6
6
  "realsee",
@@ -12,8 +12,6 @@
12
12
  "private": false,
13
13
  "files": [
14
14
  "lib",
15
- "resources",
16
- "docs",
17
15
  "stylesheets",
18
16
  "LICENSE",
19
17
  "CHANGELOG.md"
@@ -36,7 +34,6 @@
36
34
  "@babel/preset-env": "^7.16.4",
37
35
  "@babel/preset-react": "^7.16.0",
38
36
  "@babel/preset-typescript": "^7.16.0",
39
- "@realsee/dnalogel": "^2.1.0-alpha.17",
40
37
  "@realsee/five": "5.0.0-alpha.149",
41
38
  "@types/offscreencanvas": "^2019.6.4",
42
39
  "@types/react": "^17.0.37",
@@ -52,6 +49,7 @@
52
49
  "vite": "^2.6.14"
53
50
  },
54
51
  "dependencies": {
52
+ "@realsee/dnalogel": "^2.1.0-alpha.29",
55
53
  "@tweenjs/tween.js": "18.6.4",
56
54
  "classnames": "^2.3.1",
57
55
  "mobx": "^6.3.7",
@@ -106,10 +106,18 @@
106
106
  }
107
107
 
108
108
  .vreo-wave {
109
+ width: 100%;
109
110
  position: absolute;
111
+ background-color: transparent;
112
+ border: none;
110
113
  bottom: 0;
111
114
  }
112
115
 
116
+ @keyframes vreo-wave-keyframes {
117
+ 0% { background-position: 0 0; }
118
+ 100% { background-position: 0 100%; }
119
+ }
120
+
113
121
  /* @keyframes panel-sprites-animation {
114
122
  0% {
115
123
  background-position: 0 0;
@@ -304,7 +312,7 @@
304
312
 
305
313
  .vreo-prompter-text {
306
314
  position: absolute;
307
- height: 0;
315
+ height: 0px;
308
316
  display: flex;
309
317
  align-items: center;
310
318
  justify-content: center;
@@ -327,7 +335,6 @@
327
335
  }
328
336
 
329
337
  .vreo-prompter-innerText {
330
- position: absolute;
331
338
  font-weight: bold;
332
339
  font-size: 14px;
333
340
  word-break: break-all;
@@ -855,8 +862,8 @@
855
862
 
856
863
  .vreo-app .vreo-PopUp-inner .vreo-infoPanel-title .vreo-infoPanel-t1,
857
864
  .vreo-app[data-size="S"] .vreo-PopUp-inner .vreo-infoPanel-title .vreo-infoPanel-t1 {
858
- font-size: 20px;
859
- line-height: 28px;
865
+ font-size: 16px;
866
+ line-height: 22px;
860
867
  }
861
868
  .vreo-app[data-size="M"][data-orientation="landscape"] .vreo-PopUp-inner .vreo-infoPanel-title .vreo-infoPanel-t1 {
862
869
  font-size: 14px;
package/docs/.nojekyll DELETED
@@ -1 +0,0 @@
1
- TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
@@ -1,78 +0,0 @@
1
- body {
2
- font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
3
- font-size: 16px;
4
- color: #2e2e2e;
5
- }
6
-
7
- blockquote {
8
- color: #7f8fa4;
9
- padding: 8px 12px;
10
- margin: 16px 0;
11
- border-left: 3px solid #eaeaea;
12
- }
13
-
14
- blockquote p {
15
- color: #7f8fa4 !important;
16
- font-size: inherit;
17
- line-height: 1.5;
18
- margin: 0 !important;
19
- }
20
-
21
- .tsd-typography {
22
- font-size: 16px;
23
- }
24
-
25
- .tsd-typography h4 {
26
- line-height: 2;
27
- }
28
-
29
- .hljs {
30
- background-color: transparent;
31
- font-family: monospace;
32
- font-size: 0.85rem;
33
- }
34
- code {
35
- font-size: 14px;
36
- background-color: rgb(96 125 139 / 10%);
37
- }
38
-
39
- pre {
40
- background-color: rgb(205 220 57 / 8%);
41
- }
42
-
43
- p {
44
- line-height: 1.5;
45
- }
46
-
47
- a {
48
- color: #3832cf;
49
- }
50
-
51
- a:hover {
52
- color: darkred;
53
- }
54
-
55
- body.dark {
56
- color: #e9e9e9;
57
- }
58
-
59
- .dark a {
60
- color: var(--color-link);
61
- }
62
-
63
- .dark a:hover {
64
- color: #ed8e9f;
65
- }
66
-
67
- @media (prefers-color-scheme: dark) {
68
- body {
69
- color: #e9e9e9;
70
- }
71
- a {
72
- color: var(--color-link);
73
- }
74
-
75
- a:hover {
76
- color: #ed8e9f;
77
- }
78
- }
@@ -1,127 +0,0 @@
1
- :root {
2
- --light-hl-0: #000000;
3
- --dark-hl-0: #D4D4D4;
4
- --light-hl-1: #008000;
5
- --dark-hl-1: #6A9955;
6
- --light-hl-2: #AF00DB;
7
- --dark-hl-2: #C586C0;
8
- --light-hl-3: #0000FF;
9
- --dark-hl-3: #569CD6;
10
- --light-hl-4: #001080;
11
- --dark-hl-4: #9CDCFE;
12
- --light-hl-5: #A31515;
13
- --dark-hl-5: #CE9178;
14
- --light-hl-6: #0070C1;
15
- --dark-hl-6: #4FC1FF;
16
- --light-hl-7: #795E26;
17
- --dark-hl-7: #DCDCAA;
18
- --light-hl-8: #267F99;
19
- --dark-hl-8: #4EC9B0;
20
- --light-hl-9: #800000;
21
- --dark-hl-9: #808080;
22
- --light-hl-10: #800000;
23
- --dark-hl-10: #569CD6;
24
- --light-hl-11: #FF0000;
25
- --dark-hl-11: #9CDCFE;
26
- --light-hl-12: #000000FF;
27
- --dark-hl-12: #D4D4D4;
28
- --light-hl-13: #0451A5;
29
- --dark-hl-13: #9CDCFE;
30
- --light-hl-14: #098658;
31
- --dark-hl-14: #B5CEA8;
32
- --light-code-background: #F5F5F5;
33
- --dark-code-background: #1E1E1E;
34
- }
35
-
36
- @media (prefers-color-scheme: light) { :root {
37
- --hl-0: var(--light-hl-0);
38
- --hl-1: var(--light-hl-1);
39
- --hl-2: var(--light-hl-2);
40
- --hl-3: var(--light-hl-3);
41
- --hl-4: var(--light-hl-4);
42
- --hl-5: var(--light-hl-5);
43
- --hl-6: var(--light-hl-6);
44
- --hl-7: var(--light-hl-7);
45
- --hl-8: var(--light-hl-8);
46
- --hl-9: var(--light-hl-9);
47
- --hl-10: var(--light-hl-10);
48
- --hl-11: var(--light-hl-11);
49
- --hl-12: var(--light-hl-12);
50
- --hl-13: var(--light-hl-13);
51
- --hl-14: var(--light-hl-14);
52
- --code-background: var(--light-code-background);
53
- } }
54
-
55
- @media (prefers-color-scheme: dark) { :root {
56
- --hl-0: var(--dark-hl-0);
57
- --hl-1: var(--dark-hl-1);
58
- --hl-2: var(--dark-hl-2);
59
- --hl-3: var(--dark-hl-3);
60
- --hl-4: var(--dark-hl-4);
61
- --hl-5: var(--dark-hl-5);
62
- --hl-6: var(--dark-hl-6);
63
- --hl-7: var(--dark-hl-7);
64
- --hl-8: var(--dark-hl-8);
65
- --hl-9: var(--dark-hl-9);
66
- --hl-10: var(--dark-hl-10);
67
- --hl-11: var(--dark-hl-11);
68
- --hl-12: var(--dark-hl-12);
69
- --hl-13: var(--dark-hl-13);
70
- --hl-14: var(--dark-hl-14);
71
- --code-background: var(--dark-code-background);
72
- } }
73
-
74
- body.light {
75
- --hl-0: var(--light-hl-0);
76
- --hl-1: var(--light-hl-1);
77
- --hl-2: var(--light-hl-2);
78
- --hl-3: var(--light-hl-3);
79
- --hl-4: var(--light-hl-4);
80
- --hl-5: var(--light-hl-5);
81
- --hl-6: var(--light-hl-6);
82
- --hl-7: var(--light-hl-7);
83
- --hl-8: var(--light-hl-8);
84
- --hl-9: var(--light-hl-9);
85
- --hl-10: var(--light-hl-10);
86
- --hl-11: var(--light-hl-11);
87
- --hl-12: var(--light-hl-12);
88
- --hl-13: var(--light-hl-13);
89
- --hl-14: var(--light-hl-14);
90
- --code-background: var(--light-code-background);
91
- }
92
-
93
- body.dark {
94
- --hl-0: var(--dark-hl-0);
95
- --hl-1: var(--dark-hl-1);
96
- --hl-2: var(--dark-hl-2);
97
- --hl-3: var(--dark-hl-3);
98
- --hl-4: var(--dark-hl-4);
99
- --hl-5: var(--dark-hl-5);
100
- --hl-6: var(--dark-hl-6);
101
- --hl-7: var(--dark-hl-7);
102
- --hl-8: var(--dark-hl-8);
103
- --hl-9: var(--dark-hl-9);
104
- --hl-10: var(--dark-hl-10);
105
- --hl-11: var(--dark-hl-11);
106
- --hl-12: var(--dark-hl-12);
107
- --hl-13: var(--dark-hl-13);
108
- --hl-14: var(--dark-hl-14);
109
- --code-background: var(--dark-code-background);
110
- }
111
-
112
- .hl-0 { color: var(--hl-0); }
113
- .hl-1 { color: var(--hl-1); }
114
- .hl-2 { color: var(--hl-2); }
115
- .hl-3 { color: var(--hl-3); }
116
- .hl-4 { color: var(--hl-4); }
117
- .hl-5 { color: var(--hl-5); }
118
- .hl-6 { color: var(--hl-6); }
119
- .hl-7 { color: var(--hl-7); }
120
- .hl-8 { color: var(--hl-8); }
121
- .hl-9 { color: var(--hl-9); }
122
- .hl-10 { color: var(--hl-10); }
123
- .hl-11 { color: var(--hl-11); }
124
- .hl-12 { color: var(--hl-12); }
125
- .hl-13 { color: var(--hl-13); }
126
- .hl-14 { color: var(--hl-14); }
127
- pre, code { background: var(--code-background); }