@galacean/effects-specification 2.6.0-alpha.0 → 2.6.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/composition.d.ts +7 -11
- package/es/data-type.d.ts +2 -0
- package/es/data-type.js +2 -0
- package/es/scene.d.ts +1 -9
- package/es/shape/index.d.ts +0 -1
- package/es/shape/index.js +0 -1
- package/es/shape/shape-component-data.d.ts +52 -4
- package/es/shape/shape-component-data.js +15 -1
- package/es/shape/shape-stroke-param.d.ts +0 -22
- package/es/texture.d.ts +2 -1
- package/es/timeline/track/track-asset-data.d.ts +1 -1
- package/package.json +1 -1
- package/es/shape/shape-fill-param.d.ts +0 -45
- package/es/shape/shape-fill-param.js +0 -18
package/es/composition.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ComponentData, DataPath } from './components';
|
|
2
|
+
import type { DataType } from './data-type';
|
|
2
3
|
import type { Item } from './item';
|
|
3
4
|
import type { EndBehavior } from './item/base-item';
|
|
4
5
|
export declare enum CameraClipMode {
|
|
@@ -86,26 +87,21 @@ export interface Composition extends CompositionBase {
|
|
|
86
87
|
}
|
|
87
88
|
/**
|
|
88
89
|
* 合成数据
|
|
89
|
-
* @deprecated Please use CompositionBase instead
|
|
90
90
|
*/
|
|
91
91
|
export interface CompositionData extends CompositionBase {
|
|
92
92
|
/**
|
|
93
|
-
*
|
|
94
|
-
*/
|
|
95
|
-
items: DataPath[];
|
|
96
|
-
/**
|
|
97
|
-
* 时间轴资产(TimelineAssetData)
|
|
98
|
-
*/
|
|
99
|
-
timelineAsset: DataPath;
|
|
100
|
-
/**
|
|
101
|
-
* 轨道的场景绑定
|
|
93
|
+
* @description 组件数据
|
|
102
94
|
*/
|
|
103
|
-
|
|
95
|
+
components: DataPath[];
|
|
104
96
|
}
|
|
105
97
|
/**
|
|
106
98
|
* 合成组件数据
|
|
107
99
|
*/
|
|
108
100
|
export interface CompositionComponentData extends ComponentData {
|
|
101
|
+
/**
|
|
102
|
+
* @description 合成组件类型 - 固定为 CompositionComponent
|
|
103
|
+
*/
|
|
104
|
+
dataType: DataType.CompositionComponent;
|
|
109
105
|
/**
|
|
110
106
|
* 元素信息
|
|
111
107
|
*/
|
package/es/data-type.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export declare enum DataType {
|
|
|
17
17
|
FloatPropertyTrack = "FloatPropertyTrack",
|
|
18
18
|
ColorPropertyTrack = "ColorPropertyTrack",
|
|
19
19
|
Vector2PropertyTrack = "Vector2PropertyTrack",
|
|
20
|
+
Vector3PropertyTrack = "Vector3PropertyTrack",
|
|
20
21
|
Vector4PropertyTrack = "Vector4PropertyTrack",
|
|
21
22
|
TransformPlayableAsset = "TransformPlayableAsset",
|
|
22
23
|
SpriteColorPlayableAsset = "SpriteColorPlayableAsset",
|
|
@@ -25,6 +26,7 @@ export declare enum DataType {
|
|
|
25
26
|
FloatPropertyPlayableAsset = "FloatPropertyPlayableAsset",
|
|
26
27
|
ColorPropertyPlayableAsset = "ColorPropertyPlayableAsset",
|
|
27
28
|
Vector2PropertyPlayableAsset = "Vector2PropertyPlayableAsset",
|
|
29
|
+
Vector3PropertyPlayableAsset = "Vector3PropertyPlayableAsset",
|
|
28
30
|
Vector4PropertyPlayableAsset = "Vector4PropertyPlayableAsset",
|
|
29
31
|
MeshComponent = "MeshComponent",
|
|
30
32
|
SkyboxComponent = "SkyboxComponent",
|
package/es/data-type.js
CHANGED
|
@@ -20,6 +20,7 @@ export var DataType;
|
|
|
20
20
|
DataType["FloatPropertyTrack"] = "FloatPropertyTrack";
|
|
21
21
|
DataType["ColorPropertyTrack"] = "ColorPropertyTrack";
|
|
22
22
|
DataType["Vector2PropertyTrack"] = "Vector2PropertyTrack";
|
|
23
|
+
DataType["Vector3PropertyTrack"] = "Vector3PropertyTrack";
|
|
23
24
|
DataType["Vector4PropertyTrack"] = "Vector4PropertyTrack";
|
|
24
25
|
DataType["TransformPlayableAsset"] = "TransformPlayableAsset";
|
|
25
26
|
DataType["SpriteColorPlayableAsset"] = "SpriteColorPlayableAsset";
|
|
@@ -28,6 +29,7 @@ export var DataType;
|
|
|
28
29
|
DataType["FloatPropertyPlayableAsset"] = "FloatPropertyPlayableAsset";
|
|
29
30
|
DataType["ColorPropertyPlayableAsset"] = "ColorPropertyPlayableAsset";
|
|
30
31
|
DataType["Vector2PropertyPlayableAsset"] = "Vector2PropertyPlayableAsset";
|
|
32
|
+
DataType["Vector3PropertyPlayableAsset"] = "Vector3PropertyPlayableAsset";
|
|
31
33
|
DataType["Vector4PropertyPlayableAsset"] = "Vector4PropertyPlayableAsset";
|
|
32
34
|
// Components
|
|
33
35
|
DataType["MeshComponent"] = "MeshComponent";
|
package/es/scene.d.ts
CHANGED
|
@@ -153,17 +153,9 @@ export interface JSONScene {
|
|
|
153
153
|
* 贴图信息
|
|
154
154
|
*/
|
|
155
155
|
images: ImageSource[];
|
|
156
|
-
/**
|
|
157
|
-
* 根据合成 ID,每个合成用到的 image 的数组索引
|
|
158
|
-
*/
|
|
159
|
-
imgUsage?: Record<string, number[]>;
|
|
160
|
-
/**
|
|
161
|
-
* 根据合成 ID,每个合成用到的 bin 的数组索引
|
|
162
|
-
*/
|
|
163
|
-
binUsage?: Record<string, number[]>;
|
|
164
156
|
/**
|
|
165
157
|
* 插件类型信息
|
|
166
|
-
* 'model
|
|
158
|
+
* 'model'
|
|
167
159
|
*/
|
|
168
160
|
plugins: string[];
|
|
169
161
|
/**
|
package/es/shape/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ export * from './ellipse-data';
|
|
|
3
3
|
export * from './polygon-data';
|
|
4
4
|
export * from './rectangle-data';
|
|
5
5
|
export * from './shape-component-data';
|
|
6
|
-
export * from './shape-fill-param';
|
|
7
6
|
export * from './shape-primitive-type';
|
|
8
7
|
export * from './shape-stroke-param';
|
|
9
8
|
export * from './star-data';
|
package/es/shape/index.js
CHANGED
|
@@ -3,7 +3,6 @@ export * from './ellipse-data';
|
|
|
3
3
|
export * from './polygon-data';
|
|
4
4
|
export * from './rectangle-data';
|
|
5
5
|
export * from './shape-component-data';
|
|
6
|
-
export * from './shape-fill-param';
|
|
7
6
|
export * from './shape-primitive-type';
|
|
8
7
|
export * from './shape-stroke-param';
|
|
9
8
|
export * from './star-data';
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { RenderMode, SideMode, BlendingMode } from '../type';
|
|
2
2
|
import type { ComponentData, DataPath } from '../components/component-data';
|
|
3
3
|
import type { MaskOptions } from '../item/base-item';
|
|
4
|
-
import type { ShapeFillParam } from './shape-fill-param';
|
|
5
4
|
import type { ShapePrimitiveType } from './shape-primitive-type';
|
|
6
|
-
import type {
|
|
5
|
+
import type { LineCap, LineJoin } from './shape-stroke-param';
|
|
6
|
+
import type { Vector2Data } from '../math/vector-data';
|
|
7
|
+
import type { GradientColor } from '../number-expression';
|
|
8
|
+
import type { ColorData } from '../math/color-data';
|
|
7
9
|
/**
|
|
8
10
|
* 矢量图形组件
|
|
9
11
|
*/
|
|
@@ -12,14 +14,17 @@ export interface ShapeComponentData extends ComponentData {
|
|
|
12
14
|
* 矢量类型
|
|
13
15
|
*/
|
|
14
16
|
type: ShapePrimitiveType;
|
|
17
|
+
strokeWidth?: number;
|
|
18
|
+
strokeCap?: LineCap;
|
|
19
|
+
strokeJoin?: LineJoin;
|
|
15
20
|
/**
|
|
16
21
|
* 描边属性
|
|
17
22
|
*/
|
|
18
|
-
|
|
23
|
+
strokes: PaintData[];
|
|
19
24
|
/**
|
|
20
25
|
* 填充属性
|
|
21
26
|
*/
|
|
22
|
-
|
|
27
|
+
fills: PaintData[];
|
|
23
28
|
/**
|
|
24
29
|
* 蒙版属性,传入表示需要作为蒙版/被遮挡/反向遮挡
|
|
25
30
|
*/
|
|
@@ -37,3 +42,46 @@ export interface ShapeRendererOptions {
|
|
|
37
42
|
blending?: BlendingMode;
|
|
38
43
|
texture?: DataPath;
|
|
39
44
|
}
|
|
45
|
+
export type PaintData = SolidPaintData | GradientPaintData | TexturePaintData;
|
|
46
|
+
export declare enum FillType {
|
|
47
|
+
Solid = 0,
|
|
48
|
+
GradientLinear = 1,
|
|
49
|
+
GradientRadial = 2,
|
|
50
|
+
GradientAngular = 3,
|
|
51
|
+
Texture = 4
|
|
52
|
+
}
|
|
53
|
+
export interface SolidPaintData {
|
|
54
|
+
type: FillType.Solid;
|
|
55
|
+
/**
|
|
56
|
+
* 填充颜色
|
|
57
|
+
*/
|
|
58
|
+
color: ColorData;
|
|
59
|
+
}
|
|
60
|
+
export interface GradientPaintData {
|
|
61
|
+
type: FillType.GradientLinear | FillType.GradientAngular | FillType.GradientRadial;
|
|
62
|
+
/**
|
|
63
|
+
* 渐变颜色
|
|
64
|
+
*/
|
|
65
|
+
gradientStops: GradientColor;
|
|
66
|
+
/**
|
|
67
|
+
* 渐变起点
|
|
68
|
+
*/
|
|
69
|
+
startPoint: Vector2Data;
|
|
70
|
+
/**
|
|
71
|
+
* 渐变终点
|
|
72
|
+
*/
|
|
73
|
+
endPoint: Vector2Data;
|
|
74
|
+
}
|
|
75
|
+
export interface TexturePaintData {
|
|
76
|
+
type: FillType.Texture;
|
|
77
|
+
texture: DataPath;
|
|
78
|
+
scaleMode: TexturePaintScaleMode;
|
|
79
|
+
scalingFactor?: number;
|
|
80
|
+
opacity?: number;
|
|
81
|
+
}
|
|
82
|
+
export declare enum TexturePaintScaleMode {
|
|
83
|
+
Fill = 0,
|
|
84
|
+
Fit = 1,
|
|
85
|
+
Crop = 2,
|
|
86
|
+
Tile = 3
|
|
87
|
+
}
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var FillType;
|
|
2
|
+
(function (FillType) {
|
|
3
|
+
FillType[FillType["Solid"] = 0] = "Solid";
|
|
4
|
+
FillType[FillType["GradientLinear"] = 1] = "GradientLinear";
|
|
5
|
+
FillType[FillType["GradientRadial"] = 2] = "GradientRadial";
|
|
6
|
+
FillType[FillType["GradientAngular"] = 3] = "GradientAngular";
|
|
7
|
+
FillType[FillType["Texture"] = 4] = "Texture";
|
|
8
|
+
})(FillType || (FillType = {}));
|
|
9
|
+
export var TexturePaintScaleMode;
|
|
10
|
+
(function (TexturePaintScaleMode) {
|
|
11
|
+
TexturePaintScaleMode[TexturePaintScaleMode["Fill"] = 0] = "Fill";
|
|
12
|
+
TexturePaintScaleMode[TexturePaintScaleMode["Fit"] = 1] = "Fit";
|
|
13
|
+
TexturePaintScaleMode[TexturePaintScaleMode["Crop"] = 2] = "Crop";
|
|
14
|
+
TexturePaintScaleMode[TexturePaintScaleMode["Tile"] = 3] = "Tile";
|
|
15
|
+
})(TexturePaintScaleMode || (TexturePaintScaleMode = {}));
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ColorData } from '../math/color-data';
|
|
2
1
|
export declare enum LineCap {
|
|
3
2
|
/** 默认值。向线条的每个末端添加平直的边缘 */
|
|
4
3
|
Butt = 0,
|
|
@@ -15,24 +14,3 @@ export declare enum LineJoin {
|
|
|
15
14
|
/** 创建尖角 */
|
|
16
15
|
Miter = 2
|
|
17
16
|
}
|
|
18
|
-
/**
|
|
19
|
-
* 矢量描边参数
|
|
20
|
-
*/
|
|
21
|
-
export interface ShapeStrokeParam {
|
|
22
|
-
/**
|
|
23
|
-
* 线宽
|
|
24
|
-
*/
|
|
25
|
-
width: number;
|
|
26
|
-
/**
|
|
27
|
-
* 线颜色
|
|
28
|
-
*/
|
|
29
|
-
color: ColorData;
|
|
30
|
-
/**
|
|
31
|
-
* 线段端点的样式
|
|
32
|
-
*/
|
|
33
|
-
cap: LineCap;
|
|
34
|
-
/**
|
|
35
|
-
* 线段连接处的样式
|
|
36
|
-
*/
|
|
37
|
-
join: LineJoin;
|
|
38
|
-
}
|
package/es/texture.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { BinaryPointer } from './binary';
|
|
2
|
+
import type { DataPath } from './components';
|
|
2
3
|
import type { DataType } from './data-type';
|
|
3
4
|
export interface TextureFormatOptions {
|
|
4
5
|
format?: GLenum;
|
|
@@ -30,7 +31,7 @@ export type SerializedTextureCubeMipmap = [
|
|
|
30
31
|
export interface SerializedTexture2DImageSource extends TextureConfigOptionsBase, TextureFormatOptions {
|
|
31
32
|
dataType: DataType.Texture;
|
|
32
33
|
target?: WebGLRenderingContext['TEXTURE_2D'];
|
|
33
|
-
source: number;
|
|
34
|
+
source: number | DataPath;
|
|
34
35
|
}
|
|
35
36
|
export interface SerializedTexture2DMipmapSource extends TextureConfigOptionsBase, TextureFormatOptions {
|
|
36
37
|
dataType: DataType.Texture;
|
package/package.json
CHANGED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { Vector2Data } from '../math/vector-data';
|
|
2
|
-
import type { ColorData } from '../math/color-data';
|
|
3
|
-
import type { GradientColor } from '../number-expression';
|
|
4
|
-
/**
|
|
5
|
-
* 填充类型
|
|
6
|
-
*/
|
|
7
|
-
export declare enum FillType {
|
|
8
|
-
/**
|
|
9
|
-
* 纯色
|
|
10
|
-
*/
|
|
11
|
-
Solid = 0,
|
|
12
|
-
/**
|
|
13
|
-
* 线性渐变
|
|
14
|
-
*/
|
|
15
|
-
LinearGradient = 1,
|
|
16
|
-
/**
|
|
17
|
-
* 径向渐变
|
|
18
|
-
*/
|
|
19
|
-
RadialGradient = 2
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* 矢量填充参数
|
|
23
|
-
*/
|
|
24
|
-
export interface ShapeFillParam {
|
|
25
|
-
/**
|
|
26
|
-
* 填充颜色
|
|
27
|
-
*/
|
|
28
|
-
color: ColorData;
|
|
29
|
-
/**
|
|
30
|
-
* 填充类型
|
|
31
|
-
*/
|
|
32
|
-
fillType?: FillType;
|
|
33
|
-
/**
|
|
34
|
-
* 渐变颜色
|
|
35
|
-
*/
|
|
36
|
-
gradient?: GradientColor;
|
|
37
|
-
/**
|
|
38
|
-
* 渐变起点
|
|
39
|
-
*/
|
|
40
|
-
startPoint?: Vector2Data;
|
|
41
|
-
/**
|
|
42
|
-
* 渐变终点
|
|
43
|
-
*/
|
|
44
|
-
endPoint?: Vector2Data;
|
|
45
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 填充类型
|
|
3
|
-
*/
|
|
4
|
-
export var FillType;
|
|
5
|
-
(function (FillType) {
|
|
6
|
-
/**
|
|
7
|
-
* 纯色
|
|
8
|
-
*/
|
|
9
|
-
FillType[FillType["Solid"] = 0] = "Solid";
|
|
10
|
-
/**
|
|
11
|
-
* 线性渐变
|
|
12
|
-
*/
|
|
13
|
-
FillType[FillType["LinearGradient"] = 1] = "LinearGradient";
|
|
14
|
-
/**
|
|
15
|
-
* 径向渐变
|
|
16
|
-
*/
|
|
17
|
-
FillType[FillType["RadialGradient"] = 2] = "RadialGradient";
|
|
18
|
-
})(FillType || (FillType = {}));
|