@galacean/effects-specification 2.1.0-beta.0 → 2.1.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.
- package/es/animation-clip-data.d.ts +1 -1
- package/es/assets.d.ts +95 -0
- package/es/assets.js +18 -0
- package/es/binary.d.ts +2 -1
- package/es/buitin-object-guid.d.ts +1 -0
- package/es/buitin-object-guid.js +1 -0
- 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 +38 -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 +47 -0
- package/es/data-type.js +50 -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 -95
- package/es/{components.js → geometry-data.js} +0 -39
- package/es/index.d.ts +15 -2
- package/es/index.js +15 -2
- package/es/item/audio-item.d.ts +46 -0
- package/es/item/audio-item.js +1 -0
- package/es/item/base-item.d.ts +3 -10
- package/es/item/effect-item.d.ts +6 -0
- package/es/item/interact-item.d.ts +1 -5
- package/es/item/model/light.d.ts +6 -1
- package/es/item/model/render.d.ts +5 -1
- package/es/item/model/render.js +4 -0
- 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 +3 -68
- package/es/item/particle-shape.d.ts +12 -12
- 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 +7 -2
- package/es/item/sprite-item.d.ts +1 -43
- package/es/item/text-item.d.ts +35 -64
- package/es/item/video-item.d.ts +82 -0
- package/es/item/video-item.js +1 -0
- package/es/item.d.ts +4 -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 +18 -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 +28 -7
- package/es/shader-data.d.ts +6 -0
- package/es/shader-data.js +1 -0
- package/es/shape/custom-shape-data.d.ts +73 -0
- package/es/shape/custom-shape-data.js +1 -0
- package/es/shape/ellipse-data.d.ts +33 -0
- package/es/shape/ellipse-data.js +1 -0
- package/es/shape/index.d.ts +9 -0
- package/es/shape/index.js +9 -0
- package/es/shape/polygon-data.d.ts +33 -0
- package/es/shape/polygon-data.js +1 -0
- package/es/shape/rectangle-data.d.ts +33 -0
- package/es/shape/rectangle-data.js +1 -0
- package/es/shape/shape-component-data.d.ts +11 -0
- package/es/shape/shape-component-data.js +1 -0
- package/es/shape/shape-fill-param.d.ts +10 -0
- package/es/shape/shape-fill-param.js +1 -0
- package/es/shape/shape-primitive-type.d.ts +25 -0
- package/es/shape/shape-primitive-type.js +26 -0
- package/es/shape/shape-stroke-param.d.ts +26 -0
- package/es/shape/shape-stroke-param.js +8 -0
- package/es/shape/star-data.d.ts +41 -0
- package/es/shape/star-data.js +1 -0
- package/es/texture.d.ts +48 -0
- package/es/texture.js +1 -0
- 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 +25 -16
- package/es/type.js +33 -13
- package/es/vfx-item-data.d.ts +2 -1
- package/package.json +4 -5
- package/es/image.d.ts +0 -123
- package/es/image.js +0 -9
|
@@ -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/assets.d.ts
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { RenderLevel } from './type';
|
|
2
|
+
/**
|
|
3
|
+
* 资源基类
|
|
4
|
+
*/
|
|
5
|
+
export interface AssetBase {
|
|
6
|
+
/**
|
|
7
|
+
* 资源 ID
|
|
8
|
+
*/
|
|
9
|
+
id: string;
|
|
10
|
+
/**
|
|
11
|
+
* 资源类型
|
|
12
|
+
*/
|
|
13
|
+
url: string;
|
|
14
|
+
/**
|
|
15
|
+
* 渲染等级
|
|
16
|
+
* 如果没有设置,按照 B+ 处理
|
|
17
|
+
*/
|
|
18
|
+
renderLevel?: RenderLevel;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 动态换图类型
|
|
22
|
+
* @since 1.1.0
|
|
23
|
+
*/
|
|
24
|
+
export declare enum BackgroundType {
|
|
25
|
+
video = "video",
|
|
26
|
+
image = "image"
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 多媒体资源类型
|
|
30
|
+
* @since 2.1.0
|
|
31
|
+
*/
|
|
32
|
+
export declare enum MultimediaType {
|
|
33
|
+
video = "video",
|
|
34
|
+
audio = "audio"
|
|
35
|
+
}
|
|
36
|
+
export interface TemplateContent {
|
|
37
|
+
/**
|
|
38
|
+
* 当 template 宽高和 image 不相同时,会对 template 进行缩放,使其和 image 相同。
|
|
39
|
+
*/
|
|
40
|
+
width: number;
|
|
41
|
+
height: number;
|
|
42
|
+
background?: {
|
|
43
|
+
type: BackgroundType;
|
|
44
|
+
name: string;
|
|
45
|
+
url: string | HTMLImageElement;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export type TemplateVariables = Record<string, string | string[] | HTMLImageElement | HTMLImageElement[]>;
|
|
49
|
+
export type ImageSource = Image | TemplateImage | CompressedImage;
|
|
50
|
+
/**
|
|
51
|
+
* 纹理贴图属性
|
|
52
|
+
*/
|
|
53
|
+
export interface Image extends AssetBase {
|
|
54
|
+
/**
|
|
55
|
+
* WebP 地址
|
|
56
|
+
* 如果运行时支持 WebP,则优先使用 WebP
|
|
57
|
+
*/
|
|
58
|
+
webp?: string;
|
|
59
|
+
/**
|
|
60
|
+
* AVIF 地址
|
|
61
|
+
* 如果运行时支持 AVIF,则优先使用 AVIF
|
|
62
|
+
* @since 2.0.0
|
|
63
|
+
*/
|
|
64
|
+
avif?: string;
|
|
65
|
+
/**
|
|
66
|
+
* 是否使用 mipmap
|
|
67
|
+
* loader 发布压缩纹理的时候会根据此参数决定是否生成压缩纹理
|
|
68
|
+
* @default false
|
|
69
|
+
*/
|
|
70
|
+
mipmap?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* 图片 Y 轴的方向,如果 Y 轴向上(与 OpenGL 相同)则为 1
|
|
73
|
+
* 如果 Y 轴向下(与 OpenGL 相反)则为 -1,图片再绘制数据模板的时候需要翻转绘制
|
|
74
|
+
* @default 1
|
|
75
|
+
*/
|
|
76
|
+
oriY?: 1 | -1;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* 模板贴图属性
|
|
80
|
+
*/
|
|
81
|
+
export interface TemplateImage extends Image {
|
|
82
|
+
template: TemplateContent;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* 压缩贴图属性
|
|
86
|
+
*/
|
|
87
|
+
export interface CompressedImage extends Image {
|
|
88
|
+
/**
|
|
89
|
+
* 压缩贴图地址
|
|
90
|
+
*/
|
|
91
|
+
compressed: {
|
|
92
|
+
astc?: string;
|
|
93
|
+
pvrtc?: string;
|
|
94
|
+
};
|
|
95
|
+
}
|
package/es/assets.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
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 = {}));
|
|
10
|
+
/**
|
|
11
|
+
* 多媒体资源类型
|
|
12
|
+
* @since 2.1.0
|
|
13
|
+
*/
|
|
14
|
+
export var MultimediaType;
|
|
15
|
+
(function (MultimediaType) {
|
|
16
|
+
MultimediaType["video"] = "video";
|
|
17
|
+
MultimediaType["audio"] = "audio";
|
|
18
|
+
})(MultimediaType || (MultimediaType = {}));
|
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
|
package/es/buitin-object-guid.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ComponentData } from './component-data';
|
|
2
|
+
export interface PostProcessVolumeData extends ComponentData {
|
|
3
|
+
/**
|
|
4
|
+
* 泛光
|
|
5
|
+
*/
|
|
6
|
+
bloom?: Bloom;
|
|
7
|
+
/**
|
|
8
|
+
* 颜色调整
|
|
9
|
+
*/
|
|
10
|
+
colorAdjustments?: ColorAdjustments;
|
|
11
|
+
/**
|
|
12
|
+
* 晕影
|
|
13
|
+
*/
|
|
14
|
+
vignette?: Vignette;
|
|
15
|
+
/**
|
|
16
|
+
* 色调映射
|
|
17
|
+
*/
|
|
18
|
+
tonemapping?: Tonemapping;
|
|
19
|
+
}
|
|
20
|
+
export interface PostProcessEffectSettings {
|
|
21
|
+
active: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface Bloom extends PostProcessEffectSettings {
|
|
24
|
+
threshold: number;
|
|
25
|
+
intensity: number;
|
|
26
|
+
}
|
|
27
|
+
export interface Tonemapping extends PostProcessEffectSettings {
|
|
28
|
+
}
|
|
29
|
+
export interface ColorAdjustments extends PostProcessEffectSettings {
|
|
30
|
+
brightness: number;
|
|
31
|
+
saturation: number;
|
|
32
|
+
contrast: number;
|
|
33
|
+
}
|
|
34
|
+
export interface Vignette extends PostProcessEffectSettings {
|
|
35
|
+
intensity: number;
|
|
36
|
+
smoothness: number;
|
|
37
|
+
roundness: number;
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/es/composition.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
Image = "Image",
|
|
14
|
+
AnimationClip = "AnimationClip",
|
|
15
|
+
TextComponent = "TextComponent",
|
|
16
|
+
BinaryAsset = "BinaryAsset",
|
|
17
|
+
TrackAsset = "TrackAsset",
|
|
18
|
+
TimelineAsset = "TimelineAsset",
|
|
19
|
+
ObjectBindingTrack = "ObjectBindingTrack",
|
|
20
|
+
TransformTrack = "TransformTrack",
|
|
21
|
+
SpriteColorTrack = "SpriteColorTrack",
|
|
22
|
+
ActivationTrack = "ActivationTrack",
|
|
23
|
+
SubCompositionTrack = "SubCompositionTrack",
|
|
24
|
+
FloatPropertyTrack = "FloatPropertyTrack",
|
|
25
|
+
ColorPropertyTrack = "ColorPropertyTrack",
|
|
26
|
+
Vector4PropertyTrack = "Vector4PropertyTrack",
|
|
27
|
+
TransformPlayableAsset = "TransformPlayableAsset",
|
|
28
|
+
SpriteColorPlayableAsset = "SpriteColorPlayableAsset",
|
|
29
|
+
ActivationPlayableAsset = "ActivationPlayableAsset",
|
|
30
|
+
SubCompositionPlayableAsset = "SubCompositionPlayableAsset",
|
|
31
|
+
FloatPropertyPlayableAsset = "FloatPropertyPlayableAsset",
|
|
32
|
+
ColorPropertyPlayableAsset = "ColorPropertyPlayableAsset",
|
|
33
|
+
MeshComponent = "MeshComponent",
|
|
34
|
+
SkyboxComponent = "SkyboxComponent",
|
|
35
|
+
LightComponent = "LightComponent",
|
|
36
|
+
CameraComponent = "CameraComponent",
|
|
37
|
+
ModelPluginComponent = "ModelPluginComponent",
|
|
38
|
+
TreeComponent = "TreeComponent",
|
|
39
|
+
AnimationComponent = "AnimationComponent",
|
|
40
|
+
SpineComponent = "SpineComponent",
|
|
41
|
+
VideoComponent = "VideoComponent",
|
|
42
|
+
AudioComponent = "AudioComponent",
|
|
43
|
+
RichTextComponent = "RichTextComponent",
|
|
44
|
+
OrientationComponent = "OrientationComponent",
|
|
45
|
+
ShapeComponent = "ShapeComponent",
|
|
46
|
+
TimelineClip = "TimelineClip"
|
|
47
|
+
}
|
package/es/data-type.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
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["Image"] = "Image";
|
|
15
|
+
DataType["AnimationClip"] = "AnimationClip";
|
|
16
|
+
DataType["TextComponent"] = "TextComponent";
|
|
17
|
+
DataType["BinaryAsset"] = "BinaryAsset";
|
|
18
|
+
// Timeline
|
|
19
|
+
DataType["TrackAsset"] = "TrackAsset";
|
|
20
|
+
DataType["TimelineAsset"] = "TimelineAsset";
|
|
21
|
+
DataType["ObjectBindingTrack"] = "ObjectBindingTrack";
|
|
22
|
+
DataType["TransformTrack"] = "TransformTrack";
|
|
23
|
+
DataType["SpriteColorTrack"] = "SpriteColorTrack";
|
|
24
|
+
DataType["ActivationTrack"] = "ActivationTrack";
|
|
25
|
+
DataType["SubCompositionTrack"] = "SubCompositionTrack";
|
|
26
|
+
DataType["FloatPropertyTrack"] = "FloatPropertyTrack";
|
|
27
|
+
DataType["ColorPropertyTrack"] = "ColorPropertyTrack";
|
|
28
|
+
DataType["Vector4PropertyTrack"] = "Vector4PropertyTrack";
|
|
29
|
+
DataType["TransformPlayableAsset"] = "TransformPlayableAsset";
|
|
30
|
+
DataType["SpriteColorPlayableAsset"] = "SpriteColorPlayableAsset";
|
|
31
|
+
DataType["ActivationPlayableAsset"] = "ActivationPlayableAsset";
|
|
32
|
+
DataType["SubCompositionPlayableAsset"] = "SubCompositionPlayableAsset";
|
|
33
|
+
DataType["FloatPropertyPlayableAsset"] = "FloatPropertyPlayableAsset";
|
|
34
|
+
DataType["ColorPropertyPlayableAsset"] = "ColorPropertyPlayableAsset";
|
|
35
|
+
DataType["MeshComponent"] = "MeshComponent";
|
|
36
|
+
DataType["SkyboxComponent"] = "SkyboxComponent";
|
|
37
|
+
DataType["LightComponent"] = "LightComponent";
|
|
38
|
+
DataType["CameraComponent"] = "CameraComponent";
|
|
39
|
+
DataType["ModelPluginComponent"] = "ModelPluginComponent";
|
|
40
|
+
DataType["TreeComponent"] = "TreeComponent";
|
|
41
|
+
DataType["AnimationComponent"] = "AnimationComponent";
|
|
42
|
+
DataType["SpineComponent"] = "SpineComponent";
|
|
43
|
+
DataType["VideoComponent"] = "VideoComponent";
|
|
44
|
+
DataType["AudioComponent"] = "AudioComponent";
|
|
45
|
+
DataType["RichTextComponent"] = "RichTextComponent";
|
|
46
|
+
DataType["OrientationComponent"] = "OrientationComponent";
|
|
47
|
+
DataType["ShapeComponent"] = "ShapeComponent";
|
|
48
|
+
// Non-EffectObject
|
|
49
|
+
DataType["TimelineClip"] = "TimelineClip";
|
|
50
|
+
})(DataType || (DataType = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,80 +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
|
-
TimelineClip = "TimelineClip"
|
|
36
|
-
}
|
|
37
|
-
export interface DataPath {
|
|
38
|
-
id: string;
|
|
39
|
-
}
|
|
40
|
-
export interface EffectsObjectData {
|
|
41
|
-
id: string;
|
|
42
|
-
name?: string;
|
|
43
|
-
dataType: DataType;
|
|
44
|
-
}
|
|
45
|
-
export interface ComponentData extends EffectsObjectData {
|
|
46
|
-
item: DataPath;
|
|
47
|
-
}
|
|
48
|
-
export interface ColorData {
|
|
49
|
-
r: number;
|
|
50
|
-
g: number;
|
|
51
|
-
b: number;
|
|
52
|
-
a: number;
|
|
53
|
-
}
|
|
54
|
-
export interface Vector4Data {
|
|
55
|
-
x: number;
|
|
56
|
-
y: number;
|
|
57
|
-
z: number;
|
|
58
|
-
w: number;
|
|
59
|
-
}
|
|
60
|
-
export interface MaterialTextureProperty {
|
|
61
|
-
texture: DataPath;
|
|
62
|
-
offset?: Vector2Data;
|
|
63
|
-
scale?: Vector2Data;
|
|
64
|
-
}
|
|
65
|
-
export interface MaterialData extends EffectsObjectData {
|
|
66
|
-
shader: DataPath;
|
|
67
|
-
blending?: boolean;
|
|
68
|
-
zWrite?: boolean;
|
|
69
|
-
zTest?: boolean;
|
|
70
|
-
stringTags: Record<string, string>;
|
|
71
|
-
macros: string[];
|
|
72
|
-
ints: Record<string, number>;
|
|
73
|
-
floats: Record<string, number>;
|
|
74
|
-
vector4s: Record<string, Vector4Data>;
|
|
75
|
-
colors: Record<string, ColorData>;
|
|
76
|
-
textures: Record<string, MaterialTextureProperty>;
|
|
77
|
-
}
|
|
1
|
+
import type { EffectsObjectData } from './effects-object-data';
|
|
78
2
|
export interface GeometryData extends EffectsObjectData {
|
|
79
3
|
vertexData: VertexData;
|
|
80
4
|
indexFormat: IndexFormatType;
|
|
@@ -188,21 +112,3 @@ export declare enum VertexBufferSemantic {
|
|
|
188
112
|
TangentBS2 = "TANGENT_BS2",
|
|
189
113
|
TangentBS3 = "TANGENT_BS3"
|
|
190
114
|
}
|
|
191
|
-
export interface ShaderData extends EffectsObjectData {
|
|
192
|
-
vertex: string;
|
|
193
|
-
fragment: string;
|
|
194
|
-
properties?: string;
|
|
195
|
-
}
|
|
196
|
-
export interface EffectComponentData extends ComponentData {
|
|
197
|
-
_priority: number;
|
|
198
|
-
materials: DataPath[];
|
|
199
|
-
geometry: DataPath;
|
|
200
|
-
}
|
|
201
|
-
export interface EffectsPackageData {
|
|
202
|
-
fileSummary: FileSummary;
|
|
203
|
-
exportObjects: EffectsObjectData[];
|
|
204
|
-
}
|
|
205
|
-
export interface FileSummary {
|
|
206
|
-
guid: string;
|
|
207
|
-
assetType: string;
|
|
208
|
-
}
|
|
@@ -1,42 +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
|
-
// Non-EffectObject
|
|
38
|
-
DataType["TimelineClip"] = "TimelineClip";
|
|
39
|
-
})(DataType || (DataType = {}));
|
|
40
1
|
export var GeometryType;
|
|
41
2
|
(function (GeometryType) {
|
|
42
3
|
/**
|
package/es/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export * from './type';
|
|
2
2
|
export * from './composition';
|
|
3
|
-
export * from './
|
|
3
|
+
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,12 +18,24 @@ 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';
|
|
22
|
+
export * from './item/video-item';
|
|
23
|
+
export * from './item/audio-item';
|
|
20
24
|
export * from './item/model';
|
|
21
25
|
export * from './vfx-item-data';
|
|
22
26
|
export * from './animation-clip-data';
|
|
23
27
|
export * from './binary';
|
|
24
28
|
export * from './text';
|
|
25
29
|
export * from './components';
|
|
26
|
-
export * from './vfx-item-data';
|
|
27
30
|
export * from './buitin-object-guid';
|
|
31
|
+
export * from './shape';
|
|
28
32
|
export * from './timeline';
|
|
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
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export * from './type';
|
|
2
2
|
export * from './composition';
|
|
3
|
-
export * from './
|
|
3
|
+
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,12 +18,24 @@ 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';
|
|
22
|
+
export * from './item/video-item';
|
|
23
|
+
export * from './item/audio-item';
|
|
20
24
|
export * from './item/model';
|
|
21
25
|
export * from './vfx-item-data';
|
|
22
26
|
export * from './animation-clip-data';
|
|
23
27
|
export * from './binary';
|
|
24
28
|
export * from './text';
|
|
25
29
|
export * from './components';
|
|
26
|
-
export * from './vfx-item-data';
|
|
27
30
|
export * from './buitin-object-guid';
|
|
31
|
+
export * from './shape';
|
|
28
32
|
export * from './timeline';
|
|
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';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ComponentData, DataPath } from '../components';
|
|
2
|
+
import type { ItemType } from '../type';
|
|
3
|
+
import type { BaseItem } from './base-item';
|
|
4
|
+
/**
|
|
5
|
+
* 音频元素
|
|
6
|
+
*/
|
|
7
|
+
export interface AudioItem extends BaseItem {
|
|
8
|
+
/**
|
|
9
|
+
* 元素类型(指定为 audio)
|
|
10
|
+
*/
|
|
11
|
+
type: ItemType.audio;
|
|
12
|
+
/**
|
|
13
|
+
* 音频元素基础属性
|
|
14
|
+
*/
|
|
15
|
+
content: AudioComponentData;
|
|
16
|
+
}
|
|
17
|
+
export interface AudioContentOptions {
|
|
18
|
+
/**
|
|
19
|
+
* 音频链接,索引到 scene 中的 audios 数组
|
|
20
|
+
*/
|
|
21
|
+
audio: DataPath;
|
|
22
|
+
/**
|
|
23
|
+
* 音频播放速度
|
|
24
|
+
* @default 1
|
|
25
|
+
*/
|
|
26
|
+
playbackRate?: number;
|
|
27
|
+
/**
|
|
28
|
+
* 是否静音播放
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
muted?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* 音频音量大小
|
|
34
|
+
* @default 1
|
|
35
|
+
*/
|
|
36
|
+
volume?: number;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* 音频组件属性
|
|
40
|
+
*/
|
|
41
|
+
export interface AudioComponentData extends ComponentData {
|
|
42
|
+
/**
|
|
43
|
+
* 音频元素基础属性
|
|
44
|
+
*/
|
|
45
|
+
options: AudioContentOptions;
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|