@galacean/effects-core 2.1.0-alpha.12 → 2.1.0-alpha.14

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.
@@ -1,4 +1,4 @@
1
- import type * as spec from '@galacean/effects-specification';
1
+ import * as spec from '@galacean/effects-specification';
2
2
  import type { Engine } from '../engine';
3
3
  import { MeshComponent } from './mesh-component';
4
4
  /**
@@ -22,264 +22,5 @@ export declare class ShapeComponent extends MeshComponent {
22
22
  private buildGeometryFromPath;
23
23
  private buildPath;
24
24
  private setFillColor;
25
- fromData(data: ShapeComponentData): void;
26
- }
27
- /************************** Test Interface **********************************/
28
- /**
29
- * 矢量图形组件
30
- */
31
- export interface ShapeComponentData extends spec.ComponentData {
32
- /**
33
- * 矢量类型
34
- */
35
- type: ShapePrimitiveType;
36
- }
37
- /**
38
- * 矢量图形类型
39
- */
40
- export declare enum ShapePrimitiveType {
41
- /**
42
- * 自定义图形
43
- */
44
- Custom = 0,
45
- /**
46
- * 矩形
47
- */
48
- Rectangle = 1,
49
- /**
50
- * 椭圆
51
- */
52
- Ellipse = 2,
53
- /**
54
- * 多边形
55
- */
56
- Polygon = 3,
57
- /**
58
- * 星形
59
- */
60
- Star = 4
61
- }
62
- /**
63
- * 自定义图形组件
64
- */
65
- export interface CustomShapeData extends ShapeComponentData {
66
- /**
67
- * 矢量类型 - 形状
68
- */
69
- type: ShapePrimitiveType.Custom;
70
- /**
71
- * 路径点
72
- */
73
- points: spec.Vector2Data[];
74
- /**
75
- * 入射控制点
76
- */
77
- easingIns: spec.Vector2Data[];
78
- /**
79
- * 入射控制点
80
- */
81
- easingOuts: spec.Vector2Data[];
82
- /**
83
- * 自定义形状
84
- */
85
- shapes: CustomShape[];
86
- }
87
- /**
88
- * 自定义形状参数
89
- */
90
- export interface CustomShape {
91
- /**
92
- * 点索引 - 用于构成闭合图形
93
- */
94
- indexes: CustomShapePoint[];
95
- /**
96
- * 是否为闭合图形 - 用于Stroke
97
- */
98
- close: boolean;
99
- /**
100
- * 填充属性
101
- */
102
- fill?: ShapeFillParam;
103
- /**
104
- * 描边属性
105
- */
106
- stroke?: ShapeStrokeParam;
107
- /**
108
- * 空间变换
109
- */
110
- transform?: spec.TransformData;
111
- }
112
- /**
113
- * 自定义形状点
114
- */
115
- export interface CustomShapePoint {
116
- /**
117
- * 顶点索引
118
- */
119
- point: number;
120
- /**
121
- * 入射点索引
122
- */
123
- easingIn: number;
124
- /**
125
- * 出射点索引
126
- */
127
- easingOut: number;
128
- }
129
- /**
130
- * 矢量填充参数
131
- */
132
- export interface ShapeFillParam {
133
- /**
134
- * 填充颜色
135
- */
136
- color: spec.ColorData;
137
- }
138
- /**
139
- * 矢量描边参数
140
- */
141
- export interface ShapeStrokeParam {
142
- /**
143
- * 线宽
144
- */
145
- width: number;
146
- /**
147
- * 线颜色
148
- */
149
- color: spec.ColorData;
150
- /**
151
- * 连接类型
152
- */
153
- connectType: ShapeConnectType;
154
- /**
155
- * 点类型
156
- */
157
- pointType: ShapePointType;
158
- }
159
- export declare enum ShapeConnectType {
160
- }
161
- export declare enum ShapePointType {
162
- }
163
- /**
164
- * 椭圆组件参数
165
- */
166
- export interface EllipseData extends ShapeComponentData {
167
- type: ShapePrimitiveType.Ellipse;
168
- /**
169
- * x 轴半径
170
- * -- TODO 后续完善类型
171
- * -- TODO 可以看一下用xRadius/yRadius 还是 width/height
172
- */
173
- xRadius: number;
174
- /**
175
- * y 轴半径
176
- */
177
- yRadius: number;
178
- /**
179
- * 填充属性
180
- */
181
- fill?: ShapeFillParam;
182
- /**
183
- * 描边属性
184
- */
185
- stroke?: ShapeStrokeParam;
186
- /**
187
- * 空间变换
188
- */
189
- transform?: spec.TransformData;
190
- }
191
- /**
192
- * 星形参数
193
- */
194
- export interface StarData extends ShapeComponentData {
195
- /**
196
- * 顶点数 - 内外顶点同数
197
- */
198
- pointCount: number;
199
- /**
200
- * 内径
201
- */
202
- innerRadius: number;
203
- /**
204
- * 外径
205
- */
206
- outerRadius: number;
207
- /**
208
- * 内径点圆度
209
- */
210
- innerRoundness: number;
211
- /**
212
- * 外径点圆度
213
- */
214
- outerRoundness: number;
215
- /**
216
- * 填充属性
217
- */
218
- fill?: ShapeFillParam;
219
- /**
220
- * 描边属性
221
- */
222
- stroke?: ShapeStrokeParam;
223
- /**
224
- * 空间变换
225
- */
226
- transform?: spec.TransformData;
227
- }
228
- /**
229
- * 多边形参数
230
- */
231
- export interface PolygonData extends ShapeComponentData {
232
- /**
233
- * 顶点数
234
- */
235
- pointCount: number;
236
- /**
237
- * 外切圆半径
238
- */
239
- radius: number;
240
- /**
241
- * 角点圆度
242
- */
243
- roundness: number;
244
- /**
245
- * 填充属性
246
- */
247
- fill?: ShapeFillParam;
248
- /**
249
- * 描边属性
250
- */
251
- stroke?: ShapeStrokeParam;
252
- /**
253
- * 空间变换
254
- */
255
- transform?: spec.TransformData;
256
- }
257
- /**
258
- * 矩形参数
259
- */
260
- export interface RectangleData extends ShapeComponentData {
261
- /**
262
- * 宽度
263
- */
264
- width: number;
265
- /**
266
- * 高度
267
- */
268
- height: number;
269
- /**
270
- * 角点元素
271
- */
272
- roundness: number;
273
- /**
274
- * 填充属性
275
- */
276
- fill?: ShapeFillParam;
277
- /**
278
- * 描边属性
279
- */
280
- stroke?: ShapeStrokeParam;
281
- /**
282
- * 空间变换
283
- */
284
- transform?: spec.TransformData;
25
+ fromData(data: spec.ShapeComponentData): void;
285
26
  }
@@ -34,4 +34,11 @@ export type CompositionEvent<C> = {
34
34
  ['end']: [endInfo: {
35
35
  composition: C;
36
36
  }];
37
+ /**
38
+ * 时间跳转事件
39
+ * 用于在合成中跳转到指定时间
40
+ */
41
+ ['goto']: [gotoInfo: {
42
+ time: number;
43
+ }];
37
44
  };