@galacean/effects-specification 2.0.0-alpha.1 → 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.
Files changed (90) hide show
  1. package/README.md +2 -10
  2. package/es/animation-clip-data.d.ts +26 -0
  3. package/es/animation-clip-data.js +1 -0
  4. package/{dist/src → es}/binary.d.ts +1 -1
  5. package/es/binary.js +1 -0
  6. package/es/buitin-object-guid.d.ts +5 -0
  7. package/es/buitin-object-guid.js +5 -0
  8. package/{dist/src → es}/components.d.ts +79 -4
  9. package/es/components.js +77 -0
  10. package/{dist/src → es}/composition.d.ts +8 -8
  11. package/es/composition.js +42 -0
  12. package/es/constants.js +11 -0
  13. package/{dist/src → es}/image.d.ts +17 -23
  14. package/es/image.js +9 -0
  15. package/{dist/src → es}/index.d.ts +4 -2
  16. package/es/index.js +27 -0
  17. package/{dist/src → es}/item/base-item.d.ts +9 -6
  18. package/es/item/base-item.js +11 -0
  19. package/{dist/src → es}/item/camera-item.d.ts +1 -1
  20. package/es/item/camera-item.js +1 -0
  21. package/es/item/composition-item.js +1 -0
  22. package/es/item/effect-item.d.ts +35 -0
  23. package/es/item/effect-item.js +1 -0
  24. package/es/item/interact-item.js +1 -0
  25. package/es/item/model/binary.js +1 -0
  26. package/{dist/src → es}/item/model/camera.d.ts +20 -4
  27. package/es/item/model/camera.js +5 -0
  28. package/es/item/model/index.js +35 -0
  29. package/es/item/model/light.js +19 -0
  30. package/{dist/src → es}/item/model/material.d.ts +3 -3
  31. package/es/item/model/material.js +16 -0
  32. package/{dist/src → es}/item/model/mesh.d.ts +7 -6
  33. package/es/item/model/mesh.js +5 -0
  34. package/es/item/model/render.js +42 -0
  35. package/es/item/model/skybox.js +1 -0
  36. package/es/item/model/tree.js +1 -0
  37. package/es/item/null-item.js +1 -0
  38. package/{dist/src → es}/item/particle-item.d.ts +0 -3
  39. package/es/item/particle-item.js +14 -0
  40. package/es/item/particle-shape.js +19 -0
  41. package/es/item/plugin-item.js +1 -0
  42. package/es/item/spine-item.js +1 -0
  43. package/es/item/sprite-item.js +1 -0
  44. package/es/item/text-item.js +1 -0
  45. package/{dist/src → es}/item.d.ts +1 -2
  46. package/es/item.js +1 -0
  47. package/{dist/src → es}/number-expression.d.ts +6 -6
  48. package/es/number-expression.js +87 -0
  49. package/{dist/src → es}/scene.d.ts +4 -6
  50. package/es/scene.js +1 -0
  51. package/{dist/src → es}/text.d.ts +1 -7
  52. package/es/text.js +84 -0
  53. package/{dist/src → es}/type.d.ts +29 -8
  54. package/es/type.js +338 -0
  55. package/{dist/src → es}/vfx-item-data.d.ts +3 -3
  56. package/es/vfx-item-data.js +1 -0
  57. package/package.json +26 -47
  58. package/dist/fallback/camera.d.ts +0 -2
  59. package/dist/fallback/filter.d.ts +0 -2
  60. package/dist/fallback/index.d.ts +0 -12
  61. package/dist/fallback/interact.d.ts +0 -2
  62. package/dist/fallback/migration.d.ts +0 -13
  63. package/dist/fallback/particle.d.ts +0 -2
  64. package/dist/fallback/sprite.d.ts +0 -3
  65. package/dist/fallback/utils.d.ts +0 -36
  66. package/dist/fallback.js +0 -2149
  67. package/dist/fallback.js.map +0 -1
  68. package/dist/fallback.mjs +0 -2121
  69. package/dist/fallback.mjs.map +0 -1
  70. package/dist/index.js +0 -752
  71. package/dist/index.js.map +0 -1
  72. package/dist/index.mjs +0 -737
  73. package/dist/index.mjs.map +0 -1
  74. package/dist/src/item/effect-item.d.ts +0 -17
  75. package/dist/src/item/filter-item.d.ts +0 -99
  76. /package/{dist/src → es}/constants.d.ts +0 -0
  77. /package/{dist/src → es}/item/composition-item.d.ts +0 -0
  78. /package/{dist/src → es}/item/interact-item.d.ts +0 -0
  79. /package/{dist/src → es}/item/model/binary.d.ts +0 -0
  80. /package/{dist/src → es}/item/model/index.d.ts +0 -0
  81. /package/{dist/src → es}/item/model/light.d.ts +0 -0
  82. /package/{dist/src → es}/item/model/render.d.ts +0 -0
  83. /package/{dist/src → es}/item/model/skybox.d.ts +0 -0
  84. /package/{dist/src → es}/item/model/tree.d.ts +0 -0
  85. /package/{dist/src → es}/item/null-item.d.ts +0 -0
  86. /package/{dist/src → es}/item/particle-shape.d.ts +0 -0
  87. /package/{dist/src → es}/item/plugin-item.d.ts +0 -0
  88. /package/{dist/src → es}/item/spine-item.d.ts +0 -0
  89. /package/{dist/src → es}/item/sprite-item.d.ts +0 -0
  90. /package/{dist/src → es}/item/text-item.d.ts +0 -0
package/README.md CHANGED
@@ -8,15 +8,7 @@
8
8
 
9
9
  ``` bash
10
10
  # 1. Install dependencies (first time)
11
- npm install
11
+ pnpm install
12
12
  # 2. Build
13
- npm run build
13
+ pnpm run build
14
14
  ```
15
-
16
- ## Testing
17
-
18
- ``` bash
19
- npm run test
20
- ```
21
-
22
- > Open browser and open: http://localhost:9003/test/
@@ -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 {};
@@ -19,7 +19,7 @@ import type { ValueType } from './number-expression';
19
19
  */
20
20
  export type BinaryPointerContent = [index: number, start?: number, byteLength?: number, type?: BinaryType];
21
21
  export type BinaryPointer = [ValueType.BINARY, BinaryPointerContent];
22
- export type BinaryType = 'u8' | 'i8' | 'i16' | 'u16' | 'f32' | 'u32' | 'i32' | 'f64' | string;
22
+ export type BinaryType = 'u8' | 'i8' | 'i16' | 'u16' | 'f32' | 'u32' | 'i32' | 'f64' | '';
23
23
  /**
24
24
  * 线上二进制地址
25
25
  */
package/es/binary.js ADDED
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export declare class BuiltinObjectGUID {
2
+ static readonly WhiteTexture = "whitetexture00000000000000000000";
3
+ static readonly PBRShader = "pbr00000000000000000000000000000";
4
+ static readonly UnlitShader = "unlit000000000000000000000000000";
5
+ }
@@ -0,0 +1,5 @@
1
+ export class BuiltinObjectGUID {
2
+ static WhiteTexture = 'whitetexture00000000000000000000';
3
+ static PBRShader = 'pbr00000000000000000000000000000';
4
+ static UnlitShader = 'unlit000000000000000000000000000';
5
+ }
@@ -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",
@@ -24,7 +25,7 @@ export interface DataPath {
24
25
  export interface EffectsObjectData {
25
26
  id: string;
26
27
  name?: string;
27
- dataType: string;
28
+ dataType: DataType;
28
29
  }
29
30
  export interface ComponentData extends EffectsObjectData {
30
31
  item: DataPath;
@@ -43,8 +44,8 @@ export interface Vector4Data {
43
44
  }
44
45
  export interface MaterialTextureProperty {
45
46
  texture: DataPath;
46
- offset: Vector2Data;
47
- scale: Vector2Data;
47
+ offset?: Vector2Data;
48
+ scale?: Vector2Data;
48
49
  }
49
50
  export interface MaterialData extends EffectsObjectData {
50
51
  shader: DataPath;
@@ -52,6 +53,7 @@ export interface MaterialData extends EffectsObjectData {
52
53
  zWrite?: boolean;
53
54
  zTest?: boolean;
54
55
  stringTags: Record<string, string>;
56
+ macros: string[];
55
57
  ints: Record<string, number>;
56
58
  floats: Record<string, number>;
57
59
  vector4s: Record<string, Vector4Data>;
@@ -62,16 +64,88 @@ export interface GeometryData extends EffectsObjectData {
62
64
  vertexData: VertexData;
63
65
  indexFormat: number;
64
66
  indexOffset: number;
67
+ subMeshes: SubMesh[];
68
+ /**
69
+ * 模型绘制模式,默认为 GeometryType.TRIANGLES(三角形)
70
+ * @default GeometryType.TRIANGLES
71
+ */
72
+ mode: GeometryType;
73
+ /**
74
+ * 存放 position, uv, normal, indices 的打包数据
75
+ */
65
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;
87
+ }
88
+ export declare enum GeometryType {
89
+ /**
90
+ * Draw single points.
91
+ */
92
+ POINTS = 0,
93
+ /**
94
+ * Draw lines. Each vertex connects to the one after it.
95
+ */
96
+ LINES = 1,
97
+ /**
98
+ * Draw lines. Each set of two vertices is treated as a separate line segment.
99
+ */
100
+ LINE_LOOP = 2,
101
+ /**
102
+ * Draw a connected group of line segments from the first vertex to the last.
103
+ */
104
+ LINE_STRIP = 3,
105
+ /**
106
+ * Draw triangles. Each set of three vertices creates a separate triangle.
107
+ */
108
+ TRIANGLES = 4,
109
+ /**
110
+ * Draw a connected strip of triangles.
111
+ */
112
+ TRIANGLE_STRIP = 5,
113
+ /**
114
+ * Draw a connected group of triangles. Each vertex connects to the previous and the first vertex in the fan.
115
+ */
116
+ TRIANGLE_FAN = 6
66
117
  }
67
118
  export interface VertexData {
68
119
  vertexCount: number;
69
120
  channels: VertexChannel[];
70
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
+ }
71
133
  export interface VertexChannel {
134
+ semantic: string;
72
135
  offset: number;
73
- format: number;
136
+ format: VertexFormatType;
74
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"
75
149
  }
76
150
  export interface ShaderData extends EffectsObjectData {
77
151
  vertex: string;
@@ -91,3 +165,4 @@ export interface FileSummary {
91
165
  guid: string;
92
166
  assetType: string;
93
167
  }
168
+ export {};
@@ -0,0 +1,77 @@
1
+ export var DataType;
2
+ (function (DataType) {
3
+ DataType["VFXItemData"] = "VFXItemData";
4
+ DataType["EffectComponent"] = "EffectComponent";
5
+ DataType["Material"] = "Material";
6
+ DataType["Shader"] = "Shader";
7
+ DataType["SpriteComponent"] = "SpriteComponent";
8
+ DataType["ParticleSystem"] = "ParticleSystem";
9
+ DataType["InteractComponent"] = "InteractComponent";
10
+ DataType["CameraController"] = "CameraController";
11
+ DataType["Geometry"] = "Geometry";
12
+ DataType["Texture"] = "Texture";
13
+ DataType["AnimationClip"] = "AnimationClip";
14
+ DataType["TextComponent"] = "TextComponent";
15
+ // FIXME: 先完成ECS的场景转换,后面移到spec中
16
+ DataType["MeshComponent"] = "MeshComponent";
17
+ DataType["SkyboxComponent"] = "SkyboxComponent";
18
+ DataType["LightComponent"] = "LightComponent";
19
+ DataType["CameraComponent"] = "CameraComponent";
20
+ DataType["ModelPluginComponent"] = "ModelPluginComponent";
21
+ DataType["TreeComponent"] = "TreeComponent";
22
+ })(DataType || (DataType = {}));
23
+ export var GeometryType;
24
+ (function (GeometryType) {
25
+ /**
26
+ * Draw single points.
27
+ */
28
+ GeometryType[GeometryType["POINTS"] = 0] = "POINTS";
29
+ /**
30
+ * Draw lines. Each vertex connects to the one after it.
31
+ */
32
+ GeometryType[GeometryType["LINES"] = 1] = "LINES";
33
+ /**
34
+ * Draw lines. Each set of two vertices is treated as a separate line segment.
35
+ */
36
+ GeometryType[GeometryType["LINE_LOOP"] = 2] = "LINE_LOOP";
37
+ /**
38
+ * Draw a connected group of line segments from the first vertex to the last.
39
+ */
40
+ GeometryType[GeometryType["LINE_STRIP"] = 3] = "LINE_STRIP";
41
+ /**
42
+ * Draw triangles. Each set of three vertices creates a separate triangle.
43
+ */
44
+ GeometryType[GeometryType["TRIANGLES"] = 4] = "TRIANGLES";
45
+ /**
46
+ * Draw a connected strip of triangles.
47
+ */
48
+ GeometryType[GeometryType["TRIANGLE_STRIP"] = 5] = "TRIANGLE_STRIP";
49
+ /**
50
+ * Draw a connected group of triangles. Each vertex connects to the previous and the first vertex in the fan.
51
+ */
52
+ GeometryType[GeometryType["TRIANGLE_FAN"] = 6] = "TRIANGLE_FAN";
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 = {}));
@@ -4,11 +4,11 @@ export declare enum CameraClipMode {
4
4
  /**
5
5
  * 剪裁上下
6
6
  */
7
- portrait,
7
+ portrait = 1,
8
8
  /**
9
9
  * 剪裁左右
10
10
  */
11
- landscape
11
+ landscape = 0
12
12
  }
13
13
  /**
14
14
  * 相机属性
@@ -48,27 +48,27 @@ export declare enum CompositionEndBehavior {
48
48
  /**
49
49
  * 销毁
50
50
  */
51
- destroy,
51
+ destroy = 0,
52
52
  /**
53
53
  * 暂停
54
54
  */
55
- pause,
55
+ pause = 1,
56
56
  /**
57
57
  * 重播
58
58
  */
59
- restart,
59
+ restart = 5,
60
60
  /**
61
61
  * 无限播放
62
62
  */
63
- forward,
63
+ forward = 2,
64
64
  /**
65
65
  * 销毁并保留最后一帧
66
66
  */
67
- pause_destroy,
67
+ pause_destroy = 3,
68
68
  /**
69
69
  * 冻结
70
70
  */
71
- freeze
71
+ freeze = 4
72
72
  }
73
73
  /**
74
74
  * 合成信息
@@ -0,0 +1,42 @@
1
+ import { CAMERA_CLIP_MODE_NORMAL, CAMERA_CLIP_MODE_VERTICAL, END_BEHAVIOR_DESTROY, END_BEHAVIOR_FORWARD, END_BEHAVIOR_FREEZE, END_BEHAVIOR_PAUSE, END_BEHAVIOR_PAUSE_AND_DESTROY, END_BEHAVIOR_RESTART, } from './constants';
2
+ export var CameraClipMode;
3
+ (function (CameraClipMode) {
4
+ /**
5
+ * 剪裁上下
6
+ */
7
+ CameraClipMode[CameraClipMode["portrait"] = 1] = "portrait";
8
+ /**
9
+ * 剪裁左右
10
+ */
11
+ CameraClipMode[CameraClipMode["landscape"] = 0] = "landscape";
12
+ })(CameraClipMode || (CameraClipMode = {}));
13
+ /**
14
+ * 结束行为
15
+ */
16
+ export var CompositionEndBehavior;
17
+ (function (CompositionEndBehavior) {
18
+ /**
19
+ * 销毁
20
+ */
21
+ CompositionEndBehavior[CompositionEndBehavior["destroy"] = 0] = "destroy";
22
+ /**
23
+ * 暂停
24
+ */
25
+ CompositionEndBehavior[CompositionEndBehavior["pause"] = 1] = "pause";
26
+ /**
27
+ * 重播
28
+ */
29
+ CompositionEndBehavior[CompositionEndBehavior["restart"] = 5] = "restart";
30
+ /**
31
+ * 无限播放
32
+ */
33
+ CompositionEndBehavior[CompositionEndBehavior["forward"] = 2] = "forward";
34
+ /**
35
+ * 销毁并保留最后一帧
36
+ */
37
+ CompositionEndBehavior[CompositionEndBehavior["pause_destroy"] = 3] = "pause_destroy";
38
+ /**
39
+ * 冻结
40
+ */
41
+ CompositionEndBehavior[CompositionEndBehavior["freeze"] = 4] = "freeze";
42
+ })(CompositionEndBehavior || (CompositionEndBehavior = {}));
@@ -0,0 +1,11 @@
1
+ export const END_BEHAVIOR_DESTROY = 0;
2
+ export const END_BEHAVIOR_PAUSE = 1;
3
+ export const END_BEHAVIOR_FORWARD = 2;
4
+ export const END_BEHAVIOR_PAUSE_AND_DESTROY = 3;
5
+ export const END_BEHAVIOR_FREEZE = 4;
6
+ export const END_BEHAVIOR_RESTART = 5;
7
+ export const END_BEHAVIOR_DESTROY_CHILDREN = 6;
8
+ export const CAMERA_CLIP_MODE_VERTICAL = 1;
9
+ export const CAMERA_CLIP_MODE_NORMAL = 0;
10
+ export const MESSAGE_ITEM_PHRASE_BEGIN = 2;
11
+ export const MESSAGE_ITEM_PHRASE_END = 1;
@@ -1,12 +1,15 @@
1
1
  import type { RenderLevel } from './type';
2
- import type { StringTemplate } from './text';
3
2
  import type { BinaryPointer } from './binary';
3
+ import type { DataType } from './components';
4
4
  export interface TextureFormatOptions {
5
5
  format?: GLenum;
6
6
  internalFormat?: GLenum;
7
7
  type?: GLenum;
8
8
  }
9
9
  export interface TextureConfigOptionsBase {
10
+ generateMipmap?: boolean;
11
+ id?: string;
12
+ dataType?: DataType.Texture;
10
13
  name?: string;
11
14
  wrapS?: GLenum;
12
15
  wrapT?: GLenum;
@@ -41,29 +44,23 @@ export type SerializedTexture2D = SerializedTexture2DImageSource | SerializedTex
41
44
  export type SerializedTextureSource = SerializedTexture2D | SerializedTextureCube;
42
45
  export type TextureJSONOptions = SerializedTextureSource;
43
46
  export type TextureDefine = TextureJSONOptions;
44
- export interface TemplateContentBase {
45
- x?: number;
46
- y?: number;
47
+ /**
48
+ * 动态换图类型
49
+ * @since 1.1.0
50
+ */
51
+ export declare enum BackgroundType {
52
+ video = "video",
53
+ image = "image"
54
+ }
55
+ export interface TemplateContent {
47
56
  variables: Record<string, number | string>;
48
57
  /**
49
- * 当template宽高和image不相同时,会对template进行缩放,使其和image相同。
58
+ * 当 template 宽高和 image 不相同时,会对 template 进行缩放,使其和 image 相同。
50
59
  */
51
60
  width: number;
52
61
  height: number;
53
- }
54
- export interface TemplateContentV1 extends TemplateContentBase {
55
- /**
56
- * 贴图属性,svg 字段
57
- */
58
- content: string;
59
- asImage?: boolean;
60
- backgroundWidth: number;
61
- backgroundHeight: number;
62
- }
63
- export interface TemplateContentV2 extends TemplateContentBase {
64
- v: 2;
65
- content?: StringTemplate;
66
62
  background?: {
63
+ type: BackgroundType;
67
64
  name: string;
68
65
  url: string;
69
66
  };
@@ -72,6 +69,7 @@ export interface TemplateContentV2 extends TemplateContentBase {
72
69
  * 纹理贴图属性
73
70
  */
74
71
  export interface Image {
72
+ id: string;
75
73
  /**
76
74
  * 纹理贴图地址
77
75
  */
@@ -103,7 +101,7 @@ export interface Image {
103
101
  * 模板贴图属性
104
102
  */
105
103
  export interface TemplateImage extends Image {
106
- template: TemplateContentV1 | TemplateContentV2;
104
+ template: TemplateContent;
107
105
  }
108
106
  /**
109
107
  * 压缩贴图属性
@@ -117,7 +115,3 @@ export interface CompressedImage extends Image {
117
115
  pvrtc?: string;
118
116
  };
119
117
  }
120
- export interface VideoImage extends Image {
121
- type: 'video';
122
- loop?: boolean;
123
- }
package/es/image.js ADDED
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 动态换图类型
3
+ * @since 1.1.0
4
+ */
5
+ export var BackgroundType;
6
+ (function (BackgroundType) {
7
+ BackgroundType["video"] = "video";
8
+ BackgroundType["image"] = "image";
9
+ })(BackgroundType || (BackgroundType = {}));
@@ -1,4 +1,3 @@
1
- export * from 'uuid/dist/esm-browser/v4';
2
1
  export * from './type';
3
2
  export * from './composition';
4
3
  export * from './image';
@@ -16,10 +15,13 @@ export * from './item/particle-shape';
16
15
  export * from './item/plugin-item';
17
16
  export * from './item/sprite-item';
18
17
  export * from './item/spine-item';
19
- export * from './item/filter-item';
18
+ export * from './item/effect-item';
20
19
  export * from './item/text-item';
21
20
  export * from './item/model';
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';
25
26
  export * from './vfx-item-data';
27
+ export * from './buitin-object-guid';
package/es/index.js ADDED
@@ -0,0 +1,27 @@
1
+ export * from './type';
2
+ export * from './composition';
3
+ export * from './image';
4
+ export * from './constants';
5
+ export * from './number-expression';
6
+ export * from './scene';
7
+ export * from './item';
8
+ export * from './item/base-item';
9
+ export * from './item/camera-item';
10
+ export * from './item/composition-item';
11
+ export * from './item/interact-item';
12
+ export * from './item/null-item';
13
+ export * from './item/particle-item';
14
+ export * from './item/particle-shape';
15
+ export * from './item/plugin-item';
16
+ export * from './item/sprite-item';
17
+ export * from './item/spine-item';
18
+ export * from './item/effect-item';
19
+ export * from './item/text-item';
20
+ export * from './item/model';
21
+ export * from './vfx-item-data';
22
+ export * from './animation-clip-data';
23
+ export * from './binary';
24
+ export * from './text';
25
+ export * from './components';
26
+ export * from './vfx-item-data';
27
+ export * from './buitin-object-guid';
@@ -1,21 +1,24 @@
1
- import type { FilterContent } from './filter-item';
1
+ import type { BinaryEnv } from '../binary';
2
2
  import type { vec3, vec4 } from '../number-expression';
3
3
  import type { ItemType, RenderLevel } from '../type';
4
4
  import type { CameraContent } from './camera-item';
5
5
  import type { CompositionContent } from './composition-item';
6
+ import type { EffectContent } from './effect-item';
6
7
  import type { InteractContent } from './interact-item';
8
+ import type { ModelLightContent, ModelMeshItemContent, ModelTreeContent, SkyboxContent } from './model';
7
9
  import type { NullContent } from './null-item';
8
10
  import type { ParticleContent } from './particle-item';
9
11
  import type { PluginContent } from './plugin-item';
12
+ import type { SpineContent } from './spine-item';
10
13
  import type { SpriteContent } from './sprite-item';
11
14
  import type { TextContent } from './text-item';
12
15
  export declare enum ItemEndBehavior {
13
- destroy,
14
- loop,
15
- freeze
16
+ destroy = 0,
17
+ loop = 5,
18
+ freeze = 4
16
19
  }
17
20
  export declare enum ParentItemEndBehavior {
18
- destroyChildren
21
+ destroyChildren = 6
19
22
  }
20
23
  export interface BaseItem {
21
24
  /**
@@ -123,4 +126,4 @@ export interface TransformData {
123
126
  size?: Vector2Data;
124
127
  anchor?: Vector2Data;
125
128
  }
126
- export type BaseContent = SpriteContent | ParticleContent | NullContent | InteractContent | PluginContent | CompositionContent | CameraContent | FilterContent | TextContent | any;
129
+ export type BaseContent = SpriteContent | ParticleContent | NullContent | InteractContent | PluginContent | CompositionContent | CameraContent | TextContent | SpineContent | EffectContent | ModelTreeContent<BinaryEnv> | ModelMeshItemContent<BinaryEnv> | ModelLightContent | SkyboxContent<BinaryEnv> | any;
@@ -0,0 +1,11 @@
1
+ import { END_BEHAVIOR_DESTROY, END_BEHAVIOR_DESTROY_CHILDREN, END_BEHAVIOR_FREEZE, END_BEHAVIOR_RESTART, } from '../constants';
2
+ export var ItemEndBehavior;
3
+ (function (ItemEndBehavior) {
4
+ ItemEndBehavior[ItemEndBehavior["destroy"] = 0] = "destroy";
5
+ ItemEndBehavior[ItemEndBehavior["loop"] = 5] = "loop";
6
+ ItemEndBehavior[ItemEndBehavior["freeze"] = 4] = "freeze";
7
+ })(ItemEndBehavior || (ItemEndBehavior = {}));
8
+ export var ParentItemEndBehavior;
9
+ (function (ParentItemEndBehavior) {
10
+ ParentItemEndBehavior[ParentItemEndBehavior["destroyChildren"] = 6] = "destroyChildren";
11
+ })(ParentItemEndBehavior || (ParentItemEndBehavior = {}));
@@ -35,7 +35,7 @@ export interface CameraContent {
35
35
  */
36
36
  clipMode?: CameraClipMode;
37
37
  /**
38
- * 默认不提供,等于canvas width/height
38
+ * 默认不提供,等于 canvas width/height
39
39
  */
40
40
  aspect?: number;
41
41
  };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,35 @@
1
+ import type { ItemType, PositionOverLifetime, RotationOverLifetime, SizeOverLifetime } from '../type';
2
+ import type { BaseItem, ItemEndBehavior } from './base-item';
3
+ /**
4
+ * 特效元素
5
+ */
6
+ export interface EffectItem extends BaseItem {
7
+ type: ItemType.effect;
8
+ content: EffectContent;
9
+ endBehavior: ItemEndBehavior;
10
+ }
11
+ /**
12
+ * 特效元素属性
13
+ */
14
+ export interface EffectContent {
15
+ /**
16
+ * 特效元素材质数据索引组
17
+ */
18
+ materials: number[];
19
+ /**
20
+ * 特效元素几何数据索引
21
+ */
22
+ geometry: number;
23
+ /**
24
+ * 特效元素大小变化属性
25
+ */
26
+ sizeOverLifetime?: SizeOverLifetime;
27
+ /**
28
+ * 特效元素旋转变化属性
29
+ */
30
+ rotationOverLifetime?: RotationOverLifetime;
31
+ /**
32
+ * 特效元素位置变化属性
33
+ */
34
+ positionOverLifetime?: PositionOverLifetime;
35
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};