@galacean/effects-specification 2.2.0-alpha.3 → 2.2.0-alpha.4
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/assets.d.ts +0 -6
- package/es/index.d.ts +1 -1
- package/es/item/rich-text-item.d.ts +15 -5
- package/es/item/text-item.d.ts +6 -12
- package/es/scene.d.ts +2 -1
- package/es/scene.js +2 -1
- package/es/shape/custom-shape-data.d.ts +0 -5
- package/es/shape/ellipse-data.d.ts +0 -5
- package/es/shape/polygon-data.d.ts +0 -5
- package/es/shape/rectangle-data.d.ts +0 -5
- package/es/shape/shape-component-data.d.ts +5 -0
- package/es/shape/shape-stroke-param.d.ts +18 -6
- package/es/shape/shape-stroke-param.js +18 -8
- package/es/shape/star-data.d.ts +0 -5
- package/es/text.d.ts +1 -1
- package/es/text.js +1 -1
- package/package.json +1 -1
package/es/assets.d.ts
CHANGED
|
@@ -68,12 +68,6 @@ export interface Image extends AssetBase {
|
|
|
68
68
|
* @default false
|
|
69
69
|
*/
|
|
70
70
|
mipmap?: boolean;
|
|
71
|
-
/**
|
|
72
|
-
* 图片 Y 轴的方向,如果 Y 轴向上(与 OpenGL 相同)则为 1
|
|
73
|
-
* 如果 Y 轴向下(与 OpenGL 相反)则为 -1,图片再绘制数据模板的时候需要翻转绘制
|
|
74
|
-
* @default 1
|
|
75
|
-
*/
|
|
76
|
-
oriY?: 1 | -1;
|
|
77
71
|
}
|
|
78
72
|
/**
|
|
79
73
|
* 模板贴图属性
|
package/es/index.d.ts
CHANGED
|
@@ -40,4 +40,4 @@ export * from './material-data';
|
|
|
40
40
|
export * from './geometry-data';
|
|
41
41
|
export * from './shader-data';
|
|
42
42
|
export * from './effects-package-data';
|
|
43
|
-
export declare const LATEST_VERSION = JSONSceneVersion['
|
|
43
|
+
export declare const LATEST_VERSION = JSONSceneVersion['3_2'];
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { BaseItem, EndBehavior } from './base-item';
|
|
2
2
|
import type { ItemType } from '../type';
|
|
3
3
|
import type { BaseTextContentOptions, TextComponentData, TextContent } from './text-item';
|
|
4
|
+
import type { vec2 } from '../number-expression';
|
|
4
5
|
/**
|
|
5
6
|
* 富文本元素
|
|
6
7
|
*/
|
|
7
8
|
export interface RichTextItem extends BaseItem {
|
|
8
9
|
/**
|
|
9
|
-
* 元素类型(指定为
|
|
10
|
+
* 元素类型(指定为 richtext)
|
|
10
11
|
*/
|
|
11
12
|
type: ItemType.richtext;
|
|
12
13
|
/**
|
|
@@ -16,13 +17,22 @@ export interface RichTextItem extends BaseItem {
|
|
|
16
17
|
endBehavior: EndBehavior;
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
19
|
-
*
|
|
20
|
+
* 富文本元素参数
|
|
21
|
+
*/
|
|
22
|
+
export interface RichTextContentOptions extends BaseTextContentOptions {
|
|
23
|
+
/**
|
|
24
|
+
* 富文本元素大小
|
|
25
|
+
*/
|
|
26
|
+
size?: vec2;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* 富文本元素渲染属性
|
|
20
30
|
*/
|
|
21
31
|
export interface RichTextContent extends Omit<TextContent, 'options'> {
|
|
22
32
|
/**
|
|
23
|
-
*
|
|
33
|
+
* 富文本元素基础属性
|
|
24
34
|
*/
|
|
25
|
-
options:
|
|
35
|
+
options: RichTextContentOptions;
|
|
26
36
|
}
|
|
27
37
|
/**
|
|
28
38
|
* 富文本元素渲染属性
|
|
@@ -31,5 +41,5 @@ export interface RichTextComponentData extends Omit<TextComponentData, 'options'
|
|
|
31
41
|
/**
|
|
32
42
|
* 富文本元素基础属性
|
|
33
43
|
*/
|
|
34
|
-
options:
|
|
44
|
+
options: RichTextContentOptions;
|
|
35
45
|
}
|
package/es/item/text-item.d.ts
CHANGED
|
@@ -18,11 +18,6 @@ export interface TextItem extends BaseItem {
|
|
|
18
18
|
endBehavior: EndBehavior;
|
|
19
19
|
}
|
|
20
20
|
export interface TextContentOptions extends BaseTextContentOptions {
|
|
21
|
-
/**
|
|
22
|
-
* 文本间隔
|
|
23
|
-
* @default 0
|
|
24
|
-
*/
|
|
25
|
-
letterSpace?: number;
|
|
26
21
|
/**
|
|
27
22
|
* 文本固定宽度(和自适应宽高冲突)
|
|
28
23
|
* @default 31
|
|
@@ -43,14 +38,13 @@ export interface TextContentOptions extends BaseTextContentOptions {
|
|
|
43
38
|
* @default false
|
|
44
39
|
*/
|
|
45
40
|
autoWidth?: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* 当文字超过最大宽度时,文字的表现行为
|
|
48
|
-
* 仅当设置文字最大宽度后生效
|
|
49
|
-
* @default TextOverflow.display
|
|
50
|
-
*/
|
|
51
|
-
textOverflow?: TextOverflow;
|
|
52
41
|
}
|
|
53
42
|
export interface BaseTextContentOptions {
|
|
43
|
+
/**
|
|
44
|
+
* 文本间隔
|
|
45
|
+
* @default 0
|
|
46
|
+
*/
|
|
47
|
+
letterSpace?: number;
|
|
54
48
|
/**
|
|
55
49
|
* 文本内容
|
|
56
50
|
*/
|
|
@@ -93,7 +87,7 @@ export interface BaseTextContentOptions {
|
|
|
93
87
|
/**
|
|
94
88
|
* 当文字超过最大宽度时,文字的表现行为
|
|
95
89
|
* 仅当设置文字最大宽度后生效
|
|
96
|
-
* @default TextOverflow.
|
|
90
|
+
* @default TextOverflow.clip
|
|
97
91
|
*/
|
|
98
92
|
textOverflow?: TextOverflow;
|
|
99
93
|
/**
|
package/es/scene.d.ts
CHANGED
package/es/scene.js
CHANGED
|
@@ -16,5 +16,6 @@ export var JSONSceneVersion;
|
|
|
16
16
|
JSONSceneVersion["2_4"] = "2.4";
|
|
17
17
|
JSONSceneVersion["3_0"] = "3.0";
|
|
18
18
|
JSONSceneVersion["3_1"] = "3.1";
|
|
19
|
-
JSONSceneVersion["
|
|
19
|
+
JSONSceneVersion["3_2"] = "3.2";
|
|
20
|
+
JSONSceneVersion["LATEST"] = "3.2";
|
|
20
21
|
})(JSONSceneVersion || (JSONSceneVersion = {}));
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { TransformData } from '../item/base-item';
|
|
2
2
|
import type { Vector2Data } from '../math';
|
|
3
3
|
import type { ShapeComponentData } from './shape-component-data';
|
|
4
|
-
import type { ShapeFillParam } from './shape-fill-param';
|
|
5
4
|
import type { ShapePrimitiveType } from './shape-primitive-type';
|
|
6
5
|
/**
|
|
7
6
|
* 自定义形状点
|
|
@@ -32,10 +31,6 @@ export interface CustomShape {
|
|
|
32
31
|
* 是否为闭合图形 - 用于Stroke
|
|
33
32
|
*/
|
|
34
33
|
close: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* 填充属性
|
|
37
|
-
*/
|
|
38
|
-
fill?: ShapeFillParam;
|
|
39
34
|
/**
|
|
40
35
|
* 空间变换
|
|
41
36
|
*/
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { TransformData } from '../item/base-item';
|
|
2
2
|
import type { ShapeComponentData } from './shape-component-data';
|
|
3
|
-
import type { ShapeFillParam } from './shape-fill-param';
|
|
4
3
|
import type { ShapePrimitiveType } from './shape-primitive-type';
|
|
5
4
|
/**
|
|
6
5
|
* 椭圆组件参数
|
|
@@ -17,10 +16,6 @@ export interface EllipseData extends ShapeComponentData {
|
|
|
17
16
|
* y 轴半径
|
|
18
17
|
*/
|
|
19
18
|
yRadius: number;
|
|
20
|
-
/**
|
|
21
|
-
* 填充属性
|
|
22
|
-
*/
|
|
23
|
-
fill?: ShapeFillParam;
|
|
24
19
|
/**
|
|
25
20
|
* 空间变换
|
|
26
21
|
*/
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { TransformData } from '../item/base-item';
|
|
2
2
|
import type { ShapeComponentData } from './shape-component-data';
|
|
3
|
-
import type { ShapeFillParam } from './shape-fill-param';
|
|
4
3
|
/**
|
|
5
4
|
* 多边形参数
|
|
6
5
|
*/
|
|
@@ -17,10 +16,6 @@ export interface PolygonData extends ShapeComponentData {
|
|
|
17
16
|
* 角点圆度
|
|
18
17
|
*/
|
|
19
18
|
roundness: number;
|
|
20
|
-
/**
|
|
21
|
-
* 填充属性
|
|
22
|
-
*/
|
|
23
|
-
fill?: ShapeFillParam;
|
|
24
19
|
/**
|
|
25
20
|
* 空间变换
|
|
26
21
|
*/
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { TransformData } from '../item/base-item';
|
|
2
2
|
import type { ShapeComponentData } from './shape-component-data';
|
|
3
|
-
import type { ShapeFillParam } from './shape-fill-param';
|
|
4
3
|
/**
|
|
5
4
|
* 矩形参数
|
|
6
5
|
*/
|
|
@@ -17,10 +16,6 @@ export interface RectangleData extends ShapeComponentData {
|
|
|
17
16
|
* 角点元素
|
|
18
17
|
*/
|
|
19
18
|
roundness: number;
|
|
20
|
-
/**
|
|
21
|
-
* 填充属性
|
|
22
|
-
*/
|
|
23
|
-
fill?: ShapeFillParam;
|
|
24
19
|
/**
|
|
25
20
|
* 空间变换
|
|
26
21
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ComponentData } from '../components/component-data';
|
|
2
|
+
import type { ShapeFillParam } from './shape-fill-param';
|
|
2
3
|
import type { ShapePrimitiveType } from './shape-primitive-type';
|
|
3
4
|
import type { ShapeStrokeParam } from './shape-stroke-param';
|
|
4
5
|
/**
|
|
@@ -13,4 +14,8 @@ export interface ShapeComponentData extends ComponentData {
|
|
|
13
14
|
* 描边属性
|
|
14
15
|
*/
|
|
15
16
|
stroke?: ShapeStrokeParam;
|
|
17
|
+
/**
|
|
18
|
+
* 填充属性
|
|
19
|
+
*/
|
|
20
|
+
fill?: ShapeFillParam;
|
|
16
21
|
}
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import type { ColorData } from '../math/color-data';
|
|
2
|
-
export declare enum
|
|
2
|
+
export declare enum LineCap {
|
|
3
|
+
/** 默认值。向线条的每个末端添加平直的边缘 */
|
|
4
|
+
Butt = 0,
|
|
5
|
+
/** 向线条的每个末端添加圆形线帽 */
|
|
6
|
+
Round = 1,
|
|
7
|
+
/** 向线条的每个末端添加正方形线帽 */
|
|
8
|
+
Square = 2
|
|
3
9
|
}
|
|
4
|
-
export declare enum
|
|
10
|
+
export declare enum LineJoin {
|
|
11
|
+
/** 创建圆角 */
|
|
12
|
+
Round = 0,
|
|
13
|
+
/** 创建斜角 */
|
|
14
|
+
Bevel = 1,
|
|
15
|
+
/** 创建尖角 */
|
|
16
|
+
Miter = 2
|
|
5
17
|
}
|
|
6
18
|
/**
|
|
7
19
|
* 矢量描边参数
|
|
@@ -16,11 +28,11 @@ export interface ShapeStrokeParam {
|
|
|
16
28
|
*/
|
|
17
29
|
color: ColorData;
|
|
18
30
|
/**
|
|
19
|
-
*
|
|
31
|
+
* 线段端点的样式
|
|
20
32
|
*/
|
|
21
|
-
|
|
33
|
+
cap: LineCap;
|
|
22
34
|
/**
|
|
23
|
-
*
|
|
35
|
+
* 线段连接处的样式
|
|
24
36
|
*/
|
|
25
|
-
|
|
37
|
+
join: LineJoin;
|
|
26
38
|
}
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
export var LineCap;
|
|
2
|
+
(function (LineCap) {
|
|
3
|
+
/** 默认值。向线条的每个末端添加平直的边缘 */
|
|
4
|
+
LineCap[LineCap["Butt"] = 0] = "Butt";
|
|
5
|
+
/** 向线条的每个末端添加圆形线帽 */
|
|
6
|
+
LineCap[LineCap["Round"] = 1] = "Round";
|
|
7
|
+
/** 向线条的每个末端添加正方形线帽 */
|
|
8
|
+
LineCap[LineCap["Square"] = 2] = "Square";
|
|
9
|
+
})(LineCap || (LineCap = {}));
|
|
10
|
+
export var LineJoin;
|
|
11
|
+
(function (LineJoin) {
|
|
12
|
+
/** 创建圆角 */
|
|
13
|
+
LineJoin[LineJoin["Round"] = 0] = "Round";
|
|
14
|
+
/** 创建斜角 */
|
|
15
|
+
LineJoin[LineJoin["Bevel"] = 1] = "Bevel";
|
|
16
|
+
/** 创建尖角 */
|
|
17
|
+
LineJoin[LineJoin["Miter"] = 2] = "Miter";
|
|
18
|
+
})(LineJoin || (LineJoin = {}));
|
package/es/shape/star-data.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { TransformData } from '../item/base-item';
|
|
2
2
|
import type { ShapeComponentData } from './shape-component-data';
|
|
3
|
-
import type { ShapeFillParam } from './shape-fill-param';
|
|
4
3
|
/**
|
|
5
4
|
* 星形参数
|
|
6
5
|
*/
|
|
@@ -25,10 +24,6 @@ export interface StarData extends ShapeComponentData {
|
|
|
25
24
|
* 外径点圆度
|
|
26
25
|
*/
|
|
27
26
|
outerRoundness: number;
|
|
28
|
-
/**
|
|
29
|
-
* 填充属性
|
|
30
|
-
*/
|
|
31
|
-
fill?: ShapeFillParam;
|
|
32
27
|
/**
|
|
33
28
|
* 空间变换
|
|
34
29
|
*/
|
package/es/text.d.ts
CHANGED
package/es/text.js
CHANGED