@galacean/effects-specification 2.0.0-alpha.10 → 2.0.0-alpha.12
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/animation-clip-data.d.ts +26 -0
- package/es/animation-clip-data.js +1 -0
- package/es/components.d.ts +53 -1
- package/es/components.js +55 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/item/model/mesh.d.ts +4 -3
- package/es/type.d.ts +9 -0
- package/es/type.js +11 -0
- package/package.json +1 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { EffectsObjectData } from './components';
|
|
2
|
+
import type { FixedNumberExpression, FixedVec3Expression } from './number-expression';
|
|
3
|
+
export interface AnimationClipData extends EffectsObjectData {
|
|
4
|
+
positionCurves: PositionCurveData[];
|
|
5
|
+
eulerCurves: EulerCurveData[];
|
|
6
|
+
scaleCurves: ScaleCurveData[];
|
|
7
|
+
floatCurves: FloatCurveData[];
|
|
8
|
+
}
|
|
9
|
+
export interface PositionCurveData {
|
|
10
|
+
path: string[];
|
|
11
|
+
keyFrames: FixedVec3Expression;
|
|
12
|
+
}
|
|
13
|
+
export interface EulerCurveData {
|
|
14
|
+
path: string[];
|
|
15
|
+
keyFrames: FixedVec3Expression;
|
|
16
|
+
}
|
|
17
|
+
export interface ScaleCurveData {
|
|
18
|
+
path: string[];
|
|
19
|
+
keyFrames: FixedVec3Expression;
|
|
20
|
+
}
|
|
21
|
+
export interface FloatCurveData {
|
|
22
|
+
path: string[];
|
|
23
|
+
property: string[];
|
|
24
|
+
className: string;
|
|
25
|
+
keyFrames: FixedNumberExpression;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/components.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare enum DataType {
|
|
|
10
10
|
CameraController = "CameraController",
|
|
11
11
|
Geometry = "Geometry",
|
|
12
12
|
Texture = "Texture",
|
|
13
|
+
AnimationClip = "AnimationClip",
|
|
13
14
|
TextComponent = "TextComponent",
|
|
14
15
|
MeshComponent = "MeshComponent",
|
|
15
16
|
SkyboxComponent = "SkyboxComponent",
|
|
@@ -63,6 +64,7 @@ export interface GeometryData extends EffectsObjectData {
|
|
|
63
64
|
vertexData: VertexData;
|
|
64
65
|
indexFormat: number;
|
|
65
66
|
indexOffset: number;
|
|
67
|
+
subMeshes: SubMesh[];
|
|
66
68
|
/**
|
|
67
69
|
* 模型绘制模式,默认为 GeometryType.TRIANGLES(三角形)
|
|
68
70
|
* @default GeometryType.TRIANGLES
|
|
@@ -72,6 +74,16 @@ export interface GeometryData extends EffectsObjectData {
|
|
|
72
74
|
* 存放 position, uv, normal, indices 的打包数据
|
|
73
75
|
*/
|
|
74
76
|
buffer: string;
|
|
77
|
+
/**
|
|
78
|
+
* 所有的骨骼名称
|
|
79
|
+
*/
|
|
80
|
+
boneNames?: string[];
|
|
81
|
+
rootBoneName?: string;
|
|
82
|
+
inverseBindMatrices?: number[];
|
|
83
|
+
}
|
|
84
|
+
interface SubMesh {
|
|
85
|
+
offset: number;
|
|
86
|
+
count: number;
|
|
75
87
|
}
|
|
76
88
|
export declare enum GeometryType {
|
|
77
89
|
/**
|
|
@@ -107,10 +119,49 @@ export interface VertexData {
|
|
|
107
119
|
vertexCount: number;
|
|
108
120
|
channels: VertexChannel[];
|
|
109
121
|
}
|
|
122
|
+
export declare enum VertexFormatType {
|
|
123
|
+
Float32 = 0,
|
|
124
|
+
Int16 = 1,
|
|
125
|
+
Int8 = 2,
|
|
126
|
+
UInt16 = 3,
|
|
127
|
+
UInt8 = 4
|
|
128
|
+
}
|
|
129
|
+
export declare enum IndexFormatType {
|
|
130
|
+
UInt16 = 0,
|
|
131
|
+
UInt32 = 1
|
|
132
|
+
}
|
|
110
133
|
export interface VertexChannel {
|
|
134
|
+
semantic: string;
|
|
111
135
|
offset: number;
|
|
112
|
-
format:
|
|
136
|
+
format: VertexFormatType;
|
|
113
137
|
dimension: number;
|
|
138
|
+
normalize?: boolean;
|
|
139
|
+
}
|
|
140
|
+
export declare enum VertexBufferSemantic {
|
|
141
|
+
Position = "POSITION",
|
|
142
|
+
Uv = "TEXCOORD0",
|
|
143
|
+
Uv2 = "TEXCOORD1",
|
|
144
|
+
Normal = "NORMAL",
|
|
145
|
+
Tangent = "TANGENT",
|
|
146
|
+
Color = "COLOR",
|
|
147
|
+
Joints = "JOINTS",
|
|
148
|
+
Weights = "WEIGHTS",
|
|
149
|
+
PositionBS0 = "POSITION_BS0",
|
|
150
|
+
PositionBS1 = "POSITION_BS1",
|
|
151
|
+
PositionBS2 = "POSITION_BS2",
|
|
152
|
+
PositionBS3 = "POSITION_BS3",
|
|
153
|
+
PositionBS4 = "POSITION_BS4",
|
|
154
|
+
PositionBS5 = "POSITION_BS5",
|
|
155
|
+
PositionBS6 = "POSITION_BS6",
|
|
156
|
+
PositionBS7 = "POSITION_BS7",
|
|
157
|
+
NormalBS0 = "NORMAL_BS0",
|
|
158
|
+
NormalBS1 = "NORMAL_BS1",
|
|
159
|
+
NormalBS2 = "NORMAL_BS2",
|
|
160
|
+
NormalBS3 = "NORMAL_BS3",
|
|
161
|
+
TangentBS0 = "TANGENT_BS0",
|
|
162
|
+
TangentBS1 = "TANGENT_BS1",
|
|
163
|
+
TangentBS2 = "TANGENT_BS2",
|
|
164
|
+
TangentBS3 = "TANGENT_BS3"
|
|
114
165
|
}
|
|
115
166
|
export interface ShaderData extends EffectsObjectData {
|
|
116
167
|
vertex: string;
|
|
@@ -130,3 +181,4 @@ export interface FileSummary {
|
|
|
130
181
|
guid: string;
|
|
131
182
|
assetType: string;
|
|
132
183
|
}
|
|
184
|
+
export {};
|
package/es/components.js
CHANGED
|
@@ -10,6 +10,7 @@ export var DataType;
|
|
|
10
10
|
DataType["CameraController"] = "CameraController";
|
|
11
11
|
DataType["Geometry"] = "Geometry";
|
|
12
12
|
DataType["Texture"] = "Texture";
|
|
13
|
+
DataType["AnimationClip"] = "AnimationClip";
|
|
13
14
|
DataType["TextComponent"] = "TextComponent";
|
|
14
15
|
// FIXME: 先完成ECS的场景转换,后面移到spec中
|
|
15
16
|
DataType["MeshComponent"] = "MeshComponent";
|
|
@@ -50,3 +51,57 @@ export var GeometryType;
|
|
|
50
51
|
*/
|
|
51
52
|
GeometryType[GeometryType["TRIANGLE_FAN"] = 6] = "TRIANGLE_FAN";
|
|
52
53
|
})(GeometryType || (GeometryType = {}));
|
|
54
|
+
export var VertexFormatType;
|
|
55
|
+
(function (VertexFormatType) {
|
|
56
|
+
VertexFormatType[VertexFormatType["Float32"] = 0] = "Float32";
|
|
57
|
+
VertexFormatType[VertexFormatType["Int16"] = 1] = "Int16";
|
|
58
|
+
VertexFormatType[VertexFormatType["Int8"] = 2] = "Int8";
|
|
59
|
+
VertexFormatType[VertexFormatType["UInt16"] = 3] = "UInt16";
|
|
60
|
+
VertexFormatType[VertexFormatType["UInt8"] = 4] = "UInt8";
|
|
61
|
+
})(VertexFormatType || (VertexFormatType = {}));
|
|
62
|
+
export var IndexFormatType;
|
|
63
|
+
(function (IndexFormatType) {
|
|
64
|
+
IndexFormatType[IndexFormatType["UInt16"] = 0] = "UInt16";
|
|
65
|
+
IndexFormatType[IndexFormatType["UInt32"] = 1] = "UInt32";
|
|
66
|
+
})(IndexFormatType || (IndexFormatType = {}));
|
|
67
|
+
// BINORMAL[n] Binormal float4
|
|
68
|
+
// BLENDINDICES[n] 混合索引 uint
|
|
69
|
+
// BLENDWEIGHT[n] 混合权重 FLOAT
|
|
70
|
+
// COLOR[n] 漫射和反射颜色 float4
|
|
71
|
+
// NORMAL[n] 法向矢量 float4
|
|
72
|
+
// POSITION[n] 对象空间中的顶点位置。 float4
|
|
73
|
+
// POSITIONT 变换的顶点位置。 float4
|
|
74
|
+
// PSIZE[n] 点大小 FLOAT
|
|
75
|
+
// TANGENT[n] 正切 float4
|
|
76
|
+
// TEXCOORD[n] 纹理坐标 float4
|
|
77
|
+
// POSITION_BS[n] Blend Shape 空间中的顶点位置 float4
|
|
78
|
+
// NORMAL_BS[n] Blend Shape 空间中的法向矢量 float4
|
|
79
|
+
// TANGENT_BS[n] Blend Shape 空间中的正切矢量 float4
|
|
80
|
+
export var VertexBufferSemantic;
|
|
81
|
+
(function (VertexBufferSemantic) {
|
|
82
|
+
VertexBufferSemantic["Position"] = "POSITION";
|
|
83
|
+
VertexBufferSemantic["Uv"] = "TEXCOORD0";
|
|
84
|
+
VertexBufferSemantic["Uv2"] = "TEXCOORD1";
|
|
85
|
+
VertexBufferSemantic["Normal"] = "NORMAL";
|
|
86
|
+
VertexBufferSemantic["Tangent"] = "TANGENT";
|
|
87
|
+
VertexBufferSemantic["Color"] = "COLOR";
|
|
88
|
+
VertexBufferSemantic["Joints"] = "JOINTS";
|
|
89
|
+
VertexBufferSemantic["Weights"] = "WEIGHTS";
|
|
90
|
+
//
|
|
91
|
+
VertexBufferSemantic["PositionBS0"] = "POSITION_BS0";
|
|
92
|
+
VertexBufferSemantic["PositionBS1"] = "POSITION_BS1";
|
|
93
|
+
VertexBufferSemantic["PositionBS2"] = "POSITION_BS2";
|
|
94
|
+
VertexBufferSemantic["PositionBS3"] = "POSITION_BS3";
|
|
95
|
+
VertexBufferSemantic["PositionBS4"] = "POSITION_BS4";
|
|
96
|
+
VertexBufferSemantic["PositionBS5"] = "POSITION_BS5";
|
|
97
|
+
VertexBufferSemantic["PositionBS6"] = "POSITION_BS6";
|
|
98
|
+
VertexBufferSemantic["PositionBS7"] = "POSITION_BS7";
|
|
99
|
+
VertexBufferSemantic["NormalBS0"] = "NORMAL_BS0";
|
|
100
|
+
VertexBufferSemantic["NormalBS1"] = "NORMAL_BS1";
|
|
101
|
+
VertexBufferSemantic["NormalBS2"] = "NORMAL_BS2";
|
|
102
|
+
VertexBufferSemantic["NormalBS3"] = "NORMAL_BS3";
|
|
103
|
+
VertexBufferSemantic["TangentBS0"] = "TANGENT_BS0";
|
|
104
|
+
VertexBufferSemantic["TangentBS1"] = "TANGENT_BS1";
|
|
105
|
+
VertexBufferSemantic["TangentBS2"] = "TANGENT_BS2";
|
|
106
|
+
VertexBufferSemantic["TangentBS3"] = "TANGENT_BS3";
|
|
107
|
+
})(VertexBufferSemantic || (VertexBufferSemantic = {}));
|
package/es/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export * from './item/effect-item';
|
|
|
19
19
|
export * from './item/text-item';
|
|
20
20
|
export * from './item/model';
|
|
21
21
|
export * from './vfx-item-data';
|
|
22
|
+
export * from './animation-clip-data';
|
|
22
23
|
export * from './binary';
|
|
23
24
|
export * from './text';
|
|
24
25
|
export * from './components';
|
package/es/index.js
CHANGED
|
@@ -19,6 +19,7 @@ export * from './item/effect-item';
|
|
|
19
19
|
export * from './item/text-item';
|
|
20
20
|
export * from './item/model';
|
|
21
21
|
export * from './vfx-item-data';
|
|
22
|
+
export * from './animation-clip-data';
|
|
22
23
|
export * from './binary';
|
|
23
24
|
export * from './text';
|
|
24
25
|
export * from './components';
|
package/es/item/model/mesh.d.ts
CHANGED
|
@@ -84,13 +84,14 @@ export interface MorphData {
|
|
|
84
84
|
export interface ModelMeshComponentData extends ComponentData {
|
|
85
85
|
hide?: boolean;
|
|
86
86
|
/**
|
|
87
|
-
*
|
|
87
|
+
* 骨骼根节点
|
|
88
88
|
*/
|
|
89
|
-
|
|
89
|
+
rootBone?: DataPath;
|
|
90
90
|
/**
|
|
91
91
|
* Morph数据
|
|
92
92
|
*/
|
|
93
93
|
morph?: MorphData;
|
|
94
|
-
|
|
94
|
+
geometry: DataPath;
|
|
95
|
+
materials: DataPath[];
|
|
95
96
|
interaction?: ModelItemBounding;
|
|
96
97
|
}
|
package/es/type.d.ts
CHANGED
|
@@ -657,3 +657,12 @@ export interface ShapeGeometry {
|
|
|
657
657
|
*/
|
|
658
658
|
s: ShapeSplits;
|
|
659
659
|
}
|
|
660
|
+
export declare enum RenderType {
|
|
661
|
+
Opaque = "Opaque",
|
|
662
|
+
Transparent = "Transparent"
|
|
663
|
+
}
|
|
664
|
+
export declare enum RenderFace {
|
|
665
|
+
Both = "Both",
|
|
666
|
+
Back = "Back",
|
|
667
|
+
Front = "Front"
|
|
668
|
+
}
|
package/es/type.js
CHANGED
|
@@ -325,3 +325,14 @@ export var ParticleOrigin;
|
|
|
325
325
|
*/
|
|
326
326
|
ParticleOrigin[ParticleOrigin["PARTICLE_ORIGIN_RIGHT_BOTTOM"] = 8] = "PARTICLE_ORIGIN_RIGHT_BOTTOM";
|
|
327
327
|
})(ParticleOrigin || (ParticleOrigin = {}));
|
|
328
|
+
export var RenderType;
|
|
329
|
+
(function (RenderType) {
|
|
330
|
+
RenderType["Opaque"] = "Opaque";
|
|
331
|
+
RenderType["Transparent"] = "Transparent";
|
|
332
|
+
})(RenderType || (RenderType = {}));
|
|
333
|
+
export var RenderFace;
|
|
334
|
+
(function (RenderFace) {
|
|
335
|
+
RenderFace["Both"] = "Both";
|
|
336
|
+
RenderFace["Back"] = "Back";
|
|
337
|
+
RenderFace["Front"] = "Front";
|
|
338
|
+
})(RenderFace || (RenderFace = {}));
|