@realsee/vreo 2.6.4-alpha.4 → 2.6.4
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/lib/PlayController/createHTMLAudioElement.js +14 -10
- package/lib/PlayController/index.js +73 -63
- package/lib/Player/Controller.js +56 -50
- package/lib/Player/PlaybackLifecycle.js +7 -6
- package/lib/Player/custom/SpatialScenePanel/index.js +11 -34
- package/lib/Player/index.js +166 -160
- package/lib/Player/modules/Drawer/index.js +2 -1
- package/lib/Player/modules/VideoAgent/VideoAgentMesh.js +157 -146
- package/lib/Player/modules/VideoAgent/VideoAgentScene.js +1 -1
- package/lib/Player/modules/VideoAgent/index.js +3 -3
- package/lib/Player/modules/keyframes/BgMusic/index.js +12 -12
- package/lib/Player/modules/keyframes/CameraMovement/index.js +45 -43
- package/lib/Player/modules/keyframes/InfoPanel/index.js +8 -8
- package/lib/Player/modules/keyframes/ModelVideo/index.js +83 -81
- package/lib/Player/modules/keyframes/PanoTag/index.js +1 -1
- package/lib/Player/modules/keyframes/PanoTextLabel/index.js +3 -3
- package/lib/Player/modules/keyframes/UpdateVRPanorama/index.js +3 -3
- package/lib/Player/modules/keyframes/VideoEffect/index.js +71 -69
- package/lib/fivePlugins/CSS3DRenderPlugin/index.js +6 -6
- package/lib/fivePlugins/CameraMovementPlugin/index.js +180 -173
- package/lib/fivePlugins/CameraMovementPlugin/typings.js +6 -6
- package/lib/fivePlugins/ModelTVVideoPlugin/index.js +59 -57
- package/lib/react/index.js +1 -1
- package/lib/shared-utils/Audio.js +56 -52
- package/lib/shared-utils/AudioLike.js +14 -11
- package/lib/shared-utils/animationFrame/BetterTween.js +15 -13
- package/lib/shared-utils/animationFrame/tween.js +3 -1
- package/lib/shared-utils/getMediaInfo.js +1 -0
- package/lib/typings/VreoUnit.js +27 -134
- package/package.json +3 -3
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import
|
|
3
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
4
4
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
-
import
|
|
5
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
6
6
|
import _get from "@babel/runtime/helpers/esm/get";
|
|
7
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
7
8
|
import _wrapNativeSuper from "@babel/runtime/helpers/esm/wrapNativeSuper";
|
|
8
9
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
9
10
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
10
|
-
|
|
11
|
-
function
|
|
12
|
-
function
|
|
13
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
14
|
-
function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
11
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
12
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
13
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
15
14
|
var blankAudioSrc = 'data:audio/mpeg;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAADAAAGhgBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVWqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqr///////////////////////////////////////////8AAAA5TEFNRTMuOThyAc0AAAAAAAAAABSAJAiqQgAAgAAABobxtI73AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//uQxAACFEII9ACZ/sJZwWEoEb8w/////N//////JcxjHjf+7/v/H2PzCCFAiDtGeyBCIx7bJJ1mmEEMy6g8mm2c8nrGABB4h2Mkmn//4z/73u773R5qHHu/j/w7Kxkzh5lWRWdsifCkNAnY9Zc1HvDAhjhSHdFkHFzLmabt/AQxSg2wwzLhHIJOBnAWwVY4zrhIYhhc2kvhYDfQ4hDi2Gmh5KyFn8EcGIrHAngNgIwVIEMf5bzbAiTRoAD///8z/KVhkkWEle6IX+d/z4fvH3BShK1e5kmjkCMoxVmXhd4ROlTKo3iipasvTilY21q19ta30/v/0/idPX1v8PNxJL6ramnOVsdvMv2akO0iSYIzdJFirtzWXCZicS9vHqvSKyqm5XJBdqBwPxyfJdykhWTZ0G0ZyTZGpLKxsNwwoRhsx3tZfhwmeOBVISm3impAC/IT/8hP/EKEM1KMdVdVKM2rHV4x7HVXZvbVVKN/qq8CiV9VL9jjH/6l6qf7MBCjZmOqsAibjcP+qqqv0oxqpa/NVW286hPo1nz2L/h8+jXt//uSxCmDU2IK/ECN98KKtE5IYzNoCfbw+u9i5r8PoadUMFPKqWL4LK3T/LCraMSHGkW4bpLXR/E6LlHOVQxmslKVJ8IULktMN06N0FKCpHCoYsjC4F+Z0NVqdNFoGSTjSiyjzLdnZ2fNqTi2eHKONONKLMPMKLONKLMPQRJGlFxZRoKcJFAYEeIFiRQkUWUeYfef//Ko04soswso40UJAgMw8wosososy0EalnZyjQUGBRQGIFggOWUacWUeYmuadrZziQKKEgQsQLAhQkUJAgMQDghltLO1onp0cpkNInSFMqlYeSEJ5AHsqFdOwy1DA2sRmRJKxdKRfLhfLw5BzUxBTUUzLjk4LjJVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUxBTUUzLjk4LjJVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf/7ksRRA8AAAaQAAAAgAAA0gAAABFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVU=';
|
|
16
15
|
// 下面这段空音频居然在11pro和xr上播不出来
|
|
17
16
|
// const blankAudioSrc = 'data:audio/mpeg;base64,//AAAAHGZ0eXBNNEEgAAAAAE00QSBpc29tbXA0MgAAAAFtZGF0AAAAAAAAABwA0AAHANAABwDQAAcAAAM+bW9vdgAAAGxtdmhkAAAAAN+jti7fo7YuAACsRAAADAAAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAdB0cmFrAAAAXHRraGQAAAAB36O2Lt+jti4AAAABAAAAAAAADAAAAAAAAAAAAAAAAAABAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAFsbWRpYQAAACBtZGhkAAAAAN+jti7fo7YuAACsRAAADABVxAAAAAAAMWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABDb3JlIE1lZGlhIEF1ZGlvAAAAARNtaW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAANdzdGJsAAAAZ3N0c2QAAAAAAAAAAQAAAFdtcDRhAAAAAAAAAAEAAAAAAAAAAAACABAAAAAArEQAAAAAADNlc2RzAAAAAAOAgIAiAAAABICAgBRAFAAYAAAA+gAAAPoABYCAgAISCAaAgIABAgAAABhzdHRzAAAAAAAAAAEAAAADAAAEAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAwAAAAEAAAAgc3RzegAAAAAAAAAAAAAAAwAAAAQAAAAEAAAABAAAABRzdGNvAAAAAAAAAAEAAAAsAAAA+nVkdGEAAADybWV0YQAAAAAAAAAiaGRscgAAAAAAAAAAbWRpcgAAAAAAAAAAAAAAAAAAAAAAxGlsc3QAAAC8LS0tLQAAABxtZWFuAAAAAGNvbS5hcHBsZS5pVHVuZXMAAAAUbmFtZQAAAABpVHVuU01QQgAAAIRkYXRhAAAAAQAAAAAgMDAwMDAwMDAgMDAwMDA4NDAgMDAwMDAzQzAgMDAwMDAwMDAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMCAwMDAwMDAwMA=='
|
|
@@ -35,46 +34,49 @@ export function waitForBlankAudioGenerated() {
|
|
|
35
34
|
return _waitForBlankAudioGenerated.apply(this, arguments);
|
|
36
35
|
}
|
|
37
36
|
function _waitForBlankAudioGenerated() {
|
|
38
|
-
_waitForBlankAudioGenerated = _asyncToGenerator(/*#__PURE__*/
|
|
37
|
+
_waitForBlankAudioGenerated = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
39
38
|
var checkInterval,
|
|
40
39
|
timeout,
|
|
41
40
|
startTime,
|
|
42
41
|
isTimedOut,
|
|
43
42
|
_args = arguments;
|
|
44
|
-
return
|
|
45
|
-
while (1)
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
43
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
44
|
+
while (1) {
|
|
45
|
+
switch (_context.prev = _context.next) {
|
|
46
|
+
case 0:
|
|
47
|
+
checkInterval = _args.length > 0 && _args[0] !== undefined ? _args[0] : 100;
|
|
48
|
+
timeout = _args.length > 1 && _args[1] !== undefined ? _args[1] : 2000;
|
|
49
|
+
console.log('waitForBlankAudioGenerated, needGenerate: ', audioList.some(function (audio) {
|
|
50
|
+
return !audio.ended && audio.src === blankAudioSrc;
|
|
51
|
+
}));
|
|
52
|
+
// while any audioList not ended
|
|
53
|
+
startTime = Date.now();
|
|
54
|
+
isTimedOut = false;
|
|
55
|
+
case 5:
|
|
56
|
+
if (!(audioList.some(function (audio) {
|
|
57
|
+
return !audio.ended && audio.src === blankAudioSrc;
|
|
58
|
+
}) && !isTimedOut)) {
|
|
59
|
+
_context.next = 13;
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
if (!(Date.now() - startTime > timeout)) {
|
|
63
|
+
_context.next = 9;
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
isTimedOut = true;
|
|
67
|
+
return _context.abrupt("return", Promise.resolve());
|
|
68
|
+
case 9:
|
|
69
|
+
_context.next = 11;
|
|
70
|
+
return new Promise(function (resolve) {
|
|
71
|
+
return setTimeout(resolve, checkInterval);
|
|
72
|
+
});
|
|
73
|
+
case 11:
|
|
74
|
+
_context.next = 5;
|
|
60
75
|
break;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
_context.
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
isTimedOut = true;
|
|
67
|
-
return _context.a(2, Promise.resolve());
|
|
68
|
-
case 2:
|
|
69
|
-
_context.n = 3;
|
|
70
|
-
return new Promise(function (resolve) {
|
|
71
|
-
return setTimeout(resolve, checkInterval);
|
|
72
|
-
});
|
|
73
|
-
case 3:
|
|
74
|
-
_context.n = 1;
|
|
75
|
-
break;
|
|
76
|
-
case 4:
|
|
77
|
-
return _context.a(2);
|
|
76
|
+
case 13:
|
|
77
|
+
case "end":
|
|
78
|
+
return _context.stop();
|
|
79
|
+
}
|
|
78
80
|
}
|
|
79
81
|
}, _callee);
|
|
80
82
|
}));
|
|
@@ -99,20 +101,22 @@ function initAudio(audio) {
|
|
|
99
101
|
}
|
|
100
102
|
}
|
|
101
103
|
var IAudio = /*#__PURE__*/function (_Audio) {
|
|
104
|
+
_inherits(IAudio, _Audio);
|
|
105
|
+
var _super = _createSuper(IAudio);
|
|
102
106
|
function IAudio(src) {
|
|
103
|
-
var _this;
|
|
107
|
+
var _thisSuper, _this;
|
|
104
108
|
_classCallCheck(this, IAudio);
|
|
105
|
-
_this =
|
|
106
|
-
_defineProperty(_this, "preload", 'auto');
|
|
107
|
-
_defineProperty(_this, "realSrc", '');
|
|
108
|
-
_defineProperty(_this, "inited", false);
|
|
109
|
+
_this = _super.call(this, src);
|
|
110
|
+
_defineProperty(_assertThisInitialized(_this), "preload", 'auto');
|
|
111
|
+
_defineProperty(_assertThisInitialized(_this), "realSrc", '');
|
|
112
|
+
_defineProperty(_assertThisInitialized(_this), "inited", false);
|
|
109
113
|
_this.realSrc = src !== null && src !== void 0 ? src : '';
|
|
110
114
|
_this.muted = true;
|
|
111
|
-
|
|
115
|
+
_get((_thisSuper = _assertThisInitialized(_this), _getPrototypeOf(IAudio.prototype)), "addEventListener", _thisSuper).call(_thisSuper, 'ended', function () {
|
|
112
116
|
if (_this.src === blankAudioSrc) _this.src = '';
|
|
113
|
-
}
|
|
117
|
+
});
|
|
114
118
|
var init = function init() {
|
|
115
|
-
return initAudio(_this);
|
|
119
|
+
return initAudio(_assertThisInitialized(_this));
|
|
116
120
|
};
|
|
117
121
|
document.addEventListener('click', init);
|
|
118
122
|
document.addEventListener('touchend', init);
|
|
@@ -122,8 +126,7 @@ var IAudio = /*#__PURE__*/function (_Audio) {
|
|
|
122
126
|
};
|
|
123
127
|
return _this;
|
|
124
128
|
}
|
|
125
|
-
|
|
126
|
-
return _createClass(IAudio, [{
|
|
129
|
+
_createClass(IAudio, [{
|
|
127
130
|
key: "src",
|
|
128
131
|
get:
|
|
129
132
|
/**
|
|
@@ -144,4 +147,5 @@ var IAudio = /*#__PURE__*/function (_Audio) {
|
|
|
144
147
|
this.realSrc = paramsSrc;
|
|
145
148
|
}
|
|
146
149
|
}]);
|
|
147
|
-
|
|
150
|
+
return IAudio;
|
|
151
|
+
}( /*#__PURE__*/_wrapNativeSuper(Audio));
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
4
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
3
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
4
6
|
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
7
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
|
-
function
|
|
8
|
-
function _isNativeReflectConstruct() {
|
|
8
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
9
10
|
import { Subscribe } from '@realsee/five';
|
|
10
11
|
import { requestAnimationFrameInterval } from "./animationFrame/index.js";
|
|
11
12
|
/**
|
|
@@ -15,24 +16,25 @@ import { requestAnimationFrameInterval } from "./animationFrame/index.js";
|
|
|
15
16
|
* 模拟 `<Audio>` 功能:没有音频,但执行逻辑跟 `<Audio>` 相似。
|
|
16
17
|
*/
|
|
17
18
|
export var AudioLike = /*#__PURE__*/function (_Subscribe) {
|
|
19
|
+
_inherits(AudioLike, _Subscribe);
|
|
20
|
+
var _super = _createSuper(AudioLike);
|
|
18
21
|
function AudioLike() {
|
|
19
22
|
var _this;
|
|
20
23
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
21
24
|
duration = _ref.duration;
|
|
22
25
|
_classCallCheck(this, AudioLike);
|
|
23
|
-
_this =
|
|
24
|
-
_defineProperty(_this, "$timestamp", null);
|
|
25
|
-
_defineProperty(_this, "$currentTime", 0);
|
|
26
|
-
_defineProperty(_this, "$duration", 0);
|
|
27
|
-
_defineProperty(_this, "muted", false);
|
|
28
|
-
_defineProperty(_this, "src", '');
|
|
26
|
+
_this = _super.call(this);
|
|
27
|
+
_defineProperty(_assertThisInitialized(_this), "$timestamp", null);
|
|
28
|
+
_defineProperty(_assertThisInitialized(_this), "$currentTime", 0);
|
|
29
|
+
_defineProperty(_assertThisInitialized(_this), "$duration", 0);
|
|
30
|
+
_defineProperty(_assertThisInitialized(_this), "muted", false);
|
|
31
|
+
_defineProperty(_assertThisInitialized(_this), "src", '');
|
|
29
32
|
if (duration) {
|
|
30
33
|
_this.$duration = duration;
|
|
31
34
|
}
|
|
32
35
|
return _this;
|
|
33
36
|
}
|
|
34
|
-
|
|
35
|
-
return _createClass(AudioLike, [{
|
|
37
|
+
_createClass(AudioLike, [{
|
|
36
38
|
key: "setAttribute",
|
|
37
39
|
value: function setAttribute(name, value) {
|
|
38
40
|
// nothing todo
|
|
@@ -116,5 +118,6 @@ export var AudioLike = /*#__PURE__*/function (_Subscribe) {
|
|
|
116
118
|
this.off(evtName, callback);
|
|
117
119
|
}
|
|
118
120
|
}]);
|
|
121
|
+
return AudioLike;
|
|
119
122
|
}(Subscribe);
|
|
120
123
|
export default AudioLike;
|
|
@@ -1,46 +1,48 @@
|
|
|
1
1
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
4
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
3
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
4
6
|
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
6
7
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
|
-
function
|
|
8
|
-
function _isNativeReflectConstruct() {
|
|
8
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
9
10
|
import * as TWEEN from '@tweenjs/tween.js';
|
|
10
11
|
import { requestAnimationFrameInterval } from "./index.js";
|
|
11
12
|
export var BetterTween = /*#__PURE__*/function (_TWEEN$Tween) {
|
|
13
|
+
_inherits(BetterTween, _TWEEN$Tween);
|
|
14
|
+
var _super = _createSuper(BetterTween);
|
|
12
15
|
function BetterTween() {
|
|
13
16
|
var _this;
|
|
14
17
|
_classCallCheck(this, BetterTween);
|
|
15
18
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
16
19
|
args[_key] = arguments[_key];
|
|
17
20
|
}
|
|
18
|
-
_this =
|
|
19
|
-
_defineProperty(_this, "disposeMethods", []);
|
|
20
|
-
_defineProperty(_this, "onDispose", function (callback) {
|
|
21
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
22
|
+
_defineProperty(_assertThisInitialized(_this), "disposeMethods", []);
|
|
23
|
+
_defineProperty(_assertThisInitialized(_this), "onDispose", function (callback) {
|
|
21
24
|
_this.disposeMethods.push(callback);
|
|
22
|
-
return _this;
|
|
25
|
+
return _assertThisInitialized(_this);
|
|
23
26
|
});
|
|
24
|
-
_defineProperty(_this, "play", function () {
|
|
27
|
+
_defineProperty(_assertThisInitialized(_this), "play", function () {
|
|
25
28
|
_this.start();
|
|
26
29
|
_this.animationFrameDisposer = requestAnimationFrameInterval(function () {
|
|
27
30
|
return _this.update();
|
|
28
31
|
});
|
|
29
|
-
return _this;
|
|
32
|
+
return _assertThisInitialized(_this);
|
|
30
33
|
});
|
|
31
|
-
_defineProperty(_this, "dispose", function () {
|
|
34
|
+
_defineProperty(_assertThisInitialized(_this), "dispose", function () {
|
|
32
35
|
var _this$animationFrameD, _this2;
|
|
33
36
|
_this.stop();
|
|
34
|
-
(_this$animationFrameD = (_this2 = _this).animationFrameDisposer) === null || _this$animationFrameD === void 0
|
|
37
|
+
(_this$animationFrameD = (_this2 = _this).animationFrameDisposer) === null || _this$animationFrameD === void 0 ? void 0 : _this$animationFrameD.call(_this2);
|
|
35
38
|
_this.disposeMethods.forEach(function (fn) {
|
|
36
39
|
return fn();
|
|
37
40
|
});
|
|
38
41
|
_this.disposeMethods = [];
|
|
39
|
-
TWEEN.remove(_this);
|
|
42
|
+
TWEEN.remove(_assertThisInitialized(_this));
|
|
40
43
|
});
|
|
41
44
|
return _this;
|
|
42
45
|
}
|
|
43
|
-
_inherits(BetterTween, _TWEEN$Tween);
|
|
44
46
|
return _createClass(BetterTween);
|
|
45
47
|
}(TWEEN.Tween);
|
|
46
48
|
export function tweenProgress(duration) {
|
|
@@ -42,7 +42,9 @@ export default function tween(from, to, duration) {
|
|
|
42
42
|
_onStopCallbackL: null
|
|
43
43
|
});
|
|
44
44
|
var destroyMethod;
|
|
45
|
-
while (destroyMethod = destroyMethods.shift())
|
|
45
|
+
while (destroyMethod = destroyMethods.shift()) {
|
|
46
|
+
destroyMethod();
|
|
47
|
+
}
|
|
46
48
|
cancelAnimationFrame();
|
|
47
49
|
};
|
|
48
50
|
return tween;
|
package/lib/typings/VreoUnit.js
CHANGED
|
@@ -1,171 +1,64 @@
|
|
|
1
|
-
export var VreoKeyframeEnum
|
|
2
|
-
|
|
1
|
+
export var VreoKeyframeEnum;
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 支持自定义剧本关键帧配置项
|
|
5
|
+
*/
|
|
6
|
+
(function (VreoKeyframeEnum) {
|
|
3
7
|
VreoKeyframeEnum["CameraMovement"] = "CameraMovement";
|
|
4
|
-
/**
|
|
5
|
-
* 全景标签
|
|
6
|
-
*/
|
|
7
8
|
VreoKeyframeEnum["PanoTag"] = "PanoTag";
|
|
8
|
-
/**
|
|
9
|
-
* 全景文本标签
|
|
10
|
-
*/
|
|
11
9
|
VreoKeyframeEnum["PanoTextLabel"] = "PanoTextLabel";
|
|
12
|
-
/**
|
|
13
|
-
* 提词器
|
|
14
|
-
*/
|
|
15
10
|
VreoKeyframeEnum["Prompter"] = "Prompter";
|
|
16
|
-
/**
|
|
17
|
-
* 更新 VR 全景
|
|
18
|
-
*/
|
|
19
11
|
VreoKeyframeEnum["UpdateVRPanorama"] = "UpdateVRPanorama";
|
|
20
|
-
/**
|
|
21
|
-
* 视频广告
|
|
22
|
-
*/
|
|
23
12
|
VreoKeyframeEnum["ModelVideo"] = "ModelVideo";
|
|
24
|
-
/**
|
|
25
|
-
* 全景特效
|
|
26
|
-
*/
|
|
27
13
|
VreoKeyframeEnum["PanoEffect"] = "PanoEffect";
|
|
28
|
-
/**
|
|
29
|
-
* 信息面板
|
|
30
|
-
*/
|
|
31
14
|
VreoKeyframeEnum["InfoPanel"] = "InfoPanel";
|
|
32
|
-
/**
|
|
33
|
-
* 视频特效
|
|
34
|
-
*/
|
|
35
15
|
VreoKeyframeEnum["VideoEffect"] = "VideoEffect";
|
|
36
|
-
/**
|
|
37
|
-
* 背景音乐
|
|
38
|
-
*/
|
|
39
16
|
VreoKeyframeEnum["BgMusic"] = "BgMusic";
|
|
40
|
-
/**
|
|
41
|
-
* 结束
|
|
42
|
-
*/
|
|
43
17
|
VreoKeyframeEnum["Exit"] = "Exit";
|
|
44
|
-
/**
|
|
45
|
-
* 自定义剧本帧
|
|
46
|
-
*/
|
|
47
18
|
VreoKeyframeEnum["Custom"] = "Custom";
|
|
48
|
-
|
|
49
|
-
}({});
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* 支持自定义剧本关键帧配置项
|
|
53
|
-
*/
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* 剧本关键帧
|
|
57
|
-
*/
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* 虚拟视频角色
|
|
61
|
-
*/
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* 剧本结构
|
|
65
|
-
*/
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* 剧本事件
|
|
69
|
-
*/
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* 相机运动
|
|
73
|
-
*/
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* 提词器
|
|
77
|
-
*/
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* VR 全景切换
|
|
81
|
-
*/
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* 顶点
|
|
85
|
-
*/
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* 矩形顶点
|
|
89
|
-
*/
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* 顶点数组
|
|
93
|
-
*/
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* 视频广告
|
|
97
|
-
*/
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* 四元数
|
|
101
|
-
*/
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* 全景文本标签
|
|
105
|
-
*/
|
|
106
|
-
|
|
19
|
+
})(VreoKeyframeEnum || (VreoKeyframeEnum = {}));
|
|
107
20
|
/**
|
|
108
21
|
* 全景标签枚举
|
|
109
22
|
*/
|
|
110
|
-
export var PanoTagEnum
|
|
111
|
-
PanoTagEnum["Text"] = "Text";
|
|
112
|
-
PanoTagEnum["Image"] = "Image";
|
|
113
|
-
return PanoTagEnum;
|
|
114
|
-
}({});
|
|
23
|
+
export var PanoTagEnum;
|
|
115
24
|
|
|
116
25
|
/**
|
|
117
26
|
* 标签样式种类
|
|
118
27
|
*/
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
28
|
+
(function (PanoTagEnum) {
|
|
29
|
+
PanoTagEnum["Text"] = "Text";
|
|
30
|
+
PanoTagEnum["Image"] = "Image";
|
|
31
|
+
})(PanoTagEnum || (PanoTagEnum = {}));
|
|
32
|
+
export var PanoTagStyleEnum;
|
|
33
|
+
(function (PanoTagStyleEnum) {
|
|
123
34
|
PanoTagStyleEnum["Growth"] = "Growth";
|
|
124
|
-
/**
|
|
125
|
-
* 展开动画
|
|
126
|
-
*/
|
|
127
35
|
PanoTagStyleEnum["Expand"] = "Expand";
|
|
128
|
-
|
|
129
|
-
}({});
|
|
36
|
+
})(PanoTagStyleEnum || (PanoTagStyleEnum = {}));
|
|
130
37
|
/**
|
|
131
38
|
* 全景特效枚举
|
|
132
39
|
*/
|
|
133
|
-
export var PanoEffectEnum
|
|
134
|
-
/**
|
|
135
|
-
* 两点距离
|
|
136
|
-
*/
|
|
137
|
-
PanoEffectEnum["Distance"] = "Distance";
|
|
138
|
-
return PanoEffectEnum;
|
|
139
|
-
}({});
|
|
40
|
+
export var PanoEffectEnum;
|
|
140
41
|
|
|
141
42
|
/**
|
|
142
43
|
* 全景特效
|
|
143
44
|
*/
|
|
144
|
-
|
|
45
|
+
(function (PanoEffectEnum) {
|
|
46
|
+
PanoEffectEnum["Distance"] = "Distance";
|
|
47
|
+
})(PanoEffectEnum || (PanoEffectEnum = {}));
|
|
145
48
|
/**
|
|
146
49
|
* 信息面板类型枚举
|
|
147
50
|
*/
|
|
148
|
-
export var InfoPanelTypeEnum
|
|
51
|
+
export var InfoPanelTypeEnum;
|
|
52
|
+
(function (InfoPanelTypeEnum) {
|
|
149
53
|
InfoPanelTypeEnum["Image"] = "Image";
|
|
150
54
|
InfoPanelTypeEnum["Video"] = "Video";
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
export var InfoPanelStyleEnum = /*#__PURE__*/function (InfoPanelStyleEnum) {
|
|
154
|
-
InfoPanelStyleEnum["Drawer"] = "Drawer";
|
|
155
|
-
InfoPanelStyleEnum["PopUp"] = "PopUp";
|
|
156
|
-
return InfoPanelStyleEnum;
|
|
157
|
-
}({});
|
|
55
|
+
})(InfoPanelTypeEnum || (InfoPanelTypeEnum = {}));
|
|
56
|
+
export var InfoPanelStyleEnum;
|
|
158
57
|
|
|
159
58
|
/**
|
|
160
59
|
* 信息面板
|
|
161
60
|
*/
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* 背景音乐
|
|
169
|
-
*/
|
|
170
|
-
|
|
171
|
-
/** 自定义序列帧 */
|
|
61
|
+
(function (InfoPanelStyleEnum) {
|
|
62
|
+
InfoPanelStyleEnum["Drawer"] = "Drawer";
|
|
63
|
+
InfoPanelStyleEnum["PopUp"] = "PopUp";
|
|
64
|
+
})(InfoPanelStyleEnum || (InfoPanelStyleEnum = {}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@realsee/vreo",
|
|
3
|
-
"version": "2.6.4
|
|
3
|
+
"version": "2.6.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Vreo (VR Video 缩写) 是基于如视三维渲染引擎 Five 和 用户界面构建库 React 实现的如视 3D 空间剧本播放器。",
|
|
6
6
|
"keywords": [
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"test:audio-focus": "node --test test/audio-focus.test.mjs"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
82
|
-
"@realsee/dnalogel": "3.81.10
|
|
82
|
+
"@realsee/dnalogel": "3.81.10",
|
|
83
83
|
"@realsee/five": "^6.4.0-alpha.1",
|
|
84
84
|
"react": "^18.0.0",
|
|
85
85
|
"react-dom": "^18.0.0",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"@babel/preset-env": "^7.16.4",
|
|
93
93
|
"@babel/preset-react": "^7.16.0",
|
|
94
94
|
"@babel/preset-typescript": "^7.16.0",
|
|
95
|
-
"@realsee/dnalogel": "3.81.10
|
|
95
|
+
"@realsee/dnalogel": "3.81.10",
|
|
96
96
|
"@realsee/five": "^6.4.0-alpha.38",
|
|
97
97
|
"@tweenjs/tween.js": "18.6.4",
|
|
98
98
|
"@types/node": "^18.11.17",
|