@galacean/effects-specification 2.2.0-beta.0 → 2.3.0-alpha.0
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/item/base-item.d.ts +21 -1
- package/es/item/effect-item.d.ts +5 -1
- package/es/item/particle-item.d.ts +10 -2
- package/es/item/rich-text-item.d.ts +5 -1
- package/es/item/spine-item.d.ts +6 -3
- package/es/item/sprite-item.d.ts +5 -1
- package/es/item/text-item.d.ts +5 -1
- package/es/item/video-item.d.ts +5 -1
- package/es/shape/shape-component-data.d.ts +5 -0
- package/es/type.d.ts +8 -13
- package/es/type.js +12 -12
- package/package.json +1 -1
package/es/item/base-item.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { BinaryEnv } from '../binary';
|
|
2
|
+
import type { DataPath } from '../components';
|
|
2
3
|
import type { Vector2Data, Vector3Data } from '../math';
|
|
3
4
|
import type { vec3, vec4 } from '../number-expression';
|
|
4
|
-
import type { ItemType, RenderLevel } from '../type';
|
|
5
|
+
import type { ItemType, ObscuredMode, RenderLevel } from '../type';
|
|
5
6
|
import type { CameraContent } from './camera-item';
|
|
6
7
|
import type { CompositionContent } from './composition-item';
|
|
7
8
|
import type { EffectContent } from './effect-item';
|
|
@@ -38,6 +39,25 @@ export declare enum EndBehavior {
|
|
|
38
39
|
export declare enum ParentItemEndBehavior {
|
|
39
40
|
destroyChildren = 6
|
|
40
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* 元素被遮挡/反向遮挡,需要时传入
|
|
44
|
+
*/
|
|
45
|
+
export interface ObscuredOptions {
|
|
46
|
+
mode: ObscuredMode;
|
|
47
|
+
/**
|
|
48
|
+
* 指向作为蒙版的组件
|
|
49
|
+
*/
|
|
50
|
+
ref: DataPath;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* 元素的蒙版行为
|
|
54
|
+
*/
|
|
55
|
+
export interface MaskOptions {
|
|
56
|
+
/**
|
|
57
|
+
* 是否作为蒙版
|
|
58
|
+
*/
|
|
59
|
+
mask?: boolean;
|
|
60
|
+
}
|
|
41
61
|
export interface BaseItem {
|
|
42
62
|
/**
|
|
43
63
|
* 元素 id
|
package/es/item/effect-item.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentData, DataPath } from '../components';
|
|
2
2
|
import type { ItemType, PositionOverLifetime, RotationOverLifetime, SizeOverLifetime } from '../type';
|
|
3
|
-
import type { BaseItem, EndBehavior } from './base-item';
|
|
3
|
+
import type { BaseItem, EndBehavior, ObscuredOptions } from './base-item';
|
|
4
4
|
/**
|
|
5
5
|
* 特效元素
|
|
6
6
|
*/
|
|
@@ -38,4 +38,8 @@ export interface EffectComponentData extends ComponentData {
|
|
|
38
38
|
_priority: number;
|
|
39
39
|
materials: DataPath[];
|
|
40
40
|
geometry: DataPath;
|
|
41
|
+
/**
|
|
42
|
+
* 特效元素蒙版属性,传入表示需要被遮挡/反向遮挡
|
|
43
|
+
*/
|
|
44
|
+
mask?: ObscuredOptions;
|
|
41
45
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ItemType, RendererOptions, TextureSheetAnimation, BlendingMode, SplitParameter } from '../type';
|
|
1
|
+
import type { ItemType, RendererOptions, TextureSheetAnimation, BlendingMode, SplitParameter, ObscuredMode } from '../type';
|
|
2
2
|
import type { FixedNumberExpression, NumberExpression, GradientColor, vec3, FixedVec3Expression, ColorExpression, FunctionExpression } from '../number-expression';
|
|
3
|
-
import type { BaseItem, EndBehavior } from './base-item';
|
|
3
|
+
import type { BaseItem, EndBehavior, ObscuredOptions } from './base-item';
|
|
4
4
|
import type { ParticleShape } from './particle-shape';
|
|
5
5
|
import type { ComponentData, DataPath } from '../components';
|
|
6
6
|
/**
|
|
@@ -277,6 +277,10 @@ export interface ParticleContent {
|
|
|
277
277
|
* 粒子元素材质渲染属性
|
|
278
278
|
*/
|
|
279
279
|
renderer: RendererOptions;
|
|
280
|
+
/**
|
|
281
|
+
* 粒子元素蒙版属性,传入表示需要被遮挡/反向遮挡
|
|
282
|
+
*/
|
|
283
|
+
mask?: ObscuredOptions;
|
|
280
284
|
/**
|
|
281
285
|
* 粒子元素发射器形状属性
|
|
282
286
|
*/
|
|
@@ -413,4 +417,8 @@ export interface ParticleTrail {
|
|
|
413
417
|
* 拖尾+图层绑定同一个父节点时使用
|
|
414
418
|
*/
|
|
415
419
|
parentAffectsPosition?: boolean;
|
|
420
|
+
/**
|
|
421
|
+
* 拖尾蒙版属性,传入表示需要被遮挡/反向遮挡
|
|
422
|
+
*/
|
|
423
|
+
mask?: ObscuredMode;
|
|
416
424
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BaseItem, EndBehavior } from './base-item';
|
|
1
|
+
import type { BaseItem, EndBehavior, MaskOptions } from './base-item';
|
|
2
2
|
import type { ItemType } from '../type';
|
|
3
3
|
import type { BaseTextContentOptions, TextComponentData, TextContent } from './text-item';
|
|
4
4
|
import type { vec2 } from '../number-expression';
|
|
@@ -42,4 +42,8 @@ export interface RichTextComponentData extends Omit<TextComponentData, 'options'
|
|
|
42
42
|
* 富文本元素基础属性
|
|
43
43
|
*/
|
|
44
44
|
options: RichTextContentOptions;
|
|
45
|
+
/**
|
|
46
|
+
* 富文本元素蒙版属性,传入表示需要作为蒙版/被遮挡/反向遮挡
|
|
47
|
+
*/
|
|
48
|
+
mask?: MaskOptions;
|
|
45
49
|
}
|
package/es/item/spine-item.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { BinaryPointer } from '../binary';
|
|
2
2
|
import type { ComponentData, DataPath } from '../components';
|
|
3
3
|
import type { DataType } from '../data-type';
|
|
4
|
-
import type { SizeOverLifetime, RotationOverLifetime, PositionOverLifetime, ColorOverLifetime, RendererOptions, ItemType,
|
|
5
|
-
import type { BaseItem, EndBehavior } from './base-item';
|
|
4
|
+
import type { SizeOverLifetime, RotationOverLifetime, PositionOverLifetime, ColorOverLifetime, RendererOptions, ItemType, RenderMode } from '../type';
|
|
5
|
+
import type { BaseItem, EndBehavior, ObscuredOptions } from './base-item';
|
|
6
6
|
/**
|
|
7
7
|
* 插件元素
|
|
8
8
|
*/
|
|
@@ -121,6 +121,9 @@ export interface SpineComponent extends ComponentData {
|
|
|
121
121
|
};
|
|
122
122
|
renderer?: {
|
|
123
123
|
renderMode: RenderMode;
|
|
124
|
-
maskMode: MaskMode;
|
|
125
124
|
};
|
|
125
|
+
/**
|
|
126
|
+
* Spine 元素蒙版属性,传入表示需要被遮挡/反向遮挡
|
|
127
|
+
*/
|
|
128
|
+
mask?: ObscuredOptions;
|
|
126
129
|
}
|
package/es/item/sprite-item.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BaseItem, EndBehavior } from './base-item';
|
|
1
|
+
import type { BaseItem, EndBehavior, MaskOptions, ObscuredOptions } from './base-item';
|
|
2
2
|
import type { SizeOverLifetime, RotationOverLifetime, PositionOverLifetime, ColorOverLifetime, ItemType, TextureSheetAnimation, RendererOptions, SplitParameter, InteractBehavior } from '../type';
|
|
3
3
|
import type { RGBAColorValue } from '../number-expression';
|
|
4
4
|
import type { ComponentData } from '../components';
|
|
@@ -40,6 +40,10 @@ export interface SpriteContent {
|
|
|
40
40
|
* 图层元素材质渲染属性
|
|
41
41
|
*/
|
|
42
42
|
renderer: RendererOptions;
|
|
43
|
+
/**
|
|
44
|
+
* 图层元素蒙版属性,传入表示需要作为蒙版/被遮挡/反向遮挡
|
|
45
|
+
*/
|
|
46
|
+
mask?: MaskOptions | ObscuredOptions;
|
|
43
47
|
/**
|
|
44
48
|
* 图层元素大小变化属性
|
|
45
49
|
*/
|
package/es/item/text-item.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BaseItem, EndBehavior } from './base-item';
|
|
1
|
+
import type { BaseItem, EndBehavior, MaskOptions, ObscuredOptions } from './base-item';
|
|
2
2
|
import type { SizeOverLifetime, RotationOverLifetime, PositionOverLifetime, ColorOverLifetime, ItemType, TextureSheetAnimation, RendererOptions, InteractBehavior } from '../type';
|
|
3
3
|
import type { RGBAColorValue } from '../number-expression';
|
|
4
4
|
import type { FontStyle, TextAlignment, TextBaseline, TextOverflow, TextWeight } from '../text';
|
|
@@ -143,6 +143,10 @@ export interface TextContent {
|
|
|
143
143
|
* 文本元素材质渲染属性
|
|
144
144
|
*/
|
|
145
145
|
renderer: RendererOptions;
|
|
146
|
+
/**
|
|
147
|
+
* 文本元素蒙版属性,传入表示需要作为蒙版/被遮挡/反向遮挡
|
|
148
|
+
*/
|
|
149
|
+
mask?: MaskOptions | ObscuredOptions;
|
|
146
150
|
/**
|
|
147
151
|
* 文本元素大小变化属性
|
|
148
152
|
*/
|
package/es/item/video-item.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ComponentData, DataPath } from '../components';
|
|
2
2
|
import type { RGBAColorValue } from '../number-expression';
|
|
3
3
|
import type { SizeOverLifetime, RotationOverLifetime, PositionOverLifetime, ColorOverLifetime, InteractBehavior, RendererOptions, ItemType } from '../type';
|
|
4
|
-
import type { BaseItem, EndBehavior } from './base-item';
|
|
4
|
+
import type { BaseItem, EndBehavior, ObscuredOptions } from './base-item';
|
|
5
5
|
/**
|
|
6
6
|
* 视频元素
|
|
7
7
|
*/
|
|
@@ -59,6 +59,10 @@ export interface VideoComponentData extends ComponentData {
|
|
|
59
59
|
* 视频元素材质渲染属性
|
|
60
60
|
*/
|
|
61
61
|
renderer: RendererOptions;
|
|
62
|
+
/**
|
|
63
|
+
* 视频元素蒙版属性,传入表示需要被遮挡/反向遮挡
|
|
64
|
+
*/
|
|
65
|
+
mask?: ObscuredOptions;
|
|
62
66
|
/**
|
|
63
67
|
* 视频元素大小变化属性
|
|
64
68
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ComponentData } from '../components/component-data';
|
|
2
|
+
import type { MaskOptions, ObscuredOptions } from '../item/base-item';
|
|
2
3
|
import type { ShapeFillParam } from './shape-fill-param';
|
|
3
4
|
import type { ShapePrimitiveType } from './shape-primitive-type';
|
|
4
5
|
import type { ShapeStrokeParam } from './shape-stroke-param';
|
|
@@ -18,4 +19,8 @@ export interface ShapeComponentData extends ComponentData {
|
|
|
18
19
|
* 填充属性
|
|
19
20
|
*/
|
|
20
21
|
fill?: ShapeFillParam;
|
|
22
|
+
/**
|
|
23
|
+
* 蒙版属性,传入表示需要作为蒙版/被遮挡/反向遮挡
|
|
24
|
+
*/
|
|
25
|
+
mask?: MaskOptions | ObscuredOptions;
|
|
21
26
|
}
|
package/es/type.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DataPath } from './components';
|
|
2
|
+
import type { ObscuredOptions, MaskOptions } from './item/base-item';
|
|
2
3
|
import type { FixedVec3Expression, vec2, vec3, GradientColor, ShapePoints, ShapeSplits, FixedNumberExpression } from './number-expression';
|
|
3
4
|
/**
|
|
4
5
|
* 播放器版本
|
|
@@ -294,17 +295,12 @@ export declare enum SideMode {
|
|
|
294
295
|
BACK = 1029
|
|
295
296
|
}
|
|
296
297
|
/**
|
|
297
|
-
*
|
|
298
|
+
* 元素是否被蒙版遮挡/反向遮挡
|
|
298
299
|
*/
|
|
299
|
-
export declare enum
|
|
300
|
+
export declare enum ObscuredMode {
|
|
300
301
|
/**
|
|
301
|
-
*
|
|
302
|
-
*/
|
|
303
|
-
NONE = 0,
|
|
304
|
-
/**
|
|
305
|
-
* 蒙版
|
|
302
|
+
* 无
|
|
306
303
|
*/
|
|
307
|
-
MASK = 1,
|
|
308
304
|
/**
|
|
309
305
|
* 被遮挡
|
|
310
306
|
*/
|
|
@@ -446,11 +442,6 @@ export interface RendererOptions {
|
|
|
446
442
|
* 贴图,索引到 scene 中的 images 数组
|
|
447
443
|
*/
|
|
448
444
|
texture?: DataPath;
|
|
449
|
-
/**
|
|
450
|
-
* 蒙版模式
|
|
451
|
-
* @default none
|
|
452
|
-
*/
|
|
453
|
-
maskMode?: MaskMode;
|
|
454
445
|
/**
|
|
455
446
|
* 蒙版形状,索引到 scene 的 shapes 中
|
|
456
447
|
*/
|
|
@@ -463,6 +454,10 @@ export interface RendererOptions {
|
|
|
463
454
|
* 锚点
|
|
464
455
|
*/
|
|
465
456
|
anchor?: vec2;
|
|
457
|
+
/**
|
|
458
|
+
* 蒙版属性
|
|
459
|
+
*/
|
|
460
|
+
mask?: MaskOptions | ObscuredOptions;
|
|
466
461
|
}
|
|
467
462
|
/**
|
|
468
463
|
* 元素类型
|
package/es/type.js
CHANGED
|
@@ -69,27 +69,27 @@ export var SideMode;
|
|
|
69
69
|
SideMode[SideMode["BACK"] = 1029] = "BACK";
|
|
70
70
|
})(SideMode || (SideMode = {}));
|
|
71
71
|
/**
|
|
72
|
-
*
|
|
72
|
+
* 元素是否被蒙版遮挡/反向遮挡
|
|
73
73
|
*/
|
|
74
|
-
export var
|
|
75
|
-
(function (
|
|
74
|
+
export var ObscuredMode;
|
|
75
|
+
(function (ObscuredMode) {
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
78
|
-
*/
|
|
79
|
-
MaskMode[MaskMode["NONE"] = 0] = "NONE";
|
|
80
|
-
/**
|
|
81
|
-
* 蒙版
|
|
77
|
+
* 无
|
|
82
78
|
*/
|
|
83
|
-
|
|
79
|
+
// NONE = 0,
|
|
80
|
+
// /**
|
|
81
|
+
// * 蒙版
|
|
82
|
+
// */
|
|
83
|
+
// MASK = 1,
|
|
84
84
|
/**
|
|
85
85
|
* 被遮挡
|
|
86
86
|
*/
|
|
87
|
-
|
|
87
|
+
ObscuredMode[ObscuredMode["OBSCURED"] = 2] = "OBSCURED";
|
|
88
88
|
/**
|
|
89
89
|
* 被反向遮挡
|
|
90
90
|
*/
|
|
91
|
-
|
|
92
|
-
})(
|
|
91
|
+
ObscuredMode[ObscuredMode["REVERSE_OBSCURED"] = 3] = "REVERSE_OBSCURED";
|
|
92
|
+
})(ObscuredMode || (ObscuredMode = {}));
|
|
93
93
|
/**
|
|
94
94
|
* 发射器形状
|
|
95
95
|
*/
|