@galacean/effects-specification 2.1.0-alpha.4 → 2.1.0-alpha.5
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/index.d.ts +1 -0
- package/es/index.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/package.json +1 -1
package/es/index.d.ts
CHANGED
package/es/index.js
CHANGED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { TransformData } from '../item/base-item';
|
|
2
|
+
import type { Vector2Data } from '../math';
|
|
3
|
+
import type { ShapeComponentData } from './shape-component-data';
|
|
4
|
+
import type { ShapeFillParam } from './shape-fill-param';
|
|
5
|
+
import type { ShapePrimitiveType } from './shape-primitive-type';
|
|
6
|
+
import type { ShapeStrokeParam } from './shape-stroke-param';
|
|
7
|
+
/**
|
|
8
|
+
* 自定义形状点
|
|
9
|
+
*/
|
|
10
|
+
export interface CustomShapePoint {
|
|
11
|
+
/**
|
|
12
|
+
* 顶点索引
|
|
13
|
+
*/
|
|
14
|
+
point: number;
|
|
15
|
+
/**
|
|
16
|
+
* 入射点索引
|
|
17
|
+
*/
|
|
18
|
+
easingIn: number;
|
|
19
|
+
/**
|
|
20
|
+
* 出射点索引
|
|
21
|
+
*/
|
|
22
|
+
easingOut: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 自定义形状参数
|
|
26
|
+
*/
|
|
27
|
+
export interface CustomShape {
|
|
28
|
+
/**
|
|
29
|
+
* 点索引 - 用于构成闭合图形
|
|
30
|
+
*/
|
|
31
|
+
indexes: CustomShapePoint[];
|
|
32
|
+
/**
|
|
33
|
+
* 是否为闭合图形 - 用于Stroke
|
|
34
|
+
*/
|
|
35
|
+
close: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* 填充属性
|
|
38
|
+
*/
|
|
39
|
+
fill?: ShapeFillParam;
|
|
40
|
+
/**
|
|
41
|
+
* 描边属性
|
|
42
|
+
*/
|
|
43
|
+
stroke?: ShapeStrokeParam;
|
|
44
|
+
/**
|
|
45
|
+
* 空间变换
|
|
46
|
+
*/
|
|
47
|
+
transform?: TransformData;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* 自定义图形组件
|
|
51
|
+
*/
|
|
52
|
+
export interface CustomShapeData extends ShapeComponentData {
|
|
53
|
+
/**
|
|
54
|
+
* 矢量类型 - 形状
|
|
55
|
+
*/
|
|
56
|
+
type: ShapePrimitiveType.Custom;
|
|
57
|
+
/**
|
|
58
|
+
* 路径点
|
|
59
|
+
*/
|
|
60
|
+
points: Vector2Data[];
|
|
61
|
+
/**
|
|
62
|
+
* 入射控制点
|
|
63
|
+
*/
|
|
64
|
+
easingIns: Vector2Data[];
|
|
65
|
+
/**
|
|
66
|
+
* 入射控制点
|
|
67
|
+
*/
|
|
68
|
+
easingOuts: Vector2Data[];
|
|
69
|
+
/**
|
|
70
|
+
* 自定义形状
|
|
71
|
+
*/
|
|
72
|
+
shapes: CustomShape[];
|
|
73
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { TransformData } from '../item/base-item';
|
|
2
|
+
import type { ShapeComponentData } from './shape-component-data';
|
|
3
|
+
import type { ShapeFillParam } from './shape-fill-param';
|
|
4
|
+
import type { ShapePrimitiveType } from './shape-primitive-type';
|
|
5
|
+
import type { ShapeStrokeParam } from './shape-stroke-param';
|
|
6
|
+
/**
|
|
7
|
+
* 椭圆组件参数
|
|
8
|
+
*/
|
|
9
|
+
export interface EllipseData extends ShapeComponentData {
|
|
10
|
+
type: ShapePrimitiveType.Ellipse;
|
|
11
|
+
/**
|
|
12
|
+
* x 轴半径
|
|
13
|
+
* -- TODO 后续完善类型
|
|
14
|
+
* -- TODO 可以看一下用xRadius/yRadius 还是 width/height
|
|
15
|
+
*/
|
|
16
|
+
xRadius: number;
|
|
17
|
+
/**
|
|
18
|
+
* y 轴半径
|
|
19
|
+
*/
|
|
20
|
+
yRadius: number;
|
|
21
|
+
/**
|
|
22
|
+
* 填充属性
|
|
23
|
+
*/
|
|
24
|
+
fill?: ShapeFillParam;
|
|
25
|
+
/**
|
|
26
|
+
* 描边属性
|
|
27
|
+
*/
|
|
28
|
+
stroke?: ShapeStrokeParam;
|
|
29
|
+
/**
|
|
30
|
+
* 空间变换
|
|
31
|
+
*/
|
|
32
|
+
transform?: TransformData;
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './custom-shape-data';
|
|
2
|
+
export * from './ellipse-data';
|
|
3
|
+
export * from './polygon-data';
|
|
4
|
+
export * from './rectangle-data';
|
|
5
|
+
export * from './shape-component-data';
|
|
6
|
+
export * from './shape-fill-param';
|
|
7
|
+
export * from './shape-primitive-type';
|
|
8
|
+
export * from './shape-stroke-param';
|
|
9
|
+
export * from './star-data';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './custom-shape-data';
|
|
2
|
+
export * from './ellipse-data';
|
|
3
|
+
export * from './polygon-data';
|
|
4
|
+
export * from './rectangle-data';
|
|
5
|
+
export * from './shape-component-data';
|
|
6
|
+
export * from './shape-fill-param';
|
|
7
|
+
export * from './shape-primitive-type';
|
|
8
|
+
export * from './shape-stroke-param';
|
|
9
|
+
export * from './star-data';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { TransformData } from '../item/base-item';
|
|
2
|
+
import type { ShapeComponentData } from './shape-component-data';
|
|
3
|
+
import type { ShapeFillParam } from './shape-fill-param';
|
|
4
|
+
import type { ShapeStrokeParam } from './shape-stroke-param';
|
|
5
|
+
/**
|
|
6
|
+
* 多边形参数
|
|
7
|
+
*/
|
|
8
|
+
export interface PolygonData extends ShapeComponentData {
|
|
9
|
+
/**
|
|
10
|
+
* 顶点数
|
|
11
|
+
*/
|
|
12
|
+
pointCount: number;
|
|
13
|
+
/**
|
|
14
|
+
* 外切圆半径
|
|
15
|
+
*/
|
|
16
|
+
radius: number;
|
|
17
|
+
/**
|
|
18
|
+
* 角点圆度
|
|
19
|
+
*/
|
|
20
|
+
roundness: number;
|
|
21
|
+
/**
|
|
22
|
+
* 填充属性
|
|
23
|
+
*/
|
|
24
|
+
fill?: ShapeFillParam;
|
|
25
|
+
/**
|
|
26
|
+
* 描边属性
|
|
27
|
+
*/
|
|
28
|
+
stroke?: ShapeStrokeParam;
|
|
29
|
+
/**
|
|
30
|
+
* 空间变换
|
|
31
|
+
*/
|
|
32
|
+
transform?: TransformData;
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { TransformData } from '../item/base-item';
|
|
2
|
+
import type { ShapeComponentData } from './shape-component-data';
|
|
3
|
+
import type { ShapeFillParam } from './shape-fill-param';
|
|
4
|
+
import type { ShapeStrokeParam } from './shape-stroke-param';
|
|
5
|
+
/**
|
|
6
|
+
* 矩形参数
|
|
7
|
+
*/
|
|
8
|
+
export interface RectangleData extends ShapeComponentData {
|
|
9
|
+
/**
|
|
10
|
+
* 宽度
|
|
11
|
+
*/
|
|
12
|
+
width: number;
|
|
13
|
+
/**
|
|
14
|
+
* 高度
|
|
15
|
+
*/
|
|
16
|
+
height: number;
|
|
17
|
+
/**
|
|
18
|
+
* 角点元素
|
|
19
|
+
*/
|
|
20
|
+
roundness: number;
|
|
21
|
+
/**
|
|
22
|
+
* 填充属性
|
|
23
|
+
*/
|
|
24
|
+
fill?: ShapeFillParam;
|
|
25
|
+
/**
|
|
26
|
+
* 描边属性
|
|
27
|
+
*/
|
|
28
|
+
stroke?: ShapeStrokeParam;
|
|
29
|
+
/**
|
|
30
|
+
* 空间变换
|
|
31
|
+
*/
|
|
32
|
+
transform?: TransformData;
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ComponentData } from '../components/component-data';
|
|
2
|
+
import type { ShapePrimitiveType } from './shape-primitive-type';
|
|
3
|
+
/**
|
|
4
|
+
* 矢量图形组件
|
|
5
|
+
*/
|
|
6
|
+
export interface ShapeComponentData extends ComponentData {
|
|
7
|
+
/**
|
|
8
|
+
* 矢量类型
|
|
9
|
+
*/
|
|
10
|
+
type: ShapePrimitiveType;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 矢量图形类型
|
|
3
|
+
*/
|
|
4
|
+
export declare enum ShapePrimitiveType {
|
|
5
|
+
/**
|
|
6
|
+
* 自定义图形
|
|
7
|
+
*/
|
|
8
|
+
Custom = 0,
|
|
9
|
+
/**
|
|
10
|
+
* 矩形
|
|
11
|
+
*/
|
|
12
|
+
Rectangle = 1,
|
|
13
|
+
/**
|
|
14
|
+
* 椭圆
|
|
15
|
+
*/
|
|
16
|
+
Ellipse = 2,
|
|
17
|
+
/**
|
|
18
|
+
* 多边形
|
|
19
|
+
*/
|
|
20
|
+
Polygon = 3,
|
|
21
|
+
/**
|
|
22
|
+
* 星形
|
|
23
|
+
*/
|
|
24
|
+
Star = 4
|
|
25
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 矢量图形类型
|
|
3
|
+
*/
|
|
4
|
+
export var ShapePrimitiveType;
|
|
5
|
+
(function (ShapePrimitiveType) {
|
|
6
|
+
/**
|
|
7
|
+
* 自定义图形
|
|
8
|
+
*/
|
|
9
|
+
ShapePrimitiveType[ShapePrimitiveType["Custom"] = 0] = "Custom";
|
|
10
|
+
/**
|
|
11
|
+
* 矩形
|
|
12
|
+
*/
|
|
13
|
+
ShapePrimitiveType[ShapePrimitiveType["Rectangle"] = 1] = "Rectangle";
|
|
14
|
+
/**
|
|
15
|
+
* 椭圆
|
|
16
|
+
*/
|
|
17
|
+
ShapePrimitiveType[ShapePrimitiveType["Ellipse"] = 2] = "Ellipse";
|
|
18
|
+
/**
|
|
19
|
+
* 多边形
|
|
20
|
+
*/
|
|
21
|
+
ShapePrimitiveType[ShapePrimitiveType["Polygon"] = 3] = "Polygon";
|
|
22
|
+
/**
|
|
23
|
+
* 星形
|
|
24
|
+
*/
|
|
25
|
+
ShapePrimitiveType[ShapePrimitiveType["Star"] = 4] = "Star";
|
|
26
|
+
})(ShapePrimitiveType || (ShapePrimitiveType = {}));
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ColorData } from '../math/color-data';
|
|
2
|
+
export declare enum ShapeConnectType {
|
|
3
|
+
}
|
|
4
|
+
export declare enum ShapePointType {
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* 矢量描边参数
|
|
8
|
+
*/
|
|
9
|
+
export interface ShapeStrokeParam {
|
|
10
|
+
/**
|
|
11
|
+
* 线宽
|
|
12
|
+
*/
|
|
13
|
+
width: number;
|
|
14
|
+
/**
|
|
15
|
+
* 线颜色
|
|
16
|
+
*/
|
|
17
|
+
color: ColorData;
|
|
18
|
+
/**
|
|
19
|
+
* 连接类型
|
|
20
|
+
*/
|
|
21
|
+
connectType: ShapeConnectType;
|
|
22
|
+
/**
|
|
23
|
+
* 点类型
|
|
24
|
+
*/
|
|
25
|
+
pointType: ShapePointType;
|
|
26
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { TransformData } from '../item/base-item';
|
|
2
|
+
import type { ShapeComponentData } from './shape-component-data';
|
|
3
|
+
import type { ShapeFillParam } from './shape-fill-param';
|
|
4
|
+
import type { ShapeStrokeParam } from './shape-stroke-param';
|
|
5
|
+
/**
|
|
6
|
+
* 星形参数
|
|
7
|
+
*/
|
|
8
|
+
export interface StarData extends ShapeComponentData {
|
|
9
|
+
/**
|
|
10
|
+
* 顶点数 - 内外顶点同数
|
|
11
|
+
*/
|
|
12
|
+
pointCount: number;
|
|
13
|
+
/**
|
|
14
|
+
* 内径
|
|
15
|
+
*/
|
|
16
|
+
innerRadius: number;
|
|
17
|
+
/**
|
|
18
|
+
* 外径
|
|
19
|
+
*/
|
|
20
|
+
outerRadius: number;
|
|
21
|
+
/**
|
|
22
|
+
* 内径点圆度
|
|
23
|
+
*/
|
|
24
|
+
innerRoundness: number;
|
|
25
|
+
/**
|
|
26
|
+
* 外径点圆度
|
|
27
|
+
*/
|
|
28
|
+
outerRoundness: number;
|
|
29
|
+
/**
|
|
30
|
+
* 填充属性
|
|
31
|
+
*/
|
|
32
|
+
fill?: ShapeFillParam;
|
|
33
|
+
/**
|
|
34
|
+
* 描边属性
|
|
35
|
+
*/
|
|
36
|
+
stroke?: ShapeStrokeParam;
|
|
37
|
+
/**
|
|
38
|
+
* 空间变换
|
|
39
|
+
*/
|
|
40
|
+
transform?: TransformData;
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|