@vvfx/sdk 0.0.0-alpha.85 → 0.0.0-alpha.86
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 +79 -6
- package/dist/index.d.ts +79 -6
- package/dist/index.global.js +7 -7
- package/dist/index.js +1 -1
- package/package.json +7 -7
package/dist/index.d.cts
CHANGED
|
@@ -582,8 +582,8 @@ type SDKConfig = {
|
|
|
582
582
|
textGizmoConfig: TextGizmoConfig;
|
|
583
583
|
maskGizmoEnabled: boolean;
|
|
584
584
|
maskGizmoConfig: MaskGizmoConfig;
|
|
585
|
-
|
|
586
|
-
|
|
585
|
+
spriteTextEditGizmoEnabled: boolean;
|
|
586
|
+
spriteTextEditGizmoConfig: SpriteTextEditGizmoConfig;
|
|
587
587
|
};
|
|
588
588
|
};
|
|
589
589
|
/**
|
|
@@ -700,6 +700,10 @@ type PreferenceGizmoConfig = {
|
|
|
700
700
|
* @description 选择功能参数
|
|
701
701
|
*/
|
|
702
702
|
type SelectorGizmoConfig = {
|
|
703
|
+
/**
|
|
704
|
+
* @description 视频预选中时
|
|
705
|
+
*/
|
|
706
|
+
videoPreSelectedPlay: boolean;
|
|
703
707
|
/**
|
|
704
708
|
* @description 预选框线宽
|
|
705
709
|
*/
|
|
@@ -774,9 +778,17 @@ type TransformGizmoConfig = {
|
|
|
774
778
|
*/
|
|
775
779
|
pictureLogoUrl: string;
|
|
776
780
|
/**
|
|
777
|
-
* @description
|
|
781
|
+
* @description 空节点Logo地址
|
|
778
782
|
*/
|
|
779
783
|
nullLogoUrl: string;
|
|
784
|
+
/**
|
|
785
|
+
* @description 文本Logo地址
|
|
786
|
+
*/
|
|
787
|
+
textLogoUrl: string;
|
|
788
|
+
/**
|
|
789
|
+
* @description 视频Logo地址
|
|
790
|
+
*/
|
|
791
|
+
videoLogoUrl: string;
|
|
780
792
|
/**
|
|
781
793
|
* @description 大小文字颜色
|
|
782
794
|
*/
|
|
@@ -1019,7 +1031,7 @@ type MaskGizmoConfig = {
|
|
|
1019
1031
|
/**
|
|
1020
1032
|
* @description 精准改字编辑参数
|
|
1021
1033
|
*/
|
|
1022
|
-
type
|
|
1034
|
+
type SpriteTextEditGizmoConfig = {
|
|
1023
1035
|
/**
|
|
1024
1036
|
* @description 文案颜色
|
|
1025
1037
|
*/
|
|
@@ -1126,6 +1138,7 @@ type SDKEvents = {
|
|
|
1126
1138
|
'spriteTextSelected': [{
|
|
1127
1139
|
id: string;
|
|
1128
1140
|
index: number;
|
|
1141
|
+
text: string;
|
|
1129
1142
|
} | undefined];
|
|
1130
1143
|
};
|
|
1131
1144
|
declare class SDK {
|
|
@@ -1332,6 +1345,7 @@ declare class SDK {
|
|
|
1332
1345
|
* @param spriteInfo 图层元素信息
|
|
1333
1346
|
*/
|
|
1334
1347
|
addSpriteItem(spriteInfo: SpriteCreateInfo, scene?: spec.JSONScene): Promise<string | undefined>;
|
|
1348
|
+
addVideoItem(videoInfo: VideoCreateInfo, scene?: spec.JSONScene): Promise<string | undefined>;
|
|
1335
1349
|
openPictureCutGizmo(): void;
|
|
1336
1350
|
closePictureCutGizmo(): void;
|
|
1337
1351
|
getCutInfo(): {
|
|
@@ -1416,6 +1430,8 @@ declare class SDK {
|
|
|
1416
1430
|
closeSpriteTextEditGizmo(): void;
|
|
1417
1431
|
changeSpriteTextSelectedIndex(id: string, index: number): void;
|
|
1418
1432
|
changeSpriteTextSelectedText(id: string, index: number, text: string): void;
|
|
1433
|
+
getBoundingBoxByItemCreateInfo(createInfo: ItemCreateInfo): Box2;
|
|
1434
|
+
getBoundingBoxByItemCreateInfos(createInfos: ItemCreateInfo[]): Box2;
|
|
1419
1435
|
}
|
|
1420
1436
|
|
|
1421
1437
|
type SizeAdaptDirection = 'x' | 'y';
|
|
@@ -1447,6 +1463,9 @@ type TextFormProperty = BaseFormProperty & {
|
|
|
1447
1463
|
*/
|
|
1448
1464
|
outlineEnabled?: boolean;
|
|
1449
1465
|
};
|
|
1466
|
+
type VideoFormProperty = BaseFormProperty & {
|
|
1467
|
+
video: string;
|
|
1468
|
+
};
|
|
1450
1469
|
/**
|
|
1451
1470
|
* @description 页面表单类型和属性引用
|
|
1452
1471
|
*/
|
|
@@ -1469,7 +1488,7 @@ type PageFormTypeAndPropertyReference = {
|
|
|
1469
1488
|
[spec.ItemType.shape]: BaseFormProperty;
|
|
1470
1489
|
[spec.ItemType.postProcessVolume]: BaseFormProperty;
|
|
1471
1490
|
[spec.ItemType.node]: BaseFormProperty;
|
|
1472
|
-
[spec.ItemType.video]:
|
|
1491
|
+
[spec.ItemType.video]: VideoFormProperty;
|
|
1473
1492
|
[spec.ItemType.audio]: BaseFormProperty;
|
|
1474
1493
|
[spec.ItemType.richtext]: TextFormProperty;
|
|
1475
1494
|
};
|
|
@@ -1899,7 +1918,61 @@ type TextCreateInfo = {
|
|
|
1899
1918
|
*/
|
|
1900
1919
|
url?: string;
|
|
1901
1920
|
};
|
|
1902
|
-
|
|
1921
|
+
/**
|
|
1922
|
+
* @description 视频创建信息
|
|
1923
|
+
*/
|
|
1924
|
+
type VideoCreateInfo = {
|
|
1925
|
+
type: 'video';
|
|
1926
|
+
/**
|
|
1927
|
+
* @description 视频名称
|
|
1928
|
+
*/
|
|
1929
|
+
name?: string;
|
|
1930
|
+
/**
|
|
1931
|
+
* @description 元素id
|
|
1932
|
+
*/
|
|
1933
|
+
id?: string;
|
|
1934
|
+
/**
|
|
1935
|
+
* @description 父节点id
|
|
1936
|
+
*/
|
|
1937
|
+
parentId?: string;
|
|
1938
|
+
/**
|
|
1939
|
+
* @description 视频资源地址
|
|
1940
|
+
*/
|
|
1941
|
+
url: string;
|
|
1942
|
+
/**
|
|
1943
|
+
* @description 视频元素像素大小
|
|
1944
|
+
*/
|
|
1945
|
+
size: spec.vec2;
|
|
1946
|
+
/**
|
|
1947
|
+
* @description 视频元素缩放
|
|
1948
|
+
*/
|
|
1949
|
+
scale?: spec.vec2;
|
|
1950
|
+
/**
|
|
1951
|
+
* @description 视频元素旋转
|
|
1952
|
+
*/
|
|
1953
|
+
rotation?: number;
|
|
1954
|
+
/**
|
|
1955
|
+
* @description 视频元素二维位置
|
|
1956
|
+
*/
|
|
1957
|
+
position: spec.vec2;
|
|
1958
|
+
/**
|
|
1959
|
+
* @description 是否静音
|
|
1960
|
+
*/
|
|
1961
|
+
muted?: boolean;
|
|
1962
|
+
/**
|
|
1963
|
+
* @description 是否为透明视频
|
|
1964
|
+
*/
|
|
1965
|
+
transparent?: boolean;
|
|
1966
|
+
/**
|
|
1967
|
+
* @description 播放速率
|
|
1968
|
+
*/
|
|
1969
|
+
playbackRate?: number;
|
|
1970
|
+
/**
|
|
1971
|
+
* @description 音量
|
|
1972
|
+
*/
|
|
1973
|
+
volume?: number;
|
|
1974
|
+
};
|
|
1975
|
+
type ItemCreateInfo = NullCreateInfo | SpriteCreateInfo | TextCreateInfo | VideoCreateInfo;
|
|
1903
1976
|
/**
|
|
1904
1977
|
* @description 场景创建信息
|
|
1905
1978
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -582,8 +582,8 @@ type SDKConfig = {
|
|
|
582
582
|
textGizmoConfig: TextGizmoConfig;
|
|
583
583
|
maskGizmoEnabled: boolean;
|
|
584
584
|
maskGizmoConfig: MaskGizmoConfig;
|
|
585
|
-
|
|
586
|
-
|
|
585
|
+
spriteTextEditGizmoEnabled: boolean;
|
|
586
|
+
spriteTextEditGizmoConfig: SpriteTextEditGizmoConfig;
|
|
587
587
|
};
|
|
588
588
|
};
|
|
589
589
|
/**
|
|
@@ -700,6 +700,10 @@ type PreferenceGizmoConfig = {
|
|
|
700
700
|
* @description 选择功能参数
|
|
701
701
|
*/
|
|
702
702
|
type SelectorGizmoConfig = {
|
|
703
|
+
/**
|
|
704
|
+
* @description 视频预选中时
|
|
705
|
+
*/
|
|
706
|
+
videoPreSelectedPlay: boolean;
|
|
703
707
|
/**
|
|
704
708
|
* @description 预选框线宽
|
|
705
709
|
*/
|
|
@@ -774,9 +778,17 @@ type TransformGizmoConfig = {
|
|
|
774
778
|
*/
|
|
775
779
|
pictureLogoUrl: string;
|
|
776
780
|
/**
|
|
777
|
-
* @description
|
|
781
|
+
* @description 空节点Logo地址
|
|
778
782
|
*/
|
|
779
783
|
nullLogoUrl: string;
|
|
784
|
+
/**
|
|
785
|
+
* @description 文本Logo地址
|
|
786
|
+
*/
|
|
787
|
+
textLogoUrl: string;
|
|
788
|
+
/**
|
|
789
|
+
* @description 视频Logo地址
|
|
790
|
+
*/
|
|
791
|
+
videoLogoUrl: string;
|
|
780
792
|
/**
|
|
781
793
|
* @description 大小文字颜色
|
|
782
794
|
*/
|
|
@@ -1019,7 +1031,7 @@ type MaskGizmoConfig = {
|
|
|
1019
1031
|
/**
|
|
1020
1032
|
* @description 精准改字编辑参数
|
|
1021
1033
|
*/
|
|
1022
|
-
type
|
|
1034
|
+
type SpriteTextEditGizmoConfig = {
|
|
1023
1035
|
/**
|
|
1024
1036
|
* @description 文案颜色
|
|
1025
1037
|
*/
|
|
@@ -1126,6 +1138,7 @@ type SDKEvents = {
|
|
|
1126
1138
|
'spriteTextSelected': [{
|
|
1127
1139
|
id: string;
|
|
1128
1140
|
index: number;
|
|
1141
|
+
text: string;
|
|
1129
1142
|
} | undefined];
|
|
1130
1143
|
};
|
|
1131
1144
|
declare class SDK {
|
|
@@ -1332,6 +1345,7 @@ declare class SDK {
|
|
|
1332
1345
|
* @param spriteInfo 图层元素信息
|
|
1333
1346
|
*/
|
|
1334
1347
|
addSpriteItem(spriteInfo: SpriteCreateInfo, scene?: spec.JSONScene): Promise<string | undefined>;
|
|
1348
|
+
addVideoItem(videoInfo: VideoCreateInfo, scene?: spec.JSONScene): Promise<string | undefined>;
|
|
1335
1349
|
openPictureCutGizmo(): void;
|
|
1336
1350
|
closePictureCutGizmo(): void;
|
|
1337
1351
|
getCutInfo(): {
|
|
@@ -1416,6 +1430,8 @@ declare class SDK {
|
|
|
1416
1430
|
closeSpriteTextEditGizmo(): void;
|
|
1417
1431
|
changeSpriteTextSelectedIndex(id: string, index: number): void;
|
|
1418
1432
|
changeSpriteTextSelectedText(id: string, index: number, text: string): void;
|
|
1433
|
+
getBoundingBoxByItemCreateInfo(createInfo: ItemCreateInfo): Box2;
|
|
1434
|
+
getBoundingBoxByItemCreateInfos(createInfos: ItemCreateInfo[]): Box2;
|
|
1419
1435
|
}
|
|
1420
1436
|
|
|
1421
1437
|
type SizeAdaptDirection = 'x' | 'y';
|
|
@@ -1447,6 +1463,9 @@ type TextFormProperty = BaseFormProperty & {
|
|
|
1447
1463
|
*/
|
|
1448
1464
|
outlineEnabled?: boolean;
|
|
1449
1465
|
};
|
|
1466
|
+
type VideoFormProperty = BaseFormProperty & {
|
|
1467
|
+
video: string;
|
|
1468
|
+
};
|
|
1450
1469
|
/**
|
|
1451
1470
|
* @description 页面表单类型和属性引用
|
|
1452
1471
|
*/
|
|
@@ -1469,7 +1488,7 @@ type PageFormTypeAndPropertyReference = {
|
|
|
1469
1488
|
[spec.ItemType.shape]: BaseFormProperty;
|
|
1470
1489
|
[spec.ItemType.postProcessVolume]: BaseFormProperty;
|
|
1471
1490
|
[spec.ItemType.node]: BaseFormProperty;
|
|
1472
|
-
[spec.ItemType.video]:
|
|
1491
|
+
[spec.ItemType.video]: VideoFormProperty;
|
|
1473
1492
|
[spec.ItemType.audio]: BaseFormProperty;
|
|
1474
1493
|
[spec.ItemType.richtext]: TextFormProperty;
|
|
1475
1494
|
};
|
|
@@ -1899,7 +1918,61 @@ type TextCreateInfo = {
|
|
|
1899
1918
|
*/
|
|
1900
1919
|
url?: string;
|
|
1901
1920
|
};
|
|
1902
|
-
|
|
1921
|
+
/**
|
|
1922
|
+
* @description 视频创建信息
|
|
1923
|
+
*/
|
|
1924
|
+
type VideoCreateInfo = {
|
|
1925
|
+
type: 'video';
|
|
1926
|
+
/**
|
|
1927
|
+
* @description 视频名称
|
|
1928
|
+
*/
|
|
1929
|
+
name?: string;
|
|
1930
|
+
/**
|
|
1931
|
+
* @description 元素id
|
|
1932
|
+
*/
|
|
1933
|
+
id?: string;
|
|
1934
|
+
/**
|
|
1935
|
+
* @description 父节点id
|
|
1936
|
+
*/
|
|
1937
|
+
parentId?: string;
|
|
1938
|
+
/**
|
|
1939
|
+
* @description 视频资源地址
|
|
1940
|
+
*/
|
|
1941
|
+
url: string;
|
|
1942
|
+
/**
|
|
1943
|
+
* @description 视频元素像素大小
|
|
1944
|
+
*/
|
|
1945
|
+
size: spec.vec2;
|
|
1946
|
+
/**
|
|
1947
|
+
* @description 视频元素缩放
|
|
1948
|
+
*/
|
|
1949
|
+
scale?: spec.vec2;
|
|
1950
|
+
/**
|
|
1951
|
+
* @description 视频元素旋转
|
|
1952
|
+
*/
|
|
1953
|
+
rotation?: number;
|
|
1954
|
+
/**
|
|
1955
|
+
* @description 视频元素二维位置
|
|
1956
|
+
*/
|
|
1957
|
+
position: spec.vec2;
|
|
1958
|
+
/**
|
|
1959
|
+
* @description 是否静音
|
|
1960
|
+
*/
|
|
1961
|
+
muted?: boolean;
|
|
1962
|
+
/**
|
|
1963
|
+
* @description 是否为透明视频
|
|
1964
|
+
*/
|
|
1965
|
+
transparent?: boolean;
|
|
1966
|
+
/**
|
|
1967
|
+
* @description 播放速率
|
|
1968
|
+
*/
|
|
1969
|
+
playbackRate?: number;
|
|
1970
|
+
/**
|
|
1971
|
+
* @description 音量
|
|
1972
|
+
*/
|
|
1973
|
+
volume?: number;
|
|
1974
|
+
};
|
|
1975
|
+
type ItemCreateInfo = NullCreateInfo | SpriteCreateInfo | TextCreateInfo | VideoCreateInfo;
|
|
1903
1976
|
/**
|
|
1904
1977
|
* @description 场景创建信息
|
|
1905
1978
|
*/
|