@galacean/effects-specification 2.6.0-alpha.1 → 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/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/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/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/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 = {}));
|