@vvfx/sdk 0.0.0-alpha.68 → 0.0.0-alpha.69
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 +86 -5
- package/dist/index.d.ts +86 -5
- package/dist/index.global.js +1 -1
- package/dist/index.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -901,10 +901,20 @@ type PictureExpandGizmoConfig = {
|
|
|
901
901
|
*/
|
|
902
902
|
directionScaleInteractionDistance: number;
|
|
903
903
|
};
|
|
904
|
+
/**
|
|
905
|
+
* @description 文本交互控制器旋转交互模式
|
|
906
|
+
* 'corner': 角点旋转
|
|
907
|
+
* 'top-center': 顶部中心旋转
|
|
908
|
+
*/
|
|
909
|
+
type TextGizmoRotateInteractMode = 'corner' | 'top-center';
|
|
904
910
|
/**
|
|
905
911
|
* @description 文本交互控制器参数
|
|
906
912
|
*/
|
|
907
913
|
type TextGizmoConfig = {
|
|
914
|
+
/**
|
|
915
|
+
* @description 旋转交互模式
|
|
916
|
+
*/
|
|
917
|
+
rotateInteractMode: TextGizmoRotateInteractMode;
|
|
908
918
|
/**
|
|
909
919
|
* @description 包围盒线宽
|
|
910
920
|
*/
|
|
@@ -914,17 +924,41 @@ type TextGizmoConfig = {
|
|
|
914
924
|
*/
|
|
915
925
|
boxLineColor: number;
|
|
916
926
|
/**
|
|
917
|
-
* @description
|
|
918
|
-
*/
|
|
919
|
-
scaleCornerRadius: number;
|
|
920
|
-
/**
|
|
921
|
-
* @description 旋转交互点边长
|
|
927
|
+
* @description 旋转交互点边长 - 用于 top-center 交互模式
|
|
922
928
|
*/
|
|
923
929
|
rotationCornerWidth: number;
|
|
924
930
|
/**
|
|
925
931
|
* @description 旋转交互贴图地址
|
|
926
932
|
*/
|
|
927
933
|
rotationCornerTexture: string;
|
|
934
|
+
/**
|
|
935
|
+
* @description 旋转交互点半径
|
|
936
|
+
*/
|
|
937
|
+
rotationCornerRadius: number;
|
|
938
|
+
/**
|
|
939
|
+
* @description top-center 模式旋转交互距离
|
|
940
|
+
*/
|
|
941
|
+
rotationTopCenterInteractionDistance: number;
|
|
942
|
+
/**
|
|
943
|
+
* @description 旋转交互点填充色
|
|
944
|
+
*/
|
|
945
|
+
rotationCornerFillColor: number;
|
|
946
|
+
/**
|
|
947
|
+
* @description 旋转交互点描边宽度
|
|
948
|
+
*/
|
|
949
|
+
rotationCornerStrokeWidth: number;
|
|
950
|
+
/**
|
|
951
|
+
* @description 旋转交互点描边颜色
|
|
952
|
+
*/
|
|
953
|
+
rotationCornerStrokeColor: number;
|
|
954
|
+
/**
|
|
955
|
+
* @description Corner 模式旋转交互距离
|
|
956
|
+
*/
|
|
957
|
+
rotationCornerInteractionDistance: number;
|
|
958
|
+
/**
|
|
959
|
+
* @description 缩放交互点半径
|
|
960
|
+
*/
|
|
961
|
+
scaleCornerRadius: number;
|
|
928
962
|
/**
|
|
929
963
|
* @description 缩放交互点填充色
|
|
930
964
|
*/
|
|
@@ -937,6 +971,10 @@ type TextGizmoConfig = {
|
|
|
937
971
|
* @description 缩放交互点描边颜色
|
|
938
972
|
*/
|
|
939
973
|
scaleCornerStrokeColor: number;
|
|
974
|
+
/**
|
|
975
|
+
* @description 出发缩放交互的距离
|
|
976
|
+
*/
|
|
977
|
+
scaleInteractionDistance: number;
|
|
940
978
|
};
|
|
941
979
|
/**
|
|
942
980
|
* @description 蒙版参数
|
|
@@ -1119,8 +1157,14 @@ declare class SDK {
|
|
|
1119
1157
|
/**
|
|
1120
1158
|
* @description 设置视图缩放
|
|
1121
1159
|
* @param zoom 缩放值
|
|
1160
|
+
* @param center 缩放中心
|
|
1161
|
+
* @param ignoreClamp 是否忽视约束
|
|
1122
1162
|
*/
|
|
1123
1163
|
setPageZoom(zoom: number, center?: Vector2, ignoreClamp?: boolean): void;
|
|
1164
|
+
/**
|
|
1165
|
+
* @description 设置元素移动
|
|
1166
|
+
* @param targetTranslation 目标移动值
|
|
1167
|
+
*/
|
|
1124
1168
|
setPageMove(targetTranslation: Vector2): void;
|
|
1125
1169
|
/**
|
|
1126
1170
|
* @description 设置静态预览功能开关
|
|
@@ -1255,11 +1299,35 @@ declare class SDK {
|
|
|
1255
1299
|
getViewProperty(id: number): ViewProperty | undefined;
|
|
1256
1300
|
pageMove(shift: [number, number]): void;
|
|
1257
1301
|
pageZoom(shift: number, center?: [number, number]): void;
|
|
1302
|
+
/**
|
|
1303
|
+
* @description 设置视图缩放工具锁定缩放比例开关
|
|
1304
|
+
* @param state 缩放比例开关
|
|
1305
|
+
*/
|
|
1258
1306
|
setPictureCutGizmoLockScale(state: boolean): void;
|
|
1307
|
+
/**
|
|
1308
|
+
* @description 设置视图扩展工具锁定缩放比例开关
|
|
1309
|
+
* @param state 缩放比例开关
|
|
1310
|
+
*/
|
|
1259
1311
|
setPictureExpandGizmoLockScale(state: boolean): void;
|
|
1312
|
+
/**
|
|
1313
|
+
* @description 视图缩放函数
|
|
1314
|
+
* @param shiftParam 视图偏移值
|
|
1315
|
+
*/
|
|
1260
1316
|
viewportFit(shiftParam?: ViewportFitShiftParam): void;
|
|
1317
|
+
/**
|
|
1318
|
+
* @description 获取元素包围盒
|
|
1319
|
+
* @param idInfo 元素Id
|
|
1320
|
+
* @returns 元素包围盒
|
|
1321
|
+
*/
|
|
1261
1322
|
getItemBoxById(idInfo: string): Box2;
|
|
1323
|
+
/**
|
|
1324
|
+
* @description 设置元素字体
|
|
1325
|
+
* @param id 元素Id
|
|
1326
|
+
* @param fontFamilyName 字体名称
|
|
1327
|
+
* @param url 字体地址
|
|
1328
|
+
*/
|
|
1262
1329
|
setItemFontFamily(id: string, fontFamilyName: string, url: string): Promise<void>;
|
|
1330
|
+
createSceneByCreateInfos(createInfos: ItemCreateInfo[], sceneInfo: SceneCreaetInfo): spec.JSONScene;
|
|
1263
1331
|
}
|
|
1264
1332
|
|
|
1265
1333
|
type SizeAdaptDirection = 'x' | 'y';
|
|
@@ -1736,6 +1804,19 @@ type TextCreateInfo = {
|
|
|
1736
1804
|
url?: string;
|
|
1737
1805
|
};
|
|
1738
1806
|
type ItemCreateInfo = NullCreateInfo | SpriteCreateInfo | TextCreateInfo;
|
|
1807
|
+
/**
|
|
1808
|
+
* @description 场景创建信息
|
|
1809
|
+
*/
|
|
1810
|
+
type SceneCreaetInfo = {
|
|
1811
|
+
/**
|
|
1812
|
+
* @description 场景名称
|
|
1813
|
+
*/
|
|
1814
|
+
name: string;
|
|
1815
|
+
/**
|
|
1816
|
+
* @description 场景大小
|
|
1817
|
+
*/
|
|
1818
|
+
size: spec.vec2;
|
|
1819
|
+
};
|
|
1739
1820
|
declare enum ItemOrderAction {
|
|
1740
1821
|
BringToFront = 0,
|
|
1741
1822
|
SendToBack = 1,
|
package/dist/index.d.ts
CHANGED
|
@@ -901,10 +901,20 @@ type PictureExpandGizmoConfig = {
|
|
|
901
901
|
*/
|
|
902
902
|
directionScaleInteractionDistance: number;
|
|
903
903
|
};
|
|
904
|
+
/**
|
|
905
|
+
* @description 文本交互控制器旋转交互模式
|
|
906
|
+
* 'corner': 角点旋转
|
|
907
|
+
* 'top-center': 顶部中心旋转
|
|
908
|
+
*/
|
|
909
|
+
type TextGizmoRotateInteractMode = 'corner' | 'top-center';
|
|
904
910
|
/**
|
|
905
911
|
* @description 文本交互控制器参数
|
|
906
912
|
*/
|
|
907
913
|
type TextGizmoConfig = {
|
|
914
|
+
/**
|
|
915
|
+
* @description 旋转交互模式
|
|
916
|
+
*/
|
|
917
|
+
rotateInteractMode: TextGizmoRotateInteractMode;
|
|
908
918
|
/**
|
|
909
919
|
* @description 包围盒线宽
|
|
910
920
|
*/
|
|
@@ -914,17 +924,41 @@ type TextGizmoConfig = {
|
|
|
914
924
|
*/
|
|
915
925
|
boxLineColor: number;
|
|
916
926
|
/**
|
|
917
|
-
* @description
|
|
918
|
-
*/
|
|
919
|
-
scaleCornerRadius: number;
|
|
920
|
-
/**
|
|
921
|
-
* @description 旋转交互点边长
|
|
927
|
+
* @description 旋转交互点边长 - 用于 top-center 交互模式
|
|
922
928
|
*/
|
|
923
929
|
rotationCornerWidth: number;
|
|
924
930
|
/**
|
|
925
931
|
* @description 旋转交互贴图地址
|
|
926
932
|
*/
|
|
927
933
|
rotationCornerTexture: string;
|
|
934
|
+
/**
|
|
935
|
+
* @description 旋转交互点半径
|
|
936
|
+
*/
|
|
937
|
+
rotationCornerRadius: number;
|
|
938
|
+
/**
|
|
939
|
+
* @description top-center 模式旋转交互距离
|
|
940
|
+
*/
|
|
941
|
+
rotationTopCenterInteractionDistance: number;
|
|
942
|
+
/**
|
|
943
|
+
* @description 旋转交互点填充色
|
|
944
|
+
*/
|
|
945
|
+
rotationCornerFillColor: number;
|
|
946
|
+
/**
|
|
947
|
+
* @description 旋转交互点描边宽度
|
|
948
|
+
*/
|
|
949
|
+
rotationCornerStrokeWidth: number;
|
|
950
|
+
/**
|
|
951
|
+
* @description 旋转交互点描边颜色
|
|
952
|
+
*/
|
|
953
|
+
rotationCornerStrokeColor: number;
|
|
954
|
+
/**
|
|
955
|
+
* @description Corner 模式旋转交互距离
|
|
956
|
+
*/
|
|
957
|
+
rotationCornerInteractionDistance: number;
|
|
958
|
+
/**
|
|
959
|
+
* @description 缩放交互点半径
|
|
960
|
+
*/
|
|
961
|
+
scaleCornerRadius: number;
|
|
928
962
|
/**
|
|
929
963
|
* @description 缩放交互点填充色
|
|
930
964
|
*/
|
|
@@ -937,6 +971,10 @@ type TextGizmoConfig = {
|
|
|
937
971
|
* @description 缩放交互点描边颜色
|
|
938
972
|
*/
|
|
939
973
|
scaleCornerStrokeColor: number;
|
|
974
|
+
/**
|
|
975
|
+
* @description 出发缩放交互的距离
|
|
976
|
+
*/
|
|
977
|
+
scaleInteractionDistance: number;
|
|
940
978
|
};
|
|
941
979
|
/**
|
|
942
980
|
* @description 蒙版参数
|
|
@@ -1119,8 +1157,14 @@ declare class SDK {
|
|
|
1119
1157
|
/**
|
|
1120
1158
|
* @description 设置视图缩放
|
|
1121
1159
|
* @param zoom 缩放值
|
|
1160
|
+
* @param center 缩放中心
|
|
1161
|
+
* @param ignoreClamp 是否忽视约束
|
|
1122
1162
|
*/
|
|
1123
1163
|
setPageZoom(zoom: number, center?: Vector2, ignoreClamp?: boolean): void;
|
|
1164
|
+
/**
|
|
1165
|
+
* @description 设置元素移动
|
|
1166
|
+
* @param targetTranslation 目标移动值
|
|
1167
|
+
*/
|
|
1124
1168
|
setPageMove(targetTranslation: Vector2): void;
|
|
1125
1169
|
/**
|
|
1126
1170
|
* @description 设置静态预览功能开关
|
|
@@ -1255,11 +1299,35 @@ declare class SDK {
|
|
|
1255
1299
|
getViewProperty(id: number): ViewProperty | undefined;
|
|
1256
1300
|
pageMove(shift: [number, number]): void;
|
|
1257
1301
|
pageZoom(shift: number, center?: [number, number]): void;
|
|
1302
|
+
/**
|
|
1303
|
+
* @description 设置视图缩放工具锁定缩放比例开关
|
|
1304
|
+
* @param state 缩放比例开关
|
|
1305
|
+
*/
|
|
1258
1306
|
setPictureCutGizmoLockScale(state: boolean): void;
|
|
1307
|
+
/**
|
|
1308
|
+
* @description 设置视图扩展工具锁定缩放比例开关
|
|
1309
|
+
* @param state 缩放比例开关
|
|
1310
|
+
*/
|
|
1259
1311
|
setPictureExpandGizmoLockScale(state: boolean): void;
|
|
1312
|
+
/**
|
|
1313
|
+
* @description 视图缩放函数
|
|
1314
|
+
* @param shiftParam 视图偏移值
|
|
1315
|
+
*/
|
|
1260
1316
|
viewportFit(shiftParam?: ViewportFitShiftParam): void;
|
|
1317
|
+
/**
|
|
1318
|
+
* @description 获取元素包围盒
|
|
1319
|
+
* @param idInfo 元素Id
|
|
1320
|
+
* @returns 元素包围盒
|
|
1321
|
+
*/
|
|
1261
1322
|
getItemBoxById(idInfo: string): Box2;
|
|
1323
|
+
/**
|
|
1324
|
+
* @description 设置元素字体
|
|
1325
|
+
* @param id 元素Id
|
|
1326
|
+
* @param fontFamilyName 字体名称
|
|
1327
|
+
* @param url 字体地址
|
|
1328
|
+
*/
|
|
1262
1329
|
setItemFontFamily(id: string, fontFamilyName: string, url: string): Promise<void>;
|
|
1330
|
+
createSceneByCreateInfos(createInfos: ItemCreateInfo[], sceneInfo: SceneCreaetInfo): spec.JSONScene;
|
|
1263
1331
|
}
|
|
1264
1332
|
|
|
1265
1333
|
type SizeAdaptDirection = 'x' | 'y';
|
|
@@ -1736,6 +1804,19 @@ type TextCreateInfo = {
|
|
|
1736
1804
|
url?: string;
|
|
1737
1805
|
};
|
|
1738
1806
|
type ItemCreateInfo = NullCreateInfo | SpriteCreateInfo | TextCreateInfo;
|
|
1807
|
+
/**
|
|
1808
|
+
* @description 场景创建信息
|
|
1809
|
+
*/
|
|
1810
|
+
type SceneCreaetInfo = {
|
|
1811
|
+
/**
|
|
1812
|
+
* @description 场景名称
|
|
1813
|
+
*/
|
|
1814
|
+
name: string;
|
|
1815
|
+
/**
|
|
1816
|
+
* @description 场景大小
|
|
1817
|
+
*/
|
|
1818
|
+
size: spec.vec2;
|
|
1819
|
+
};
|
|
1739
1820
|
declare enum ItemOrderAction {
|
|
1740
1821
|
BringToFront = 0,
|
|
1741
1822
|
SendToBack = 1,
|