@galacean/effects-specification 2.0.0-alpha.10 → 2.0.0-alpha.11

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.
@@ -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 {};
@@ -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,33 @@ 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: number;
136
+ format: VertexFormatType;
113
137
  dimension: number;
138
+ normalize?: boolean;
139
+ }
140
+ export declare enum VertexBufferSemantic {
141
+ Positon = "position",
142
+ Uv = "uv",
143
+ Uv2 = "uv2",
144
+ Normal = "normal",
145
+ Tangent = "tangent",
146
+ Color = "color",
147
+ BoneIndices = "boneIndices",
148
+ BoneWeights = "boneWeights"
114
149
  }
115
150
  export interface ShaderData extends EffectsObjectData {
116
151
  vertex: string;
@@ -130,3 +165,4 @@ export interface FileSummary {
130
165
  guid: string;
131
166
  assetType: string;
132
167
  }
168
+ 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,27 @@ 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
+ export var VertexBufferSemantic;
68
+ (function (VertexBufferSemantic) {
69
+ VertexBufferSemantic["Positon"] = "position";
70
+ VertexBufferSemantic["Uv"] = "uv";
71
+ VertexBufferSemantic["Uv2"] = "uv2";
72
+ VertexBufferSemantic["Normal"] = "normal";
73
+ VertexBufferSemantic["Tangent"] = "tangent";
74
+ VertexBufferSemantic["Color"] = "color";
75
+ VertexBufferSemantic["BoneIndices"] = "boneIndices";
76
+ VertexBufferSemantic["BoneWeights"] = "boneWeights";
77
+ })(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';
@@ -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
- skin?: SkinData;
89
+ rootBone: DataPath;
90
90
  /**
91
91
  * Morph数据
92
92
  */
93
93
  morph?: MorphData;
94
- primitives: PrimitiveData[];
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 = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/effects-specification",
3
- "version": "2.0.0-alpha.10",
3
+ "version": "2.0.0-alpha.11",
4
4
  "description": "Galacean Effects JSON Specification",
5
5
  "module": "./es/index.js",
6
6
  "main": "./es/index.js",