@realsee/vreo 0.2.0-alpha.9 → 1.0.0-alpha.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/CHANGELOG.md +30 -0
- package/README.md +16 -5
- package/docs/assets/highlight.css +1 -1
- package/docs/assets/main.js +2 -2
- package/docs/assets/search.js +1 -1
- package/docs/assets/style.css +28 -2
- package/docs/classes/Player.AudioLike.html +52 -0
- package/docs/classes/Player.Controller.html +13 -13
- package/docs/classes/Player.Player-1.html +11 -11
- package/docs/classes/Player.VideoAgentMesh.html +53 -53
- package/docs/classes/Player.VideoAgentScene.html +1 -1
- package/docs/demo/assets/AppReact.d0ee843a.js +1 -0
- package/docs/demo/assets/default.63925584.js +3984 -0
- package/docs/demo/assets/default.f3f3ca8c.css +1 -0
- package/docs/demo/assets/dynamic.76506c2c.js +1 -0
- package/docs/demo/assets/examples.3d8323db.js +25 -0
- package/docs/demo/assets/examples.dac4a6fe.css +1 -0
- package/docs/demo/assets/index.7e31122c.js +1 -0
- package/docs/demo/assets/index.9331038f.css +1 -0
- package/docs/demo/assets/main.79b11b9d.js +1 -0
- package/docs/demo/assets/react.2ee8565f.css +1 -0
- package/docs/demo/assets/react.c1c07c14.js +25 -0
- package/docs/demo/assets/znRoyv06SZQeqA7m.0057e8ae.js +1 -0
- package/docs/demo/examples.html +17 -0
- package/docs/demo/index-react-dynamic.html +20 -0
- package/docs/demo/index-react.html +20 -0
- package/docs/demo/index.html +19 -0
- package/docs/enums/Player.InfoPanelStyleEnum.html +1 -1
- package/docs/enums/Player.InfoPanelTypeEnum.html +2 -2
- package/docs/enums/Player.PanoEffectEnum.html +2 -2
- package/docs/enums/Player.PanoTagEnum.html +2 -2
- package/docs/enums/Player.PanoTagStyleEnum.html +7 -0
- package/docs/enums/Player.VreoKeyframeEnum.html +12 -12
- package/docs/enums/fivePlugins.CameraMovementEffect.html +1 -1
- package/docs/enums/fivePlugins.Rotation.html +1 -1
- package/docs/index.html +13 -6
- package/docs/interfaces/Player.CustomVreoKeyframeProps.html +1 -1
- package/docs/interfaces/Player.PlayerConfigs.html +4 -3
- package/docs/interfaces/Player.Vertex.html +2 -2
- package/docs/interfaces/Player.VideoAgentMeshOptions.html +8 -1
- package/docs/interfaces/Player.VreoKeyframe.html +2 -2
- package/docs/interfaces/Player.VreoUnit.html +2 -2
- package/docs/interfaces/Player.VreoVideo.html +2 -2
- package/docs/interfaces/fivePlugins.CSS3DRenderPluginExportType.html +4 -0
- package/docs/interfaces/fivePlugins.CameraMovementOptsCallback.html +1 -1
- package/docs/interfaces/fivePlugins.CameraMovementPluginExportType.html +2 -2
- package/docs/interfaces/fivePlugins.CameraMovementPluginParameterType.html +1 -1
- package/docs/interfaces/fivePlugins.ModelTVVideoPluginData.html +1 -1
- package/docs/interfaces/fivePlugins.ModelTVVideoPluginExportType.html +1 -1
- package/docs/interfaces/fivePlugins.ModelTVVideoPluginParameterType.html +1 -1
- package/docs/interfaces/fivePlugins.Vector3Position.html +3 -0
- package/docs/interfaces/react.VreoActionCallbacks.html +15 -7
- package/docs/interfaces/react.VreoProviderProps.html +1 -1
- package/docs/modules/Player.html +21 -15
- package/docs/modules/custom.html +1 -1
- package/docs/modules/fivePlugins.html +5 -2
- package/docs/modules/react.html +1 -1
- package/docs/modules.html +1 -1
- package/lib/PlayController/index.js +4 -5
- package/lib/Player/App.js +9 -7
- package/lib/Player/Controller.d.ts +29 -8
- package/lib/Player/Controller.js +193 -27
- package/lib/Player/custom/SpatialScenePanel/index.js +5 -4
- package/lib/Player/hooks.js +2 -2
- package/lib/Player/index.d.ts +5 -3
- package/lib/Player/index.js +97 -53
- package/lib/Player/modules/Drawer/index.js +1 -1
- package/lib/Player/modules/PopUp/index.js +1 -1
- package/lib/Player/modules/ResizeObserver/index.d.ts +2 -0
- package/lib/Player/modules/ResizeObserver/index.js +37 -0
- package/lib/Player/modules/VideoAgent/VideoAgentMesh.d.ts +16 -2
- package/lib/Player/modules/VideoAgent/VideoAgentMesh.js +132 -59
- package/lib/Player/modules/VideoAgent/VideoAgentScene.d.ts +3 -6
- package/lib/Player/modules/VideoAgent/VideoAgentScene.js +31 -36
- package/lib/Player/modules/VideoAgent/index.js +53 -12
- package/lib/Player/modules/Wave/index.d.ts +5 -0
- package/lib/Player/modules/Wave/index.js +51 -0
- package/lib/Player/modules/keyframes/BgMusic/index.js +1 -1
- package/lib/Player/modules/keyframes/CameraMovement/index.js +1 -1
- package/lib/Player/modules/keyframes/InfoPanel/index.js +22 -10
- package/lib/Player/modules/keyframes/ModelVideo/index.js +46 -9
- package/lib/Player/modules/keyframes/PanoEffect/index.js +1 -1
- package/lib/Player/modules/keyframes/PanoEffect/lineAnime.js +1 -1
- package/lib/Player/modules/keyframes/PanoTag/index.d.ts +1 -2
- package/lib/Player/modules/keyframes/PanoTag/index.js +79 -119
- package/lib/Player/modules/keyframes/PanoTextLabel/index.d.ts +3 -0
- package/lib/Player/modules/keyframes/PanoTextLabel/index.js +96 -44
- package/lib/Player/modules/keyframes/Prompter/index.js +10 -23
- package/lib/Player/modules/keyframes/UpdateVRPanorama/index.js +10 -6
- package/lib/Player/modules/keyframes/VideoEffect/index.js +1 -1
- package/lib/Player/typings.d.ts +12 -1
- package/lib/fivePlugins/CSS3DRenderPlugin/centerPoint.d.ts +2 -0
- package/lib/fivePlugins/CSS3DRenderPlugin/centerPoint.js +12 -0
- package/lib/fivePlugins/CSS3DRenderPlugin/createResizeObserver.d.ts +7 -0
- package/lib/fivePlugins/CSS3DRenderPlugin/createResizeObserver.js +32 -0
- package/lib/fivePlugins/CSS3DRenderPlugin/evenNumber.d.ts +3 -0
- package/lib/fivePlugins/CSS3DRenderPlugin/evenNumber.js +11 -0
- package/lib/fivePlugins/CSS3DRenderPlugin/index.d.ts +56 -0
- package/lib/fivePlugins/CSS3DRenderPlugin/index.js +275 -0
- package/lib/fivePlugins/CSS3DRenderPlugin/transformPositionToVector3.d.ts +7 -0
- package/lib/fivePlugins/CSS3DRenderPlugin/transformPositionToVector3.js +18 -0
- package/lib/fivePlugins/CameraMovementPlugin/index.js +13 -12
- package/lib/fivePlugins/ModelTVVideoPlugin/index.js +1 -1
- package/lib/react/index.d.ts +8 -4
- package/lib/react/index.js +3 -3
- package/lib/shared-utils/AduioLike.d.ts +37 -0
- package/lib/shared-utils/AduioLike.js +166 -0
- package/lib/shared-utils/addResizeListener.d.ts +4 -0
- package/lib/shared-utils/addResizeListener.js +51 -0
- package/lib/shared-utils/animationFrame/BetterTween.js +7 -3
- package/lib/shared-utils/animationFrame/tween.js +1 -1
- package/lib/shared-utils/createTransMatrix.d.ts +1 -0
- package/lib/shared-utils/createTransMatrix.js +43 -0
- package/lib/shared-utils/getFileExpandedName.d.ts +1 -0
- package/lib/shared-utils/getFileExpandedName.js +13 -0
- package/lib/shared-utils/getMediaInfo.d.ts +9 -0
- package/lib/shared-utils/getMediaInfo.js +75 -0
- package/lib/shared-utils/setElementDataset.d.ts +1 -0
- package/lib/shared-utils/setElementDataset.js +24 -0
- package/lib/typings/VreoUnit.d.ts +37 -2
- package/lib/typings/VreoUnit.js +13 -1
- package/package.json +10 -10
- package/resources/PlayController/index.ts +0 -13
- package/resources/Player/App.tsx +5 -4
- package/resources/Player/Controller.ts +277 -146
- package/resources/Player/custom/SpatialScenePanel/index.tsx +5 -5
- package/resources/Player/hooks.ts +3 -5
- package/resources/Player/index.tsx +189 -141
- package/resources/Player/modules/ResizeObserver/index.tsx +23 -0
- package/resources/Player/modules/VideoAgent/VideoAgentMesh.ts +87 -31
- package/resources/Player/modules/VideoAgent/VideoAgentScene.ts +27 -24
- package/resources/Player/modules/VideoAgent/index.tsx +28 -12
- package/resources/Player/modules/Wave/index.tsx +18 -0
- package/resources/Player/modules/keyframes/InfoPanel/index.tsx +26 -11
- package/resources/Player/modules/keyframes/ModelVideo/index.tsx +36 -3
- package/resources/Player/modules/keyframes/PanoTag/index.tsx +53 -97
- package/resources/Player/modules/keyframes/PanoTextLabel/index.tsx +86 -34
- package/resources/Player/modules/keyframes/Prompter/index.tsx +6 -16
- package/resources/Player/modules/keyframes/UpdateVRPanorama/index.tsx +6 -2
- package/resources/Player/typings.ts +15 -1
- package/resources/fivePlugins/CSS3DRenderPlugin/centerPoint.ts +5 -0
- package/resources/fivePlugins/CSS3DRenderPlugin/createResizeObserver.ts +17 -0
- package/resources/fivePlugins/CSS3DRenderPlugin/evenNumber.ts +4 -0
- package/resources/fivePlugins/CSS3DRenderPlugin/index.ts +254 -0
- package/resources/fivePlugins/CSS3DRenderPlugin/transformPositionToVector3.ts +5 -0
- package/resources/fivePlugins/CameraMovementPlugin/index.ts +19 -12
- package/resources/react/index.tsx +7 -3
- package/resources/shared-utils/AduioLike.ts +109 -0
- package/resources/shared-utils/addResizeListener.ts +46 -0
- package/resources/shared-utils/createTransMatrix.ts +12 -0
- package/resources/shared-utils/getFileExpandedName.ts +6 -0
- package/resources/shared-utils/getMediaInfo.ts +52 -0
- package/resources/shared-utils/setElementDataset.ts +18 -0
- package/resources/typings/VreoUnit.ts +41 -3
- package/stylesheets/custom/SpatialScenePanel.css +2 -1
- package/stylesheets/default.css +348 -84
package/lib/react/index.d.ts
CHANGED
|
@@ -11,12 +11,16 @@ export declare const VreoProvider: React.FC<VreoProviderProps>;
|
|
|
11
11
|
export interface VreoActionCallbacks {
|
|
12
12
|
/**
|
|
13
13
|
* 载入剧本数据。
|
|
14
|
+
* @param vreoUnit 剧本数据
|
|
15
|
+
* @param currentTime 开始时间戳
|
|
16
|
+
* @param preload 是否开启预载
|
|
17
|
+
* @param force 是否强制载入
|
|
14
18
|
*/
|
|
15
|
-
load: (vreoUnit: VreoUnit, currentTime?: number) => Promise<boolean>;
|
|
19
|
+
load: (vreoUnit: VreoUnit, currentTime?: number, preload?: boolean, force?: boolean) => Promise<boolean>;
|
|
16
20
|
/**
|
|
17
21
|
* 播放。
|
|
18
22
|
*/
|
|
19
|
-
play: () => void;
|
|
23
|
+
play: (currentTime?: number) => void;
|
|
20
24
|
/**
|
|
21
25
|
* 暂停。
|
|
22
26
|
*/
|
|
@@ -35,10 +39,10 @@ export interface VreoActionCallbacks {
|
|
|
35
39
|
dispose: () => void;
|
|
36
40
|
}
|
|
37
41
|
export declare function useVreoAction(): {
|
|
38
|
-
load: (vreoUnit: VreoUnit, currentTime?: number
|
|
42
|
+
load: (vreoUnit: VreoUnit, currentTime?: number) => Promise<boolean>;
|
|
39
43
|
pause: () => void;
|
|
40
44
|
show: () => void;
|
|
41
|
-
play: () => boolean;
|
|
45
|
+
play: (currentTime?: number) => boolean;
|
|
42
46
|
hide: () => void;
|
|
43
47
|
dispose: () => void;
|
|
44
48
|
};
|
package/lib/react/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
@@ -79,8 +79,8 @@ function useVreoAction() {
|
|
|
79
79
|
var load = React.useCallback(function (vreoUnit, currentTime) {
|
|
80
80
|
return player.load(vreoUnit, currentTime);
|
|
81
81
|
}, [player]);
|
|
82
|
-
var play = React.useCallback(function () {
|
|
83
|
-
return player.play();
|
|
82
|
+
var play = React.useCallback(function (currentTime) {
|
|
83
|
+
return player.play(currentTime || 0);
|
|
84
84
|
}, [player]);
|
|
85
85
|
var pause = React.useCallback(function () {
|
|
86
86
|
return player.pause();
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Subscribe } from '@realsee/five';
|
|
2
|
+
/**
|
|
3
|
+
* 模拟 `<Audio>` 事件。
|
|
4
|
+
*/
|
|
5
|
+
export declare type AudioLikeEvent = {
|
|
6
|
+
play: () => void;
|
|
7
|
+
pause: () => void;
|
|
8
|
+
timeupdate: () => void;
|
|
9
|
+
ended: () => void;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* 模拟 `<Audio>` 功能:没有音频,但执行逻辑跟 `<Audio>` 相似。
|
|
13
|
+
*/
|
|
14
|
+
export declare class AudioLike extends Subscribe<AudioLikeEvent> {
|
|
15
|
+
private $timestamp;
|
|
16
|
+
private $currentTime;
|
|
17
|
+
private $duration;
|
|
18
|
+
private stopInterval?;
|
|
19
|
+
muted: boolean;
|
|
20
|
+
src: string;
|
|
21
|
+
setAttribute(name: string, value: string): void;
|
|
22
|
+
constructor({ duration }?: {
|
|
23
|
+
duration?: number;
|
|
24
|
+
});
|
|
25
|
+
play(): void;
|
|
26
|
+
pause(): void;
|
|
27
|
+
requestAnimationFrameLoop(): void;
|
|
28
|
+
get currentTime(): number;
|
|
29
|
+
set currentTime(time: number);
|
|
30
|
+
get duration(): number;
|
|
31
|
+
set duration(duration: number);
|
|
32
|
+
get ended(): boolean;
|
|
33
|
+
get paused(): boolean;
|
|
34
|
+
addEventListener(evtName: keyof AudioLikeEvent, callback: () => void, useCapture?: boolean): void;
|
|
35
|
+
removeEventListener(evtName: keyof AudioLikeEvent, callback: () => void, useCapture?: boolean): void;
|
|
36
|
+
}
|
|
37
|
+
export default AudioLike;
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = exports.AudioLike = void 0;
|
|
9
|
+
|
|
10
|
+
var _five = require("@realsee/five");
|
|
11
|
+
|
|
12
|
+
var _animationFrame = require("./animationFrame");
|
|
13
|
+
|
|
14
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
15
|
+
|
|
16
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
17
|
+
|
|
18
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
19
|
+
|
|
20
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
21
|
+
|
|
22
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
23
|
+
|
|
24
|
+
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); }; }
|
|
25
|
+
|
|
26
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
27
|
+
|
|
28
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
29
|
+
|
|
30
|
+
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; } }
|
|
31
|
+
|
|
32
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
33
|
+
|
|
34
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* 模拟 `<Audio>` 功能:没有音频,但执行逻辑跟 `<Audio>` 相似。
|
|
38
|
+
*/
|
|
39
|
+
var AudioLike = /*#__PURE__*/function (_Subscribe) {
|
|
40
|
+
_inherits(AudioLike, _Subscribe);
|
|
41
|
+
|
|
42
|
+
var _super = _createSuper(AudioLike);
|
|
43
|
+
|
|
44
|
+
function AudioLike() {
|
|
45
|
+
var _this;
|
|
46
|
+
|
|
47
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
48
|
+
duration = _ref.duration;
|
|
49
|
+
|
|
50
|
+
_classCallCheck(this, AudioLike);
|
|
51
|
+
|
|
52
|
+
_this = _super.call(this);
|
|
53
|
+
|
|
54
|
+
_defineProperty(_assertThisInitialized(_this), "$timestamp", null);
|
|
55
|
+
|
|
56
|
+
_defineProperty(_assertThisInitialized(_this), "$currentTime", 0);
|
|
57
|
+
|
|
58
|
+
_defineProperty(_assertThisInitialized(_this), "$duration", 0);
|
|
59
|
+
|
|
60
|
+
_defineProperty(_assertThisInitialized(_this), "muted", false);
|
|
61
|
+
|
|
62
|
+
_defineProperty(_assertThisInitialized(_this), "src", '');
|
|
63
|
+
|
|
64
|
+
if (duration) {
|
|
65
|
+
_this.$duration = duration;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return _this;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
_createClass(AudioLike, [{
|
|
72
|
+
key: "setAttribute",
|
|
73
|
+
value: function setAttribute(name, value) {// nothing todo
|
|
74
|
+
}
|
|
75
|
+
}, {
|
|
76
|
+
key: "play",
|
|
77
|
+
value: function play() {
|
|
78
|
+
var _this2 = this;
|
|
79
|
+
|
|
80
|
+
if (this.$currentTime === this.$duration) {
|
|
81
|
+
this.$currentTime = 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (this.$timestamp === null) {
|
|
85
|
+
this.$timestamp = performance.now() - this.$currentTime;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
this.stopInterval = (0, _animationFrame.requestAnimationFrameInterval)(function () {
|
|
89
|
+
return _this2.requestAnimationFrameLoop();
|
|
90
|
+
});
|
|
91
|
+
this.emit('play');
|
|
92
|
+
}
|
|
93
|
+
}, {
|
|
94
|
+
key: "pause",
|
|
95
|
+
value: function pause() {
|
|
96
|
+
if (this.stopInterval) {
|
|
97
|
+
this.stopInterval();
|
|
98
|
+
this.emit('pause');
|
|
99
|
+
this.stopInterval = undefined;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
this.$timestamp = null;
|
|
103
|
+
}
|
|
104
|
+
}, {
|
|
105
|
+
key: "requestAnimationFrameLoop",
|
|
106
|
+
value: function requestAnimationFrameLoop() {
|
|
107
|
+
if (this.$timestamp === null) return;
|
|
108
|
+
var now = performance.now();
|
|
109
|
+
this.$currentTime = now - this.$timestamp;
|
|
110
|
+
this.emit('timeupdate');
|
|
111
|
+
|
|
112
|
+
if (this.$currentTime >= this.$duration - 10) {
|
|
113
|
+
this.$currentTime = this.$duration;
|
|
114
|
+
this.pause();
|
|
115
|
+
this.emit('ended');
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}, {
|
|
119
|
+
key: "currentTime",
|
|
120
|
+
get: function get() {
|
|
121
|
+
return this.$currentTime / 1000;
|
|
122
|
+
},
|
|
123
|
+
set: function set(time) {
|
|
124
|
+
this.$currentTime = time;
|
|
125
|
+
}
|
|
126
|
+
}, {
|
|
127
|
+
key: "duration",
|
|
128
|
+
get: function get() {
|
|
129
|
+
return this.$duration;
|
|
130
|
+
},
|
|
131
|
+
set: function set(duration) {
|
|
132
|
+
this.pause();
|
|
133
|
+
this.$duration = duration;
|
|
134
|
+
this.$timestamp = null;
|
|
135
|
+
this.$currentTime = 0;
|
|
136
|
+
}
|
|
137
|
+
}, {
|
|
138
|
+
key: "ended",
|
|
139
|
+
get: function get() {
|
|
140
|
+
return this.$currentTime === this.$duration;
|
|
141
|
+
}
|
|
142
|
+
}, {
|
|
143
|
+
key: "paused",
|
|
144
|
+
get: function get() {
|
|
145
|
+
return !this.stopInterval;
|
|
146
|
+
}
|
|
147
|
+
}, {
|
|
148
|
+
key: "addEventListener",
|
|
149
|
+
value: function addEventListener(evtName, callback) {
|
|
150
|
+
var useCapture = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
151
|
+
this.on(evtName, callback);
|
|
152
|
+
}
|
|
153
|
+
}, {
|
|
154
|
+
key: "removeEventListener",
|
|
155
|
+
value: function removeEventListener(evtName, callback) {
|
|
156
|
+
var useCapture = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
157
|
+
this.off(evtName, callback);
|
|
158
|
+
}
|
|
159
|
+
}]);
|
|
160
|
+
|
|
161
|
+
return AudioLike;
|
|
162
|
+
}(_five.Subscribe);
|
|
163
|
+
|
|
164
|
+
exports.AudioLike = AudioLike;
|
|
165
|
+
var _default = AudioLike;
|
|
166
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare type ResizeHandler = (width: number, height: number) => void;
|
|
2
|
+
export declare function addResizeListener(element: Element | undefined | null, resizeHandler: ResizeHandler, immediate?: boolean): () => void;
|
|
3
|
+
export declare function hasResizeListener(element?: Element | null): number | boolean;
|
|
4
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.addResizeListener = addResizeListener;
|
|
7
|
+
exports.hasResizeListener = hasResizeListener;
|
|
8
|
+
var resizeObserverCache = new Map();
|
|
9
|
+
|
|
10
|
+
function addResizeListener(element, resizeHandler) {
|
|
11
|
+
var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
12
|
+
if (!element) return function () {};
|
|
13
|
+
if (immediate) resizeHandler(element.clientWidth, element.clientHeight);
|
|
14
|
+
|
|
15
|
+
if (typeof ResizeObserver !== 'undefined' && ResizeObserver) {
|
|
16
|
+
var resizeObserver = new ResizeObserver(function () {
|
|
17
|
+
return resizeHandler(element.clientWidth, element.clientHeight);
|
|
18
|
+
});
|
|
19
|
+
resizeObserver.observe(element);
|
|
20
|
+
resizeObserverCache.set(element, resizeObserverCache.get(element) || 0 + 1);
|
|
21
|
+
return function () {
|
|
22
|
+
if (element) resizeObserver.unobserve(element);
|
|
23
|
+
|
|
24
|
+
if (resizeObserverCache.get(element) === 1) {
|
|
25
|
+
resizeObserverCache["delete"](element);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
} else {
|
|
29
|
+
var iframe = document.createElement('iframe');
|
|
30
|
+
iframe.style.cssText = 'position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;opacity:0;visibility:hidden;margin:0;border:0;padding:0;z-index:-1;';
|
|
31
|
+
iframe.classList.add('resize-sensor-iframe');
|
|
32
|
+
element.appendChild(iframe);
|
|
33
|
+
if (!iframe.contentWindow) return function () {};
|
|
34
|
+
iframe.contentWindow.addEventListener('resize', function () {
|
|
35
|
+
resizeHandler(iframe.clientWidth, iframe.clientHeight);
|
|
36
|
+
});
|
|
37
|
+
resizeObserverCache.set(element, resizeObserverCache.get(element) || 0 + 1);
|
|
38
|
+
return function () {
|
|
39
|
+
element.removeChild(iframe);
|
|
40
|
+
|
|
41
|
+
if (resizeObserverCache.get(element) === 1) {
|
|
42
|
+
resizeObserverCache["delete"](element);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function hasResizeListener(element) {
|
|
49
|
+
if (!element) return false;
|
|
50
|
+
return resizeObserverCache.get(element) || 0 > 0;
|
|
51
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
@@ -14,9 +14,13 @@ var _ = require(".");
|
|
|
14
14
|
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
16
16
|
|
|
17
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
18
|
+
|
|
19
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
20
|
+
|
|
17
21
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
18
22
|
|
|
19
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
23
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
20
24
|
|
|
21
25
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
22
26
|
|
|
@@ -84,7 +88,7 @@ var BetterTween = /*#__PURE__*/function (_TWEEN$Tween) {
|
|
|
84
88
|
return _this;
|
|
85
89
|
}
|
|
86
90
|
|
|
87
|
-
return BetterTween;
|
|
91
|
+
return _createClass(BetterTween);
|
|
88
92
|
}(_tween["default"].Tween);
|
|
89
93
|
|
|
90
94
|
exports.BetterTween = BetterTween;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createTransMatrix(arr1: number[]): (arr2: number[]) => number[];
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.createTransMatrix = createTransMatrix;
|
|
9
|
+
|
|
10
|
+
var THREE = _interopRequireWildcard(require("three"));
|
|
11
|
+
|
|
12
|
+
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); }
|
|
13
|
+
|
|
14
|
+
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; }
|
|
15
|
+
|
|
16
|
+
function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
|
|
17
|
+
|
|
18
|
+
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; } }
|
|
19
|
+
|
|
20
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
21
|
+
|
|
22
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
23
|
+
|
|
24
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
25
|
+
|
|
26
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
27
|
+
|
|
28
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
29
|
+
|
|
30
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
31
|
+
|
|
32
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
33
|
+
|
|
34
|
+
function createTransMatrix(arr1) {
|
|
35
|
+
var matrix4 = new THREE.Matrix4();
|
|
36
|
+
matrix4.fromArray(arr1);
|
|
37
|
+
return function (arr2) {
|
|
38
|
+
var vector3 = _construct(THREE.Vector3, _toConsumableArray(arr2));
|
|
39
|
+
|
|
40
|
+
vector3.applyMatrix4(matrix4);
|
|
41
|
+
return vector3.toArray();
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function getFileExpandedName(filePath?: string | null): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = getFileExpandedName;
|
|
7
|
+
|
|
8
|
+
function getFileExpandedName(filePath) {
|
|
9
|
+
if (!filePath) return '';
|
|
10
|
+
var index = filePath.lastIndexOf('.');
|
|
11
|
+
var ext = filePath.substring(index + 1);
|
|
12
|
+
return ext.toLowerCase();
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export default function getMediaInfo(fileUrl: string): Promise<{
|
|
2
|
+
duration?: number | undefined;
|
|
3
|
+
type?: 'video' | 'audio' | 'image' | 'unknown' | undefined;
|
|
4
|
+
error?: string | undefined;
|
|
5
|
+
}>;
|
|
6
|
+
export declare function getMediaType(url?: string): "audio" | "video" | "image" | "unknown";
|
|
7
|
+
export declare function getMediaTypeByExpandedName(fileExpandedName?: string | null): "audio" | "video" | "image" | "unknown";
|
|
8
|
+
export declare function getMediaTypeByUrl(fileUrl?: string | null): "audio" | "video" | "image" | "unknown" | undefined;
|
|
9
|
+
export declare function getFileName(fileUrl?: string): string;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = getMediaInfo;
|
|
7
|
+
exports.getFileName = getFileName;
|
|
8
|
+
exports.getMediaType = getMediaType;
|
|
9
|
+
exports.getMediaTypeByExpandedName = getMediaTypeByExpandedName;
|
|
10
|
+
exports.getMediaTypeByUrl = getMediaTypeByUrl;
|
|
11
|
+
|
|
12
|
+
var _getFileExpandedName = _interopRequireDefault(require("./getFileExpandedName"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
|
|
16
|
+
function getMediaInfo(fileUrl) {
|
|
17
|
+
var type = getMediaType(fileUrl);
|
|
18
|
+
if (!type) return Promise.resolve({
|
|
19
|
+
error: '未知的文件类型: ' + fileUrl
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
var mediaElement = function () {
|
|
23
|
+
if (type === 'video') return document.createElement('video');
|
|
24
|
+
if (type === 'audio') return document.createElement('audio');
|
|
25
|
+
}();
|
|
26
|
+
|
|
27
|
+
if (!mediaElement) return Promise.resolve({
|
|
28
|
+
error: 'Unknown media element'
|
|
29
|
+
});
|
|
30
|
+
mediaElement.src = fileUrl;
|
|
31
|
+
return new Promise(function (resolve) {
|
|
32
|
+
mediaElement.onerror = function () {
|
|
33
|
+
return resolve({
|
|
34
|
+
error: 'onerror'
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
mediaElement.onloadedmetadata = function () {
|
|
39
|
+
resolve({
|
|
40
|
+
duration: mediaElement.duration * 1000,
|
|
41
|
+
type: type
|
|
42
|
+
}); // s => ms
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function getMediaType(url) {
|
|
48
|
+
var fileExpandedName = (0, _getFileExpandedName["default"])(url);
|
|
49
|
+
var type = getMediaTypeByExpandedName(fileExpandedName);
|
|
50
|
+
return type;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function getMediaTypeByExpandedName(fileExpandedName) {
|
|
54
|
+
if (!fileExpandedName) return 'unknown';
|
|
55
|
+
if (/jpg|jpeg|png$/.test(fileExpandedName)) return 'image';
|
|
56
|
+
if (/mp3|wav$/.test(fileExpandedName)) return 'audio';
|
|
57
|
+
if (/avi|wmv|mpeg|mp4|m4v|mov|asf|flv|f4v|rmvb|rm|3gp|vob$/.test(fileExpandedName)) return 'video';
|
|
58
|
+
return 'unknown';
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function getMediaTypeByUrl(fileUrl) {
|
|
62
|
+
if (!fileUrl) return;
|
|
63
|
+
var fileExpandedName = (0, _getFileExpandedName["default"])(fileUrl);
|
|
64
|
+
return getMediaTypeByExpandedName(fileExpandedName);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function getFileName(fileUrl) {
|
|
68
|
+
if (!fileUrl) return '';
|
|
69
|
+
var index1 = fileUrl.lastIndexOf('/');
|
|
70
|
+
var index2 = fileUrl.lastIndexOf('\\');
|
|
71
|
+
var index3 = fileUrl.lastIndexOf('\\\\');
|
|
72
|
+
var index = Math.max(index1, index2, index3);
|
|
73
|
+
var ext = fileUrl.substring(index + 1);
|
|
74
|
+
return ext;
|
|
75
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function setElementDataset(element: any, dataset: Record<string, string | number>): void;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = setElementDataset;
|
|
7
|
+
|
|
8
|
+
function setElementDataset(element, dataset) {
|
|
9
|
+
if (element) {
|
|
10
|
+
Object.keys(dataset).forEach(function (key) {
|
|
11
|
+
var value = dataset[key].toString();
|
|
12
|
+
|
|
13
|
+
if (element instanceof Element) {
|
|
14
|
+
element.setAttribute("data-".concat(key), value);
|
|
15
|
+
} else if (element instanceof Document) {
|
|
16
|
+
element.documentElement.setAttribute("data-".concat(key), value);
|
|
17
|
+
} else if (element instanceof HTMLElement) {
|
|
18
|
+
element.dataset[key] = value;
|
|
19
|
+
} else {
|
|
20
|
+
element.setAttribute("data-".concat(key), value);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -76,6 +76,10 @@ export interface VreoVideo {
|
|
|
76
76
|
start: number;
|
|
77
77
|
end: number;
|
|
78
78
|
url: string;
|
|
79
|
+
avatar?: {
|
|
80
|
+
url: string;
|
|
81
|
+
force?: true;
|
|
82
|
+
};
|
|
79
83
|
}
|
|
80
84
|
/**
|
|
81
85
|
* 剧本结构
|
|
@@ -98,6 +102,7 @@ export declare type VreoKeyframeEvent = {
|
|
|
98
102
|
paused: (ended?: boolean) => void;
|
|
99
103
|
playing: () => void;
|
|
100
104
|
unknownKeyframeType: (keyframe: Record<string, any>) => void;
|
|
105
|
+
ended: () => void;
|
|
101
106
|
};
|
|
102
107
|
/**
|
|
103
108
|
* 相机运动
|
|
@@ -147,9 +152,13 @@ export interface Vertex {
|
|
|
147
152
|
z: number;
|
|
148
153
|
}
|
|
149
154
|
/**
|
|
150
|
-
*
|
|
155
|
+
* 矩形顶点
|
|
151
156
|
*/
|
|
152
157
|
export declare type QuadrangleVertexs = [Vertex, Vertex, Vertex, Vertex];
|
|
158
|
+
/**
|
|
159
|
+
* 顶点数组
|
|
160
|
+
*/
|
|
161
|
+
export declare type Vertexs = Vertex[];
|
|
153
162
|
/**
|
|
154
163
|
* 视频广告
|
|
155
164
|
*/
|
|
@@ -165,7 +174,17 @@ export declare type ModelVideoData = {
|
|
|
165
174
|
/**
|
|
166
175
|
* 视频映射在模型中的顶点
|
|
167
176
|
*/
|
|
168
|
-
vertexs: QuadrangleVertexs;
|
|
177
|
+
vertexs: QuadrangleVertexs | Vertexs;
|
|
178
|
+
matrixWorld?: number[];
|
|
179
|
+
};
|
|
180
|
+
/**
|
|
181
|
+
* 四元数
|
|
182
|
+
*/
|
|
183
|
+
export declare type Quaternion = {
|
|
184
|
+
x: number;
|
|
185
|
+
y: number;
|
|
186
|
+
z: number;
|
|
187
|
+
w: number;
|
|
169
188
|
};
|
|
170
189
|
/**
|
|
171
190
|
* 全景文本标签
|
|
@@ -173,6 +192,8 @@ export declare type ModelVideoData = {
|
|
|
173
192
|
export declare type PanoTextLabelData = {
|
|
174
193
|
text: string;
|
|
175
194
|
vertex: Vertex;
|
|
195
|
+
normal?: Vertex;
|
|
196
|
+
quaternion?: Quaternion;
|
|
176
197
|
fontSize?: number;
|
|
177
198
|
};
|
|
178
199
|
/**
|
|
@@ -182,8 +203,22 @@ export declare enum PanoTagEnum {
|
|
|
182
203
|
Text = "Text",
|
|
183
204
|
Image = "Image"
|
|
184
205
|
}
|
|
206
|
+
/**
|
|
207
|
+
* 标签样式种类
|
|
208
|
+
*/
|
|
209
|
+
export declare enum PanoTagStyleEnum {
|
|
210
|
+
/**
|
|
211
|
+
* 生长动画:默认值
|
|
212
|
+
*/
|
|
213
|
+
Growth = "Growth",
|
|
214
|
+
/**
|
|
215
|
+
* 展开动画
|
|
216
|
+
*/
|
|
217
|
+
Expand = "Expand"
|
|
218
|
+
}
|
|
185
219
|
export declare type PanoTagData = {
|
|
186
220
|
type: PanoTagEnum;
|
|
221
|
+
style: PanoTagStyleEnum;
|
|
187
222
|
text: string;
|
|
188
223
|
vertex: Vertex;
|
|
189
224
|
imgUrl?: string;
|
package/lib/typings/VreoUnit.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.VreoKeyframeEnum = exports.PanoTagEnum = exports.PanoEffectEnum = exports.InfoPanelTypeEnum = exports.InfoPanelStyleEnum = void 0;
|
|
6
|
+
exports.VreoKeyframeEnum = exports.PanoTagStyleEnum = exports.PanoTagEnum = exports.PanoEffectEnum = exports.InfoPanelTypeEnum = exports.InfoPanelStyleEnum = void 0;
|
|
7
7
|
var VreoKeyframeEnum;
|
|
8
8
|
/**
|
|
9
9
|
* 支持自定义剧本关键帧配置项
|
|
@@ -30,6 +30,10 @@ exports.VreoKeyframeEnum = VreoKeyframeEnum;
|
|
|
30
30
|
* 全景标签枚举
|
|
31
31
|
*/
|
|
32
32
|
var PanoTagEnum;
|
|
33
|
+
/**
|
|
34
|
+
* 标签样式种类
|
|
35
|
+
*/
|
|
36
|
+
|
|
33
37
|
exports.PanoTagEnum = PanoTagEnum;
|
|
34
38
|
|
|
35
39
|
(function (PanoTagEnum) {
|
|
@@ -37,6 +41,14 @@ exports.PanoTagEnum = PanoTagEnum;
|
|
|
37
41
|
PanoTagEnum["Image"] = "Image";
|
|
38
42
|
})(PanoTagEnum || (exports.PanoTagEnum = PanoTagEnum = {}));
|
|
39
43
|
|
|
44
|
+
var PanoTagStyleEnum;
|
|
45
|
+
exports.PanoTagStyleEnum = PanoTagStyleEnum;
|
|
46
|
+
|
|
47
|
+
(function (PanoTagStyleEnum) {
|
|
48
|
+
PanoTagStyleEnum["Growth"] = "Growth";
|
|
49
|
+
PanoTagStyleEnum["Expand"] = "Expand";
|
|
50
|
+
})(PanoTagStyleEnum || (exports.PanoTagStyleEnum = PanoTagStyleEnum = {}));
|
|
51
|
+
|
|
40
52
|
/**
|
|
41
53
|
* 全景特效枚举
|
|
42
54
|
*/
|