@galacean/effects-specification 2.0.0-alpha.18 → 2.0.0-alpha.19
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 +2 -0
- package/es/buitin-object-guid.d.ts +5 -5
- package/es/buitin-object-guid.js +5 -5
- package/es/components.d.ts +2 -0
- package/es/components.js +2 -0
- package/es/item/spine-item.d.ts +35 -18
- package/es/scene.d.ts +0 -4
- package/package.json +1 -1
package/es/binary.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DataType } from './components';
|
|
1
2
|
import type { RenderLevel } from './type';
|
|
2
3
|
import type { ValueType } from './number-expression';
|
|
3
4
|
/**
|
|
@@ -25,6 +26,7 @@ export type BinaryType = 'u8' | 'i8' | 'i16' | 'u16' | 'f32' | 'u32' | 'i32' | '
|
|
|
25
26
|
*/
|
|
26
27
|
export interface BinaryFile {
|
|
27
28
|
url: string;
|
|
29
|
+
dataType: DataType.BinaryAsset;
|
|
28
30
|
renderLevel?: RenderLevel;
|
|
29
31
|
}
|
|
30
32
|
export type BinaryEnv = 'studio' | 'runtime' | 'json';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
1
|
+
export declare const BuiltinObjectGUID: {
|
|
2
|
+
WhiteTexture: string;
|
|
3
|
+
PBRShader: string;
|
|
4
|
+
UnlitShader: string;
|
|
5
|
+
};
|
package/es/buitin-object-guid.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
1
|
+
export const BuiltinObjectGUID = {
|
|
2
|
+
WhiteTexture: 'whitetexture00000000000000000000',
|
|
3
|
+
PBRShader: 'pbr00000000000000000000000000000',
|
|
4
|
+
UnlitShader: 'unlit000000000000000000000000000',
|
|
5
|
+
};
|
package/es/components.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export declare enum DataType {
|
|
|
16
16
|
TimelineAsset = "TimelineAsset",
|
|
17
17
|
TransformPlayableAsset = "TransformPlayableAsset",
|
|
18
18
|
SpriteColorPlayableAsset = "SpriteColorPlayableAsset",
|
|
19
|
+
BinaryAsset = "BinaryAsset",
|
|
19
20
|
MeshComponent = "MeshComponent",
|
|
20
21
|
SkyboxComponent = "SkyboxComponent",
|
|
21
22
|
LightComponent = "LightComponent",
|
|
@@ -23,6 +24,7 @@ export declare enum DataType {
|
|
|
23
24
|
ModelPluginComponent = "ModelPluginComponent",
|
|
24
25
|
TreeComponent = "TreeComponent",
|
|
25
26
|
AnimationComponent = "AnimationComponent",
|
|
27
|
+
SpineComponent = "SpineComponent",
|
|
26
28
|
TimelineClip = "TimelineClip"
|
|
27
29
|
}
|
|
28
30
|
export interface DataPath {
|
package/es/components.js
CHANGED
|
@@ -16,6 +16,7 @@ export var DataType;
|
|
|
16
16
|
DataType["TimelineAsset"] = "TimelineAsset";
|
|
17
17
|
DataType["TransformPlayableAsset"] = "TransformPlayableAsset";
|
|
18
18
|
DataType["SpriteColorPlayableAsset"] = "SpriteColorPlayableAsset";
|
|
19
|
+
DataType["BinaryAsset"] = "BinaryAsset";
|
|
19
20
|
// FIXME: 先完成ECS的场景转换,后面移到spec中
|
|
20
21
|
DataType["MeshComponent"] = "MeshComponent";
|
|
21
22
|
DataType["SkyboxComponent"] = "SkyboxComponent";
|
|
@@ -24,6 +25,7 @@ export var DataType;
|
|
|
24
25
|
DataType["ModelPluginComponent"] = "ModelPluginComponent";
|
|
25
26
|
DataType["TreeComponent"] = "TreeComponent";
|
|
26
27
|
DataType["AnimationComponent"] = "AnimationComponent";
|
|
28
|
+
DataType["SpineComponent"] = "SpineComponent";
|
|
27
29
|
// Non-EffectObject
|
|
28
30
|
DataType["TimelineClip"] = "TimelineClip";
|
|
29
31
|
})(DataType || (DataType = {}));
|
package/es/item/spine-item.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { BinaryPointer } from '../binary';
|
|
2
|
+
import type { ComponentData, DataPath, DataType } from '../components';
|
|
2
3
|
import type { SizeOverLifetime, RotationOverLifetime, PositionOverLifetime, ColorOverLifetime, RendererOptions, ItemType } from '../type';
|
|
3
4
|
import type { BaseItem, ItemEndBehavior } from './base-item';
|
|
4
5
|
/**
|
|
@@ -6,12 +7,12 @@ import type { BaseItem, ItemEndBehavior } from './base-item';
|
|
|
6
7
|
*/
|
|
7
8
|
export interface SpineItem extends BaseItem {
|
|
8
9
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
* 元素类型 "spine"
|
|
11
|
+
*/
|
|
11
12
|
type: ItemType.spine;
|
|
12
13
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
* 插件元素渲染信息
|
|
15
|
+
*/
|
|
15
16
|
content: SpineContent;
|
|
16
17
|
endBehavior: ItemEndBehavior;
|
|
17
18
|
}
|
|
@@ -49,16 +50,16 @@ export interface SpineContent {
|
|
|
49
50
|
*/
|
|
50
51
|
export interface PluginSpineOption {
|
|
51
52
|
/**
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
* 当前使用的皮肤名称
|
|
54
|
+
*/
|
|
54
55
|
activeSkin: string;
|
|
55
56
|
/**
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
* 当前使用的动画列表,1.5 之前为 string
|
|
58
|
+
*/
|
|
58
59
|
activeAnimation: string[] | string;
|
|
59
60
|
/**
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
* 在 spines 资源数组中的索引
|
|
62
|
+
*/
|
|
62
63
|
spine: number;
|
|
63
64
|
/**
|
|
64
65
|
* 默认融合时间
|
|
@@ -82,19 +83,35 @@ export interface PluginSpineOption {
|
|
|
82
83
|
export type skeletonFileType = 'json' | 'skel';
|
|
83
84
|
export interface SpineResource {
|
|
84
85
|
/**
|
|
85
|
-
|
|
86
|
-
|
|
86
|
+
* atlas 文件在 `bins` 中的指针
|
|
87
|
+
*/
|
|
87
88
|
atlas: BinaryPointer;
|
|
88
89
|
/**
|
|
89
|
-
|
|
90
|
-
|
|
90
|
+
* 骨骼文件
|
|
91
|
+
*/
|
|
91
92
|
skeleton: BinaryPointer;
|
|
92
93
|
/**
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
* skeleton 文件类型, `.skel/.json`
|
|
95
|
+
*/
|
|
95
96
|
skeletonType: skeletonFileType;
|
|
96
97
|
/**
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
* 图像文件在 `scene.textures` 数组中的索引
|
|
99
|
+
*/
|
|
99
100
|
images: number[];
|
|
100
101
|
}
|
|
102
|
+
export interface SpineComponent extends ComponentData {
|
|
103
|
+
dataType: DataType.SpineComponent;
|
|
104
|
+
options: PluginSpineOption;
|
|
105
|
+
resource: {
|
|
106
|
+
atlas: {
|
|
107
|
+
bins: DataPath;
|
|
108
|
+
source: [start: number, length?: number];
|
|
109
|
+
};
|
|
110
|
+
skeleton: {
|
|
111
|
+
bins: DataPath;
|
|
112
|
+
source: [start: number, length?: number];
|
|
113
|
+
};
|
|
114
|
+
images: DataPath[];
|
|
115
|
+
skeletonType: skeletonFileType;
|
|
116
|
+
};
|
|
117
|
+
}
|
package/es/scene.d.ts
CHANGED