@galacean/effects-specification 2.0.0-alpha.22 → 2.0.0-alpha.23
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/image.d.ts +8 -2
- package/package.json +1 -1
package/es/image.d.ts
CHANGED
|
@@ -53,7 +53,6 @@ export declare enum BackgroundType {
|
|
|
53
53
|
image = "image"
|
|
54
54
|
}
|
|
55
55
|
export interface TemplateContent {
|
|
56
|
-
variables: Record<string, number | string>;
|
|
57
56
|
/**
|
|
58
57
|
* 当 template 宽高和 image 不相同时,会对 template 进行缩放,使其和 image 相同。
|
|
59
58
|
*/
|
|
@@ -62,9 +61,10 @@ export interface TemplateContent {
|
|
|
62
61
|
background?: {
|
|
63
62
|
type: BackgroundType;
|
|
64
63
|
name: string;
|
|
65
|
-
url: string;
|
|
64
|
+
url: string | HTMLImageElement;
|
|
66
65
|
};
|
|
67
66
|
}
|
|
67
|
+
export type TemplateVariables = Record<string, string | string[] | HTMLImageElement | HTMLImageElement[]>;
|
|
68
68
|
/**
|
|
69
69
|
* 纹理贴图属性
|
|
70
70
|
*/
|
|
@@ -79,6 +79,12 @@ export interface Image {
|
|
|
79
79
|
* 如果运行时支持 WebP,则优先使用 WebP
|
|
80
80
|
*/
|
|
81
81
|
webp?: string;
|
|
82
|
+
/**
|
|
83
|
+
* AVIF 地址
|
|
84
|
+
* 如果运行时支持 AVIF,则优先使用 AVIF
|
|
85
|
+
* @since 2.0.0
|
|
86
|
+
*/
|
|
87
|
+
avif?: string;
|
|
82
88
|
/**
|
|
83
89
|
* 纹理贴图渲染等级
|
|
84
90
|
* 如果没有设置,按照 B+ 处理
|