@galacean/effects-specification 2.1.0-alpha.1 → 2.1.0-alpha.2

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 (51) hide show
  1. package/es/animation-clip-data.d.ts +1 -1
  2. package/es/binary.d.ts +2 -1
  3. package/es/components/component-data.d.ts +7 -0
  4. package/es/components/component-data.js +1 -0
  5. package/es/components/index.d.ts +2 -0
  6. package/es/components/index.js +2 -0
  7. package/es/components/post-process-volume-data.d.ts +12 -0
  8. package/es/components/post-process-volume-data.js +1 -0
  9. package/es/data-type.d.ts +44 -0
  10. package/es/data-type.js +47 -0
  11. package/es/effects-object-data.d.ts +6 -0
  12. package/es/effects-object-data.js +1 -0
  13. package/es/effects-package-data.d.ts +9 -0
  14. package/es/effects-package-data.js +1 -0
  15. package/es/geometry-data.d.ts +114 -0
  16. package/es/{components.js → geometry-data.js} +0 -46
  17. package/es/index.d.ts +8 -0
  18. package/es/index.js +8 -0
  19. package/es/item/base-item.d.ts +3 -10
  20. package/es/item/interact-item.d.ts +1 -5
  21. package/es/item/model/light.d.ts +2 -1
  22. package/es/item/model/skybox.d.ts +4 -11
  23. package/es/item/model/tree.d.ts +12 -12
  24. package/es/item/particle-item.d.ts +1 -66
  25. package/es/item/rich-text-item.d.ts +35 -0
  26. package/es/item/rich-text-item.js +1 -0
  27. package/es/item/spine-item.d.ts +2 -1
  28. package/es/item/sprite-item.d.ts +1 -43
  29. package/es/item/text-item.d.ts +35 -64
  30. package/es/item.d.ts +2 -1
  31. package/es/material-data.d.ts +21 -0
  32. package/es/material-data.js +1 -0
  33. package/es/math/color-data.d.ts +6 -0
  34. package/es/math/color-data.js +1 -0
  35. package/es/math/index.d.ts +2 -0
  36. package/es/math/index.js +2 -0
  37. package/es/math/vector-data.d.ts +15 -0
  38. package/es/math/vector-data.js +1 -0
  39. package/es/scene.d.ts +5 -1
  40. package/es/shader-data.d.ts +6 -0
  41. package/es/shader-data.js +1 -0
  42. package/es/texture.d.ts +1 -1
  43. package/es/timeline/playables/sprite-color-playable-asset-data.d.ts +2 -1
  44. package/es/timeline/playables/transform-playable-asset-data.d.ts +2 -1
  45. package/es/timeline/timeline-asset-data.d.ts +3 -1
  46. package/es/timeline/track/track-asset-data.d.ts +2 -1
  47. package/es/type.d.ts +13 -1
  48. package/es/type.js +12 -0
  49. package/es/vfx-item-data.d.ts +2 -1
  50. package/package.json +4 -5
  51. package/es/components.d.ts +0 -210
@@ -1,4 +1,4 @@
1
- import type { EffectsObjectData } from './components';
1
+ import type { EffectsObjectData } from './effects-object-data';
2
2
  import type { FixedNumberExpression, FixedVec3Expression, FixedQuatExpression } from './number-expression';
3
3
  export interface AnimationClipData extends EffectsObjectData {
4
4
  positionCurves: PositionCurveData[];
package/es/binary.d.ts CHANGED
@@ -1,6 +1,7 @@
1
- import type { DataType, EffectsObjectData } from './components';
2
1
  import type { RenderLevel } from './type';
3
2
  import type { ValueType } from './number-expression';
3
+ import type { DataType } from './data-type';
4
+ import type { EffectsObjectData } from './effects-object-data';
4
5
  /**
5
6
  * index: 指向 json 中 bins 数组
6
7
  * start: 二进制开始的 byte 偏移,默认为 0
@@ -0,0 +1,7 @@
1
+ import type { EffectsObjectData } from '../effects-object-data';
2
+ export interface DataPath {
3
+ id: string;
4
+ }
5
+ export interface ComponentData extends EffectsObjectData {
6
+ item: DataPath;
7
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './component-data';
2
+ export * from './post-process-volume-data';
@@ -0,0 +1,2 @@
1
+ export * from './component-data';
2
+ export * from './post-process-volume-data';
@@ -0,0 +1,12 @@
1
+ export interface PostProcessVolumeData {
2
+ bloomEnabled: boolean;
3
+ threshold: number;
4
+ bloomIntensity: number;
5
+ brightness: number;
6
+ saturation: number;
7
+ contrast: number;
8
+ vignetteIntensity: number;
9
+ vignetteSmoothness: number;
10
+ vignetteRoundness: number;
11
+ toneMappingEnabled: boolean;
12
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,44 @@
1
+ export declare enum DataType {
2
+ VFXItemData = "VFXItemData",
3
+ EffectComponent = "EffectComponent",
4
+ Material = "Material",
5
+ Shader = "Shader",
6
+ SpriteComponent = "SpriteComponent",
7
+ ParticleSystem = "ParticleSystem",
8
+ InteractComponent = "InteractComponent",
9
+ CameraController = "CameraController",
10
+ PostProcessVolume = "PostProcessVolume",
11
+ Geometry = "Geometry",
12
+ Texture = "Texture",
13
+ AnimationClip = "AnimationClip",
14
+ TextComponent = "TextComponent",
15
+ BinaryAsset = "BinaryAsset",
16
+ TrackAsset = "TrackAsset",
17
+ TimelineAsset = "TimelineAsset",
18
+ ObjectBindingTrack = "ObjectBindingTrack",
19
+ TransformTrack = "TransformTrack",
20
+ SpriteColorTrack = "SpriteColorTrack",
21
+ ActivationTrack = "ActivationTrack",
22
+ SubCompositionTrack = "SubCompositionTrack",
23
+ FloatPropertyTrack = "FloatPropertyTrack",
24
+ ColorPropertyTrack = "ColorPropertyTrack",
25
+ Vector4PropertyTrack = "Vector4PropertyTrack",
26
+ TransformPlayableAsset = "TransformPlayableAsset",
27
+ SpriteColorPlayableAsset = "SpriteColorPlayableAsset",
28
+ ActivationPlayableAsset = "ActivationPlayableAsset",
29
+ SubCompositionPlayableAsset = "SubCompositionPlayableAsset",
30
+ FloatPropertyPlayableAsset = "FloatPropertyPlayableAsset",
31
+ ColorPropertyPlayableAsset = "ColorPropertyPlayableAsset",
32
+ MeshComponent = "MeshComponent",
33
+ SkyboxComponent = "SkyboxComponent",
34
+ LightComponent = "LightComponent",
35
+ CameraComponent = "CameraComponent",
36
+ ModelPluginComponent = "ModelPluginComponent",
37
+ TreeComponent = "TreeComponent",
38
+ AnimationComponent = "AnimationComponent",
39
+ SpineComponent = "SpineComponent",
40
+ VideoComponent = "VideoComponent",
41
+ AudioComponent = "AudioComponent",
42
+ RichTextComponent = "RichTextComponent",
43
+ TimelineClip = "TimelineClip"
44
+ }
@@ -0,0 +1,47 @@
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["PostProcessVolume"] = "PostProcessVolume";
12
+ DataType["Geometry"] = "Geometry";
13
+ DataType["Texture"] = "Texture";
14
+ DataType["AnimationClip"] = "AnimationClip";
15
+ DataType["TextComponent"] = "TextComponent";
16
+ DataType["BinaryAsset"] = "BinaryAsset";
17
+ // Timeline
18
+ DataType["TrackAsset"] = "TrackAsset";
19
+ DataType["TimelineAsset"] = "TimelineAsset";
20
+ DataType["ObjectBindingTrack"] = "ObjectBindingTrack";
21
+ DataType["TransformTrack"] = "TransformTrack";
22
+ DataType["SpriteColorTrack"] = "SpriteColorTrack";
23
+ DataType["ActivationTrack"] = "ActivationTrack";
24
+ DataType["SubCompositionTrack"] = "SubCompositionTrack";
25
+ DataType["FloatPropertyTrack"] = "FloatPropertyTrack";
26
+ DataType["ColorPropertyTrack"] = "ColorPropertyTrack";
27
+ DataType["Vector4PropertyTrack"] = "Vector4PropertyTrack";
28
+ DataType["TransformPlayableAsset"] = "TransformPlayableAsset";
29
+ DataType["SpriteColorPlayableAsset"] = "SpriteColorPlayableAsset";
30
+ DataType["ActivationPlayableAsset"] = "ActivationPlayableAsset";
31
+ DataType["SubCompositionPlayableAsset"] = "SubCompositionPlayableAsset";
32
+ DataType["FloatPropertyPlayableAsset"] = "FloatPropertyPlayableAsset";
33
+ DataType["ColorPropertyPlayableAsset"] = "ColorPropertyPlayableAsset";
34
+ DataType["MeshComponent"] = "MeshComponent";
35
+ DataType["SkyboxComponent"] = "SkyboxComponent";
36
+ DataType["LightComponent"] = "LightComponent";
37
+ DataType["CameraComponent"] = "CameraComponent";
38
+ DataType["ModelPluginComponent"] = "ModelPluginComponent";
39
+ DataType["TreeComponent"] = "TreeComponent";
40
+ DataType["AnimationComponent"] = "AnimationComponent";
41
+ DataType["SpineComponent"] = "SpineComponent";
42
+ DataType["VideoComponent"] = "VideoComponent";
43
+ DataType["AudioComponent"] = "AudioComponent";
44
+ DataType["RichTextComponent"] = "RichTextComponent";
45
+ // Non-EffectObject
46
+ DataType["TimelineClip"] = "TimelineClip";
47
+ })(DataType || (DataType = {}));
@@ -0,0 +1,6 @@
1
+ import type { DataType } from './data-type';
2
+ export interface EffectsObjectData {
3
+ id: string;
4
+ name?: string;
5
+ dataType: DataType;
6
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { EffectsObjectData } from './effects-object-data';
2
+ export interface EffectsPackageData {
3
+ fileSummary: FileSummary;
4
+ exportObjects: EffectsObjectData[];
5
+ }
6
+ export interface FileSummary {
7
+ guid: string;
8
+ assetType: string;
9
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,114 @@
1
+ import type { EffectsObjectData } from './effects-object-data';
2
+ export interface GeometryData extends EffectsObjectData {
3
+ vertexData: VertexData;
4
+ indexFormat: IndexFormatType;
5
+ indexOffset: number;
6
+ subMeshes: SubMesh[];
7
+ /**
8
+ * 模型绘制模式,默认为 GeometryType.TRIANGLES(三角形)
9
+ * @default GeometryType.TRIANGLES
10
+ */
11
+ mode: GeometryType;
12
+ /**
13
+ * 存放 position, uv, normal, indices 的打包数据
14
+ */
15
+ buffer?: string;
16
+ /**
17
+ * 存放 position, uv, normal, indices 的二进制数据,用于序列化二进制数据
18
+ */
19
+ binaryData?: Uint8Array;
20
+ /**
21
+ * 所有的骨骼名称
22
+ */
23
+ boneNames?: string[];
24
+ rootBoneName?: string;
25
+ inverseBindMatrices?: number[];
26
+ }
27
+ export interface SubMesh {
28
+ offset: number;
29
+ indexCount?: number;
30
+ vertexCount: number;
31
+ }
32
+ export declare enum GeometryType {
33
+ /**
34
+ * Draw single points.
35
+ */
36
+ POINTS = 0,
37
+ /**
38
+ * Draw lines. Each vertex connects to the one after it.
39
+ */
40
+ LINES = 1,
41
+ /**
42
+ * Draw lines. Each set of two vertices is treated as a separate line segment.
43
+ */
44
+ LINE_LOOP = 2,
45
+ /**
46
+ * Draw a connected group of line segments from the first vertex to the last.
47
+ */
48
+ LINE_STRIP = 3,
49
+ /**
50
+ * Draw triangles. Each set of three vertices creates a separate triangle.
51
+ */
52
+ TRIANGLES = 4,
53
+ /**
54
+ * Draw a connected strip of triangles.
55
+ */
56
+ TRIANGLE_STRIP = 5,
57
+ /**
58
+ * Draw a connected group of triangles. Each vertex connects to the previous and the first vertex in the fan.
59
+ */
60
+ TRIANGLE_FAN = 6
61
+ }
62
+ export interface VertexData {
63
+ vertexCount: number;
64
+ channels: VertexChannel[];
65
+ }
66
+ export declare enum VertexFormatType {
67
+ Float16 = 0,
68
+ Float32 = 1,
69
+ Int8 = 2,
70
+ Int16 = 3,
71
+ Int32 = 4,
72
+ UInt8 = 5,
73
+ UInt16 = 6,
74
+ UInt32 = 7
75
+ }
76
+ export declare enum IndexFormatType {
77
+ None = -1,
78
+ UInt8 = 0,
79
+ UInt16 = 1,
80
+ UInt32 = 2
81
+ }
82
+ export interface VertexChannel {
83
+ semantic: string;
84
+ offset: number;
85
+ format: VertexFormatType;
86
+ dimension: number;
87
+ normalize?: boolean;
88
+ }
89
+ export declare enum VertexBufferSemantic {
90
+ Position = "POSITION",
91
+ Uv = "TEXCOORD0",
92
+ Uv2 = "TEXCOORD1",
93
+ Normal = "NORMAL",
94
+ Tangent = "TANGENT",
95
+ Color = "COLOR",
96
+ Joints = "JOINTS",
97
+ Weights = "WEIGHTS",
98
+ PositionBS0 = "POSITION_BS0",
99
+ PositionBS1 = "POSITION_BS1",
100
+ PositionBS2 = "POSITION_BS2",
101
+ PositionBS3 = "POSITION_BS3",
102
+ PositionBS4 = "POSITION_BS4",
103
+ PositionBS5 = "POSITION_BS5",
104
+ PositionBS6 = "POSITION_BS6",
105
+ PositionBS7 = "POSITION_BS7",
106
+ NormalBS0 = "NORMAL_BS0",
107
+ NormalBS1 = "NORMAL_BS1",
108
+ NormalBS2 = "NORMAL_BS2",
109
+ NormalBS3 = "NORMAL_BS3",
110
+ TangentBS0 = "TANGENT_BS0",
111
+ TangentBS1 = "TANGENT_BS1",
112
+ TangentBS2 = "TANGENT_BS2",
113
+ TangentBS3 = "TANGENT_BS3"
114
+ }
@@ -1,49 +1,3 @@
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
- DataType["BinaryAsset"] = "BinaryAsset";
16
- // Timeline
17
- DataType["TrackAsset"] = "TrackAsset";
18
- DataType["TimelineAsset"] = "TimelineAsset";
19
- DataType["ObjectBindingTrack"] = "ObjectBindingTrack";
20
- DataType["TransformTrack"] = "TransformTrack";
21
- DataType["SpriteColorTrack"] = "SpriteColorTrack";
22
- DataType["ActivationTrack"] = "ActivationTrack";
23
- DataType["SubCompositionTrack"] = "SubCompositionTrack";
24
- DataType["FloatPropertyTrack"] = "FloatPropertyTrack";
25
- DataType["ColorPropertyTrack"] = "ColorPropertyTrack";
26
- DataType["Vector4PropertyTrack"] = "Vector4PropertyTrack";
27
- DataType["TransformPlayableAsset"] = "TransformPlayableAsset";
28
- DataType["SpriteColorPlayableAsset"] = "SpriteColorPlayableAsset";
29
- DataType["ActivationPlayableAsset"] = "ActivationPlayableAsset";
30
- DataType["SubCompositionPlayableAsset"] = "SubCompositionPlayableAsset";
31
- DataType["FloatPropertyPlayableAsset"] = "FloatPropertyPlayableAsset";
32
- DataType["ColorPropertyPlayableAsset"] = "ColorPropertyPlayableAsset";
33
- // FIXME: 先完成ECS的场景转换,后面移到spec中
34
- DataType["MeshComponent"] = "MeshComponent";
35
- DataType["SkyboxComponent"] = "SkyboxComponent";
36
- DataType["LightComponent"] = "LightComponent";
37
- DataType["CameraComponent"] = "CameraComponent";
38
- DataType["ModelPluginComponent"] = "ModelPluginComponent";
39
- DataType["TreeComponent"] = "TreeComponent";
40
- DataType["AnimationComponent"] = "AnimationComponent";
41
- DataType["SpineComponent"] = "SpineComponent";
42
- DataType["VideoComponent"] = "VideoComponent";
43
- DataType["AudioComponent"] = "AudioComponent";
44
- // Non-EffectObject
45
- DataType["TimelineClip"] = "TimelineClip";
46
- })(DataType || (DataType = {}));
47
1
  export var GeometryType;
48
2
  (function (GeometryType) {
49
3
  /**
package/es/index.d.ts CHANGED
@@ -4,6 +4,7 @@ export * from './texture';
4
4
  export * from './constants';
5
5
  export * from './number-expression';
6
6
  export * from './scene';
7
+ export * from './math';
7
8
  export * from './item';
8
9
  export * from './item/base-item';
9
10
  export * from './item/camera-item';
@@ -17,6 +18,7 @@ export * from './item/sprite-item';
17
18
  export * from './item/spine-item';
18
19
  export * from './item/effect-item';
19
20
  export * from './item/text-item';
21
+ export * from './item/rich-text-item';
20
22
  export * from './item/video-item';
21
23
  export * from './item/audio-item';
22
24
  export * from './item/model';
@@ -31,3 +33,9 @@ export * from './timeline';
31
33
  export * from './assets';
32
34
  export * from './render-settings';
33
35
  export * from './curve-data';
36
+ export * from './data-type';
37
+ export * from './effects-object-data';
38
+ export * from './material-data';
39
+ export * from './geometry-data';
40
+ export * from './shader-data';
41
+ export * from './effects-package-data';
package/es/index.js CHANGED
@@ -4,6 +4,7 @@ export * from './texture';
4
4
  export * from './constants';
5
5
  export * from './number-expression';
6
6
  export * from './scene';
7
+ export * from './math';
7
8
  export * from './item';
8
9
  export * from './item/base-item';
9
10
  export * from './item/camera-item';
@@ -17,6 +18,7 @@ export * from './item/sprite-item';
17
18
  export * from './item/spine-item';
18
19
  export * from './item/effect-item';
19
20
  export * from './item/text-item';
21
+ export * from './item/rich-text-item';
20
22
  export * from './item/video-item';
21
23
  export * from './item/audio-item';
22
24
  export * from './item/model';
@@ -31,3 +33,9 @@ export * from './timeline';
31
33
  export * from './assets';
32
34
  export * from './render-settings';
33
35
  export * from './curve-data';
36
+ export * from './data-type';
37
+ export * from './effects-object-data';
38
+ export * from './material-data';
39
+ export * from './geometry-data';
40
+ export * from './shader-data';
41
+ export * from './effects-package-data';
@@ -1,4 +1,5 @@
1
1
  import type { BinaryEnv } from '../binary';
2
+ import type { Vector2Data, Vector3Data } from '../math';
2
3
  import type { vec3, vec4 } from '../number-expression';
3
4
  import type { ItemType, RenderLevel } from '../type';
4
5
  import type { CameraContent } from './camera-item';
@@ -9,6 +10,7 @@ import type { ModelLightContent, ModelMeshItemContent, ModelTreeContent, SkyboxC
9
10
  import type { NullContent } from './null-item';
10
11
  import type { ParticleContent } from './particle-item';
11
12
  import type { PluginContent } from './plugin-item';
13
+ import type { RichTextContent } from './rich-text-item';
12
14
  import type { SpineContent } from './spine-item';
13
15
  import type { SpriteContent } from './sprite-item';
14
16
  import type { TextContent } from './text-item';
@@ -126,15 +128,6 @@ export interface BaseItemTransform {
126
128
  */
127
129
  quat?: vec4;
128
130
  }
129
- export interface Vector3Data {
130
- x: number;
131
- y: number;
132
- z: number;
133
- }
134
- export interface Vector2Data {
135
- x: number;
136
- y: number;
137
- }
138
131
  export interface TransformData {
139
132
  position: Vector3Data;
140
133
  eulerHint: Vector3Data;
@@ -142,4 +135,4 @@ export interface TransformData {
142
135
  size?: Vector2Data;
143
136
  anchor?: Vector2Data;
144
137
  }
145
- export type BaseContent = SpriteContent | ParticleContent | NullContent | InteractContent | PluginContent | CompositionContent | CameraContent | TextContent | SpineContent | EffectContent | ModelTreeContent<BinaryEnv> | ModelMeshItemContent<BinaryEnv> | ModelLightContent | SkyboxContent<BinaryEnv> | any;
138
+ export type BaseContent = SpriteContent | ParticleContent | NullContent | InteractContent | PluginContent | CompositionContent | CameraContent | TextContent | RichTextContent | SpineContent | EffectContent | ModelTreeContent<BinaryEnv> | ModelMeshItemContent<BinaryEnv> | ModelLightContent | SkyboxContent<BinaryEnv> | any;
@@ -28,11 +28,7 @@ export interface InteractContent {
28
28
  /**
29
29
  * 交互元素渲染属性
30
30
  */
31
- export interface InteractComponentData extends ComponentData {
32
- /**
33
- * 交互元素基础属性
34
- */
35
- options: InteractOption;
31
+ export interface InteractComponentData extends ComponentData, InteractContent {
36
32
  }
37
33
  /**
38
34
  * 交互元素基础属性
@@ -1,7 +1,8 @@
1
1
  import type { RGBAColorValue } from '../../number-expression';
2
2
  import type { BaseItem, EndBehavior } from '../base-item';
3
3
  import type { RotationOverLifetime, PositionOverLifetime, ItemType } from '../../type';
4
- import type { ColorData, ComponentData } from '../../components';
4
+ import type { ComponentData } from '../../components';
5
+ import type { ColorData } from '../../math';
5
6
  export interface ModelLightBaseOptions {
6
7
  /**
7
8
  * 挂靠的父节点
@@ -2,7 +2,8 @@ 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, Vector4Data } from '../../components';
5
+ import type { ComponentData, DataPath } from '../../components';
6
+ import type { Vector4Data } from '../../math';
6
7
  export interface SkyboxOptions<T extends BinaryEnv> {
7
8
  /**
8
9
  * 环境光旋转
@@ -56,16 +57,6 @@ export interface ModelSkyboxItem<T extends BinaryEnv> extends BaseItem {
56
57
  * bins:[{url:'https://big/bin/'}]
57
58
  */
58
59
  export interface SkyboxComponentOptions {
59
- renderable: boolean;
60
- intensity: number;
61
- reflectionsIntensity: number;
62
- irradianceCoeffs?: number[];
63
- diffuseImage?: DataPath;
64
- specularImage: DataPath;
65
- specularImageSize: number;
66
- specularMipCount: number;
67
- }
68
- export interface SkyboxComponentData extends ComponentData {
69
60
  /**
70
61
  * Skybox 是否渲染,UI显示"可见"
71
62
  */
@@ -99,3 +90,5 @@ export interface SkyboxComponentData extends ComponentData {
99
90
  */
100
91
  specularMipCount: number;
101
92
  }
93
+ export interface SkyboxComponentData extends ComponentData, SkyboxComponentOptions {
94
+ }
@@ -25,40 +25,40 @@ export interface ModelAnimationOptions<T extends BinaryEnv> {
25
25
  tracks: ModelAnimTrackOptions<T>[];
26
26
  }
27
27
  /**
28
- * 3D场景树属性,包含动画数据
28
+ * 3D 场景树属性,包含动画数据
29
29
  */
30
30
  export interface ModelTreeOptions<T extends BinaryEnv> extends TreeOptions {
31
31
  /**
32
- * 默认动画索引,-1表示不播放动画
32
+ * 默认动画索引,-1 表示不播放动画
33
33
  */
34
34
  animation?: number;
35
35
  /**
36
- * 3D场景树中所有的动画数据
36
+ * 3D 场景树中所有的动画数据
37
37
  */
38
38
  animations?: ModelAnimationOptions<T>[];
39
39
  }
40
40
  export interface ModelTreeContent<T extends BinaryEnv> {
41
41
  /**
42
- * 3D场景树元素基础属性
42
+ * 3D 场景树元素基础属性
43
43
  */
44
44
  options: {
45
45
  tree: ModelTreeOptions<T>;
46
46
  };
47
47
  /**
48
- * 3D场景树元素大小变化属性
48
+ * 3D 场景树元素大小变化属性
49
49
  */
50
50
  sizeOverLifetime?: SizeOverLifetime;
51
51
  /**
52
- * 3D场景树元素旋转变化属性
52
+ * 3D 场景树元素旋转变化属性
53
53
  */
54
54
  rotationOverLifetime?: RotationOverLifetime;
55
55
  /**
56
- * 3D场景树元素位置变化属性
56
+ * 3D 场景树元素位置变化属性
57
57
  */
58
58
  positionOverLifetime?: PositionOverLifetime;
59
59
  }
60
60
  /**
61
- * 3D场景树元素
61
+ * 3D 场景树元素
62
62
  */
63
63
  export interface ModelTreeItem<T extends BinaryEnv> extends BaseItem {
64
64
  type: ItemType.tree;
@@ -77,21 +77,21 @@ export interface ModelAnimationData {
77
77
  }
78
78
  export interface ModelAnimationComponentData extends ComponentData {
79
79
  /**
80
- * 默认动画索引,-1表示不播放动画
80
+ * 默认动画索引,-1 表示不播放动画
81
81
  */
82
82
  animation?: number;
83
83
  /**
84
- * 3D场景树中所有的动画数据
84
+ * 3D 场景树中所有的动画数据
85
85
  */
86
86
  animations: ModelAnimationData[];
87
87
  }
88
88
  export interface AnimationComponentData extends ComponentData {
89
89
  /**
90
- * 默认动画索引,-1表示不播放动画
90
+ * 默认动画索引,-1 表示不播放动画
91
91
  */
92
92
  animation?: number;
93
93
  /**
94
- * glTF中所有的动画数据
94
+ * glTF 中所有的动画数据
95
95
  */
96
96
  animationClips: DataPath[];
97
97
  }
@@ -337,72 +337,7 @@ export interface ParticleContent {
337
337
  /**
338
338
  * 粒子元素渲染属性
339
339
  */
340
- export interface ParticleSystemData extends ComponentData {
341
- splits?: SplitParameter[];
342
- /**
343
- * 粒子元素基础属性
344
- */
345
- options: ParticleOptions;
346
- /**
347
- * 粒子元素材质渲染属性
348
- */
349
- renderer: RendererOptions;
350
- /**
351
- * 粒子元素发射器形状属性
352
- */
353
- shape?: ParticleShape;
354
- /**
355
- * 粒子元素发射参数属性
356
- */
357
- emission: ParticleEmission;
358
- /**
359
- * 粒子元素大小变化属性
360
- */
361
- sizeOverLifetime?: ParticleSizeOverLifetime;
362
- /**
363
- * 发射器 transform 变化
364
- */
365
- emitterTransform?: {
366
- /**
367
- * 位置变化
368
- */
369
- path?: FixedVec3Expression;
370
- };
371
- positionOverLifetime?: ParticlePositionOverLifetime;
372
- /**
373
- * 粒子元素旋转变化属性
374
- */
375
- rotationOverLifetime?: ParticleRotationOverLifetime;
376
- /**
377
- * 粒子元素色彩变化属性
378
- */
379
- colorOverLifetime?: ParticleColorOverLifetime;
380
- /**
381
- * 粒子元素贴图变化属性
382
- */
383
- textureSheetAnimation?: ParticleTextureSheetAnimation;
384
- /**
385
- * 粒子元素拖尾参数
386
- */
387
- trails?: ParticleTrail;
388
- /**
389
- * 粒子元素交互参数
390
- */
391
- interaction?: {
392
- /**
393
- * 交互行为
394
- */
395
- behavior?: ParticleInteractionBehavior;
396
- /**
397
- * 重叠元素响应开关
398
- */
399
- multiple?: boolean;
400
- /**
401
- * ray cast 射线拾取时 sphere 的半径
402
- * @default 0.4
403
- */
404
- radius?: number;
405
- };
340
+ export interface ParticleSystemData extends ComponentData, ParticleContent {
406
341
  }
407
342
  /**
408
343
  * 粒子拖尾参数
@@ -0,0 +1,35 @@
1
+ import type { BaseItem, EndBehavior } from './base-item';
2
+ import type { ItemType } from '../type';
3
+ import type { BaseTextContentOptions, TextComponentData, TextContent } from './text-item';
4
+ /**
5
+ * 富文本元素
6
+ */
7
+ export interface RichTextItem extends BaseItem {
8
+ /**
9
+ * 元素类型(指定为 text)
10
+ */
11
+ type: ItemType.richtext;
12
+ /**
13
+ * 文本元素渲染信息
14
+ */
15
+ content: RichTextContent;
16
+ endBehavior: EndBehavior;
17
+ }
18
+ /**
19
+ * 文本元素渲染属性
20
+ */
21
+ export interface RichTextContent extends Omit<TextContent, 'options'> {
22
+ /**
23
+ * 文本元素基础属性
24
+ */
25
+ options: BaseTextContentOptions;
26
+ }
27
+ /**
28
+ * 富文本元素渲染属性
29
+ */
30
+ export interface RichTextComponentData extends Omit<TextComponentData, 'options'> {
31
+ /**
32
+ * 富文本元素基础属性
33
+ */
34
+ options: BaseTextContentOptions;
35
+ }
@@ -0,0 +1 @@
1
+ export {};