@vvfx/sdk 0.1.14-alpha.1 → 0.1.14-alpha.3
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/dist/index.cjs +1 -1
- package/dist/index.d.cts +127 -56
- package/dist/index.d.ts +127 -56
- package/dist/index.global.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -100,11 +100,14 @@ type GeneratorItemOptions = SDKItemOptions & {
|
|
|
100
100
|
*/
|
|
101
101
|
property?: Partial<SpriteFormProperty>;
|
|
102
102
|
};
|
|
103
|
+
type EffectsItemOptions = SDKItemOptions & {
|
|
104
|
+
property?: Partial<EffectsFormProperty>;
|
|
105
|
+
};
|
|
103
106
|
/**
|
|
104
107
|
* @description SDKItem 类型(独立于 spec.ItemType)
|
|
105
108
|
* @description 包含所有 SDK 层级的元素类型,包括虚拟类型如 generator
|
|
106
109
|
*/
|
|
107
|
-
type SDKItemType = 'sprite' | 'text' | 'video' | 'null' | 'generator';
|
|
110
|
+
type SDKItemType = 'sprite' | 'text' | 'video' | 'null' | 'generator' | 'effects' | 'frame';
|
|
108
111
|
|
|
109
112
|
/**
|
|
110
113
|
* @description SDKItem 抽象基类
|
|
@@ -200,11 +203,6 @@ declare abstract class BaseItem {
|
|
|
200
203
|
* @description 清空所有扩展属性
|
|
201
204
|
*/
|
|
202
205
|
clearExtensions(): void;
|
|
203
|
-
/**
|
|
204
|
-
* @description 转换为普通对象(用于序列化)
|
|
205
|
-
* @returns 普通对象
|
|
206
|
-
*/
|
|
207
|
-
abstract toJSON(): Record<string, any>;
|
|
208
206
|
/**
|
|
209
207
|
* @description 转换为 CreateInfo(用于元素复制/导出)
|
|
210
208
|
* @param withParent 是否包含父节点ID
|
|
@@ -217,10 +215,10 @@ declare abstract class BaseItem {
|
|
|
217
215
|
*/
|
|
218
216
|
abstract clone(): BaseItem;
|
|
219
217
|
/**
|
|
220
|
-
* @description 获取基础属性的 JSON
|
|
221
|
-
* @
|
|
218
|
+
* @description 获取基础属性的 JSON 对象,转换为普通对象(用于序列化)
|
|
219
|
+
* @returns 普通对象
|
|
222
220
|
*/
|
|
223
|
-
|
|
221
|
+
toJSON(): Record<string, any>;
|
|
224
222
|
}
|
|
225
223
|
/**
|
|
226
224
|
* @description 类型守卫函数:检查对象是否是 BaseItem
|
|
@@ -278,10 +276,6 @@ declare class SpriteItem extends BaseItem {
|
|
|
278
276
|
*/
|
|
279
277
|
get keyPropertyEditing(): boolean;
|
|
280
278
|
set keyPropertyEditing(value: boolean);
|
|
281
|
-
/**
|
|
282
|
-
* @description 转换为普通对象
|
|
283
|
-
*/
|
|
284
|
-
toJSON(): Record<string, any>;
|
|
285
279
|
/**
|
|
286
280
|
* @description 转换为 CreateInfo
|
|
287
281
|
* @param withParent 是否包含父节点ID
|
|
@@ -397,10 +391,6 @@ declare class TextItem extends BaseItem {
|
|
|
397
391
|
*/
|
|
398
392
|
get visible(): boolean;
|
|
399
393
|
set visible(value: boolean);
|
|
400
|
-
/**
|
|
401
|
-
* @description 转换为普通对象
|
|
402
|
-
*/
|
|
403
|
-
toJSON(): Record<string, any>;
|
|
404
394
|
/**
|
|
405
395
|
* @description 转换为 CreateInfo
|
|
406
396
|
* @param withParent 是否包含父节点ID
|
|
@@ -465,10 +455,6 @@ declare class VideoItem extends BaseItem {
|
|
|
465
455
|
*/
|
|
466
456
|
get keyPropertyEditing(): boolean;
|
|
467
457
|
set keyPropertyEditing(value: boolean);
|
|
468
|
-
/**
|
|
469
|
-
* @description 转换为普通对象
|
|
470
|
-
*/
|
|
471
|
-
toJSON(): Record<string, any>;
|
|
472
458
|
/**
|
|
473
459
|
* @description 转换为 CreateInfo
|
|
474
460
|
* @param withParent 是否包含父节点ID
|
|
@@ -536,10 +522,6 @@ declare class NullItem extends BaseItem {
|
|
|
536
522
|
* @description 设置缩放(存储在扩展属性中)
|
|
537
523
|
*/
|
|
538
524
|
set scaleForCreateInfo(value: [number, number]);
|
|
539
|
-
/**
|
|
540
|
-
* @description 转换为普通对象
|
|
541
|
-
*/
|
|
542
|
-
toJSON(): Record<string, any>;
|
|
543
525
|
/**
|
|
544
526
|
* @description 转换为 CreateInfo
|
|
545
527
|
* @param withParent 是否包含父节点ID
|
|
@@ -610,10 +592,6 @@ declare class GeneratorItem extends BaseItem {
|
|
|
610
592
|
*/
|
|
611
593
|
get keyPropertyEditing(): boolean;
|
|
612
594
|
set keyPropertyEditing(value: boolean);
|
|
613
|
-
/**
|
|
614
|
-
* @description 转换为普通对象
|
|
615
|
-
*/
|
|
616
|
-
toJSON(): Record<string, any>;
|
|
617
595
|
/**
|
|
618
596
|
* @description 转换为 GeneratorCreateInfo
|
|
619
597
|
* @param withParent 是否包含父节点ID
|
|
@@ -636,6 +614,73 @@ declare class GeneratorItem extends BaseItem {
|
|
|
636
614
|
*/
|
|
637
615
|
clone(): GeneratorItem;
|
|
638
616
|
}
|
|
617
|
+
/**
|
|
618
|
+
* @description 类型守卫:检查是否是 GeneratorItem
|
|
619
|
+
*/
|
|
620
|
+
declare function isGeneratorItem(obj: any): obj is GeneratorItem;
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* @description 特效产物 元素 SDKItem 类
|
|
624
|
+
*/
|
|
625
|
+
declare class EffectsItem extends BaseItem {
|
|
626
|
+
/**
|
|
627
|
+
* @description 元素类型(独立类型,不属于 spec.ItemType)
|
|
628
|
+
*/
|
|
629
|
+
readonly type: SDKItemType;
|
|
630
|
+
/**
|
|
631
|
+
* @description 元素属性
|
|
632
|
+
*/
|
|
633
|
+
property: EffectsFormProperty;
|
|
634
|
+
constructor(options: EffectsItemOptions);
|
|
635
|
+
/**
|
|
636
|
+
* @description 特效资源地址
|
|
637
|
+
*/
|
|
638
|
+
get effects(): string;
|
|
639
|
+
set effects(value: string);
|
|
640
|
+
/**
|
|
641
|
+
* @description 位置
|
|
642
|
+
*/
|
|
643
|
+
get position(): [number, number];
|
|
644
|
+
set position(value: [number, number]);
|
|
645
|
+
/**
|
|
646
|
+
* @description 大小
|
|
647
|
+
*/
|
|
648
|
+
get size(): [number, number];
|
|
649
|
+
set size(value: [number, number]);
|
|
650
|
+
/**
|
|
651
|
+
* @description 旋转(二维旋转角度)
|
|
652
|
+
*/
|
|
653
|
+
get rotation(): number;
|
|
654
|
+
set rotation(value: number);
|
|
655
|
+
/**
|
|
656
|
+
* @description 完整旋转(包含 x, y, z)
|
|
657
|
+
*/
|
|
658
|
+
get fullRotation(): [number, number, number];
|
|
659
|
+
set fullRotation(value: [number, number, number]);
|
|
660
|
+
/**
|
|
661
|
+
* @description 可见性
|
|
662
|
+
*/
|
|
663
|
+
get visible(): boolean;
|
|
664
|
+
set visible(value: boolean);
|
|
665
|
+
/**
|
|
666
|
+
* @description 是否正在编辑关键属性
|
|
667
|
+
*/
|
|
668
|
+
get keyPropertyEditing(): boolean;
|
|
669
|
+
set keyPropertyEditing(value: boolean);
|
|
670
|
+
/**
|
|
671
|
+
* @description 转换为 EffectsCreateInfo
|
|
672
|
+
* @param withParent 是否包含父节点ID
|
|
673
|
+
*/
|
|
674
|
+
toCreateInfo(withParent?: boolean): EffectsCreateInfo;
|
|
675
|
+
/**
|
|
676
|
+
* @description 克隆 SDKItem
|
|
677
|
+
*/
|
|
678
|
+
clone(): EffectsItem;
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* @description 类型守卫:检查是否是 EffectsItem
|
|
682
|
+
*/
|
|
683
|
+
declare function isEffectsItem(obj: any): obj is EffectsItem;
|
|
639
684
|
|
|
640
685
|
/**
|
|
641
686
|
* @description 根据 item type 创建对应的 SDKItem 实例
|
|
@@ -2320,14 +2365,12 @@ declare class SDK {
|
|
|
2320
2365
|
* @param createInfo 生成器创建信息
|
|
2321
2366
|
* @returns 生成器元素ID
|
|
2322
2367
|
*/
|
|
2323
|
-
|
|
2368
|
+
addGeneratorItem(createInfo: GeneratorCreateInfo): string;
|
|
2324
2369
|
/**
|
|
2325
|
-
* @description
|
|
2326
|
-
* @param
|
|
2327
|
-
* @returns 视频生成器元素ID
|
|
2328
|
-
* @deprecated 使用 createGenerator 替代
|
|
2370
|
+
* @description 创建动效元素(仅限调试使用)
|
|
2371
|
+
* @param effectsInfo 动效创建信息
|
|
2329
2372
|
*/
|
|
2330
|
-
|
|
2373
|
+
addEffectsItem(effectsInfo: EffectsCreateInfo): void;
|
|
2331
2374
|
/**
|
|
2332
2375
|
* @description 设置生成器资源,将生成器转换为对应的元素
|
|
2333
2376
|
* @param id 生成器元素ID
|
|
@@ -2340,33 +2383,16 @@ declare class SDK {
|
|
|
2340
2383
|
* @param resource 生成器资源信息
|
|
2341
2384
|
*/
|
|
2342
2385
|
setGeneratorResourceFromObject(resource: GeneratorResource): void;
|
|
2343
|
-
/**
|
|
2344
|
-
* @description 将视频生成器转换为视频元素
|
|
2345
|
-
* @param id 视频生成器元素ID
|
|
2346
|
-
* @param videoUrl 视频资源地址
|
|
2347
|
-
* @returns 新的视频元素ID
|
|
2348
|
-
* @deprecated 使用 setGeneratorResource 替代
|
|
2349
|
-
*/
|
|
2350
|
-
convertVideoGeneratorToVideo(id: string, videoUrl: string): Promise<string>;
|
|
2351
2386
|
/**
|
|
2352
2387
|
* @description 设置视频生成器资源
|
|
2353
2388
|
* @param resource 视频生成器资源信息
|
|
2354
|
-
* @deprecated 使用 setGeneratorResource 替代
|
|
2355
|
-
*/
|
|
2356
|
-
setVideoGeneratorResource(resource: VideoGeneratorResource): void;
|
|
2357
|
-
/**
|
|
2358
|
-
* @description 创建图层生成器元素
|
|
2359
|
-
* @param createInfo 图层生成器创建信息
|
|
2360
|
-
* @returns 图层生成器元素ID
|
|
2361
|
-
* @deprecated 使用 createGenerator 替代
|
|
2362
2389
|
*/
|
|
2363
|
-
|
|
2390
|
+
setVideoGeneratorResource(resource: VideoGeneratorResource): Promise<string>;
|
|
2364
2391
|
/**
|
|
2365
2392
|
* @description 设置图层生成器资源
|
|
2366
2393
|
* @param resource 图层生成器资源信息
|
|
2367
|
-
* @deprecated 使用 setGeneratorResource 替代
|
|
2368
2394
|
*/
|
|
2369
|
-
setSpriteGeneratorResource(resource: SpriteGeneratorResource):
|
|
2395
|
+
setSpriteGeneratorResource(resource: SpriteGeneratorResource): Promise<string>;
|
|
2370
2396
|
setItemLockState(id: string, state: boolean): void;
|
|
2371
2397
|
getItemLockState(id: string): void;
|
|
2372
2398
|
openItemCreateGizmo(type: ItemCreateType): void;
|
|
@@ -2408,6 +2434,9 @@ type TextFormProperty = BaseFormProperty & {
|
|
|
2408
2434
|
type VideoFormProperty = BaseFormProperty & {
|
|
2409
2435
|
video: string;
|
|
2410
2436
|
};
|
|
2437
|
+
type EffectsFormProperty = BaseFormProperty & {
|
|
2438
|
+
effects: string;
|
|
2439
|
+
};
|
|
2411
2440
|
/**
|
|
2412
2441
|
* @description 页面表单类型和属性引用
|
|
2413
2442
|
*/
|
|
@@ -3017,7 +3046,49 @@ type VideoGeneratorResource = {
|
|
|
3017
3046
|
extensions?: Record<string, any>;
|
|
3018
3047
|
};
|
|
3019
3048
|
type GeneratorResource = SpriteGeneratorResource | VideoGeneratorResource;
|
|
3020
|
-
type
|
|
3049
|
+
type EffectsCreateInfo = {
|
|
3050
|
+
/**
|
|
3051
|
+
* @description 元素类型 - 特效
|
|
3052
|
+
*/
|
|
3053
|
+
type: 'effects';
|
|
3054
|
+
/**
|
|
3055
|
+
* @description 元素名称
|
|
3056
|
+
*/
|
|
3057
|
+
name?: string;
|
|
3058
|
+
/**
|
|
3059
|
+
* @description 元素id
|
|
3060
|
+
*/
|
|
3061
|
+
id?: string;
|
|
3062
|
+
/**
|
|
3063
|
+
* @description 父元素id
|
|
3064
|
+
*/
|
|
3065
|
+
parentId?: string;
|
|
3066
|
+
/**
|
|
3067
|
+
* @description 生成器大小
|
|
3068
|
+
*/
|
|
3069
|
+
size?: spec.vec2;
|
|
3070
|
+
/**
|
|
3071
|
+
* @description 生成器位置
|
|
3072
|
+
*/
|
|
3073
|
+
position: spec.vec2;
|
|
3074
|
+
/**
|
|
3075
|
+
* @description 旋转角度
|
|
3076
|
+
*/
|
|
3077
|
+
rotation?: number;
|
|
3078
|
+
/**
|
|
3079
|
+
* @description 缩放
|
|
3080
|
+
*/
|
|
3081
|
+
scale?: spec.vec2;
|
|
3082
|
+
/**
|
|
3083
|
+
* @description 动效资源地址
|
|
3084
|
+
*/
|
|
3085
|
+
url: string;
|
|
3086
|
+
/**
|
|
3087
|
+
* @description 扩展属性
|
|
3088
|
+
*/
|
|
3089
|
+
extensions?: Record<string, any>;
|
|
3090
|
+
};
|
|
3091
|
+
type ItemCreateInfo = NullCreateInfo | SpriteCreateInfo | TextCreateInfo | VideoCreateInfo | GeneratorCreateInfo | EffectsCreateInfo;
|
|
3021
3092
|
/**
|
|
3022
3093
|
* @description 场景创建信息
|
|
3023
3094
|
*/
|
|
@@ -3059,4 +3130,4 @@ type ViewportFitShiftParam = {
|
|
|
3059
3130
|
bottom?: number;
|
|
3060
3131
|
};
|
|
3061
3132
|
|
|
3062
|
-
export { type ActiveData, type BaseFormProperty, BaseItem, Box2, type CreateOperation, type DeleteOperation, type GizmoType, type ItemCreateInfo, ItemOrderAction, type NullCreateInfo, NullItem, type NullItemOptions, type Operation, type PageData, type PageFormTypedProperty, type PageProperty, SDK, type SDKEvents, type SDKInputParam, type SDKItem$1 as SDKItem, type SDKItemOptions, type SDKOptions, type SetItemPropertyValueParam, type SpecificPageFormProps, type SpriteCreateInfo, type SpriteFormProperty, SpriteItem, type SpriteItemOptions, type TextCreateInfo, type TextFormProperty, TextItem, type TextItemOptions, type UpdateOperation, Vector2, type VideoCreateInfo, type VideoFormProperty, VideoItem, type VideoItemOptions, type ViewItemTypedProperty, type ViewParam, type ViewProperty, createSDKItem, createSDKItemFromPlayerItem, isBaseItem, isNullItem, isSpriteItem, isTextItem, isVideoItem };
|
|
3133
|
+
export { type ActiveData, type BaseFormProperty, BaseItem, Box2, type CreateOperation, type DeleteOperation, type EffectsCreateInfo, EffectsItem, type EffectsItemOptions, type GeneratorCreateInfo, GeneratorItem, type GeneratorItemOptions, type GizmoType, type ItemCreateInfo, ItemOrderAction, type NullCreateInfo, NullItem, type NullItemOptions, type Operation, type PageData, type PageFormTypedProperty, type PageProperty, SDK, type SDKEvents, type SDKInputParam, type SDKItem$1 as SDKItem, type SDKItemOptions, type SDKOptions, type SetItemPropertyValueParam, type SpecificPageFormProps, type SpriteCreateInfo, type SpriteFormProperty, SpriteItem, type SpriteItemOptions, type TextCreateInfo, type TextFormProperty, TextItem, type TextItemOptions, type UpdateOperation, Vector2, type VideoCreateInfo, type VideoFormProperty, VideoItem, type VideoItemOptions, type ViewItemTypedProperty, type ViewParam, type ViewProperty, createSDKItem, createSDKItemFromPlayerItem, isBaseItem, isEffectsItem, isGeneratorItem, isNullItem, isSpriteItem, isTextItem, isVideoItem };
|
package/dist/index.d.ts
CHANGED
|
@@ -100,11 +100,14 @@ type GeneratorItemOptions = SDKItemOptions & {
|
|
|
100
100
|
*/
|
|
101
101
|
property?: Partial<SpriteFormProperty>;
|
|
102
102
|
};
|
|
103
|
+
type EffectsItemOptions = SDKItemOptions & {
|
|
104
|
+
property?: Partial<EffectsFormProperty>;
|
|
105
|
+
};
|
|
103
106
|
/**
|
|
104
107
|
* @description SDKItem 类型(独立于 spec.ItemType)
|
|
105
108
|
* @description 包含所有 SDK 层级的元素类型,包括虚拟类型如 generator
|
|
106
109
|
*/
|
|
107
|
-
type SDKItemType = 'sprite' | 'text' | 'video' | 'null' | 'generator';
|
|
110
|
+
type SDKItemType = 'sprite' | 'text' | 'video' | 'null' | 'generator' | 'effects' | 'frame';
|
|
108
111
|
|
|
109
112
|
/**
|
|
110
113
|
* @description SDKItem 抽象基类
|
|
@@ -200,11 +203,6 @@ declare abstract class BaseItem {
|
|
|
200
203
|
* @description 清空所有扩展属性
|
|
201
204
|
*/
|
|
202
205
|
clearExtensions(): void;
|
|
203
|
-
/**
|
|
204
|
-
* @description 转换为普通对象(用于序列化)
|
|
205
|
-
* @returns 普通对象
|
|
206
|
-
*/
|
|
207
|
-
abstract toJSON(): Record<string, any>;
|
|
208
206
|
/**
|
|
209
207
|
* @description 转换为 CreateInfo(用于元素复制/导出)
|
|
210
208
|
* @param withParent 是否包含父节点ID
|
|
@@ -217,10 +215,10 @@ declare abstract class BaseItem {
|
|
|
217
215
|
*/
|
|
218
216
|
abstract clone(): BaseItem;
|
|
219
217
|
/**
|
|
220
|
-
* @description 获取基础属性的 JSON
|
|
221
|
-
* @
|
|
218
|
+
* @description 获取基础属性的 JSON 对象,转换为普通对象(用于序列化)
|
|
219
|
+
* @returns 普通对象
|
|
222
220
|
*/
|
|
223
|
-
|
|
221
|
+
toJSON(): Record<string, any>;
|
|
224
222
|
}
|
|
225
223
|
/**
|
|
226
224
|
* @description 类型守卫函数:检查对象是否是 BaseItem
|
|
@@ -278,10 +276,6 @@ declare class SpriteItem extends BaseItem {
|
|
|
278
276
|
*/
|
|
279
277
|
get keyPropertyEditing(): boolean;
|
|
280
278
|
set keyPropertyEditing(value: boolean);
|
|
281
|
-
/**
|
|
282
|
-
* @description 转换为普通对象
|
|
283
|
-
*/
|
|
284
|
-
toJSON(): Record<string, any>;
|
|
285
279
|
/**
|
|
286
280
|
* @description 转换为 CreateInfo
|
|
287
281
|
* @param withParent 是否包含父节点ID
|
|
@@ -397,10 +391,6 @@ declare class TextItem extends BaseItem {
|
|
|
397
391
|
*/
|
|
398
392
|
get visible(): boolean;
|
|
399
393
|
set visible(value: boolean);
|
|
400
|
-
/**
|
|
401
|
-
* @description 转换为普通对象
|
|
402
|
-
*/
|
|
403
|
-
toJSON(): Record<string, any>;
|
|
404
394
|
/**
|
|
405
395
|
* @description 转换为 CreateInfo
|
|
406
396
|
* @param withParent 是否包含父节点ID
|
|
@@ -465,10 +455,6 @@ declare class VideoItem extends BaseItem {
|
|
|
465
455
|
*/
|
|
466
456
|
get keyPropertyEditing(): boolean;
|
|
467
457
|
set keyPropertyEditing(value: boolean);
|
|
468
|
-
/**
|
|
469
|
-
* @description 转换为普通对象
|
|
470
|
-
*/
|
|
471
|
-
toJSON(): Record<string, any>;
|
|
472
458
|
/**
|
|
473
459
|
* @description 转换为 CreateInfo
|
|
474
460
|
* @param withParent 是否包含父节点ID
|
|
@@ -536,10 +522,6 @@ declare class NullItem extends BaseItem {
|
|
|
536
522
|
* @description 设置缩放(存储在扩展属性中)
|
|
537
523
|
*/
|
|
538
524
|
set scaleForCreateInfo(value: [number, number]);
|
|
539
|
-
/**
|
|
540
|
-
* @description 转换为普通对象
|
|
541
|
-
*/
|
|
542
|
-
toJSON(): Record<string, any>;
|
|
543
525
|
/**
|
|
544
526
|
* @description 转换为 CreateInfo
|
|
545
527
|
* @param withParent 是否包含父节点ID
|
|
@@ -610,10 +592,6 @@ declare class GeneratorItem extends BaseItem {
|
|
|
610
592
|
*/
|
|
611
593
|
get keyPropertyEditing(): boolean;
|
|
612
594
|
set keyPropertyEditing(value: boolean);
|
|
613
|
-
/**
|
|
614
|
-
* @description 转换为普通对象
|
|
615
|
-
*/
|
|
616
|
-
toJSON(): Record<string, any>;
|
|
617
595
|
/**
|
|
618
596
|
* @description 转换为 GeneratorCreateInfo
|
|
619
597
|
* @param withParent 是否包含父节点ID
|
|
@@ -636,6 +614,73 @@ declare class GeneratorItem extends BaseItem {
|
|
|
636
614
|
*/
|
|
637
615
|
clone(): GeneratorItem;
|
|
638
616
|
}
|
|
617
|
+
/**
|
|
618
|
+
* @description 类型守卫:检查是否是 GeneratorItem
|
|
619
|
+
*/
|
|
620
|
+
declare function isGeneratorItem(obj: any): obj is GeneratorItem;
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* @description 特效产物 元素 SDKItem 类
|
|
624
|
+
*/
|
|
625
|
+
declare class EffectsItem extends BaseItem {
|
|
626
|
+
/**
|
|
627
|
+
* @description 元素类型(独立类型,不属于 spec.ItemType)
|
|
628
|
+
*/
|
|
629
|
+
readonly type: SDKItemType;
|
|
630
|
+
/**
|
|
631
|
+
* @description 元素属性
|
|
632
|
+
*/
|
|
633
|
+
property: EffectsFormProperty;
|
|
634
|
+
constructor(options: EffectsItemOptions);
|
|
635
|
+
/**
|
|
636
|
+
* @description 特效资源地址
|
|
637
|
+
*/
|
|
638
|
+
get effects(): string;
|
|
639
|
+
set effects(value: string);
|
|
640
|
+
/**
|
|
641
|
+
* @description 位置
|
|
642
|
+
*/
|
|
643
|
+
get position(): [number, number];
|
|
644
|
+
set position(value: [number, number]);
|
|
645
|
+
/**
|
|
646
|
+
* @description 大小
|
|
647
|
+
*/
|
|
648
|
+
get size(): [number, number];
|
|
649
|
+
set size(value: [number, number]);
|
|
650
|
+
/**
|
|
651
|
+
* @description 旋转(二维旋转角度)
|
|
652
|
+
*/
|
|
653
|
+
get rotation(): number;
|
|
654
|
+
set rotation(value: number);
|
|
655
|
+
/**
|
|
656
|
+
* @description 完整旋转(包含 x, y, z)
|
|
657
|
+
*/
|
|
658
|
+
get fullRotation(): [number, number, number];
|
|
659
|
+
set fullRotation(value: [number, number, number]);
|
|
660
|
+
/**
|
|
661
|
+
* @description 可见性
|
|
662
|
+
*/
|
|
663
|
+
get visible(): boolean;
|
|
664
|
+
set visible(value: boolean);
|
|
665
|
+
/**
|
|
666
|
+
* @description 是否正在编辑关键属性
|
|
667
|
+
*/
|
|
668
|
+
get keyPropertyEditing(): boolean;
|
|
669
|
+
set keyPropertyEditing(value: boolean);
|
|
670
|
+
/**
|
|
671
|
+
* @description 转换为 EffectsCreateInfo
|
|
672
|
+
* @param withParent 是否包含父节点ID
|
|
673
|
+
*/
|
|
674
|
+
toCreateInfo(withParent?: boolean): EffectsCreateInfo;
|
|
675
|
+
/**
|
|
676
|
+
* @description 克隆 SDKItem
|
|
677
|
+
*/
|
|
678
|
+
clone(): EffectsItem;
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* @description 类型守卫:检查是否是 EffectsItem
|
|
682
|
+
*/
|
|
683
|
+
declare function isEffectsItem(obj: any): obj is EffectsItem;
|
|
639
684
|
|
|
640
685
|
/**
|
|
641
686
|
* @description 根据 item type 创建对应的 SDKItem 实例
|
|
@@ -2320,14 +2365,12 @@ declare class SDK {
|
|
|
2320
2365
|
* @param createInfo 生成器创建信息
|
|
2321
2366
|
* @returns 生成器元素ID
|
|
2322
2367
|
*/
|
|
2323
|
-
|
|
2368
|
+
addGeneratorItem(createInfo: GeneratorCreateInfo): string;
|
|
2324
2369
|
/**
|
|
2325
|
-
* @description
|
|
2326
|
-
* @param
|
|
2327
|
-
* @returns 视频生成器元素ID
|
|
2328
|
-
* @deprecated 使用 createGenerator 替代
|
|
2370
|
+
* @description 创建动效元素(仅限调试使用)
|
|
2371
|
+
* @param effectsInfo 动效创建信息
|
|
2329
2372
|
*/
|
|
2330
|
-
|
|
2373
|
+
addEffectsItem(effectsInfo: EffectsCreateInfo): void;
|
|
2331
2374
|
/**
|
|
2332
2375
|
* @description 设置生成器资源,将生成器转换为对应的元素
|
|
2333
2376
|
* @param id 生成器元素ID
|
|
@@ -2340,33 +2383,16 @@ declare class SDK {
|
|
|
2340
2383
|
* @param resource 生成器资源信息
|
|
2341
2384
|
*/
|
|
2342
2385
|
setGeneratorResourceFromObject(resource: GeneratorResource): void;
|
|
2343
|
-
/**
|
|
2344
|
-
* @description 将视频生成器转换为视频元素
|
|
2345
|
-
* @param id 视频生成器元素ID
|
|
2346
|
-
* @param videoUrl 视频资源地址
|
|
2347
|
-
* @returns 新的视频元素ID
|
|
2348
|
-
* @deprecated 使用 setGeneratorResource 替代
|
|
2349
|
-
*/
|
|
2350
|
-
convertVideoGeneratorToVideo(id: string, videoUrl: string): Promise<string>;
|
|
2351
2386
|
/**
|
|
2352
2387
|
* @description 设置视频生成器资源
|
|
2353
2388
|
* @param resource 视频生成器资源信息
|
|
2354
|
-
* @deprecated 使用 setGeneratorResource 替代
|
|
2355
|
-
*/
|
|
2356
|
-
setVideoGeneratorResource(resource: VideoGeneratorResource): void;
|
|
2357
|
-
/**
|
|
2358
|
-
* @description 创建图层生成器元素
|
|
2359
|
-
* @param createInfo 图层生成器创建信息
|
|
2360
|
-
* @returns 图层生成器元素ID
|
|
2361
|
-
* @deprecated 使用 createGenerator 替代
|
|
2362
2389
|
*/
|
|
2363
|
-
|
|
2390
|
+
setVideoGeneratorResource(resource: VideoGeneratorResource): Promise<string>;
|
|
2364
2391
|
/**
|
|
2365
2392
|
* @description 设置图层生成器资源
|
|
2366
2393
|
* @param resource 图层生成器资源信息
|
|
2367
|
-
* @deprecated 使用 setGeneratorResource 替代
|
|
2368
2394
|
*/
|
|
2369
|
-
setSpriteGeneratorResource(resource: SpriteGeneratorResource):
|
|
2395
|
+
setSpriteGeneratorResource(resource: SpriteGeneratorResource): Promise<string>;
|
|
2370
2396
|
setItemLockState(id: string, state: boolean): void;
|
|
2371
2397
|
getItemLockState(id: string): void;
|
|
2372
2398
|
openItemCreateGizmo(type: ItemCreateType): void;
|
|
@@ -2408,6 +2434,9 @@ type TextFormProperty = BaseFormProperty & {
|
|
|
2408
2434
|
type VideoFormProperty = BaseFormProperty & {
|
|
2409
2435
|
video: string;
|
|
2410
2436
|
};
|
|
2437
|
+
type EffectsFormProperty = BaseFormProperty & {
|
|
2438
|
+
effects: string;
|
|
2439
|
+
};
|
|
2411
2440
|
/**
|
|
2412
2441
|
* @description 页面表单类型和属性引用
|
|
2413
2442
|
*/
|
|
@@ -3017,7 +3046,49 @@ type VideoGeneratorResource = {
|
|
|
3017
3046
|
extensions?: Record<string, any>;
|
|
3018
3047
|
};
|
|
3019
3048
|
type GeneratorResource = SpriteGeneratorResource | VideoGeneratorResource;
|
|
3020
|
-
type
|
|
3049
|
+
type EffectsCreateInfo = {
|
|
3050
|
+
/**
|
|
3051
|
+
* @description 元素类型 - 特效
|
|
3052
|
+
*/
|
|
3053
|
+
type: 'effects';
|
|
3054
|
+
/**
|
|
3055
|
+
* @description 元素名称
|
|
3056
|
+
*/
|
|
3057
|
+
name?: string;
|
|
3058
|
+
/**
|
|
3059
|
+
* @description 元素id
|
|
3060
|
+
*/
|
|
3061
|
+
id?: string;
|
|
3062
|
+
/**
|
|
3063
|
+
* @description 父元素id
|
|
3064
|
+
*/
|
|
3065
|
+
parentId?: string;
|
|
3066
|
+
/**
|
|
3067
|
+
* @description 生成器大小
|
|
3068
|
+
*/
|
|
3069
|
+
size?: spec.vec2;
|
|
3070
|
+
/**
|
|
3071
|
+
* @description 生成器位置
|
|
3072
|
+
*/
|
|
3073
|
+
position: spec.vec2;
|
|
3074
|
+
/**
|
|
3075
|
+
* @description 旋转角度
|
|
3076
|
+
*/
|
|
3077
|
+
rotation?: number;
|
|
3078
|
+
/**
|
|
3079
|
+
* @description 缩放
|
|
3080
|
+
*/
|
|
3081
|
+
scale?: spec.vec2;
|
|
3082
|
+
/**
|
|
3083
|
+
* @description 动效资源地址
|
|
3084
|
+
*/
|
|
3085
|
+
url: string;
|
|
3086
|
+
/**
|
|
3087
|
+
* @description 扩展属性
|
|
3088
|
+
*/
|
|
3089
|
+
extensions?: Record<string, any>;
|
|
3090
|
+
};
|
|
3091
|
+
type ItemCreateInfo = NullCreateInfo | SpriteCreateInfo | TextCreateInfo | VideoCreateInfo | GeneratorCreateInfo | EffectsCreateInfo;
|
|
3021
3092
|
/**
|
|
3022
3093
|
* @description 场景创建信息
|
|
3023
3094
|
*/
|
|
@@ -3059,4 +3130,4 @@ type ViewportFitShiftParam = {
|
|
|
3059
3130
|
bottom?: number;
|
|
3060
3131
|
};
|
|
3061
3132
|
|
|
3062
|
-
export { type ActiveData, type BaseFormProperty, BaseItem, Box2, type CreateOperation, type DeleteOperation, type GizmoType, type ItemCreateInfo, ItemOrderAction, type NullCreateInfo, NullItem, type NullItemOptions, type Operation, type PageData, type PageFormTypedProperty, type PageProperty, SDK, type SDKEvents, type SDKInputParam, type SDKItem$1 as SDKItem, type SDKItemOptions, type SDKOptions, type SetItemPropertyValueParam, type SpecificPageFormProps, type SpriteCreateInfo, type SpriteFormProperty, SpriteItem, type SpriteItemOptions, type TextCreateInfo, type TextFormProperty, TextItem, type TextItemOptions, type UpdateOperation, Vector2, type VideoCreateInfo, type VideoFormProperty, VideoItem, type VideoItemOptions, type ViewItemTypedProperty, type ViewParam, type ViewProperty, createSDKItem, createSDKItemFromPlayerItem, isBaseItem, isNullItem, isSpriteItem, isTextItem, isVideoItem };
|
|
3133
|
+
export { type ActiveData, type BaseFormProperty, BaseItem, Box2, type CreateOperation, type DeleteOperation, type EffectsCreateInfo, EffectsItem, type EffectsItemOptions, type GeneratorCreateInfo, GeneratorItem, type GeneratorItemOptions, type GizmoType, type ItemCreateInfo, ItemOrderAction, type NullCreateInfo, NullItem, type NullItemOptions, type Operation, type PageData, type PageFormTypedProperty, type PageProperty, SDK, type SDKEvents, type SDKInputParam, type SDKItem$1 as SDKItem, type SDKItemOptions, type SDKOptions, type SetItemPropertyValueParam, type SpecificPageFormProps, type SpriteCreateInfo, type SpriteFormProperty, SpriteItem, type SpriteItemOptions, type TextCreateInfo, type TextFormProperty, TextItem, type TextItemOptions, type UpdateOperation, Vector2, type VideoCreateInfo, type VideoFormProperty, VideoItem, type VideoItemOptions, type ViewItemTypedProperty, type ViewParam, type ViewProperty, createSDKItem, createSDKItemFromPlayerItem, isBaseItem, isEffectsItem, isGeneratorItem, isNullItem, isSpriteItem, isTextItem, isVideoItem };
|