@galacean/effects-specification 2.0.0-alpha.9 → 2.0.0-beta.0

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 (101) 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 +4 -2
  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 +80 -4
  9. package/es/components.js +129 -0
  10. package/{dist/src → es}/composition.d.ts +28 -70
  11. package/es/composition.js +12 -0
  12. package/{dist/src → es}/constants.d.ts +23 -0
  13. package/es/constants.js +34 -0
  14. package/{dist/src → es}/image.d.ts +13 -6
  15. package/es/image.js +9 -0
  16. package/{dist/src → es}/index.d.ts +2 -1
  17. package/es/index.js +28 -0
  18. package/{dist/src → es}/item/base-item.d.ts +27 -7
  19. package/es/item/base-item.js +27 -0
  20. package/{dist/src → es}/item/camera-item.d.ts +5 -5
  21. package/es/item/camera-item.js +1 -0
  22. package/{dist/src → es}/item/composition-item.d.ts +4 -4
  23. package/es/item/composition-item.js +1 -0
  24. package/{dist/src → es}/item/effect-item.d.ts +2 -2
  25. package/es/item/effect-item.js +1 -0
  26. package/{dist/src → es}/item/interact-item.d.ts +3 -3
  27. package/es/item/interact-item.js +1 -0
  28. package/es/item/model/binary.js +1 -0
  29. package/{dist/src → es}/item/model/camera.d.ts +2 -2
  30. package/es/item/model/camera.js +5 -0
  31. package/es/item/model/index.js +35 -0
  32. package/{dist/src → es}/item/model/light.d.ts +2 -2
  33. package/es/item/model/light.js +19 -0
  34. package/{dist/src → es}/item/model/material.d.ts +3 -3
  35. package/es/item/model/material.js +16 -0
  36. package/{dist/src → es}/item/model/mesh.d.ts +6 -5
  37. package/es/item/model/mesh.js +5 -0
  38. package/es/item/model/render.js +42 -0
  39. package/{dist/src → es}/item/model/skybox.d.ts +9 -3
  40. package/es/item/model/skybox.js +1 -0
  41. package/{dist/src → es}/item/model/tree.d.ts +10 -0
  42. package/es/item/model/tree.js +1 -0
  43. package/es/item/null-item.d.ts +46 -0
  44. package/es/item/null-item.js +1 -0
  45. package/{dist/src → es}/item/particle-item.d.ts +20 -20
  46. package/es/item/particle-item.js +14 -0
  47. package/es/item/particle-shape.js +19 -0
  48. package/{dist/src → es}/item/plugin-item.d.ts +3 -3
  49. package/es/item/plugin-item.js +1 -0
  50. package/{dist/src → es}/item/spine-item.d.ts +44 -20
  51. package/es/item/spine-item.js +1 -0
  52. package/{dist/src → es}/item/sprite-item.d.ts +3 -3
  53. package/es/item/sprite-item.js +1 -0
  54. package/{dist/src → es}/item/text-item.d.ts +3 -3
  55. package/es/item/text-item.js +1 -0
  56. package/{dist/src → es}/item.d.ts +1 -3
  57. package/es/item.js +1 -0
  58. package/{dist/src → es}/number-expression.d.ts +21 -8
  59. package/es/number-expression.js +91 -0
  60. package/{dist/src → es}/scene.d.ts +15 -13
  61. package/es/scene.js +1 -0
  62. package/{dist/src → es}/text.d.ts +3 -49
  63. package/es/text.js +84 -0
  64. package/es/timeline/index.d.ts +5 -0
  65. package/es/timeline/index.js +5 -0
  66. package/es/timeline/playables/sprite-color-playable-asset-data.d.ts +8 -0
  67. package/es/timeline/playables/sprite-color-playable-asset-data.js +1 -0
  68. package/es/timeline/playables/transform-playable-asset-data.d.ts +17 -0
  69. package/es/timeline/playables/transform-playable-asset-data.js +1 -0
  70. package/es/timeline/timeline-asset-data.d.ts +8 -0
  71. package/es/timeline/timeline-asset-data.js +1 -0
  72. package/es/timeline/timeline-clip-data.d.ts +11 -0
  73. package/es/timeline/timeline-clip-data.js +1 -0
  74. package/es/timeline/track/track-asset-data.d.ts +9 -0
  75. package/es/timeline/track/track-asset-data.js +1 -0
  76. package/{dist/src → es}/type.d.ts +25 -12
  77. package/es/type.js +342 -0
  78. package/{dist/src → es}/vfx-item-data.d.ts +8 -9
  79. package/es/vfx-item-data.js +1 -0
  80. package/package.json +27 -48
  81. package/dist/fallback/camera.d.ts +0 -2
  82. package/dist/fallback/index.d.ts +0 -12
  83. package/dist/fallback/interact.d.ts +0 -2
  84. package/dist/fallback/migration.d.ts +0 -18
  85. package/dist/fallback/particle.d.ts +0 -2
  86. package/dist/fallback/sprite.d.ts +0 -3
  87. package/dist/fallback/utils.d.ts +0 -37
  88. package/dist/fallback.js +0 -2237
  89. package/dist/fallback.js.map +0 -1
  90. package/dist/fallback.mjs +0 -2208
  91. package/dist/fallback.mjs.map +0 -1
  92. package/dist/index.js +0 -802
  93. package/dist/index.js.map +0 -1
  94. package/dist/index.mjs +0 -787
  95. package/dist/index.mjs.map +0 -1
  96. package/dist/src/buitin-object-guid.d.ts +0 -5
  97. package/dist/src/item/null-item.d.ts +0 -94
  98. /package/{dist/src → es}/item/model/binary.d.ts +0 -0
  99. /package/{dist/src → es}/item/model/index.d.ts +0 -0
  100. /package/{dist/src → es}/item/model/render.d.ts +0 -0
  101. /package/{dist/src → es}/item/particle-shape.d.ts +0 -0
@@ -1,20 +1,40 @@
1
+ import type { BinaryEnv } from '../binary';
1
2
  import type { vec3, vec4 } from '../number-expression';
2
3
  import type { ItemType, RenderLevel } from '../type';
3
4
  import type { CameraContent } from './camera-item';
4
5
  import type { CompositionContent } from './composition-item';
6
+ import type { EffectContent } from './effect-item';
5
7
  import type { InteractContent } from './interact-item';
8
+ import type { ModelLightContent, ModelMeshItemContent, ModelTreeContent, SkyboxContent } from './model';
6
9
  import type { NullContent } from './null-item';
7
10
  import type { ParticleContent } from './particle-item';
8
11
  import type { PluginContent } from './plugin-item';
12
+ import type { SpineContent } from './spine-item';
9
13
  import type { SpriteContent } from './sprite-item';
10
14
  import type { TextContent } from './text-item';
11
- export declare enum ItemEndBehavior {
12
- destroy,
13
- loop,
14
- freeze
15
+ /**
16
+ * 结束行为
17
+ */
18
+ export declare enum EndBehavior {
19
+ /**
20
+ * 销毁
21
+ */
22
+ destroy = 0,
23
+ /**
24
+ * 重播
25
+ */
26
+ restart = 5,
27
+ /**
28
+ * 无限播放
29
+ */
30
+ forward = 2,
31
+ /**
32
+ * 冻结
33
+ */
34
+ freeze = 4
15
35
  }
16
36
  export declare enum ParentItemEndBehavior {
17
- destroyChildren
37
+ destroyChildren = 6
18
38
  }
19
39
  export interface BaseItem {
20
40
  /**
@@ -53,7 +73,7 @@ export interface BaseItem {
53
73
  * 元素结束行为
54
74
  * @default destroy
55
75
  */
56
- endBehavior: ItemEndBehavior | ParentItemEndBehavior;
76
+ endBehavior: EndBehavior | ParentItemEndBehavior;
57
77
  /**
58
78
  * 元素播放延时(单位秒)
59
79
  * @default 0
@@ -122,4 +142,4 @@ export interface TransformData {
122
142
  size?: Vector2Data;
123
143
  anchor?: Vector2Data;
124
144
  }
125
- export type BaseContent = SpriteContent | ParticleContent | NullContent | InteractContent | PluginContent | CompositionContent | CameraContent | TextContent | any;
145
+ export type BaseContent = SpriteContent | ParticleContent | NullContent | InteractContent | PluginContent | CompositionContent | CameraContent | TextContent | SpineContent | EffectContent | ModelTreeContent<BinaryEnv> | ModelMeshItemContent<BinaryEnv> | ModelLightContent | SkyboxContent<BinaryEnv> | any;
@@ -0,0 +1,27 @@
1
+ import { END_BEHAVIOR_DESTROY, END_BEHAVIOR_DESTROY_CHILDREN, END_BEHAVIOR_FORWARD, END_BEHAVIOR_FREEZE, END_BEHAVIOR_RESTART, } from '../constants';
2
+ /**
3
+ * 结束行为
4
+ */
5
+ export var EndBehavior;
6
+ (function (EndBehavior) {
7
+ /**
8
+ * 销毁
9
+ */
10
+ EndBehavior[EndBehavior["destroy"] = 0] = "destroy";
11
+ /**
12
+ * 重播
13
+ */
14
+ EndBehavior[EndBehavior["restart"] = 5] = "restart";
15
+ /**
16
+ * 无限播放
17
+ */
18
+ EndBehavior[EndBehavior["forward"] = 2] = "forward";
19
+ /**
20
+ * 冻结
21
+ */
22
+ EndBehavior[EndBehavior["freeze"] = 4] = "freeze";
23
+ })(EndBehavior || (EndBehavior = {}));
24
+ export var ParentItemEndBehavior;
25
+ (function (ParentItemEndBehavior) {
26
+ ParentItemEndBehavior[ParentItemEndBehavior["destroyChildren"] = 6] = "destroyChildren";
27
+ })(ParentItemEndBehavior || (ParentItemEndBehavior = {}));
@@ -1,4 +1,4 @@
1
- import type { BaseItem, ItemEndBehavior } from './base-item';
1
+ import type { BaseItem, EndBehavior } from './base-item';
2
2
  import type { ItemType, RotationOverLifetime } from '../type';
3
3
  import type { FixedNumberExpression, FixedVec3Expression } from '../number-expression';
4
4
  import type { CameraClipMode } from '../composition';
@@ -11,7 +11,7 @@ export interface CameraItem extends BaseItem {
11
11
  * 相机元素渲染信息
12
12
  */
13
13
  content: CameraContent;
14
- endBehavior: ItemEndBehavior;
14
+ endBehavior: EndBehavior;
15
15
  }
16
16
  export interface CameraContent {
17
17
  /**
@@ -50,15 +50,15 @@ export interface CameraContent {
50
50
  }
51
51
  export interface CameraPositionOverLifetime {
52
52
  /**
53
- * x轴位置变化信息
53
+ * x 轴位置变化信息
54
54
  */
55
55
  linearX?: FixedNumberExpression;
56
56
  /**
57
- * y轴位置变化信息
57
+ * y 轴位置变化信息
58
58
  */
59
59
  linearY?: FixedNumberExpression;
60
60
  /**
61
- * z轴位置变化信息
61
+ * z 轴位置变化信息
62
62
  */
63
63
  linearZ?: FixedNumberExpression;
64
64
  /**
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,4 @@
1
- import type { BaseItem, ItemEndBehavior } from './base-item';
1
+ import type { BaseItem, EndBehavior } from './base-item';
2
2
  import type { SizeOverLifetime, RotationOverLifetime, ColorOverLifetime, ItemType } from '../type';
3
3
  import type { RGBAColorValue, vec3 } from '../number-expression';
4
4
  import type { PositionOverLifetime } from '../type';
@@ -7,14 +7,14 @@ import type { PositionOverLifetime } from '../type';
7
7
  */
8
8
  export interface CompositionItem extends BaseItem {
9
9
  /**
10
- * 元素类型[指定为composition]
10
+ * 元素类型(指定为 composition
11
11
  */
12
12
  type: ItemType.composition;
13
13
  /**
14
14
  * 预合成元素渲染信息
15
15
  */
16
16
  content: CompositionContent;
17
- endBehavior: ItemEndBehavior;
17
+ endBehavior: EndBehavior;
18
18
  }
19
19
  /**
20
20
  * 预合成元素
@@ -25,7 +25,7 @@ export interface CompositionContent {
25
25
  */
26
26
  options: {
27
27
  /**
28
- * 引用的合成id
28
+ * 引用的合成 ID
29
29
  */
30
30
  refId: string;
31
31
  /**
@@ -0,0 +1 @@
1
+ export {};
@@ -1,12 +1,12 @@
1
1
  import type { ItemType, PositionOverLifetime, RotationOverLifetime, SizeOverLifetime } from '../type';
2
- import type { BaseItem, ItemEndBehavior } from './base-item';
2
+ import type { BaseItem, EndBehavior } from './base-item';
3
3
  /**
4
4
  * 特效元素
5
5
  */
6
6
  export interface EffectItem extends BaseItem {
7
7
  type: ItemType.effect;
8
8
  content: EffectContent;
9
- endBehavior: ItemEndBehavior;
9
+ endBehavior: EndBehavior;
10
10
  }
11
11
  /**
12
12
  * 特效元素属性
@@ -0,0 +1 @@
1
+ export {};
@@ -1,20 +1,20 @@
1
1
  import type { InteractBehavior, InteractType, ItemType } from '../type';
2
2
  import type { RGBAColor } from '../number-expression';
3
- import type { BaseItem, ItemEndBehavior } from './base-item';
3
+ import type { BaseItem, EndBehavior } from './base-item';
4
4
  import type { ComponentData } from '../components';
5
5
  /**
6
6
  * 交互元素
7
7
  */
8
8
  export interface InteractItem extends BaseItem {
9
9
  /**
10
- * 元素类型[指定为interact]
10
+ * 元素类型(指定为 interact
11
11
  */
12
12
  type: ItemType.interact;
13
13
  /**
14
14
  * 交互元素渲染信息
15
15
  */
16
16
  content: InteractContent;
17
- endBehavior: ItemEndBehavior;
17
+ endBehavior: EndBehavior;
18
18
  }
19
19
  /**
20
20
  * 交互元素渲染属性
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,4 @@
1
- import type { BaseItem, ItemEndBehavior } from '../base-item';
1
+ import type { BaseItem, EndBehavior } from '../base-item';
2
2
  import type { CameraClipMode, CameraOptions } from '../../composition';
3
3
  import type { RotationOverLifetime, PositionOverLifetime } from '../../type';
4
4
  import type { ComponentData } from '../../components';
@@ -30,7 +30,7 @@ export interface ModelCameraItem extends BaseItem {
30
30
  type: 'camera';
31
31
  pluginName: 'model';
32
32
  content: ModelCameraContent;
33
- endBehavior: ItemEndBehavior;
33
+ endBehavior: EndBehavior;
34
34
  }
35
35
  export declare enum CameraType {
36
36
  orthographic = "orthographic",
@@ -0,0 +1,5 @@
1
+ export var CameraType;
2
+ (function (CameraType) {
3
+ CameraType["orthographic"] = "orthographic";
4
+ CameraType["perspective"] = "perspective";
5
+ })(CameraType || (CameraType = {}));
@@ -0,0 +1,35 @@
1
+ export * from './skybox';
2
+ export * from './light';
3
+ export * from './mesh';
4
+ export * from './tree';
5
+ export * from './camera';
6
+ export * from './material';
7
+ export * from './binary';
8
+ export * from './render';
9
+ /***
10
+ * 一个 meshItem 打包出来的 json 案例:
11
+ *
12
+ * {
13
+ * type:'mesh',
14
+ * pluginName:'model',
15
+ * content:{
16
+ * options:{
17
+ * skins:{},
18
+ * primitives:[
19
+ * {
20
+ * material:{
21
+ * baseColorFactor:[0,0.5,1,1],
22
+ * baseColorTexture: {
23
+ * magFilter:33071,
24
+ * imageFileId:[0,556,1342]
25
+ * }
26
+ * },
27
+ * geometry:[0,0,556]
28
+ * }
29
+ * ]
30
+ * }
31
+ *
32
+ * }
33
+ * }
34
+ * bins:[{url:'https://to/some/bin'}]
35
+ */
@@ -1,5 +1,5 @@
1
1
  import type { RGBAColorValue } from '../../number-expression';
2
- import type { BaseItem, ItemEndBehavior } from '../base-item';
2
+ import type { BaseItem, EndBehavior } from '../base-item';
3
3
  import type { RotationOverLifetime, PositionOverLifetime, ItemType } from '../../type';
4
4
  import type { ColorData, ComponentData } from '../../components';
5
5
  export interface ModelLightBaseOptions {
@@ -69,7 +69,7 @@ export interface ModelLightItem extends BaseItem {
69
69
  type: ItemType.light;
70
70
  pluginName: 'model';
71
71
  content: ModelLightContent;
72
- endBehavior: ItemEndBehavior;
72
+ endBehavior: EndBehavior;
73
73
  }
74
74
  export declare enum LightType {
75
75
  /**
@@ -0,0 +1,19 @@
1
+ export var LightType;
2
+ (function (LightType) {
3
+ /**
4
+ * 点光源
5
+ */
6
+ LightType["point"] = "point";
7
+ /**
8
+ * 聚光灯
9
+ */
10
+ LightType["spot"] = "spot";
11
+ /**
12
+ * 方向光
13
+ */
14
+ LightType["directional"] = "directional";
15
+ /**
16
+ * 环境光
17
+ */
18
+ LightType["ambient"] = "ambient";
19
+ })(LightType || (LightType = {}));
@@ -13,9 +13,9 @@ export declare enum MaterialType {
13
13
  hair = "hair"
14
14
  }
15
15
  export declare enum MaterialBlending {
16
- opaque = 100,
17
- masked = 101,
18
- translucent = 102,
16
+ opaque = 100,// 不透明
17
+ masked = 101,// 遮罩
18
+ translucent = 102,// 半透明
19
19
  additive = 103
20
20
  }
21
21
  export type MaterialOptions<T extends BinaryEnv> = MaterialUnlitOptions<T> | MaterialPBROptions<T>;
@@ -0,0 +1,16 @@
1
+ // 材质类型
2
+ export var MaterialType;
3
+ (function (MaterialType) {
4
+ MaterialType["unlit"] = "unlit";
5
+ MaterialType["pbr"] = "pbr";
6
+ // 头发材质,在 pbr 材质基础上扩展
7
+ MaterialType["hair"] = "hair";
8
+ })(MaterialType || (MaterialType = {}));
9
+ // 混合模式
10
+ export var MaterialBlending;
11
+ (function (MaterialBlending) {
12
+ MaterialBlending[MaterialBlending["opaque"] = 100] = "opaque";
13
+ MaterialBlending[MaterialBlending["masked"] = 101] = "masked";
14
+ MaterialBlending[MaterialBlending["translucent"] = 102] = "translucent";
15
+ MaterialBlending[MaterialBlending["additive"] = 103] = "additive";
16
+ })(MaterialBlending || (MaterialBlending = {}));
@@ -1,5 +1,5 @@
1
1
  import type { BinaryEnv } from '../../binary';
2
- import type { BaseItem, ItemEndBehavior } from '../base-item';
2
+ import type { BaseItem, EndBehavior } from '../base-item';
3
3
  import type { MaterialOptions } from './material';
4
4
  import type { GeometryPointer } from './binary';
5
5
  import type { vec3 } from '../../number-expression';
@@ -66,7 +66,7 @@ export interface ModelMeshItem<T extends BinaryEnv> extends BaseItem {
66
66
  type: ItemType.mesh;
67
67
  pluginName: 'model';
68
68
  content: ModelMeshItemContent<T>;
69
- endBehavior: ItemEndBehavior;
69
+ endBehavior: EndBehavior;
70
70
  }
71
71
  export interface PrimitiveData {
72
72
  geometry: DataPath;
@@ -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
  }
@@ -0,0 +1,5 @@
1
+ export var ModelBoundingType;
2
+ (function (ModelBoundingType) {
3
+ ModelBoundingType[ModelBoundingType["box"] = 2] = "box";
4
+ ModelBoundingType[ModelBoundingType["sphere"] = 3] = "sphere";
5
+ })(ModelBoundingType || (ModelBoundingType = {}));
@@ -0,0 +1,42 @@
1
+ /**
2
+ * 3D渲染模式:将渲染过程中的中间结果输出,主要用于排查渲染效果问题,支持 pbr 和 unlit 材质
3
+ */
4
+ export var RenderMode3D;
5
+ (function (RenderMode3D) {
6
+ /**
7
+ * 正常渲染
8
+ */
9
+ RenderMode3D["none"] = "none";
10
+ /**
11
+ * 纹理坐标
12
+ */
13
+ RenderMode3D["uv"] = "uv";
14
+ /**
15
+ * 世界坐标法线
16
+ */
17
+ RenderMode3D["normal"] = "normal";
18
+ /**
19
+ * 基础颜色
20
+ */
21
+ RenderMode3D["basecolor"] = "basecolor";
22
+ /**
23
+ * 基础颜色 Alpha
24
+ */
25
+ RenderMode3D["alpha"] = "alpha";
26
+ /**
27
+ * 金属度
28
+ */
29
+ RenderMode3D["metallic"] = "metallic";
30
+ /**
31
+ * 粗超度
32
+ */
33
+ RenderMode3D["roughness"] = "roughness";
34
+ /**
35
+ * 环境遮蔽
36
+ */
37
+ RenderMode3D["ao"] = "ao";
38
+ /**
39
+ * 自发光
40
+ */
41
+ RenderMode3D["emissive"] = "emissive";
42
+ })(RenderMode3D || (RenderMode3D = {}));
@@ -1,9 +1,15 @@
1
- import type { BaseItem, ItemEndBehavior } from '../base-item';
1
+ import type { BaseItem, EndBehavior } from '../base-item';
2
2
  import type { BinaryEnv } from '../../binary';
3
3
  import type { SkyboxCubeTexturePointer } from './binary';
4
4
  import type { ItemType } from '../../type';
5
- import type { ComponentData, DataPath } from '../../components';
5
+ import type { ComponentData, DataPath, Vector4Data } from '../../components';
6
6
  export interface SkyboxOptions<T extends BinaryEnv> {
7
+ /**
8
+ * 环境光旋转
9
+ * UI显示"环境光旋转"
10
+ * @default { x: 0, y: 0, z: 0, w: 0 }
11
+ */
12
+ rotation: Vector4Data;
7
13
  renderable: boolean;
8
14
  intensity: number;
9
15
  reflectionsIntensity: number;
@@ -23,7 +29,7 @@ export interface ModelSkyboxItem<T extends BinaryEnv> extends BaseItem {
23
29
  type: ItemType.skybox;
24
30
  pluginName: 'model';
25
31
  content: SkyboxContent<T>;
26
- endBehavior: ItemEndBehavior;
32
+ endBehavior: EndBehavior;
27
33
  }
28
34
  /**
29
35
  * 一个 skybox 打包出来:
@@ -0,0 +1 @@
1
+ export {};
@@ -85,3 +85,13 @@ export interface ModelAnimationComponentData extends ComponentData {
85
85
  */
86
86
  animations: ModelAnimationData[];
87
87
  }
88
+ export interface AnimationComponentData extends ComponentData {
89
+ /**
90
+ * 默认动画索引,-1表示不播放动画
91
+ */
92
+ animation?: number;
93
+ /**
94
+ * glTF中所有的动画数据
95
+ */
96
+ animationClips: DataPath[];
97
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,46 @@
1
+ import type { RGBAColorValue } from '../number-expression';
2
+ import type { ColorOverLifetime, ItemType, PositionOverLifetime, RotationOverLifetime, SizeOverLifetime } from '../type';
3
+ import type { BaseItem } from './base-item';
4
+ /**
5
+ * 空节点元素
6
+ */
7
+ export interface NullItem extends BaseItem {
8
+ /**
9
+ * 元素类型(指定为 null)
10
+ */
11
+ type: ItemType.null;
12
+ /**
13
+ * 空节点元素渲染信息
14
+ */
15
+ content: NullContent;
16
+ }
17
+ /**
18
+ * 空节点元素渲染属性
19
+ */
20
+ export interface NullContent {
21
+ /**
22
+ * 空节点元素基础属性
23
+ */
24
+ options: {
25
+ /**
26
+ * 空节点元素基础颜色
27
+ */
28
+ startColor?: RGBAColorValue;
29
+ };
30
+ /**
31
+ * 空节点元素大小变化属性
32
+ */
33
+ sizeOverLifetime?: SizeOverLifetime;
34
+ /**
35
+ * 空节点元素旋转变化属性
36
+ */
37
+ rotationOverLifetime?: RotationOverLifetime;
38
+ /**
39
+ * 空节点元素位置变化属性
40
+ */
41
+ positionOverLifetime?: PositionOverLifetime;
42
+ /**
43
+ * 空节点元素色彩变化属性
44
+ */
45
+ colorOverLifetime?: ColorOverLifetime;
46
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,6 @@
1
1
  import type { ItemType, RendererOptions, TextureSheetAnimation, BlendingMode, SplitParameter } from '../type';
2
2
  import type { FixedNumberExpression, NumberExpression, GradientColor, vec3, FixedVec3Expression, ColorExpression, FunctionExpression } from '../number-expression';
3
- import type { BaseItem, ItemEndBehavior } from './base-item';
3
+ import type { BaseItem, EndBehavior } from './base-item';
4
4
  import type { ParticleShape } from './particle-shape';
5
5
  import type { ComponentData } from '../components';
6
6
  /**
@@ -21,14 +21,14 @@ export declare enum ParticleInteractionBehavior {
21
21
  */
22
22
  export interface ParticleItem extends BaseItem {
23
23
  /**
24
- * 元素类型[指定为particle]
24
+ * 元素类型(指定为 particle
25
25
  */
26
26
  type: ItemType.particle;
27
27
  /**
28
28
  * 粒子元素渲染信息
29
29
  */
30
30
  content: ParticleContent;
31
- endBehavior: ItemEndBehavior;
31
+ endBehavior: EndBehavior;
32
32
  }
33
33
  /**
34
34
  * 发射器参数
@@ -57,7 +57,7 @@ export interface ParticleEmission {
57
57
  */
58
58
  cycles?: number;
59
59
  /**
60
- * 爆发时间间隔,单位秒
60
+ * 爆发时间间隔(单位:秒)
61
61
  * @default 0
62
62
  */
63
63
  interval?: number;
@@ -71,15 +71,15 @@ export interface ParticleEmission {
71
71
  */
72
72
  index: number;
73
73
  /**
74
- * x方向偏移值
74
+ * x 方向偏移值
75
75
  */
76
76
  x: number;
77
77
  /**
78
- * y方向偏移值
78
+ * y 方向偏移值
79
79
  */
80
80
  y: number;
81
81
  /**
82
- * z方向偏移值
82
+ * z 方向偏移值
83
83
  */
84
84
  z: number;
85
85
  }[];
@@ -90,15 +90,15 @@ export interface ParticlePositionOverLifetime {
90
90
  */
91
91
  asMovement?: boolean;
92
92
  /**
93
- * x轴位置变化信息
93
+ * x 轴位置变化信息
94
94
  */
95
95
  linearX?: NumberExpression;
96
96
  /**
97
- * y轴位置变化信息
97
+ * y 轴位置变化信息
98
98
  */
99
99
  linearY?: NumberExpression;
100
100
  /**
101
- * z轴位置变化信息
101
+ * z 轴位置变化信息
102
102
  */
103
103
  linearZ?: NumberExpression;
104
104
  /**
@@ -106,15 +106,15 @@ export interface ParticlePositionOverLifetime {
106
106
  */
107
107
  asRotation?: boolean;
108
108
  /**
109
- * x轴环绕角度变化信息
109
+ * x 轴环绕角度变化信息
110
110
  */
111
111
  orbitalX?: NumberExpression;
112
112
  /**
113
- * y轴环绕角度变化信息
113
+ * y 轴环绕角度变化信息
114
114
  */
115
115
  orbitalY?: NumberExpression;
116
116
  /**
117
- * z轴环绕角度变化信息
117
+ * z 轴环绕角度变化信息
118
118
  */
119
119
  orbitalZ?: NumberExpression;
120
120
  /**
@@ -137,7 +137,7 @@ export interface ParticlePositionOverLifetime {
137
137
  */
138
138
  forceCurve?: FunctionExpression;
139
139
  /**
140
- * 增加一个初速度,匀速直线运动,direction为运动方向
140
+ * 增加一个初速度,匀速直线运动,direction 为运动方向
141
141
  * @default 0
142
142
  */
143
143
  startSpeed?: NumberExpression;
@@ -146,7 +146,7 @@ export interface ParticlePositionOverLifetime {
146
146
  */
147
147
  speedOverLifetime?: FixedNumberExpression;
148
148
  /**
149
- * 增加一个重力,gravity为重力方向,gravityModifier为重力大小
149
+ * 增加一个重力,gravity 为重力方向,gravityModifier 为重力大小
150
150
  * @default 0
151
151
  */
152
152
  gravity?: vec3;
@@ -165,15 +165,15 @@ export interface ParticleRotationOverLifetime {
165
165
  */
166
166
  asRotation?: boolean;
167
167
  /**
168
- * x轴旋转函数
168
+ * x 轴旋转函数
169
169
  */
170
170
  x?: NumberExpression;
171
171
  /**
172
- * y轴旋转函数
172
+ * y 轴旋转函数
173
173
  */
174
174
  y?: NumberExpression;
175
175
  /**
176
- * z轴旋转函数(不分轴时,变化z)
176
+ * z 轴旋转函数(不分轴时,变化 z)
177
177
  */
178
178
  z?: NumberExpression;
179
179
  }
@@ -187,11 +187,11 @@ export interface ParticleSizeOverLifetime {
187
187
  */
188
188
  size?: NumberExpression;
189
189
  /**
190
- * x轴大小变化信息(分轴模式)
190
+ * x 轴大小变化信息(分轴模式)
191
191
  */
192
192
  x?: NumberExpression;
193
193
  /**
194
- * y轴大小变化信息(分轴模式)
194
+ * y 轴大小变化信息(分轴模式)
195
195
  */
196
196
  y?: NumberExpression;
197
197
  }