@galacean/effects-specification 2.5.0-alpha.1 → 2.5.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/es/animation-clip-data.d.ts +20 -10
- package/es/number-expression.d.ts +10 -2
- package/es/number-expression.js +4 -0
- package/package.json +1 -1
|
@@ -1,29 +1,39 @@
|
|
|
1
|
-
import type { ColorCurveData } from './curve-data';
|
|
2
1
|
import type { EffectsObjectData } from './effects-object-data';
|
|
3
|
-
import type { FixedNumberExpression, FixedVec3Expression, FixedQuatExpression } from './number-expression';
|
|
2
|
+
import type { FixedNumberExpression, FixedVec3Expression, FixedQuatExpression, ColorCurveValue } from './number-expression';
|
|
4
3
|
export interface AnimationClipData extends EffectsObjectData {
|
|
5
|
-
duration
|
|
6
|
-
positionCurves
|
|
7
|
-
rotationCurves
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
duration?: number;
|
|
5
|
+
positionCurves?: PositionCurveData[];
|
|
6
|
+
rotationCurves?: QuaternionRotationCurveData[];
|
|
7
|
+
eulerCurves?: EulerRotationCurveData[];
|
|
8
|
+
scaleCurves?: ScaleCurveData[];
|
|
9
|
+
floatCurves?: AnimationCurveFloatData[];
|
|
10
|
+
colorCurves?: AnimationCurveColorData[];
|
|
11
11
|
}
|
|
12
12
|
export interface PositionCurveData {
|
|
13
13
|
path: string;
|
|
14
14
|
keyFrames: FixedVec3Expression;
|
|
15
15
|
}
|
|
16
|
-
export interface
|
|
16
|
+
export interface QuaternionRotationCurveData {
|
|
17
17
|
path: string;
|
|
18
18
|
keyFrames: FixedQuatExpression;
|
|
19
19
|
}
|
|
20
|
+
export interface EulerRotationCurveData {
|
|
21
|
+
path: string;
|
|
22
|
+
keyFrames: FixedVec3Expression;
|
|
23
|
+
}
|
|
20
24
|
export interface ScaleCurveData {
|
|
21
25
|
path: string;
|
|
22
26
|
keyFrames: FixedVec3Expression;
|
|
23
27
|
}
|
|
24
|
-
export interface
|
|
28
|
+
export interface AnimationCurveFloatData {
|
|
25
29
|
path: string;
|
|
26
30
|
property: string;
|
|
27
31
|
className: string;
|
|
28
32
|
keyFrames: FixedNumberExpression;
|
|
29
33
|
}
|
|
34
|
+
export interface AnimationCurveColorData {
|
|
35
|
+
path: string;
|
|
36
|
+
property: string;
|
|
37
|
+
className: string;
|
|
38
|
+
keyFrames: ColorCurveValue;
|
|
39
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ColorCurveData, Vector2CurveData, Vector4CurveData } from './curve-data';
|
|
1
|
+
import type { ColorCurveData, Vector2CurveData, Vector3CurveData, Vector4CurveData } from './curve-data';
|
|
2
2
|
/*********************************************/
|
|
3
3
|
/*********************************************/
|
|
4
4
|
export declare enum ValueType {
|
|
@@ -85,7 +85,11 @@ export declare enum ValueType {
|
|
|
85
85
|
/**
|
|
86
86
|
* Vector2 曲线
|
|
87
87
|
*/
|
|
88
|
-
VECTOR2_CURVE = 26
|
|
88
|
+
VECTOR2_CURVE = 26,
|
|
89
|
+
/**
|
|
90
|
+
* Vector3 曲线
|
|
91
|
+
*/
|
|
92
|
+
VECTOR3_CURVE = 27
|
|
89
93
|
}
|
|
90
94
|
export type vec2 = [x: number, y: number];
|
|
91
95
|
export type vec3 = [x: number, y: number, z: number];
|
|
@@ -288,6 +292,10 @@ export type Vector4CurveValue = [type: ValueType.VECTOR4_CURVE, value: Vector4Cu
|
|
|
288
292
|
* Vector2 贝塞尔曲线
|
|
289
293
|
*/
|
|
290
294
|
export type Vector2CurveValue = [type: ValueType.VECTOR2_CURVE, value: Vector2CurveData];
|
|
295
|
+
/**
|
|
296
|
+
* Vector3 贝塞尔曲线
|
|
297
|
+
*/
|
|
298
|
+
export type Vector3CurveValue = [type: ValueType.VECTOR3_CURVE, value: Vector3CurveData];
|
|
291
299
|
/*********************************************/
|
|
292
300
|
/*********************************************/
|
|
293
301
|
export type ColorExpression = RGBAColor | GradientColor | RGBAColors;
|
package/es/number-expression.js
CHANGED
|
@@ -87,6 +87,10 @@ export var ValueType;
|
|
|
87
87
|
* Vector2 曲线
|
|
88
88
|
*/
|
|
89
89
|
ValueType[ValueType["VECTOR2_CURVE"] = 26] = "VECTOR2_CURVE";
|
|
90
|
+
/**
|
|
91
|
+
* Vector3 曲线
|
|
92
|
+
*/
|
|
93
|
+
ValueType[ValueType["VECTOR3_CURVE"] = 27] = "VECTOR3_CURVE";
|
|
90
94
|
})(ValueType || (ValueType = {}));
|
|
91
95
|
/**
|
|
92
96
|
* 关键帧类型
|