@realsee/vreo 2.6.4-alpha.5 → 3.0.0-webgpu-react18.8
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 +7 -0
- package/README.md +6 -6
- package/lib/PlayController/createHTMLAudioElement.d.ts +1 -0
- package/lib/PlayController/createHTMLAudioElement.d.ts.map +1 -0
- package/lib/PlayController/index.d.ts +14 -24
- package/lib/PlayController/index.d.ts.map +1 -0
- package/lib/PlayController/index.js +74 -210
- package/lib/PlayController/index.js.map +1 -0
- package/lib/Player/App.d.ts +2 -2
- package/lib/Player/App.d.ts.map +1 -0
- package/lib/Player/Controller.d.ts +11 -6
- package/lib/Player/Controller.d.ts.map +1 -0
- package/lib/Player/PlaybackLifecycle.d.ts +1 -0
- package/lib/Player/PlaybackLifecycle.d.ts.map +1 -0
- package/lib/Player/custom/SpatialScenePanel/index.d.ts +2 -2
- package/lib/Player/custom/SpatialScenePanel/index.d.ts.map +1 -0
- package/lib/Player/hooks.d.ts +3 -2
- package/lib/Player/hooks.d.ts.map +1 -0
- package/lib/Player/index.d.ts +3 -2
- package/lib/Player/index.d.ts.map +1 -0
- package/lib/Player/index.js +1769 -430
- package/lib/Player/index.js.map +1 -0
- package/lib/Player/modules/Drawer/index.d.ts +2 -2
- package/lib/Player/modules/Drawer/index.d.ts.map +1 -0
- package/lib/Player/modules/PopUp/index.d.ts +2 -2
- package/lib/Player/modules/PopUp/index.d.ts.map +1 -0
- package/lib/Player/modules/ResizeObserver/index.d.ts +2 -2
- package/lib/Player/modules/ResizeObserver/index.d.ts.map +1 -0
- package/lib/Player/modules/VideoAgent/VideoAgentMesh.d.ts +5 -2
- package/lib/Player/modules/VideoAgent/VideoAgentMesh.d.ts.map +1 -0
- package/lib/Player/modules/VideoAgent/VideoAgentScene.d.ts +8 -5
- package/lib/Player/modules/VideoAgent/VideoAgentScene.d.ts.map +1 -0
- package/lib/Player/modules/VideoAgent/index.d.ts +11 -2
- package/lib/Player/modules/VideoAgent/index.d.ts.map +1 -0
- package/lib/Player/modules/Wave/index.d.ts +2 -2
- package/lib/Player/modules/Wave/index.d.ts.map +1 -0
- package/lib/Player/modules/keyframes/BgMusic/index.d.ts +2 -2
- package/lib/Player/modules/keyframes/BgMusic/index.d.ts.map +1 -0
- package/lib/Player/modules/keyframes/CameraMovement/index.d.ts +2 -2
- package/lib/Player/modules/keyframes/CameraMovement/index.d.ts.map +1 -0
- package/lib/Player/modules/keyframes/InfoPanel/index.d.ts +2 -2
- package/lib/Player/modules/keyframes/InfoPanel/index.d.ts.map +1 -0
- package/lib/Player/modules/keyframes/ModelVideo/index.d.ts +2 -2
- package/lib/Player/modules/keyframes/ModelVideo/index.d.ts.map +1 -0
- package/lib/Player/modules/keyframes/PanoEffect/index.d.ts +2 -2
- package/lib/Player/modules/keyframes/PanoEffect/index.d.ts.map +1 -0
- package/lib/Player/modules/keyframes/PanoEffect/lineAnime.d.ts +3 -2
- package/lib/Player/modules/keyframes/PanoEffect/lineAnime.d.ts.map +1 -0
- package/lib/Player/modules/keyframes/PanoTag/index.d.ts +1 -0
- package/lib/Player/modules/keyframes/PanoTag/index.d.ts.map +1 -0
- package/lib/Player/modules/keyframes/PanoTextLabel/index.d.ts +2 -2
- package/lib/Player/modules/keyframes/PanoTextLabel/index.d.ts.map +1 -0
- package/lib/Player/modules/keyframes/Prompter/index.d.ts +2 -2
- package/lib/Player/modules/keyframes/Prompter/index.d.ts.map +1 -0
- package/lib/Player/modules/keyframes/UpdateVRPanorama/index.d.ts +2 -2
- package/lib/Player/modules/keyframes/UpdateVRPanorama/index.d.ts.map +1 -0
- package/lib/Player/modules/keyframes/VideoEffect/index.d.ts +2 -2
- package/lib/Player/modules/keyframes/VideoEffect/index.d.ts.map +1 -0
- package/lib/Player/playback-types.d.ts +1 -0
- package/lib/Player/playback-types.d.ts.map +1 -0
- package/lib/Player/typings.d.ts +2 -1
- package/lib/Player/typings.d.ts.map +1 -0
- package/lib/chunks/index-BgPSzRSs.js +93 -0
- package/lib/chunks/index-BgPSzRSs.js.map +1 -0
- package/lib/chunks/index-CunyJn6H.js +51 -0
- package/lib/chunks/index-CunyJn6H.js.map +1 -0
- package/lib/fivePlugins/CSS3DRenderPlugin/centerPoint.d.ts +2 -1
- package/lib/fivePlugins/CSS3DRenderPlugin/centerPoint.d.ts.map +1 -0
- package/lib/fivePlugins/CSS3DRenderPlugin/createResizeObserver.d.ts +5 -6
- package/lib/fivePlugins/CSS3DRenderPlugin/createResizeObserver.d.ts.map +1 -0
- package/lib/fivePlugins/CSS3DRenderPlugin/evenNumber.d.ts +1 -0
- package/lib/fivePlugins/CSS3DRenderPlugin/evenNumber.d.ts.map +1 -0
- package/lib/fivePlugins/CSS3DRenderPlugin/index.d.ts +5 -22
- package/lib/fivePlugins/CSS3DRenderPlugin/index.d.ts.map +1 -0
- package/lib/fivePlugins/CSS3DRenderPlugin/transformPositionToVector3.d.ts +2 -1
- package/lib/fivePlugins/CSS3DRenderPlugin/transformPositionToVector3.d.ts.map +1 -0
- package/lib/fivePlugins/CameraMovementPlugin/index.d.ts +2 -1
- package/lib/fivePlugins/CameraMovementPlugin/index.d.ts.map +1 -0
- package/lib/fivePlugins/CameraMovementPlugin/typings.d.ts +2 -1
- package/lib/fivePlugins/CameraMovementPlugin/typings.d.ts.map +1 -0
- package/lib/fivePlugins/ModelTVVideoPlugin/index.d.ts +2 -1
- package/lib/fivePlugins/ModelTVVideoPlugin/index.d.ts.map +1 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +12 -1
- package/lib/index.js.map +1 -0
- package/lib/plugins/CSS3DRenderPlugin.js +115 -0
- package/lib/plugins/CSS3DRenderPlugin.js.map +1 -0
- package/lib/plugins/CameraMovementPlugin.js +6 -0
- package/lib/plugins/CameraMovementPlugin.js.map +1 -0
- package/lib/plugins/ModelTVVideoPlugin.js +162 -0
- package/lib/plugins/ModelTVVideoPlugin.js.map +1 -0
- package/lib/react/index.d.ts +5 -4
- package/lib/react/index.d.ts.map +1 -0
- package/lib/react/index.js +39 -226
- package/lib/react/index.js.map +1 -0
- package/lib/shared-utils/Audio.d.ts +3 -1
- package/lib/shared-utils/Audio.d.ts.map +1 -0
- package/lib/shared-utils/AudioLike.d.ts +2 -1
- package/lib/shared-utils/AudioLike.d.ts.map +1 -0
- package/lib/shared-utils/Preloader.d.ts +1 -0
- package/lib/shared-utils/Preloader.d.ts.map +1 -0
- package/lib/shared-utils/addResizeListener.d.ts +2 -1
- package/lib/shared-utils/addResizeListener.d.ts.map +1 -0
- package/lib/shared-utils/animationFrame/BetterTween.d.ts +1 -0
- package/lib/shared-utils/animationFrame/BetterTween.d.ts.map +1 -0
- package/lib/shared-utils/animationFrame/index.d.ts +5 -14
- package/lib/shared-utils/animationFrame/index.d.ts.map +1 -0
- package/lib/shared-utils/animationFrame/tween.d.ts +1 -0
- package/lib/shared-utils/animationFrame/tween.d.ts.map +1 -0
- package/lib/shared-utils/createTransMatrix.d.ts +3 -1
- package/lib/shared-utils/createTransMatrix.d.ts.map +1 -0
- package/lib/shared-utils/getFileExpandedName.d.ts +1 -0
- package/lib/shared-utils/getFileExpandedName.d.ts.map +1 -0
- package/lib/shared-utils/getMediaInfo.d.ts +1 -0
- package/lib/shared-utils/getMediaInfo.d.ts.map +1 -0
- package/lib/shared-utils/setElementDataset.d.ts +1 -0
- package/lib/shared-utils/setElementDataset.d.ts.map +1 -0
- package/lib/timeline/index.d.ts +18 -0
- package/lib/timeline/index.d.ts.map +1 -0
- package/lib/types/index.js +10 -0
- package/lib/types/index.js.map +1 -0
- package/lib/typings/VreoUnit.d.ts +2 -1
- package/lib/typings/VreoUnit.d.ts.map +1 -0
- package/lib/typings/index.d.ts +1 -0
- package/lib/typings/index.d.ts.map +1 -0
- package/package.json +51 -71
- package/lib/PlayController/createHTMLAudioElement.js +0 -30
- package/lib/Player/App.js +0 -52
- package/lib/Player/Controller.js +0 -530
- package/lib/Player/PlaybackLifecycle.js +0 -117
- package/lib/Player/custom/SpatialScenePanel/index.js +0 -263
- package/lib/Player/hooks.js +0 -22
- package/lib/Player/modules/Drawer/index.js +0 -39
- package/lib/Player/modules/PopUp/index.js +0 -23
- package/lib/Player/modules/ResizeObserver/index.js +0 -22
- package/lib/Player/modules/VideoAgent/VideoAgentMesh.js +0 -445
- package/lib/Player/modules/VideoAgent/VideoAgentScene.js +0 -53
- package/lib/Player/modules/VideoAgent/index.js +0 -72
- package/lib/Player/modules/Wave/index.js +0 -171
- package/lib/Player/modules/keyframes/BgMusic/index.js +0 -65
- package/lib/Player/modules/keyframes/CameraMovement/index.js +0 -73
- package/lib/Player/modules/keyframes/InfoPanel/index.js +0 -170
- package/lib/Player/modules/keyframes/ModelVideo/index.js +0 -126
- package/lib/Player/modules/keyframes/PanoEffect/index.js +0 -99
- package/lib/Player/modules/keyframes/PanoEffect/lineAnime.js +0 -30
- package/lib/Player/modules/keyframes/PanoTag/index.js +0 -110
- package/lib/Player/modules/keyframes/PanoTextLabel/index.js +0 -122
- package/lib/Player/modules/keyframes/Prompter/index.js +0 -56
- package/lib/Player/modules/keyframes/UpdateVRPanorama/index.js +0 -98
- package/lib/Player/modules/keyframes/VideoEffect/index.js +0 -152
- package/lib/Player/playback-types.js +0 -1
- package/lib/Player/typings.js +0 -1
- package/lib/fivePlugins/CSS3DRenderPlugin/centerPoint.js +0 -4
- package/lib/fivePlugins/CSS3DRenderPlugin/createResizeObserver.js +0 -25
- package/lib/fivePlugins/CSS3DRenderPlugin/evenNumber.js +0 -4
- package/lib/fivePlugins/CSS3DRenderPlugin/index.js +0 -226
- package/lib/fivePlugins/CSS3DRenderPlugin/transformPositionToVector3.js +0 -8
- package/lib/fivePlugins/CameraMovementPlugin/index.js +0 -238
- package/lib/fivePlugins/CameraMovementPlugin/typings.js +0 -15
- package/lib/fivePlugins/ModelTVVideoPlugin/index.js +0 -347
- package/lib/shared-utils/Audio.js +0 -147
- package/lib/shared-utils/AudioLike.js +0 -120
- package/lib/shared-utils/Preloader.js +0 -37
- package/lib/shared-utils/addResizeListener.js +0 -39
- package/lib/shared-utils/animationFrame/BetterTween.js +0 -56
- package/lib/shared-utils/animationFrame/index.js +0 -52
- package/lib/shared-utils/animationFrame/tween.js +0 -56
- package/lib/shared-utils/createTransMatrix.js +0 -12
- package/lib/shared-utils/getFileExpandedName.js +0 -6
- package/lib/shared-utils/getMediaInfo.js +0 -54
- package/lib/shared-utils/setElementDataset.js +0 -16
- package/lib/typings/VreoUnit.js +0 -171
- package/lib/typings/index.js +0 -1
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@realsee/vreo",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-webgpu-react18.8",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "Vreo (VR Video
|
|
5
|
+
"description": "Vreo (VR Video \u7f29\u5199) \u662f\u57fa\u4e8e\u5982\u89c6\u4e09\u7ef4\u6e32\u67d3\u5f15\u64ce Five \u548c \u7528\u6237\u754c\u9762\u6784\u5efa\u5e93 React \u5b9e\u73b0\u7684\u5982\u89c6 3D \u7a7a\u95f4\u5267\u672c\u64ad\u653e\u5668\u3002",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"realsee",
|
|
8
8
|
"vreo"
|
|
@@ -10,53 +10,38 @@
|
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
12
|
"types": "./lib/index.d.ts",
|
|
13
|
-
"import": "./lib/index.js"
|
|
14
|
-
"default": "./lib/index.js"
|
|
15
|
-
},
|
|
16
|
-
"./PlayController": {
|
|
17
|
-
"types": "./lib/PlayController/index.d.ts",
|
|
18
|
-
"import": "./lib/PlayController/index.js",
|
|
19
|
-
"default": "./lib/PlayController/index.js"
|
|
13
|
+
"import": "./lib/index.js"
|
|
20
14
|
},
|
|
21
15
|
"./Player": {
|
|
22
16
|
"types": "./lib/Player/index.d.ts",
|
|
23
|
-
"import": "./lib/Player/index.js"
|
|
24
|
-
|
|
17
|
+
"import": "./lib/Player/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./PlayController": {
|
|
20
|
+
"types": "./lib/PlayController/index.d.ts",
|
|
21
|
+
"import": "./lib/PlayController/index.js"
|
|
25
22
|
},
|
|
26
23
|
"./react": {
|
|
27
24
|
"types": "./lib/react/index.d.ts",
|
|
28
|
-
"import": "./lib/react/index.js"
|
|
29
|
-
"default": "./lib/react/index.js"
|
|
25
|
+
"import": "./lib/react/index.js"
|
|
30
26
|
},
|
|
31
27
|
"./plugins/CameraMovementPlugin": {
|
|
32
28
|
"types": "./lib/fivePlugins/CameraMovementPlugin/index.d.ts",
|
|
33
|
-
"import": "./lib/
|
|
34
|
-
"default": "./lib/fivePlugins/CameraMovementPlugin/index.js"
|
|
29
|
+
"import": "./lib/plugins/CameraMovementPlugin.js"
|
|
35
30
|
},
|
|
36
31
|
"./plugins/CSS3DRenderPlugin": {
|
|
37
32
|
"types": "./lib/fivePlugins/CSS3DRenderPlugin/index.d.ts",
|
|
38
|
-
"import": "./lib/
|
|
39
|
-
"default": "./lib/fivePlugins/CSS3DRenderPlugin/index.js"
|
|
33
|
+
"import": "./lib/plugins/CSS3DRenderPlugin.js"
|
|
40
34
|
},
|
|
41
35
|
"./plugins/ModelTVVideoPlugin": {
|
|
42
36
|
"types": "./lib/fivePlugins/ModelTVVideoPlugin/index.d.ts",
|
|
43
|
-
"import": "./lib/
|
|
44
|
-
"default": "./lib/fivePlugins/ModelTVVideoPlugin/index.js"
|
|
37
|
+
"import": "./lib/plugins/ModelTVVideoPlugin.js"
|
|
45
38
|
},
|
|
46
|
-
"./
|
|
47
|
-
"types": "./lib/shared-utils/animationFrame/index.d.ts",
|
|
48
|
-
"import": "./lib/shared-utils/animationFrame/index.js",
|
|
49
|
-
"default": "./lib/shared-utils/animationFrame/index.js"
|
|
50
|
-
},
|
|
51
|
-
"./typings": {
|
|
39
|
+
"./types": {
|
|
52
40
|
"types": "./lib/typings/index.d.ts",
|
|
53
|
-
"import": "./lib/
|
|
54
|
-
"default": "./lib/typings/index.js"
|
|
41
|
+
"import": "./lib/types/index.js"
|
|
55
42
|
},
|
|
56
|
-
"./
|
|
57
|
-
"./
|
|
58
|
-
"./stylesheets/*": "./stylesheets/*",
|
|
59
|
-
"./lib/*": "./lib/*",
|
|
43
|
+
"./styles/default.css": "./stylesheets/default.css",
|
|
44
|
+
"./styles/SpatialScenePanel.css": "./stylesheets/custom/SpatialScenePanel.css",
|
|
60
45
|
"./package.json": "./package.json"
|
|
61
46
|
},
|
|
62
47
|
"author": "BEIKE REALSEE TECHNOLOGY (HK) LIMITED",
|
|
@@ -67,54 +52,49 @@
|
|
|
67
52
|
"stylesheets",
|
|
68
53
|
"LICENSE",
|
|
69
54
|
"CHANGELOG.md",
|
|
70
|
-
"
|
|
55
|
+
"README.md"
|
|
71
56
|
],
|
|
72
57
|
"scripts": {
|
|
73
58
|
"dev": "vite --port=3088 --host 0.0.0.0",
|
|
74
|
-
"
|
|
59
|
+
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
60
|
+
"test": "node --test test/*.test.mjs",
|
|
61
|
+
"build": "rm -rf lib && vite build && tsc -p tsconfig.build.json",
|
|
75
62
|
"preview": "vite preview",
|
|
76
|
-
"docs": "
|
|
77
|
-
"packages": "node ./dev-tools/build-packages.js",
|
|
78
|
-
"postpublish": "cnpm sync @realsee/vreo",
|
|
79
|
-
"test:audio-focus": "node --test test/audio-focus.test.mjs"
|
|
63
|
+
"docs": "typedoc"
|
|
80
64
|
},
|
|
81
65
|
"peerDependencies": {
|
|
82
|
-
"@realsee/dnalogel": "
|
|
83
|
-
"@realsee/five": "^6.4.0-alpha.1",
|
|
84
|
-
"react": "^18.0.0",
|
|
85
|
-
"react-dom": "^18.0.0",
|
|
86
|
-
"three": "0.117.1"
|
|
87
|
-
},
|
|
88
|
-
"devDependencies": {
|
|
89
|
-
"@babel/cli": "^7.16.0",
|
|
90
|
-
"@babel/core": "^7.16.0",
|
|
91
|
-
"@babel/plugin-transform-runtime": "7.24.3",
|
|
92
|
-
"@babel/preset-env": "^7.16.4",
|
|
93
|
-
"@babel/preset-react": "^7.16.0",
|
|
94
|
-
"@babel/preset-typescript": "^7.16.0",
|
|
95
|
-
"@realsee/dnalogel": "3.81.10-alpha.4",
|
|
96
|
-
"@realsee/five": "^6.4.0-alpha.38",
|
|
97
|
-
"@tweenjs/tween.js": "18.6.4",
|
|
98
|
-
"@types/node": "^18.11.17",
|
|
99
|
-
"@types/offscreencanvas": "^2019.6.4",
|
|
100
|
-
"@types/react": "^18.3.23",
|
|
101
|
-
"@types/react-dom": "^18.3.7",
|
|
102
|
-
"@types/react-transition-group": "^4.4.4",
|
|
103
|
-
"@vitejs/plugin-react": "^4.3.3",
|
|
104
|
-
"babel-plugin-add-import-extension": "^1.6.0",
|
|
105
|
-
"cnpm": "^9.2.0",
|
|
106
|
-
"del": "^6.0.0",
|
|
66
|
+
"@realsee/dnalogel": "^4.0.0-webgpu.0",
|
|
107
67
|
"react": "^18.3.1",
|
|
108
68
|
"react-dom": "^18.3.1",
|
|
109
|
-
"three": "0.
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
69
|
+
"three": "0.183.2",
|
|
70
|
+
"mobx": "^7.0.0",
|
|
71
|
+
"mobx-react-lite": "^5.0.0",
|
|
72
|
+
"@realsee/five-webgpu": "^1.0.0-alpha.7"
|
|
73
|
+
},
|
|
74
|
+
"devDependencies": {
|
|
75
|
+
"@realsee/dnalogel": "4.0.0-webgpu.0",
|
|
76
|
+
"three": "0.183.2",
|
|
77
|
+
"react": "19.3.0",
|
|
78
|
+
"react-dom": "19.3.0",
|
|
79
|
+
"mobx": "7.0.3",
|
|
80
|
+
"mobx-react-lite": "5.0.3",
|
|
81
|
+
"@types/node": "22.20.0",
|
|
82
|
+
"@types/offscreencanvas": "2019.7.0",
|
|
83
|
+
"@types/react": "19.3.0",
|
|
84
|
+
"@types/react-dom": "19.3.0",
|
|
85
|
+
"@types/react-transition-group": "4.4.5",
|
|
86
|
+
"@vitejs/plugin-react": "6.1.1",
|
|
87
|
+
"typedoc": "0.28.20",
|
|
88
|
+
"typescript": "5.8.3",
|
|
89
|
+
"vite": "8.3.0",
|
|
90
|
+
"@realsee/five-webgpu": "1.0.0-alpha.6",
|
|
91
|
+
"@types/three": "0.183.1"
|
|
113
92
|
},
|
|
114
93
|
"dependencies": {
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
94
|
+
"classnames": "2.3.2",
|
|
95
|
+
"@tweenjs/tween.js": "18.6.4"
|
|
96
|
+
},
|
|
97
|
+
"sideEffects": [
|
|
98
|
+
"./stylesheets/**/*.css"
|
|
99
|
+
]
|
|
120
100
|
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
2
|
-
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
3
|
-
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
4
|
-
var BLANK_AUDIO = '' + 'data:audio/mpeg;base64,' + '//uQxAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAADAAAGhgBVVVVVVVVVVVVVVVVVVVVVVVV' + 'VVVVVVVVVVVVVVVVVVVWqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr///////////' + '////////////////////////////////8AAAA5TEFNRTMuOThyAc0AAAAAAAAAABSAJAiqQgAAg' + 'AAABobxtI73AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' + 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//uQxAACFEII9ACZ/sJZwWEoEb8w/////N//////Jcxj' + 'Hjf+7/v/H2PzCCFAiDtGeyBCIx7bJJ1mmEEMy6g8mm2c8nrGABB4h2Mkmn//4z/73u773R5qHHu' + '/j/w7Kxkzh5lWRWdsifCkNAnY9Zc1HvDAhjhSHdFkHFzLmabt/AQxSg2wwzLhHIJOBnAWwVY4zr' + 'hIYhhc2kvhYDfQ4hDi2Gmh5KyFn8EcGIrHAngNgIwVIEMf5bzbAiTRoAD///8z/KVhkkWEle6IX' + '+d/z4fvH3BShK1e5kmjkCMoxVmXhd4ROlTKo3iipasvTilY21q19ta30/v/0/idPX1v8PNxJL6r' + 'amnOVsdvMv2akO0iSYIzdJFirtzWXCZicS9vHqvSKyqm5XJBdqBwPxyfJdykhWTZ0G0ZyTZGpLK' + 'xsNwwoRhsx3tZfhwmeOBVISm3impAC/IT/8hP/EKEM1KMdVdVKM2rHV4x7HVXZvbVVKN/qq8CiV' + '9VL9jjH/6l6qf7MBCjZmOqsAibjcP+qqqv0oxqpa/NVW286hPo1nz2L/h8+jXt//uSxCmDU2IK/' + 'ECN98KKtE5IYzNoCfbw+u9i5r8PoadUMFPKqWL4LK3T/LCraMSHGkW4bpLXR/E6LlHOVQxmslKV' + 'J8IULktMN06N0FKCpHCoYsjC4F+Z0NVqdNFoGSTjSiyjzLdnZ2fNqTi2eHKONONKLMPMKLONKLM' + 'PQRJGlFxZRoKcJFAYEeIFiRQkUWUeYfef//Ko04soswso40UJAgMw8wosososy0EalnZyjQUGBR' + 'QGIFggOWUacWUeYmuadrZziQKKEgQsQLAhQkUJAgMQDghltLO1onp0cpkNInSFMqlYeSEJ5AHsq' + 'FdOwy1DA2sRmRJKxdKRfLhfLw5BzUxBTUUzLjk4LjJVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' + 'VVVVVVVVVVVVVVVVVUxBTUUzLjk4LjJVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' + 'VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' + 'VVVVVVVVVVVVVVVVVVVf/7ksRRA8AAAaQAAAAgAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVV' + 'VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' + 'VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' + 'VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' + 'VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' + 'VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' + 'VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV' + 'VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVU=';
|
|
5
|
-
export function createHTMLAudioElement() {
|
|
6
|
-
var ndAudio = document.querySelector('#vreo-playController-audio');
|
|
7
|
-
if (ndAudio) {
|
|
8
|
-
return ndAudio;
|
|
9
|
-
}
|
|
10
|
-
var audio = document.createElement('audio');
|
|
11
|
-
audio.style.display = 'none';
|
|
12
|
-
audio.setAttribute('id', 'vreo-playController-audio');
|
|
13
|
-
audio.controls = false;
|
|
14
|
-
document.body.appendChild(audio);
|
|
15
|
-
audio.src = BLANK_AUDIO;
|
|
16
|
-
|
|
17
|
-
// 触发一次播放
|
|
18
|
-
Promise.resolve(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
19
|
-
return _regenerator().w(function (_context) {
|
|
20
|
-
while (1) switch (_context.n) {
|
|
21
|
-
case 0:
|
|
22
|
-
_context.n = 1;
|
|
23
|
-
return audio.play();
|
|
24
|
-
case 1:
|
|
25
|
-
return _context.a(2, _context.v);
|
|
26
|
-
}
|
|
27
|
-
}, _callee);
|
|
28
|
-
})));
|
|
29
|
-
return audio;
|
|
30
|
-
}
|
package/lib/Player/App.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import { observer } from 'mobx-react';
|
|
4
|
-
import { useController } from "./hooks.js";
|
|
5
|
-
import { CameraMovement } from "./modules/keyframes/CameraMovement/index.js";
|
|
6
|
-
import { ResizeObserver } from "./modules/ResizeObserver/index.js";
|
|
7
|
-
import { InfoPanel } from "./modules/keyframes/InfoPanel/index.js";
|
|
8
|
-
import { ModelVideo } from "./modules/keyframes/ModelVideo/index.js";
|
|
9
|
-
import { PanoEffect } from "./modules/keyframes/PanoEffect/index.js";
|
|
10
|
-
import { PanoTag } from "./modules/keyframes/PanoTag/index.js";
|
|
11
|
-
import { PanoTextLabel } from "./modules/keyframes/PanoTextLabel/index.js";
|
|
12
|
-
import { Prompter } from "./modules/keyframes/Prompter/index.js";
|
|
13
|
-
import { UpdateVRPanorama } from "./modules/keyframes/UpdateVRPanorama/index.js";
|
|
14
|
-
import { VideoEffect } from "./modules/keyframes/VideoEffect/index.js";
|
|
15
|
-
import { VideoAgent } from "./modules/VideoAgent/index.js";
|
|
16
|
-
import { BgMusic } from "./modules/keyframes/BgMusic/index.js";
|
|
17
|
-
import { Wave } from "./modules/Wave/index.js";
|
|
18
|
-
var AppView = observer(function (_ref) {
|
|
19
|
-
var _controller$configs, _controller$waveAppea, _controller$configs3, _controller$configs4;
|
|
20
|
-
var controller = _ref.controller;
|
|
21
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
22
|
-
className: classNames('vreo-panel', {
|
|
23
|
-
'vreo-panel--hidden': !controller.visible
|
|
24
|
-
})
|
|
25
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
26
|
-
className: "vreo-panel-inner"
|
|
27
|
-
}, /*#__PURE__*/React.createElement(Wave, {
|
|
28
|
-
onClick: (_controller$configs = controller.configs) === null || _controller$configs === void 0 ? void 0 : _controller$configs.onWaveClick,
|
|
29
|
-
appearance: (_controller$waveAppea = controller.waveAppearance) !== null && _controller$waveAppea !== void 0 ? _controller$waveAppea : 'single',
|
|
30
|
-
staticPrefix: controller.configs.waveStaticPrefix
|
|
31
|
-
}), /*#__PURE__*/React.createElement(VideoAgent, {
|
|
32
|
-
onClick: function onClick() {
|
|
33
|
-
var _controller$configs2;
|
|
34
|
-
if ((_controller$configs2 = controller.configs) !== null && _controller$configs2 !== void 0 && _controller$configs2.onAvatarClick) {
|
|
35
|
-
controller.configs.onAvatarClick();
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
if (controller.playing) {
|
|
39
|
-
controller.playback.cancel();
|
|
40
|
-
} else {
|
|
41
|
-
if (controller.playback.begin(true)) controller.setPlaying(true);
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
options: ((_controller$configs3 = controller.configs) === null || _controller$configs3 === void 0 ? void 0 : _controller$configs3.videoAgentMeshOptions) || {}
|
|
45
|
-
}), /*#__PURE__*/React.createElement(Prompter, null), (_controller$configs4 = controller.configs) === null || _controller$configs4 === void 0 ? void 0 : _controller$configs4.customPanelChildren));
|
|
46
|
-
});
|
|
47
|
-
export function App() {
|
|
48
|
-
var controller = useController();
|
|
49
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ResizeObserver, null), /*#__PURE__*/React.createElement(CameraMovement, null), /*#__PURE__*/React.createElement(ModelVideo, null), /*#__PURE__*/React.createElement(UpdateVRPanorama, null), /*#__PURE__*/React.createElement(VideoEffect, null), /*#__PURE__*/React.createElement(PanoTag, null), /*#__PURE__*/React.createElement(PanoTextLabel, null), /*#__PURE__*/React.createElement(InfoPanel, null), /*#__PURE__*/React.createElement(PanoEffect, null), /*#__PURE__*/React.createElement(BgMusic, null)), /*#__PURE__*/React.createElement(AppView, {
|
|
50
|
-
controller: controller
|
|
51
|
-
}));
|
|
52
|
-
}
|