@galacean/effects-specification 2.1.0-beta.0 → 2.2.0-alpha.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/constants.d.ts +6 -0
- package/es/constants.js +6 -0
- 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/vector-curve-datas.d.ts +16 -0
- package/es/curve-data/vector-curve-datas.js +1 -0
- package/es/data-type.d.ts +50 -0
- package/es/data-type.js +55 -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 +17 -2
- package/es/index.js +17 -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 +33 -8
- package/es/scene.js +5 -1
- package/es/shader-data.d.ts +6 -0
- package/es/shader-data.js +1 -0
- package/es/shape/custom-shape-data.d.ts +68 -0
- package/es/shape/custom-shape-data.js +1 -0
- package/es/shape/ellipse-data.d.ts +28 -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 +28 -0
- package/es/shape/polygon-data.js +1 -0
- package/es/shape/rectangle-data.d.ts +28 -0
- package/es/shape/rectangle-data.js +1 -0
- package/es/shape/shape-component-data.d.ts +16 -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 +36 -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 +13 -12
- 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
package/es/constants.d.ts
CHANGED
|
@@ -30,5 +30,11 @@ export declare const END_BEHAVIOR_RESTART = 5;
|
|
|
30
30
|
export declare const END_BEHAVIOR_DESTROY_CHILDREN = 6;
|
|
31
31
|
export declare const CAMERA_CLIP_MODE_VERTICAL = 1;
|
|
32
32
|
export declare const CAMERA_CLIP_MODE_NORMAL = 0;
|
|
33
|
+
/**
|
|
34
|
+
* 消息开始
|
|
35
|
+
*/
|
|
33
36
|
export declare const MESSAGE_ITEM_PHRASE_BEGIN = 2;
|
|
37
|
+
/**
|
|
38
|
+
* 消息结束
|
|
39
|
+
*/
|
|
34
40
|
export declare const MESSAGE_ITEM_PHRASE_END = 1;
|
package/es/constants.js
CHANGED
|
@@ -30,5 +30,11 @@ export const END_BEHAVIOR_RESTART = 5;
|
|
|
30
30
|
export const END_BEHAVIOR_DESTROY_CHILDREN = 6;
|
|
31
31
|
export const CAMERA_CLIP_MODE_VERTICAL = 1;
|
|
32
32
|
export const CAMERA_CLIP_MODE_NORMAL = 0;
|
|
33
|
+
/**
|
|
34
|
+
* 消息开始
|
|
35
|
+
*/
|
|
33
36
|
export const MESSAGE_ITEM_PHRASE_BEGIN = 2;
|
|
37
|
+
/**
|
|
38
|
+
* 消息结束
|
|
39
|
+
*/
|
|
34
40
|
export const MESSAGE_ITEM_PHRASE_END = 1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { BezierValue } from '../number-expression';
|
|
2
|
+
export type Vector4CurveData = [
|
|
3
|
+
x: BezierValue,
|
|
4
|
+
y: BezierValue,
|
|
5
|
+
z: BezierValue,
|
|
6
|
+
w: BezierValue
|
|
7
|
+
];
|
|
8
|
+
export type Vector3CurveData = [
|
|
9
|
+
x: BezierValue,
|
|
10
|
+
y: BezierValue,
|
|
11
|
+
z: BezierValue
|
|
12
|
+
];
|
|
13
|
+
export type Vector2CurveData = [
|
|
14
|
+
x: BezierValue,
|
|
15
|
+
y: BezierValue
|
|
16
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export declare enum DataType {
|
|
2
|
+
VFXItemData = "VFXItemData",
|
|
3
|
+
Material = "Material",
|
|
4
|
+
Shader = "Shader",
|
|
5
|
+
Geometry = "Geometry",
|
|
6
|
+
Texture = "Texture",
|
|
7
|
+
Image = "Image",
|
|
8
|
+
AnimationClip = "AnimationClip",
|
|
9
|
+
BinaryAsset = "BinaryAsset",
|
|
10
|
+
TrackAsset = "TrackAsset",
|
|
11
|
+
TimelineAsset = "TimelineAsset",
|
|
12
|
+
ObjectBindingTrack = "ObjectBindingTrack",
|
|
13
|
+
TransformTrack = "TransformTrack",
|
|
14
|
+
SpriteColorTrack = "SpriteColorTrack",
|
|
15
|
+
ActivationTrack = "ActivationTrack",
|
|
16
|
+
SubCompositionTrack = "SubCompositionTrack",
|
|
17
|
+
FloatPropertyTrack = "FloatPropertyTrack",
|
|
18
|
+
ColorPropertyTrack = "ColorPropertyTrack",
|
|
19
|
+
Vector2PropertyTrack = "Vector2PropertyTrack",
|
|
20
|
+
Vector4PropertyTrack = "Vector4PropertyTrack",
|
|
21
|
+
TransformPlayableAsset = "TransformPlayableAsset",
|
|
22
|
+
SpriteColorPlayableAsset = "SpriteColorPlayableAsset",
|
|
23
|
+
ActivationPlayableAsset = "ActivationPlayableAsset",
|
|
24
|
+
SubCompositionPlayableAsset = "SubCompositionPlayableAsset",
|
|
25
|
+
FloatPropertyPlayableAsset = "FloatPropertyPlayableAsset",
|
|
26
|
+
ColorPropertyPlayableAsset = "ColorPropertyPlayableAsset",
|
|
27
|
+
Vector2PropertyPlayableAsset = "Vector2PropertyPlayableAsset",
|
|
28
|
+
Vector4PropertyPlayableAsset = "Vector4PropertyPlayableAsset",
|
|
29
|
+
MeshComponent = "MeshComponent",
|
|
30
|
+
SkyboxComponent = "SkyboxComponent",
|
|
31
|
+
LightComponent = "LightComponent",
|
|
32
|
+
CameraComponent = "CameraComponent",
|
|
33
|
+
ModelPluginComponent = "ModelPluginComponent",
|
|
34
|
+
TreeComponent = "TreeComponent",
|
|
35
|
+
AnimationComponent = "AnimationComponent",
|
|
36
|
+
SpineComponent = "SpineComponent",
|
|
37
|
+
VideoComponent = "VideoComponent",
|
|
38
|
+
AudioComponent = "AudioComponent",
|
|
39
|
+
RichTextComponent = "RichTextComponent",
|
|
40
|
+
OrientationComponent = "OrientationComponent",
|
|
41
|
+
ShapeComponent = "ShapeComponent",
|
|
42
|
+
SpriteComponent = "SpriteComponent",
|
|
43
|
+
ParticleSystem = "ParticleSystem",
|
|
44
|
+
InteractComponent = "InteractComponent",
|
|
45
|
+
CameraController = "CameraController",
|
|
46
|
+
PostProcessVolume = "PostProcessVolume",
|
|
47
|
+
EffectComponent = "EffectComponent",
|
|
48
|
+
TextComponent = "TextComponent",
|
|
49
|
+
TimelineClip = "TimelineClip"
|
|
50
|
+
}
|
package/es/data-type.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export var DataType;
|
|
2
|
+
(function (DataType) {
|
|
3
|
+
DataType["VFXItemData"] = "VFXItemData";
|
|
4
|
+
// Assets
|
|
5
|
+
DataType["Material"] = "Material";
|
|
6
|
+
DataType["Shader"] = "Shader";
|
|
7
|
+
DataType["Geometry"] = "Geometry";
|
|
8
|
+
DataType["Texture"] = "Texture";
|
|
9
|
+
DataType["Image"] = "Image";
|
|
10
|
+
DataType["AnimationClip"] = "AnimationClip";
|
|
11
|
+
DataType["BinaryAsset"] = "BinaryAsset";
|
|
12
|
+
// Timeline
|
|
13
|
+
DataType["TrackAsset"] = "TrackAsset";
|
|
14
|
+
DataType["TimelineAsset"] = "TimelineAsset";
|
|
15
|
+
DataType["ObjectBindingTrack"] = "ObjectBindingTrack";
|
|
16
|
+
DataType["TransformTrack"] = "TransformTrack";
|
|
17
|
+
DataType["SpriteColorTrack"] = "SpriteColorTrack";
|
|
18
|
+
DataType["ActivationTrack"] = "ActivationTrack";
|
|
19
|
+
DataType["SubCompositionTrack"] = "SubCompositionTrack";
|
|
20
|
+
DataType["FloatPropertyTrack"] = "FloatPropertyTrack";
|
|
21
|
+
DataType["ColorPropertyTrack"] = "ColorPropertyTrack";
|
|
22
|
+
DataType["Vector2PropertyTrack"] = "Vector2PropertyTrack";
|
|
23
|
+
DataType["Vector4PropertyTrack"] = "Vector4PropertyTrack";
|
|
24
|
+
DataType["TransformPlayableAsset"] = "TransformPlayableAsset";
|
|
25
|
+
DataType["SpriteColorPlayableAsset"] = "SpriteColorPlayableAsset";
|
|
26
|
+
DataType["ActivationPlayableAsset"] = "ActivationPlayableAsset";
|
|
27
|
+
DataType["SubCompositionPlayableAsset"] = "SubCompositionPlayableAsset";
|
|
28
|
+
DataType["FloatPropertyPlayableAsset"] = "FloatPropertyPlayableAsset";
|
|
29
|
+
DataType["ColorPropertyPlayableAsset"] = "ColorPropertyPlayableAsset";
|
|
30
|
+
DataType["Vector2PropertyPlayableAsset"] = "Vector2PropertyPlayableAsset";
|
|
31
|
+
DataType["Vector4PropertyPlayableAsset"] = "Vector4PropertyPlayableAsset";
|
|
32
|
+
// Components
|
|
33
|
+
DataType["MeshComponent"] = "MeshComponent";
|
|
34
|
+
DataType["SkyboxComponent"] = "SkyboxComponent";
|
|
35
|
+
DataType["LightComponent"] = "LightComponent";
|
|
36
|
+
DataType["CameraComponent"] = "CameraComponent";
|
|
37
|
+
DataType["ModelPluginComponent"] = "ModelPluginComponent";
|
|
38
|
+
DataType["TreeComponent"] = "TreeComponent";
|
|
39
|
+
DataType["AnimationComponent"] = "AnimationComponent";
|
|
40
|
+
DataType["SpineComponent"] = "SpineComponent";
|
|
41
|
+
DataType["VideoComponent"] = "VideoComponent";
|
|
42
|
+
DataType["AudioComponent"] = "AudioComponent";
|
|
43
|
+
DataType["RichTextComponent"] = "RichTextComponent";
|
|
44
|
+
DataType["OrientationComponent"] = "OrientationComponent";
|
|
45
|
+
DataType["ShapeComponent"] = "ShapeComponent";
|
|
46
|
+
DataType["SpriteComponent"] = "SpriteComponent";
|
|
47
|
+
DataType["ParticleSystem"] = "ParticleSystem";
|
|
48
|
+
DataType["InteractComponent"] = "InteractComponent";
|
|
49
|
+
DataType["CameraController"] = "CameraController";
|
|
50
|
+
DataType["PostProcessVolume"] = "PostProcessVolume";
|
|
51
|
+
DataType["EffectComponent"] = "EffectComponent";
|
|
52
|
+
DataType["TextComponent"] = "TextComponent";
|
|
53
|
+
// Non-EffectObject
|
|
54
|
+
DataType["TimelineClip"] = "TimelineClip";
|
|
55
|
+
})(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,11 @@
|
|
|
1
|
+
import { JSONSceneVersion } from './scene';
|
|
1
2
|
export * from './type';
|
|
2
3
|
export * from './composition';
|
|
3
|
-
export * from './
|
|
4
|
+
export * from './texture';
|
|
4
5
|
export * from './constants';
|
|
5
6
|
export * from './number-expression';
|
|
6
7
|
export * from './scene';
|
|
8
|
+
export * from './math';
|
|
7
9
|
export * from './item';
|
|
8
10
|
export * from './item/base-item';
|
|
9
11
|
export * from './item/camera-item';
|
|
@@ -17,12 +19,25 @@ export * from './item/sprite-item';
|
|
|
17
19
|
export * from './item/spine-item';
|
|
18
20
|
export * from './item/effect-item';
|
|
19
21
|
export * from './item/text-item';
|
|
22
|
+
export * from './item/rich-text-item';
|
|
23
|
+
export * from './item/video-item';
|
|
24
|
+
export * from './item/audio-item';
|
|
20
25
|
export * from './item/model';
|
|
21
26
|
export * from './vfx-item-data';
|
|
22
27
|
export * from './animation-clip-data';
|
|
23
28
|
export * from './binary';
|
|
24
29
|
export * from './text';
|
|
25
30
|
export * from './components';
|
|
26
|
-
export * from './vfx-item-data';
|
|
27
31
|
export * from './buitin-object-guid';
|
|
32
|
+
export * from './shape';
|
|
28
33
|
export * from './timeline';
|
|
34
|
+
export * from './assets';
|
|
35
|
+
export * from './render-settings';
|
|
36
|
+
export * from './curve-data';
|
|
37
|
+
export * from './data-type';
|
|
38
|
+
export * from './effects-object-data';
|
|
39
|
+
export * from './material-data';
|
|
40
|
+
export * from './geometry-data';
|
|
41
|
+
export * from './shader-data';
|
|
42
|
+
export * from './effects-package-data';
|
|
43
|
+
export declare const LATEST_VERSION = JSONSceneVersion['LATEST'];
|
package/es/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { JSONSceneVersion } from './scene';
|
|
1
2
|
export * from './type';
|
|
2
3
|
export * from './composition';
|
|
3
|
-
export * from './
|
|
4
|
+
export * from './texture';
|
|
4
5
|
export * from './constants';
|
|
5
6
|
export * from './number-expression';
|
|
6
7
|
export * from './scene';
|
|
8
|
+
export * from './math';
|
|
7
9
|
export * from './item';
|
|
8
10
|
export * from './item/base-item';
|
|
9
11
|
export * from './item/camera-item';
|
|
@@ -17,12 +19,25 @@ export * from './item/sprite-item';
|
|
|
17
19
|
export * from './item/spine-item';
|
|
18
20
|
export * from './item/effect-item';
|
|
19
21
|
export * from './item/text-item';
|
|
22
|
+
export * from './item/rich-text-item';
|
|
23
|
+
export * from './item/video-item';
|
|
24
|
+
export * from './item/audio-item';
|
|
20
25
|
export * from './item/model';
|
|
21
26
|
export * from './vfx-item-data';
|
|
22
27
|
export * from './animation-clip-data';
|
|
23
28
|
export * from './binary';
|
|
24
29
|
export * from './text';
|
|
25
30
|
export * from './components';
|
|
26
|
-
export * from './vfx-item-data';
|
|
27
31
|
export * from './buitin-object-guid';
|
|
32
|
+
export * from './shape';
|
|
28
33
|
export * from './timeline';
|
|
34
|
+
export * from './assets';
|
|
35
|
+
export * from './render-settings';
|
|
36
|
+
export * from './curve-data';
|
|
37
|
+
export * from './data-type';
|
|
38
|
+
export * from './effects-object-data';
|
|
39
|
+
export * from './material-data';
|
|
40
|
+
export * from './geometry-data';
|
|
41
|
+
export * from './shader-data';
|
|
42
|
+
export * from './effects-package-data';
|
|
43
|
+
export const LATEST_VERSION = JSONSceneVersion.LATEST;
|