@galacean/effects-specification 2.0.0-alpha.2 → 2.0.0-alpha.21
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/README.md +2 -10
- package/es/animation-clip-data.d.ts +26 -0
- package/es/animation-clip-data.js +1 -0
- package/{dist/src → es}/binary.d.ts +9 -2
- package/es/binary.js +1 -0
- package/es/buitin-object-guid.d.ts +5 -0
- package/es/buitin-object-guid.js +5 -0
- package/es/components.d.ts +209 -0
- package/es/components.js +129 -0
- package/{dist/src → es}/composition.d.ts +28 -70
- package/es/composition.js +12 -0
- package/{dist/src → es}/constants.d.ts +23 -0
- package/es/constants.js +34 -0
- package/{dist/src → es}/image.d.ts +21 -27
- package/es/image.js +9 -0
- package/{dist/src → es}/index.d.ts +4 -2
- package/es/index.js +28 -0
- package/{dist/src → es}/item/base-item.d.ts +27 -8
- package/es/item/base-item.js +27 -0
- package/{dist/src → es}/item/camera-item.d.ts +6 -6
- package/es/item/camera-item.js +1 -0
- package/{dist/src → es}/item/composition-item.d.ts +4 -4
- package/es/item/composition-item.js +1 -0
- package/es/item/effect-item.d.ts +35 -0
- package/es/item/effect-item.js +1 -0
- package/{dist/src → es}/item/interact-item.d.ts +3 -3
- package/es/item/interact-item.js +1 -0
- package/es/item/model/binary.js +1 -0
- package/{dist/src → es}/item/model/camera.d.ts +2 -2
- package/es/item/model/camera.js +5 -0
- package/es/item/model/index.js +35 -0
- package/{dist/src → es}/item/model/light.d.ts +2 -2
- package/es/item/model/light.js +19 -0
- package/{dist/src → es}/item/model/material.d.ts +3 -3
- package/es/item/model/material.js +16 -0
- package/{dist/src → es}/item/model/mesh.d.ts +9 -8
- package/es/item/model/mesh.js +5 -0
- package/es/item/model/render.js +42 -0
- package/{dist/src → es}/item/model/skybox.d.ts +9 -3
- package/es/item/model/skybox.js +1 -0
- package/{dist/src → es}/item/model/tree.d.ts +10 -0
- package/es/item/model/tree.js +1 -0
- package/es/item/null-item.d.ts +46 -0
- package/es/item/null-item.js +1 -0
- package/{dist/src → es}/item/particle-item.d.ts +20 -23
- package/es/item/particle-item.js +14 -0
- package/es/item/particle-shape.js +19 -0
- package/{dist/src → es}/item/plugin-item.d.ts +3 -3
- package/es/item/plugin-item.js +1 -0
- package/{dist/src → es}/item/spine-item.d.ts +44 -20
- package/es/item/spine-item.js +1 -0
- package/{dist/src → es}/item/sprite-item.d.ts +3 -3
- package/es/item/sprite-item.js +1 -0
- package/{dist/src → es}/item/text-item.d.ts +3 -3
- package/es/item/text-item.js +1 -0
- package/{dist/src → es}/item.d.ts +2 -5
- package/es/item.js +1 -0
- package/{dist/src → es}/number-expression.d.ts +21 -8
- package/es/number-expression.js +91 -0
- package/{dist/src → es}/scene.d.ts +19 -19
- package/es/scene.js +1 -0
- package/{dist/src → es}/text.d.ts +3 -55
- package/es/text.js +84 -0
- package/es/timeline/index.d.ts +5 -0
- package/es/timeline/index.js +5 -0
- package/es/timeline/playables/sprite-color-playable-asset-data.d.ts +8 -0
- package/es/timeline/playables/sprite-color-playable-asset-data.js +1 -0
- package/es/timeline/playables/transform-playable-asset-data.d.ts +17 -0
- package/es/timeline/playables/transform-playable-asset-data.js +1 -0
- package/es/timeline/timeline-asset-data.d.ts +8 -0
- package/es/timeline/timeline-asset-data.js +1 -0
- package/es/timeline/timeline-clip-data.d.ts +11 -0
- package/es/timeline/timeline-clip-data.js +1 -0
- package/es/timeline/track/track-asset-data.d.ts +9 -0
- package/es/timeline/track/track-asset-data.js +1 -0
- package/{dist/src → es}/type.d.ts +45 -20
- package/es/type.js +342 -0
- package/{dist/src → es}/vfx-item-data.d.ts +10 -11
- package/es/vfx-item-data.js +1 -0
- package/package.json +26 -47
- package/dist/fallback/camera.d.ts +0 -2
- package/dist/fallback/filter.d.ts +0 -2
- package/dist/fallback/index.d.ts +0 -12
- package/dist/fallback/interact.d.ts +0 -2
- package/dist/fallback/migration.d.ts +0 -13
- package/dist/fallback/particle.d.ts +0 -2
- package/dist/fallback/sprite.d.ts +0 -3
- package/dist/fallback/utils.d.ts +0 -36
- package/dist/fallback.js +0 -2155
- package/dist/fallback.js.map +0 -1
- package/dist/fallback.mjs +0 -2127
- package/dist/fallback.mjs.map +0 -1
- package/dist/index.js +0 -758
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -743
- package/dist/index.mjs.map +0 -1
- package/dist/src/components.d.ts +0 -93
- package/dist/src/item/effect-item.d.ts +0 -17
- package/dist/src/item/filter-item.d.ts +0 -99
- package/dist/src/item/null-item.d.ts +0 -94
- /package/{dist/src → es}/item/model/binary.d.ts +0 -0
- /package/{dist/src → es}/item/model/index.d.ts +0 -0
- /package/{dist/src → es}/item/model/render.d.ts +0 -0
- /package/{dist/src → es}/item/particle-shape.d.ts +0 -0
|
@@ -85,3 +85,13 @@ export interface ModelAnimationComponentData extends ComponentData {
|
|
|
85
85
|
*/
|
|
86
86
|
animations: ModelAnimationData[];
|
|
87
87
|
}
|
|
88
|
+
export interface AnimationComponentData extends ComponentData {
|
|
89
|
+
/**
|
|
90
|
+
* 默认动画索引,-1表示不播放动画
|
|
91
|
+
*/
|
|
92
|
+
animation?: number;
|
|
93
|
+
/**
|
|
94
|
+
* glTF中所有的动画数据
|
|
95
|
+
*/
|
|
96
|
+
animationClips: DataPath[];
|
|
97
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { RGBAColorValue } from '../number-expression';
|
|
2
|
+
import type { ColorOverLifetime, ItemType, PositionOverLifetime, RotationOverLifetime, SizeOverLifetime } from '../type';
|
|
3
|
+
import type { BaseItem } from './base-item';
|
|
4
|
+
/**
|
|
5
|
+
* 空节点元素
|
|
6
|
+
*/
|
|
7
|
+
export interface NullItem extends BaseItem {
|
|
8
|
+
/**
|
|
9
|
+
* 元素类型(指定为 null)
|
|
10
|
+
*/
|
|
11
|
+
type: ItemType.null;
|
|
12
|
+
/**
|
|
13
|
+
* 空节点元素渲染信息
|
|
14
|
+
*/
|
|
15
|
+
content: NullContent;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* 空节点元素渲染属性
|
|
19
|
+
*/
|
|
20
|
+
export interface NullContent {
|
|
21
|
+
/**
|
|
22
|
+
* 空节点元素基础属性
|
|
23
|
+
*/
|
|
24
|
+
options: {
|
|
25
|
+
/**
|
|
26
|
+
* 空节点元素基础颜色
|
|
27
|
+
*/
|
|
28
|
+
startColor?: RGBAColorValue;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* 空节点元素大小变化属性
|
|
32
|
+
*/
|
|
33
|
+
sizeOverLifetime?: SizeOverLifetime;
|
|
34
|
+
/**
|
|
35
|
+
* 空节点元素旋转变化属性
|
|
36
|
+
*/
|
|
37
|
+
rotationOverLifetime?: RotationOverLifetime;
|
|
38
|
+
/**
|
|
39
|
+
* 空节点元素位置变化属性
|
|
40
|
+
*/
|
|
41
|
+
positionOverLifetime?: PositionOverLifetime;
|
|
42
|
+
/**
|
|
43
|
+
* 空节点元素色彩变化属性
|
|
44
|
+
*/
|
|
45
|
+
colorOverLifetime?: ColorOverLifetime;
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { ItemType, RendererOptions, TextureSheetAnimation, BlendingMode, SplitParameter } from '../type';
|
|
2
2
|
import type { FixedNumberExpression, NumberExpression, GradientColor, vec3, FixedVec3Expression, ColorExpression, FunctionExpression } from '../number-expression';
|
|
3
|
-
import type { BaseItem,
|
|
3
|
+
import type { BaseItem, EndBehavior } from './base-item';
|
|
4
4
|
import type { ParticleShape } from './particle-shape';
|
|
5
|
-
import type { DistortionFilterParams } from './filter-item';
|
|
6
5
|
import type { ComponentData } from '../components';
|
|
7
6
|
/**
|
|
8
7
|
* 粒子交互行为
|
|
@@ -22,14 +21,14 @@ export declare enum ParticleInteractionBehavior {
|
|
|
22
21
|
*/
|
|
23
22
|
export interface ParticleItem extends BaseItem {
|
|
24
23
|
/**
|
|
25
|
-
*
|
|
24
|
+
* 元素类型(指定为 particle)
|
|
26
25
|
*/
|
|
27
26
|
type: ItemType.particle;
|
|
28
27
|
/**
|
|
29
28
|
* 粒子元素渲染信息
|
|
30
29
|
*/
|
|
31
30
|
content: ParticleContent;
|
|
32
|
-
endBehavior:
|
|
31
|
+
endBehavior: EndBehavior;
|
|
33
32
|
}
|
|
34
33
|
/**
|
|
35
34
|
* 发射器参数
|
|
@@ -58,7 +57,7 @@ export interface ParticleEmission {
|
|
|
58
57
|
*/
|
|
59
58
|
cycles?: number;
|
|
60
59
|
/**
|
|
61
|
-
*
|
|
60
|
+
* 爆发时间间隔(单位:秒)
|
|
62
61
|
* @default 0
|
|
63
62
|
*/
|
|
64
63
|
interval?: number;
|
|
@@ -72,15 +71,15 @@ export interface ParticleEmission {
|
|
|
72
71
|
*/
|
|
73
72
|
index: number;
|
|
74
73
|
/**
|
|
75
|
-
* x方向偏移值
|
|
74
|
+
* x 方向偏移值
|
|
76
75
|
*/
|
|
77
76
|
x: number;
|
|
78
77
|
/**
|
|
79
|
-
* y方向偏移值
|
|
78
|
+
* y 方向偏移值
|
|
80
79
|
*/
|
|
81
80
|
y: number;
|
|
82
81
|
/**
|
|
83
|
-
* z方向偏移值
|
|
82
|
+
* z 方向偏移值
|
|
84
83
|
*/
|
|
85
84
|
z: number;
|
|
86
85
|
}[];
|
|
@@ -91,15 +90,15 @@ export interface ParticlePositionOverLifetime {
|
|
|
91
90
|
*/
|
|
92
91
|
asMovement?: boolean;
|
|
93
92
|
/**
|
|
94
|
-
* x轴位置变化信息
|
|
93
|
+
* x 轴位置变化信息
|
|
95
94
|
*/
|
|
96
95
|
linearX?: NumberExpression;
|
|
97
96
|
/**
|
|
98
|
-
* y轴位置变化信息
|
|
97
|
+
* y 轴位置变化信息
|
|
99
98
|
*/
|
|
100
99
|
linearY?: NumberExpression;
|
|
101
100
|
/**
|
|
102
|
-
* z轴位置变化信息
|
|
101
|
+
* z 轴位置变化信息
|
|
103
102
|
*/
|
|
104
103
|
linearZ?: NumberExpression;
|
|
105
104
|
/**
|
|
@@ -107,15 +106,15 @@ export interface ParticlePositionOverLifetime {
|
|
|
107
106
|
*/
|
|
108
107
|
asRotation?: boolean;
|
|
109
108
|
/**
|
|
110
|
-
* x轴环绕角度变化信息
|
|
109
|
+
* x 轴环绕角度变化信息
|
|
111
110
|
*/
|
|
112
111
|
orbitalX?: NumberExpression;
|
|
113
112
|
/**
|
|
114
|
-
* y轴环绕角度变化信息
|
|
113
|
+
* y 轴环绕角度变化信息
|
|
115
114
|
*/
|
|
116
115
|
orbitalY?: NumberExpression;
|
|
117
116
|
/**
|
|
118
|
-
* z轴环绕角度变化信息
|
|
117
|
+
* z 轴环绕角度变化信息
|
|
119
118
|
*/
|
|
120
119
|
orbitalZ?: NumberExpression;
|
|
121
120
|
/**
|
|
@@ -138,7 +137,7 @@ export interface ParticlePositionOverLifetime {
|
|
|
138
137
|
*/
|
|
139
138
|
forceCurve?: FunctionExpression;
|
|
140
139
|
/**
|
|
141
|
-
* 增加一个初速度,匀速直线运动,direction为运动方向
|
|
140
|
+
* 增加一个初速度,匀速直线运动,direction 为运动方向
|
|
142
141
|
* @default 0
|
|
143
142
|
*/
|
|
144
143
|
startSpeed?: NumberExpression;
|
|
@@ -147,7 +146,7 @@ export interface ParticlePositionOverLifetime {
|
|
|
147
146
|
*/
|
|
148
147
|
speedOverLifetime?: FixedNumberExpression;
|
|
149
148
|
/**
|
|
150
|
-
* 增加一个重力,gravity为重力方向,gravityModifier为重力大小
|
|
149
|
+
* 增加一个重力,gravity 为重力方向,gravityModifier 为重力大小
|
|
151
150
|
* @default 0
|
|
152
151
|
*/
|
|
153
152
|
gravity?: vec3;
|
|
@@ -166,15 +165,15 @@ export interface ParticleRotationOverLifetime {
|
|
|
166
165
|
*/
|
|
167
166
|
asRotation?: boolean;
|
|
168
167
|
/**
|
|
169
|
-
* x轴旋转函数
|
|
168
|
+
* x 轴旋转函数
|
|
170
169
|
*/
|
|
171
170
|
x?: NumberExpression;
|
|
172
171
|
/**
|
|
173
|
-
* y轴旋转函数
|
|
172
|
+
* y 轴旋转函数
|
|
174
173
|
*/
|
|
175
174
|
y?: NumberExpression;
|
|
176
175
|
/**
|
|
177
|
-
* z轴旋转函数(不分轴时,变化z)
|
|
176
|
+
* z 轴旋转函数(不分轴时,变化 z)
|
|
178
177
|
*/
|
|
179
178
|
z?: NumberExpression;
|
|
180
179
|
}
|
|
@@ -188,11 +187,11 @@ export interface ParticleSizeOverLifetime {
|
|
|
188
187
|
*/
|
|
189
188
|
size?: NumberExpression;
|
|
190
189
|
/**
|
|
191
|
-
* x轴大小变化信息(分轴模式)
|
|
190
|
+
* x 轴大小变化信息(分轴模式)
|
|
192
191
|
*/
|
|
193
192
|
x?: NumberExpression;
|
|
194
193
|
/**
|
|
195
|
-
* y轴大小变化信息(分轴模式)
|
|
194
|
+
* y 轴大小变化信息(分轴模式)
|
|
196
195
|
*/
|
|
197
196
|
y?: NumberExpression;
|
|
198
197
|
}
|
|
@@ -334,7 +333,6 @@ export interface ParticleContent {
|
|
|
334
333
|
*/
|
|
335
334
|
radius?: number;
|
|
336
335
|
};
|
|
337
|
-
filter?: DistortionFilterParams;
|
|
338
336
|
}
|
|
339
337
|
/**
|
|
340
338
|
* 粒子元素渲染属性
|
|
@@ -405,7 +403,6 @@ export interface ParticleSystemData extends ComponentData {
|
|
|
405
403
|
*/
|
|
406
404
|
radius?: number;
|
|
407
405
|
};
|
|
408
|
-
filter?: DistortionFilterParams;
|
|
409
406
|
}
|
|
410
407
|
/**
|
|
411
408
|
* 粒子拖尾参数
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 粒子交互行为
|
|
3
|
+
*/
|
|
4
|
+
export var ParticleInteractionBehavior;
|
|
5
|
+
(function (ParticleInteractionBehavior) {
|
|
6
|
+
/**
|
|
7
|
+
* 无
|
|
8
|
+
*/
|
|
9
|
+
ParticleInteractionBehavior[ParticleInteractionBehavior["none"] = 0] = "none";
|
|
10
|
+
/**
|
|
11
|
+
* 移出粒子
|
|
12
|
+
*/
|
|
13
|
+
ParticleInteractionBehavior[ParticleInteractionBehavior["removeParticle"] = 1] = "removeParticle";
|
|
14
|
+
})(ParticleInteractionBehavior || (ParticleInteractionBehavior = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export var ShapeArcMode;
|
|
2
|
+
(function (ShapeArcMode) {
|
|
3
|
+
/**
|
|
4
|
+
* 随机
|
|
5
|
+
*/
|
|
6
|
+
ShapeArcMode[ShapeArcMode["RANDOM"] = 0] = "RANDOM";
|
|
7
|
+
/**
|
|
8
|
+
* 单向循环
|
|
9
|
+
*/
|
|
10
|
+
ShapeArcMode[ShapeArcMode["UNIDIRECTIONAL_CYCLE"] = 1] = "UNIDIRECTIONAL_CYCLE";
|
|
11
|
+
/**
|
|
12
|
+
* 双向循环
|
|
13
|
+
*/
|
|
14
|
+
ShapeArcMode[ShapeArcMode["BIDIRECTIONAL_CYCLE"] = 2] = "BIDIRECTIONAL_CYCLE";
|
|
15
|
+
/**
|
|
16
|
+
* 均匀爆发
|
|
17
|
+
*/
|
|
18
|
+
ShapeArcMode[ShapeArcMode["UNIFORM_BURST"] = 3] = "UNIFORM_BURST";
|
|
19
|
+
})(ShapeArcMode || (ShapeArcMode = {}));
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type { ItemType, PluginGyroscopeTarget, PluginType, RendererOptions } from '../type';
|
|
2
|
-
import type { BaseItem,
|
|
2
|
+
import type { BaseItem, EndBehavior } from './base-item';
|
|
3
3
|
/**
|
|
4
4
|
* 插件元素
|
|
5
5
|
*/
|
|
6
6
|
export interface PluginItem extends BaseItem {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* 元素类型(指定为 plugin)
|
|
9
9
|
*/
|
|
10
10
|
type: ItemType.plugin;
|
|
11
11
|
/**
|
|
12
12
|
* 插件元素渲染信息
|
|
13
13
|
*/
|
|
14
14
|
content: PluginContent;
|
|
15
|
-
endBehavior:
|
|
15
|
+
endBehavior: EndBehavior;
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* 插件元素渲染属性
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import type { BinaryPointer } from '../binary';
|
|
2
|
+
import type { ComponentData, DataPath, DataType } from '../components';
|
|
2
3
|
import type { SizeOverLifetime, RotationOverLifetime, PositionOverLifetime, ColorOverLifetime, RendererOptions, ItemType } from '../type';
|
|
3
|
-
import type { BaseItem,
|
|
4
|
+
import type { BaseItem, EndBehavior } from './base-item';
|
|
4
5
|
/**
|
|
5
6
|
* 插件元素
|
|
6
7
|
*/
|
|
7
8
|
export interface SpineItem extends BaseItem {
|
|
8
9
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
* 元素类型 "spine"
|
|
11
|
+
*/
|
|
11
12
|
type: ItemType.spine;
|
|
12
13
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
* 插件元素渲染信息
|
|
15
|
+
*/
|
|
15
16
|
content: SpineContent;
|
|
16
|
-
endBehavior:
|
|
17
|
+
endBehavior: EndBehavior;
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
19
20
|
* Spine元素渲染属性
|
|
@@ -49,16 +50,16 @@ export interface SpineContent {
|
|
|
49
50
|
*/
|
|
50
51
|
export interface PluginSpineOption {
|
|
51
52
|
/**
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
* 当前使用的皮肤名称
|
|
54
|
+
*/
|
|
54
55
|
activeSkin: string;
|
|
55
56
|
/**
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
* 当前使用的动画列表,1.5 之前为 string
|
|
58
|
+
*/
|
|
58
59
|
activeAnimation: string[] | string;
|
|
59
60
|
/**
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
* 在 spines 资源数组中的索引
|
|
62
|
+
*/
|
|
62
63
|
spine: number;
|
|
63
64
|
/**
|
|
64
65
|
* 默认融合时间
|
|
@@ -68,6 +69,13 @@ export interface PluginSpineOption {
|
|
|
68
69
|
* 动画播放的速度
|
|
69
70
|
*/
|
|
70
71
|
speed?: number;
|
|
72
|
+
/**
|
|
73
|
+
* 使用的默认大小计算规则
|
|
74
|
+
* 0 :除以包围盒大小
|
|
75
|
+
* 1 : 相机逆投影 + 固定画布大小
|
|
76
|
+
* @since 1.3.0
|
|
77
|
+
*/
|
|
78
|
+
resizeRule: number;
|
|
71
79
|
}
|
|
72
80
|
/**
|
|
73
81
|
* spine资源信息
|
|
@@ -75,19 +83,35 @@ export interface PluginSpineOption {
|
|
|
75
83
|
export type skeletonFileType = 'json' | 'skel';
|
|
76
84
|
export interface SpineResource {
|
|
77
85
|
/**
|
|
78
|
-
|
|
79
|
-
|
|
86
|
+
* atlas 文件在 `bins` 中的指针
|
|
87
|
+
*/
|
|
80
88
|
atlas: BinaryPointer;
|
|
81
89
|
/**
|
|
82
|
-
|
|
83
|
-
|
|
90
|
+
* 骨骼文件
|
|
91
|
+
*/
|
|
84
92
|
skeleton: BinaryPointer;
|
|
85
93
|
/**
|
|
86
|
-
|
|
87
|
-
|
|
94
|
+
* skeleton 文件类型, `.skel/.json`
|
|
95
|
+
*/
|
|
88
96
|
skeletonType: skeletonFileType;
|
|
89
97
|
/**
|
|
90
|
-
|
|
91
|
-
|
|
98
|
+
* 图像文件在 `scene.textures` 数组中的索引
|
|
99
|
+
*/
|
|
92
100
|
images: number[];
|
|
93
101
|
}
|
|
102
|
+
export interface SpineComponent extends ComponentData {
|
|
103
|
+
dataType: DataType.SpineComponent;
|
|
104
|
+
options: PluginSpineOption;
|
|
105
|
+
resource: {
|
|
106
|
+
atlas: {
|
|
107
|
+
bins: DataPath;
|
|
108
|
+
source: [start: number, length?: number];
|
|
109
|
+
};
|
|
110
|
+
skeleton: {
|
|
111
|
+
bins: DataPath;
|
|
112
|
+
source: [start: number, length?: number];
|
|
113
|
+
};
|
|
114
|
+
images: DataPath[];
|
|
115
|
+
skeletonType: skeletonFileType;
|
|
116
|
+
};
|
|
117
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BaseItem,
|
|
1
|
+
import type { BaseItem, EndBehavior } from './base-item';
|
|
2
2
|
import type { SizeOverLifetime, RotationOverLifetime, PositionOverLifetime, ColorOverLifetime, ItemType, TextureSheetAnimation, RendererOptions, SplitParameter, InteractBehavior } from '../type';
|
|
3
3
|
import type { RGBAColorValue } from '../number-expression';
|
|
4
4
|
import type { ComponentData } from '../components';
|
|
@@ -7,14 +7,14 @@ import type { ComponentData } from '../components';
|
|
|
7
7
|
*/
|
|
8
8
|
export interface SpriteItem extends BaseItem {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* 元素类型(指定为 sprite)
|
|
11
11
|
*/
|
|
12
12
|
type: ItemType.sprite;
|
|
13
13
|
/**
|
|
14
14
|
* 图层元素渲染信息
|
|
15
15
|
*/
|
|
16
16
|
content: SpriteContent;
|
|
17
|
-
endBehavior:
|
|
17
|
+
endBehavior: EndBehavior;
|
|
18
18
|
}
|
|
19
19
|
export interface SpriteContentOptions {
|
|
20
20
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BaseItem,
|
|
1
|
+
import type { BaseItem, EndBehavior } from './base-item';
|
|
2
2
|
import type { SizeOverLifetime, RotationOverLifetime, PositionOverLifetime, ColorOverLifetime, ItemType, TextureSheetAnimation, RendererOptions, InteractBehavior } from '../type';
|
|
3
3
|
import type { RGBAColorValue } from '../number-expression';
|
|
4
4
|
import type { FontStyle, TextAlignment, TextBaseline, TextOverflow, TextWeight } from '../text';
|
|
@@ -8,14 +8,14 @@ import type { ComponentData } from '../components';
|
|
|
8
8
|
*/
|
|
9
9
|
export interface TextItem extends BaseItem {
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* 元素类型(指定为 text)
|
|
12
12
|
*/
|
|
13
13
|
type: ItemType.text;
|
|
14
14
|
/**
|
|
15
15
|
* 文本元素渲染信息
|
|
16
16
|
*/
|
|
17
17
|
content: TextContent;
|
|
18
|
-
endBehavior:
|
|
18
|
+
endBehavior: EndBehavior;
|
|
19
19
|
}
|
|
20
20
|
export interface TextContentOptions {
|
|
21
21
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -5,13 +5,10 @@ import type { PluginItem } from './item/plugin-item';
|
|
|
5
5
|
import type { ParticleItem } from './item/particle-item';
|
|
6
6
|
import type { InteractItem } from './item/interact-item';
|
|
7
7
|
import type { ModelCameraItem, ModelLightItem, ModelMeshItem, ModelSkyboxItem, ModelTreeItem } from './item/model';
|
|
8
|
-
import type { FilterItem } from './item/filter-item';
|
|
9
8
|
import type { CameraItem } from './item/camera-item';
|
|
10
9
|
import type { CompositionItem } from './item/composition-item';
|
|
11
10
|
import type { TextItem } from './item/text-item';
|
|
12
11
|
/**
|
|
13
|
-
* Item
|
|
14
|
-
* 1.0版本
|
|
15
|
-
* 基类,无对应元素
|
|
12
|
+
* Item 基类,无对应元素
|
|
16
13
|
*/
|
|
17
|
-
export type Item = SpriteItem | ParticleItem | NullItem | PluginItem | InteractItem |
|
|
14
|
+
export type Item = SpriteItem | ParticleItem | NullItem | PluginItem | InteractItem | CameraItem | TextItem | ModelMeshItem<'json'> | ModelSkyboxItem<'json'> | ModelTreeItem<'json'> | ModelLightItem | ModelCameraItem | SpineItem | CompositionItem | ModelMeshItem<'studio'> | ModelSkyboxItem<'studio'> | ModelTreeItem<'studio'>;
|
package/es/item.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -50,7 +50,7 @@ export declare enum ValueType {
|
|
|
50
50
|
*/
|
|
51
51
|
SHAPE_SPLITS = 11,
|
|
52
52
|
/**
|
|
53
|
-
|
|
53
|
+
* 直线路径
|
|
54
54
|
*/
|
|
55
55
|
LINEAR_PATH = 12,
|
|
56
56
|
/**
|
|
@@ -68,7 +68,11 @@ export declare enum ValueType {
|
|
|
68
68
|
/**
|
|
69
69
|
* 贝塞尔曲线路径
|
|
70
70
|
*/
|
|
71
|
-
BEZIER_CURVE_PATH = 22
|
|
71
|
+
BEZIER_CURVE_PATH = 22,
|
|
72
|
+
/**
|
|
73
|
+
* 贝塞尔曲线四元数
|
|
74
|
+
*/
|
|
75
|
+
BEZIER_CURVE_QUAT = 23
|
|
72
76
|
}
|
|
73
77
|
export type vec2 = [x: number, y: number];
|
|
74
78
|
export type vec3 = [x: number, y: number, z: number];
|
|
@@ -109,6 +113,7 @@ export type FunctionExpression = LineValue | CurveValue | BezierValue;
|
|
|
109
113
|
export type FixedNumberExpression = ConstantNumber | LineValue | CurveValue | BezierValue;
|
|
110
114
|
export type NumberExpression = FixedNumberExpression | RandomValue;
|
|
111
115
|
export type FixedVec3Expression = ConstantVec3 | BezierPath | LinearPath | BezierCurvePath;
|
|
116
|
+
export type FixedQuatExpression = BezierCurveQuat;
|
|
112
117
|
/**
|
|
113
118
|
* 常数数值
|
|
114
119
|
* [0,5]
|
|
@@ -150,12 +155,12 @@ export type LinearPathValue = [
|
|
|
150
155
|
* 关键帧类型
|
|
151
156
|
*/
|
|
152
157
|
export declare enum BezierKeyframeType {
|
|
153
|
-
AUTO = 0
|
|
154
|
-
EASE = 1
|
|
155
|
-
EASE_IN = 2
|
|
156
|
-
EASE_OUT = 3
|
|
157
|
-
LINE = 4
|
|
158
|
-
HOLD = 5
|
|
158
|
+
AUTO = 0,// 自动
|
|
159
|
+
EASE = 1,// 缓动
|
|
160
|
+
EASE_IN = 2,// 缓入
|
|
161
|
+
EASE_OUT = 3,// 缓出
|
|
162
|
+
LINE = 4,// 线性 (默认进)
|
|
163
|
+
HOLD = 5,// 定格
|
|
159
164
|
LINE_OUT = 6
|
|
160
165
|
}
|
|
161
166
|
/**
|
|
@@ -246,10 +251,18 @@ export type BezierValue = [type: ValueType.BEZIER_CURVE, value: BezierKeyframeVa
|
|
|
246
251
|
* 贝塞尔曲线路径关键帧值
|
|
247
252
|
*/
|
|
248
253
|
export type BezierCurvePathValue = [easing: BezierKeyframeValue[], points: vec3[], controlePoints: vec3[]];
|
|
254
|
+
/**
|
|
255
|
+
* 贝塞尔曲线路径关键帧值
|
|
256
|
+
*/
|
|
257
|
+
export type BezierCurveQuatValue = [easing: BezierKeyframeValue[], points: vec4[], controlePoints: vec4[]];
|
|
249
258
|
/**
|
|
250
259
|
* 贝塞尔曲线路径关键帧
|
|
251
260
|
*/
|
|
252
261
|
export type BezierCurvePath = [type: ValueType.BEZIER_CURVE_PATH, value: BezierCurvePathValue];
|
|
262
|
+
/**
|
|
263
|
+
* 贝塞尔曲线路径关键帧
|
|
264
|
+
*/
|
|
265
|
+
export type BezierCurveQuat = [type: ValueType.BEZIER_CURVE_QUAT, value: BezierCurveQuatValue];
|
|
253
266
|
/*********************************************/
|
|
254
267
|
/*********************************************/
|
|
255
268
|
export type ColorExpression = RGBAColor | GradientColor | RGBAColors;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/*********************************************/
|
|
2
|
+
/* 基本数值属性参数 */
|
|
3
|
+
/*********************************************/
|
|
4
|
+
export var ValueType;
|
|
5
|
+
(function (ValueType) {
|
|
6
|
+
/**
|
|
7
|
+
* 常数
|
|
8
|
+
*/
|
|
9
|
+
ValueType[ValueType["CONSTANT"] = 0] = "CONSTANT";
|
|
10
|
+
/**
|
|
11
|
+
* 二维常数向量
|
|
12
|
+
*/
|
|
13
|
+
ValueType[ValueType["CONSTANT_VEC2"] = 1] = "CONSTANT_VEC2";
|
|
14
|
+
/**
|
|
15
|
+
* 三维常数向量
|
|
16
|
+
*/
|
|
17
|
+
ValueType[ValueType["CONSTANT_VEC3"] = 2] = "CONSTANT_VEC3";
|
|
18
|
+
/**
|
|
19
|
+
* 四维常数向量
|
|
20
|
+
*/
|
|
21
|
+
ValueType[ValueType["CONSTANT_VEC4"] = 3] = "CONSTANT_VEC4";
|
|
22
|
+
/**
|
|
23
|
+
* 随机数
|
|
24
|
+
*/
|
|
25
|
+
ValueType[ValueType["RANDOM"] = 4] = "RANDOM";
|
|
26
|
+
/**
|
|
27
|
+
* 直线
|
|
28
|
+
*/
|
|
29
|
+
ValueType[ValueType["LINE"] = 5] = "LINE";
|
|
30
|
+
/**
|
|
31
|
+
* 曲线
|
|
32
|
+
*/
|
|
33
|
+
ValueType[ValueType["CURVE"] = 6] = "CURVE";
|
|
34
|
+
/**
|
|
35
|
+
* 贝塞尔路径
|
|
36
|
+
*/
|
|
37
|
+
ValueType[ValueType["BEZIER_PATH"] = 7] = "BEZIER_PATH";
|
|
38
|
+
/**
|
|
39
|
+
* 颜色
|
|
40
|
+
*/
|
|
41
|
+
ValueType[ValueType["RGBA_COLOR"] = 8] = "RGBA_COLOR";
|
|
42
|
+
/**
|
|
43
|
+
* 渐变色
|
|
44
|
+
*/
|
|
45
|
+
ValueType[ValueType["GRADIENT_COLOR"] = 9] = "GRADIENT_COLOR";
|
|
46
|
+
/**
|
|
47
|
+
* 蒙版形状点集
|
|
48
|
+
*/
|
|
49
|
+
ValueType[ValueType["SHAPE_POINTS"] = 10] = "SHAPE_POINTS";
|
|
50
|
+
/**
|
|
51
|
+
* 蒙版形状切分
|
|
52
|
+
*/
|
|
53
|
+
ValueType[ValueType["SHAPE_SPLITS"] = 11] = "SHAPE_SPLITS";
|
|
54
|
+
/**
|
|
55
|
+
* 直线路径
|
|
56
|
+
*/
|
|
57
|
+
ValueType[ValueType["LINEAR_PATH"] = 12] = "LINEAR_PATH";
|
|
58
|
+
/**
|
|
59
|
+
* 多色
|
|
60
|
+
*/
|
|
61
|
+
ValueType[ValueType["COLORS"] = 13] = "COLORS";
|
|
62
|
+
/**
|
|
63
|
+
* 二进制指针
|
|
64
|
+
*/
|
|
65
|
+
ValueType[ValueType["BINARY"] = 20] = "BINARY";
|
|
66
|
+
/**
|
|
67
|
+
* 贝塞尔曲线
|
|
68
|
+
*/
|
|
69
|
+
ValueType[ValueType["BEZIER_CURVE"] = 21] = "BEZIER_CURVE";
|
|
70
|
+
/**
|
|
71
|
+
* 贝塞尔曲线路径
|
|
72
|
+
*/
|
|
73
|
+
ValueType[ValueType["BEZIER_CURVE_PATH"] = 22] = "BEZIER_CURVE_PATH";
|
|
74
|
+
/**
|
|
75
|
+
* 贝塞尔曲线四元数
|
|
76
|
+
*/
|
|
77
|
+
ValueType[ValueType["BEZIER_CURVE_QUAT"] = 23] = "BEZIER_CURVE_QUAT";
|
|
78
|
+
})(ValueType || (ValueType = {}));
|
|
79
|
+
/**
|
|
80
|
+
* 关键帧类型
|
|
81
|
+
*/
|
|
82
|
+
export var BezierKeyframeType;
|
|
83
|
+
(function (BezierKeyframeType) {
|
|
84
|
+
BezierKeyframeType[BezierKeyframeType["AUTO"] = 0] = "AUTO";
|
|
85
|
+
BezierKeyframeType[BezierKeyframeType["EASE"] = 1] = "EASE";
|
|
86
|
+
BezierKeyframeType[BezierKeyframeType["EASE_IN"] = 2] = "EASE_IN";
|
|
87
|
+
BezierKeyframeType[BezierKeyframeType["EASE_OUT"] = 3] = "EASE_OUT";
|
|
88
|
+
BezierKeyframeType[BezierKeyframeType["LINE"] = 4] = "LINE";
|
|
89
|
+
BezierKeyframeType[BezierKeyframeType["HOLD"] = 5] = "HOLD";
|
|
90
|
+
BezierKeyframeType[BezierKeyframeType["LINE_OUT"] = 6] = "LINE_OUT";
|
|
91
|
+
})(BezierKeyframeType || (BezierKeyframeType = {}));
|