@galacean/effects-specification 2.0.0-alpha.2 → 2.0.0-alpha.20
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/README.md +2 -10
- package/es/animation-clip-data.d.ts +26 -0
- package/es/animation-clip-data.js +1 -0
- package/{dist/src → es}/binary.d.ts +3 -1
- package/es/binary.js +1 -0
- package/es/buitin-object-guid.d.ts +5 -0
- package/es/buitin-object-guid.js +5 -0
- package/es/components.d.ts +204 -0
- package/es/components.js +129 -0
- package/{dist/src → es}/composition.d.ts +32 -46
- package/es/composition.js +42 -0
- package/es/constants.js +11 -0
- package/{dist/src → es}/image.d.ts +21 -27
- package/es/image.js +9 -0
- package/{dist/src → es}/index.d.ts +4 -2
- package/es/index.js +28 -0
- package/{dist/src → es}/item/base-item.d.ts +9 -6
- package/es/item/base-item.js +11 -0
- package/{dist/src → es}/item/camera-item.d.ts +4 -4
- package/es/item/camera-item.js +1 -0
- package/{dist/src → es}/item/composition-item.d.ts +2 -2
- package/es/item/composition-item.js +1 -0
- package/es/item/effect-item.d.ts +35 -0
- package/es/item/effect-item.js +1 -0
- package/{dist/src → es}/item/interact-item.d.ts +1 -1
- package/es/item/interact-item.js +1 -0
- package/es/item/model/binary.js +1 -0
- package/es/item/model/camera.js +5 -0
- package/es/item/model/index.js +35 -0
- package/es/item/model/light.js +19 -0
- package/{dist/src → es}/item/model/material.d.ts +3 -3
- package/es/item/model/material.js +16 -0
- package/{dist/src → es}/item/model/mesh.d.ts +7 -6
- package/es/item/model/mesh.js +5 -0
- package/es/item/model/render.js +42 -0
- package/{dist/src → es}/item/model/skybox.d.ts +7 -1
- package/es/item/model/skybox.js +1 -0
- package/{dist/src → es}/item/model/tree.d.ts +10 -0
- package/es/item/model/tree.js +1 -0
- package/es/item/null-item.d.ts +46 -0
- package/es/item/null-item.js +1 -0
- package/{dist/src → es}/item/particle-item.d.ts +18 -21
- package/es/item/particle-item.js +14 -0
- package/es/item/particle-shape.js +19 -0
- package/{dist/src → es}/item/plugin-item.d.ts +1 -1
- package/es/item/plugin-item.js +1 -0
- package/{dist/src → es}/item/spine-item.d.ts +42 -18
- package/es/item/spine-item.js +1 -0
- package/{dist/src → es}/item/sprite-item.d.ts +1 -1
- package/es/item/sprite-item.js +1 -0
- package/{dist/src → es}/item/text-item.d.ts +1 -1
- package/es/item/text-item.js +1 -0
- package/{dist/src → es}/item.d.ts +2 -5
- package/es/item.js +1 -0
- package/{dist/src → es}/number-expression.d.ts +21 -8
- package/es/number-expression.js +91 -0
- package/{dist/src → es}/scene.d.ts +19 -19
- package/es/scene.js +1 -0
- package/{dist/src → es}/text.d.ts +3 -55
- package/es/text.js +84 -0
- package/es/timeline/index.d.ts +5 -0
- package/es/timeline/index.js +5 -0
- package/es/timeline/playables/sprite-color-playable-asset-data.d.ts +8 -0
- package/es/timeline/playables/sprite-color-playable-asset-data.js +1 -0
- package/es/timeline/playables/transform-playable-asset-data.d.ts +17 -0
- package/es/timeline/playables/transform-playable-asset-data.js +1 -0
- package/es/timeline/timeline-asset-data.d.ts +8 -0
- package/es/timeline/timeline-asset-data.js +1 -0
- package/es/timeline/timeline-clip-data.d.ts +9 -0
- package/es/timeline/timeline-clip-data.js +1 -0
- package/es/timeline/track/track-asset-data.d.ts +9 -0
- package/es/timeline/track/track-asset-data.js +1 -0
- package/{dist/src → es}/type.d.ts +45 -20
- package/es/type.js +342 -0
- package/{dist/src → es}/vfx-item-data.d.ts +8 -9
- package/es/vfx-item-data.js +1 -0
- package/package.json +26 -47
- package/dist/fallback/camera.d.ts +0 -2
- package/dist/fallback/filter.d.ts +0 -2
- package/dist/fallback/index.d.ts +0 -12
- package/dist/fallback/interact.d.ts +0 -2
- package/dist/fallback/migration.d.ts +0 -13
- package/dist/fallback/particle.d.ts +0 -2
- package/dist/fallback/sprite.d.ts +0 -3
- package/dist/fallback/utils.d.ts +0 -36
- package/dist/fallback.js +0 -2155
- package/dist/fallback.js.map +0 -1
- package/dist/fallback.mjs +0 -2127
- package/dist/fallback.mjs.map +0 -1
- package/dist/index.js +0 -758
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -743
- package/dist/index.mjs.map +0 -1
- package/dist/src/components.d.ts +0 -93
- package/dist/src/item/effect-item.d.ts +0 -17
- package/dist/src/item/filter-item.d.ts +0 -99
- package/dist/src/item/null-item.d.ts +0 -94
- /package/{dist/src → es}/constants.d.ts +0 -0
- /package/{dist/src → es}/item/model/binary.d.ts +0 -0
- /package/{dist/src → es}/item/model/camera.d.ts +0 -0
- /package/{dist/src → es}/item/model/index.d.ts +0 -0
- /package/{dist/src → es}/item/model/light.d.ts +0 -0
- /package/{dist/src → es}/item/model/render.d.ts +0 -0
- /package/{dist/src → es}/item/particle-shape.d.ts +0 -0
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import type { RGBAColor } from './number-expression';
|
|
2
|
-
export interface StringTemplate {
|
|
3
|
-
fonts: FontBase[];
|
|
4
|
-
texts: Text[];
|
|
5
|
-
colors: RGBAColor[];
|
|
6
|
-
}
|
|
7
1
|
/**
|
|
8
2
|
* 字体资源
|
|
9
3
|
* @version 2.3
|
|
@@ -56,52 +50,6 @@ export interface FontBase {
|
|
|
56
50
|
*/
|
|
57
51
|
letterSpace?: number;
|
|
58
52
|
}
|
|
59
|
-
export interface Text {
|
|
60
|
-
x: number;
|
|
61
|
-
y: number;
|
|
62
|
-
/**
|
|
63
|
-
* 变量名
|
|
64
|
-
*/
|
|
65
|
-
n?: string;
|
|
66
|
-
/**
|
|
67
|
-
* content,
|
|
68
|
-
* 文字内容,如果包含 $var$ 样式,内容将被替换
|
|
69
|
-
*/
|
|
70
|
-
t: string;
|
|
71
|
-
/**
|
|
72
|
-
* width, if not provide use canvas.measureText() to get width
|
|
73
|
-
* 文字最大宽度,如果不设置,由系统进行计算
|
|
74
|
-
*/
|
|
75
|
-
w?: number;
|
|
76
|
-
/**
|
|
77
|
-
* font, index to fonts array
|
|
78
|
-
* 字体,指向字体数组
|
|
79
|
-
* @default 0
|
|
80
|
-
*/
|
|
81
|
-
f?: number;
|
|
82
|
-
/**
|
|
83
|
-
* textAlignment
|
|
84
|
-
* 字体排列
|
|
85
|
-
* @default 0
|
|
86
|
-
*/
|
|
87
|
-
a?: TextAlignment;
|
|
88
|
-
/**
|
|
89
|
-
* index to color array
|
|
90
|
-
* 字体颜色,指向数组
|
|
91
|
-
*/
|
|
92
|
-
c?: number;
|
|
93
|
-
/**
|
|
94
|
-
* 当文字超过最大宽度时,文字的表现行为
|
|
95
|
-
* 仅当设置文字最大宽度后生效
|
|
96
|
-
* @default 0
|
|
97
|
-
*/
|
|
98
|
-
of?: TextOverflow;
|
|
99
|
-
/**
|
|
100
|
-
* 当文字overflow为ellipsis时的替换符号
|
|
101
|
-
* @default ".."
|
|
102
|
-
*/
|
|
103
|
-
et?: string;
|
|
104
|
-
}
|
|
105
53
|
export declare enum TextOverflow {
|
|
106
54
|
/**
|
|
107
55
|
* display 模式下,会显示所有文本,存在文本超过边界框的情况。
|
|
@@ -133,7 +81,7 @@ export declare enum TextBaseline {
|
|
|
133
81
|
export declare enum TextAlignment {
|
|
134
82
|
/**
|
|
135
83
|
* text alignment starts from(x,y) to right direction
|
|
136
|
-
* 从(x,y)开始第一个字符,向右边延伸
|
|
84
|
+
* 从 (x,y) 开始第一个字符,向右边延伸
|
|
137
85
|
*/
|
|
138
86
|
left = 0,
|
|
139
87
|
/**
|
|
@@ -143,7 +91,7 @@ export declare enum TextAlignment {
|
|
|
143
91
|
middle = 1,
|
|
144
92
|
/**
|
|
145
93
|
* text alignment ends with(x,y) from left direction
|
|
146
|
-
* 从(x,y)结束最后一个字符,向左边延伸
|
|
94
|
+
* 从 (x,y) 结束最后一个字符,向左边延伸
|
|
147
95
|
*/
|
|
148
96
|
right = 2
|
|
149
97
|
}
|
|
@@ -171,7 +119,7 @@ export declare enum FontStyle {
|
|
|
171
119
|
/**
|
|
172
120
|
* 正常
|
|
173
121
|
*/
|
|
174
|
-
normal = "normal"
|
|
122
|
+
normal = "normal",// default
|
|
175
123
|
/**
|
|
176
124
|
* 斜体
|
|
177
125
|
*/
|
package/es/text.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
export var TextOverflow;
|
|
2
|
+
(function (TextOverflow) {
|
|
3
|
+
/**
|
|
4
|
+
* display 模式下,会显示所有文本,存在文本超过边界框的情况。
|
|
5
|
+
*/
|
|
6
|
+
TextOverflow[TextOverflow["display"] = 0] = "display";
|
|
7
|
+
/**
|
|
8
|
+
* clip 模式下,当文本内容超出边界框时,多余的会被截断。
|
|
9
|
+
*/
|
|
10
|
+
TextOverflow[TextOverflow["clip"] = 1] = "clip";
|
|
11
|
+
/**
|
|
12
|
+
* ellipsis 模式下,会使用(...)来代替超出边界框的内容。
|
|
13
|
+
*/
|
|
14
|
+
TextOverflow[TextOverflow["ellipsis"] = 2] = "ellipsis";
|
|
15
|
+
})(TextOverflow || (TextOverflow = {}));
|
|
16
|
+
export var TextBaseline;
|
|
17
|
+
(function (TextBaseline) {
|
|
18
|
+
/**
|
|
19
|
+
* 文本顶对齐。
|
|
20
|
+
*/
|
|
21
|
+
TextBaseline[TextBaseline["top"] = 0] = "top";
|
|
22
|
+
/**
|
|
23
|
+
* 文本垂直居中对齐。
|
|
24
|
+
*/
|
|
25
|
+
TextBaseline[TextBaseline["middle"] = 1] = "middle";
|
|
26
|
+
/**
|
|
27
|
+
* 文本底对齐。
|
|
28
|
+
*/
|
|
29
|
+
TextBaseline[TextBaseline["bottom"] = 2] = "bottom";
|
|
30
|
+
})(TextBaseline || (TextBaseline = {}));
|
|
31
|
+
export var TextAlignment;
|
|
32
|
+
(function (TextAlignment) {
|
|
33
|
+
/**
|
|
34
|
+
* text alignment starts from(x,y) to right direction
|
|
35
|
+
* 从 (x,y) 开始第一个字符,向右边延伸
|
|
36
|
+
*/
|
|
37
|
+
TextAlignment[TextAlignment["left"] = 0] = "left";
|
|
38
|
+
/**
|
|
39
|
+
* (x,y) is middle position of text, where (left + right)/2 =(x,y)
|
|
40
|
+
* (x,y) 为文字中间位置,(最左位置 + 最右位置)/2 = (x,y)
|
|
41
|
+
*/
|
|
42
|
+
TextAlignment[TextAlignment["middle"] = 1] = "middle";
|
|
43
|
+
/**
|
|
44
|
+
* text alignment ends with(x,y) from left direction
|
|
45
|
+
* 从 (x,y) 结束最后一个字符,向左边延伸
|
|
46
|
+
*/
|
|
47
|
+
TextAlignment[TextAlignment["right"] = 2] = "right";
|
|
48
|
+
})(TextAlignment || (TextAlignment = {}));
|
|
49
|
+
/**
|
|
50
|
+
* 文本字重
|
|
51
|
+
*/
|
|
52
|
+
export var TextWeight;
|
|
53
|
+
(function (TextWeight) {
|
|
54
|
+
/**
|
|
55
|
+
* 正常
|
|
56
|
+
*/
|
|
57
|
+
TextWeight["normal"] = "normal";
|
|
58
|
+
/**
|
|
59
|
+
* 粗体
|
|
60
|
+
*/
|
|
61
|
+
TextWeight["bold"] = "bold";
|
|
62
|
+
/**
|
|
63
|
+
* 瘦体
|
|
64
|
+
*/
|
|
65
|
+
TextWeight["lighter"] = "lighter";
|
|
66
|
+
})(TextWeight || (TextWeight = {}));
|
|
67
|
+
/**
|
|
68
|
+
* 文本样式
|
|
69
|
+
*/
|
|
70
|
+
export var FontStyle;
|
|
71
|
+
(function (FontStyle) {
|
|
72
|
+
/**
|
|
73
|
+
* 正常
|
|
74
|
+
*/
|
|
75
|
+
FontStyle["normal"] = "normal";
|
|
76
|
+
/**
|
|
77
|
+
* 斜体
|
|
78
|
+
*/
|
|
79
|
+
FontStyle["italic"] = "italic";
|
|
80
|
+
/**
|
|
81
|
+
* 倾斜体
|
|
82
|
+
*/
|
|
83
|
+
FontStyle["oblique"] = "oblique";
|
|
84
|
+
})(FontStyle || (FontStyle = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DataType, EffectsObjectData } from '../../components';
|
|
2
|
+
import type { RGBAColorValue } from '../../number-expression';
|
|
3
|
+
import type { ColorOverLifetime } from '../../type';
|
|
4
|
+
export interface SpriteColorPlayableAssetData extends EffectsObjectData {
|
|
5
|
+
dataType: DataType.SpriteColorPlayableAsset;
|
|
6
|
+
colorOverLifetime?: ColorOverLifetime;
|
|
7
|
+
startColor?: RGBAColorValue;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { DataType, EffectsObjectData } from '../../components';
|
|
2
|
+
import type { SizeOverLifetime, RotationOverLifetime, PositionOverLifetime } from '../../type';
|
|
3
|
+
export interface TransformPlayableAssetData extends EffectsObjectData {
|
|
4
|
+
dataType: DataType.TransformPlayableAsset;
|
|
5
|
+
/**
|
|
6
|
+
* 元素大小变化属性
|
|
7
|
+
*/
|
|
8
|
+
sizeOverLifetime?: SizeOverLifetime;
|
|
9
|
+
/**
|
|
10
|
+
* 元素旋转变化属性
|
|
11
|
+
*/
|
|
12
|
+
rotationOverLifetime?: RotationOverLifetime;
|
|
13
|
+
/**
|
|
14
|
+
* 元素位置变化属性
|
|
15
|
+
*/
|
|
16
|
+
positionOverLifetime?: PositionOverLifetime;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DataPath, EffectsObjectData } from '../../components';
|
|
2
|
+
import type { TimelineClipData } from '../timeline-clip-data';
|
|
3
|
+
export interface TrackAssetData extends EffectsObjectData {
|
|
4
|
+
/**
|
|
5
|
+
* 子轨道数据(TrackAssetData)
|
|
6
|
+
*/
|
|
7
|
+
children: DataPath[];
|
|
8
|
+
clips: TimelineClipData;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,11 +4,11 @@ import type { FixedVec3Expression, vec2, vec3, GradientColor, ShapePoints, Shape
|
|
|
4
4
|
*/
|
|
5
5
|
export interface PlayerVersion {
|
|
6
6
|
/**
|
|
7
|
-
* Web端版本号
|
|
7
|
+
* Web 端版本号
|
|
8
8
|
*/
|
|
9
9
|
web: string;
|
|
10
10
|
/**
|
|
11
|
-
* Native端版本号
|
|
11
|
+
* Native 端版本号
|
|
12
12
|
*/
|
|
13
13
|
native: string;
|
|
14
14
|
}
|
|
@@ -72,15 +72,15 @@ export interface SizeOverLifetime {
|
|
|
72
72
|
*/
|
|
73
73
|
size?: FixedNumberExpression;
|
|
74
74
|
/**
|
|
75
|
-
* x轴大小变化信息(分轴模式)
|
|
75
|
+
* x 轴大小变化信息(分轴模式)
|
|
76
76
|
*/
|
|
77
77
|
x?: FixedNumberExpression;
|
|
78
78
|
/**
|
|
79
|
-
* y轴大小变化信息(分轴模式)
|
|
79
|
+
* y 轴大小变化信息(分轴模式)
|
|
80
80
|
*/
|
|
81
81
|
y?: FixedNumberExpression;
|
|
82
82
|
/**
|
|
83
|
-
* z轴大小变化信息(分轴模式)
|
|
83
|
+
* z 轴大小变化信息(分轴模式)
|
|
84
84
|
*/
|
|
85
85
|
z?: FixedNumberExpression;
|
|
86
86
|
}
|
|
@@ -118,15 +118,15 @@ export interface PositionOverLifetime {
|
|
|
118
118
|
*/
|
|
119
119
|
asMovement?: boolean;
|
|
120
120
|
/**
|
|
121
|
-
* x轴位置变化信息
|
|
121
|
+
* x 轴位置变化信息
|
|
122
122
|
*/
|
|
123
123
|
linearX?: FixedNumberExpression;
|
|
124
124
|
/**
|
|
125
|
-
* y轴位置变化信息
|
|
125
|
+
* y 轴位置变化信息
|
|
126
126
|
*/
|
|
127
127
|
linearY?: FixedNumberExpression;
|
|
128
128
|
/**
|
|
129
|
-
* z轴位置变化信息
|
|
129
|
+
* z 轴位置变化信息
|
|
130
130
|
*/
|
|
131
131
|
linearZ?: FixedNumberExpression;
|
|
132
132
|
/**
|
|
@@ -134,15 +134,15 @@ export interface PositionOverLifetime {
|
|
|
134
134
|
*/
|
|
135
135
|
asRotation?: boolean;
|
|
136
136
|
/**
|
|
137
|
-
* x轴环绕角度变化信息
|
|
137
|
+
* x 轴环绕角度变化信息
|
|
138
138
|
*/
|
|
139
139
|
orbitalX?: FixedNumberExpression;
|
|
140
140
|
/**
|
|
141
|
-
* y轴环绕角度变化信息
|
|
141
|
+
* y 轴环绕角度变化信息
|
|
142
142
|
*/
|
|
143
143
|
orbitalY?: FixedNumberExpression;
|
|
144
144
|
/**
|
|
145
|
-
* z轴环绕角度变化信息
|
|
145
|
+
* z 轴环绕角度变化信息
|
|
146
146
|
*/
|
|
147
147
|
orbitalZ?: FixedNumberExpression;
|
|
148
148
|
/**
|
|
@@ -512,10 +512,6 @@ export declare enum ItemType {
|
|
|
512
512
|
* 预合成元素
|
|
513
513
|
*/
|
|
514
514
|
composition = "7",
|
|
515
|
-
/**
|
|
516
|
-
* 滤镜图层
|
|
517
|
-
*/
|
|
518
|
-
filter = "8",
|
|
519
515
|
/**
|
|
520
516
|
* Spine 元素
|
|
521
517
|
*/
|
|
@@ -543,7 +539,11 @@ export declare enum ItemType {
|
|
|
543
539
|
/**
|
|
544
540
|
* 特效元素
|
|
545
541
|
*/
|
|
546
|
-
effect = "effect"
|
|
542
|
+
effect = "effect",
|
|
543
|
+
/**
|
|
544
|
+
* 节点元素
|
|
545
|
+
*/
|
|
546
|
+
node = "node"
|
|
547
547
|
}
|
|
548
548
|
/**
|
|
549
549
|
* 渲染模式
|
|
@@ -616,21 +616,37 @@ export interface PluginGyroscopeTarget {
|
|
|
616
616
|
*/
|
|
617
617
|
name: string;
|
|
618
618
|
/**
|
|
619
|
-
* x
|
|
619
|
+
* x 轴位移最小值
|
|
620
620
|
*/
|
|
621
621
|
xMin: number;
|
|
622
622
|
/**
|
|
623
|
-
* x
|
|
623
|
+
* x 轴位移最大值
|
|
624
624
|
*/
|
|
625
625
|
xMax: number;
|
|
626
626
|
/**
|
|
627
|
-
* y
|
|
627
|
+
* y 轴位移最小值
|
|
628
628
|
*/
|
|
629
629
|
yMin: number;
|
|
630
630
|
/**
|
|
631
|
-
* y
|
|
631
|
+
* y 轴位移最大值
|
|
632
632
|
*/
|
|
633
633
|
yMax: number;
|
|
634
|
+
/**
|
|
635
|
+
* 绕 x 轴(水平)旋转角度最小值
|
|
636
|
+
*/
|
|
637
|
+
hMin: number;
|
|
638
|
+
/**
|
|
639
|
+
* 绕 x 轴(水平)旋转角度最大值
|
|
640
|
+
*/
|
|
641
|
+
hMax: number;
|
|
642
|
+
/**
|
|
643
|
+
* 绕 y 轴(垂直)旋转角度最小值
|
|
644
|
+
*/
|
|
645
|
+
vMin: number;
|
|
646
|
+
/**
|
|
647
|
+
* 绕 y 轴(垂直)旋转角度最大值
|
|
648
|
+
*/
|
|
649
|
+
vMax: number;
|
|
634
650
|
}
|
|
635
651
|
/**
|
|
636
652
|
* 二维蒙版形状属性
|
|
@@ -645,3 +661,12 @@ export interface ShapeGeometry {
|
|
|
645
661
|
*/
|
|
646
662
|
s: ShapeSplits;
|
|
647
663
|
}
|
|
664
|
+
export declare enum RenderType {
|
|
665
|
+
Opaque = "Opaque",
|
|
666
|
+
Transparent = "Transparent"
|
|
667
|
+
}
|
|
668
|
+
export declare enum RenderFace {
|
|
669
|
+
Both = "Both",
|
|
670
|
+
Back = "Back",
|
|
671
|
+
Front = "Front"
|
|
672
|
+
}
|