@galacean/effects-core 2.2.6 → 2.3.0-alpha.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/dist/components/base-render-component.d.ts +10 -4
- package/dist/components/shape-component.d.ts +5 -2
- package/dist/composition.d.ts +62 -2
- package/dist/config.d.ts +11 -0
- package/dist/downloader.d.ts +15 -0
- package/dist/index.js +1605 -1020
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1605 -1021
- package/dist/index.mjs.map +1 -1
- package/dist/math/value-getters/index.d.ts +1 -1
- package/dist/math/value-getters/{vector4-curve.d.ts → vector-curves.d.ts} +8 -0
- package/dist/plugins/shape/build-line.d.ts +32 -0
- package/dist/plugins/shape/graphics-path.d.ts +0 -4
- package/dist/plugins/shape/polygon.d.ts +0 -4
- package/dist/plugins/shape/shape-path.d.ts +0 -4
- package/dist/plugins/timeline/playable-assets/index.d.ts +1 -1
- package/dist/plugins/timeline/playable-assets/{vector4-property-playable-asset.d.ts → vector-property-playable-assets.d.ts} +5 -1
- package/dist/plugins/timeline/playables/color-property-mixer-playable.d.ts +5 -5
- package/dist/plugins/timeline/playables/float-property-mixer-playable.d.ts +4 -5
- package/dist/plugins/timeline/playables/index.d.ts +1 -1
- package/dist/plugins/timeline/playables/property-mixer-playable.d.ts +9 -0
- package/dist/plugins/timeline/playables/vector-property-mixer-playable.d.ts +11 -0
- package/dist/plugins/timeline/tracks/index.d.ts +1 -1
- package/dist/plugins/timeline/tracks/{vector4-property-track.d.ts → vector-property-track.d.ts} +3 -0
- package/package.json +2 -2
- package/dist/plugins/timeline/playables/vector4-property-mixer-playable.d.ts +0 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as spec from '@galacean/effects-specification';
|
|
2
2
|
import { Matrix4 } from '@galacean/effects-math/es/core/matrix4';
|
|
3
3
|
import { RendererComponent } from './renderer-component';
|
|
4
|
-
import
|
|
4
|
+
import { Texture } from '../texture';
|
|
5
5
|
import type { GeometryDrawMode, Renderer } from '../render';
|
|
6
6
|
import { Geometry } from '../render';
|
|
7
7
|
import type { Engine } from '../engine';
|
|
@@ -78,11 +78,17 @@ export declare class BaseRenderComponent extends RendererComponent {
|
|
|
78
78
|
*/
|
|
79
79
|
setColor(color: spec.vec4): void;
|
|
80
80
|
/**
|
|
81
|
-
*
|
|
81
|
+
* 使用纹理对象设置当前 Mesh 的纹理
|
|
82
82
|
* @since 2.0.0
|
|
83
|
-
* @param
|
|
83
|
+
* @param input - 纹理对象
|
|
84
84
|
*/
|
|
85
|
-
setTexture(
|
|
85
|
+
setTexture(input: Texture): void;
|
|
86
|
+
/**
|
|
87
|
+
* 使用资源链接异步设置当前 Mesh 的纹理
|
|
88
|
+
* @param input - 资料链接
|
|
89
|
+
* @since 2.3.0
|
|
90
|
+
*/
|
|
91
|
+
setTexture(input: string): Promise<void>;
|
|
86
92
|
render(renderer: Renderer): void;
|
|
87
93
|
onStart(): void;
|
|
88
94
|
onDestroy(): void;
|
|
@@ -6,12 +6,15 @@ import { MeshComponent } from './mesh-component';
|
|
|
6
6
|
* @since 2.1.0
|
|
7
7
|
*/
|
|
8
8
|
export declare class ShapeComponent extends MeshComponent {
|
|
9
|
-
|
|
9
|
+
isStroke: boolean;
|
|
10
|
+
private graphicsPath;
|
|
10
11
|
private curveValues;
|
|
11
12
|
private data;
|
|
12
|
-
private
|
|
13
|
+
private shapeDirty;
|
|
14
|
+
private strokeAttributes;
|
|
13
15
|
private vert;
|
|
14
16
|
private frag;
|
|
17
|
+
get path(): spec.CustomShapeData;
|
|
15
18
|
/**
|
|
16
19
|
*
|
|
17
20
|
* @param engine
|
package/dist/composition.d.ts
CHANGED
|
@@ -21,6 +21,9 @@ import { SceneTicking } from './composition/scene-ticking';
|
|
|
21
21
|
*/
|
|
22
22
|
export interface CompositionStatistic {
|
|
23
23
|
loadStart: number;
|
|
24
|
+
/**
|
|
25
|
+
* 加载耗时
|
|
26
|
+
*/
|
|
24
27
|
loadTime: number;
|
|
25
28
|
/**
|
|
26
29
|
* Shader 编译耗时
|
|
@@ -35,30 +38,81 @@ export interface CompositionStatistic {
|
|
|
35
38
|
* 合成消息对象
|
|
36
39
|
*/
|
|
37
40
|
export interface MessageItem {
|
|
41
|
+
/**
|
|
42
|
+
* 元素 ID
|
|
43
|
+
*/
|
|
38
44
|
id: string;
|
|
45
|
+
/**
|
|
46
|
+
* 元素名称
|
|
47
|
+
*/
|
|
39
48
|
name: string;
|
|
40
|
-
|
|
49
|
+
/**
|
|
50
|
+
* 消息阶段(2:开始,1:结束)
|
|
51
|
+
*/
|
|
52
|
+
phrase: typeof spec.MESSAGE_ITEM_PHRASE_BEGIN | typeof spec.MESSAGE_ITEM_PHRASE_END;
|
|
53
|
+
/**
|
|
54
|
+
* 合成 ID
|
|
55
|
+
*/
|
|
41
56
|
compositionId: string;
|
|
42
57
|
}
|
|
43
58
|
/**
|
|
44
59
|
*
|
|
45
60
|
*/
|
|
46
61
|
export interface CompositionHitTestOptions {
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
*/
|
|
47
65
|
maxCount?: number;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @param region
|
|
69
|
+
* @returns
|
|
70
|
+
*/
|
|
48
71
|
stop?: (region: Region) => boolean;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @param item
|
|
75
|
+
* @returns
|
|
76
|
+
*/
|
|
49
77
|
skip?: (item: VFXItem) => boolean;
|
|
50
78
|
}
|
|
51
79
|
/**
|
|
52
80
|
*
|
|
53
81
|
*/
|
|
54
82
|
export interface CompositionProps {
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
*/
|
|
55
86
|
reusable?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
*
|
|
89
|
+
*/
|
|
56
90
|
baseRenderOrder?: number;
|
|
91
|
+
/**
|
|
92
|
+
*
|
|
93
|
+
*/
|
|
57
94
|
renderer: Renderer;
|
|
95
|
+
/**
|
|
96
|
+
*
|
|
97
|
+
* @param message
|
|
98
|
+
* @returns
|
|
99
|
+
*/
|
|
58
100
|
handleItemMessage: (message: MessageItem) => void;
|
|
101
|
+
/**
|
|
102
|
+
*
|
|
103
|
+
*/
|
|
59
104
|
event?: EventSystem;
|
|
105
|
+
/**
|
|
106
|
+
*
|
|
107
|
+
*/
|
|
60
108
|
width: number;
|
|
109
|
+
/**
|
|
110
|
+
*
|
|
111
|
+
*/
|
|
61
112
|
height: number;
|
|
113
|
+
/**
|
|
114
|
+
*
|
|
115
|
+
*/
|
|
62
116
|
speed?: number;
|
|
63
117
|
}
|
|
64
118
|
/**
|
|
@@ -198,7 +252,6 @@ export declare class Composition extends EventEmitter<CompositionEvent<Compositi
|
|
|
198
252
|
* Composition 构造函数
|
|
199
253
|
* @param props - composition 的创建参数
|
|
200
254
|
* @param scene
|
|
201
|
-
* @param compositionSourceManager
|
|
202
255
|
*/
|
|
203
256
|
constructor(props: CompositionProps, scene: Scene);
|
|
204
257
|
/**
|
|
@@ -261,11 +314,18 @@ export declare class Composition extends EventEmitter<CompositionEvent<Compositi
|
|
|
261
314
|
* @returns
|
|
262
315
|
*/
|
|
263
316
|
getSpeed(): number;
|
|
317
|
+
/**
|
|
318
|
+
*
|
|
319
|
+
*/
|
|
264
320
|
play(): void;
|
|
265
321
|
/**
|
|
266
322
|
* 暂停合成的播放
|
|
267
323
|
*/
|
|
268
324
|
pause(): void;
|
|
325
|
+
/**
|
|
326
|
+
*
|
|
327
|
+
* @returns
|
|
328
|
+
*/
|
|
269
329
|
getPaused(): boolean;
|
|
270
330
|
/**
|
|
271
331
|
* 恢复合成的播放
|
package/dist/config.d.ts
CHANGED
|
@@ -2,5 +2,16 @@ export declare const RUNTIME_ENV = "runtime_env";
|
|
|
2
2
|
export declare const RENDER_PREFER_LOOKUP_TEXTURE = "lookup_texture";
|
|
3
3
|
export declare const TEMPLATE_USE_OFFSCREEN_CANVAS = "offscreen_canvas";
|
|
4
4
|
export declare const POST_PROCESS_SETTINGS = "post_process_settings";
|
|
5
|
+
/**
|
|
6
|
+
* 获取全局配置项
|
|
7
|
+
* @param name
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
5
10
|
export declare function getConfig<T extends number | boolean | string | Record<string, any>>(name: string): T;
|
|
11
|
+
/**
|
|
12
|
+
* 设置全局配置项
|
|
13
|
+
* @param name
|
|
14
|
+
* @param value
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
6
17
|
export declare function setConfig<T extends number | boolean | string | Record<string, any>>(name: string, value: T): string | number | boolean | Record<string, any>;
|
package/dist/downloader.d.ts
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 成功处理程序
|
|
3
|
+
* @template T
|
|
4
|
+
*/
|
|
1
5
|
type SuccessHandler<T> = (data: T) => void;
|
|
6
|
+
/**
|
|
7
|
+
* 错误处理程序
|
|
8
|
+
* @param status - HTTP 状态码
|
|
9
|
+
* @param responseText - 响应文本
|
|
10
|
+
*/
|
|
2
11
|
type ErrorHandler = (status: number, responseText: string) => void;
|
|
3
12
|
/**
|
|
4
13
|
* JSON 值,它可以是字符串、数字、布尔值、对象或者 JSON 值的数组。
|
|
@@ -79,5 +88,11 @@ export declare function loadBlob(url: string): Promise<Blob>;
|
|
|
79
88
|
* @param url - 视频文件的 URL 或 MediaProvider 对象
|
|
80
89
|
*/
|
|
81
90
|
export declare function loadVideo(url: string | MediaProvider): Promise<HTMLVideoElement>;
|
|
91
|
+
/**
|
|
92
|
+
* 异步加载一个媒体文件
|
|
93
|
+
* @param url
|
|
94
|
+
* @param loadFn
|
|
95
|
+
* @returns
|
|
96
|
+
*/
|
|
82
97
|
export declare function loadMedia(url: string | string[], loadFn: (url: string) => Promise<HTMLImageElement | HTMLVideoElement>): Promise<HTMLImageElement | HTMLVideoElement>;
|
|
83
98
|
export {};
|