@realsee/vreo 2.5.0 → 2.6.1-alpha.1
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 +5 -12
- package/lib/PlayController/index.js +31 -41
- package/lib/Player/App.js +25 -34
- package/lib/Player/Controller.js +68 -76
- package/lib/Player/custom/SpatialScenePanel/index.js +20 -54
- package/lib/Player/hooks.js +6 -15
- package/lib/Player/index.d.ts +1 -0
- package/lib/Player/index.js +41 -47
- package/lib/Player/modules/Drawer/index.js +10 -18
- package/lib/Player/modules/PopUp/index.js +8 -17
- package/lib/Player/modules/ResizeObserver/index.js +10 -17
- package/lib/Player/modules/VideoAgent/VideoAgentMesh.js +36 -46
- package/lib/Player/modules/VideoAgent/VideoAgentScene.js +16 -25
- package/lib/Player/modules/VideoAgent/index.js +8 -17
- package/lib/Player/modules/Wave/index.js +24 -33
- package/lib/Player/modules/keyframes/BgMusic/index.js +13 -22
- package/lib/Player/modules/keyframes/CameraMovement/index.js +17 -26
- package/lib/Player/modules/keyframes/InfoPanel/index.js +15 -23
- package/lib/Player/modules/keyframes/ModelVideo/index.js +17 -26
- package/lib/Player/modules/keyframes/PanoEffect/index.js +21 -30
- package/lib/Player/modules/keyframes/PanoEffect/lineAnime.js +6 -14
- package/lib/Player/modules/keyframes/PanoTag/index.js +10 -18
- package/lib/Player/modules/keyframes/PanoTextLabel/index.js +19 -28
- package/lib/Player/modules/keyframes/Prompter/index.js +13 -22
- package/lib/Player/modules/keyframes/UpdateVRPanorama/index.js +16 -24
- package/lib/Player/modules/keyframes/VideoEffect/index.js +17 -27
- package/lib/Player/typings.js +1 -5
- package/lib/fivePlugins/CSS3DRenderPlugin/centerPoint.js +3 -9
- package/lib/fivePlugins/CSS3DRenderPlugin/createResizeObserver.js +1 -7
- package/lib/fivePlugins/CSS3DRenderPlugin/evenNumber.js +1 -7
- package/lib/fivePlugins/CSS3DRenderPlugin/index.js +27 -37
- package/lib/fivePlugins/CSS3DRenderPlugin/transformPositionToVector3.js +3 -9
- package/lib/fivePlugins/CameraMovementPlugin/index.js +16 -23
- package/lib/fivePlugins/CameraMovementPlugin/typings.js +6 -10
- package/lib/fivePlugins/ModelTVVideoPlugin/index.js +9 -18
- package/lib/index.js +1 -12
- package/lib/react/index.js +12 -24
- package/lib/shared-utils/Audio.js +28 -38
- package/lib/shared-utils/AudioLike.js +23 -30
- package/lib/shared-utils/Preloader.js +1 -7
- package/lib/shared-utils/addResizeListener.js +4 -11
- package/lib/shared-utils/animationFrame/BetterTween.js +24 -34
- package/lib/shared-utils/animationFrame/index.js +4 -13
- package/lib/shared-utils/animationFrame/tween.js +9 -17
- package/lib/shared-utils/createTransMatrix.js +5 -14
- package/lib/shared-utils/getFileExpandedName.js +1 -7
- package/lib/shared-utils/getMediaInfo.js +9 -19
- package/lib/shared-utils/setElementDataset.js +1 -7
- package/lib/typings/VreoUnit.js +15 -63
- package/lib/typings/index.d.ts +1 -0
- package/lib/typings/index.js +1 -0
- package/package.json +61 -9
|
@@ -1,47 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
15
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
16
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
|
-
var TWEEN = _interopRequireWildcard(require("@tweenjs/tween.js"));
|
|
18
|
-
var _ = require(".");
|
|
19
|
-
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); }
|
|
20
|
-
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2["default"])(t); if (r) { var s = (0, _getPrototypeOf2["default"])(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2["default"])(this, e); }; }
|
|
21
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
22
|
-
var BetterTween = exports.BetterTween = /*#__PURE__*/function (_TWEEN$Tween) {
|
|
23
|
-
(0, _inherits2["default"])(BetterTween, _TWEEN$Tween);
|
|
1
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
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";
|
|
5
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
6
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
7
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
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; } }
|
|
10
|
+
import * as TWEEN from '@tweenjs/tween.js';
|
|
11
|
+
import { requestAnimationFrameInterval } from "./index.js";
|
|
12
|
+
export var BetterTween = /*#__PURE__*/function (_TWEEN$Tween) {
|
|
13
|
+
_inherits(BetterTween, _TWEEN$Tween);
|
|
24
14
|
var _super = _createSuper(BetterTween);
|
|
25
15
|
function BetterTween() {
|
|
26
16
|
var _this;
|
|
27
|
-
(
|
|
17
|
+
_classCallCheck(this, BetterTween);
|
|
28
18
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
29
19
|
args[_key] = arguments[_key];
|
|
30
20
|
}
|
|
31
21
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
32
|
-
(
|
|
33
|
-
(
|
|
22
|
+
_defineProperty(_assertThisInitialized(_this), "disposeMethods", []);
|
|
23
|
+
_defineProperty(_assertThisInitialized(_this), "onDispose", function (callback) {
|
|
34
24
|
_this.disposeMethods.push(callback);
|
|
35
|
-
return (
|
|
25
|
+
return _assertThisInitialized(_this);
|
|
36
26
|
});
|
|
37
|
-
(
|
|
27
|
+
_defineProperty(_assertThisInitialized(_this), "play", function () {
|
|
38
28
|
_this.start();
|
|
39
|
-
_this.animationFrameDisposer =
|
|
29
|
+
_this.animationFrameDisposer = requestAnimationFrameInterval(function () {
|
|
40
30
|
return _this.update();
|
|
41
31
|
});
|
|
42
|
-
return (
|
|
32
|
+
return _assertThisInitialized(_this);
|
|
43
33
|
});
|
|
44
|
-
(
|
|
34
|
+
_defineProperty(_assertThisInitialized(_this), "dispose", function () {
|
|
45
35
|
var _this$animationFrameD, _this2;
|
|
46
36
|
_this.stop();
|
|
47
37
|
(_this$animationFrameD = (_this2 = _this).animationFrameDisposer) === null || _this$animationFrameD === void 0 ? void 0 : _this$animationFrameD.call(_this2);
|
|
@@ -49,13 +39,13 @@ var BetterTween = exports.BetterTween = /*#__PURE__*/function (_TWEEN$Tween) {
|
|
|
49
39
|
return fn();
|
|
50
40
|
});
|
|
51
41
|
_this.disposeMethods = [];
|
|
52
|
-
TWEEN.remove((
|
|
42
|
+
TWEEN.remove(_assertThisInitialized(_this));
|
|
53
43
|
});
|
|
54
44
|
return _this;
|
|
55
45
|
}
|
|
56
|
-
return (
|
|
46
|
+
return _createClass(BetterTween);
|
|
57
47
|
}(TWEEN.Tween);
|
|
58
|
-
function tweenProgress(duration) {
|
|
48
|
+
export function tweenProgress(duration) {
|
|
59
49
|
var easing = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : TWEEN.Easing.Linear.None;
|
|
60
50
|
var tween = new BetterTween({
|
|
61
51
|
progress: 0
|
|
@@ -1,20 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
exports.getFrameTime = getFrameTime;
|
|
8
|
-
exports.nextFrame = nextFrame;
|
|
9
|
-
exports.requestAnimationFrameInterval = requestAnimationFrameInterval;
|
|
10
1
|
var _requestAnimationFrame = window.requestAnimationFrame || function (fn) {
|
|
11
2
|
return setTimeout(function () {
|
|
12
3
|
return fn(performance.now());
|
|
13
4
|
}, 16);
|
|
14
5
|
};
|
|
15
6
|
var _cancelAnimationFrame = window.cancelAnimationFrame || clearTimeout;
|
|
16
|
-
|
|
17
|
-
function nextFrame(fn) {
|
|
7
|
+
export default _requestAnimationFrame;
|
|
8
|
+
export function nextFrame(fn) {
|
|
18
9
|
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
19
10
|
if (delay <= 0) _requestAnimationFrame(fn);else _requestAnimationFrame(function () {
|
|
20
11
|
return nextFrame(fn, delay - 1);
|
|
@@ -27,7 +18,7 @@ function nextFrame(fn) {
|
|
|
27
18
|
* @param frame 每秒运行多少次
|
|
28
19
|
* @returns 返回一个函数,调用可以停止 AnimationFrameLoop
|
|
29
20
|
*/
|
|
30
|
-
function requestAnimationFrameInterval(callback) {
|
|
21
|
+
export function requestAnimationFrameInterval(callback) {
|
|
31
22
|
var frame = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 60;
|
|
32
23
|
var index = -1;
|
|
33
24
|
var oldTime = 0;
|
|
@@ -51,7 +42,7 @@ function requestAnimationFrameInterval(callback) {
|
|
|
51
42
|
* 获取两个 AnimationFrame 间隔的时间
|
|
52
43
|
* @returns 返回一个 Promise,resolve 的结果是两个 AnimationFrame 间隔的时间
|
|
53
44
|
*/
|
|
54
|
-
function getFrameTime() {
|
|
45
|
+
export function getFrameTime() {
|
|
55
46
|
var start = Date.now();
|
|
56
47
|
return new Promise(function (resolve) {
|
|
57
48
|
_requestAnimationFrame(function () {
|
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.clear = void 0;
|
|
7
|
-
exports["default"] = tween;
|
|
8
|
-
exports.tweenProgress = tweenProgress;
|
|
9
|
-
var _tween = require("@tweenjs/tween.js");
|
|
10
|
-
var _index = require("./index");
|
|
1
|
+
import { Tween, Easing } from '@tweenjs/tween.js';
|
|
2
|
+
import { nextFrame, requestAnimationFrameInterval } from "./index.js";
|
|
11
3
|
var disposeMethods = [];
|
|
12
|
-
var clear =
|
|
4
|
+
export var clear = function clear() {
|
|
13
5
|
disposeMethods.forEach(function (dispose) {
|
|
14
6
|
return dispose();
|
|
15
7
|
});
|
|
@@ -26,14 +18,14 @@ var clear = exports.clear = function clear() {
|
|
|
26
18
|
* @param duration 经历时间(s)
|
|
27
19
|
* @param easing 过程动画,默认是 Easing.Linear.None
|
|
28
20
|
*/
|
|
29
|
-
function tween(from, to, duration) {
|
|
30
|
-
var easing = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] :
|
|
31
|
-
var tween = new
|
|
21
|
+
export default function tween(from, to, duration) {
|
|
22
|
+
var easing = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Easing.Linear.None;
|
|
23
|
+
var tween = new Tween(from).to(to, duration).easing(easing);
|
|
32
24
|
// 这里注意一下,因为 requestAnimationFrameInterval 给的时间是从 0 开始的,tween 动画也从 0 开始
|
|
33
|
-
|
|
25
|
+
nextFrame(function () {
|
|
34
26
|
return tween.start(0);
|
|
35
27
|
});
|
|
36
|
-
var cancelAnimationFrame =
|
|
28
|
+
var cancelAnimationFrame = requestAnimationFrameInterval(function (time) {
|
|
37
29
|
if (tween.update(time) === false) cancelAnimationFrame();
|
|
38
30
|
});
|
|
39
31
|
var destroyMethods = [];
|
|
@@ -57,7 +49,7 @@ function tween(from, to, duration) {
|
|
|
57
49
|
};
|
|
58
50
|
return tween;
|
|
59
51
|
}
|
|
60
|
-
function tweenProgress(duration, easing) {
|
|
52
|
+
export function tweenProgress(duration, easing) {
|
|
61
53
|
return tween({
|
|
62
54
|
progress: 0
|
|
63
55
|
}, {
|
|
@@ -1,20 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.createTransMatrix = createTransMatrix;
|
|
9
|
-
var _construct2 = _interopRequireDefault(require("@babel/runtime/helpers/construct"));
|
|
10
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
11
|
-
var THREE = _interopRequireWildcard(require("three"));
|
|
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); }
|
|
13
|
-
function createTransMatrix(arr1) {
|
|
1
|
+
import _construct from "@babel/runtime/helpers/esm/construct";
|
|
2
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
|
+
import * as THREE from 'three';
|
|
4
|
+
export function createTransMatrix(arr1) {
|
|
14
5
|
var matrix4 = new THREE.Matrix4();
|
|
15
6
|
matrix4.fromArray(arr1);
|
|
16
7
|
return function (arr2) {
|
|
17
|
-
var vector3 = (
|
|
8
|
+
var vector3 = _construct(THREE.Vector3, _toConsumableArray(arr2));
|
|
18
9
|
vector3.applyMatrix4(matrix4);
|
|
19
10
|
return vector3.toArray();
|
|
20
11
|
};
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = getFileExpandedName;
|
|
7
|
-
function getFileExpandedName(filePath) {
|
|
1
|
+
export default function getFileExpandedName(filePath) {
|
|
8
2
|
if (!filePath) return '';
|
|
9
3
|
var index = filePath.lastIndexOf('.');
|
|
10
4
|
var ext = filePath.substring(index + 1);
|
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = getMediaInfo;
|
|
8
|
-
exports.getFileName = getFileName;
|
|
9
|
-
exports.getMediaType = getMediaType;
|
|
10
|
-
exports.getMediaTypeByExpandedName = getMediaTypeByExpandedName;
|
|
11
|
-
exports.getMediaTypeByUrl = getMediaTypeByUrl;
|
|
12
|
-
var _getFileExpandedName = _interopRequireDefault(require("./getFileExpandedName"));
|
|
13
|
-
function getMediaInfo(fileUrl) {
|
|
1
|
+
import getFileExpandedName from "./getFileExpandedName.js";
|
|
2
|
+
export default function getMediaInfo(fileUrl) {
|
|
14
3
|
var type = getMediaType(fileUrl);
|
|
15
4
|
if (!type) return Promise.resolve({
|
|
16
5
|
error: '未知的文件类型: ' + fileUrl
|
|
@@ -37,24 +26,25 @@ function getMediaInfo(fileUrl) {
|
|
|
37
26
|
};
|
|
38
27
|
});
|
|
39
28
|
}
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
|
|
30
|
+
export function getMediaType(url) {
|
|
31
|
+
var fileExpandedName = getFileExpandedName(url);
|
|
42
32
|
var type = getMediaTypeByExpandedName(fileExpandedName);
|
|
43
33
|
return type;
|
|
44
34
|
}
|
|
45
|
-
function getMediaTypeByExpandedName(fileExpandedName) {
|
|
35
|
+
export function getMediaTypeByExpandedName(fileExpandedName) {
|
|
46
36
|
if (!fileExpandedName) return 'unknown';
|
|
47
37
|
if (/jpg|jpeg|png$/.test(fileExpandedName)) return 'image';
|
|
48
38
|
if (/mp3|wav$/.test(fileExpandedName)) return 'audio';
|
|
49
39
|
if (/avi|wmv|mpeg|mp4|m4v|mov|asf|flv|f4v|rmvb|rm|3gp|vob$/.test(fileExpandedName)) return 'video';
|
|
50
40
|
return 'unknown';
|
|
51
41
|
}
|
|
52
|
-
function getMediaTypeByUrl(fileUrl) {
|
|
42
|
+
export function getMediaTypeByUrl(fileUrl) {
|
|
53
43
|
if (!fileUrl) return;
|
|
54
|
-
var fileExpandedName = (
|
|
44
|
+
var fileExpandedName = getFileExpandedName(fileUrl);
|
|
55
45
|
return getMediaTypeByExpandedName(fileExpandedName);
|
|
56
46
|
}
|
|
57
|
-
function getFileName(fileUrl) {
|
|
47
|
+
export function getFileName(fileUrl) {
|
|
58
48
|
if (!fileUrl) return '';
|
|
59
49
|
var index1 = fileUrl.lastIndexOf('/');
|
|
60
50
|
var index2 = fileUrl.lastIndexOf('\\');
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = setElementDataset;
|
|
7
|
-
function setElementDataset(element, dataset) {
|
|
1
|
+
export default function setElementDataset(element, dataset) {
|
|
8
2
|
if (element) {
|
|
9
3
|
Object.keys(dataset).forEach(function (key) {
|
|
10
4
|
var value = dataset[key].toString();
|
package/lib/typings/VreoUnit.js
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
export var VreoKeyframeEnum;
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.VreoKeyframeEnum = exports.PanoTagStyleEnum = exports.PanoTagEnum = exports.PanoEffectEnum = exports.InfoPanelTypeEnum = exports.InfoPanelStyleEnum = void 0;
|
|
7
|
-
var VreoKeyframeEnum;
|
|
8
3
|
/**
|
|
9
4
|
* 支持自定义剧本关键帧配置项
|
|
10
5
|
*/
|
|
@@ -21,92 +16,49 @@ var VreoKeyframeEnum;
|
|
|
21
16
|
VreoKeyframeEnum["BgMusic"] = "BgMusic";
|
|
22
17
|
VreoKeyframeEnum["Exit"] = "Exit";
|
|
23
18
|
VreoKeyframeEnum["Custom"] = "Custom";
|
|
24
|
-
})(VreoKeyframeEnum || (
|
|
25
|
-
/**
|
|
26
|
-
* 剧本关键帧
|
|
27
|
-
*/
|
|
28
|
-
/**
|
|
29
|
-
* 虚拟视频角色
|
|
30
|
-
*/
|
|
31
|
-
/**
|
|
32
|
-
* 剧本结构
|
|
33
|
-
*/
|
|
34
|
-
/**
|
|
35
|
-
* 剧本事件
|
|
36
|
-
*/
|
|
37
|
-
/**
|
|
38
|
-
* 相机运动
|
|
39
|
-
*/
|
|
40
|
-
/**
|
|
41
|
-
* 提词器
|
|
42
|
-
*/
|
|
43
|
-
/**
|
|
44
|
-
* VR 全景切换
|
|
45
|
-
*/
|
|
46
|
-
/**
|
|
47
|
-
* 顶点
|
|
48
|
-
*/
|
|
49
|
-
/**
|
|
50
|
-
* 矩形顶点
|
|
51
|
-
*/
|
|
52
|
-
/**
|
|
53
|
-
* 顶点数组
|
|
54
|
-
*/
|
|
55
|
-
/**
|
|
56
|
-
* 视频广告
|
|
57
|
-
*/
|
|
58
|
-
/**
|
|
59
|
-
* 四元数
|
|
60
|
-
*/
|
|
61
|
-
/**
|
|
62
|
-
* 全景文本标签
|
|
63
|
-
*/
|
|
19
|
+
})(VreoKeyframeEnum || (VreoKeyframeEnum = {}));
|
|
64
20
|
/**
|
|
65
21
|
* 全景标签枚举
|
|
66
22
|
*/
|
|
67
|
-
var PanoTagEnum;
|
|
23
|
+
export var PanoTagEnum;
|
|
24
|
+
|
|
68
25
|
/**
|
|
69
26
|
* 标签样式种类
|
|
70
27
|
*/
|
|
71
28
|
(function (PanoTagEnum) {
|
|
72
29
|
PanoTagEnum["Text"] = "Text";
|
|
73
30
|
PanoTagEnum["Image"] = "Image";
|
|
74
|
-
})(PanoTagEnum || (
|
|
75
|
-
var PanoTagStyleEnum;
|
|
31
|
+
})(PanoTagEnum || (PanoTagEnum = {}));
|
|
32
|
+
export var PanoTagStyleEnum;
|
|
76
33
|
(function (PanoTagStyleEnum) {
|
|
77
34
|
PanoTagStyleEnum["Growth"] = "Growth";
|
|
78
35
|
PanoTagStyleEnum["Expand"] = "Expand";
|
|
79
|
-
})(PanoTagStyleEnum || (
|
|
36
|
+
})(PanoTagStyleEnum || (PanoTagStyleEnum = {}));
|
|
80
37
|
/**
|
|
81
38
|
* 全景特效枚举
|
|
82
39
|
*/
|
|
83
|
-
var PanoEffectEnum;
|
|
40
|
+
export var PanoEffectEnum;
|
|
41
|
+
|
|
84
42
|
/**
|
|
85
43
|
* 全景特效
|
|
86
44
|
*/
|
|
87
45
|
(function (PanoEffectEnum) {
|
|
88
46
|
PanoEffectEnum["Distance"] = "Distance";
|
|
89
|
-
})(PanoEffectEnum || (
|
|
47
|
+
})(PanoEffectEnum || (PanoEffectEnum = {}));
|
|
90
48
|
/**
|
|
91
49
|
* 信息面板类型枚举
|
|
92
50
|
*/
|
|
93
|
-
var InfoPanelTypeEnum;
|
|
51
|
+
export var InfoPanelTypeEnum;
|
|
94
52
|
(function (InfoPanelTypeEnum) {
|
|
95
53
|
InfoPanelTypeEnum["Image"] = "Image";
|
|
96
54
|
InfoPanelTypeEnum["Video"] = "Video";
|
|
97
|
-
})(InfoPanelTypeEnum || (
|
|
98
|
-
var InfoPanelStyleEnum;
|
|
55
|
+
})(InfoPanelTypeEnum || (InfoPanelTypeEnum = {}));
|
|
56
|
+
export var InfoPanelStyleEnum;
|
|
57
|
+
|
|
99
58
|
/**
|
|
100
59
|
* 信息面板
|
|
101
60
|
*/
|
|
102
61
|
(function (InfoPanelStyleEnum) {
|
|
103
62
|
InfoPanelStyleEnum["Drawer"] = "Drawer";
|
|
104
63
|
InfoPanelStyleEnum["PopUp"] = "PopUp";
|
|
105
|
-
})(InfoPanelStyleEnum || (
|
|
106
|
-
/**
|
|
107
|
-
* 视频特效
|
|
108
|
-
*/
|
|
109
|
-
/**
|
|
110
|
-
* 背景音乐
|
|
111
|
-
*/
|
|
112
|
-
/** 自定义序列帧 */
|
|
64
|
+
})(InfoPanelStyleEnum || (InfoPanelStyleEnum = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './VreoUnit';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./VreoUnit.js";
|
package/package.json
CHANGED
|
@@ -1,12 +1,64 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@realsee/vreo",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.1-alpha.1",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"description": "Vreo (VR Video 缩写) 是基于如视三维渲染引擎 Five 和 用户界面构建库 React 实现的如视 3D 空间剧本播放器。",
|
|
5
6
|
"keywords": [
|
|
6
7
|
"realsee",
|
|
7
8
|
"vreo"
|
|
8
9
|
],
|
|
9
|
-
"
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
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"
|
|
20
|
+
},
|
|
21
|
+
"./Player": {
|
|
22
|
+
"types": "./lib/Player/index.d.ts",
|
|
23
|
+
"import": "./lib/Player/index.js",
|
|
24
|
+
"default": "./lib/Player/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./react": {
|
|
27
|
+
"types": "./lib/react/index.d.ts",
|
|
28
|
+
"import": "./lib/react/index.js",
|
|
29
|
+
"default": "./lib/react/index.js"
|
|
30
|
+
},
|
|
31
|
+
"./plugins/CameraMovementPlugin": {
|
|
32
|
+
"types": "./lib/fivePlugins/CameraMovementPlugin/index.d.ts",
|
|
33
|
+
"import": "./lib/fivePlugins/CameraMovementPlugin/index.js",
|
|
34
|
+
"default": "./lib/fivePlugins/CameraMovementPlugin/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./plugins/CSS3DRenderPlugin": {
|
|
37
|
+
"types": "./lib/fivePlugins/CSS3DRenderPlugin/index.d.ts",
|
|
38
|
+
"import": "./lib/fivePlugins/CSS3DRenderPlugin/index.js",
|
|
39
|
+
"default": "./lib/fivePlugins/CSS3DRenderPlugin/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./plugins/ModelTVVideoPlugin": {
|
|
42
|
+
"types": "./lib/fivePlugins/ModelTVVideoPlugin/index.d.ts",
|
|
43
|
+
"import": "./lib/fivePlugins/ModelTVVideoPlugin/index.js",
|
|
44
|
+
"default": "./lib/fivePlugins/ModelTVVideoPlugin/index.js"
|
|
45
|
+
},
|
|
46
|
+
"./utils/animationFrame": {
|
|
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": {
|
|
52
|
+
"types": "./lib/typings/index.d.ts",
|
|
53
|
+
"import": "./lib/typings/index.js",
|
|
54
|
+
"default": "./lib/typings/index.js"
|
|
55
|
+
},
|
|
56
|
+
"./stylesheets/default.css": "./stylesheets/default.css",
|
|
57
|
+
"./stylesheets/custom/SpatialScenePanel.css": "./stylesheets/custom/SpatialScenePanel.css",
|
|
58
|
+
"./stylesheets/*": "./stylesheets/*",
|
|
59
|
+
"./lib/*": "./lib/*",
|
|
60
|
+
"./package.json": "./package.json"
|
|
61
|
+
},
|
|
10
62
|
"author": "BEIKE REALSEE TECHNOLOGY (HK) LIMITED",
|
|
11
63
|
"license": "MIT",
|
|
12
64
|
"private": false,
|
|
@@ -19,26 +71,26 @@
|
|
|
19
71
|
],
|
|
20
72
|
"scripts": {
|
|
21
73
|
"dev": "vite --port=3088 --host 0.0.0.0",
|
|
22
|
-
"build": "
|
|
74
|
+
"build": "pnpm packages",
|
|
23
75
|
"preview": "vite preview",
|
|
24
|
-
"docs": "npx typedoc
|
|
76
|
+
"docs": "npx typedoc",
|
|
25
77
|
"packages": "node ./dev-tools/build-packages.js",
|
|
26
78
|
"postpublish": "cnpm sync @realsee/vreo"
|
|
27
79
|
},
|
|
28
80
|
"peerDependencies": {
|
|
29
81
|
"@realsee/dnalogel": "3.67.0",
|
|
30
82
|
"@realsee/five": "^6.4.0-alpha.1",
|
|
31
|
-
"three": "0.117.1",
|
|
32
83
|
"react": "^18.0.0",
|
|
33
|
-
"react-dom": "^18.0.0"
|
|
84
|
+
"react-dom": "^18.0.0",
|
|
85
|
+
"three": "0.117.1"
|
|
34
86
|
},
|
|
35
87
|
"devDependencies": {
|
|
36
88
|
"@babel/cli": "^7.16.0",
|
|
37
89
|
"@babel/core": "^7.16.0",
|
|
90
|
+
"@babel/plugin-transform-runtime": "7.24.3",
|
|
38
91
|
"@babel/preset-env": "^7.16.4",
|
|
39
92
|
"@babel/preset-react": "^7.16.0",
|
|
40
93
|
"@babel/preset-typescript": "^7.16.0",
|
|
41
|
-
"@babel/plugin-transform-runtime": "7.24.3",
|
|
42
94
|
"@realsee/dnalogel": "^3.67.2",
|
|
43
95
|
"@realsee/five": "^6.4.0-alpha.38",
|
|
44
96
|
"@tweenjs/tween.js": "18.6.4",
|
|
@@ -48,6 +100,7 @@
|
|
|
48
100
|
"@types/react-dom": "^18.3.7",
|
|
49
101
|
"@types/react-transition-group": "^4.4.4",
|
|
50
102
|
"@vitejs/plugin-react": "^4.3.3",
|
|
103
|
+
"babel-plugin-add-import-extension": "^1.6.0",
|
|
51
104
|
"cnpm": "^9.2.0",
|
|
52
105
|
"del": "^6.0.0",
|
|
53
106
|
"react": "^18.3.1",
|
|
@@ -61,6 +114,5 @@
|
|
|
61
114
|
"classnames": "^2.3.1",
|
|
62
115
|
"mobx": "^6.3.7",
|
|
63
116
|
"mobx-react": "^7.2.1"
|
|
64
|
-
}
|
|
65
|
-
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
|
117
|
+
}
|
|
66
118
|
}
|