@galacean/effects-core 2.1.0-beta.0 → 2.1.0
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 +1 -1
- package/dist/components/renderer-component.d.ts +2 -0
- package/dist/components/shape-component.d.ts +2 -261
- package/dist/composition.d.ts +0 -1
- package/dist/events/types.d.ts +7 -0
- package/dist/index.js +277 -390
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +278 -391
- package/dist/index.mjs.map +1 -1
- package/dist/plugins/shape/graphics-path.d.ts +2 -2
- package/dist/plugins/shape/rectangle.d.ts +1 -1
- package/dist/plugins/shape/shape-path.d.ts +2 -2
- package/dist/plugins/sprite/sprite-item.d.ts +1 -1
- package/dist/plugins/timeline/playable-assets/color-property-playable-asset.d.ts +1 -1
- package/dist/plugins/timeline/playable-assets/index.d.ts +2 -0
- package/dist/plugins/timeline/playable-assets/timeline-asset.d.ts +8 -2
- package/dist/plugins/timeline/playable-assets/vector4-property-playable-asset.d.ts +1 -1
- package/dist/render/render-frame.d.ts +5 -2
- package/dist/render/renderer.d.ts +2 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -15,6 +15,8 @@ export declare class RendererComponent extends Component {
|
|
|
15
15
|
set material(material: Material);
|
|
16
16
|
render(renderer: Renderer): void;
|
|
17
17
|
setVFXItem(item: VFXItem): void;
|
|
18
|
+
onEnable(): void;
|
|
19
|
+
onDisable(): void;
|
|
18
20
|
fromData(data: unknown): void;
|
|
19
21
|
toData(): void;
|
|
20
22
|
dispose(): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
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
|
}
|
package/dist/composition.d.ts
CHANGED
|
@@ -301,7 +301,6 @@ export declare class Composition extends EventEmitter<CompositionEvent<Compositi
|
|
|
301
301
|
*/
|
|
302
302
|
protected reset(): void;
|
|
303
303
|
prepareRender(): void;
|
|
304
|
-
protected gatherRendererComponent(vfxItem: VFXItem, renderFrame: RenderFrame): void;
|
|
305
304
|
/**
|
|
306
305
|
* 合成更新,针对所有 item 的更新
|
|
307
306
|
* @param deltaTime - 更新的时间步长
|