@vvfx/sdk 0.0.0-alpha.8 → 0.0.0-alpha.9
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 +46 -4
- package/dist/index.d.ts +46 -4
- package/dist/index.global.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -46,6 +46,40 @@ type SetItemPropertyValueParam = {
|
|
|
46
46
|
}[keyof PageFormTypeAndPropertyReference[T]];
|
|
47
47
|
}[keyof PageFormTypeAndPropertyReference];
|
|
48
48
|
|
|
49
|
+
declare global {
|
|
50
|
+
interface Window {
|
|
51
|
+
/**
|
|
52
|
+
* @description 创建 WebP Core 实例
|
|
53
|
+
*/
|
|
54
|
+
createWebPCore: (config: any) => Promise<Img2WebPCore>;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
type FS = {
|
|
58
|
+
writeFile: (path: string, data: Uint8Array | string) => void;
|
|
59
|
+
readFile(path: string, opts: {
|
|
60
|
+
encoding: 'binary';
|
|
61
|
+
flags?: string | undefined;
|
|
62
|
+
}): Uint8Array;
|
|
63
|
+
readFile(path: string, opts: {
|
|
64
|
+
encoding: 'utf8';
|
|
65
|
+
flags?: string | undefined;
|
|
66
|
+
}): string;
|
|
67
|
+
readFile(path: string, opts?: {
|
|
68
|
+
flags?: string | undefined;
|
|
69
|
+
}): Uint8Array;
|
|
70
|
+
unlink: (path: string) => void;
|
|
71
|
+
quit: () => void;
|
|
72
|
+
};
|
|
73
|
+
type Pointer = number;
|
|
74
|
+
type Img2WebPCore = {
|
|
75
|
+
FS: FS;
|
|
76
|
+
run: (...args: string[]) => number;
|
|
77
|
+
cwrap: (ident: string, returnType: string, argTypes: string[]) => ((argc: number, argv: Pointer) => number);
|
|
78
|
+
_malloc: (size: number) => Pointer;
|
|
79
|
+
writeAsciiToMemory: (str: string, buffer: number, dontAddNull?: boolean) => void;
|
|
80
|
+
setValue: (ptr: number, value: any, type: string, noSafe?: boolean) => void;
|
|
81
|
+
};
|
|
82
|
+
|
|
49
83
|
type BaseFormProperty = {
|
|
50
84
|
position: [number, number, number];
|
|
51
85
|
rotation: [number, number, number];
|
|
@@ -112,7 +146,11 @@ type SDKInputParam = {
|
|
|
112
146
|
/**
|
|
113
147
|
* @description 是否开启出血区强制变换
|
|
114
148
|
*/
|
|
115
|
-
keepSafe
|
|
149
|
+
keepSafe?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* @description 是否开启静态预览功能 - 第一个合成仅支持播放,不可编辑
|
|
152
|
+
*/
|
|
153
|
+
staticPreview?: boolean;
|
|
116
154
|
};
|
|
117
155
|
/**
|
|
118
156
|
* @description 页面属性
|
|
@@ -243,12 +281,16 @@ type ExportParam = {
|
|
|
243
281
|
* @description 是否开启音轨
|
|
244
282
|
*/
|
|
245
283
|
audioEnable: boolean;
|
|
284
|
+
/**
|
|
285
|
+
* @description 视频fps - 默认 30
|
|
286
|
+
*/
|
|
287
|
+
fps?: number;
|
|
246
288
|
/**
|
|
247
289
|
* @description 导出视频类型 - 预留参数
|
|
248
290
|
*/
|
|
249
291
|
type?: string;
|
|
250
292
|
/**
|
|
251
|
-
* @
|
|
293
|
+
* @description 视频名称
|
|
252
294
|
*/
|
|
253
295
|
name?: string;
|
|
254
296
|
};
|
|
@@ -418,7 +460,7 @@ declare class SDK {
|
|
|
418
460
|
*/
|
|
419
461
|
getItemPropertyValue<T extends keyof PageFormTypeAndPropertyReference, N extends keyof PageFormTypeAndPropertyReference[T]>(param: GetItemPropertyValueParam<T, N>): GetItemPropertyValueResult<T, N> | undefined;
|
|
420
462
|
setItemPropertyValue(param: SetItemPropertyValueParam): Promise<void>;
|
|
421
|
-
generateScreenShot(id: number): Promise<string>;
|
|
463
|
+
generateScreenShot(id: number, size?: [number, number], tick?: number): Promise<string>;
|
|
422
464
|
/**
|
|
423
465
|
* @description 切换场景
|
|
424
466
|
* @param index 场景索引
|
|
@@ -440,7 +482,7 @@ declare class SDK {
|
|
|
440
482
|
*/
|
|
441
483
|
setPlayProgress(progress: number): Promise<void>;
|
|
442
484
|
getViewItems(): ViewItem[];
|
|
443
|
-
setPlayState(playState: 'play' | 'pause'): void
|
|
485
|
+
setPlayState(playState: 'play' | 'pause'): Promise<void>;
|
|
444
486
|
/**
|
|
445
487
|
* @description 获取场景预览图
|
|
446
488
|
* @returns 视图预览图
|