@galacean/effects-specification 2.0.0-alpha.21 → 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/binary.d.ts +1 -6
- package/es/components.d.ts +2 -3
- package/es/image.d.ts +8 -2
- package/package.json +1 -1
package/es/binary.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DataType, EffectsObjectData } from './components';
|
|
2
2
|
import type { RenderLevel } from './type';
|
|
3
3
|
import type { ValueType } from './number-expression';
|
|
4
4
|
/**
|
|
@@ -29,11 +29,6 @@ export interface BinaryFile extends EffectsObjectData {
|
|
|
29
29
|
dataType: DataType.BinaryAsset;
|
|
30
30
|
renderLevel?: RenderLevel;
|
|
31
31
|
}
|
|
32
|
-
export interface BinaryDataSegment {
|
|
33
|
-
buffer: DataPath;
|
|
34
|
-
offset: number;
|
|
35
|
-
length: number;
|
|
36
|
-
}
|
|
37
32
|
export type BinaryEnv = 'studio' | 'runtime' | 'json';
|
|
38
33
|
/**
|
|
39
34
|
* 类型模板,根据 runtime/studio/json 环境区别类型
|
package/es/components.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { BinaryDataSegment } from './binary';
|
|
2
1
|
import type { Vector2Data } from './item/base-item';
|
|
3
2
|
export declare enum DataType {
|
|
4
3
|
VFXItemData = "VFXItemData",
|
|
@@ -91,9 +90,9 @@ export interface GeometryData extends EffectsObjectData {
|
|
|
91
90
|
*/
|
|
92
91
|
buffer?: string;
|
|
93
92
|
/**
|
|
94
|
-
* 存放 position, uv, normal, indices
|
|
93
|
+
* 存放 position, uv, normal, indices 的二进制数据,用于序列化二进制数据
|
|
95
94
|
*/
|
|
96
|
-
|
|
95
|
+
binaryData?: Uint8Array;
|
|
97
96
|
/**
|
|
98
97
|
* 所有的骨骼名称
|
|
99
98
|
*/
|
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+ 处理
|