@realsee/vreo 2.4.0 → 2.4.2
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/lib/PlayController/createHTMLAudioElement.js +12 -22
- package/lib/PlayController/index.js +70 -137
- package/lib/Player/App.d.ts +2 -2
- package/lib/Player/App.js +1 -28
- package/lib/Player/Controller.d.ts +3 -3
- package/lib/Player/Controller.js +46 -110
- package/lib/Player/custom/SpatialScenePanel/index.d.ts +2 -2
- package/lib/Player/custom/SpatialScenePanel/index.js +75 -72
- package/lib/Player/hooks.d.ts +3 -3
- package/lib/Player/hooks.js +0 -10
- package/lib/Player/index.js +109 -175
- package/lib/Player/modules/Drawer/index.d.ts +2 -2
- package/lib/Player/modules/Drawer/index.js +2 -21
- package/lib/Player/modules/PopUp/index.d.ts +2 -2
- package/lib/Player/modules/PopUp/index.js +1 -12
- package/lib/Player/modules/ResizeObserver/index.d.ts +2 -2
- package/lib/Player/modules/ResizeObserver/index.js +0 -8
- package/lib/Player/modules/VideoAgent/VideoAgentMesh.js +146 -245
- package/lib/Player/modules/VideoAgent/VideoAgentScene.js +7 -23
- package/lib/Player/modules/VideoAgent/index.d.ts +2 -2
- package/lib/Player/modules/VideoAgent/index.js +2 -20
- package/lib/Player/modules/Wave/index.d.ts +2 -2
- package/lib/Player/modules/Wave/index.js +12 -34
- package/lib/Player/modules/keyframes/BgMusic/index.d.ts +2 -2
- package/lib/Player/modules/keyframes/BgMusic/index.js +41 -64
- package/lib/Player/modules/keyframes/CameraMovement/index.d.ts +2 -2
- package/lib/Player/modules/keyframes/CameraMovement/index.js +42 -71
- package/lib/Player/modules/keyframes/InfoPanel/index.d.ts +2 -2
- package/lib/Player/modules/keyframes/InfoPanel/index.js +16 -47
- package/lib/Player/modules/keyframes/ModelVideo/index.d.ts +2 -2
- package/lib/Player/modules/keyframes/ModelVideo/index.js +52 -83
- package/lib/Player/modules/keyframes/PanoEffect/index.d.ts +2 -2
- package/lib/Player/modules/keyframes/PanoEffect/index.js +16 -40
- package/lib/Player/modules/keyframes/PanoEffect/lineAnime.js +1 -9
- package/lib/Player/modules/keyframes/PanoTag/index.d.ts +1 -1
- package/lib/Player/modules/keyframes/PanoTag/index.js +6 -25
- package/lib/Player/modules/keyframes/PanoTextLabel/index.d.ts +2 -2
- package/lib/Player/modules/keyframes/PanoTextLabel/index.js +31 -50
- package/lib/Player/modules/keyframes/Prompter/index.d.ts +2 -2
- package/lib/Player/modules/keyframes/Prompter/index.js +11 -29
- package/lib/Player/modules/keyframes/UpdateVRPanorama/index.d.ts +2 -2
- package/lib/Player/modules/keyframes/UpdateVRPanorama/index.js +25 -29
- package/lib/Player/modules/keyframes/VideoEffect/index.d.ts +2 -2
- package/lib/Player/modules/keyframes/VideoEffect/index.js +52 -87
- package/lib/Player/typings.d.ts +7 -4
- package/lib/fivePlugins/CSS3DRenderPlugin/centerPoint.js +0 -2
- package/lib/fivePlugins/CSS3DRenderPlugin/createResizeObserver.js +0 -1
- package/lib/fivePlugins/CSS3DRenderPlugin/evenNumber.js +0 -1
- package/lib/fivePlugins/CSS3DRenderPlugin/index.d.ts +1 -1
- package/lib/fivePlugins/CSS3DRenderPlugin/index.js +42 -81
- package/lib/fivePlugins/CSS3DRenderPlugin/transformPositionToVector3.js +3 -7
- package/lib/fivePlugins/CameraMovementPlugin/index.js +181 -241
- package/lib/fivePlugins/CameraMovementPlugin/typings.d.ts +4 -4
- package/lib/fivePlugins/CameraMovementPlugin/typings.js +6 -12
- package/lib/fivePlugins/ModelTVVideoPlugin/index.js +37 -87
- package/lib/index.js +0 -1
- package/lib/react/index.d.ts +2 -1
- package/lib/react/index.js +10 -35
- package/lib/shared-utils/Audio.js +57 -106
- package/lib/shared-utils/AudioLike.d.ts +1 -1
- package/lib/shared-utils/AudioLike.js +19 -46
- package/lib/shared-utils/Preloader.js +2 -10
- package/lib/shared-utils/addResizeListener.d.ts +1 -1
- package/lib/shared-utils/addResizeListener.js +0 -5
- package/lib/shared-utils/animationFrame/BetterTween.d.ts +1 -1
- package/lib/shared-utils/animationFrame/BetterTween.js +14 -45
- package/lib/shared-utils/animationFrame/index.d.ts +1 -2
- package/lib/shared-utils/animationFrame/index.js +3 -12
- package/lib/shared-utils/animationFrame/tween.d.ts +2 -2
- package/lib/shared-utils/animationFrame/tween.js +3 -14
- package/lib/shared-utils/createTransMatrix.js +1 -10
- package/lib/shared-utils/getFileExpandedName.js +0 -1
- package/lib/shared-utils/getMediaInfo.d.ts +3 -3
- package/lib/shared-utils/getMediaInfo.js +0 -10
- package/lib/shared-utils/setElementDataset.js +0 -2
- package/lib/typings/VreoUnit.d.ts +16 -16
- package/lib/typings/VreoUnit.js +115 -47
- package/package.json +3 -2
|
@@ -7,39 +7,32 @@ exports["default"] = void 0;
|
|
|
7
7
|
exports.getFrameTime = getFrameTime;
|
|
8
8
|
exports.nextFrame = nextFrame;
|
|
9
9
|
exports.requestAnimationFrameInterval = requestAnimationFrameInterval;
|
|
10
|
-
|
|
11
10
|
var _requestAnimationFrame = window.requestAnimationFrame || function (fn) {
|
|
12
11
|
return setTimeout(function () {
|
|
13
12
|
return fn(performance.now());
|
|
14
13
|
}, 16);
|
|
15
14
|
};
|
|
16
|
-
|
|
17
15
|
var _cancelAnimationFrame = window.cancelAnimationFrame || clearTimeout;
|
|
18
|
-
|
|
19
|
-
var _default = _requestAnimationFrame;
|
|
20
|
-
exports["default"] = _default;
|
|
21
|
-
|
|
16
|
+
var _default = exports["default"] = _requestAnimationFrame;
|
|
22
17
|
function nextFrame(fn) {
|
|
23
18
|
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
24
19
|
if (delay <= 0) _requestAnimationFrame(fn);else _requestAnimationFrame(function () {
|
|
25
20
|
return nextFrame(fn, delay - 1);
|
|
26
21
|
});
|
|
27
22
|
}
|
|
23
|
+
|
|
28
24
|
/**
|
|
29
25
|
* 在每个 AnimationFrame 中调用传入的函数
|
|
30
26
|
* @param callback 每次 AnimationFrame 中调用的函数
|
|
31
27
|
* @param frame 每秒运行多少次
|
|
32
28
|
* @returns 返回一个函数,调用可以停止 AnimationFrameLoop
|
|
33
29
|
*/
|
|
34
|
-
|
|
35
|
-
|
|
36
30
|
function requestAnimationFrameInterval(callback) {
|
|
37
31
|
var frame = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 60;
|
|
38
32
|
var index = -1;
|
|
39
33
|
var oldTime = 0;
|
|
40
34
|
var startTime = -1;
|
|
41
35
|
var minDeltaTime = 1000 / frame;
|
|
42
|
-
|
|
43
36
|
function loop(time) {
|
|
44
37
|
startTime === -1 && (startTime = time);
|
|
45
38
|
index = _requestAnimationFrame(loop);
|
|
@@ -48,18 +41,16 @@ function requestAnimationFrameInterval(callback) {
|
|
|
48
41
|
oldTime = time;
|
|
49
42
|
callback && callback(time - startTime);
|
|
50
43
|
}
|
|
51
|
-
|
|
52
44
|
index = _requestAnimationFrame(loop);
|
|
53
45
|
return function stop() {
|
|
54
46
|
_cancelAnimationFrame(index);
|
|
55
47
|
};
|
|
56
48
|
}
|
|
49
|
+
|
|
57
50
|
/**
|
|
58
51
|
* 获取两个 AnimationFrame 间隔的时间
|
|
59
52
|
* @returns 返回一个 Promise,resolve 的结果是两个 AnimationFrame 间隔的时间
|
|
60
53
|
*/
|
|
61
|
-
|
|
62
|
-
|
|
63
54
|
function getFrameTime() {
|
|
64
55
|
var start = Date.now();
|
|
65
56
|
return new Promise(function (resolve) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Tween, Easing } from '@tweenjs/tween.js';
|
|
2
|
-
interface ITween<T
|
|
2
|
+
interface ITween<T extends Record<string, any>> extends Tween<T> {
|
|
3
3
|
onDestroy: (fn: () => void) => Tween<T>;
|
|
4
4
|
destroy: () => void;
|
|
5
5
|
}
|
|
@@ -13,7 +13,7 @@ interface ITween<T> extends Tween<T> {
|
|
|
13
13
|
* @param duration 经历时间(s)
|
|
14
14
|
* @param easing 过程动画,默认是 Easing.Linear.None
|
|
15
15
|
*/
|
|
16
|
-
export default function tween<T
|
|
16
|
+
export default function tween<T extends Record<string, any>>(from: T, to: T, duration: number, easing?: (amount: number) => number): ITween<T>;
|
|
17
17
|
export declare function tweenProgress(duration: number, easing: typeof Easing.Linear.None): ITween<{
|
|
18
18
|
progress: number;
|
|
19
19
|
}>;
|
|
@@ -5,11 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = tween;
|
|
7
7
|
exports.tweenProgress = tweenProgress;
|
|
8
|
-
|
|
9
8
|
var _tween = require("@tweenjs/tween.js");
|
|
10
|
-
|
|
11
9
|
var _index = require("./index");
|
|
12
|
-
|
|
13
10
|
/**
|
|
14
11
|
* 对象变化的补间动画
|
|
15
12
|
* 1. 应用 requestAnimationFrameInterval 做 update
|
|
@@ -22,8 +19,8 @@ var _index = require("./index");
|
|
|
22
19
|
*/
|
|
23
20
|
function tween(from, to, duration) {
|
|
24
21
|
var easing = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : _tween.Easing.Linear.None;
|
|
25
|
-
var tween = new _tween.Tween(from).to(to, duration).easing(easing);
|
|
26
|
-
|
|
22
|
+
var tween = new _tween.Tween(from).to(to, duration).easing(easing);
|
|
23
|
+
// 这里注意一下,因为 requestAnimationFrameInterval 给的时间是从 0 开始的,tween 动画也从 0 开始
|
|
27
24
|
(0, _index.nextFrame)(function () {
|
|
28
25
|
return tween.start(0);
|
|
29
26
|
});
|
|
@@ -31,12 +28,10 @@ function tween(from, to, duration) {
|
|
|
31
28
|
if (tween.update(time) === false) cancelAnimationFrame();
|
|
32
29
|
});
|
|
33
30
|
var destroyMethods = [];
|
|
34
|
-
|
|
35
31
|
tween.onDestroy = function (fn) {
|
|
36
32
|
destroyMethods.push(fn);
|
|
37
33
|
return tween;
|
|
38
34
|
};
|
|
39
|
-
|
|
40
35
|
tween.destroy = function () {
|
|
41
36
|
this.stop();
|
|
42
37
|
Object.assign(tween, {
|
|
@@ -46,17 +41,11 @@ function tween(from, to, duration) {
|
|
|
46
41
|
_onStopCallbackL: null
|
|
47
42
|
});
|
|
48
43
|
var destroyMethod;
|
|
49
|
-
|
|
50
|
-
while (destroyMethod = destroyMethods.shift()) {
|
|
51
|
-
destroyMethod();
|
|
52
|
-
}
|
|
53
|
-
|
|
44
|
+
while (destroyMethod = destroyMethods.shift()) destroyMethod();
|
|
54
45
|
cancelAnimationFrame();
|
|
55
46
|
};
|
|
56
|
-
|
|
57
47
|
return tween;
|
|
58
48
|
}
|
|
59
|
-
|
|
60
49
|
function tweenProgress(duration, easing) {
|
|
61
50
|
return tween({
|
|
62
51
|
progress: 0
|
|
@@ -1,24 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports.createTransMatrix = createTransMatrix;
|
|
11
|
-
|
|
12
9
|
var _construct2 = _interopRequireDefault(require("@babel/runtime/helpers/construct"));
|
|
13
|
-
|
|
14
10
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
15
|
-
|
|
16
11
|
var THREE = _interopRequireWildcard(require("three"));
|
|
17
|
-
|
|
18
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
-
|
|
20
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
-
|
|
12
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
22
13
|
function createTransMatrix(arr1) {
|
|
23
14
|
var matrix4 = new THREE.Matrix4();
|
|
24
15
|
matrix4.fromArray(arr1);
|
|
@@ -3,7 +3,7 @@ export default function getMediaInfo(fileUrl: string): Promise<{
|
|
|
3
3
|
type?: 'video' | 'audio' | 'image' | 'unknown' | undefined;
|
|
4
4
|
error?: string | undefined;
|
|
5
5
|
}>;
|
|
6
|
-
export declare function getMediaType(url?: string): "
|
|
7
|
-
export declare function getMediaTypeByExpandedName(fileExpandedName?: string | null): "
|
|
8
|
-
export declare function getMediaTypeByUrl(fileUrl?: string | null): "
|
|
6
|
+
export declare function getMediaType(url?: string): "video" | "audio" | "image" | "unknown";
|
|
7
|
+
export declare function getMediaTypeByExpandedName(fileExpandedName?: string | null): "video" | "audio" | "image" | "unknown";
|
|
8
|
+
export declare function getMediaTypeByUrl(fileUrl?: string | null): "video" | "audio" | "image" | "unknown" | undefined;
|
|
9
9
|
export declare function getFileName(fileUrl?: string): string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
@@ -10,20 +9,16 @@ exports.getFileName = getFileName;
|
|
|
10
9
|
exports.getMediaType = getMediaType;
|
|
11
10
|
exports.getMediaTypeByExpandedName = getMediaTypeByExpandedName;
|
|
12
11
|
exports.getMediaTypeByUrl = getMediaTypeByUrl;
|
|
13
|
-
|
|
14
12
|
var _getFileExpandedName = _interopRequireDefault(require("./getFileExpandedName"));
|
|
15
|
-
|
|
16
13
|
function getMediaInfo(fileUrl) {
|
|
17
14
|
var type = getMediaType(fileUrl);
|
|
18
15
|
if (!type) return Promise.resolve({
|
|
19
16
|
error: '未知的文件类型: ' + fileUrl
|
|
20
17
|
});
|
|
21
|
-
|
|
22
18
|
var mediaElement = function () {
|
|
23
19
|
if (type === 'video') return document.createElement('video');
|
|
24
20
|
if (type === 'audio') return document.createElement('audio');
|
|
25
21
|
}();
|
|
26
|
-
|
|
27
22
|
if (!mediaElement) return Promise.resolve({
|
|
28
23
|
error: 'Unknown media element'
|
|
29
24
|
});
|
|
@@ -34,7 +29,6 @@ function getMediaInfo(fileUrl) {
|
|
|
34
29
|
error: 'onerror'
|
|
35
30
|
});
|
|
36
31
|
};
|
|
37
|
-
|
|
38
32
|
mediaElement.onloadedmetadata = function () {
|
|
39
33
|
resolve({
|
|
40
34
|
duration: mediaElement.duration * 1000,
|
|
@@ -43,13 +37,11 @@ function getMediaInfo(fileUrl) {
|
|
|
43
37
|
};
|
|
44
38
|
});
|
|
45
39
|
}
|
|
46
|
-
|
|
47
40
|
function getMediaType(url) {
|
|
48
41
|
var fileExpandedName = (0, _getFileExpandedName["default"])(url);
|
|
49
42
|
var type = getMediaTypeByExpandedName(fileExpandedName);
|
|
50
43
|
return type;
|
|
51
44
|
}
|
|
52
|
-
|
|
53
45
|
function getMediaTypeByExpandedName(fileExpandedName) {
|
|
54
46
|
if (!fileExpandedName) return 'unknown';
|
|
55
47
|
if (/jpg|jpeg|png$/.test(fileExpandedName)) return 'image';
|
|
@@ -57,13 +49,11 @@ function getMediaTypeByExpandedName(fileExpandedName) {
|
|
|
57
49
|
if (/avi|wmv|mpeg|mp4|m4v|mov|asf|flv|f4v|rmvb|rm|3gp|vob$/.test(fileExpandedName)) return 'video';
|
|
58
50
|
return 'unknown';
|
|
59
51
|
}
|
|
60
|
-
|
|
61
52
|
function getMediaTypeByUrl(fileUrl) {
|
|
62
53
|
if (!fileUrl) return;
|
|
63
54
|
var fileExpandedName = (0, _getFileExpandedName["default"])(fileUrl);
|
|
64
55
|
return getMediaTypeByExpandedName(fileExpandedName);
|
|
65
56
|
}
|
|
66
|
-
|
|
67
57
|
function getFileName(fileUrl) {
|
|
68
58
|
if (!fileUrl) return '';
|
|
69
59
|
var index1 = fileUrl.lastIndexOf('/');
|
|
@@ -4,12 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = setElementDataset;
|
|
7
|
-
|
|
8
7
|
function setElementDataset(element, dataset) {
|
|
9
8
|
if (element) {
|
|
10
9
|
Object.keys(dataset).forEach(function (key) {
|
|
11
10
|
var value = dataset[key].toString();
|
|
12
|
-
|
|
13
11
|
if (element instanceof Element) {
|
|
14
12
|
element.setAttribute("data-".concat(key), value);
|
|
15
13
|
} else if (element instanceof Document) {
|
|
@@ -51,7 +51,7 @@ export declare enum VreoKeyframeEnum {
|
|
|
51
51
|
/**
|
|
52
52
|
* 支持自定义剧本关键帧配置项
|
|
53
53
|
*/
|
|
54
|
-
export
|
|
54
|
+
export type VreoKeyframeConfigMap = {
|
|
55
55
|
PanoTag?: false;
|
|
56
56
|
PanoTextLabel?: false;
|
|
57
57
|
Prompter?: false;
|
|
@@ -98,7 +98,7 @@ export interface VreoUnit {
|
|
|
98
98
|
/**
|
|
99
99
|
* 剧本事件
|
|
100
100
|
*/
|
|
101
|
-
export
|
|
101
|
+
export type VreoKeyframeEvent = {
|
|
102
102
|
[key in VreoKeyframeEnum]: (keyframe: VreoKeyframe, currentTime: number) => void;
|
|
103
103
|
} & {
|
|
104
104
|
loaded: (vreoUnit: VreoUnit) => void;
|
|
@@ -110,7 +110,7 @@ export declare type VreoKeyframeEvent = {
|
|
|
110
110
|
/**
|
|
111
111
|
* 相机运动
|
|
112
112
|
*/
|
|
113
|
-
export
|
|
113
|
+
export type CameraMovementData = {
|
|
114
114
|
effect?: CameraMovementEffect;
|
|
115
115
|
transEffect?: "fly" | "fade" | "instant";
|
|
116
116
|
mode: Mode;
|
|
@@ -122,13 +122,13 @@ export declare type CameraMovementData = {
|
|
|
122
122
|
/**
|
|
123
123
|
* 提词器
|
|
124
124
|
*/
|
|
125
|
-
export
|
|
125
|
+
export type PrompterData = {
|
|
126
126
|
text: string;
|
|
127
127
|
};
|
|
128
128
|
/**
|
|
129
129
|
* VR 全景切换
|
|
130
130
|
*/
|
|
131
|
-
export
|
|
131
|
+
export type UpdateVRPanoramaData = {
|
|
132
132
|
_signature: string;
|
|
133
133
|
allow_hosts: string[];
|
|
134
134
|
certificate: string;
|
|
@@ -157,15 +157,15 @@ export interface Vertex {
|
|
|
157
157
|
/**
|
|
158
158
|
* 矩形顶点
|
|
159
159
|
*/
|
|
160
|
-
export
|
|
160
|
+
export type QuadrangleVertexs = [Vertex, Vertex, Vertex, Vertex];
|
|
161
161
|
/**
|
|
162
162
|
* 顶点数组
|
|
163
163
|
*/
|
|
164
|
-
export
|
|
164
|
+
export type Vertexs = Vertex[];
|
|
165
165
|
/**
|
|
166
166
|
* 视频广告
|
|
167
167
|
*/
|
|
168
|
-
export
|
|
168
|
+
export type ModelVideoData = {
|
|
169
169
|
/**
|
|
170
170
|
* 视频素材
|
|
171
171
|
*/
|
|
@@ -183,7 +183,7 @@ export declare type ModelVideoData = {
|
|
|
183
183
|
/**
|
|
184
184
|
* 四元数
|
|
185
185
|
*/
|
|
186
|
-
export
|
|
186
|
+
export type Quaternion = {
|
|
187
187
|
x: number;
|
|
188
188
|
y: number;
|
|
189
189
|
z: number;
|
|
@@ -192,7 +192,7 @@ export declare type Quaternion = {
|
|
|
192
192
|
/**
|
|
193
193
|
* 全景文本标签
|
|
194
194
|
*/
|
|
195
|
-
export
|
|
195
|
+
export type PanoTextLabelData = {
|
|
196
196
|
text: string;
|
|
197
197
|
vertex: Vertex;
|
|
198
198
|
normal?: Vertex;
|
|
@@ -219,7 +219,7 @@ export declare enum PanoTagStyleEnum {
|
|
|
219
219
|
*/
|
|
220
220
|
Expand = "Expand"
|
|
221
221
|
}
|
|
222
|
-
export
|
|
222
|
+
export type PanoTagData = {
|
|
223
223
|
type: PanoTagEnum;
|
|
224
224
|
style: PanoTagStyleEnum;
|
|
225
225
|
text: string;
|
|
@@ -238,7 +238,7 @@ export declare enum PanoEffectEnum {
|
|
|
238
238
|
/**
|
|
239
239
|
* 全景特效
|
|
240
240
|
*/
|
|
241
|
-
export
|
|
241
|
+
export type PanoEffectData = {
|
|
242
242
|
effect: PanoEffectEnum;
|
|
243
243
|
twoVertexs: [Vertex, Vertex];
|
|
244
244
|
};
|
|
@@ -256,7 +256,7 @@ export declare enum InfoPanelStyleEnum {
|
|
|
256
256
|
/**
|
|
257
257
|
* 信息面板
|
|
258
258
|
*/
|
|
259
|
-
export
|
|
259
|
+
export type InfoPanelData = {
|
|
260
260
|
type: InfoPanelTypeEnum;
|
|
261
261
|
style?: InfoPanelStyleEnum;
|
|
262
262
|
url: string;
|
|
@@ -266,7 +266,7 @@ export declare type InfoPanelData = {
|
|
|
266
266
|
/**
|
|
267
267
|
* 视频特效
|
|
268
268
|
*/
|
|
269
|
-
export
|
|
269
|
+
export type VideoEffectData = {
|
|
270
270
|
videoSrc: string;
|
|
271
271
|
panoIndex: number;
|
|
272
272
|
fov: number;
|
|
@@ -276,8 +276,8 @@ export declare type VideoEffectData = {
|
|
|
276
276
|
/**
|
|
277
277
|
* 背景音乐
|
|
278
278
|
*/
|
|
279
|
-
export
|
|
279
|
+
export type BgMusicData = {
|
|
280
280
|
url: string;
|
|
281
281
|
};
|
|
282
282
|
/** 自定义序列帧 */
|
|
283
|
-
export
|
|
283
|
+
export type CustomData = Record<string, any>;
|
package/lib/typings/VreoUnit.js
CHANGED
|
@@ -4,84 +4,152 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.VreoKeyframeEnum = exports.PanoTagStyleEnum = exports.PanoTagEnum = exports.PanoEffectEnum = exports.InfoPanelTypeEnum = exports.InfoPanelStyleEnum = void 0;
|
|
7
|
-
var VreoKeyframeEnum
|
|
8
|
-
/**
|
|
9
|
-
* 支持自定义剧本关键帧配置项
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
exports.VreoKeyframeEnum = VreoKeyframeEnum;
|
|
13
|
-
|
|
14
|
-
(function (VreoKeyframeEnum) {
|
|
7
|
+
var VreoKeyframeEnum = exports.VreoKeyframeEnum = /*#__PURE__*/function (VreoKeyframeEnum) {
|
|
8
|
+
/** 运镜 */
|
|
15
9
|
VreoKeyframeEnum["CameraMovement"] = "CameraMovement";
|
|
10
|
+
/**
|
|
11
|
+
* 全景标签
|
|
12
|
+
*/
|
|
16
13
|
VreoKeyframeEnum["PanoTag"] = "PanoTag";
|
|
14
|
+
/**
|
|
15
|
+
* 全景文本标签
|
|
16
|
+
*/
|
|
17
17
|
VreoKeyframeEnum["PanoTextLabel"] = "PanoTextLabel";
|
|
18
|
+
/**
|
|
19
|
+
* 提词器
|
|
20
|
+
*/
|
|
18
21
|
VreoKeyframeEnum["Prompter"] = "Prompter";
|
|
22
|
+
/**
|
|
23
|
+
* 更新 VR 全景
|
|
24
|
+
*/
|
|
19
25
|
VreoKeyframeEnum["UpdateVRPanorama"] = "UpdateVRPanorama";
|
|
26
|
+
/**
|
|
27
|
+
* 视频广告
|
|
28
|
+
*/
|
|
20
29
|
VreoKeyframeEnum["ModelVideo"] = "ModelVideo";
|
|
30
|
+
/**
|
|
31
|
+
* 全景特效
|
|
32
|
+
*/
|
|
21
33
|
VreoKeyframeEnum["PanoEffect"] = "PanoEffect";
|
|
34
|
+
/**
|
|
35
|
+
* 信息面板
|
|
36
|
+
*/
|
|
22
37
|
VreoKeyframeEnum["InfoPanel"] = "InfoPanel";
|
|
38
|
+
/**
|
|
39
|
+
* 视频特效
|
|
40
|
+
*/
|
|
23
41
|
VreoKeyframeEnum["VideoEffect"] = "VideoEffect";
|
|
42
|
+
/**
|
|
43
|
+
* 背景音乐
|
|
44
|
+
*/
|
|
24
45
|
VreoKeyframeEnum["BgMusic"] = "BgMusic";
|
|
46
|
+
/**
|
|
47
|
+
* 结束
|
|
48
|
+
*/
|
|
25
49
|
VreoKeyframeEnum["Exit"] = "Exit";
|
|
50
|
+
/**
|
|
51
|
+
* 自定义剧本帧
|
|
52
|
+
*/
|
|
26
53
|
VreoKeyframeEnum["Custom"] = "Custom";
|
|
27
|
-
|
|
28
|
-
|
|
54
|
+
return VreoKeyframeEnum;
|
|
55
|
+
}({});
|
|
29
56
|
/**
|
|
30
|
-
*
|
|
57
|
+
* 支持自定义剧本关键帧配置项
|
|
31
58
|
*/
|
|
32
|
-
var PanoTagEnum;
|
|
33
59
|
/**
|
|
34
|
-
*
|
|
60
|
+
* 剧本关键帧
|
|
35
61
|
*/
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
62
|
+
/**
|
|
63
|
+
* 虚拟视频角色
|
|
64
|
+
*/
|
|
65
|
+
/**
|
|
66
|
+
* 剧本结构
|
|
67
|
+
*/
|
|
68
|
+
/**
|
|
69
|
+
* 剧本事件
|
|
70
|
+
*/
|
|
71
|
+
/**
|
|
72
|
+
* 相机运动
|
|
73
|
+
*/
|
|
74
|
+
/**
|
|
75
|
+
* 提词器
|
|
76
|
+
*/
|
|
77
|
+
/**
|
|
78
|
+
* VR 全景切换
|
|
79
|
+
*/
|
|
80
|
+
/**
|
|
81
|
+
* 顶点
|
|
82
|
+
*/
|
|
83
|
+
/**
|
|
84
|
+
* 矩形顶点
|
|
85
|
+
*/
|
|
86
|
+
/**
|
|
87
|
+
* 顶点数组
|
|
88
|
+
*/
|
|
89
|
+
/**
|
|
90
|
+
* 视频广告
|
|
91
|
+
*/
|
|
92
|
+
/**
|
|
93
|
+
* 四元数
|
|
94
|
+
*/
|
|
95
|
+
/**
|
|
96
|
+
* 全景文本标签
|
|
97
|
+
*/
|
|
98
|
+
/**
|
|
99
|
+
* 全景标签枚举
|
|
100
|
+
*/
|
|
101
|
+
var PanoTagEnum = exports.PanoTagEnum = /*#__PURE__*/function (PanoTagEnum) {
|
|
40
102
|
PanoTagEnum["Text"] = "Text";
|
|
41
103
|
PanoTagEnum["Image"] = "Image";
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
104
|
+
return PanoTagEnum;
|
|
105
|
+
}({});
|
|
106
|
+
/**
|
|
107
|
+
* 标签样式种类
|
|
108
|
+
*/
|
|
109
|
+
var PanoTagStyleEnum = exports.PanoTagStyleEnum = /*#__PURE__*/function (PanoTagStyleEnum) {
|
|
110
|
+
/**
|
|
111
|
+
* 生长动画:默认值
|
|
112
|
+
*/
|
|
48
113
|
PanoTagStyleEnum["Growth"] = "Growth";
|
|
114
|
+
/**
|
|
115
|
+
* 展开动画
|
|
116
|
+
*/
|
|
49
117
|
PanoTagStyleEnum["Expand"] = "Expand";
|
|
50
|
-
|
|
51
|
-
|
|
118
|
+
return PanoTagStyleEnum;
|
|
119
|
+
}({});
|
|
52
120
|
/**
|
|
53
121
|
* 全景特效枚举
|
|
54
122
|
*/
|
|
55
|
-
var PanoEffectEnum
|
|
123
|
+
var PanoEffectEnum = exports.PanoEffectEnum = /*#__PURE__*/function (PanoEffectEnum) {
|
|
124
|
+
/**
|
|
125
|
+
* 两点距离
|
|
126
|
+
*/
|
|
127
|
+
PanoEffectEnum["Distance"] = "Distance";
|
|
128
|
+
return PanoEffectEnum;
|
|
129
|
+
}({});
|
|
56
130
|
/**
|
|
57
131
|
* 全景特效
|
|
58
132
|
*/
|
|
59
|
-
|
|
60
|
-
exports.PanoEffectEnum = PanoEffectEnum;
|
|
61
|
-
|
|
62
|
-
(function (PanoEffectEnum) {
|
|
63
|
-
PanoEffectEnum["Distance"] = "Distance";
|
|
64
|
-
})(PanoEffectEnum || (exports.PanoEffectEnum = PanoEffectEnum = {}));
|
|
65
|
-
|
|
66
133
|
/**
|
|
67
134
|
* 信息面板类型枚举
|
|
68
135
|
*/
|
|
69
|
-
var InfoPanelTypeEnum
|
|
70
|
-
exports.InfoPanelTypeEnum = InfoPanelTypeEnum;
|
|
71
|
-
|
|
72
|
-
(function (InfoPanelTypeEnum) {
|
|
136
|
+
var InfoPanelTypeEnum = exports.InfoPanelTypeEnum = /*#__PURE__*/function (InfoPanelTypeEnum) {
|
|
73
137
|
InfoPanelTypeEnum["Image"] = "Image";
|
|
74
138
|
InfoPanelTypeEnum["Video"] = "Video";
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
var InfoPanelStyleEnum
|
|
139
|
+
return InfoPanelTypeEnum;
|
|
140
|
+
}({});
|
|
141
|
+
var InfoPanelStyleEnum = exports.InfoPanelStyleEnum = /*#__PURE__*/function (InfoPanelStyleEnum) {
|
|
142
|
+
InfoPanelStyleEnum["Drawer"] = "Drawer";
|
|
143
|
+
InfoPanelStyleEnum["PopUp"] = "PopUp";
|
|
144
|
+
return InfoPanelStyleEnum;
|
|
145
|
+
}({});
|
|
78
146
|
/**
|
|
79
147
|
* 信息面板
|
|
80
148
|
*/
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
149
|
+
/**
|
|
150
|
+
* 视频特效
|
|
151
|
+
*/
|
|
152
|
+
/**
|
|
153
|
+
* 背景音乐
|
|
154
|
+
*/
|
|
155
|
+
/** 自定义序列帧 */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@realsee/vreo",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.2",
|
|
4
4
|
"description": "Vreo (VR Video 缩写) 是基于如视三维渲染引擎 Five 和 用户界面构建库 React 实现的如视 3D 空间剧本播放器。",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"realsee",
|
|
@@ -44,7 +44,6 @@
|
|
|
44
44
|
"@babel/preset-typescript": "^7.16.0",
|
|
45
45
|
"@realsee/dnalogel": "^3.67.1",
|
|
46
46
|
"@realsee/five": "^6.4.0-alpha.36",
|
|
47
|
-
"@tweenjs/tween.js": "18.6.4",
|
|
48
47
|
"@types/node": "^22.0.0",
|
|
49
48
|
"@types/offscreencanvas": "^2019.6.4",
|
|
50
49
|
"@types/react": "^18",
|
|
@@ -61,6 +60,8 @@
|
|
|
61
60
|
"vite": "^2.6.14"
|
|
62
61
|
},
|
|
63
62
|
"dependencies": {
|
|
63
|
+
"@babel/runtime": "^7.16.0",
|
|
64
|
+
"@tweenjs/tween.js": "18.6.4",
|
|
64
65
|
"classnames": "^2.3.1",
|
|
65
66
|
"mobx": "^6.3.7",
|
|
66
67
|
"mobx-react": "^7.2.1"
|