@galacean/effects-specification 2.1.0-alpha.0 → 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.
- package/es/animation-clip-data.d.ts +1 -1
- package/es/binary.d.ts +2 -1
- package/es/components/component-data.d.ts +7 -0
- package/es/components/component-data.js +1 -0
- package/es/components/index.d.ts +2 -0
- package/es/components/index.js +2 -0
- package/es/components/post-process-volume-data.d.ts +12 -0
- package/es/components/post-process-volume-data.js +1 -0
- package/es/composition.d.ts +0 -4
- package/es/curve-data/color-curve-data.d.ts +7 -0
- package/es/curve-data/color-curve-data.js +1 -0
- package/es/curve-data/index.d.ts +2 -0
- package/es/curve-data/index.js +2 -0
- package/es/curve-data/vector4-curve-data.d.ts +7 -0
- package/es/curve-data/vector4-curve-data.js +1 -0
- package/es/data-type.d.ts +44 -0
- package/es/data-type.js +47 -0
- package/es/effects-object-data.d.ts +6 -0
- package/es/effects-object-data.js +1 -0
- package/es/effects-package-data.d.ts +9 -0
- package/es/effects-package-data.js +1 -0
- package/es/{components.d.ts → geometry-data.d.ts} +1 -92
- package/es/{components.js → geometry-data.js} +0 -41
- package/es/index.d.ts +10 -0
- package/es/index.js +10 -0
- package/es/item/base-item.d.ts +3 -10
- package/es/item/interact-item.d.ts +1 -5
- package/es/item/model/light.d.ts +2 -1
- package/es/item/model/skybox.d.ts +4 -11
- package/es/item/model/tree.d.ts +12 -12
- package/es/item/particle-item.d.ts +1 -66
- package/es/item/rich-text-item.d.ts +35 -0
- package/es/item/rich-text-item.js +1 -0
- package/es/item/spine-item.d.ts +2 -1
- package/es/item/sprite-item.d.ts +1 -43
- package/es/item/text-item.d.ts +35 -64
- package/es/item.d.ts +2 -1
- package/es/material-data.d.ts +21 -0
- package/es/material-data.js +1 -0
- package/es/math/color-data.d.ts +6 -0
- package/es/math/color-data.js +1 -0
- package/es/math/index.d.ts +2 -0
- package/es/math/index.js +2 -0
- package/es/math/vector-data.d.ts +15 -0
- package/es/math/vector-data.js +1 -0
- package/es/number-expression.d.ts +9 -1
- package/es/number-expression.js +8 -0
- package/es/render-settings.d.ts +4 -0
- package/es/render-settings.js +1 -0
- package/es/scene.d.ts +10 -1
- package/es/shader-data.d.ts +6 -0
- package/es/shader-data.js +1 -0
- package/es/texture.d.ts +1 -1
- package/es/timeline/playables/sprite-color-playable-asset-data.d.ts +2 -1
- package/es/timeline/playables/transform-playable-asset-data.d.ts +2 -1
- package/es/timeline/timeline-asset-data.d.ts +3 -1
- package/es/timeline/track/track-asset-data.d.ts +2 -1
- package/es/type.d.ts +13 -1
- package/es/type.js +12 -0
- package/es/vfx-item-data.d.ts +2 -1
- package/package.json +4 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EffectsObjectData } from './
|
|
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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 {};
|
package/es/composition.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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
|
+
}
|
package/es/data-type.js
ADDED
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,82 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare enum DataType {
|
|
3
|
-
VFXItemData = "VFXItemData",
|
|
4
|
-
EffectComponent = "EffectComponent",
|
|
5
|
-
Material = "Material",
|
|
6
|
-
Shader = "Shader",
|
|
7
|
-
SpriteComponent = "SpriteComponent",
|
|
8
|
-
ParticleSystem = "ParticleSystem",
|
|
9
|
-
InteractComponent = "InteractComponent",
|
|
10
|
-
CameraController = "CameraController",
|
|
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
|
-
TransformPlayableAsset = "TransformPlayableAsset",
|
|
24
|
-
SpriteColorPlayableAsset = "SpriteColorPlayableAsset",
|
|
25
|
-
ActivationPlayableAsset = "ActivationPlayableAsset",
|
|
26
|
-
SubCompositionPlayableAsset = "SubCompositionPlayableAsset",
|
|
27
|
-
MeshComponent = "MeshComponent",
|
|
28
|
-
SkyboxComponent = "SkyboxComponent",
|
|
29
|
-
LightComponent = "LightComponent",
|
|
30
|
-
CameraComponent = "CameraComponent",
|
|
31
|
-
ModelPluginComponent = "ModelPluginComponent",
|
|
32
|
-
TreeComponent = "TreeComponent",
|
|
33
|
-
AnimationComponent = "AnimationComponent",
|
|
34
|
-
SpineComponent = "SpineComponent",
|
|
35
|
-
VideoComponent = "VideoComponent",
|
|
36
|
-
AudioComponent = "AudioComponent",
|
|
37
|
-
TimelineClip = "TimelineClip"
|
|
38
|
-
}
|
|
39
|
-
export interface DataPath {
|
|
40
|
-
id: string;
|
|
41
|
-
}
|
|
42
|
-
export interface EffectsObjectData {
|
|
43
|
-
id: string;
|
|
44
|
-
name?: string;
|
|
45
|
-
dataType: DataType;
|
|
46
|
-
}
|
|
47
|
-
export interface ComponentData extends EffectsObjectData {
|
|
48
|
-
item: DataPath;
|
|
49
|
-
}
|
|
50
|
-
export interface ColorData {
|
|
51
|
-
r: number;
|
|
52
|
-
g: number;
|
|
53
|
-
b: number;
|
|
54
|
-
a: number;
|
|
55
|
-
}
|
|
56
|
-
export interface Vector4Data {
|
|
57
|
-
x: number;
|
|
58
|
-
y: number;
|
|
59
|
-
z: number;
|
|
60
|
-
w: number;
|
|
61
|
-
}
|
|
62
|
-
export interface MaterialTextureProperty {
|
|
63
|
-
texture: DataPath;
|
|
64
|
-
offset?: Vector2Data;
|
|
65
|
-
scale?: Vector2Data;
|
|
66
|
-
}
|
|
67
|
-
export interface MaterialData extends EffectsObjectData {
|
|
68
|
-
shader: DataPath;
|
|
69
|
-
blending?: boolean;
|
|
70
|
-
zWrite?: boolean;
|
|
71
|
-
zTest?: boolean;
|
|
72
|
-
stringTags: Record<string, string>;
|
|
73
|
-
macros: string[];
|
|
74
|
-
ints: Record<string, number>;
|
|
75
|
-
floats: Record<string, number>;
|
|
76
|
-
vector4s: Record<string, Vector4Data>;
|
|
77
|
-
colors: Record<string, ColorData>;
|
|
78
|
-
textures: Record<string, MaterialTextureProperty>;
|
|
79
|
-
}
|
|
1
|
+
import type { EffectsObjectData } from './effects-object-data';
|
|
80
2
|
export interface GeometryData extends EffectsObjectData {
|
|
81
3
|
vertexData: VertexData;
|
|
82
4
|
indexFormat: IndexFormatType;
|
|
@@ -190,16 +112,3 @@ export declare enum VertexBufferSemantic {
|
|
|
190
112
|
TangentBS2 = "TANGENT_BS2",
|
|
191
113
|
TangentBS3 = "TANGENT_BS3"
|
|
192
114
|
}
|
|
193
|
-
export interface ShaderData extends EffectsObjectData {
|
|
194
|
-
vertex: string;
|
|
195
|
-
fragment: string;
|
|
196
|
-
properties?: string;
|
|
197
|
-
}
|
|
198
|
-
export interface EffectsPackageData {
|
|
199
|
-
fileSummary: FileSummary;
|
|
200
|
-
exportObjects: EffectsObjectData[];
|
|
201
|
-
}
|
|
202
|
-
export interface FileSummary {
|
|
203
|
-
guid: string;
|
|
204
|
-
assetType: string;
|
|
205
|
-
}
|
|
@@ -1,44 +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["TransformPlayableAsset"] = "TransformPlayableAsset";
|
|
25
|
-
DataType["SpriteColorPlayableAsset"] = "SpriteColorPlayableAsset";
|
|
26
|
-
DataType["ActivationPlayableAsset"] = "ActivationPlayableAsset";
|
|
27
|
-
DataType["SubCompositionPlayableAsset"] = "SubCompositionPlayableAsset";
|
|
28
|
-
// FIXME: 先完成ECS的场景转换,后面移到spec中
|
|
29
|
-
DataType["MeshComponent"] = "MeshComponent";
|
|
30
|
-
DataType["SkyboxComponent"] = "SkyboxComponent";
|
|
31
|
-
DataType["LightComponent"] = "LightComponent";
|
|
32
|
-
DataType["CameraComponent"] = "CameraComponent";
|
|
33
|
-
DataType["ModelPluginComponent"] = "ModelPluginComponent";
|
|
34
|
-
DataType["TreeComponent"] = "TreeComponent";
|
|
35
|
-
DataType["AnimationComponent"] = "AnimationComponent";
|
|
36
|
-
DataType["SpineComponent"] = "SpineComponent";
|
|
37
|
-
DataType["VideoComponent"] = "VideoComponent";
|
|
38
|
-
DataType["AudioComponent"] = "AudioComponent";
|
|
39
|
-
// Non-EffectObject
|
|
40
|
-
DataType["TimelineClip"] = "TimelineClip";
|
|
41
|
-
})(DataType || (DataType = {}));
|
|
42
1
|
export var GeometryType;
|
|
43
2
|
(function (GeometryType) {
|
|
44
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';
|
|
@@ -29,3 +31,11 @@ export * from './vfx-item-data';
|
|
|
29
31
|
export * from './buitin-object-guid';
|
|
30
32
|
export * from './timeline';
|
|
31
33
|
export * from './assets';
|
|
34
|
+
export * from './render-settings';
|
|
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';
|
|
@@ -29,3 +31,11 @@ export * from './vfx-item-data';
|
|
|
29
31
|
export * from './buitin-object-guid';
|
|
30
32
|
export * from './timeline';
|
|
31
33
|
export * from './assets';
|
|
34
|
+
export * from './render-settings';
|
|
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/item/base-item.d.ts
CHANGED
|
@@ -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
|
* 交互元素基础属性
|
package/es/item/model/light.d.ts
CHANGED
|
@@ -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 {
|
|
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
|
|
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
|
+
}
|
package/es/item/model/tree.d.ts
CHANGED
|
@@ -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 {};
|
package/es/item/spine-item.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { BinaryPointer } from '../binary';
|
|
2
|
-
import type { ComponentData, DataPath
|
|
2
|
+
import type { ComponentData, DataPath } from '../components';
|
|
3
|
+
import type { DataType } from '../data-type';
|
|
3
4
|
import type { SizeOverLifetime, RotationOverLifetime, PositionOverLifetime, ColorOverLifetime, RendererOptions, ItemType } from '../type';
|
|
4
5
|
import type { BaseItem, EndBehavior } from './base-item';
|
|
5
6
|
/**
|
package/es/item/sprite-item.d.ts
CHANGED
|
@@ -73,47 +73,5 @@ export interface SpriteContent {
|
|
|
73
73
|
/**
|
|
74
74
|
* 图层组件属性
|
|
75
75
|
*/
|
|
76
|
-
export interface SpriteComponentData extends ComponentData {
|
|
77
|
-
/**
|
|
78
|
-
* added by loader
|
|
79
|
-
* @default null
|
|
80
|
-
*/
|
|
81
|
-
splits?: SplitParameter[];
|
|
82
|
-
/**
|
|
83
|
-
* 图层元素基础属性
|
|
84
|
-
*/
|
|
85
|
-
options: SpriteContentOptions;
|
|
86
|
-
/**
|
|
87
|
-
* 图层元素材质渲染属性
|
|
88
|
-
*/
|
|
89
|
-
renderer: RendererOptions;
|
|
90
|
-
/**
|
|
91
|
-
* 图层元素大小变化属性
|
|
92
|
-
*/
|
|
93
|
-
sizeOverLifetime?: SizeOverLifetime;
|
|
94
|
-
/**
|
|
95
|
-
* 图层元素旋转变化属性
|
|
96
|
-
*/
|
|
97
|
-
rotationOverLifetime?: RotationOverLifetime;
|
|
98
|
-
/**
|
|
99
|
-
* 图层元素位置变化属性
|
|
100
|
-
*/
|
|
101
|
-
positionOverLifetime?: PositionOverLifetime;
|
|
102
|
-
/**
|
|
103
|
-
* 图层元素色彩变化属性
|
|
104
|
-
*/
|
|
105
|
-
colorOverLifetime?: ColorOverLifetime;
|
|
106
|
-
/**
|
|
107
|
-
* 图层元素贴图变化属性
|
|
108
|
-
*/
|
|
109
|
-
textureSheetAnimation?: TextureSheetAnimation;
|
|
110
|
-
/**
|
|
111
|
-
* 图层交互
|
|
112
|
-
*/
|
|
113
|
-
interaction?: {
|
|
114
|
-
/**
|
|
115
|
-
* 交互行为
|
|
116
|
-
*/
|
|
117
|
-
behavior: InteractBehavior;
|
|
118
|
-
};
|
|
76
|
+
export interface SpriteComponentData extends ComponentData, SpriteContent {
|
|
119
77
|
}
|
package/es/item/text-item.d.ts
CHANGED
|
@@ -17,7 +17,40 @@ export interface TextItem extends BaseItem {
|
|
|
17
17
|
content: TextContent;
|
|
18
18
|
endBehavior: EndBehavior;
|
|
19
19
|
}
|
|
20
|
-
export interface TextContentOptions {
|
|
20
|
+
export interface TextContentOptions extends BaseTextContentOptions {
|
|
21
|
+
/**
|
|
22
|
+
* 文本间隔
|
|
23
|
+
* @default 0
|
|
24
|
+
*/
|
|
25
|
+
letterSpace?: number;
|
|
26
|
+
/**
|
|
27
|
+
* 文本固定宽度(和自适应宽高冲突)
|
|
28
|
+
* @default 31
|
|
29
|
+
*/
|
|
30
|
+
textWidth?: number;
|
|
31
|
+
/**
|
|
32
|
+
* 文本行高
|
|
33
|
+
* @default 31
|
|
34
|
+
*/
|
|
35
|
+
lineHeight?: number;
|
|
36
|
+
/**
|
|
37
|
+
* 文本高度
|
|
38
|
+
* @default 31
|
|
39
|
+
*/
|
|
40
|
+
textHeight?: number;
|
|
41
|
+
/**
|
|
42
|
+
* 自适应宽高开关(和文本固定宽度冲突)
|
|
43
|
+
* @default false
|
|
44
|
+
*/
|
|
45
|
+
autoWidth?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* 当文字超过最大宽度时,文字的表现行为
|
|
48
|
+
* 仅当设置文字最大宽度后生效
|
|
49
|
+
* @default TextOverflow.display
|
|
50
|
+
*/
|
|
51
|
+
textOverflow?: TextOverflow;
|
|
52
|
+
}
|
|
53
|
+
export interface BaseTextContentOptions {
|
|
21
54
|
/**
|
|
22
55
|
* 文本内容
|
|
23
56
|
*/
|
|
@@ -37,11 +70,6 @@ export interface TextContentOptions {
|
|
|
37
70
|
* @default 'Arial'
|
|
38
71
|
*/
|
|
39
72
|
fontFamily?: string;
|
|
40
|
-
/**
|
|
41
|
-
* 文本间隔
|
|
42
|
-
* @default 0
|
|
43
|
-
*/
|
|
44
|
-
letterSpace?: number;
|
|
45
73
|
/**
|
|
46
74
|
* 上下对齐方式
|
|
47
75
|
* @default TextBaseline.middle
|
|
@@ -52,26 +80,6 @@ export interface TextContentOptions {
|
|
|
52
80
|
* @default TextAlignment.left
|
|
53
81
|
*/
|
|
54
82
|
textAlign?: TextAlignment;
|
|
55
|
-
/**
|
|
56
|
-
* 文本固定宽度(和自适应宽高冲突)
|
|
57
|
-
* @default 31
|
|
58
|
-
*/
|
|
59
|
-
textWidth?: number;
|
|
60
|
-
/**
|
|
61
|
-
* 文本行高
|
|
62
|
-
* @default 31
|
|
63
|
-
*/
|
|
64
|
-
lineHeight?: number;
|
|
65
|
-
/**
|
|
66
|
-
* 文本高度
|
|
67
|
-
* @default 31
|
|
68
|
-
*/
|
|
69
|
-
textHeight?: number;
|
|
70
|
-
/**
|
|
71
|
-
* 自适应宽高开关(和文本固定宽度冲突)
|
|
72
|
-
* @default false
|
|
73
|
-
*/
|
|
74
|
-
autoWidth?: boolean;
|
|
75
83
|
/**
|
|
76
84
|
* 文本字重
|
|
77
85
|
* @default TextWeight.normal
|
|
@@ -174,42 +182,5 @@ export interface TextContent {
|
|
|
174
182
|
/**
|
|
175
183
|
* 文本元素渲染属性
|
|
176
184
|
*/
|
|
177
|
-
export interface TextComponentData extends ComponentData {
|
|
178
|
-
/**
|
|
179
|
-
* 文本元素基础属性
|
|
180
|
-
*/
|
|
181
|
-
options: TextContentOptions;
|
|
182
|
-
/**
|
|
183
|
-
* 文本元素材质渲染属性
|
|
184
|
-
*/
|
|
185
|
-
renderer: RendererOptions;
|
|
186
|
-
/**
|
|
187
|
-
* 文本元素大小变化属性
|
|
188
|
-
*/
|
|
189
|
-
sizeOverLifetime?: SizeOverLifetime;
|
|
190
|
-
/**
|
|
191
|
-
* 文本元素旋转变化属性
|
|
192
|
-
*/
|
|
193
|
-
rotationOverLifetime?: RotationOverLifetime;
|
|
194
|
-
/**
|
|
195
|
-
* 文本元素位置变化属性
|
|
196
|
-
*/
|
|
197
|
-
positionOverLifetime?: PositionOverLifetime;
|
|
198
|
-
/**
|
|
199
|
-
* 文本元素色彩变化属性
|
|
200
|
-
*/
|
|
201
|
-
colorOverLifetime?: ColorOverLifetime;
|
|
202
|
-
/**
|
|
203
|
-
* 文本元素贴图变化属性
|
|
204
|
-
*/
|
|
205
|
-
textureSheetAnimation?: TextureSheetAnimation;
|
|
206
|
-
/**
|
|
207
|
-
* 图层交互
|
|
208
|
-
*/
|
|
209
|
-
interaction?: {
|
|
210
|
-
/**
|
|
211
|
-
* 交互行为
|
|
212
|
-
*/
|
|
213
|
-
behavior: InteractBehavior;
|
|
214
|
-
};
|
|
185
|
+
export interface TextComponentData extends ComponentData, TextContent {
|
|
215
186
|
}
|
package/es/item.d.ts
CHANGED
|
@@ -10,7 +10,8 @@ import type { CompositionItem } from './item/composition-item';
|
|
|
10
10
|
import type { TextItem } from './item/text-item';
|
|
11
11
|
import type { VideoItem } from './item/video-item';
|
|
12
12
|
import type { AudioItem } from './item/audio-item';
|
|
13
|
+
import type { RichTextItem } from './item/rich-text-item';
|
|
13
14
|
/**
|
|
14
15
|
* Item 基类,无对应元素
|
|
15
16
|
*/
|
|
16
|
-
export type Item = SpriteItem | ParticleItem | NullItem | PluginItem | InteractItem | CameraItem | TextItem | VideoItem | AudioItem | ModelMeshItem<'json'> | ModelSkyboxItem<'json'> | ModelTreeItem<'json'> | ModelLightItem | ModelCameraItem | SpineItem | CompositionItem | ModelMeshItem<'studio'> | ModelSkyboxItem<'studio'> | ModelTreeItem<'studio'>;
|
|
17
|
+
export type Item = SpriteItem | ParticleItem | NullItem | PluginItem | InteractItem | CameraItem | TextItem | RichTextItem | VideoItem | AudioItem | ModelMeshItem<'json'> | ModelSkyboxItem<'json'> | ModelTreeItem<'json'> | ModelLightItem | ModelCameraItem | SpineItem | CompositionItem | ModelMeshItem<'studio'> | ModelSkyboxItem<'studio'> | ModelTreeItem<'studio'>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { DataPath } from './components';
|
|
2
|
+
import type { EffectsObjectData } from './effects-object-data';
|
|
3
|
+
import type { Vector4Data, ColorData, Vector2Data } from './math';
|
|
4
|
+
export interface MaterialTextureProperty {
|
|
5
|
+
texture: DataPath;
|
|
6
|
+
offset?: Vector2Data;
|
|
7
|
+
scale?: Vector2Data;
|
|
8
|
+
}
|
|
9
|
+
export interface MaterialData extends EffectsObjectData {
|
|
10
|
+
shader: DataPath;
|
|
11
|
+
blending?: boolean;
|
|
12
|
+
zWrite?: boolean;
|
|
13
|
+
zTest?: boolean;
|
|
14
|
+
stringTags: Record<string, string>;
|
|
15
|
+
macros: string[];
|
|
16
|
+
ints: Record<string, number>;
|
|
17
|
+
floats: Record<string, number>;
|
|
18
|
+
vector4s: Record<string, Vector4Data>;
|
|
19
|
+
colors: Record<string, ColorData>;
|
|
20
|
+
textures: Record<string, MaterialTextureProperty>;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/math/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -72,7 +72,15 @@ export declare enum ValueType {
|
|
|
72
72
|
/**
|
|
73
73
|
* 贝塞尔曲线四元数
|
|
74
74
|
*/
|
|
75
|
-
BEZIER_CURVE_QUAT = 23
|
|
75
|
+
BEZIER_CURVE_QUAT = 23,
|
|
76
|
+
/**
|
|
77
|
+
* 颜色曲线
|
|
78
|
+
*/
|
|
79
|
+
COLOR_CURVE = 24,
|
|
80
|
+
/**
|
|
81
|
+
* Vector4 曲线
|
|
82
|
+
*/
|
|
83
|
+
VECTOR4_CURVE = 25
|
|
76
84
|
}
|
|
77
85
|
export type vec2 = [x: number, y: number];
|
|
78
86
|
export type vec3 = [x: number, y: number, z: number];
|
package/es/number-expression.js
CHANGED
|
@@ -75,6 +75,14 @@ export var ValueType;
|
|
|
75
75
|
* 贝塞尔曲线四元数
|
|
76
76
|
*/
|
|
77
77
|
ValueType[ValueType["BEZIER_CURVE_QUAT"] = 23] = "BEZIER_CURVE_QUAT";
|
|
78
|
+
/**
|
|
79
|
+
* 颜色曲线
|
|
80
|
+
*/
|
|
81
|
+
ValueType[ValueType["COLOR_CURVE"] = 24] = "COLOR_CURVE";
|
|
82
|
+
/**
|
|
83
|
+
* Vector4 曲线
|
|
84
|
+
*/
|
|
85
|
+
ValueType[ValueType["VECTOR4_CURVE"] = 25] = "VECTOR4_CURVE";
|
|
78
86
|
})(ValueType || (ValueType = {}));
|
|
79
87
|
/**
|
|
80
88
|
* 关键帧类型
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/scene.d.ts
CHANGED
|
@@ -4,10 +4,15 @@ import type { PlayerVersion, ShapeGeometry } from './type';
|
|
|
4
4
|
import type { TextureDefine } from './texture';
|
|
5
5
|
import type { FontBase, FontDefine } from './text';
|
|
6
6
|
import type { BinaryFile } from './binary';
|
|
7
|
-
import type { ComponentData
|
|
7
|
+
import type { ComponentData } from './components';
|
|
8
8
|
import type { VFXItemData } from './vfx-item-data';
|
|
9
9
|
import type { AnimationClipData } from './animation-clip-data';
|
|
10
10
|
import type { AssetBase, ImageSource } from './assets';
|
|
11
|
+
import type { RenderSettings } from './render-settings';
|
|
12
|
+
import type { EffectsObjectData } from './effects-object-data';
|
|
13
|
+
import type { MaterialData } from './material-data';
|
|
14
|
+
import type { GeometryData } from './geometry-data';
|
|
15
|
+
import type { ShaderData } from './shader-data';
|
|
11
16
|
/**
|
|
12
17
|
* runtime 2.0 之前的场景信息
|
|
13
18
|
* 素材信息存放于统一数据结构中
|
|
@@ -129,6 +134,10 @@ export interface JSONScene {
|
|
|
129
134
|
* 渲染所需合成列表
|
|
130
135
|
*/
|
|
131
136
|
compositions: CompositionData[];
|
|
137
|
+
/**
|
|
138
|
+
* 渲染配置
|
|
139
|
+
*/
|
|
140
|
+
renderSettings?: RenderSettings;
|
|
132
141
|
/******************************** 以下皆为可复用信息,加载在对应 Manager 中 *******************************/
|
|
133
142
|
/**
|
|
134
143
|
* 贴图信息
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/texture.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { DataType, EffectsObjectData } from '../../components';
|
|
2
1
|
import type { RGBAColorValue } from '../../number-expression';
|
|
3
2
|
import type { ColorOverLifetime } from '../../type';
|
|
3
|
+
import type { DataType } from '../../data-type';
|
|
4
|
+
import type { EffectsObjectData } from '../../effects-object-data';
|
|
4
5
|
export interface SpriteColorPlayableAssetData extends EffectsObjectData {
|
|
5
6
|
dataType: DataType.SpriteColorPlayableAsset;
|
|
6
7
|
colorOverLifetime?: ColorOverLifetime;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { EffectsObjectData } from '../../effects-object-data';
|
|
2
2
|
import type { SizeOverLifetime, RotationOverLifetime, PositionOverLifetime } from '../../type';
|
|
3
|
+
import type { DataType } from '../../data-type';
|
|
3
4
|
export interface TransformPlayableAssetData extends EffectsObjectData {
|
|
4
5
|
dataType: DataType.TransformPlayableAsset;
|
|
5
6
|
/**
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DataPath } from '../components';
|
|
2
|
+
import type { DataType } from '../data-type';
|
|
3
|
+
import type { EffectsObjectData } from '../effects-object-data';
|
|
2
4
|
export interface TimelineAssetData extends EffectsObjectData {
|
|
3
5
|
dataType: DataType.TimelineAsset;
|
|
4
6
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { DataPath
|
|
1
|
+
import type { DataPath } from '../../components';
|
|
2
2
|
import type { TimelineClipData } from '../timeline-clip-data';
|
|
3
|
+
import type { EffectsObjectData } from '../../effects-object-data';
|
|
3
4
|
export interface TrackAssetData extends EffectsObjectData {
|
|
4
5
|
/**
|
|
5
6
|
* 子轨道数据(TrackAssetData)
|
package/es/type.d.ts
CHANGED
|
@@ -528,6 +528,14 @@ export declare enum ItemType {
|
|
|
528
528
|
* 特效元素
|
|
529
529
|
*/
|
|
530
530
|
effect = "effect",
|
|
531
|
+
/**
|
|
532
|
+
* 形状元素
|
|
533
|
+
*/
|
|
534
|
+
shape = "shape",
|
|
535
|
+
/**
|
|
536
|
+
* 后处理元素
|
|
537
|
+
*/
|
|
538
|
+
postProcessVolume = "postProcessVolume",
|
|
531
539
|
/**
|
|
532
540
|
* 节点元素
|
|
533
541
|
*/
|
|
@@ -539,7 +547,11 @@ export declare enum ItemType {
|
|
|
539
547
|
/**
|
|
540
548
|
* 音频元素
|
|
541
549
|
*/
|
|
542
|
-
audio = "audio"
|
|
550
|
+
audio = "audio",
|
|
551
|
+
/**
|
|
552
|
+
* 富文本元素
|
|
553
|
+
*/
|
|
554
|
+
richtext = "richtext"
|
|
543
555
|
}
|
|
544
556
|
/**
|
|
545
557
|
* 渲染模式
|
package/es/type.js
CHANGED
|
@@ -260,6 +260,14 @@ export var ItemType;
|
|
|
260
260
|
* 特效元素
|
|
261
261
|
*/
|
|
262
262
|
ItemType["effect"] = "effect";
|
|
263
|
+
/**
|
|
264
|
+
* 形状元素
|
|
265
|
+
*/
|
|
266
|
+
ItemType["shape"] = "shape";
|
|
267
|
+
/**
|
|
268
|
+
* 后处理元素
|
|
269
|
+
*/
|
|
270
|
+
ItemType["postProcessVolume"] = "postProcessVolume";
|
|
263
271
|
/**
|
|
264
272
|
* 节点元素
|
|
265
273
|
*/
|
|
@@ -272,6 +280,10 @@ export var ItemType;
|
|
|
272
280
|
* 音频元素
|
|
273
281
|
*/
|
|
274
282
|
ItemType["audio"] = "audio";
|
|
283
|
+
/**
|
|
284
|
+
* 富文本元素
|
|
285
|
+
*/
|
|
286
|
+
ItemType["richtext"] = "richtext";
|
|
275
287
|
})(ItemType || (ItemType = {}));
|
|
276
288
|
/**
|
|
277
289
|
* 渲染模式
|
package/es/vfx-item-data.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { DataPath
|
|
1
|
+
import type { DataPath } from './components';
|
|
2
|
+
import type { EffectsObjectData } from './effects-object-data';
|
|
2
3
|
import type { EndBehavior, BaseContent, TransformData } from './item/base-item';
|
|
3
4
|
import type { ItemType, RenderLevel } from './type';
|
|
4
5
|
export interface VFXItemData extends EffectsObjectData {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/effects-specification",
|
|
3
|
-
"version": "2.1.0-alpha.
|
|
3
|
+
"version": "2.1.0-alpha.2",
|
|
4
4
|
"description": "Galacean Effects JSON Specification",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"main": "./es/index.js",
|
|
@@ -39,13 +39,12 @@
|
|
|
39
39
|
"registry": "https://registry.npmjs.org"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
|
-
"prebuild": "
|
|
43
|
-
"build": "
|
|
42
|
+
"prebuild": "pnpm clean",
|
|
43
|
+
"build": "pnpm build:lib",
|
|
44
44
|
"build:lib": "tsc -b tsconfig.build.json",
|
|
45
45
|
"lint": "eslint src --ext .ts,.mjs",
|
|
46
46
|
"lint:fix": "eslint src --fix --quiet --ext .ts,.mjs",
|
|
47
47
|
"check:ts": "tsc -b tsconfig.check.json",
|
|
48
|
-
"clean
|
|
49
|
-
"clean:lib": "rimraf es/**"
|
|
48
|
+
"clean": "rimraf es/**"
|
|
50
49
|
}
|
|
51
50
|
}
|