soonspacejs 2.6.0 → 2.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "soonspacejs",
3
- "version": "2.6.0",
3
+ "version": "2.6.2",
4
4
  "homepage": "http://www.xwbuilders.com:8800/",
5
5
  "description": "soonspacejs 2.x",
6
6
  "module": "./dist/index.esm.js",
@@ -27,5 +27,5 @@
27
27
  "peerDependencies": {
28
28
  "three": ">=0.148.0"
29
29
  },
30
- "gitHead": "d0dc74ef0ec37c5792bc8063fba0adadcdf39852"
30
+ "gitHead": "68133668461e47223d87b737c64b82978a08d0bd"
31
31
  }
@@ -10,6 +10,14 @@ export interface PathAnimationOptions {
10
10
  * 移动速度
11
11
  */
12
12
  speed?: number;
13
+ /**
14
+ * 反向播放
15
+ */
16
+ reverse?: boolean;
17
+ /**
18
+ * 是否需要旋转
19
+ */
20
+ needsRotate?: boolean;
13
21
  /**
14
22
  * 位置更新回调
15
23
  * @remarks
@@ -20,6 +28,11 @@ export interface PathAnimationOptions {
20
28
  * 动画开始时回调
21
29
  */
22
30
  onStart?: (tween: Tween<Vector3>) => void;
31
+ /**
32
+ * 每段 tween 动画开始时回调
33
+ * @param tween
34
+ */
35
+ onEveryStart?: (tween: Tween<Vector3>) => void;
23
36
  /**
24
37
  * 当到达一个点时回调
25
38
  */
@@ -42,6 +55,14 @@ export declare class PathAnimation implements PathAnimationOptions {
42
55
  * 移动速度
43
56
  */
44
57
  speed: number;
58
+ /**
59
+ * 反向播放
60
+ */
61
+ reverse: boolean;
62
+ /**
63
+ * 是否需要旋转
64
+ */
65
+ needsRotate: boolean;
45
66
  /**
46
67
  * 位置更新回调
47
68
  * @remarks
@@ -53,13 +74,14 @@ export declare class PathAnimation implements PathAnimationOptions {
53
74
  */
54
75
  onStart?: (tween: Tween<Vector3>) => void;
55
76
  /**
56
- * 当到达一个点时回调
77
+ * 每段 tween 动画开始时回调
78
+ * @param tween
57
79
  */
58
- onPoint?: (index: number, point: Vector3) => void;
80
+ onEveryStart?: (tween: Tween<Vector3>) => void;
59
81
  /**
60
- * 是否已暂停
82
+ * 当到达一个点时回调
61
83
  */
62
- isPaused: boolean;
84
+ onPoint?: (index: number, point: Vector3) => void;
63
85
  /**
64
86
  * 当前目标点的索引
65
87
  */
@@ -72,10 +94,15 @@ export declare class PathAnimation implements PathAnimationOptions {
72
94
  /**
73
95
  * 播放
74
96
  */
75
- play(): false | Promise<boolean | undefined>;
76
- protected _play(): Promise<boolean | undefined>;
97
+ play(): Promise<boolean | undefined>;
98
+ protected _play(points: IVector3[]): Promise<true | undefined>;
77
99
  /**
78
100
  * 暂停
79
101
  */
80
102
  pause(): void;
103
+ resume(): void;
104
+ /**
105
+ * 停止
106
+ */
107
+ stop(): void;
81
108
  }