@realsee/vreo 0.2.0-alpha.2 → 0.2.0-alpha.3

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.
@@ -128,7 +128,7 @@ var CameraMovementPlugin = function CameraMovementPlugin(five) {
128
128
  var panoIndex = args.panoIndex !== undefined ? args.panoIndex : five.panoIndex;
129
129
 
130
130
  if (panoIndex !== undefined) {
131
- five.moveToPano(panoIndex, Object.assign({
131
+ var movePanoOptions = {
132
132
  duration: duration,
133
133
  // 移动耗时
134
134
  moveEndCallback: function moveEndCallback() {
@@ -137,9 +137,11 @@ var CameraMovementPlugin = function CameraMovementPlugin(five) {
137
137
  // 移动结束
138
138
  moveCancelCallback: function moveCancelCallback() {
139
139
  return reject(false);
140
- } // 移动开始
141
-
142
- }, args));
140
+ },
141
+ // 移动开始
142
+ effect: 'fade'
143
+ };
144
+ five.moveToPano(panoIndex, Object.assign(movePanoOptions, args));
143
145
  } else {
144
146
  reject(false);
145
147
  }
@@ -1,4 +1,4 @@
1
- import { Mode, Pose } from '@realsee/five';
1
+ import { Mode, MovePanoOptions, Pose } from '@realsee/five';
2
2
  export interface CameraMovementPluginParameterType {
3
3
  }
4
4
  export interface CameraMovementPluginExportType {
@@ -33,7 +33,7 @@ export interface CameraMovementOptsCallback {
33
33
  export declare type MoveArgs = {
34
34
  mode: Mode;
35
35
  panoIndex: number;
36
- } & Pose;
36
+ } & Pose & Pick<MovePanoOptions, 'effect'>;
37
37
  export declare type MoveOpts = {
38
38
  preload?: boolean;
39
39
  } & CameraMovementOptsCallback;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@realsee/vreo",
3
- "version": "0.2.0-alpha.2",
3
+ "version": "0.2.0-alpha.3",
4
4
  "description": "Vreo (VR Video 缩写) 是基于如视三维渲染引擎 Five 和 用户界面构建库 React 实现的如视 3D 空间剧本播放器。",
5
5
  "keywords": [
6
6
  "realsee",
@@ -1,4 +1,4 @@
1
- import { Five } from '@realsee/five'
1
+ import { Five, MovePanoOptions } from '@realsee/five'
2
2
  import type { FivePlugin } from '@realsee/five'
3
3
  import * as TWEEN from '@tweenjs/tween.js'
4
4
 
@@ -97,14 +97,16 @@ export const CameraMovementPlugin: FivePlugin<CameraMovementPluginParameterType,
97
97
  return await new Promise<boolean>((resolve, reject) => {
98
98
  const panoIndex = args.panoIndex !== undefined ? args.panoIndex : five.panoIndex
99
99
  if (panoIndex !== undefined) {
100
+ const movePanoOptions: MovePanoOptions = {
101
+ duration, // 移动耗时
102
+ moveEndCallback: () => resolve(true), // 移动结束
103
+ moveCancelCallback: () => reject(false), // 移动开始
104
+ effect: 'fade',
105
+ }
100
106
  five.moveToPano(
101
107
  panoIndex,
102
108
  Object.assign(
103
- {
104
- duration, // 移动耗时
105
- moveEndCallback: () => resolve(true), // 移动结束
106
- moveCancelCallback: () => reject(false), // 移动开始
107
- },
109
+ movePanoOptions,
108
110
  args,
109
111
  ),
110
112
  )
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable prettier/prettier */
2
- import { Mode, Pose } from '@realsee/five'
2
+ import { Mode, MovePanoOptions, Pose } from '@realsee/five'
3
3
 
4
4
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
5
5
  export interface CameraMovementPluginParameterType { }
@@ -39,7 +39,7 @@ export interface CameraMovementOptsCallback {
39
39
  export type MoveArgs = {
40
40
  mode: Mode
41
41
  panoIndex: number
42
- } & Pose
42
+ } & Pose & Pick<MovePanoOptions, 'effect'>
43
43
 
44
44
  export type MoveOpts = {
45
45
  preload?: boolean