@galacean/effects-specification 2.4.0 → 2.5.0-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/es/animation-clip-data.d.ts +3 -0
- package/es/animation-graph/animation-graph-asset-data.d.ts +12 -0
- package/es/animation-graph/animation-graph-asset-data.js +1 -0
- package/es/animation-graph/animator-data.d.ts +4 -0
- package/es/animation-graph/animator-data.js +1 -0
- package/es/animation-graph/graph-node-datas.d.ts +112 -0
- package/es/animation-graph/graph-node-datas.js +20 -0
- package/es/animation-graph/index.d.ts +3 -0
- package/es/animation-graph/index.js +3 -0
- package/es/data-type.d.ts +2 -0
- package/es/data-type.js +2 -0
- package/es/index.d.ts +2 -1
- package/es/index.js +1 -0
- package/es/scene.d.ts +3 -2
- package/es/scene.js +2 -1
- package/package.json +1 -1
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import type { ColorCurveData } from './curve-data';
|
|
1
2
|
import type { EffectsObjectData } from './effects-object-data';
|
|
2
3
|
import type { FixedNumberExpression, FixedVec3Expression, FixedQuatExpression } from './number-expression';
|
|
3
4
|
export interface AnimationClipData extends EffectsObjectData {
|
|
5
|
+
duration: number;
|
|
4
6
|
positionCurves: PositionCurveData[];
|
|
5
7
|
rotationCurves: RotationCurveData[];
|
|
6
8
|
scaleCurves: ScaleCurveData[];
|
|
7
9
|
floatCurves: FloatCurveData[];
|
|
10
|
+
colorCurves: ColorCurveData[];
|
|
8
11
|
}
|
|
9
12
|
export interface PositionCurveData {
|
|
10
13
|
path: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { EffectsObjectData } from '../effects-object-data';
|
|
2
|
+
import type { DataPath } from '../components/component-data';
|
|
3
|
+
import type { GraphNodeData } from './graph-node-datas';
|
|
4
|
+
export interface GraphDataSetData {
|
|
5
|
+
resources: DataPath[];
|
|
6
|
+
}
|
|
7
|
+
export interface AnimationGraphAssetData extends EffectsObjectData {
|
|
8
|
+
nodeDatas: GraphNodeData[];
|
|
9
|
+
graphDataSet: GraphDataSetData;
|
|
10
|
+
rootNodeIndex: number;
|
|
11
|
+
controlParameterIDs: string[];
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
export declare enum NodeDataType {
|
|
2
|
+
AnimationClipNodeData = "AnimationClipNodeData",
|
|
3
|
+
BlendNodeData = "BlendNodeData",
|
|
4
|
+
ApplyAdditiveNodeData = "ApplyAdditiveNodeData",
|
|
5
|
+
StateMachineNodeData = "StateMachineNodeData",
|
|
6
|
+
TransitionNodeData = "TransitionNodeData",
|
|
7
|
+
StateNodeData = "StateNodeData",
|
|
8
|
+
ConstFloatNodeData = "ConstFloatNodeData",
|
|
9
|
+
ConstBoolNodeData = "ConstBoolNodeData",
|
|
10
|
+
ControlParameterBoolNodeData = "ControlParameterBoolNodeData",
|
|
11
|
+
ControlParameterFloatNodeData = "ControlParameterFloatNodeData",
|
|
12
|
+
ControlParameterTriggerNodeData = "ControlParameterTriggerNodeData",
|
|
13
|
+
NotNodeData = "NotNodeData",
|
|
14
|
+
AndNodeData = "AndNodeData",
|
|
15
|
+
OrNodeData = "OrNodeData",
|
|
16
|
+
EqualNodeData = "EqualNodeData",
|
|
17
|
+
GreaterNodeData = "GreaterNodeData",
|
|
18
|
+
LessNodeData = "LessNodeData"
|
|
19
|
+
}
|
|
20
|
+
export interface GraphNodeData {
|
|
21
|
+
type: string;
|
|
22
|
+
index: number;
|
|
23
|
+
}
|
|
24
|
+
export interface AnimationClipNodeData extends GraphNodeData {
|
|
25
|
+
type: NodeDataType.AnimationClipNodeData;
|
|
26
|
+
dataSlotIndex: number;
|
|
27
|
+
playRate?: number;
|
|
28
|
+
loopAnimation?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface EqualNodeData extends GraphNodeData {
|
|
31
|
+
type: NodeDataType.EqualNodeData;
|
|
32
|
+
inputValueNodeIndex: number;
|
|
33
|
+
comparandValueNodeIndex: number;
|
|
34
|
+
}
|
|
35
|
+
export interface BlendNodeData extends GraphNodeData {
|
|
36
|
+
type: NodeDataType.BlendNodeData;
|
|
37
|
+
sourceNodeIndex0: number;
|
|
38
|
+
sourceNodeIndex1: number;
|
|
39
|
+
inputParameterValueNodeIndex: number;
|
|
40
|
+
}
|
|
41
|
+
export interface ApplyAdditiveNodeData extends GraphNodeData {
|
|
42
|
+
type: NodeDataType.ApplyAdditiveNodeData;
|
|
43
|
+
baseNodeIndex: number;
|
|
44
|
+
additiveNodeIndex: number;
|
|
45
|
+
inputParameterValueNodeIndex: number;
|
|
46
|
+
}
|
|
47
|
+
export interface AndNodeData extends GraphNodeData {
|
|
48
|
+
type: NodeDataType.AndNodeData;
|
|
49
|
+
conditionNodeIndices: number[];
|
|
50
|
+
}
|
|
51
|
+
export interface OrNodeData extends GraphNodeData {
|
|
52
|
+
type: NodeDataType.OrNodeData;
|
|
53
|
+
conditionNodeIndices: number[];
|
|
54
|
+
}
|
|
55
|
+
export interface NotNodeData extends GraphNodeData {
|
|
56
|
+
type: NodeDataType.NotNodeData;
|
|
57
|
+
inputValueNodeIndex: number;
|
|
58
|
+
}
|
|
59
|
+
export interface ConstFloatNodeData extends GraphNodeData {
|
|
60
|
+
type: NodeDataType.ConstFloatNodeData;
|
|
61
|
+
value: number;
|
|
62
|
+
}
|
|
63
|
+
export interface ConstBoolNodeData extends GraphNodeData {
|
|
64
|
+
type: NodeDataType.ConstBoolNodeData;
|
|
65
|
+
value: boolean;
|
|
66
|
+
}
|
|
67
|
+
export interface ControlParameterFloatNodeData extends GraphNodeData {
|
|
68
|
+
type: NodeDataType.ControlParameterFloatNodeData;
|
|
69
|
+
value: number;
|
|
70
|
+
}
|
|
71
|
+
export interface ControlParameterBoolNodeData extends GraphNodeData {
|
|
72
|
+
type: NodeDataType.ControlParameterBoolNodeData;
|
|
73
|
+
value: boolean;
|
|
74
|
+
}
|
|
75
|
+
export interface ControlParameterTriggerNodeData extends GraphNodeData {
|
|
76
|
+
type: NodeDataType.ControlParameterTriggerNodeData;
|
|
77
|
+
}
|
|
78
|
+
export interface FloatComparisonNodeData extends GraphNodeData {
|
|
79
|
+
inputValueNodeIndex: number;
|
|
80
|
+
comparandValueNodeIndex: number;
|
|
81
|
+
}
|
|
82
|
+
export interface LessNodeData extends FloatComparisonNodeData {
|
|
83
|
+
type: NodeDataType.LessNodeData;
|
|
84
|
+
}
|
|
85
|
+
export interface GreaterNodeData extends FloatComparisonNodeData {
|
|
86
|
+
type: NodeDataType.EqualNodeData;
|
|
87
|
+
}
|
|
88
|
+
export interface StateMachineNodeData extends GraphNodeData {
|
|
89
|
+
type: NodeDataType.StateMachineNodeData;
|
|
90
|
+
stateDatas: StateData[];
|
|
91
|
+
defaultStateIndex: number;
|
|
92
|
+
}
|
|
93
|
+
export interface TransitionData {
|
|
94
|
+
targetStateIndex: number;
|
|
95
|
+
conditionNodeIndex: number;
|
|
96
|
+
transitionNodeIndex: number;
|
|
97
|
+
}
|
|
98
|
+
export interface StateData {
|
|
99
|
+
stateNodeIndex: number;
|
|
100
|
+
transitionDatas: TransitionData[];
|
|
101
|
+
}
|
|
102
|
+
export interface StateNodeData extends GraphNodeData {
|
|
103
|
+
type: NodeDataType.StateNodeData;
|
|
104
|
+
childNodeIndex: number;
|
|
105
|
+
}
|
|
106
|
+
export interface TransitionNodeData extends GraphNodeData {
|
|
107
|
+
type: NodeDataType.TransitionNodeData;
|
|
108
|
+
duration: number;
|
|
109
|
+
hasExitTime: boolean;
|
|
110
|
+
exitTime: number;
|
|
111
|
+
targetStateNodeIndex: number;
|
|
112
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export var NodeDataType;
|
|
2
|
+
(function (NodeDataType) {
|
|
3
|
+
NodeDataType["AnimationClipNodeData"] = "AnimationClipNodeData";
|
|
4
|
+
NodeDataType["BlendNodeData"] = "BlendNodeData";
|
|
5
|
+
NodeDataType["ApplyAdditiveNodeData"] = "ApplyAdditiveNodeData";
|
|
6
|
+
NodeDataType["StateMachineNodeData"] = "StateMachineNodeData";
|
|
7
|
+
NodeDataType["TransitionNodeData"] = "TransitionNodeData";
|
|
8
|
+
NodeDataType["StateNodeData"] = "StateNodeData";
|
|
9
|
+
NodeDataType["ConstFloatNodeData"] = "ConstFloatNodeData";
|
|
10
|
+
NodeDataType["ConstBoolNodeData"] = "ConstBoolNodeData";
|
|
11
|
+
NodeDataType["ControlParameterBoolNodeData"] = "ControlParameterBoolNodeData";
|
|
12
|
+
NodeDataType["ControlParameterFloatNodeData"] = "ControlParameterFloatNodeData";
|
|
13
|
+
NodeDataType["ControlParameterTriggerNodeData"] = "ControlParameterTriggerNodeData";
|
|
14
|
+
NodeDataType["NotNodeData"] = "NotNodeData";
|
|
15
|
+
NodeDataType["AndNodeData"] = "AndNodeData";
|
|
16
|
+
NodeDataType["OrNodeData"] = "OrNodeData";
|
|
17
|
+
NodeDataType["EqualNodeData"] = "EqualNodeData";
|
|
18
|
+
NodeDataType["GreaterNodeData"] = "GreaterNodeData";
|
|
19
|
+
NodeDataType["LessNodeData"] = "LessNodeData";
|
|
20
|
+
})(NodeDataType || (NodeDataType = {}));
|
package/es/data-type.d.ts
CHANGED
package/es/data-type.js
CHANGED
|
@@ -50,6 +50,8 @@ export var DataType;
|
|
|
50
50
|
DataType["PostProcessVolume"] = "PostProcessVolume";
|
|
51
51
|
DataType["EffectComponent"] = "EffectComponent";
|
|
52
52
|
DataType["TextComponent"] = "TextComponent";
|
|
53
|
+
DataType["AnimationGraphAsset"] = "AnimationGraphAsset";
|
|
54
|
+
DataType["Animator"] = "Animator";
|
|
53
55
|
// Non-EffectObject
|
|
54
56
|
DataType["TimelineClip"] = "TimelineClip";
|
|
55
57
|
})(DataType || (DataType = {}));
|
package/es/index.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export * from './text';
|
|
|
30
30
|
export * from './components';
|
|
31
31
|
export * from './buitin-object-guid';
|
|
32
32
|
export * from './shape';
|
|
33
|
+
export * from './animation-graph';
|
|
33
34
|
export * from './timeline';
|
|
34
35
|
export * from './assets';
|
|
35
36
|
export * from './render-settings';
|
|
@@ -40,4 +41,4 @@ export * from './material-data';
|
|
|
40
41
|
export * from './geometry-data';
|
|
41
42
|
export * from './shader-data';
|
|
42
43
|
export * from './effects-package-data';
|
|
43
|
-
export declare const LATEST_VERSION = JSONSceneVersion['
|
|
44
|
+
export declare const LATEST_VERSION = JSONSceneVersion['3_4'];
|
package/es/index.js
CHANGED
package/es/scene.d.ts
CHANGED
|
@@ -31,8 +31,9 @@ export declare enum JSONSceneVersion {
|
|
|
31
31
|
'3_0' = "3.0",// EC 改造、移除滤镜元素
|
|
32
32
|
'3_1' = "3.1",// 音视频
|
|
33
33
|
'3_2' = "3.2",// 矢量动画、透明视频、增加富文本属性
|
|
34
|
-
'3_3' = "3.3",//
|
|
35
|
-
'
|
|
34
|
+
'3_3' = "3.3",// 指向型蒙版、图片/文字蒙版
|
|
35
|
+
'3_4' = "3.4",// 动画状态机
|
|
36
|
+
'LATEST' = "3.4"
|
|
36
37
|
}
|
|
37
38
|
/**
|
|
38
39
|
* runtime 2.0 之前的场景信息
|
package/es/scene.js
CHANGED
|
@@ -18,5 +18,6 @@ export var JSONSceneVersion;
|
|
|
18
18
|
JSONSceneVersion["3_1"] = "3.1";
|
|
19
19
|
JSONSceneVersion["3_2"] = "3.2";
|
|
20
20
|
JSONSceneVersion["3_3"] = "3.3";
|
|
21
|
-
JSONSceneVersion["
|
|
21
|
+
JSONSceneVersion["3_4"] = "3.4";
|
|
22
|
+
JSONSceneVersion["LATEST"] = "3.4";
|
|
22
23
|
})(JSONSceneVersion || (JSONSceneVersion = {}));
|